]> ncurses.scripts.mit.edu Git - ncurses.git/blob - Ada95/configure
ncurses 5.8 - patch 20110305
[ncurses.git] / Ada95 / configure
1 #! /bin/sh
2 # From configure.in Revision: 1.21 .
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated by Autoconf 2.52.20101001.
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.20101001.  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 echo "$as_me:3652: checking for specific curses-directory" >&5
3653 echo $ECHO_N "checking for specific curses-directory... $ECHO_C" >&6
3654
3655 # Check whether --with-curses-dir or --without-curses-dir was given.
3656 if test "${with_curses_dir+set}" = set; then
3657   withval="$with_curses_dir"
3658   cf_cv_curses_dir=$withval
3659 else
3660   cf_cv_curses_dir=no
3661 fi;
3662 echo "$as_me:3662: result: $cf_cv_curses_dir" >&5
3663 echo "${ECHO_T}$cf_cv_curses_dir" >&6
3664
3665 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
3666 then
3667
3668 if test "x$prefix" != xNONE; then
3669   cf_path_syntax="$prefix"
3670 else
3671   cf_path_syntax="$ac_default_prefix"
3672 fi
3673
3674 case ".$withval" in #(vi
3675 .\$\(*\)*|.\'*\'*) #(vi
3676   ;;
3677 ..|./*|.\\*) #(vi
3678   ;;
3679 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
3680   ;;
3681 .\${*prefix}*) #(vi
3682   eval withval="$withval"
3683   case ".$withval" in #(vi
3684   .NONE/*)
3685     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
3686     ;;
3687   esac
3688   ;; #(vi
3689 .no|.NONE/*)
3690   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
3691   ;;
3692 *)
3693   { { echo "$as_me:3693: error: expected a pathname, not \"$withval\"" >&5
3694 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
3695    { (exit 1); exit 1; }; }
3696   ;;
3697 esac
3698
3699         if test -d "$cf_cv_curses_dir"
3700         then
3701
3702 if test -n "$cf_cv_curses_dir/include" ; then
3703   for cf_add_incdir in $cf_cv_curses_dir/include
3704   do
3705         while test $cf_add_incdir != /usr/include
3706         do
3707           if test -d $cf_add_incdir
3708           then
3709                 cf_have_incdir=no
3710                 if test -n "$CFLAGS$CPPFLAGS" ; then
3711                   # a loop is needed to ensure we can add subdirs of existing dirs
3712                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
3713                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
3714                           cf_have_incdir=yes; break
3715                         fi
3716                   done
3717                 fi
3718
3719                 if test "$cf_have_incdir" = no ; then
3720                   if test "$cf_add_incdir" = /usr/local/include ; then
3721                         if test "$GCC" = yes
3722                         then
3723                           cf_save_CPPFLAGS=$CPPFLAGS
3724                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
3725                           cat >conftest.$ac_ext <<_ACEOF
3726 #line 3726 "configure"
3727 #include "confdefs.h"
3728 #include <stdio.h>
3729 int
3730 main ()
3731 {
3732 printf("Hello")
3733   ;
3734   return 0;
3735 }
3736 _ACEOF
3737 rm -f conftest.$ac_objext
3738 if { (eval echo "$as_me:3738: \"$ac_compile\"") >&5
3739   (eval $ac_compile) 2>&5
3740   ac_status=$?
3741   echo "$as_me:3741: \$? = $ac_status" >&5
3742   (exit $ac_status); } &&
3743          { ac_try='test -s conftest.$ac_objext'
3744   { (eval echo "$as_me:3744: \"$ac_try\"") >&5
3745   (eval $ac_try) 2>&5
3746   ac_status=$?
3747   echo "$as_me:3747: \$? = $ac_status" >&5
3748   (exit $ac_status); }; }; then
3749   :
3750 else
3751   echo "$as_me: failed program was:" >&5
3752 cat conftest.$ac_ext >&5
3753 cf_have_incdir=yes
3754 fi
3755 rm -f conftest.$ac_objext conftest.$ac_ext
3756                           CPPFLAGS=$cf_save_CPPFLAGS
3757                         fi
3758                   fi
3759                 fi
3760
3761                 if test "$cf_have_incdir" = no ; then
3762                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
3763
3764 echo "${as_me:-configure}:3764: testing adding $cf_add_incdir to include-path ..." 1>&5
3765
3766                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
3767
3768                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
3769                   test "$cf_top_incdir" = "$cf_add_incdir" && break
3770                   cf_add_incdir="$cf_top_incdir"
3771                 else
3772                   break
3773                 fi
3774           fi
3775         done
3776   done
3777 fi
3778
3779 if test -n "$cf_cv_curses_dir/lib" ; then
3780   for cf_add_libdir in $cf_cv_curses_dir/lib
3781   do
3782     if test $cf_add_libdir = /usr/lib ; then
3783       :
3784     elif test -d $cf_add_libdir
3785     then
3786       cf_have_libdir=no
3787       if test -n "$LDFLAGS$LIBS" ; then
3788         # a loop is needed to ensure we can add subdirs of existing dirs
3789         for cf_test_libdir in $LDFLAGS $LIBS ; do
3790           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
3791             cf_have_libdir=yes; break
3792           fi
3793         done
3794       fi
3795       if test "$cf_have_libdir" = no ; then
3796         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
3797
3798 echo "${as_me:-configure}:3798: testing adding $cf_add_libdir to library-path ..." 1>&5
3799
3800         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
3801       fi
3802     fi
3803   done
3804 fi
3805
3806         fi
3807 fi
3808
3809 echo "$as_me:3809: checking if you want wide-character code" >&5
3810 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
3811
3812 # Check whether --enable-widec or --disable-widec was given.
3813 if test "${enable_widec+set}" = set; then
3814   enableval="$enable_widec"
3815   with_widec=$enableval
3816 else
3817   with_widec=no
3818 fi;
3819 echo "$as_me:3819: result: $with_widec" >&5
3820 echo "${ECHO_T}$with_widec" >&6
3821 if test "$with_widec" = yes ; then
3822
3823 echo "$as_me:3823: checking for multibyte character support" >&5
3824 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
3825 if test "${cf_cv_utf8_lib+set}" = set; then
3826   echo $ECHO_N "(cached) $ECHO_C" >&6
3827 else
3828
3829         cf_save_LIBS="$LIBS"
3830         cat >conftest.$ac_ext <<_ACEOF
3831 #line 3831 "configure"
3832 #include "confdefs.h"
3833
3834 #include <stdlib.h>
3835 int
3836 main ()
3837 {
3838 putwc(0,0);
3839   ;
3840   return 0;
3841 }
3842 _ACEOF
3843 rm -f conftest.$ac_objext conftest$ac_exeext
3844 if { (eval echo "$as_me:3844: \"$ac_link\"") >&5
3845   (eval $ac_link) 2>&5
3846   ac_status=$?
3847   echo "$as_me:3847: \$? = $ac_status" >&5
3848   (exit $ac_status); } &&
3849          { ac_try='test -s conftest$ac_exeext'
3850   { (eval echo "$as_me:3850: \"$ac_try\"") >&5
3851   (eval $ac_try) 2>&5
3852   ac_status=$?
3853   echo "$as_me:3853: \$? = $ac_status" >&5
3854   (exit $ac_status); }; }; then
3855   cf_cv_utf8_lib=yes
3856 else
3857   echo "$as_me: failed program was:" >&5
3858 cat conftest.$ac_ext >&5
3859
3860 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
3861 # will be set on completion of the AC_TRY_LINK below.
3862 cf_cv_header_path_utf8=
3863 cf_cv_library_path_utf8=
3864
3865 echo "${as_me:-configure}:3865: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
3866
3867 cf_save_LIBS="$LIBS"
3868
3869 cat >conftest.$ac_ext <<_ACEOF
3870 #line 3870 "configure"
3871 #include "confdefs.h"
3872
3873 #include <libutf8.h>
3874 int
3875 main ()
3876 {
3877 putwc(0,0);
3878   ;
3879   return 0;
3880 }
3881 _ACEOF
3882 rm -f conftest.$ac_objext conftest$ac_exeext
3883 if { (eval echo "$as_me:3883: \"$ac_link\"") >&5
3884   (eval $ac_link) 2>&5
3885   ac_status=$?
3886   echo "$as_me:3886: \$? = $ac_status" >&5
3887   (exit $ac_status); } &&
3888          { ac_try='test -s conftest$ac_exeext'
3889   { (eval echo "$as_me:3889: \"$ac_try\"") >&5
3890   (eval $ac_try) 2>&5
3891   ac_status=$?
3892   echo "$as_me:3892: \$? = $ac_status" >&5
3893   (exit $ac_status); }; }; then
3894
3895         cf_cv_find_linkage_utf8=yes
3896         cf_cv_header_path_utf8=/usr/include
3897         cf_cv_library_path_utf8=/usr/lib
3898
3899 else
3900   echo "$as_me: failed program was:" >&5
3901 cat conftest.$ac_ext >&5
3902
3903 LIBS="-lutf8  $cf_save_LIBS"
3904
3905 cat >conftest.$ac_ext <<_ACEOF
3906 #line 3906 "configure"
3907 #include "confdefs.h"
3908
3909 #include <libutf8.h>
3910 int
3911 main ()
3912 {
3913 putwc(0,0);
3914   ;
3915   return 0;
3916 }
3917 _ACEOF
3918 rm -f conftest.$ac_objext conftest$ac_exeext
3919 if { (eval echo "$as_me:3919: \"$ac_link\"") >&5
3920   (eval $ac_link) 2>&5
3921   ac_status=$?
3922   echo "$as_me:3922: \$? = $ac_status" >&5
3923   (exit $ac_status); } &&
3924          { ac_try='test -s conftest$ac_exeext'
3925   { (eval echo "$as_me:3925: \"$ac_try\"") >&5
3926   (eval $ac_try) 2>&5
3927   ac_status=$?
3928   echo "$as_me:3928: \$? = $ac_status" >&5
3929   (exit $ac_status); }; }; then
3930
3931         cf_cv_find_linkage_utf8=yes
3932         cf_cv_header_path_utf8=/usr/include
3933         cf_cv_library_path_utf8=/usr/lib
3934         cf_cv_library_file_utf8="-lutf8"
3935
3936 else
3937   echo "$as_me: failed program was:" >&5
3938 cat conftest.$ac_ext >&5
3939
3940         cf_cv_find_linkage_utf8=no
3941         LIBS="$cf_save_LIBS"
3942
3943     test -n "$verbose" && echo "        find linkage for utf8 library" 1>&6
3944
3945 echo "${as_me:-configure}:3945: testing find linkage for utf8 library ..." 1>&5
3946
3947 echo "${as_me:-configure}:3947: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
3948
3949     cf_save_CPPFLAGS="$CPPFLAGS"
3950     cf_test_CPPFLAGS="$CPPFLAGS"
3951
3952 cf_search=
3953
3954 # collect the current set of include-directories from compiler flags
3955 cf_header_path_list=""
3956 if test -n "${CFLAGS}${CPPFLAGS}" ; then
3957         for cf_header_path in $CPPFLAGS $CFLAGS
3958         do
3959                 case $cf_header_path in #(vi
3960                 -I*)
3961                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
3962
3963 test "$cf_header_path" != "NONE" && \
3964 test -d "$cf_header_path" && \
3965  {
3966         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
3967         test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
3968         test -d $cf_header_path/include/utf8 &&       cf_search="$cf_search $cf_header_path/include/utf8"
3969         test -d $cf_header_path/include/utf8/include &&    cf_search="$cf_search $cf_header_path/include/utf8/include"
3970         test -d $cf_header_path/utf8/include &&       cf_search="$cf_search $cf_header_path/utf8/include"
3971         test -d $cf_header_path/utf8/include/utf8 &&    cf_search="$cf_search $cf_header_path/utf8/include/utf8"
3972 }
3973
3974                         cf_header_path_list="$cf_header_path_list $cf_search"
3975                         ;;
3976                 esac
3977         done
3978 fi
3979
3980 # add the variations for the package we are looking for
3981
3982 cf_search=
3983
3984 test "/usr" != "$prefix" && \
3985 test -d "/usr" && \
3986 (test $prefix = NONE || test "/usr" != "$prefix") && {
3987         test -n "$verbose" && echo "    ... testing for include-directories under /usr"
3988         test -d /usr/include &&          cf_search="$cf_search /usr/include"
3989         test -d /usr/include/utf8 &&       cf_search="$cf_search /usr/include/utf8"
3990         test -d /usr/include/utf8/include &&    cf_search="$cf_search /usr/include/utf8/include"
3991         test -d /usr/utf8/include &&       cf_search="$cf_search /usr/utf8/include"
3992         test -d /usr/utf8/include/utf8 &&    cf_search="$cf_search /usr/utf8/include/utf8"
3993 }
3994
3995 test "$prefix" != "NONE" && \
3996 test -d "$prefix" && \
3997  {
3998         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
3999         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
4000         test -d $prefix/include/utf8 &&       cf_search="$cf_search $prefix/include/utf8"
4001         test -d $prefix/include/utf8/include &&    cf_search="$cf_search $prefix/include/utf8/include"
4002         test -d $prefix/utf8/include &&       cf_search="$cf_search $prefix/utf8/include"
4003         test -d $prefix/utf8/include/utf8 &&    cf_search="$cf_search $prefix/utf8/include/utf8"
4004 }
4005
4006 test "/usr/local" != "$prefix" && \
4007 test -d "/usr/local" && \
4008 (test $prefix = NONE || test "/usr/local" != "$prefix") && {
4009         test -n "$verbose" && echo "    ... testing for include-directories under /usr/local"
4010         test -d /usr/local/include &&          cf_search="$cf_search /usr/local/include"
4011         test -d /usr/local/include/utf8 &&       cf_search="$cf_search /usr/local/include/utf8"
4012         test -d /usr/local/include/utf8/include &&    cf_search="$cf_search /usr/local/include/utf8/include"
4013         test -d /usr/local/utf8/include &&       cf_search="$cf_search /usr/local/utf8/include"
4014         test -d /usr/local/utf8/include/utf8 &&    cf_search="$cf_search /usr/local/utf8/include/utf8"
4015 }
4016
4017 test "/opt" != "$prefix" && \
4018 test -d "/opt" && \
4019 (test $prefix = NONE || test "/opt" != "$prefix") && {
4020         test -n "$verbose" && echo "    ... testing for include-directories under /opt"
4021         test -d /opt/include &&          cf_search="$cf_search /opt/include"
4022         test -d /opt/include/utf8 &&       cf_search="$cf_search /opt/include/utf8"
4023         test -d /opt/include/utf8/include &&    cf_search="$cf_search /opt/include/utf8/include"
4024         test -d /opt/utf8/include &&       cf_search="$cf_search /opt/utf8/include"
4025         test -d /opt/utf8/include/utf8 &&    cf_search="$cf_search /opt/utf8/include/utf8"
4026 }
4027
4028 test "$HOME" != "$prefix" && \
4029 test -d "$HOME" && \
4030 (test $prefix = NONE || test "$HOME" != "$prefix") && {
4031         test -n "$verbose" && echo "    ... testing for include-directories under $HOME"
4032         test -d $HOME/include &&          cf_search="$cf_search $HOME/include"
4033         test -d $HOME/include/utf8 &&       cf_search="$cf_search $HOME/include/utf8"
4034         test -d $HOME/include/utf8/include &&    cf_search="$cf_search $HOME/include/utf8/include"
4035         test -d $HOME/utf8/include &&       cf_search="$cf_search $HOME/utf8/include"
4036         test -d $HOME/utf8/include/utf8 &&    cf_search="$cf_search $HOME/utf8/include/utf8"
4037 }
4038
4039 test "$includedir" != NONE && \
4040 test "$includedir" != "/usr/include" && \
4041 test -d "$includedir" && {
4042         test -d $includedir &&    cf_search="$cf_search $includedir"
4043         test -d $includedir/utf8 && cf_search="$cf_search $includedir/utf8"
4044 }
4045
4046 test "$oldincludedir" != NONE && \
4047 test "$oldincludedir" != "/usr/include" && \
4048 test -d "$oldincludedir" && {
4049         test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
4050         test -d $oldincludedir/utf8 && cf_search="$cf_search $oldincludedir/utf8"
4051 }
4052
4053 cf_search="$cf_search $cf_header_path_list"
4054
4055     for cf_cv_header_path_utf8 in $cf_search
4056     do
4057       if test -d $cf_cv_header_path_utf8 ; then
4058         test -n "$verbose" && echo "    ... testing $cf_cv_header_path_utf8" 1>&6
4059
4060 echo "${as_me:-configure}:4060: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
4061
4062         CPPFLAGS="$cf_save_CPPFLAGS -I$cf_cv_header_path_utf8"
4063         cat >conftest.$ac_ext <<_ACEOF
4064 #line 4064 "configure"
4065 #include "confdefs.h"
4066
4067 #include <libutf8.h>
4068 int
4069 main ()
4070 {
4071 putwc(0,0);
4072   ;
4073   return 0;
4074 }
4075 _ACEOF
4076 rm -f conftest.$ac_objext
4077 if { (eval echo "$as_me:4077: \"$ac_compile\"") >&5
4078   (eval $ac_compile) 2>&5
4079   ac_status=$?
4080   echo "$as_me:4080: \$? = $ac_status" >&5
4081   (exit $ac_status); } &&
4082          { ac_try='test -s conftest.$ac_objext'
4083   { (eval echo "$as_me:4083: \"$ac_try\"") >&5
4084   (eval $ac_try) 2>&5
4085   ac_status=$?
4086   echo "$as_me:4086: \$? = $ac_status" >&5
4087   (exit $ac_status); }; }; then
4088
4089             test -n "$verbose" && echo "        ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
4090
4091 echo "${as_me:-configure}:4091: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
4092
4093             cf_cv_find_linkage_utf8=maybe
4094             cf_test_CPPFLAGS="$CPPFLAGS"
4095             break
4096 else
4097   echo "$as_me: failed program was:" >&5
4098 cat conftest.$ac_ext >&5
4099
4100             CPPFLAGS="$cf_save_CPPFLAGS"
4101
4102 fi
4103 rm -f conftest.$ac_objext conftest.$ac_ext
4104       fi
4105     done
4106
4107     if test "$cf_cv_find_linkage_utf8" = maybe ; then
4108
4109 echo "${as_me:-configure}:4109: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
4110
4111       cf_save_LIBS="$LIBS"
4112       cf_save_LDFLAGS="$LDFLAGS"
4113
4114       if test "$cf_cv_find_linkage_utf8" != yes ; then
4115
4116 cf_search=
4117 cf_library_path_list=""
4118 if test -n "${LDFLAGS}${LIBS}" ; then
4119         for cf_library_path in $LDFLAGS $LIBS
4120         do
4121                 case $cf_library_path in #(vi
4122                 -L*)
4123                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
4124
4125 test "$cf_library_path" != "NONE" && \
4126 test -d "$cf_library_path" && \
4127  {
4128         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
4129         test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
4130         test -d $cf_library_path/lib/utf8 &&       cf_search="$cf_search $cf_library_path/lib/utf8"
4131         test -d $cf_library_path/lib/utf8/lib &&    cf_search="$cf_search $cf_library_path/lib/utf8/lib"
4132         test -d $cf_library_path/utf8/lib &&       cf_search="$cf_search $cf_library_path/utf8/lib"
4133         test -d $cf_library_path/utf8/lib/utf8 &&    cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
4134 }
4135
4136                         cf_library_path_list="$cf_library_path_list $cf_search"
4137                         ;;
4138                 esac
4139         done
4140 fi
4141
4142 cf_search=
4143
4144 test "/usr" != "$prefix" && \
4145 test -d "/usr" && \
4146 (test $prefix = NONE || test "/usr" != "$prefix") && {
4147         test -n "$verbose" && echo "    ... testing for lib-directories under /usr"
4148         test -d /usr/lib &&          cf_search="$cf_search /usr/lib"
4149         test -d /usr/lib/utf8 &&       cf_search="$cf_search /usr/lib/utf8"
4150         test -d /usr/lib/utf8/lib &&    cf_search="$cf_search /usr/lib/utf8/lib"
4151         test -d /usr/utf8/lib &&       cf_search="$cf_search /usr/utf8/lib"
4152         test -d /usr/utf8/lib/utf8 &&    cf_search="$cf_search /usr/utf8/lib/utf8"
4153 }
4154
4155 test "$prefix" != "NONE" && \
4156 test -d "$prefix" && \
4157  {
4158         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
4159         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
4160         test -d $prefix/lib/utf8 &&       cf_search="$cf_search $prefix/lib/utf8"
4161         test -d $prefix/lib/utf8/lib &&    cf_search="$cf_search $prefix/lib/utf8/lib"
4162         test -d $prefix/utf8/lib &&       cf_search="$cf_search $prefix/utf8/lib"
4163         test -d $prefix/utf8/lib/utf8 &&    cf_search="$cf_search $prefix/utf8/lib/utf8"
4164 }
4165
4166 test "/usr/local" != "$prefix" && \
4167 test -d "/usr/local" && \
4168 (test $prefix = NONE || test "/usr/local" != "$prefix") && {
4169         test -n "$verbose" && echo "    ... testing for lib-directories under /usr/local"
4170         test -d /usr/local/lib &&          cf_search="$cf_search /usr/local/lib"
4171         test -d /usr/local/lib/utf8 &&       cf_search="$cf_search /usr/local/lib/utf8"
4172         test -d /usr/local/lib/utf8/lib &&    cf_search="$cf_search /usr/local/lib/utf8/lib"
4173         test -d /usr/local/utf8/lib &&       cf_search="$cf_search /usr/local/utf8/lib"
4174         test -d /usr/local/utf8/lib/utf8 &&    cf_search="$cf_search /usr/local/utf8/lib/utf8"
4175 }
4176
4177 test "/opt" != "$prefix" && \
4178 test -d "/opt" && \
4179 (test $prefix = NONE || test "/opt" != "$prefix") && {
4180         test -n "$verbose" && echo "    ... testing for lib-directories under /opt"
4181         test -d /opt/lib &&          cf_search="$cf_search /opt/lib"
4182         test -d /opt/lib/utf8 &&       cf_search="$cf_search /opt/lib/utf8"
4183         test -d /opt/lib/utf8/lib &&    cf_search="$cf_search /opt/lib/utf8/lib"
4184         test -d /opt/utf8/lib &&       cf_search="$cf_search /opt/utf8/lib"
4185         test -d /opt/utf8/lib/utf8 &&    cf_search="$cf_search /opt/utf8/lib/utf8"
4186 }
4187
4188 test "$HOME" != "$prefix" && \
4189 test -d "$HOME" && \
4190 (test $prefix = NONE || test "$HOME" != "$prefix") && {
4191         test -n "$verbose" && echo "    ... testing for lib-directories under $HOME"
4192         test -d $HOME/lib &&          cf_search="$cf_search $HOME/lib"
4193         test -d $HOME/lib/utf8 &&       cf_search="$cf_search $HOME/lib/utf8"
4194         test -d $HOME/lib/utf8/lib &&    cf_search="$cf_search $HOME/lib/utf8/lib"
4195         test -d $HOME/utf8/lib &&       cf_search="$cf_search $HOME/utf8/lib"
4196         test -d $HOME/utf8/lib/utf8 &&    cf_search="$cf_search $HOME/utf8/lib/utf8"
4197 }
4198
4199 cf_search="$cf_library_path_list $cf_search"
4200
4201         for cf_cv_library_path_utf8 in $cf_search
4202         do
4203           if test -d $cf_cv_library_path_utf8 ; then
4204             test -n "$verbose" && echo "        ... testing $cf_cv_library_path_utf8" 1>&6
4205
4206 echo "${as_me:-configure}:4206: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
4207
4208             CPPFLAGS="$cf_test_CPPFLAGS"
4209             LIBS="-lutf8  $cf_save_LIBS"
4210             LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
4211             cat >conftest.$ac_ext <<_ACEOF
4212 #line 4212 "configure"
4213 #include "confdefs.h"
4214
4215 #include <libutf8.h>
4216 int
4217 main ()
4218 {
4219 putwc(0,0);
4220   ;
4221   return 0;
4222 }
4223 _ACEOF
4224 rm -f conftest.$ac_objext conftest$ac_exeext
4225 if { (eval echo "$as_me:4225: \"$ac_link\"") >&5
4226   (eval $ac_link) 2>&5
4227   ac_status=$?
4228   echo "$as_me:4228: \$? = $ac_status" >&5
4229   (exit $ac_status); } &&
4230          { ac_try='test -s conftest$ac_exeext'
4231   { (eval echo "$as_me:4231: \"$ac_try\"") >&5
4232   (eval $ac_try) 2>&5
4233   ac_status=$?
4234   echo "$as_me:4234: \$? = $ac_status" >&5
4235   (exit $ac_status); }; }; then
4236
4237                 test -n "$verbose" && echo "    ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
4238
4239 echo "${as_me:-configure}:4239: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
4240
4241                 cf_cv_find_linkage_utf8=yes
4242                 cf_cv_library_file_utf8="-lutf8"
4243                 break
4244 else
4245   echo "$as_me: failed program was:" >&5
4246 cat conftest.$ac_ext >&5
4247
4248                 CPPFLAGS="$cf_save_CPPFLAGS"
4249                 LIBS="$cf_save_LIBS"
4250                 LDFLAGS="$cf_save_LDFLAGS"
4251
4252 fi
4253 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4254           fi
4255         done
4256         CPPFLAGS="$cf_save_CPPFLAGS"
4257         LDFLAGS="$cf_save_LDFLAGS"
4258       fi
4259
4260     else
4261       cf_cv_find_linkage_utf8=no
4262     fi
4263
4264 fi
4265 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4266
4267 fi
4268 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4269
4270 LIBS="$cf_save_LIBS"
4271
4272 if test "$cf_cv_find_linkage_utf8" = yes ; then
4273 cf_cv_utf8_lib=add-on
4274 else
4275 cf_cv_utf8_lib=no
4276 fi
4277
4278 fi
4279 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4280 fi
4281 echo "$as_me:4281: result: $cf_cv_utf8_lib" >&5
4282 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
4283
4284 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
4285 # ncurses/ncursesw:
4286 if test "$cf_cv_utf8_lib" = "add-on" ; then
4287         cat >>confdefs.h <<\EOF
4288 #define HAVE_LIBUTF8_H 1
4289 EOF
4290
4291 if test -n "$cf_cv_header_path_utf8" ; then
4292   for cf_add_incdir in $cf_cv_header_path_utf8
4293   do
4294         while test $cf_add_incdir != /usr/include
4295         do
4296           if test -d $cf_add_incdir
4297           then
4298                 cf_have_incdir=no
4299                 if test -n "$CFLAGS$CPPFLAGS" ; then
4300                   # a loop is needed to ensure we can add subdirs of existing dirs
4301                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
4302                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
4303                           cf_have_incdir=yes; break
4304                         fi
4305                   done
4306                 fi
4307
4308                 if test "$cf_have_incdir" = no ; then
4309                   if test "$cf_add_incdir" = /usr/local/include ; then
4310                         if test "$GCC" = yes
4311                         then
4312                           cf_save_CPPFLAGS=$CPPFLAGS
4313                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4314                           cat >conftest.$ac_ext <<_ACEOF
4315 #line 4315 "configure"
4316 #include "confdefs.h"
4317 #include <stdio.h>
4318 int
4319 main ()
4320 {
4321 printf("Hello")
4322   ;
4323   return 0;
4324 }
4325 _ACEOF
4326 rm -f conftest.$ac_objext
4327 if { (eval echo "$as_me:4327: \"$ac_compile\"") >&5
4328   (eval $ac_compile) 2>&5
4329   ac_status=$?
4330   echo "$as_me:4330: \$? = $ac_status" >&5
4331   (exit $ac_status); } &&
4332          { ac_try='test -s conftest.$ac_objext'
4333   { (eval echo "$as_me:4333: \"$ac_try\"") >&5
4334   (eval $ac_try) 2>&5
4335   ac_status=$?
4336   echo "$as_me:4336: \$? = $ac_status" >&5
4337   (exit $ac_status); }; }; then
4338   :
4339 else
4340   echo "$as_me: failed program was:" >&5
4341 cat conftest.$ac_ext >&5
4342 cf_have_incdir=yes
4343 fi
4344 rm -f conftest.$ac_objext conftest.$ac_ext
4345                           CPPFLAGS=$cf_save_CPPFLAGS
4346                         fi
4347                   fi
4348                 fi
4349
4350                 if test "$cf_have_incdir" = no ; then
4351                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
4352
4353 echo "${as_me:-configure}:4353: testing adding $cf_add_incdir to include-path ..." 1>&5
4354
4355                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4356
4357                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
4358                   test "$cf_top_incdir" = "$cf_add_incdir" && break
4359                   cf_add_incdir="$cf_top_incdir"
4360                 else
4361                   break
4362                 fi
4363           fi
4364         done
4365   done
4366 fi
4367
4368 if test -n "$cf_cv_library_path_utf8" ; then
4369   for cf_add_libdir in $cf_cv_library_path_utf8
4370   do
4371     if test $cf_add_libdir = /usr/lib ; then
4372       :
4373     elif test -d $cf_add_libdir
4374     then
4375       cf_have_libdir=no
4376       if test -n "$LDFLAGS$LIBS" ; then
4377         # a loop is needed to ensure we can add subdirs of existing dirs
4378         for cf_test_libdir in $LDFLAGS $LIBS ; do
4379           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
4380             cf_have_libdir=yes; break
4381           fi
4382         done
4383       fi
4384       if test "$cf_have_libdir" = no ; then
4385         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
4386
4387 echo "${as_me:-configure}:4387: testing adding $cf_add_libdir to library-path ..." 1>&5
4388
4389         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
4390       fi
4391     fi
4392   done
4393 fi
4394
4395         LIBS="$cf_cv_library_file_utf8 $LIBS"
4396 fi
4397
4398 cf_ncuconfig_root=ncursesw
4399
4400 echo "Looking for ${cf_ncuconfig_root}-config"
4401 for ac_prog in ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
4402 do
4403   # Extract the first word of "$ac_prog", so it can be a program name with args.
4404 set dummy $ac_prog; ac_word=$2
4405 echo "$as_me:4405: checking for $ac_word" >&5
4406 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4407 if test "${ac_cv_path_NCURSES_CONFIG+set}" = set; then
4408   echo $ECHO_N "(cached) $ECHO_C" >&6
4409 else
4410   case $NCURSES_CONFIG in
4411   [\\/]* | ?:[\\/]*)
4412   ac_cv_path_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test with a path.
4413   ;;
4414   *)
4415   ac_save_IFS=$IFS; IFS=$ac_path_separator
4416 ac_dummy="$PATH"
4417 for ac_dir in $ac_dummy; do
4418   IFS=$ac_save_IFS
4419   test -z "$ac_dir" && ac_dir=.
4420   if $as_executable_p "$ac_dir/$ac_word"; then
4421    ac_cv_path_NCURSES_CONFIG="$ac_dir/$ac_word"
4422    echo "$as_me:4422: found $ac_dir/$ac_word" >&5
4423    break
4424 fi
4425 done
4426
4427   ;;
4428 esac
4429 fi
4430 NCURSES_CONFIG=$ac_cv_path_NCURSES_CONFIG
4431
4432 if test -n "$NCURSES_CONFIG"; then
4433   echo "$as_me:4433: result: $NCURSES_CONFIG" >&5
4434 echo "${ECHO_T}$NCURSES_CONFIG" >&6
4435 else
4436   echo "$as_me:4436: result: no" >&5
4437 echo "${ECHO_T}no" >&6
4438 fi
4439
4440   test -n "$NCURSES_CONFIG" && break
4441 done
4442 test -n "$NCURSES_CONFIG" || NCURSES_CONFIG="none"
4443
4444 if test "$NCURSES_CONFIG" != none ; then
4445
4446 CPPFLAGS="$CPPFLAGS `$NCURSES_CONFIG --cflags`"
4447 LIBS="`$NCURSES_CONFIG --libs` $LIBS"
4448
4449 # even with config script, some packages use no-override for curses.h
4450
4451 echo "$as_me:4451: checking if we have identified curses headers" >&5
4452 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
4453 if test "${cf_cv_ncurses_header+set}" = set; then
4454   echo $ECHO_N "(cached) $ECHO_C" >&6
4455 else
4456
4457 cf_cv_ncurses_header=none
4458 for cf_header in  \
4459     ncursesw/curses.h \
4460         ncursesw/ncurses.h \
4461         curses.h \
4462         ncurses.h
4463 do
4464 cat >conftest.$ac_ext <<_ACEOF
4465 #line 4465 "configure"
4466 #include "confdefs.h"
4467 #include <${cf_header}>
4468 int
4469 main ()
4470 {
4471 initscr(); tgoto("?", 0,0)
4472   ;
4473   return 0;
4474 }
4475 _ACEOF
4476 rm -f conftest.$ac_objext
4477 if { (eval echo "$as_me:4477: \"$ac_compile\"") >&5
4478   (eval $ac_compile) 2>&5
4479   ac_status=$?
4480   echo "$as_me:4480: \$? = $ac_status" >&5
4481   (exit $ac_status); } &&
4482          { ac_try='test -s conftest.$ac_objext'
4483   { (eval echo "$as_me:4483: \"$ac_try\"") >&5
4484   (eval $ac_try) 2>&5
4485   ac_status=$?
4486   echo "$as_me:4486: \$? = $ac_status" >&5
4487   (exit $ac_status); }; }; then
4488   cf_cv_ncurses_header=$cf_header; break
4489 else
4490   echo "$as_me: failed program was:" >&5
4491 cat conftest.$ac_ext >&5
4492 fi
4493 rm -f conftest.$ac_objext conftest.$ac_ext
4494 done
4495
4496 fi
4497 echo "$as_me:4497: result: $cf_cv_ncurses_header" >&5
4498 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
4499
4500 if test "$cf_cv_ncurses_header" = none ; then
4501         { { echo "$as_me:4501: error: No curses header-files found" >&5
4502 echo "$as_me: error: No curses header-files found" >&2;}
4503    { (exit 1); exit 1; }; }
4504 fi
4505
4506 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
4507
4508 for ac_header in $cf_cv_ncurses_header
4509 do
4510 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4511 echo "$as_me:4511: checking for $ac_header" >&5
4512 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4513 if eval "test \"\${$as_ac_Header+set}\" = set"; then
4514   echo $ECHO_N "(cached) $ECHO_C" >&6
4515 else
4516   cat >conftest.$ac_ext <<_ACEOF
4517 #line 4517 "configure"
4518 #include "confdefs.h"
4519 #include <$ac_header>
4520 _ACEOF
4521 if { (eval echo "$as_me:4521: \"$ac_cpp conftest.$ac_ext\"") >&5
4522   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4523   ac_status=$?
4524   egrep -v '^ *\+' conftest.er1 >conftest.err
4525   rm -f conftest.er1
4526   cat conftest.err >&5
4527   echo "$as_me:4527: \$? = $ac_status" >&5
4528   (exit $ac_status); } >/dev/null; then
4529   if test -s conftest.err; then
4530     ac_cpp_err=$ac_c_preproc_warn_flag
4531   else
4532     ac_cpp_err=
4533   fi
4534 else
4535   ac_cpp_err=yes
4536 fi
4537 if test -z "$ac_cpp_err"; then
4538   eval "$as_ac_Header=yes"
4539 else
4540   echo "$as_me: failed program was:" >&5
4541   cat conftest.$ac_ext >&5
4542   eval "$as_ac_Header=no"
4543 fi
4544 rm -f conftest.err conftest.$ac_ext
4545 fi
4546 echo "$as_me:4546: result: `eval echo '${'$as_ac_Header'}'`" >&5
4547 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4548 if test `eval echo '${'$as_ac_Header'}'` = yes; then
4549   cat >>confdefs.h <<EOF
4550 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4551 EOF
4552
4553 fi
4554 done
4555
4556 cat >>confdefs.h <<\EOF
4557 #define NCURSES 1
4558 EOF
4559
4560 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
4561
4562 cat >>confdefs.h <<EOF
4563 #define $cf_nculib_ROOT 1
4564 EOF
4565
4566 cf_cv_ncurses_version=`$NCURSES_CONFIG --version`
4567
4568 else
4569
4570 cf_ncuhdr_root=ncursesw
4571
4572 test -n "$cf_cv_curses_dir" && \
4573 test "$cf_cv_curses_dir" != "no" && { \
4574
4575 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
4576   for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
4577   do
4578         while test $cf_add_incdir != /usr/include
4579         do
4580           if test -d $cf_add_incdir
4581           then
4582                 cf_have_incdir=no
4583                 if test -n "$CFLAGS$CPPFLAGS" ; then
4584                   # a loop is needed to ensure we can add subdirs of existing dirs
4585                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
4586                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
4587                           cf_have_incdir=yes; break
4588                         fi
4589                   done
4590                 fi
4591
4592                 if test "$cf_have_incdir" = no ; then
4593                   if test "$cf_add_incdir" = /usr/local/include ; then
4594                         if test "$GCC" = yes
4595                         then
4596                           cf_save_CPPFLAGS=$CPPFLAGS
4597                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4598                           cat >conftest.$ac_ext <<_ACEOF
4599 #line 4599 "configure"
4600 #include "confdefs.h"
4601 #include <stdio.h>
4602 int
4603 main ()
4604 {
4605 printf("Hello")
4606   ;
4607   return 0;
4608 }
4609 _ACEOF
4610 rm -f conftest.$ac_objext
4611 if { (eval echo "$as_me:4611: \"$ac_compile\"") >&5
4612   (eval $ac_compile) 2>&5
4613   ac_status=$?
4614   echo "$as_me:4614: \$? = $ac_status" >&5
4615   (exit $ac_status); } &&
4616          { ac_try='test -s conftest.$ac_objext'
4617   { (eval echo "$as_me:4617: \"$ac_try\"") >&5
4618   (eval $ac_try) 2>&5
4619   ac_status=$?
4620   echo "$as_me:4620: \$? = $ac_status" >&5
4621   (exit $ac_status); }; }; then
4622   :
4623 else
4624   echo "$as_me: failed program was:" >&5
4625 cat conftest.$ac_ext >&5
4626 cf_have_incdir=yes
4627 fi
4628 rm -f conftest.$ac_objext conftest.$ac_ext
4629                           CPPFLAGS=$cf_save_CPPFLAGS
4630                         fi
4631                   fi
4632                 fi
4633
4634                 if test "$cf_have_incdir" = no ; then
4635                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
4636
4637 echo "${as_me:-configure}:4637: testing adding $cf_add_incdir to include-path ..." 1>&5
4638
4639                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4640
4641                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
4642                   test "$cf_top_incdir" = "$cf_add_incdir" && break
4643                   cf_add_incdir="$cf_top_incdir"
4644                 else
4645                   break
4646                 fi
4647           fi
4648         done
4649   done
4650 fi
4651
4652 }
4653
4654 echo "$as_me:4654: checking for $cf_ncuhdr_root header in include-path" >&5
4655 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
4656 if test "${cf_cv_ncurses_h+set}" = set; then
4657   echo $ECHO_N "(cached) $ECHO_C" >&6
4658 else
4659
4660         cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
4661         ( test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw ) && cf_header_list="$cf_header_list curses.h ncurses.h"
4662         for cf_header in $cf_header_list
4663         do
4664
4665         cat >conftest.$ac_ext <<_ACEOF
4666 #line 4666 "configure"
4667 #include "confdefs.h"
4668
4669 #define _XOPEN_SOURCE_EXTENDED
4670 #undef  HAVE_LIBUTF8_H  /* in case we used CF_UTF8_LIB */
4671 #define HAVE_LIBUTF8_H  /* to force ncurses' header file to use cchar_t */
4672
4673 #include <$cf_header>
4674 int
4675 main ()
4676 {
4677
4678 #ifdef NCURSES_VERSION
4679
4680 #ifndef WACS_BSSB
4681         make an error
4682 #endif
4683
4684 printf("%s\n", NCURSES_VERSION);
4685 #else
4686 #ifdef __NCURSES_H
4687 printf("old\n");
4688 #else
4689         make an error
4690 #endif
4691 #endif
4692
4693   ;
4694   return 0;
4695 }
4696 _ACEOF
4697 rm -f conftest.$ac_objext
4698 if { (eval echo "$as_me:4698: \"$ac_compile\"") >&5
4699   (eval $ac_compile) 2>&5
4700   ac_status=$?
4701   echo "$as_me:4701: \$? = $ac_status" >&5
4702   (exit $ac_status); } &&
4703          { ac_try='test -s conftest.$ac_objext'
4704   { (eval echo "$as_me:4704: \"$ac_try\"") >&5
4705   (eval $ac_try) 2>&5
4706   ac_status=$?
4707   echo "$as_me:4707: \$? = $ac_status" >&5
4708   (exit $ac_status); }; }; then
4709   cf_cv_ncurses_h=$cf_header
4710
4711 else
4712   echo "$as_me: failed program was:" >&5
4713 cat conftest.$ac_ext >&5
4714 cf_cv_ncurses_h=no
4715 fi
4716 rm -f conftest.$ac_objext conftest.$ac_ext
4717
4718                 test "$cf_cv_ncurses_h" != no && break
4719         done
4720
4721 fi
4722 echo "$as_me:4722: result: $cf_cv_ncurses_h" >&5
4723 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
4724
4725 if test "$cf_cv_ncurses_h" != no ; then
4726         cf_cv_ncurses_header=$cf_cv_ncurses_h
4727 else
4728
4729 echo "$as_me:4729: checking for $cf_ncuhdr_root include-path" >&5
4730 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
4731 if test "${cf_cv_ncurses_h2+set}" = set; then
4732   echo $ECHO_N "(cached) $ECHO_C" >&6
4733 else
4734
4735         test -n "$verbose" && echo
4736
4737 cf_search=
4738
4739 # collect the current set of include-directories from compiler flags
4740 cf_header_path_list=""
4741 if test -n "${CFLAGS}${CPPFLAGS}" ; then
4742         for cf_header_path in $CPPFLAGS $CFLAGS
4743         do
4744                 case $cf_header_path in #(vi
4745                 -I*)
4746                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
4747
4748 test "$cf_header_path" != "NONE" && \
4749 test -d "$cf_header_path" && \
4750  {
4751         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
4752         test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
4753         test -d $cf_header_path/include/$cf_ncuhdr_root &&       cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
4754         test -d $cf_header_path/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
4755         test -d $cf_header_path/$cf_ncuhdr_root/include &&       cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
4756         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"
4757 }
4758
4759                         cf_header_path_list="$cf_header_path_list $cf_search"
4760                         ;;
4761                 esac
4762         done
4763 fi
4764
4765 # add the variations for the package we are looking for
4766
4767 cf_search=
4768
4769 test "/usr" != "$prefix" && \
4770 test -d "/usr" && \
4771 (test $prefix = NONE || test "/usr" != "$prefix") && {
4772         test -n "$verbose" && echo "    ... testing for include-directories under /usr"
4773         test -d /usr/include &&          cf_search="$cf_search /usr/include"
4774         test -d /usr/include/$cf_ncuhdr_root &&       cf_search="$cf_search /usr/include/$cf_ncuhdr_root"
4775         test -d /usr/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search /usr/include/$cf_ncuhdr_root/include"
4776         test -d /usr/$cf_ncuhdr_root/include &&       cf_search="$cf_search /usr/$cf_ncuhdr_root/include"
4777         test -d /usr/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search /usr/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
4778 }
4779
4780 test "$prefix" != "NONE" && \
4781 test -d "$prefix" && \
4782  {
4783         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
4784         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
4785         test -d $prefix/include/$cf_ncuhdr_root &&       cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
4786         test -d $prefix/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
4787         test -d $prefix/$cf_ncuhdr_root/include &&       cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
4788         test -d $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
4789 }
4790
4791 test "/usr/local" != "$prefix" && \
4792 test -d "/usr/local" && \
4793 (test $prefix = NONE || test "/usr/local" != "$prefix") && {
4794         test -n "$verbose" && echo "    ... testing for include-directories under /usr/local"
4795         test -d /usr/local/include &&          cf_search="$cf_search /usr/local/include"
4796         test -d /usr/local/include/$cf_ncuhdr_root &&       cf_search="$cf_search /usr/local/include/$cf_ncuhdr_root"
4797         test -d /usr/local/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search /usr/local/include/$cf_ncuhdr_root/include"
4798         test -d /usr/local/$cf_ncuhdr_root/include &&       cf_search="$cf_search /usr/local/$cf_ncuhdr_root/include"
4799         test -d /usr/local/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search /usr/local/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
4800 }
4801
4802 test "/opt" != "$prefix" && \
4803 test -d "/opt" && \
4804 (test $prefix = NONE || test "/opt" != "$prefix") && {
4805         test -n "$verbose" && echo "    ... testing for include-directories under /opt"
4806         test -d /opt/include &&          cf_search="$cf_search /opt/include"
4807         test -d /opt/include/$cf_ncuhdr_root &&       cf_search="$cf_search /opt/include/$cf_ncuhdr_root"
4808         test -d /opt/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search /opt/include/$cf_ncuhdr_root/include"
4809         test -d /opt/$cf_ncuhdr_root/include &&       cf_search="$cf_search /opt/$cf_ncuhdr_root/include"
4810         test -d /opt/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search /opt/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
4811 }
4812
4813 test "$HOME" != "$prefix" && \
4814 test -d "$HOME" && \
4815 (test $prefix = NONE || test "$HOME" != "$prefix") && {
4816         test -n "$verbose" && echo "    ... testing for include-directories under $HOME"
4817         test -d $HOME/include &&          cf_search="$cf_search $HOME/include"
4818         test -d $HOME/include/$cf_ncuhdr_root &&       cf_search="$cf_search $HOME/include/$cf_ncuhdr_root"
4819         test -d $HOME/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search $HOME/include/$cf_ncuhdr_root/include"
4820         test -d $HOME/$cf_ncuhdr_root/include &&       cf_search="$cf_search $HOME/$cf_ncuhdr_root/include"
4821         test -d $HOME/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search $HOME/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
4822 }
4823
4824 test "$includedir" != NONE && \
4825 test "$includedir" != "/usr/include" && \
4826 test -d "$includedir" && {
4827         test -d $includedir &&    cf_search="$cf_search $includedir"
4828         test -d $includedir/$cf_ncuhdr_root && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
4829 }
4830
4831 test "$oldincludedir" != NONE && \
4832 test "$oldincludedir" != "/usr/include" && \
4833 test -d "$oldincludedir" && {
4834         test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
4835         test -d $oldincludedir/$cf_ncuhdr_root && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
4836 }
4837
4838 cf_search="$cf_search $cf_header_path_list"
4839
4840         test -n "$verbose" && echo search path $cf_search
4841         cf_save2_CPPFLAGS="$CPPFLAGS"
4842         for cf_incdir in $cf_search
4843         do
4844
4845 if test -n "$cf_incdir" ; then
4846   for cf_add_incdir in $cf_incdir
4847   do
4848         while test $cf_add_incdir != /usr/include
4849         do
4850           if test -d $cf_add_incdir
4851           then
4852                 cf_have_incdir=no
4853                 if test -n "$CFLAGS$CPPFLAGS" ; then
4854                   # a loop is needed to ensure we can add subdirs of existing dirs
4855                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
4856                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
4857                           cf_have_incdir=yes; break
4858                         fi
4859                   done
4860                 fi
4861
4862                 if test "$cf_have_incdir" = no ; then
4863                   if test "$cf_add_incdir" = /usr/local/include ; then
4864                         if test "$GCC" = yes
4865                         then
4866                           cf_save_CPPFLAGS=$CPPFLAGS
4867                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4868                           cat >conftest.$ac_ext <<_ACEOF
4869 #line 4869 "configure"
4870 #include "confdefs.h"
4871 #include <stdio.h>
4872 int
4873 main ()
4874 {
4875 printf("Hello")
4876   ;
4877   return 0;
4878 }
4879 _ACEOF
4880 rm -f conftest.$ac_objext
4881 if { (eval echo "$as_me:4881: \"$ac_compile\"") >&5
4882   (eval $ac_compile) 2>&5
4883   ac_status=$?
4884   echo "$as_me:4884: \$? = $ac_status" >&5
4885   (exit $ac_status); } &&
4886          { ac_try='test -s conftest.$ac_objext'
4887   { (eval echo "$as_me:4887: \"$ac_try\"") >&5
4888   (eval $ac_try) 2>&5
4889   ac_status=$?
4890   echo "$as_me:4890: \$? = $ac_status" >&5
4891   (exit $ac_status); }; }; then
4892   :
4893 else
4894   echo "$as_me: failed program was:" >&5
4895 cat conftest.$ac_ext >&5
4896 cf_have_incdir=yes
4897 fi
4898 rm -f conftest.$ac_objext conftest.$ac_ext
4899                           CPPFLAGS=$cf_save_CPPFLAGS
4900                         fi
4901                   fi
4902                 fi
4903
4904                 if test "$cf_have_incdir" = no ; then
4905                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
4906
4907 echo "${as_me:-configure}:4907: testing adding $cf_add_incdir to include-path ..." 1>&5
4908
4909                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4910
4911                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
4912                   test "$cf_top_incdir" = "$cf_add_incdir" && break
4913                   cf_add_incdir="$cf_top_incdir"
4914                 else
4915                   break
4916                 fi
4917           fi
4918         done
4919   done
4920 fi
4921
4922                 for cf_header in \
4923                         ncurses.h \
4924                         curses.h
4925                 do
4926
4927         cat >conftest.$ac_ext <<_ACEOF
4928 #line 4928 "configure"
4929 #include "confdefs.h"
4930
4931 #include <$cf_header>
4932 int
4933 main ()
4934 {
4935
4936 #ifdef NCURSES_VERSION
4937
4938 printf("%s\n", NCURSES_VERSION);
4939 #else
4940 #ifdef __NCURSES_H
4941 printf("old\n");
4942 #else
4943         make an error
4944 #endif
4945 #endif
4946
4947   ;
4948   return 0;
4949 }
4950 _ACEOF
4951 rm -f conftest.$ac_objext
4952 if { (eval echo "$as_me:4952: \"$ac_compile\"") >&5
4953   (eval $ac_compile) 2>&5
4954   ac_status=$?
4955   echo "$as_me:4955: \$? = $ac_status" >&5
4956   (exit $ac_status); } &&
4957          { ac_try='test -s conftest.$ac_objext'
4958   { (eval echo "$as_me:4958: \"$ac_try\"") >&5
4959   (eval $ac_try) 2>&5
4960   ac_status=$?
4961   echo "$as_me:4961: \$? = $ac_status" >&5
4962   (exit $ac_status); }; }; then
4963   cf_cv_ncurses_h2=$cf_header
4964
4965 else
4966   echo "$as_me: failed program was:" >&5
4967 cat conftest.$ac_ext >&5
4968 cf_cv_ncurses_h2=no
4969 fi
4970 rm -f conftest.$ac_objext conftest.$ac_ext
4971
4972                         if test "$cf_cv_ncurses_h2" != no ; then
4973                                 cf_cv_ncurses_h2=$cf_incdir/$cf_header
4974                                 test -n "$verbose" && echo $ac_n "      ... found $ac_c" 1>&6
4975                                 break
4976                         fi
4977                         test -n "$verbose" && echo "    ... tested $cf_incdir/$cf_header" 1>&6
4978                 done
4979                 CPPFLAGS="$cf_save2_CPPFLAGS"
4980                 test "$cf_cv_ncurses_h2" != no && break
4981         done
4982         test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:4982: error: not found" >&5
4983 echo "$as_me: error: not found" >&2;}
4984    { (exit 1); exit 1; }; }
4985
4986 fi
4987 echo "$as_me:4987: result: $cf_cv_ncurses_h2" >&5
4988 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
4989
4990         cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's%/[^/]*$%%'`
4991         cf_cv_ncurses_header=`basename $cf_cv_ncurses_h2`
4992         if test `basename $cf_1st_incdir` = $cf_ncuhdr_root ; then
4993                 cf_cv_ncurses_header=$cf_ncuhdr_root/$cf_cv_ncurses_header
4994         fi
4995
4996 if test -n "$cf_1st_incdir" ; then
4997   for cf_add_incdir in $cf_1st_incdir
4998   do
4999         while test $cf_add_incdir != /usr/include
5000         do
5001           if test -d $cf_add_incdir
5002           then
5003                 cf_have_incdir=no
5004                 if test -n "$CFLAGS$CPPFLAGS" ; then
5005                   # a loop is needed to ensure we can add subdirs of existing dirs
5006                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
5007                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
5008                           cf_have_incdir=yes; break
5009                         fi
5010                   done
5011                 fi
5012
5013                 if test "$cf_have_incdir" = no ; then
5014                   if test "$cf_add_incdir" = /usr/local/include ; then
5015                         if test "$GCC" = yes
5016                         then
5017                           cf_save_CPPFLAGS=$CPPFLAGS
5018                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
5019                           cat >conftest.$ac_ext <<_ACEOF
5020 #line 5020 "configure"
5021 #include "confdefs.h"
5022 #include <stdio.h>
5023 int
5024 main ()
5025 {
5026 printf("Hello")
5027   ;
5028   return 0;
5029 }
5030 _ACEOF
5031 rm -f conftest.$ac_objext
5032 if { (eval echo "$as_me:5032: \"$ac_compile\"") >&5
5033   (eval $ac_compile) 2>&5
5034   ac_status=$?
5035   echo "$as_me:5035: \$? = $ac_status" >&5
5036   (exit $ac_status); } &&
5037          { ac_try='test -s conftest.$ac_objext'
5038   { (eval echo "$as_me:5038: \"$ac_try\"") >&5
5039   (eval $ac_try) 2>&5
5040   ac_status=$?
5041   echo "$as_me:5041: \$? = $ac_status" >&5
5042   (exit $ac_status); }; }; then
5043   :
5044 else
5045   echo "$as_me: failed program was:" >&5
5046 cat conftest.$ac_ext >&5
5047 cf_have_incdir=yes
5048 fi
5049 rm -f conftest.$ac_objext conftest.$ac_ext
5050                           CPPFLAGS=$cf_save_CPPFLAGS
5051                         fi
5052                   fi
5053                 fi
5054
5055                 if test "$cf_have_incdir" = no ; then
5056                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
5057
5058 echo "${as_me:-configure}:5058: testing adding $cf_add_incdir to include-path ..." 1>&5
5059
5060                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
5061
5062                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
5063                   test "$cf_top_incdir" = "$cf_add_incdir" && break
5064                   cf_add_incdir="$cf_top_incdir"
5065                 else
5066                   break
5067                 fi
5068           fi
5069         done
5070   done
5071 fi
5072
5073 fi
5074
5075 # Set definitions to allow ifdef'ing for ncurses.h
5076
5077 case $cf_cv_ncurses_header in # (vi
5078 *ncurses.h)
5079         cat >>confdefs.h <<\EOF
5080 #define HAVE_NCURSES_H 1
5081 EOF
5082
5083         ;;
5084 esac
5085
5086 case $cf_cv_ncurses_header in # (vi
5087 ncurses/curses.h|ncurses/ncurses.h)
5088         cat >>confdefs.h <<\EOF
5089 #define HAVE_NCURSES_NCURSES_H 1
5090 EOF
5091
5092         ;;
5093 ncursesw/curses.h|ncursesw/ncurses.h)
5094         cat >>confdefs.h <<\EOF
5095 #define HAVE_NCURSESW_NCURSES_H 1
5096 EOF
5097
5098         ;;
5099 esac
5100
5101 echo "$as_me:5101: checking for terminfo header" >&5
5102 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
5103 if test "${cf_cv_term_header+set}" = set; then
5104   echo $ECHO_N "(cached) $ECHO_C" >&6
5105 else
5106
5107 case ${cf_cv_ncurses_header} in #(vi
5108 */ncurses.h|*/ncursesw.h) #(vi
5109         cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
5110         ;;
5111 *)
5112         cf_term_header=term.h
5113         ;;
5114 esac
5115
5116 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
5117 do
5118 cat >conftest.$ac_ext <<_ACEOF
5119 #line 5119 "configure"
5120 #include "confdefs.h"
5121 #include <stdio.h>
5122 #include <${cf_cv_ncurses_header:-curses.h}>
5123 #include <$cf_test>
5124
5125 int
5126 main ()
5127 {
5128 int x = auto_left_margin
5129   ;
5130   return 0;
5131 }
5132 _ACEOF
5133 rm -f conftest.$ac_objext
5134 if { (eval echo "$as_me:5134: \"$ac_compile\"") >&5
5135   (eval $ac_compile) 2>&5
5136   ac_status=$?
5137   echo "$as_me:5137: \$? = $ac_status" >&5
5138   (exit $ac_status); } &&
5139          { ac_try='test -s conftest.$ac_objext'
5140   { (eval echo "$as_me:5140: \"$ac_try\"") >&5
5141   (eval $ac_try) 2>&5
5142   ac_status=$?
5143   echo "$as_me:5143: \$? = $ac_status" >&5
5144   (exit $ac_status); }; }; then
5145
5146         cf_cv_term_header="$cf_test"
5147 else
5148   echo "$as_me: failed program was:" >&5
5149 cat conftest.$ac_ext >&5
5150
5151         cf_cv_term_header=unknown
5152
5153 fi
5154 rm -f conftest.$ac_objext conftest.$ac_ext
5155         test "$cf_cv_term_header" != unknown && break
5156 done
5157
5158 fi
5159 echo "$as_me:5159: result: $cf_cv_term_header" >&5
5160 echo "${ECHO_T}$cf_cv_term_header" >&6
5161
5162 # Set definitions to allow ifdef'ing to accommodate subdirectories
5163
5164 case $cf_cv_term_header in # (vi
5165 *term.h)
5166         cat >>confdefs.h <<\EOF
5167 #define HAVE_TERM_H 1
5168 EOF
5169
5170         ;;
5171 esac
5172
5173 case $cf_cv_term_header in # (vi
5174 ncurses/term.h) #(vi
5175         cat >>confdefs.h <<\EOF
5176 #define HAVE_NCURSES_TERM_H 1
5177 EOF
5178
5179         ;;
5180 ncursesw/term.h)
5181         cat >>confdefs.h <<\EOF
5182 #define HAVE_NCURSESW_TERM_H 1
5183 EOF
5184
5185         ;;
5186 esac
5187
5188 # some applications need this, but should check for NCURSES_VERSION
5189 cat >>confdefs.h <<\EOF
5190 #define NCURSES 1
5191 EOF
5192
5193 echo "$as_me:5193: checking for ncurses version" >&5
5194 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
5195 if test "${cf_cv_ncurses_version+set}" = set; then
5196   echo $ECHO_N "(cached) $ECHO_C" >&6
5197 else
5198
5199         cf_cv_ncurses_version=no
5200         cf_tempfile=out$$
5201         rm -f $cf_tempfile
5202         if test "$cross_compiling" = yes; then
5203
5204         # This will not work if the preprocessor splits the line after the
5205         # Autoconf token.  The 'unproto' program does that.
5206         cat > conftest.$ac_ext <<EOF
5207 #include <${cf_cv_ncurses_header:-curses.h}>
5208 #undef Autoconf
5209 #ifdef NCURSES_VERSION
5210 Autoconf NCURSES_VERSION
5211 #else
5212 #ifdef __NCURSES_H
5213 Autoconf "old"
5214 #endif
5215 ;
5216 #endif
5217 EOF
5218         cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
5219         { (eval echo "$as_me:5219: \"$cf_try\"") >&5
5220   (eval $cf_try) 2>&5
5221   ac_status=$?
5222   echo "$as_me:5222: \$? = $ac_status" >&5
5223   (exit $ac_status); }
5224         if test -f conftest.out ; then
5225                 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
5226                 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
5227                 rm -f conftest.out
5228         fi
5229
5230 else
5231   cat >conftest.$ac_ext <<_ACEOF
5232 #line 5232 "configure"
5233 #include "confdefs.h"
5234
5235 #include <${cf_cv_ncurses_header:-curses.h}>
5236 #include <stdio.h>
5237 int main()
5238 {
5239         FILE *fp = fopen("$cf_tempfile", "w");
5240 #ifdef NCURSES_VERSION
5241 # ifdef NCURSES_VERSION_PATCH
5242         fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
5243 # else
5244         fprintf(fp, "%s\n", NCURSES_VERSION);
5245 # endif
5246 #else
5247 # ifdef __NCURSES_H
5248         fprintf(fp, "old\n");
5249 # else
5250         make an error
5251 # endif
5252 #endif
5253         ${cf_cv_main_return:-return}(0);
5254 }
5255 _ACEOF
5256 rm -f conftest$ac_exeext
5257 if { (eval echo "$as_me:5257: \"$ac_link\"") >&5
5258   (eval $ac_link) 2>&5
5259   ac_status=$?
5260   echo "$as_me:5260: \$? = $ac_status" >&5
5261   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5262   { (eval echo "$as_me:5262: \"$ac_try\"") >&5
5263   (eval $ac_try) 2>&5
5264   ac_status=$?
5265   echo "$as_me:5265: \$? = $ac_status" >&5
5266   (exit $ac_status); }; }; then
5267
5268         cf_cv_ncurses_version=`cat $cf_tempfile`
5269 else
5270   echo "$as_me: program exited with status $ac_status" >&5
5271 echo "$as_me: failed program was:" >&5
5272 cat conftest.$ac_ext >&5
5273 fi
5274 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5275 fi
5276         rm -f $cf_tempfile
5277
5278 fi
5279 echo "$as_me:5279: result: $cf_cv_ncurses_version" >&5
5280 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
5281 test "$cf_cv_ncurses_version" = no || cat >>confdefs.h <<\EOF
5282 #define NCURSES 1
5283 EOF
5284
5285 cf_nculib_root=ncursesw
5286         # This works, except for the special case where we find gpm, but
5287         # ncurses is in a nonstandard location via $LIBS, and we really want
5288         # to link gpm.
5289 cf_ncurses_LIBS=""
5290 cf_ncurses_SAVE="$LIBS"
5291 echo "$as_me:5291: checking for Gpm_Open in -lgpm" >&5
5292 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
5293 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
5294   echo $ECHO_N "(cached) $ECHO_C" >&6
5295 else
5296   ac_check_lib_save_LIBS=$LIBS
5297 LIBS="-lgpm  $LIBS"
5298 cat >conftest.$ac_ext <<_ACEOF
5299 #line 5299 "configure"
5300 #include "confdefs.h"
5301
5302 /* Override any gcc2 internal prototype to avoid an error.  */
5303 #ifdef __cplusplus
5304 extern "C"
5305 #endif
5306 /* We use char because int might match the return type of a gcc2
5307    builtin and then its argument prototype would still apply.  */
5308 char Gpm_Open ();
5309 int
5310 main ()
5311 {
5312 Gpm_Open ();
5313   ;
5314   return 0;
5315 }
5316 _ACEOF
5317 rm -f conftest.$ac_objext conftest$ac_exeext
5318 if { (eval echo "$as_me:5318: \"$ac_link\"") >&5
5319   (eval $ac_link) 2>&5
5320   ac_status=$?
5321   echo "$as_me:5321: \$? = $ac_status" >&5
5322   (exit $ac_status); } &&
5323          { ac_try='test -s conftest$ac_exeext'
5324   { (eval echo "$as_me:5324: \"$ac_try\"") >&5
5325   (eval $ac_try) 2>&5
5326   ac_status=$?
5327   echo "$as_me:5327: \$? = $ac_status" >&5
5328   (exit $ac_status); }; }; then
5329   ac_cv_lib_gpm_Gpm_Open=yes
5330 else
5331   echo "$as_me: failed program was:" >&5
5332 cat conftest.$ac_ext >&5
5333 ac_cv_lib_gpm_Gpm_Open=no
5334 fi
5335 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5336 LIBS=$ac_check_lib_save_LIBS
5337 fi
5338 echo "$as_me:5338: result: $ac_cv_lib_gpm_Gpm_Open" >&5
5339 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
5340 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
5341   echo "$as_me:5341: checking for initscr in -lgpm" >&5
5342 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
5343 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
5344   echo $ECHO_N "(cached) $ECHO_C" >&6
5345 else
5346   ac_check_lib_save_LIBS=$LIBS
5347 LIBS="-lgpm  $LIBS"
5348 cat >conftest.$ac_ext <<_ACEOF
5349 #line 5349 "configure"
5350 #include "confdefs.h"
5351
5352 /* Override any gcc2 internal prototype to avoid an error.  */
5353 #ifdef __cplusplus
5354 extern "C"
5355 #endif
5356 /* We use char because int might match the return type of a gcc2
5357    builtin and then its argument prototype would still apply.  */
5358 char initscr ();
5359 int
5360 main ()
5361 {
5362 initscr ();
5363   ;
5364   return 0;
5365 }
5366 _ACEOF
5367 rm -f conftest.$ac_objext conftest$ac_exeext
5368 if { (eval echo "$as_me:5368: \"$ac_link\"") >&5
5369   (eval $ac_link) 2>&5
5370   ac_status=$?
5371   echo "$as_me:5371: \$? = $ac_status" >&5
5372   (exit $ac_status); } &&
5373          { ac_try='test -s conftest$ac_exeext'
5374   { (eval echo "$as_me:5374: \"$ac_try\"") >&5
5375   (eval $ac_try) 2>&5
5376   ac_status=$?
5377   echo "$as_me:5377: \$? = $ac_status" >&5
5378   (exit $ac_status); }; }; then
5379   ac_cv_lib_gpm_initscr=yes
5380 else
5381   echo "$as_me: failed program was:" >&5
5382 cat conftest.$ac_ext >&5
5383 ac_cv_lib_gpm_initscr=no
5384 fi
5385 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5386 LIBS=$ac_check_lib_save_LIBS
5387 fi
5388 echo "$as_me:5388: result: $ac_cv_lib_gpm_initscr" >&5
5389 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
5390 if test $ac_cv_lib_gpm_initscr = yes; then
5391   LIBS="$cf_ncurses_SAVE"
5392 else
5393   cf_ncurses_LIBS="-lgpm"
5394 fi
5395
5396 fi
5397
5398 case $host_os in #(vi
5399 freebsd*)
5400         # This is only necessary if you are linking against an obsolete
5401         # version of ncurses (but it should do no harm, since it's static).
5402         if test "$cf_nculib_root" = ncurses ; then
5403                 echo "$as_me:5403: checking for tgoto in -lmytinfo" >&5
5404 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
5405 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
5406   echo $ECHO_N "(cached) $ECHO_C" >&6
5407 else
5408   ac_check_lib_save_LIBS=$LIBS
5409 LIBS="-lmytinfo  $LIBS"
5410 cat >conftest.$ac_ext <<_ACEOF
5411 #line 5411 "configure"
5412 #include "confdefs.h"
5413
5414 /* Override any gcc2 internal prototype to avoid an error.  */
5415 #ifdef __cplusplus
5416 extern "C"
5417 #endif
5418 /* We use char because int might match the return type of a gcc2
5419    builtin and then its argument prototype would still apply.  */
5420 char tgoto ();
5421 int
5422 main ()
5423 {
5424 tgoto ();
5425   ;
5426   return 0;
5427 }
5428 _ACEOF
5429 rm -f conftest.$ac_objext conftest$ac_exeext
5430 if { (eval echo "$as_me:5430: \"$ac_link\"") >&5
5431   (eval $ac_link) 2>&5
5432   ac_status=$?
5433   echo "$as_me:5433: \$? = $ac_status" >&5
5434   (exit $ac_status); } &&
5435          { ac_try='test -s conftest$ac_exeext'
5436   { (eval echo "$as_me:5436: \"$ac_try\"") >&5
5437   (eval $ac_try) 2>&5
5438   ac_status=$?
5439   echo "$as_me:5439: \$? = $ac_status" >&5
5440   (exit $ac_status); }; }; then
5441   ac_cv_lib_mytinfo_tgoto=yes
5442 else
5443   echo "$as_me: failed program was:" >&5
5444 cat conftest.$ac_ext >&5
5445 ac_cv_lib_mytinfo_tgoto=no
5446 fi
5447 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5448 LIBS=$ac_check_lib_save_LIBS
5449 fi
5450 echo "$as_me:5450: result: $ac_cv_lib_mytinfo_tgoto" >&5
5451 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
5452 if test $ac_cv_lib_mytinfo_tgoto = yes; then
5453   cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
5454 fi
5455
5456         fi
5457         ;;
5458 esac
5459
5460 LIBS="$cf_ncurses_LIBS $LIBS"
5461
5462 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
5463 then
5464         LIBS="-l$cf_nculib_root $LIBS"
5465 else
5466
5467         eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
5468         cf_libdir=""
5469         echo "$as_me:5469: checking for initscr" >&5
5470 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
5471 if test "${ac_cv_func_initscr+set}" = set; then
5472   echo $ECHO_N "(cached) $ECHO_C" >&6
5473 else
5474   cat >conftest.$ac_ext <<_ACEOF
5475 #line 5475 "configure"
5476 #include "confdefs.h"
5477 /* System header to define __stub macros and hopefully few prototypes,
5478     which can conflict with char initscr (); below.  */
5479 #include <assert.h>
5480 /* Override any gcc2 internal prototype to avoid an error.  */
5481 #ifdef __cplusplus
5482 extern "C"
5483 #endif
5484 /* We use char because int might match the return type of a gcc2
5485    builtin and then its argument prototype would still apply.  */
5486 char initscr ();
5487 char (*f) ();
5488
5489 int
5490 main ()
5491 {
5492 /* The GNU C library defines this for functions which it implements
5493     to always fail with ENOSYS.  Some functions are actually named
5494     something starting with __ and the normal name is an alias.  */
5495 #if defined (__stub_initscr) || defined (__stub___initscr)
5496 choke me
5497 #else
5498 f = initscr;
5499 #endif
5500
5501   ;
5502   return 0;
5503 }
5504 _ACEOF
5505 rm -f conftest.$ac_objext conftest$ac_exeext
5506 if { (eval echo "$as_me:5506: \"$ac_link\"") >&5
5507   (eval $ac_link) 2>&5
5508   ac_status=$?
5509   echo "$as_me:5509: \$? = $ac_status" >&5
5510   (exit $ac_status); } &&
5511          { ac_try='test -s conftest$ac_exeext'
5512   { (eval echo "$as_me:5512: \"$ac_try\"") >&5
5513   (eval $ac_try) 2>&5
5514   ac_status=$?
5515   echo "$as_me:5515: \$? = $ac_status" >&5
5516   (exit $ac_status); }; }; then
5517   ac_cv_func_initscr=yes
5518 else
5519   echo "$as_me: failed program was:" >&5
5520 cat conftest.$ac_ext >&5
5521 ac_cv_func_initscr=no
5522 fi
5523 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5524 fi
5525 echo "$as_me:5525: result: $ac_cv_func_initscr" >&5
5526 echo "${ECHO_T}$ac_cv_func_initscr" >&6
5527 if test $ac_cv_func_initscr = yes; then
5528   eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
5529 else
5530
5531                 cf_save_LIBS="$LIBS"
5532                 echo "$as_me:5532: checking for initscr in -l$cf_nculib_root" >&5
5533 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
5534                 LIBS="-l$cf_nculib_root $LIBS"
5535                 cat >conftest.$ac_ext <<_ACEOF
5536 #line 5536 "configure"
5537 #include "confdefs.h"
5538 #include <${cf_cv_ncurses_header:-curses.h}>
5539 int
5540 main ()
5541 {
5542 initscr()
5543   ;
5544   return 0;
5545 }
5546 _ACEOF
5547 rm -f conftest.$ac_objext conftest$ac_exeext
5548 if { (eval echo "$as_me:5548: \"$ac_link\"") >&5
5549   (eval $ac_link) 2>&5
5550   ac_status=$?
5551   echo "$as_me:5551: \$? = $ac_status" >&5
5552   (exit $ac_status); } &&
5553          { ac_try='test -s conftest$ac_exeext'
5554   { (eval echo "$as_me:5554: \"$ac_try\"") >&5
5555   (eval $ac_try) 2>&5
5556   ac_status=$?
5557   echo "$as_me:5557: \$? = $ac_status" >&5
5558   (exit $ac_status); }; }; then
5559   echo "$as_me:5559: result: yes" >&5
5560 echo "${ECHO_T}yes" >&6
5561                          eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
5562
5563 else
5564   echo "$as_me: failed program was:" >&5
5565 cat conftest.$ac_ext >&5
5566 echo "$as_me:5566: result: no" >&5
5567 echo "${ECHO_T}no" >&6
5568
5569 cf_search=
5570 cf_library_path_list=""
5571 if test -n "${LDFLAGS}${LIBS}" ; then
5572         for cf_library_path in $LDFLAGS $LIBS
5573         do
5574                 case $cf_library_path in #(vi
5575                 -L*)
5576                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
5577
5578 test "$cf_library_path" != "NONE" && \
5579 test -d "$cf_library_path" && \
5580  {
5581         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
5582         test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
5583         test -d $cf_library_path/lib/$cf_nculib_root &&       cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
5584         test -d $cf_library_path/lib/$cf_nculib_root/lib &&    cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
5585         test -d $cf_library_path/$cf_nculib_root/lib &&       cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
5586         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"
5587 }
5588
5589                         cf_library_path_list="$cf_library_path_list $cf_search"
5590                         ;;
5591                 esac
5592         done
5593 fi
5594
5595 cf_search=
5596
5597 test "/usr" != "$prefix" && \
5598 test -d "/usr" && \
5599 (test $prefix = NONE || test "/usr" != "$prefix") && {
5600         test -n "$verbose" && echo "    ... testing for lib-directories under /usr"
5601         test -d /usr/lib &&          cf_search="$cf_search /usr/lib"
5602         test -d /usr/lib/$cf_nculib_root &&       cf_search="$cf_search /usr/lib/$cf_nculib_root"
5603         test -d /usr/lib/$cf_nculib_root/lib &&    cf_search="$cf_search /usr/lib/$cf_nculib_root/lib"
5604         test -d /usr/$cf_nculib_root/lib &&       cf_search="$cf_search /usr/$cf_nculib_root/lib"
5605         test -d /usr/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search /usr/$cf_nculib_root/lib/$cf_nculib_root"
5606 }
5607
5608 test "$prefix" != "NONE" && \
5609 test -d "$prefix" && \
5610  {
5611         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
5612         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
5613         test -d $prefix/lib/$cf_nculib_root &&       cf_search="$cf_search $prefix/lib/$cf_nculib_root"
5614         test -d $prefix/lib/$cf_nculib_root/lib &&    cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
5615         test -d $prefix/$cf_nculib_root/lib &&       cf_search="$cf_search $prefix/$cf_nculib_root/lib"
5616         test -d $prefix/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
5617 }
5618
5619 test "/usr/local" != "$prefix" && \
5620 test -d "/usr/local" && \
5621 (test $prefix = NONE || test "/usr/local" != "$prefix") && {
5622         test -n "$verbose" && echo "    ... testing for lib-directories under /usr/local"
5623         test -d /usr/local/lib &&          cf_search="$cf_search /usr/local/lib"
5624         test -d /usr/local/lib/$cf_nculib_root &&       cf_search="$cf_search /usr/local/lib/$cf_nculib_root"
5625         test -d /usr/local/lib/$cf_nculib_root/lib &&    cf_search="$cf_search /usr/local/lib/$cf_nculib_root/lib"
5626         test -d /usr/local/$cf_nculib_root/lib &&       cf_search="$cf_search /usr/local/$cf_nculib_root/lib"
5627         test -d /usr/local/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search /usr/local/$cf_nculib_root/lib/$cf_nculib_root"
5628 }
5629
5630 test "/opt" != "$prefix" && \
5631 test -d "/opt" && \
5632 (test $prefix = NONE || test "/opt" != "$prefix") && {
5633         test -n "$verbose" && echo "    ... testing for lib-directories under /opt"
5634         test -d /opt/lib &&          cf_search="$cf_search /opt/lib"
5635         test -d /opt/lib/$cf_nculib_root &&       cf_search="$cf_search /opt/lib/$cf_nculib_root"
5636         test -d /opt/lib/$cf_nculib_root/lib &&    cf_search="$cf_search /opt/lib/$cf_nculib_root/lib"
5637         test -d /opt/$cf_nculib_root/lib &&       cf_search="$cf_search /opt/$cf_nculib_root/lib"
5638         test -d /opt/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search /opt/$cf_nculib_root/lib/$cf_nculib_root"
5639 }
5640
5641 test "$HOME" != "$prefix" && \
5642 test -d "$HOME" && \
5643 (test $prefix = NONE || test "$HOME" != "$prefix") && {
5644         test -n "$verbose" && echo "    ... testing for lib-directories under $HOME"
5645         test -d $HOME/lib &&          cf_search="$cf_search $HOME/lib"
5646         test -d $HOME/lib/$cf_nculib_root &&       cf_search="$cf_search $HOME/lib/$cf_nculib_root"
5647         test -d $HOME/lib/$cf_nculib_root/lib &&    cf_search="$cf_search $HOME/lib/$cf_nculib_root/lib"
5648         test -d $HOME/$cf_nculib_root/lib &&       cf_search="$cf_search $HOME/$cf_nculib_root/lib"
5649         test -d $HOME/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search $HOME/$cf_nculib_root/lib/$cf_nculib_root"
5650 }
5651
5652 cf_search="$cf_library_path_list $cf_search"
5653
5654                         for cf_libdir in $cf_search
5655                         do
5656                                 echo "$as_me:5656: checking for -l$cf_nculib_root in $cf_libdir" >&5
5657 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
5658                                 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
5659                                 cat >conftest.$ac_ext <<_ACEOF
5660 #line 5660 "configure"
5661 #include "confdefs.h"
5662 #include <${cf_cv_ncurses_header:-curses.h}>
5663 int
5664 main ()
5665 {
5666 initscr()
5667   ;
5668   return 0;
5669 }
5670 _ACEOF
5671 rm -f conftest.$ac_objext conftest$ac_exeext
5672 if { (eval echo "$as_me:5672: \"$ac_link\"") >&5
5673   (eval $ac_link) 2>&5
5674   ac_status=$?
5675   echo "$as_me:5675: \$? = $ac_status" >&5
5676   (exit $ac_status); } &&
5677          { ac_try='test -s conftest$ac_exeext'
5678   { (eval echo "$as_me:5678: \"$ac_try\"") >&5
5679   (eval $ac_try) 2>&5
5680   ac_status=$?
5681   echo "$as_me:5681: \$? = $ac_status" >&5
5682   (exit $ac_status); }; }; then
5683   echo "$as_me:5683: result: yes" >&5
5684 echo "${ECHO_T}yes" >&6
5685                                          eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
5686                                          break
5687 else
5688   echo "$as_me: failed program was:" >&5
5689 cat conftest.$ac_ext >&5
5690 echo "$as_me:5690: result: no" >&5
5691 echo "${ECHO_T}no" >&6
5692                                          LIBS="$cf_save_LIBS"
5693 fi
5694 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5695                         done
5696
5697 fi
5698 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5699
5700 fi
5701
5702 eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root
5703
5704 if test $cf_found_library = no ; then
5705         { { echo "$as_me:5705: error: Cannot link $cf_nculib_root library" >&5
5706 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
5707    { (exit 1); exit 1; }; }
5708 fi
5709
5710 fi
5711
5712 if test -n "$cf_ncurses_LIBS" ; then
5713         echo "$as_me:5713: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
5714 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
5715         cf_ncurses_SAVE="$LIBS"
5716         for p in $cf_ncurses_LIBS ; do
5717                 q=`echo $LIBS | sed -e "s%$p %%" -e "s%$p$%%"`
5718                 if test "$q" != "$LIBS" ; then
5719                         LIBS="$q"
5720                 fi
5721         done
5722         cat >conftest.$ac_ext <<_ACEOF
5723 #line 5723 "configure"
5724 #include "confdefs.h"
5725 #include <${cf_cv_ncurses_header:-curses.h}>
5726 int
5727 main ()
5728 {
5729 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
5730   ;
5731   return 0;
5732 }
5733 _ACEOF
5734 rm -f conftest.$ac_objext conftest$ac_exeext
5735 if { (eval echo "$as_me:5735: \"$ac_link\"") >&5
5736   (eval $ac_link) 2>&5
5737   ac_status=$?
5738   echo "$as_me:5738: \$? = $ac_status" >&5
5739   (exit $ac_status); } &&
5740          { ac_try='test -s conftest$ac_exeext'
5741   { (eval echo "$as_me:5741: \"$ac_try\"") >&5
5742   (eval $ac_try) 2>&5
5743   ac_status=$?
5744   echo "$as_me:5744: \$? = $ac_status" >&5
5745   (exit $ac_status); }; }; then
5746   echo "$as_me:5746: result: yes" >&5
5747 echo "${ECHO_T}yes" >&6
5748 else
5749   echo "$as_me: failed program was:" >&5
5750 cat conftest.$ac_ext >&5
5751 echo "$as_me:5751: result: no" >&5
5752 echo "${ECHO_T}no" >&6
5753                  LIBS="$cf_ncurses_SAVE"
5754 fi
5755 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5756 fi
5757
5758 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
5759
5760 cat >>confdefs.h <<EOF
5761 #define $cf_nculib_ROOT 1
5762 EOF
5763
5764 fi
5765
5766 else
5767
5768 cf_ncuconfig_root=ncurses
5769
5770 echo "Looking for ${cf_ncuconfig_root}-config"
5771 for ac_prog in ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
5772 do
5773   # Extract the first word of "$ac_prog", so it can be a program name with args.
5774 set dummy $ac_prog; ac_word=$2
5775 echo "$as_me:5775: checking for $ac_word" >&5
5776 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5777 if test "${ac_cv_path_NCURSES_CONFIG+set}" = set; then
5778   echo $ECHO_N "(cached) $ECHO_C" >&6
5779 else
5780   case $NCURSES_CONFIG in
5781   [\\/]* | ?:[\\/]*)
5782   ac_cv_path_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test with a path.
5783   ;;
5784   *)
5785   ac_save_IFS=$IFS; IFS=$ac_path_separator
5786 ac_dummy="$PATH"
5787 for ac_dir in $ac_dummy; do
5788   IFS=$ac_save_IFS
5789   test -z "$ac_dir" && ac_dir=.
5790   if $as_executable_p "$ac_dir/$ac_word"; then
5791    ac_cv_path_NCURSES_CONFIG="$ac_dir/$ac_word"
5792    echo "$as_me:5792: found $ac_dir/$ac_word" >&5
5793    break
5794 fi
5795 done
5796
5797   ;;
5798 esac
5799 fi
5800 NCURSES_CONFIG=$ac_cv_path_NCURSES_CONFIG
5801
5802 if test -n "$NCURSES_CONFIG"; then
5803   echo "$as_me:5803: result: $NCURSES_CONFIG" >&5
5804 echo "${ECHO_T}$NCURSES_CONFIG" >&6
5805 else
5806   echo "$as_me:5806: result: no" >&5
5807 echo "${ECHO_T}no" >&6
5808 fi
5809
5810   test -n "$NCURSES_CONFIG" && break
5811 done
5812 test -n "$NCURSES_CONFIG" || NCURSES_CONFIG="none"
5813
5814 if test "$NCURSES_CONFIG" != none ; then
5815
5816 CPPFLAGS="$CPPFLAGS `$NCURSES_CONFIG --cflags`"
5817 LIBS="`$NCURSES_CONFIG --libs` $LIBS"
5818
5819 # even with config script, some packages use no-override for curses.h
5820
5821 echo "$as_me:5821: checking if we have identified curses headers" >&5
5822 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
5823 if test "${cf_cv_ncurses_header+set}" = set; then
5824   echo $ECHO_N "(cached) $ECHO_C" >&6
5825 else
5826
5827 cf_cv_ncurses_header=none
5828 for cf_header in  \
5829     ncurses/curses.h \
5830         ncurses/ncurses.h \
5831         curses.h \
5832         ncurses.h
5833 do
5834 cat >conftest.$ac_ext <<_ACEOF
5835 #line 5835 "configure"
5836 #include "confdefs.h"
5837 #include <${cf_header}>
5838 int
5839 main ()
5840 {
5841 initscr(); tgoto("?", 0,0)
5842   ;
5843   return 0;
5844 }
5845 _ACEOF
5846 rm -f conftest.$ac_objext
5847 if { (eval echo "$as_me:5847: \"$ac_compile\"") >&5
5848   (eval $ac_compile) 2>&5
5849   ac_status=$?
5850   echo "$as_me:5850: \$? = $ac_status" >&5
5851   (exit $ac_status); } &&
5852          { ac_try='test -s conftest.$ac_objext'
5853   { (eval echo "$as_me:5853: \"$ac_try\"") >&5
5854   (eval $ac_try) 2>&5
5855   ac_status=$?
5856   echo "$as_me:5856: \$? = $ac_status" >&5
5857   (exit $ac_status); }; }; then
5858   cf_cv_ncurses_header=$cf_header; break
5859 else
5860   echo "$as_me: failed program was:" >&5
5861 cat conftest.$ac_ext >&5
5862 fi
5863 rm -f conftest.$ac_objext conftest.$ac_ext
5864 done
5865
5866 fi
5867 echo "$as_me:5867: result: $cf_cv_ncurses_header" >&5
5868 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
5869
5870 if test "$cf_cv_ncurses_header" = none ; then
5871         { { echo "$as_me:5871: error: No curses header-files found" >&5
5872 echo "$as_me: error: No curses header-files found" >&2;}
5873    { (exit 1); exit 1; }; }
5874 fi
5875
5876 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
5877
5878 for ac_header in $cf_cv_ncurses_header
5879 do
5880 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5881 echo "$as_me:5881: checking for $ac_header" >&5
5882 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5883 if eval "test \"\${$as_ac_Header+set}\" = set"; then
5884   echo $ECHO_N "(cached) $ECHO_C" >&6
5885 else
5886   cat >conftest.$ac_ext <<_ACEOF
5887 #line 5887 "configure"
5888 #include "confdefs.h"
5889 #include <$ac_header>
5890 _ACEOF
5891 if { (eval echo "$as_me:5891: \"$ac_cpp conftest.$ac_ext\"") >&5
5892   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5893   ac_status=$?
5894   egrep -v '^ *\+' conftest.er1 >conftest.err
5895   rm -f conftest.er1
5896   cat conftest.err >&5
5897   echo "$as_me:5897: \$? = $ac_status" >&5
5898   (exit $ac_status); } >/dev/null; then
5899   if test -s conftest.err; then
5900     ac_cpp_err=$ac_c_preproc_warn_flag
5901   else
5902     ac_cpp_err=
5903   fi
5904 else
5905   ac_cpp_err=yes
5906 fi
5907 if test -z "$ac_cpp_err"; then
5908   eval "$as_ac_Header=yes"
5909 else
5910   echo "$as_me: failed program was:" >&5
5911   cat conftest.$ac_ext >&5
5912   eval "$as_ac_Header=no"
5913 fi
5914 rm -f conftest.err conftest.$ac_ext
5915 fi
5916 echo "$as_me:5916: result: `eval echo '${'$as_ac_Header'}'`" >&5
5917 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
5918 if test `eval echo '${'$as_ac_Header'}'` = yes; then
5919   cat >>confdefs.h <<EOF
5920 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5921 EOF
5922
5923 fi
5924 done
5925
5926 cat >>confdefs.h <<\EOF
5927 #define NCURSES 1
5928 EOF
5929
5930 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
5931
5932 cat >>confdefs.h <<EOF
5933 #define $cf_nculib_ROOT 1
5934 EOF
5935
5936 cf_cv_ncurses_version=`$NCURSES_CONFIG --version`
5937
5938 else
5939
5940 cf_ncuhdr_root=ncurses
5941
5942 test -n "$cf_cv_curses_dir" && \
5943 test "$cf_cv_curses_dir" != "no" && { \
5944
5945 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
5946   for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
5947   do
5948         while test $cf_add_incdir != /usr/include
5949         do
5950           if test -d $cf_add_incdir
5951           then
5952                 cf_have_incdir=no
5953                 if test -n "$CFLAGS$CPPFLAGS" ; then
5954                   # a loop is needed to ensure we can add subdirs of existing dirs
5955                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
5956                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
5957                           cf_have_incdir=yes; break
5958                         fi
5959                   done
5960                 fi
5961
5962                 if test "$cf_have_incdir" = no ; then
5963                   if test "$cf_add_incdir" = /usr/local/include ; then
5964                         if test "$GCC" = yes
5965                         then
5966                           cf_save_CPPFLAGS=$CPPFLAGS
5967                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
5968                           cat >conftest.$ac_ext <<_ACEOF
5969 #line 5969 "configure"
5970 #include "confdefs.h"
5971 #include <stdio.h>
5972 int
5973 main ()
5974 {
5975 printf("Hello")
5976   ;
5977   return 0;
5978 }
5979 _ACEOF
5980 rm -f conftest.$ac_objext
5981 if { (eval echo "$as_me:5981: \"$ac_compile\"") >&5
5982   (eval $ac_compile) 2>&5
5983   ac_status=$?
5984   echo "$as_me:5984: \$? = $ac_status" >&5
5985   (exit $ac_status); } &&
5986          { ac_try='test -s conftest.$ac_objext'
5987   { (eval echo "$as_me:5987: \"$ac_try\"") >&5
5988   (eval $ac_try) 2>&5
5989   ac_status=$?
5990   echo "$as_me:5990: \$? = $ac_status" >&5
5991   (exit $ac_status); }; }; then
5992   :
5993 else
5994   echo "$as_me: failed program was:" >&5
5995 cat conftest.$ac_ext >&5
5996 cf_have_incdir=yes
5997 fi
5998 rm -f conftest.$ac_objext conftest.$ac_ext
5999                           CPPFLAGS=$cf_save_CPPFLAGS
6000                         fi
6001                   fi
6002                 fi
6003
6004                 if test "$cf_have_incdir" = no ; then
6005                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
6006
6007 echo "${as_me:-configure}:6007: testing adding $cf_add_incdir to include-path ..." 1>&5
6008
6009                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6010
6011                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
6012                   test "$cf_top_incdir" = "$cf_add_incdir" && break
6013                   cf_add_incdir="$cf_top_incdir"
6014                 else
6015                   break
6016                 fi
6017           fi
6018         done
6019   done
6020 fi
6021
6022 }
6023
6024 echo "$as_me:6024: checking for $cf_ncuhdr_root header in include-path" >&5
6025 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
6026 if test "${cf_cv_ncurses_h+set}" = set; then
6027   echo $ECHO_N "(cached) $ECHO_C" >&6
6028 else
6029
6030         cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
6031         ( test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw ) && cf_header_list="$cf_header_list curses.h ncurses.h"
6032         for cf_header in $cf_header_list
6033         do
6034
6035         cat >conftest.$ac_ext <<_ACEOF
6036 #line 6036 "configure"
6037 #include "confdefs.h"
6038
6039 #include <$cf_header>
6040 int
6041 main ()
6042 {
6043
6044 #ifdef NCURSES_VERSION
6045
6046 printf("%s\n", NCURSES_VERSION);
6047 #else
6048 #ifdef __NCURSES_H
6049 printf("old\n");
6050 #else
6051         make an error
6052 #endif
6053 #endif
6054
6055   ;
6056   return 0;
6057 }
6058 _ACEOF
6059 rm -f conftest.$ac_objext
6060 if { (eval echo "$as_me:6060: \"$ac_compile\"") >&5
6061   (eval $ac_compile) 2>&5
6062   ac_status=$?
6063   echo "$as_me:6063: \$? = $ac_status" >&5
6064   (exit $ac_status); } &&
6065          { ac_try='test -s conftest.$ac_objext'
6066   { (eval echo "$as_me:6066: \"$ac_try\"") >&5
6067   (eval $ac_try) 2>&5
6068   ac_status=$?
6069   echo "$as_me:6069: \$? = $ac_status" >&5
6070   (exit $ac_status); }; }; then
6071   cf_cv_ncurses_h=$cf_header
6072
6073 else
6074   echo "$as_me: failed program was:" >&5
6075 cat conftest.$ac_ext >&5
6076 cf_cv_ncurses_h=no
6077 fi
6078 rm -f conftest.$ac_objext conftest.$ac_ext
6079
6080                 test "$cf_cv_ncurses_h" != no && break
6081         done
6082
6083 fi
6084 echo "$as_me:6084: result: $cf_cv_ncurses_h" >&5
6085 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
6086
6087 if test "$cf_cv_ncurses_h" != no ; then
6088         cf_cv_ncurses_header=$cf_cv_ncurses_h
6089 else
6090
6091 echo "$as_me:6091: checking for $cf_ncuhdr_root include-path" >&5
6092 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
6093 if test "${cf_cv_ncurses_h2+set}" = set; then
6094   echo $ECHO_N "(cached) $ECHO_C" >&6
6095 else
6096
6097         test -n "$verbose" && echo
6098
6099 cf_search=
6100
6101 # collect the current set of include-directories from compiler flags
6102 cf_header_path_list=""
6103 if test -n "${CFLAGS}${CPPFLAGS}" ; then
6104         for cf_header_path in $CPPFLAGS $CFLAGS
6105         do
6106                 case $cf_header_path in #(vi
6107                 -I*)
6108                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
6109
6110 test "$cf_header_path" != "NONE" && \
6111 test -d "$cf_header_path" && \
6112  {
6113         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
6114         test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
6115         test -d $cf_header_path/include/$cf_ncuhdr_root &&       cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
6116         test -d $cf_header_path/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
6117         test -d $cf_header_path/$cf_ncuhdr_root/include &&       cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
6118         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"
6119 }
6120
6121                         cf_header_path_list="$cf_header_path_list $cf_search"
6122                         ;;
6123                 esac
6124         done
6125 fi
6126
6127 # add the variations for the package we are looking for
6128
6129 cf_search=
6130
6131 test "/usr" != "$prefix" && \
6132 test -d "/usr" && \
6133 (test $prefix = NONE || test "/usr" != "$prefix") && {
6134         test -n "$verbose" && echo "    ... testing for include-directories under /usr"
6135         test -d /usr/include &&          cf_search="$cf_search /usr/include"
6136         test -d /usr/include/$cf_ncuhdr_root &&       cf_search="$cf_search /usr/include/$cf_ncuhdr_root"
6137         test -d /usr/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search /usr/include/$cf_ncuhdr_root/include"
6138         test -d /usr/$cf_ncuhdr_root/include &&       cf_search="$cf_search /usr/$cf_ncuhdr_root/include"
6139         test -d /usr/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search /usr/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
6140 }
6141
6142 test "$prefix" != "NONE" && \
6143 test -d "$prefix" && \
6144  {
6145         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
6146         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
6147         test -d $prefix/include/$cf_ncuhdr_root &&       cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
6148         test -d $prefix/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
6149         test -d $prefix/$cf_ncuhdr_root/include &&       cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
6150         test -d $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
6151 }
6152
6153 test "/usr/local" != "$prefix" && \
6154 test -d "/usr/local" && \
6155 (test $prefix = NONE || test "/usr/local" != "$prefix") && {
6156         test -n "$verbose" && echo "    ... testing for include-directories under /usr/local"
6157         test -d /usr/local/include &&          cf_search="$cf_search /usr/local/include"
6158         test -d /usr/local/include/$cf_ncuhdr_root &&       cf_search="$cf_search /usr/local/include/$cf_ncuhdr_root"
6159         test -d /usr/local/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search /usr/local/include/$cf_ncuhdr_root/include"
6160         test -d /usr/local/$cf_ncuhdr_root/include &&       cf_search="$cf_search /usr/local/$cf_ncuhdr_root/include"
6161         test -d /usr/local/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search /usr/local/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
6162 }
6163
6164 test "/opt" != "$prefix" && \
6165 test -d "/opt" && \
6166 (test $prefix = NONE || test "/opt" != "$prefix") && {
6167         test -n "$verbose" && echo "    ... testing for include-directories under /opt"
6168         test -d /opt/include &&          cf_search="$cf_search /opt/include"
6169         test -d /opt/include/$cf_ncuhdr_root &&       cf_search="$cf_search /opt/include/$cf_ncuhdr_root"
6170         test -d /opt/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search /opt/include/$cf_ncuhdr_root/include"
6171         test -d /opt/$cf_ncuhdr_root/include &&       cf_search="$cf_search /opt/$cf_ncuhdr_root/include"
6172         test -d /opt/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search /opt/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
6173 }
6174
6175 test "$HOME" != "$prefix" && \
6176 test -d "$HOME" && \
6177 (test $prefix = NONE || test "$HOME" != "$prefix") && {
6178         test -n "$verbose" && echo "    ... testing for include-directories under $HOME"
6179         test -d $HOME/include &&          cf_search="$cf_search $HOME/include"
6180         test -d $HOME/include/$cf_ncuhdr_root &&       cf_search="$cf_search $HOME/include/$cf_ncuhdr_root"
6181         test -d $HOME/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search $HOME/include/$cf_ncuhdr_root/include"
6182         test -d $HOME/$cf_ncuhdr_root/include &&       cf_search="$cf_search $HOME/$cf_ncuhdr_root/include"
6183         test -d $HOME/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search $HOME/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
6184 }
6185
6186 test "$includedir" != NONE && \
6187 test "$includedir" != "/usr/include" && \
6188 test -d "$includedir" && {
6189         test -d $includedir &&    cf_search="$cf_search $includedir"
6190         test -d $includedir/$cf_ncuhdr_root && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
6191 }
6192
6193 test "$oldincludedir" != NONE && \
6194 test "$oldincludedir" != "/usr/include" && \
6195 test -d "$oldincludedir" && {
6196         test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
6197         test -d $oldincludedir/$cf_ncuhdr_root && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
6198 }
6199
6200 cf_search="$cf_search $cf_header_path_list"
6201
6202         test -n "$verbose" && echo search path $cf_search
6203         cf_save2_CPPFLAGS="$CPPFLAGS"
6204         for cf_incdir in $cf_search
6205         do
6206
6207 if test -n "$cf_incdir" ; then
6208   for cf_add_incdir in $cf_incdir
6209   do
6210         while test $cf_add_incdir != /usr/include
6211         do
6212           if test -d $cf_add_incdir
6213           then
6214                 cf_have_incdir=no
6215                 if test -n "$CFLAGS$CPPFLAGS" ; then
6216                   # a loop is needed to ensure we can add subdirs of existing dirs
6217                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
6218                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
6219                           cf_have_incdir=yes; break
6220                         fi
6221                   done
6222                 fi
6223
6224                 if test "$cf_have_incdir" = no ; then
6225                   if test "$cf_add_incdir" = /usr/local/include ; then
6226                         if test "$GCC" = yes
6227                         then
6228                           cf_save_CPPFLAGS=$CPPFLAGS
6229                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6230                           cat >conftest.$ac_ext <<_ACEOF
6231 #line 6231 "configure"
6232 #include "confdefs.h"
6233 #include <stdio.h>
6234 int
6235 main ()
6236 {
6237 printf("Hello")
6238   ;
6239   return 0;
6240 }
6241 _ACEOF
6242 rm -f conftest.$ac_objext
6243 if { (eval echo "$as_me:6243: \"$ac_compile\"") >&5
6244   (eval $ac_compile) 2>&5
6245   ac_status=$?
6246   echo "$as_me:6246: \$? = $ac_status" >&5
6247   (exit $ac_status); } &&
6248          { ac_try='test -s conftest.$ac_objext'
6249   { (eval echo "$as_me:6249: \"$ac_try\"") >&5
6250   (eval $ac_try) 2>&5
6251   ac_status=$?
6252   echo "$as_me:6252: \$? = $ac_status" >&5
6253   (exit $ac_status); }; }; then
6254   :
6255 else
6256   echo "$as_me: failed program was:" >&5
6257 cat conftest.$ac_ext >&5
6258 cf_have_incdir=yes
6259 fi
6260 rm -f conftest.$ac_objext conftest.$ac_ext
6261                           CPPFLAGS=$cf_save_CPPFLAGS
6262                         fi
6263                   fi
6264                 fi
6265
6266                 if test "$cf_have_incdir" = no ; then
6267                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
6268
6269 echo "${as_me:-configure}:6269: testing adding $cf_add_incdir to include-path ..." 1>&5
6270
6271                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6272
6273                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
6274                   test "$cf_top_incdir" = "$cf_add_incdir" && break
6275                   cf_add_incdir="$cf_top_incdir"
6276                 else
6277                   break
6278                 fi
6279           fi
6280         done
6281   done
6282 fi
6283
6284                 for cf_header in \
6285                         ncurses.h \
6286                         curses.h
6287                 do
6288
6289         cat >conftest.$ac_ext <<_ACEOF
6290 #line 6290 "configure"
6291 #include "confdefs.h"
6292
6293 #include <$cf_header>
6294 int
6295 main ()
6296 {
6297
6298 #ifdef NCURSES_VERSION
6299
6300 printf("%s\n", NCURSES_VERSION);
6301 #else
6302 #ifdef __NCURSES_H
6303 printf("old\n");
6304 #else
6305         make an error
6306 #endif
6307 #endif
6308
6309   ;
6310   return 0;
6311 }
6312 _ACEOF
6313 rm -f conftest.$ac_objext
6314 if { (eval echo "$as_me:6314: \"$ac_compile\"") >&5
6315   (eval $ac_compile) 2>&5
6316   ac_status=$?
6317   echo "$as_me:6317: \$? = $ac_status" >&5
6318   (exit $ac_status); } &&
6319          { ac_try='test -s conftest.$ac_objext'
6320   { (eval echo "$as_me:6320: \"$ac_try\"") >&5
6321   (eval $ac_try) 2>&5
6322   ac_status=$?
6323   echo "$as_me:6323: \$? = $ac_status" >&5
6324   (exit $ac_status); }; }; then
6325   cf_cv_ncurses_h2=$cf_header
6326
6327 else
6328   echo "$as_me: failed program was:" >&5
6329 cat conftest.$ac_ext >&5
6330 cf_cv_ncurses_h2=no
6331 fi
6332 rm -f conftest.$ac_objext conftest.$ac_ext
6333
6334                         if test "$cf_cv_ncurses_h2" != no ; then
6335                                 cf_cv_ncurses_h2=$cf_incdir/$cf_header
6336                                 test -n "$verbose" && echo $ac_n "      ... found $ac_c" 1>&6
6337                                 break
6338                         fi
6339                         test -n "$verbose" && echo "    ... tested $cf_incdir/$cf_header" 1>&6
6340                 done
6341                 CPPFLAGS="$cf_save2_CPPFLAGS"
6342                 test "$cf_cv_ncurses_h2" != no && break
6343         done
6344         test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:6344: error: not found" >&5
6345 echo "$as_me: error: not found" >&2;}
6346    { (exit 1); exit 1; }; }
6347
6348 fi
6349 echo "$as_me:6349: result: $cf_cv_ncurses_h2" >&5
6350 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
6351
6352         cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's%/[^/]*$%%'`
6353         cf_cv_ncurses_header=`basename $cf_cv_ncurses_h2`
6354         if test `basename $cf_1st_incdir` = $cf_ncuhdr_root ; then
6355                 cf_cv_ncurses_header=$cf_ncuhdr_root/$cf_cv_ncurses_header
6356         fi
6357
6358 if test -n "$cf_1st_incdir" ; then
6359   for cf_add_incdir in $cf_1st_incdir
6360   do
6361         while test $cf_add_incdir != /usr/include
6362         do
6363           if test -d $cf_add_incdir
6364           then
6365                 cf_have_incdir=no
6366                 if test -n "$CFLAGS$CPPFLAGS" ; then
6367                   # a loop is needed to ensure we can add subdirs of existing dirs
6368                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
6369                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
6370                           cf_have_incdir=yes; break
6371                         fi
6372                   done
6373                 fi
6374
6375                 if test "$cf_have_incdir" = no ; then
6376                   if test "$cf_add_incdir" = /usr/local/include ; then
6377                         if test "$GCC" = yes
6378                         then
6379                           cf_save_CPPFLAGS=$CPPFLAGS
6380                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6381                           cat >conftest.$ac_ext <<_ACEOF
6382 #line 6382 "configure"
6383 #include "confdefs.h"
6384 #include <stdio.h>
6385 int
6386 main ()
6387 {
6388 printf("Hello")
6389   ;
6390   return 0;
6391 }
6392 _ACEOF
6393 rm -f conftest.$ac_objext
6394 if { (eval echo "$as_me:6394: \"$ac_compile\"") >&5
6395   (eval $ac_compile) 2>&5
6396   ac_status=$?
6397   echo "$as_me:6397: \$? = $ac_status" >&5
6398   (exit $ac_status); } &&
6399          { ac_try='test -s conftest.$ac_objext'
6400   { (eval echo "$as_me:6400: \"$ac_try\"") >&5
6401   (eval $ac_try) 2>&5
6402   ac_status=$?
6403   echo "$as_me:6403: \$? = $ac_status" >&5
6404   (exit $ac_status); }; }; then
6405   :
6406 else
6407   echo "$as_me: failed program was:" >&5
6408 cat conftest.$ac_ext >&5
6409 cf_have_incdir=yes
6410 fi
6411 rm -f conftest.$ac_objext conftest.$ac_ext
6412                           CPPFLAGS=$cf_save_CPPFLAGS
6413                         fi
6414                   fi
6415                 fi
6416
6417                 if test "$cf_have_incdir" = no ; then
6418                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
6419
6420 echo "${as_me:-configure}:6420: testing adding $cf_add_incdir to include-path ..." 1>&5
6421
6422                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6423
6424                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
6425                   test "$cf_top_incdir" = "$cf_add_incdir" && break
6426                   cf_add_incdir="$cf_top_incdir"
6427                 else
6428                   break
6429                 fi
6430           fi
6431         done
6432   done
6433 fi
6434
6435 fi
6436
6437 # Set definitions to allow ifdef'ing for ncurses.h
6438
6439 case $cf_cv_ncurses_header in # (vi
6440 *ncurses.h)
6441         cat >>confdefs.h <<\EOF
6442 #define HAVE_NCURSES_H 1
6443 EOF
6444
6445         ;;
6446 esac
6447
6448 case $cf_cv_ncurses_header in # (vi
6449 ncurses/curses.h|ncurses/ncurses.h)
6450         cat >>confdefs.h <<\EOF
6451 #define HAVE_NCURSES_NCURSES_H 1
6452 EOF
6453
6454         ;;
6455 ncursesw/curses.h|ncursesw/ncurses.h)
6456         cat >>confdefs.h <<\EOF
6457 #define HAVE_NCURSESW_NCURSES_H 1
6458 EOF
6459
6460         ;;
6461 esac
6462
6463 echo "$as_me:6463: checking for terminfo header" >&5
6464 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
6465 if test "${cf_cv_term_header+set}" = set; then
6466   echo $ECHO_N "(cached) $ECHO_C" >&6
6467 else
6468
6469 case ${cf_cv_ncurses_header} in #(vi
6470 */ncurses.h|*/ncursesw.h) #(vi
6471         cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
6472         ;;
6473 *)
6474         cf_term_header=term.h
6475         ;;
6476 esac
6477
6478 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
6479 do
6480 cat >conftest.$ac_ext <<_ACEOF
6481 #line 6481 "configure"
6482 #include "confdefs.h"
6483 #include <stdio.h>
6484 #include <${cf_cv_ncurses_header:-curses.h}>
6485 #include <$cf_test>
6486
6487 int
6488 main ()
6489 {
6490 int x = auto_left_margin
6491   ;
6492   return 0;
6493 }
6494 _ACEOF
6495 rm -f conftest.$ac_objext
6496 if { (eval echo "$as_me:6496: \"$ac_compile\"") >&5
6497   (eval $ac_compile) 2>&5
6498   ac_status=$?
6499   echo "$as_me:6499: \$? = $ac_status" >&5
6500   (exit $ac_status); } &&
6501          { ac_try='test -s conftest.$ac_objext'
6502   { (eval echo "$as_me:6502: \"$ac_try\"") >&5
6503   (eval $ac_try) 2>&5
6504   ac_status=$?
6505   echo "$as_me:6505: \$? = $ac_status" >&5
6506   (exit $ac_status); }; }; then
6507
6508         cf_cv_term_header="$cf_test"
6509 else
6510   echo "$as_me: failed program was:" >&5
6511 cat conftest.$ac_ext >&5
6512
6513         cf_cv_term_header=unknown
6514
6515 fi
6516 rm -f conftest.$ac_objext conftest.$ac_ext
6517         test "$cf_cv_term_header" != unknown && break
6518 done
6519
6520 fi
6521 echo "$as_me:6521: result: $cf_cv_term_header" >&5
6522 echo "${ECHO_T}$cf_cv_term_header" >&6
6523
6524 # Set definitions to allow ifdef'ing to accommodate subdirectories
6525
6526 case $cf_cv_term_header in # (vi
6527 *term.h)
6528         cat >>confdefs.h <<\EOF
6529 #define HAVE_TERM_H 1
6530 EOF
6531
6532         ;;
6533 esac
6534
6535 case $cf_cv_term_header in # (vi
6536 ncurses/term.h) #(vi
6537         cat >>confdefs.h <<\EOF
6538 #define HAVE_NCURSES_TERM_H 1
6539 EOF
6540
6541         ;;
6542 ncursesw/term.h)
6543         cat >>confdefs.h <<\EOF
6544 #define HAVE_NCURSESW_TERM_H 1
6545 EOF
6546
6547         ;;
6548 esac
6549
6550 # some applications need this, but should check for NCURSES_VERSION
6551 cat >>confdefs.h <<\EOF
6552 #define NCURSES 1
6553 EOF
6554
6555 echo "$as_me:6555: checking for ncurses version" >&5
6556 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
6557 if test "${cf_cv_ncurses_version+set}" = set; then
6558   echo $ECHO_N "(cached) $ECHO_C" >&6
6559 else
6560
6561         cf_cv_ncurses_version=no
6562         cf_tempfile=out$$
6563         rm -f $cf_tempfile
6564         if test "$cross_compiling" = yes; then
6565
6566         # This will not work if the preprocessor splits the line after the
6567         # Autoconf token.  The 'unproto' program does that.
6568         cat > conftest.$ac_ext <<EOF
6569 #include <${cf_cv_ncurses_header:-curses.h}>
6570 #undef Autoconf
6571 #ifdef NCURSES_VERSION
6572 Autoconf NCURSES_VERSION
6573 #else
6574 #ifdef __NCURSES_H
6575 Autoconf "old"
6576 #endif
6577 ;
6578 #endif
6579 EOF
6580         cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
6581         { (eval echo "$as_me:6581: \"$cf_try\"") >&5
6582   (eval $cf_try) 2>&5
6583   ac_status=$?
6584   echo "$as_me:6584: \$? = $ac_status" >&5
6585   (exit $ac_status); }
6586         if test -f conftest.out ; then
6587                 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
6588                 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
6589                 rm -f conftest.out
6590         fi
6591
6592 else
6593   cat >conftest.$ac_ext <<_ACEOF
6594 #line 6594 "configure"
6595 #include "confdefs.h"
6596
6597 #include <${cf_cv_ncurses_header:-curses.h}>
6598 #include <stdio.h>
6599 int main()
6600 {
6601         FILE *fp = fopen("$cf_tempfile", "w");
6602 #ifdef NCURSES_VERSION
6603 # ifdef NCURSES_VERSION_PATCH
6604         fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
6605 # else
6606         fprintf(fp, "%s\n", NCURSES_VERSION);
6607 # endif
6608 #else
6609 # ifdef __NCURSES_H
6610         fprintf(fp, "old\n");
6611 # else
6612         make an error
6613 # endif
6614 #endif
6615         ${cf_cv_main_return:-return}(0);
6616 }
6617 _ACEOF
6618 rm -f conftest$ac_exeext
6619 if { (eval echo "$as_me:6619: \"$ac_link\"") >&5
6620   (eval $ac_link) 2>&5
6621   ac_status=$?
6622   echo "$as_me:6622: \$? = $ac_status" >&5
6623   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6624   { (eval echo "$as_me:6624: \"$ac_try\"") >&5
6625   (eval $ac_try) 2>&5
6626   ac_status=$?
6627   echo "$as_me:6627: \$? = $ac_status" >&5
6628   (exit $ac_status); }; }; then
6629
6630         cf_cv_ncurses_version=`cat $cf_tempfile`
6631 else
6632   echo "$as_me: program exited with status $ac_status" >&5
6633 echo "$as_me: failed program was:" >&5
6634 cat conftest.$ac_ext >&5
6635 fi
6636 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6637 fi
6638         rm -f $cf_tempfile
6639
6640 fi
6641 echo "$as_me:6641: result: $cf_cv_ncurses_version" >&5
6642 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
6643 test "$cf_cv_ncurses_version" = no || cat >>confdefs.h <<\EOF
6644 #define NCURSES 1
6645 EOF
6646
6647 cf_nculib_root=ncurses
6648         # This works, except for the special case where we find gpm, but
6649         # ncurses is in a nonstandard location via $LIBS, and we really want
6650         # to link gpm.
6651 cf_ncurses_LIBS=""
6652 cf_ncurses_SAVE="$LIBS"
6653 echo "$as_me:6653: checking for Gpm_Open in -lgpm" >&5
6654 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
6655 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
6656   echo $ECHO_N "(cached) $ECHO_C" >&6
6657 else
6658   ac_check_lib_save_LIBS=$LIBS
6659 LIBS="-lgpm  $LIBS"
6660 cat >conftest.$ac_ext <<_ACEOF
6661 #line 6661 "configure"
6662 #include "confdefs.h"
6663
6664 /* Override any gcc2 internal prototype to avoid an error.  */
6665 #ifdef __cplusplus
6666 extern "C"
6667 #endif
6668 /* We use char because int might match the return type of a gcc2
6669    builtin and then its argument prototype would still apply.  */
6670 char Gpm_Open ();
6671 int
6672 main ()
6673 {
6674 Gpm_Open ();
6675   ;
6676   return 0;
6677 }
6678 _ACEOF
6679 rm -f conftest.$ac_objext conftest$ac_exeext
6680 if { (eval echo "$as_me:6680: \"$ac_link\"") >&5
6681   (eval $ac_link) 2>&5
6682   ac_status=$?
6683   echo "$as_me:6683: \$? = $ac_status" >&5
6684   (exit $ac_status); } &&
6685          { ac_try='test -s conftest$ac_exeext'
6686   { (eval echo "$as_me:6686: \"$ac_try\"") >&5
6687   (eval $ac_try) 2>&5
6688   ac_status=$?
6689   echo "$as_me:6689: \$? = $ac_status" >&5
6690   (exit $ac_status); }; }; then
6691   ac_cv_lib_gpm_Gpm_Open=yes
6692 else
6693   echo "$as_me: failed program was:" >&5
6694 cat conftest.$ac_ext >&5
6695 ac_cv_lib_gpm_Gpm_Open=no
6696 fi
6697 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6698 LIBS=$ac_check_lib_save_LIBS
6699 fi
6700 echo "$as_me:6700: result: $ac_cv_lib_gpm_Gpm_Open" >&5
6701 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
6702 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
6703   echo "$as_me:6703: checking for initscr in -lgpm" >&5
6704 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
6705 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
6706   echo $ECHO_N "(cached) $ECHO_C" >&6
6707 else
6708   ac_check_lib_save_LIBS=$LIBS
6709 LIBS="-lgpm  $LIBS"
6710 cat >conftest.$ac_ext <<_ACEOF
6711 #line 6711 "configure"
6712 #include "confdefs.h"
6713
6714 /* Override any gcc2 internal prototype to avoid an error.  */
6715 #ifdef __cplusplus
6716 extern "C"
6717 #endif
6718 /* We use char because int might match the return type of a gcc2
6719    builtin and then its argument prototype would still apply.  */
6720 char initscr ();
6721 int
6722 main ()
6723 {
6724 initscr ();
6725   ;
6726   return 0;
6727 }
6728 _ACEOF
6729 rm -f conftest.$ac_objext conftest$ac_exeext
6730 if { (eval echo "$as_me:6730: \"$ac_link\"") >&5
6731   (eval $ac_link) 2>&5
6732   ac_status=$?
6733   echo "$as_me:6733: \$? = $ac_status" >&5
6734   (exit $ac_status); } &&
6735          { ac_try='test -s conftest$ac_exeext'
6736   { (eval echo "$as_me:6736: \"$ac_try\"") >&5
6737   (eval $ac_try) 2>&5
6738   ac_status=$?
6739   echo "$as_me:6739: \$? = $ac_status" >&5
6740   (exit $ac_status); }; }; then
6741   ac_cv_lib_gpm_initscr=yes
6742 else
6743   echo "$as_me: failed program was:" >&5
6744 cat conftest.$ac_ext >&5
6745 ac_cv_lib_gpm_initscr=no
6746 fi
6747 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6748 LIBS=$ac_check_lib_save_LIBS
6749 fi
6750 echo "$as_me:6750: result: $ac_cv_lib_gpm_initscr" >&5
6751 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
6752 if test $ac_cv_lib_gpm_initscr = yes; then
6753   LIBS="$cf_ncurses_SAVE"
6754 else
6755   cf_ncurses_LIBS="-lgpm"
6756 fi
6757
6758 fi
6759
6760 case $host_os in #(vi
6761 freebsd*)
6762         # This is only necessary if you are linking against an obsolete
6763         # version of ncurses (but it should do no harm, since it's static).
6764         if test "$cf_nculib_root" = ncurses ; then
6765                 echo "$as_me:6765: checking for tgoto in -lmytinfo" >&5
6766 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
6767 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
6768   echo $ECHO_N "(cached) $ECHO_C" >&6
6769 else
6770   ac_check_lib_save_LIBS=$LIBS
6771 LIBS="-lmytinfo  $LIBS"
6772 cat >conftest.$ac_ext <<_ACEOF
6773 #line 6773 "configure"
6774 #include "confdefs.h"
6775
6776 /* Override any gcc2 internal prototype to avoid an error.  */
6777 #ifdef __cplusplus
6778 extern "C"
6779 #endif
6780 /* We use char because int might match the return type of a gcc2
6781    builtin and then its argument prototype would still apply.  */
6782 char tgoto ();
6783 int
6784 main ()
6785 {
6786 tgoto ();
6787   ;
6788   return 0;
6789 }
6790 _ACEOF
6791 rm -f conftest.$ac_objext conftest$ac_exeext
6792 if { (eval echo "$as_me:6792: \"$ac_link\"") >&5
6793   (eval $ac_link) 2>&5
6794   ac_status=$?
6795   echo "$as_me:6795: \$? = $ac_status" >&5
6796   (exit $ac_status); } &&
6797          { ac_try='test -s conftest$ac_exeext'
6798   { (eval echo "$as_me:6798: \"$ac_try\"") >&5
6799   (eval $ac_try) 2>&5
6800   ac_status=$?
6801   echo "$as_me:6801: \$? = $ac_status" >&5
6802   (exit $ac_status); }; }; then
6803   ac_cv_lib_mytinfo_tgoto=yes
6804 else
6805   echo "$as_me: failed program was:" >&5
6806 cat conftest.$ac_ext >&5
6807 ac_cv_lib_mytinfo_tgoto=no
6808 fi
6809 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6810 LIBS=$ac_check_lib_save_LIBS
6811 fi
6812 echo "$as_me:6812: result: $ac_cv_lib_mytinfo_tgoto" >&5
6813 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
6814 if test $ac_cv_lib_mytinfo_tgoto = yes; then
6815   cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
6816 fi
6817
6818         fi
6819         ;;
6820 esac
6821
6822 LIBS="$cf_ncurses_LIBS $LIBS"
6823
6824 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
6825 then
6826         LIBS="-l$cf_nculib_root $LIBS"
6827 else
6828
6829         eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
6830         cf_libdir=""
6831         echo "$as_me:6831: checking for initscr" >&5
6832 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
6833 if test "${ac_cv_func_initscr+set}" = set; then
6834   echo $ECHO_N "(cached) $ECHO_C" >&6
6835 else
6836   cat >conftest.$ac_ext <<_ACEOF
6837 #line 6837 "configure"
6838 #include "confdefs.h"
6839 /* System header to define __stub macros and hopefully few prototypes,
6840     which can conflict with char initscr (); below.  */
6841 #include <assert.h>
6842 /* Override any gcc2 internal prototype to avoid an error.  */
6843 #ifdef __cplusplus
6844 extern "C"
6845 #endif
6846 /* We use char because int might match the return type of a gcc2
6847    builtin and then its argument prototype would still apply.  */
6848 char initscr ();
6849 char (*f) ();
6850
6851 int
6852 main ()
6853 {
6854 /* The GNU C library defines this for functions which it implements
6855     to always fail with ENOSYS.  Some functions are actually named
6856     something starting with __ and the normal name is an alias.  */
6857 #if defined (__stub_initscr) || defined (__stub___initscr)
6858 choke me
6859 #else
6860 f = initscr;
6861 #endif
6862
6863   ;
6864   return 0;
6865 }
6866 _ACEOF
6867 rm -f conftest.$ac_objext conftest$ac_exeext
6868 if { (eval echo "$as_me:6868: \"$ac_link\"") >&5
6869   (eval $ac_link) 2>&5
6870   ac_status=$?
6871   echo "$as_me:6871: \$? = $ac_status" >&5
6872   (exit $ac_status); } &&
6873          { ac_try='test -s conftest$ac_exeext'
6874   { (eval echo "$as_me:6874: \"$ac_try\"") >&5
6875   (eval $ac_try) 2>&5
6876   ac_status=$?
6877   echo "$as_me:6877: \$? = $ac_status" >&5
6878   (exit $ac_status); }; }; then
6879   ac_cv_func_initscr=yes
6880 else
6881   echo "$as_me: failed program was:" >&5
6882 cat conftest.$ac_ext >&5
6883 ac_cv_func_initscr=no
6884 fi
6885 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6886 fi
6887 echo "$as_me:6887: result: $ac_cv_func_initscr" >&5
6888 echo "${ECHO_T}$ac_cv_func_initscr" >&6
6889 if test $ac_cv_func_initscr = yes; then
6890   eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
6891 else
6892
6893                 cf_save_LIBS="$LIBS"
6894                 echo "$as_me:6894: checking for initscr in -l$cf_nculib_root" >&5
6895 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
6896                 LIBS="-l$cf_nculib_root $LIBS"
6897                 cat >conftest.$ac_ext <<_ACEOF
6898 #line 6898 "configure"
6899 #include "confdefs.h"
6900 #include <${cf_cv_ncurses_header:-curses.h}>
6901 int
6902 main ()
6903 {
6904 initscr()
6905   ;
6906   return 0;
6907 }
6908 _ACEOF
6909 rm -f conftest.$ac_objext conftest$ac_exeext
6910 if { (eval echo "$as_me:6910: \"$ac_link\"") >&5
6911   (eval $ac_link) 2>&5
6912   ac_status=$?
6913   echo "$as_me:6913: \$? = $ac_status" >&5
6914   (exit $ac_status); } &&
6915          { ac_try='test -s conftest$ac_exeext'
6916   { (eval echo "$as_me:6916: \"$ac_try\"") >&5
6917   (eval $ac_try) 2>&5
6918   ac_status=$?
6919   echo "$as_me:6919: \$? = $ac_status" >&5
6920   (exit $ac_status); }; }; then
6921   echo "$as_me:6921: result: yes" >&5
6922 echo "${ECHO_T}yes" >&6
6923                          eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
6924
6925 else
6926   echo "$as_me: failed program was:" >&5
6927 cat conftest.$ac_ext >&5
6928 echo "$as_me:6928: result: no" >&5
6929 echo "${ECHO_T}no" >&6
6930
6931 cf_search=
6932 cf_library_path_list=""
6933 if test -n "${LDFLAGS}${LIBS}" ; then
6934         for cf_library_path in $LDFLAGS $LIBS
6935         do
6936                 case $cf_library_path in #(vi
6937                 -L*)
6938                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
6939
6940 test "$cf_library_path" != "NONE" && \
6941 test -d "$cf_library_path" && \
6942  {
6943         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
6944         test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
6945         test -d $cf_library_path/lib/$cf_nculib_root &&       cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
6946         test -d $cf_library_path/lib/$cf_nculib_root/lib &&    cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
6947         test -d $cf_library_path/$cf_nculib_root/lib &&       cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
6948         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"
6949 }
6950
6951                         cf_library_path_list="$cf_library_path_list $cf_search"
6952                         ;;
6953                 esac
6954         done
6955 fi
6956
6957 cf_search=
6958
6959 test "/usr" != "$prefix" && \
6960 test -d "/usr" && \
6961 (test $prefix = NONE || test "/usr" != "$prefix") && {
6962         test -n "$verbose" && echo "    ... testing for lib-directories under /usr"
6963         test -d /usr/lib &&          cf_search="$cf_search /usr/lib"
6964         test -d /usr/lib/$cf_nculib_root &&       cf_search="$cf_search /usr/lib/$cf_nculib_root"
6965         test -d /usr/lib/$cf_nculib_root/lib &&    cf_search="$cf_search /usr/lib/$cf_nculib_root/lib"
6966         test -d /usr/$cf_nculib_root/lib &&       cf_search="$cf_search /usr/$cf_nculib_root/lib"
6967         test -d /usr/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search /usr/$cf_nculib_root/lib/$cf_nculib_root"
6968 }
6969
6970 test "$prefix" != "NONE" && \
6971 test -d "$prefix" && \
6972  {
6973         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
6974         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
6975         test -d $prefix/lib/$cf_nculib_root &&       cf_search="$cf_search $prefix/lib/$cf_nculib_root"
6976         test -d $prefix/lib/$cf_nculib_root/lib &&    cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
6977         test -d $prefix/$cf_nculib_root/lib &&       cf_search="$cf_search $prefix/$cf_nculib_root/lib"
6978         test -d $prefix/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
6979 }
6980
6981 test "/usr/local" != "$prefix" && \
6982 test -d "/usr/local" && \
6983 (test $prefix = NONE || test "/usr/local" != "$prefix") && {
6984         test -n "$verbose" && echo "    ... testing for lib-directories under /usr/local"
6985         test -d /usr/local/lib &&          cf_search="$cf_search /usr/local/lib"
6986         test -d /usr/local/lib/$cf_nculib_root &&       cf_search="$cf_search /usr/local/lib/$cf_nculib_root"
6987         test -d /usr/local/lib/$cf_nculib_root/lib &&    cf_search="$cf_search /usr/local/lib/$cf_nculib_root/lib"
6988         test -d /usr/local/$cf_nculib_root/lib &&       cf_search="$cf_search /usr/local/$cf_nculib_root/lib"
6989         test -d /usr/local/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search /usr/local/$cf_nculib_root/lib/$cf_nculib_root"
6990 }
6991
6992 test "/opt" != "$prefix" && \
6993 test -d "/opt" && \
6994 (test $prefix = NONE || test "/opt" != "$prefix") && {
6995         test -n "$verbose" && echo "    ... testing for lib-directories under /opt"
6996         test -d /opt/lib &&          cf_search="$cf_search /opt/lib"
6997         test -d /opt/lib/$cf_nculib_root &&       cf_search="$cf_search /opt/lib/$cf_nculib_root"
6998         test -d /opt/lib/$cf_nculib_root/lib &&    cf_search="$cf_search /opt/lib/$cf_nculib_root/lib"
6999         test -d /opt/$cf_nculib_root/lib &&       cf_search="$cf_search /opt/$cf_nculib_root/lib"
7000         test -d /opt/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search /opt/$cf_nculib_root/lib/$cf_nculib_root"
7001 }
7002
7003 test "$HOME" != "$prefix" && \
7004 test -d "$HOME" && \
7005 (test $prefix = NONE || test "$HOME" != "$prefix") && {
7006         test -n "$verbose" && echo "    ... testing for lib-directories under $HOME"
7007         test -d $HOME/lib &&          cf_search="$cf_search $HOME/lib"
7008         test -d $HOME/lib/$cf_nculib_root &&       cf_search="$cf_search $HOME/lib/$cf_nculib_root"
7009         test -d $HOME/lib/$cf_nculib_root/lib &&    cf_search="$cf_search $HOME/lib/$cf_nculib_root/lib"
7010         test -d $HOME/$cf_nculib_root/lib &&       cf_search="$cf_search $HOME/$cf_nculib_root/lib"
7011         test -d $HOME/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search $HOME/$cf_nculib_root/lib/$cf_nculib_root"
7012 }
7013
7014 cf_search="$cf_library_path_list $cf_search"
7015
7016                         for cf_libdir in $cf_search
7017                         do
7018                                 echo "$as_me:7018: checking for -l$cf_nculib_root in $cf_libdir" >&5
7019 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
7020                                 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
7021                                 cat >conftest.$ac_ext <<_ACEOF
7022 #line 7022 "configure"
7023 #include "confdefs.h"
7024 #include <${cf_cv_ncurses_header:-curses.h}>
7025 int
7026 main ()
7027 {
7028 initscr()
7029   ;
7030   return 0;
7031 }
7032 _ACEOF
7033 rm -f conftest.$ac_objext conftest$ac_exeext
7034 if { (eval echo "$as_me:7034: \"$ac_link\"") >&5
7035   (eval $ac_link) 2>&5
7036   ac_status=$?
7037   echo "$as_me:7037: \$? = $ac_status" >&5
7038   (exit $ac_status); } &&
7039          { ac_try='test -s conftest$ac_exeext'
7040   { (eval echo "$as_me:7040: \"$ac_try\"") >&5
7041   (eval $ac_try) 2>&5
7042   ac_status=$?
7043   echo "$as_me:7043: \$? = $ac_status" >&5
7044   (exit $ac_status); }; }; then
7045   echo "$as_me:7045: result: yes" >&5
7046 echo "${ECHO_T}yes" >&6
7047                                          eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
7048                                          break
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_save_LIBS"
7055 fi
7056 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7057                         done
7058
7059 fi
7060 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7061
7062 fi
7063
7064 eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root
7065
7066 if test $cf_found_library = no ; then
7067         { { echo "$as_me:7067: error: Cannot link $cf_nculib_root library" >&5
7068 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
7069    { (exit 1); exit 1; }; }
7070 fi
7071
7072 fi
7073
7074 if test -n "$cf_ncurses_LIBS" ; then
7075         echo "$as_me:7075: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
7076 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
7077         cf_ncurses_SAVE="$LIBS"
7078         for p in $cf_ncurses_LIBS ; do
7079                 q=`echo $LIBS | sed -e "s%$p %%" -e "s%$p$%%"`
7080                 if test "$q" != "$LIBS" ; then
7081                         LIBS="$q"
7082                 fi
7083         done
7084         cat >conftest.$ac_ext <<_ACEOF
7085 #line 7085 "configure"
7086 #include "confdefs.h"
7087 #include <${cf_cv_ncurses_header:-curses.h}>
7088 int
7089 main ()
7090 {
7091 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
7092   ;
7093   return 0;
7094 }
7095 _ACEOF
7096 rm -f conftest.$ac_objext conftest$ac_exeext
7097 if { (eval echo "$as_me:7097: \"$ac_link\"") >&5
7098   (eval $ac_link) 2>&5
7099   ac_status=$?
7100   echo "$as_me:7100: \$? = $ac_status" >&5
7101   (exit $ac_status); } &&
7102          { ac_try='test -s conftest$ac_exeext'
7103   { (eval echo "$as_me:7103: \"$ac_try\"") >&5
7104   (eval $ac_try) 2>&5
7105   ac_status=$?
7106   echo "$as_me:7106: \$? = $ac_status" >&5
7107   (exit $ac_status); }; }; then
7108   echo "$as_me:7108: result: yes" >&5
7109 echo "${ECHO_T}yes" >&6
7110 else
7111   echo "$as_me: failed program was:" >&5
7112 cat conftest.$ac_ext >&5
7113 echo "$as_me:7113: result: no" >&5
7114 echo "${ECHO_T}no" >&6
7115                  LIBS="$cf_ncurses_SAVE"
7116 fi
7117 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7118 fi
7119
7120 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
7121
7122 cat >>confdefs.h <<EOF
7123 #define $cf_nculib_ROOT 1
7124 EOF
7125
7126 fi
7127
7128 fi
7129
7130 if test "$NCURSES_CONFIG" != none ; then
7131
7132 cf_version=`$NCURSES_CONFIG --version`
7133
7134 NCURSES_MAJOR=`echo "$cf_version" | sed -e 's/\..*//'`
7135 NCURSES_MINOR=`echo "$cf_version" | sed -e 's/^[0-9]\+\.//' -e 's/\..*//'`
7136 NCURSES_PATCH=`echo "$cf_version" | sed -e 's/^[0-9]\+\.[0-9]\+\.//'`
7137
7138 # ABI version is not available from headers
7139 cf_cv_abi_version=`$NCURSES_CONFIG --abi-version`
7140
7141 else
7142
7143 for cf_name in MAJOR MINOR PATCH
7144 do
7145 cat >conftest.$ac_ext <<CF_EOF
7146 #include <${cf_cv_ncurses_header:-curses.h}>
7147 AUTOCONF_$cf_name NCURSES_VERSION_$cf_name
7148 CF_EOF
7149         cf_try="$ac_cpp conftest.$ac_ext 2>&5 | fgrep AUTOCONF_$cf_name >conftest.out"
7150         { (eval echo "$as_me:7150: \"$cf_try\"") >&5
7151   (eval $cf_try) 2>&5
7152   ac_status=$?
7153   echo "$as_me:7153: \$? = $ac_status" >&5
7154   (exit $ac_status); }
7155         if test -f conftest.out ; then
7156                 cf_result=`cat conftest.out | sed -e "s/^.*AUTOCONF_$cf_name[   ]\+//"`
7157                 eval NCURSES_$cf_name=$cf_result
7158                 cat conftest.$ac_ext
7159                 cat conftest.out
7160         fi
7161 done
7162
7163 cf_cv_abi_version=${NCURSES_MAJOR}
7164
7165 fi
7166
7167 cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
7168
7169 cf_cv_timestamp=`date`
7170
7171 echo "$as_me:7171: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&5
7172 echo "${ECHO_T}Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&6
7173
7174         case $cf_cv_system_name in #(vi
7175         OS/2*|os2*) #(vi
7176         LIB_PREFIX=''
7177         ;;
7178         *)      LIB_PREFIX='lib'
7179         ;;
7180         esac
7181 cf_prefix=$LIB_PREFIX
7182
7183 LIB_PREFIX=$cf_prefix
7184
7185 LIB_SUFFIX=
7186
7187 ###############################################################################
7188
7189 if test X"$CC_G_OPT" = X"" ; then
7190         CC_G_OPT='-g'
7191         test -n "$GCC" && test "${ac_cv_prog_cc_g}" != yes && CC_G_OPT=''
7192 fi
7193
7194 echo "$as_me:7194: checking for default loader flags" >&5
7195 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
7196 case $DFT_LWR_MODEL in
7197 normal)  LD_MODEL=''   ;;
7198 debug)   LD_MODEL=$CC_G_OPT ;;
7199 profile) LD_MODEL='-pg';;
7200 shared)  LD_MODEL=''   ;;
7201 esac
7202 echo "$as_me:7202: result: $LD_MODEL" >&5
7203 echo "${ECHO_T}$LD_MODEL" >&6
7204
7205 LD_RPATH_OPT=
7206 echo "$as_me:7206: checking for an rpath option" >&5
7207 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
7208 case $cf_cv_system_name in #(vi
7209 irix*) #(vi
7210         if test "$GCC" = yes; then
7211                 LD_RPATH_OPT="-Wl,-rpath,"
7212         else
7213                 LD_RPATH_OPT="-rpath "
7214         fi
7215         ;;
7216 linux*|gnu*|k*bsd*-gnu) #(vi
7217         LD_RPATH_OPT="-Wl,-rpath,"
7218         ;;
7219 openbsd[2-9].*) #(vi
7220         LD_RPATH_OPT="-Wl,-rpath,"
7221         ;;
7222 freebsd*) #(vi
7223         LD_RPATH_OPT="-rpath "
7224         ;;
7225 netbsd*) #(vi
7226         LD_RPATH_OPT="-Wl,-rpath,"
7227         ;;
7228 osf*|mls+*) #(vi
7229         LD_RPATH_OPT="-rpath "
7230         ;;
7231 solaris2*) #(vi
7232         LD_RPATH_OPT="-R"
7233         ;;
7234 *)
7235         ;;
7236 esac
7237 echo "$as_me:7237: result: $LD_RPATH_OPT" >&5
7238 echo "${ECHO_T}$LD_RPATH_OPT" >&6
7239
7240 case "x$LD_RPATH_OPT" in #(vi
7241 x-R*)
7242         echo "$as_me:7242: checking if we need a space after rpath option" >&5
7243 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
7244         cf_save_LIBS="$LIBS"
7245         LIBS="${LD_RPATH_OPT}$libdir $LIBS"
7246         cat >conftest.$ac_ext <<_ACEOF
7247 #line 7247 "configure"
7248 #include "confdefs.h"
7249
7250 int
7251 main ()
7252 {
7253
7254   ;
7255   return 0;
7256 }
7257 _ACEOF
7258 rm -f conftest.$ac_objext conftest$ac_exeext
7259 if { (eval echo "$as_me:7259: \"$ac_link\"") >&5
7260   (eval $ac_link) 2>&5
7261   ac_status=$?
7262   echo "$as_me:7262: \$? = $ac_status" >&5
7263   (exit $ac_status); } &&
7264          { ac_try='test -s conftest$ac_exeext'
7265   { (eval echo "$as_me:7265: \"$ac_try\"") >&5
7266   (eval $ac_try) 2>&5
7267   ac_status=$?
7268   echo "$as_me:7268: \$? = $ac_status" >&5
7269   (exit $ac_status); }; }; then
7270   cf_rpath_space=no
7271 else
7272   echo "$as_me: failed program was:" >&5
7273 cat conftest.$ac_ext >&5
7274 cf_rpath_space=yes
7275 fi
7276 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7277         LIBS="$cf_save_LIBS"
7278         echo "$as_me:7278: result: $cf_rpath_space" >&5
7279 echo "${ECHO_T}$cf_rpath_space" >&6
7280         test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
7281         ;;
7282 esac
7283
7284         LOCAL_LDFLAGS=
7285         LOCAL_LDFLAGS2=
7286         LD_SHARED_OPTS=
7287         INSTALL_LIB="-m 644"
7288
7289         cf_cv_do_symlinks=no
7290         cf_ld_rpath_opt=
7291         test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT"
7292
7293         echo "$as_me:7293: checking if release/abi version should be used for shared libs" >&5
7294 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
7295
7296 # Check whether --with-shlib-version or --without-shlib-version was given.
7297 if test "${with_shlib_version+set}" = set; then
7298   withval="$with_shlib_version"
7299   test -z "$withval" && withval=auto
7300         case $withval in #(vi
7301         yes) #(vi
7302                 cf_cv_shlib_version=auto
7303                 ;;
7304         rel|abi|auto|no) #(vi
7305                 cf_cv_shlib_version=$withval
7306                 ;;
7307         *)
7308                 { { echo "$as_me:7308: error: option value must be one of: rel, abi, auto or no" >&5
7309 echo "$as_me: error: option value must be one of: rel, abi, auto or no" >&2;}
7310    { (exit 1); exit 1; }; }
7311                 ;;
7312         esac
7313
7314 else
7315   cf_cv_shlib_version=auto
7316 fi;
7317         echo "$as_me:7317: result: $cf_cv_shlib_version" >&5
7318 echo "${ECHO_T}$cf_cv_shlib_version" >&6
7319
7320         cf_cv_rm_so_locs=no
7321
7322         # Some less-capable ports of gcc support only -fpic
7323         CC_SHARED_OPTS=
7324         if test "$GCC" = yes
7325         then
7326                 echo "$as_me:7326: checking which $CC option to use" >&5
7327 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
7328                 cf_save_CFLAGS="$CFLAGS"
7329                 for CC_SHARED_OPTS in -fPIC -fpic ''
7330                 do
7331                         CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
7332                         cat >conftest.$ac_ext <<_ACEOF
7333 #line 7333 "configure"
7334 #include "confdefs.h"
7335 #include <stdio.h>
7336 int
7337 main ()
7338 {
7339 int x = 1
7340   ;
7341   return 0;
7342 }
7343 _ACEOF
7344 rm -f conftest.$ac_objext
7345 if { (eval echo "$as_me:7345: \"$ac_compile\"") >&5
7346   (eval $ac_compile) 2>&5
7347   ac_status=$?
7348   echo "$as_me:7348: \$? = $ac_status" >&5
7349   (exit $ac_status); } &&
7350          { ac_try='test -s conftest.$ac_objext'
7351   { (eval echo "$as_me:7351: \"$ac_try\"") >&5
7352   (eval $ac_try) 2>&5
7353   ac_status=$?
7354   echo "$as_me:7354: \$? = $ac_status" >&5
7355   (exit $ac_status); }; }; then
7356   break
7357 else
7358   echo "$as_me: failed program was:" >&5
7359 cat conftest.$ac_ext >&5
7360 fi
7361 rm -f conftest.$ac_objext conftest.$ac_ext
7362                 done
7363                 echo "$as_me:7363: result: $CC_SHARED_OPTS" >&5
7364 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
7365                 CFLAGS="$cf_save_CFLAGS"
7366         fi
7367
7368         cf_cv_shlib_version_infix=no
7369
7370         case $cf_cv_system_name in #(vi
7371         aix[56]*) #(vi
7372                 if test "$GCC" = yes; then
7373                         CC_SHARED_OPTS=
7374                         MK_SHARED_LIB='$(CC) -shared'
7375                 fi
7376                 ;;
7377         beos*) #(vi
7378                 MK_SHARED_LIB='${CC} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
7379                 ;;
7380         cygwin*) #(vi
7381                 CC_SHARED_OPTS=
7382                 MK_SHARED_LIB='sh ../mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
7383                 cf_cv_shlib_version=cygdll
7384                 cf_cv_shlib_version_infix=cygdll
7385                 cat >mk_shared_lib.sh <<-CF_EOF
7386                 #!/bin/sh
7387                 SHARED_LIB=\$1
7388                 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
7389                 shift
7390                 cat <<-EOF
7391                 Linking shared library
7392                 ** SHARED_LIB \$SHARED_LIB
7393                 ** IMPORT_LIB \$IMPORT_LIB
7394 EOF
7395                 exec \$* -shared -Wl,--out-implib=../lib/\${IMPORT_LIB} -Wl,--export-all-symbols -o ../lib/\${SHARED_LIB}
7396 CF_EOF
7397                 chmod +x mk_shared_lib.sh
7398                 ;;
7399         darwin*) #(vi
7400                 EXTRA_CFLAGS="-no-cpp-precomp"
7401                 CC_SHARED_OPTS="-dynamic"
7402                 MK_SHARED_LIB='${CC} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
7403                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
7404                 cf_cv_shlib_version_infix=yes
7405                 echo "$as_me:7405: checking if ld -search_paths_first works" >&5
7406 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
7407 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
7408   echo $ECHO_N "(cached) $ECHO_C" >&6
7409 else
7410
7411                         cf_save_LDFLAGS=$LDFLAGS
7412                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
7413                         cat >conftest.$ac_ext <<_ACEOF
7414 #line 7414 "configure"
7415 #include "confdefs.h"
7416
7417 int
7418 main ()
7419 {
7420 int i;
7421   ;
7422   return 0;
7423 }
7424 _ACEOF
7425 rm -f conftest.$ac_objext conftest$ac_exeext
7426 if { (eval echo "$as_me:7426: \"$ac_link\"") >&5
7427   (eval $ac_link) 2>&5
7428   ac_status=$?
7429   echo "$as_me:7429: \$? = $ac_status" >&5
7430   (exit $ac_status); } &&
7431          { ac_try='test -s conftest$ac_exeext'
7432   { (eval echo "$as_me:7432: \"$ac_try\"") >&5
7433   (eval $ac_try) 2>&5
7434   ac_status=$?
7435   echo "$as_me:7435: \$? = $ac_status" >&5
7436   (exit $ac_status); }; }; then
7437   cf_cv_ldflags_search_paths_first=yes
7438 else
7439   echo "$as_me: failed program was:" >&5
7440 cat conftest.$ac_ext >&5
7441 cf_cv_ldflags_search_paths_first=no
7442 fi
7443 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7444                                 LDFLAGS=$cf_save_LDFLAGS
7445 fi
7446 echo "$as_me:7446: result: $cf_cv_ldflags_search_paths_first" >&5
7447 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
7448                 if test $cf_cv_ldflags_search_paths_first = yes; then
7449                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
7450                 fi
7451                 ;;
7452         hpux*) #(vi
7453                 # (tested with gcc 2.7.2 -- I don't have c89)
7454                 if test "$GCC" = yes; then
7455                         LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
7456                 else
7457                         CC_SHARED_OPTS='+Z'
7458                         LD_SHARED_OPTS='-Wl,+b,${libdir}'
7459                 fi
7460                 MK_SHARED_LIB='${LD} +b ${libdir} -b -o $@'
7461                 # HP-UX shared libraries must be executable, and should be
7462                 # readonly to exploit a quirk in the memory manager.
7463                 INSTALL_LIB="-m 555"
7464                 ;;
7465         irix*) #(vi
7466                 if test "$cf_cv_enable_rpath" = yes ; then
7467                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${libdir} $EXTRA_LDFLAGS"
7468                 fi
7469                 # tested with IRIX 5.2 and 'cc'.
7470                 if test "$GCC" != yes; then
7471                         CC_SHARED_OPTS='-KPIC'
7472                         MK_SHARED_LIB='${CC} -shared -rdata_shared -soname `basename $@` -o $@'
7473                 else
7474                         MK_SHARED_LIB='${CC} -shared -Wl,-soname,`basename $@` -o $@'
7475                 fi
7476                 cf_cv_rm_so_locs=yes
7477                 ;;
7478         linux*|gnu*|k*bsd*-gnu) #(vi
7479                 if test "$DFT_LWR_MODEL" = "shared" ; then
7480                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
7481                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
7482                 fi
7483                 if test "$cf_cv_enable_rpath" = yes ; then
7484                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${libdir} $EXTRA_LDFLAGS"
7485                 fi
7486
7487         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
7488         if test "$cf_cv_shlib_version" = rel; then
7489                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
7490         else
7491                 cf_cv_shared_soname='`basename $@`'
7492         fi
7493
7494                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
7495                 ;;
7496         openbsd[2-9].*) #(vi
7497                 if test "$DFT_LWR_MODEL" = "shared" ; then
7498                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
7499                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
7500                 fi
7501                 if test "$cf_cv_enable_rpath" = yes ; then
7502                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${libdir} $EXTRA_LDFLAGS"
7503                 fi
7504                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
7505
7506         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
7507         if test "$cf_cv_shlib_version" = rel; then
7508                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
7509         else
7510                 cf_cv_shared_soname='`basename $@`'
7511         fi
7512
7513                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
7514                 ;;
7515         nto-qnx*|openbsd*|freebsd[12].*) #(vi
7516                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
7517                 MK_SHARED_LIB='${LD} -Bshareable -o $@'
7518                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
7519                 ;;
7520         freebsd*) #(vi
7521                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
7522                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
7523                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
7524                         LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${libdir} $LOCAL_LDFLAGS"
7525                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${libdir} $EXTRA_LDFLAGS"
7526                 fi
7527
7528         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
7529         if test "$cf_cv_shlib_version" = rel; then
7530                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
7531         else
7532                 cf_cv_shared_soname='`basename $@`'
7533         fi
7534
7535                 MK_SHARED_LIB='${LD} -shared -Bshareable -soname=`basename $@` -o $@'
7536                 ;;
7537         netbsd*) #(vi
7538                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
7539                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
7540                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
7541                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
7542                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${libdir} $EXTRA_LDFLAGS"
7543                         if test "$cf_cv_shlib_version" = auto; then
7544                         if test -f /usr/libexec/ld.elf_so; then
7545                                 cf_cv_shlib_version=abi
7546                         else
7547                                 cf_cv_shlib_version=rel
7548                         fi
7549                         fi
7550
7551         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
7552         if test "$cf_cv_shlib_version" = rel; then
7553                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
7554         else
7555                 cf_cv_shared_soname='`basename $@`'
7556         fi
7557
7558                         MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
7559                 else
7560                         MK_SHARED_LIB='${LD} -shared -Bshareable -o $@'
7561                 fi
7562                 ;;
7563         osf*|mls+*) #(vi
7564                 # tested with OSF/1 V3.2 and 'cc'
7565                 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
7566                 # link with shared libs).
7567                 MK_SHARED_LIB='${LD} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
7568                 case $host_os in #(vi
7569                 osf4*)
7570                         MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
7571                         ;;
7572                 esac
7573                 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
7574                 if test "$DFT_LWR_MODEL" = "shared" ; then
7575                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
7576                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
7577                 fi
7578                 cf_cv_rm_so_locs=yes
7579                 ;;
7580         sco3.2v5*)  # (also uw2* and UW7: hops 13-Apr-98
7581                 # tested with osr5.0.5
7582                 if test "$GCC" != yes; then
7583                         CC_SHARED_OPTS='-belf -KPIC'
7584                 fi
7585                 MK_SHARED_LIB='${LD} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
7586                 if test "$cf_cv_enable_rpath" = yes ; then
7587                         # only way is to set LD_RUN_PATH but no switch for it
7588                         RUN_PATH=$libdir
7589                 fi
7590                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
7591                 LINK_PROGS='LD_RUN_PATH=${libdir}'
7592                 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
7593                 ;;
7594         sunos4*) #(vi
7595                 # tested with SunOS 4.1.1 and gcc 2.7.0
7596                 if test "$GCC" != yes; then
7597                         CC_SHARED_OPTS='-KPIC'
7598                 fi
7599                 MK_SHARED_LIB='${LD} -assert pure-text -o $@'
7600                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
7601                 ;;
7602         solaris2*) #(vi
7603                 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
7604                 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
7605                 if test "$DFT_LWR_MODEL" = "shared" ; then
7606                         LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
7607                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
7608                 fi
7609                 if test "$cf_cv_enable_rpath" = yes ; then
7610                         EXTRA_LDFLAGS="-R \${libdir} $EXTRA_LDFLAGS"
7611                 fi
7612
7613         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
7614         if test "$cf_cv_shlib_version" = rel; then
7615                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
7616         else
7617                 cf_cv_shared_soname='`basename $@`'
7618         fi
7619
7620                 if test "$GCC" != yes; then
7621                         cf_save_CFLAGS="$CFLAGS"
7622                         for cf_shared_opts in -xcode=pic32 -xcode=pic13 -KPIC -Kpic -O
7623                         do
7624                                 CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
7625                                 cat >conftest.$ac_ext <<_ACEOF
7626 #line 7626 "configure"
7627 #include "confdefs.h"
7628 #include <stdio.h>
7629 int
7630 main ()
7631 {
7632 printf("Hello\n");
7633   ;
7634   return 0;
7635 }
7636 _ACEOF
7637 rm -f conftest.$ac_objext
7638 if { (eval echo "$as_me:7638: \"$ac_compile\"") >&5
7639   (eval $ac_compile) 2>&5
7640   ac_status=$?
7641   echo "$as_me:7641: \$? = $ac_status" >&5
7642   (exit $ac_status); } &&
7643          { ac_try='test -s conftest.$ac_objext'
7644   { (eval echo "$as_me:7644: \"$ac_try\"") >&5
7645   (eval $ac_try) 2>&5
7646   ac_status=$?
7647   echo "$as_me:7647: \$? = $ac_status" >&5
7648   (exit $ac_status); }; }; then
7649   break
7650 else
7651   echo "$as_me: failed program was:" >&5
7652 cat conftest.$ac_ext >&5
7653 fi
7654 rm -f conftest.$ac_objext conftest.$ac_ext
7655                         done
7656                         CFLAGS="$cf_save_CFLAGS"
7657                         CC_SHARED_OPTS=$cf_shared_opts
7658                         MK_SHARED_LIB='${CC} -dy -G -h '$cf_cv_shared_soname' -o $@'
7659                 else
7660                         MK_SHARED_LIB='${CC} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
7661                 fi
7662                 ;;
7663         sysv5uw7*|unix_sv*) #(vi
7664                 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
7665                 if test "$GCC" != yes; then
7666                         CC_SHARED_OPTS='-KPIC'
7667                 fi
7668                 MK_SHARED_LIB='${LD} -d y -G -o $@'
7669                 ;;
7670         *)
7671                 CC_SHARED_OPTS='unknown'
7672                 MK_SHARED_LIB='echo unknown'
7673                 ;;
7674         esac
7675
7676         # This works if the last tokens in $MK_SHARED_LIB are the -o target.
7677         case "$cf_cv_shlib_version" in #(vi
7678         rel|abi)
7679                 case "$MK_SHARED_LIB" in #(vi
7680                 *'-o $@') #(vi
7681                         test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
7682                         ;;
7683                 *)
7684                         { echo "$as_me:7684: WARNING: ignored --with-shlib-version" >&5
7685 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
7686                         ;;
7687                 esac
7688                 ;;
7689         esac
7690
7691         if test -n "$cf_ld_rpath_opt" ; then
7692                 MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${libdir}"
7693         fi
7694
7695 ###############################################################################
7696
7697         case $cf_cv_system_name in
7698         os2*)   PATH_SEPARATOR=';'  ;;
7699         *)      PATH_SEPARATOR=':'  ;;
7700         esac
7701
7702 ###   use option --enable-broken-linker to force on use of broken-linker support
7703 echo "$as_me:7703: checking if you want broken-linker support code" >&5
7704 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
7705
7706 # Check whether --enable-broken_linker or --disable-broken_linker was given.
7707 if test "${enable_broken_linker+set}" = set; then
7708   enableval="$enable_broken_linker"
7709   with_broken_linker=$enableval
7710 else
7711   with_broken_linker=${BROKEN_LINKER:-no}
7712 fi;
7713 echo "$as_me:7713: result: $with_broken_linker" >&5
7714 echo "${ECHO_T}$with_broken_linker" >&6
7715
7716 BROKEN_LINKER=0
7717 if test "$with_broken_linker" = yes ; then
7718         cat >>confdefs.h <<\EOF
7719 #define BROKEN_LINKER 1
7720 EOF
7721
7722         BROKEN_LINKER=1
7723 elif test "$DFT_LWR_MODEL" = shared ; then
7724         case $cf_cv_system_name in #(vi
7725         cygwin*)
7726                 cat >>confdefs.h <<\EOF
7727 #define BROKEN_LINKER 1
7728 EOF
7729
7730                 BROKEN_LINKER=1
7731                 test -n "$verbose" && echo "    cygwin linker is broken anyway" 1>&6
7732
7733 echo "${as_me:-configure}:7733: testing cygwin linker is broken anyway ..." 1>&5
7734
7735                 ;;
7736         esac
7737 fi
7738
7739 # Check to define _XOPEN_SOURCE "automatically"
7740
7741 cf_XOPEN_SOURCE=500
7742 cf_POSIX_C_SOURCE=199506L
7743 cf_xopen_source=
7744
7745 case $host_os in #(vi
7746 aix[456]*) #(vi
7747         cf_xopen_source="-D_ALL_SOURCE"
7748         ;;
7749 darwin[0-8].*) #(vi
7750         cf_xopen_source="-D_APPLE_C_SOURCE"
7751         ;;
7752 darwin*) #(vi
7753         cf_xopen_source="-D_DARWIN_C_SOURCE"
7754         ;;
7755 freebsd*|dragonfly*) #(vi
7756         # 5.x headers associate
7757         #       _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
7758         #       _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
7759         cf_POSIX_C_SOURCE=200112L
7760         cf_XOPEN_SOURCE=600
7761         cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
7762         ;;
7763 hpux11*) #(vi
7764         cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
7765         ;;
7766 hpux*) #(vi
7767         cf_xopen_source="-D_HPUX_SOURCE"
7768         ;;
7769 irix[56].*) #(vi
7770         cf_xopen_source="-D_SGI_SOURCE"
7771         ;;
7772 linux*|gnu*|mint*|k*bsd*-gnu) #(vi
7773
7774 echo "$as_me:7774: checking if we must define _GNU_SOURCE" >&5
7775 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
7776 if test "${cf_cv_gnu_source+set}" = set; then
7777   echo $ECHO_N "(cached) $ECHO_C" >&6
7778 else
7779
7780 cat >conftest.$ac_ext <<_ACEOF
7781 #line 7781 "configure"
7782 #include "confdefs.h"
7783 #include <sys/types.h>
7784 int
7785 main ()
7786 {
7787
7788 #ifndef _XOPEN_SOURCE
7789 make an error
7790 #endif
7791   ;
7792   return 0;
7793 }
7794 _ACEOF
7795 rm -f conftest.$ac_objext
7796 if { (eval echo "$as_me:7796: \"$ac_compile\"") >&5
7797   (eval $ac_compile) 2>&5
7798   ac_status=$?
7799   echo "$as_me:7799: \$? = $ac_status" >&5
7800   (exit $ac_status); } &&
7801          { ac_try='test -s conftest.$ac_objext'
7802   { (eval echo "$as_me:7802: \"$ac_try\"") >&5
7803   (eval $ac_try) 2>&5
7804   ac_status=$?
7805   echo "$as_me:7805: \$? = $ac_status" >&5
7806   (exit $ac_status); }; }; then
7807   cf_cv_gnu_source=no
7808 else
7809   echo "$as_me: failed program was:" >&5
7810 cat conftest.$ac_ext >&5
7811 cf_save="$CPPFLAGS"
7812          CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
7813          cat >conftest.$ac_ext <<_ACEOF
7814 #line 7814 "configure"
7815 #include "confdefs.h"
7816 #include <sys/types.h>
7817 int
7818 main ()
7819 {
7820
7821 #ifdef _XOPEN_SOURCE
7822 make an error
7823 #endif
7824   ;
7825   return 0;
7826 }
7827 _ACEOF
7828 rm -f conftest.$ac_objext
7829 if { (eval echo "$as_me:7829: \"$ac_compile\"") >&5
7830   (eval $ac_compile) 2>&5
7831   ac_status=$?
7832   echo "$as_me:7832: \$? = $ac_status" >&5
7833   (exit $ac_status); } &&
7834          { ac_try='test -s conftest.$ac_objext'
7835   { (eval echo "$as_me:7835: \"$ac_try\"") >&5
7836   (eval $ac_try) 2>&5
7837   ac_status=$?
7838   echo "$as_me:7838: \$? = $ac_status" >&5
7839   (exit $ac_status); }; }; then
7840   cf_cv_gnu_source=no
7841 else
7842   echo "$as_me: failed program was:" >&5
7843 cat conftest.$ac_ext >&5
7844 cf_cv_gnu_source=yes
7845 fi
7846 rm -f conftest.$ac_objext conftest.$ac_ext
7847         CPPFLAGS="$cf_save"
7848
7849 fi
7850 rm -f conftest.$ac_objext conftest.$ac_ext
7851
7852 fi
7853 echo "$as_me:7853: result: $cf_cv_gnu_source" >&5
7854 echo "${ECHO_T}$cf_cv_gnu_source" >&6
7855 test "$cf_cv_gnu_source" = yes && CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
7856
7857         ;;
7858 mirbsd*) #(vi
7859         # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <arpa/inet.h>
7860         ;;
7861 netbsd*) #(vi
7862         # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
7863         ;;
7864 openbsd*) #(vi
7865         # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
7866         ;;
7867 osf[45]*) #(vi
7868         cf_xopen_source="-D_OSF_SOURCE"
7869         ;;
7870 nto-qnx*) #(vi
7871         cf_xopen_source="-D_QNX_SOURCE"
7872         ;;
7873 sco*) #(vi
7874         # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
7875         ;;
7876 solaris2.1[0-9]) #(vi
7877         cf_xopen_source="-D__EXTENSIONS__ -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
7878         ;;
7879 solaris2.[1-9]) #(vi
7880         cf_xopen_source="-D__EXTENSIONS__"
7881         ;;
7882 *)
7883         echo "$as_me:7883: checking if we should define _XOPEN_SOURCE" >&5
7884 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
7885 if test "${cf_cv_xopen_source+set}" = set; then
7886   echo $ECHO_N "(cached) $ECHO_C" >&6
7887 else
7888
7889         cat >conftest.$ac_ext <<_ACEOF
7890 #line 7890 "configure"
7891 #include "confdefs.h"
7892 #include <sys/types.h>
7893 int
7894 main ()
7895 {
7896
7897 #ifndef _XOPEN_SOURCE
7898 make an error
7899 #endif
7900   ;
7901   return 0;
7902 }
7903 _ACEOF
7904 rm -f conftest.$ac_objext
7905 if { (eval echo "$as_me:7905: \"$ac_compile\"") >&5
7906   (eval $ac_compile) 2>&5
7907   ac_status=$?
7908   echo "$as_me:7908: \$? = $ac_status" >&5
7909   (exit $ac_status); } &&
7910          { ac_try='test -s conftest.$ac_objext'
7911   { (eval echo "$as_me:7911: \"$ac_try\"") >&5
7912   (eval $ac_try) 2>&5
7913   ac_status=$?
7914   echo "$as_me:7914: \$? = $ac_status" >&5
7915   (exit $ac_status); }; }; then
7916   cf_cv_xopen_source=no
7917 else
7918   echo "$as_me: failed program was:" >&5
7919 cat conftest.$ac_ext >&5
7920 cf_save="$CPPFLAGS"
7921          CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
7922          cat >conftest.$ac_ext <<_ACEOF
7923 #line 7923 "configure"
7924 #include "confdefs.h"
7925 #include <sys/types.h>
7926 int
7927 main ()
7928 {
7929
7930 #ifdef _XOPEN_SOURCE
7931 make an error
7932 #endif
7933   ;
7934   return 0;
7935 }
7936 _ACEOF
7937 rm -f conftest.$ac_objext
7938 if { (eval echo "$as_me:7938: \"$ac_compile\"") >&5
7939   (eval $ac_compile) 2>&5
7940   ac_status=$?
7941   echo "$as_me:7941: \$? = $ac_status" >&5
7942   (exit $ac_status); } &&
7943          { ac_try='test -s conftest.$ac_objext'
7944   { (eval echo "$as_me:7944: \"$ac_try\"") >&5
7945   (eval $ac_try) 2>&5
7946   ac_status=$?
7947   echo "$as_me:7947: \$? = $ac_status" >&5
7948   (exit $ac_status); }; }; then
7949   cf_cv_xopen_source=no
7950 else
7951   echo "$as_me: failed program was:" >&5
7952 cat conftest.$ac_ext >&5
7953 cf_cv_xopen_source=$cf_XOPEN_SOURCE
7954 fi
7955 rm -f conftest.$ac_objext conftest.$ac_ext
7956         CPPFLAGS="$cf_save"
7957
7958 fi
7959 rm -f conftest.$ac_objext conftest.$ac_ext
7960
7961 fi
7962 echo "$as_me:7962: result: $cf_cv_xopen_source" >&5
7963 echo "${ECHO_T}$cf_cv_xopen_source" >&6
7964         if test "$cf_cv_xopen_source" != no ; then
7965
7966 CFLAGS=`echo "$CFLAGS" | \
7967         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
7968                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
7969
7970 CPPFLAGS=`echo "$CPPFLAGS" | \
7971         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
7972                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
7973
7974                 cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
7975
7976 cf_fix_cppflags=no
7977 cf_new_cflags=
7978 cf_new_cppflags=
7979 cf_new_extra_cppflags=
7980
7981 for cf_add_cflags in $cf_temp_xopen_source
7982 do
7983 case $cf_fix_cppflags in
7984 no)
7985         case $cf_add_cflags in #(vi
7986         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
7987                 case $cf_add_cflags in
7988                 -D*)
7989                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7990
7991                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7992                                 && test -z "${cf_tst_cflags}" \
7993                                 && cf_fix_cppflags=yes
7994
7995                         if test $cf_fix_cppflags = yes ; then
7996                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7997                                 continue
7998                         elif test "${cf_tst_cflags}" = "\"'" ; then
7999                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8000                                 continue
8001                         fi
8002                         ;;
8003                 esac
8004                 case "$CPPFLAGS" in
8005                 *$cf_add_cflags) #(vi
8006                         ;;
8007                 *) #(vi
8008                         case $cf_add_cflags in #(vi
8009                         -D*)
8010                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8011
8012 CPPFLAGS=`echo "$CPPFLAGS" | \
8013         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8014                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8015
8016                                 ;;
8017                         esac
8018                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8019                         ;;
8020                 esac
8021                 ;;
8022         *)
8023                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8024                 ;;
8025         esac
8026         ;;
8027 yes)
8028         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8029
8030         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8031
8032         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
8033                 && test -z "${cf_tst_cflags}" \
8034                 && cf_fix_cppflags=no
8035         ;;
8036 esac
8037 done
8038
8039 if test -n "$cf_new_cflags" ; then
8040
8041         CFLAGS="$CFLAGS $cf_new_cflags"
8042 fi
8043
8044 if test -n "$cf_new_cppflags" ; then
8045
8046         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8047 fi
8048
8049 if test -n "$cf_new_extra_cppflags" ; then
8050
8051         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8052 fi
8053
8054         fi
8055
8056 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
8057
8058 cf_save_CFLAGS="$CFLAGS"
8059 cf_save_CPPFLAGS="$CPPFLAGS"
8060
8061 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
8062         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
8063                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
8064
8065 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
8066         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
8067                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
8068
8069 echo "$as_me:8069: checking if we should define _POSIX_C_SOURCE" >&5
8070 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
8071 if test "${cf_cv_posix_c_source+set}" = set; then
8072   echo $ECHO_N "(cached) $ECHO_C" >&6
8073 else
8074
8075 echo "${as_me:-configure}:8075: testing if the symbol is already defined go no further ..." 1>&5
8076
8077         cat >conftest.$ac_ext <<_ACEOF
8078 #line 8078 "configure"
8079 #include "confdefs.h"
8080 #include <sys/types.h>
8081 int
8082 main ()
8083 {
8084
8085 #ifndef _POSIX_C_SOURCE
8086 make an error
8087 #endif
8088   ;
8089   return 0;
8090 }
8091 _ACEOF
8092 rm -f conftest.$ac_objext
8093 if { (eval echo "$as_me:8093: \"$ac_compile\"") >&5
8094   (eval $ac_compile) 2>&5
8095   ac_status=$?
8096   echo "$as_me:8096: \$? = $ac_status" >&5
8097   (exit $ac_status); } &&
8098          { ac_try='test -s conftest.$ac_objext'
8099   { (eval echo "$as_me:8099: \"$ac_try\"") >&5
8100   (eval $ac_try) 2>&5
8101   ac_status=$?
8102   echo "$as_me:8102: \$? = $ac_status" >&5
8103   (exit $ac_status); }; }; then
8104   cf_cv_posix_c_source=no
8105 else
8106   echo "$as_me: failed program was:" >&5
8107 cat conftest.$ac_ext >&5
8108 cf_want_posix_source=no
8109          case .$cf_POSIX_C_SOURCE in #(vi
8110          .[12]??*) #(vi
8111                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
8112                 ;;
8113          .2) #(vi
8114                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
8115                 cf_want_posix_source=yes
8116                 ;;
8117          .*)
8118                 cf_want_posix_source=yes
8119                 ;;
8120          esac
8121          if test "$cf_want_posix_source" = yes ; then
8122                 cat >conftest.$ac_ext <<_ACEOF
8123 #line 8123 "configure"
8124 #include "confdefs.h"
8125 #include <sys/types.h>
8126 int
8127 main ()
8128 {
8129
8130 #ifdef _POSIX_SOURCE
8131 make an error
8132 #endif
8133   ;
8134   return 0;
8135 }
8136 _ACEOF
8137 rm -f conftest.$ac_objext
8138 if { (eval echo "$as_me:8138: \"$ac_compile\"") >&5
8139   (eval $ac_compile) 2>&5
8140   ac_status=$?
8141   echo "$as_me:8141: \$? = $ac_status" >&5
8142   (exit $ac_status); } &&
8143          { ac_try='test -s conftest.$ac_objext'
8144   { (eval echo "$as_me:8144: \"$ac_try\"") >&5
8145   (eval $ac_try) 2>&5
8146   ac_status=$?
8147   echo "$as_me:8147: \$? = $ac_status" >&5
8148   (exit $ac_status); }; }; then
8149   :
8150 else
8151   echo "$as_me: failed program was:" >&5
8152 cat conftest.$ac_ext >&5
8153 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
8154 fi
8155 rm -f conftest.$ac_objext conftest.$ac_ext
8156          fi
8157
8158 echo "${as_me:-configure}:8158: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
8159
8160          CFLAGS="$cf_trim_CFLAGS"
8161          CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
8162
8163 echo "${as_me:-configure}:8163: testing if the second compile does not leave our definition intact error ..." 1>&5
8164
8165          cat >conftest.$ac_ext <<_ACEOF
8166 #line 8166 "configure"
8167 #include "confdefs.h"
8168 #include <sys/types.h>
8169 int
8170 main ()
8171 {
8172
8173 #ifndef _POSIX_C_SOURCE
8174 make an error
8175 #endif
8176   ;
8177   return 0;
8178 }
8179 _ACEOF
8180 rm -f conftest.$ac_objext
8181 if { (eval echo "$as_me:8181: \"$ac_compile\"") >&5
8182   (eval $ac_compile) 2>&5
8183   ac_status=$?
8184   echo "$as_me:8184: \$? = $ac_status" >&5
8185   (exit $ac_status); } &&
8186          { ac_try='test -s conftest.$ac_objext'
8187   { (eval echo "$as_me:8187: \"$ac_try\"") >&5
8188   (eval $ac_try) 2>&5
8189   ac_status=$?
8190   echo "$as_me:8190: \$? = $ac_status" >&5
8191   (exit $ac_status); }; }; then
8192   :
8193 else
8194   echo "$as_me: failed program was:" >&5
8195 cat conftest.$ac_ext >&5
8196 cf_cv_posix_c_source=no
8197 fi
8198 rm -f conftest.$ac_objext conftest.$ac_ext
8199          CFLAGS="$cf_save_CFLAGS"
8200          CPPFLAGS="$cf_save_CPPFLAGS"
8201
8202 fi
8203 rm -f conftest.$ac_objext conftest.$ac_ext
8204
8205 fi
8206 echo "$as_me:8206: result: $cf_cv_posix_c_source" >&5
8207 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
8208
8209 if test "$cf_cv_posix_c_source" != no ; then
8210         CFLAGS="$cf_trim_CFLAGS"
8211         CPPFLAGS="$cf_trim_CPPFLAGS"
8212
8213 cf_fix_cppflags=no
8214 cf_new_cflags=
8215 cf_new_cppflags=
8216 cf_new_extra_cppflags=
8217
8218 for cf_add_cflags in $cf_cv_posix_c_source
8219 do
8220 case $cf_fix_cppflags in
8221 no)
8222         case $cf_add_cflags in #(vi
8223         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
8224                 case $cf_add_cflags in
8225                 -D*)
8226                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8227
8228                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
8229                                 && test -z "${cf_tst_cflags}" \
8230                                 && cf_fix_cppflags=yes
8231
8232                         if test $cf_fix_cppflags = yes ; then
8233                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8234                                 continue
8235                         elif test "${cf_tst_cflags}" = "\"'" ; then
8236                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8237                                 continue
8238                         fi
8239                         ;;
8240                 esac
8241                 case "$CPPFLAGS" in
8242                 *$cf_add_cflags) #(vi
8243                         ;;
8244                 *) #(vi
8245                         case $cf_add_cflags in #(vi
8246                         -D*)
8247                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8248
8249 CPPFLAGS=`echo "$CPPFLAGS" | \
8250         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8251                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8252
8253                                 ;;
8254                         esac
8255                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8256                         ;;
8257                 esac
8258                 ;;
8259         *)
8260                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8261                 ;;
8262         esac
8263         ;;
8264 yes)
8265         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8266
8267         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8268
8269         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
8270                 && test -z "${cf_tst_cflags}" \
8271                 && cf_fix_cppflags=no
8272         ;;
8273 esac
8274 done
8275
8276 if test -n "$cf_new_cflags" ; then
8277
8278         CFLAGS="$CFLAGS $cf_new_cflags"
8279 fi
8280
8281 if test -n "$cf_new_cppflags" ; then
8282
8283         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8284 fi
8285
8286 if test -n "$cf_new_extra_cppflags" ; then
8287
8288         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8289 fi
8290
8291 fi
8292
8293         ;;
8294 esac
8295
8296 if test -n "$cf_xopen_source" ; then
8297
8298 cf_fix_cppflags=no
8299 cf_new_cflags=
8300 cf_new_cppflags=
8301 cf_new_extra_cppflags=
8302
8303 for cf_add_cflags in $cf_xopen_source
8304 do
8305 case $cf_fix_cppflags in
8306 no)
8307         case $cf_add_cflags in #(vi
8308         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
8309                 case $cf_add_cflags in
8310                 -D*)
8311                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8312
8313                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
8314                                 && test -z "${cf_tst_cflags}" \
8315                                 && cf_fix_cppflags=yes
8316
8317                         if test $cf_fix_cppflags = yes ; then
8318                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8319                                 continue
8320                         elif test "${cf_tst_cflags}" = "\"'" ; then
8321                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8322                                 continue
8323                         fi
8324                         ;;
8325                 esac
8326                 case "$CPPFLAGS" in
8327                 *$cf_add_cflags) #(vi
8328                         ;;
8329                 *) #(vi
8330                         case $cf_add_cflags in #(vi
8331                         -D*)
8332                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8333
8334 CPPFLAGS=`echo "$CPPFLAGS" | \
8335         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8336                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8337
8338                                 ;;
8339                         esac
8340                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8341                         ;;
8342                 esac
8343                 ;;
8344         *)
8345                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8346                 ;;
8347         esac
8348         ;;
8349 yes)
8350         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8351
8352         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8353
8354         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
8355                 && test -z "${cf_tst_cflags}" \
8356                 && cf_fix_cppflags=no
8357         ;;
8358 esac
8359 done
8360
8361 if test -n "$cf_new_cflags" ; then
8362
8363         CFLAGS="$CFLAGS $cf_new_cflags"
8364 fi
8365
8366 if test -n "$cf_new_cppflags" ; then
8367
8368         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8369 fi
8370
8371 if test -n "$cf_new_extra_cppflags" ; then
8372
8373         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8374 fi
8375
8376 fi
8377
8378 # Check whether --enable-largefile or --disable-largefile was given.
8379 if test "${enable_largefile+set}" = set; then
8380   enableval="$enable_largefile"
8381
8382 fi;
8383 if test "$enable_largefile" != no; then
8384
8385   echo "$as_me:8385: checking for special C compiler options needed for large files" >&5
8386 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
8387 if test "${ac_cv_sys_largefile_CC+set}" = set; then
8388   echo $ECHO_N "(cached) $ECHO_C" >&6
8389 else
8390   ac_cv_sys_largefile_CC=no
8391      if test "$GCC" != yes; then
8392        ac_save_CC=$CC
8393        while :; do
8394          # IRIX 6.2 and later do not support large files by default,
8395          # so use the C compiler's -n32 option if that helps.
8396          cat >conftest.$ac_ext <<_ACEOF
8397 #line 8397 "configure"
8398 #include "confdefs.h"
8399 #include <sys/types.h>
8400  /* Check that off_t can represent 2**63 - 1 correctly.
8401     We can't simply define LARGE_OFF_T to be 9223372036854775807,
8402     since some C++ compilers masquerading as C compilers
8403     incorrectly reject 9223372036854775807.  */
8404 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
8405   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
8406                        && LARGE_OFF_T % 2147483647 == 1)
8407                       ? 1 : -1];
8408 int
8409 main ()
8410 {
8411
8412   ;
8413   return 0;
8414 }
8415 _ACEOF
8416          rm -f conftest.$ac_objext
8417 if { (eval echo "$as_me:8417: \"$ac_compile\"") >&5
8418   (eval $ac_compile) 2>&5
8419   ac_status=$?
8420   echo "$as_me:8420: \$? = $ac_status" >&5
8421   (exit $ac_status); } &&
8422          { ac_try='test -s conftest.$ac_objext'
8423   { (eval echo "$as_me:8423: \"$ac_try\"") >&5
8424   (eval $ac_try) 2>&5
8425   ac_status=$?
8426   echo "$as_me:8426: \$? = $ac_status" >&5
8427   (exit $ac_status); }; }; then
8428   break
8429 else
8430   echo "$as_me: failed program was:" >&5
8431 cat conftest.$ac_ext >&5
8432 fi
8433 rm -f conftest.$ac_objext
8434          CC="$CC -n32"
8435          rm -f conftest.$ac_objext
8436 if { (eval echo "$as_me:8436: \"$ac_compile\"") >&5
8437   (eval $ac_compile) 2>&5
8438   ac_status=$?
8439   echo "$as_me:8439: \$? = $ac_status" >&5
8440   (exit $ac_status); } &&
8441          { ac_try='test -s conftest.$ac_objext'
8442   { (eval echo "$as_me:8442: \"$ac_try\"") >&5
8443   (eval $ac_try) 2>&5
8444   ac_status=$?
8445   echo "$as_me:8445: \$? = $ac_status" >&5
8446   (exit $ac_status); }; }; then
8447   ac_cv_sys_largefile_CC=' -n32'; break
8448 else
8449   echo "$as_me: failed program was:" >&5
8450 cat conftest.$ac_ext >&5
8451 fi
8452 rm -f conftest.$ac_objext
8453          break
8454        done
8455        CC=$ac_save_CC
8456        rm -f conftest.$ac_ext
8457     fi
8458 fi
8459 echo "$as_me:8459: result: $ac_cv_sys_largefile_CC" >&5
8460 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
8461   if test "$ac_cv_sys_largefile_CC" != no; then
8462     CC=$CC$ac_cv_sys_largefile_CC
8463   fi
8464
8465   echo "$as_me:8465: checking for _FILE_OFFSET_BITS value needed for large files" >&5
8466 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
8467 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
8468   echo $ECHO_N "(cached) $ECHO_C" >&6
8469 else
8470   while :; do
8471   ac_cv_sys_file_offset_bits=no
8472   cat >conftest.$ac_ext <<_ACEOF
8473 #line 8473 "configure"
8474 #include "confdefs.h"
8475 #include <sys/types.h>
8476  /* Check that off_t can represent 2**63 - 1 correctly.
8477     We can't simply define LARGE_OFF_T to be 9223372036854775807,
8478     since some C++ compilers masquerading as C compilers
8479     incorrectly reject 9223372036854775807.  */
8480 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
8481   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
8482                        && LARGE_OFF_T % 2147483647 == 1)
8483                       ? 1 : -1];
8484 int
8485 main ()
8486 {
8487
8488   ;
8489   return 0;
8490 }
8491 _ACEOF
8492 rm -f conftest.$ac_objext
8493 if { (eval echo "$as_me:8493: \"$ac_compile\"") >&5
8494   (eval $ac_compile) 2>&5
8495   ac_status=$?
8496   echo "$as_me:8496: \$? = $ac_status" >&5
8497   (exit $ac_status); } &&
8498          { ac_try='test -s conftest.$ac_objext'
8499   { (eval echo "$as_me:8499: \"$ac_try\"") >&5
8500   (eval $ac_try) 2>&5
8501   ac_status=$?
8502   echo "$as_me:8502: \$? = $ac_status" >&5
8503   (exit $ac_status); }; }; then
8504   break
8505 else
8506   echo "$as_me: failed program was:" >&5
8507 cat conftest.$ac_ext >&5
8508 fi
8509 rm -f conftest.$ac_objext conftest.$ac_ext
8510   cat >conftest.$ac_ext <<_ACEOF
8511 #line 8511 "configure"
8512 #include "confdefs.h"
8513 #define _FILE_OFFSET_BITS 64
8514 #include <sys/types.h>
8515  /* Check that off_t can represent 2**63 - 1 correctly.
8516     We can't simply define LARGE_OFF_T to be 9223372036854775807,
8517     since some C++ compilers masquerading as C compilers
8518     incorrectly reject 9223372036854775807.  */
8519 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
8520   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
8521                        && LARGE_OFF_T % 2147483647 == 1)
8522                       ? 1 : -1];
8523 int
8524 main ()
8525 {
8526
8527   ;
8528   return 0;
8529 }
8530 _ACEOF
8531 rm -f conftest.$ac_objext
8532 if { (eval echo "$as_me:8532: \"$ac_compile\"") >&5
8533   (eval $ac_compile) 2>&5
8534   ac_status=$?
8535   echo "$as_me:8535: \$? = $ac_status" >&5
8536   (exit $ac_status); } &&
8537          { ac_try='test -s conftest.$ac_objext'
8538   { (eval echo "$as_me:8538: \"$ac_try\"") >&5
8539   (eval $ac_try) 2>&5
8540   ac_status=$?
8541   echo "$as_me:8541: \$? = $ac_status" >&5
8542   (exit $ac_status); }; }; then
8543   ac_cv_sys_file_offset_bits=64; break
8544 else
8545   echo "$as_me: failed program was:" >&5
8546 cat conftest.$ac_ext >&5
8547 fi
8548 rm -f conftest.$ac_objext conftest.$ac_ext
8549   break
8550 done
8551 fi
8552 echo "$as_me:8552: result: $ac_cv_sys_file_offset_bits" >&5
8553 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
8554 if test "$ac_cv_sys_file_offset_bits" != no; then
8555
8556 cat >>confdefs.h <<EOF
8557 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
8558 EOF
8559
8560 fi
8561 rm -rf conftest*
8562   echo "$as_me:8562: checking for _LARGE_FILES value needed for large files" >&5
8563 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
8564 if test "${ac_cv_sys_large_files+set}" = set; then
8565   echo $ECHO_N "(cached) $ECHO_C" >&6
8566 else
8567   while :; do
8568   ac_cv_sys_large_files=no
8569   cat >conftest.$ac_ext <<_ACEOF
8570 #line 8570 "configure"
8571 #include "confdefs.h"
8572 #include <sys/types.h>
8573  /* Check that off_t can represent 2**63 - 1 correctly.
8574     We can't simply define LARGE_OFF_T to be 9223372036854775807,
8575     since some C++ compilers masquerading as C compilers
8576     incorrectly reject 9223372036854775807.  */
8577 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
8578   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
8579                        && LARGE_OFF_T % 2147483647 == 1)
8580                       ? 1 : -1];
8581 int
8582 main ()
8583 {
8584
8585   ;
8586   return 0;
8587 }
8588 _ACEOF
8589 rm -f conftest.$ac_objext
8590 if { (eval echo "$as_me:8590: \"$ac_compile\"") >&5
8591   (eval $ac_compile) 2>&5
8592   ac_status=$?
8593   echo "$as_me:8593: \$? = $ac_status" >&5
8594   (exit $ac_status); } &&
8595          { ac_try='test -s conftest.$ac_objext'
8596   { (eval echo "$as_me:8596: \"$ac_try\"") >&5
8597   (eval $ac_try) 2>&5
8598   ac_status=$?
8599   echo "$as_me:8599: \$? = $ac_status" >&5
8600   (exit $ac_status); }; }; then
8601   break
8602 else
8603   echo "$as_me: failed program was:" >&5
8604 cat conftest.$ac_ext >&5
8605 fi
8606 rm -f conftest.$ac_objext conftest.$ac_ext
8607   cat >conftest.$ac_ext <<_ACEOF
8608 #line 8608 "configure"
8609 #include "confdefs.h"
8610 #define _LARGE_FILES 1
8611 #include <sys/types.h>
8612  /* Check that off_t can represent 2**63 - 1 correctly.
8613     We can't simply define LARGE_OFF_T to be 9223372036854775807,
8614     since some C++ compilers masquerading as C compilers
8615     incorrectly reject 9223372036854775807.  */
8616 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
8617   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
8618                        && LARGE_OFF_T % 2147483647 == 1)
8619                       ? 1 : -1];
8620 int
8621 main ()
8622 {
8623
8624   ;
8625   return 0;
8626 }
8627 _ACEOF
8628 rm -f conftest.$ac_objext
8629 if { (eval echo "$as_me:8629: \"$ac_compile\"") >&5
8630   (eval $ac_compile) 2>&5
8631   ac_status=$?
8632   echo "$as_me:8632: \$? = $ac_status" >&5
8633   (exit $ac_status); } &&
8634          { ac_try='test -s conftest.$ac_objext'
8635   { (eval echo "$as_me:8635: \"$ac_try\"") >&5
8636   (eval $ac_try) 2>&5
8637   ac_status=$?
8638   echo "$as_me:8638: \$? = $ac_status" >&5
8639   (exit $ac_status); }; }; then
8640   ac_cv_sys_large_files=1; break
8641 else
8642   echo "$as_me: failed program was:" >&5
8643 cat conftest.$ac_ext >&5
8644 fi
8645 rm -f conftest.$ac_objext conftest.$ac_ext
8646   break
8647 done
8648 fi
8649 echo "$as_me:8649: result: $ac_cv_sys_large_files" >&5
8650 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
8651 if test "$ac_cv_sys_large_files" != no; then
8652
8653 cat >>confdefs.h <<EOF
8654 #define _LARGE_FILES $ac_cv_sys_large_files
8655 EOF
8656
8657 fi
8658 rm -rf conftest*
8659 fi
8660
8661     if test "$enable_largefile" != no ; then
8662         echo "$as_me:8662: checking for _LARGEFILE_SOURCE value needed for large files" >&5
8663 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
8664 if test "${ac_cv_sys_largefile_source+set}" = set; then
8665   echo $ECHO_N "(cached) $ECHO_C" >&6
8666 else
8667   while :; do
8668   ac_cv_sys_largefile_source=no
8669   cat >conftest.$ac_ext <<_ACEOF
8670 #line 8670 "configure"
8671 #include "confdefs.h"
8672 #include <stdio.h>
8673 int
8674 main ()
8675 {
8676 return !fseeko;
8677   ;
8678   return 0;
8679 }
8680 _ACEOF
8681 rm -f conftest.$ac_objext
8682 if { (eval echo "$as_me:8682: \"$ac_compile\"") >&5
8683   (eval $ac_compile) 2>&5
8684   ac_status=$?
8685   echo "$as_me:8685: \$? = $ac_status" >&5
8686   (exit $ac_status); } &&
8687          { ac_try='test -s conftest.$ac_objext'
8688   { (eval echo "$as_me:8688: \"$ac_try\"") >&5
8689   (eval $ac_try) 2>&5
8690   ac_status=$?
8691   echo "$as_me:8691: \$? = $ac_status" >&5
8692   (exit $ac_status); }; }; then
8693   break
8694 else
8695   echo "$as_me: failed program was:" >&5
8696 cat conftest.$ac_ext >&5
8697 fi
8698 rm -f conftest.$ac_objext conftest.$ac_ext
8699   cat >conftest.$ac_ext <<_ACEOF
8700 #line 8700 "configure"
8701 #include "confdefs.h"
8702 #define _LARGEFILE_SOURCE 1
8703 #include <stdio.h>
8704 int
8705 main ()
8706 {
8707 return !fseeko;
8708   ;
8709   return 0;
8710 }
8711 _ACEOF
8712 rm -f conftest.$ac_objext
8713 if { (eval echo "$as_me:8713: \"$ac_compile\"") >&5
8714   (eval $ac_compile) 2>&5
8715   ac_status=$?
8716   echo "$as_me:8716: \$? = $ac_status" >&5
8717   (exit $ac_status); } &&
8718          { ac_try='test -s conftest.$ac_objext'
8719   { (eval echo "$as_me:8719: \"$ac_try\"") >&5
8720   (eval $ac_try) 2>&5
8721   ac_status=$?
8722   echo "$as_me:8722: \$? = $ac_status" >&5
8723   (exit $ac_status); }; }; then
8724   ac_cv_sys_largefile_source=1; break
8725 else
8726   echo "$as_me: failed program was:" >&5
8727 cat conftest.$ac_ext >&5
8728 fi
8729 rm -f conftest.$ac_objext conftest.$ac_ext
8730   break
8731 done
8732 fi
8733 echo "$as_me:8733: result: $ac_cv_sys_largefile_source" >&5
8734 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
8735 if test "$ac_cv_sys_largefile_source" != no; then
8736
8737 cat >>confdefs.h <<EOF
8738 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
8739 EOF
8740
8741 fi
8742 rm -rf conftest*
8743
8744 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
8745 # in glibc 2.1.3, but that breaks too many other things.
8746 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
8747 echo "$as_me:8747: checking for fseeko" >&5
8748 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
8749 if test "${ac_cv_func_fseeko+set}" = set; then
8750   echo $ECHO_N "(cached) $ECHO_C" >&6
8751 else
8752   cat >conftest.$ac_ext <<_ACEOF
8753 #line 8753 "configure"
8754 #include "confdefs.h"
8755 #include <stdio.h>
8756 int
8757 main ()
8758 {
8759 return fseeko && fseeko (stdin, 0, 0);
8760   ;
8761   return 0;
8762 }
8763 _ACEOF
8764 rm -f conftest.$ac_objext conftest$ac_exeext
8765 if { (eval echo "$as_me:8765: \"$ac_link\"") >&5
8766   (eval $ac_link) 2>&5
8767   ac_status=$?
8768   echo "$as_me:8768: \$? = $ac_status" >&5
8769   (exit $ac_status); } &&
8770          { ac_try='test -s conftest$ac_exeext'
8771   { (eval echo "$as_me:8771: \"$ac_try\"") >&5
8772   (eval $ac_try) 2>&5
8773   ac_status=$?
8774   echo "$as_me:8774: \$? = $ac_status" >&5
8775   (exit $ac_status); }; }; then
8776   ac_cv_func_fseeko=yes
8777 else
8778   echo "$as_me: failed program was:" >&5
8779 cat conftest.$ac_ext >&5
8780 ac_cv_func_fseeko=no
8781 fi
8782 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8783 fi
8784 echo "$as_me:8784: result: $ac_cv_func_fseeko" >&5
8785 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
8786 if test $ac_cv_func_fseeko = yes; then
8787
8788 cat >>confdefs.h <<\EOF
8789 #define HAVE_FSEEKO 1
8790 EOF
8791
8792 fi
8793
8794         # Normally we would collect these definitions in the config.h,
8795         # but (like _XOPEN_SOURCE), some environments rely on having these
8796         # defined before any of the system headers are included.  Another
8797         # case comes up with C++, e.g., on AIX the compiler compiles the
8798         # header files by themselves before looking at the body files it is
8799         # told to compile.  For ncurses, those header files do not include
8800         # the config.h
8801         test "$ac_cv_sys_large_files"      != no && CPPFLAGS="$CPPFLAGS -D_LARGE_FILES "
8802         test "$ac_cv_sys_largefile_source" != no && CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE "
8803         test "$ac_cv_sys_file_offset_bits" != no && CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits "
8804
8805         echo "$as_me:8805: checking whether to use struct dirent64" >&5
8806 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
8807 if test "${cf_cv_struct_dirent64+set}" = set; then
8808   echo $ECHO_N "(cached) $ECHO_C" >&6
8809 else
8810
8811                 cat >conftest.$ac_ext <<_ACEOF
8812 #line 8812 "configure"
8813 #include "confdefs.h"
8814
8815 #include <sys/types.h>
8816 #include <dirent.h>
8817
8818 int
8819 main ()
8820 {
8821
8822                 /* if transitional largefile support is setup, this is true */
8823                 extern struct dirent64 * readdir(DIR *);
8824                 struct dirent64 *x = readdir((DIR *)0);
8825                 struct dirent *y = readdir((DIR *)0);
8826                 int z = x - y;
8827
8828   ;
8829   return 0;
8830 }
8831 _ACEOF
8832 rm -f conftest.$ac_objext
8833 if { (eval echo "$as_me:8833: \"$ac_compile\"") >&5
8834   (eval $ac_compile) 2>&5
8835   ac_status=$?
8836   echo "$as_me:8836: \$? = $ac_status" >&5
8837   (exit $ac_status); } &&
8838          { ac_try='test -s conftest.$ac_objext'
8839   { (eval echo "$as_me:8839: \"$ac_try\"") >&5
8840   (eval $ac_try) 2>&5
8841   ac_status=$?
8842   echo "$as_me:8842: \$? = $ac_status" >&5
8843   (exit $ac_status); }; }; then
8844   cf_cv_struct_dirent64=yes
8845 else
8846   echo "$as_me: failed program was:" >&5
8847 cat conftest.$ac_ext >&5
8848 cf_cv_struct_dirent64=no
8849 fi
8850 rm -f conftest.$ac_objext conftest.$ac_ext
8851
8852 fi
8853 echo "$as_me:8853: result: $cf_cv_struct_dirent64" >&5
8854 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
8855         test "$cf_cv_struct_dirent64" = yes && cat >>confdefs.h <<\EOF
8856 #define HAVE_STRUCT_DIRENT64 1
8857 EOF
8858
8859     fi
8860
8861 ### Enable compiling-in rcs id's
8862 echo "$as_me:8862: checking if RCS identifiers should be compiled-in" >&5
8863 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
8864
8865 # Check whether --with-rcs-ids or --without-rcs-ids was given.
8866 if test "${with_rcs_ids+set}" = set; then
8867   withval="$with_rcs_ids"
8868   with_rcs_ids=$withval
8869 else
8870   with_rcs_ids=no
8871 fi;
8872 echo "$as_me:8872: result: $with_rcs_ids" >&5
8873 echo "${ECHO_T}$with_rcs_ids" >&6
8874 test "$with_rcs_ids" = yes && cat >>confdefs.h <<\EOF
8875 #define USE_RCS_IDS 1
8876 EOF
8877
8878 ###############################################################################
8879
8880 ### Note that some functions (such as const) are normally disabled anyway.
8881 echo "$as_me:8881: checking if you want to build with function extensions" >&5
8882 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
8883
8884 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
8885 if test "${enable_ext_funcs+set}" = set; then
8886   enableval="$enable_ext_funcs"
8887   with_ext_funcs=$enableval
8888 else
8889   with_ext_funcs=yes
8890 fi;
8891 echo "$as_me:8891: result: $with_ext_funcs" >&5
8892 echo "${ECHO_T}$with_ext_funcs" >&6
8893 if test "$with_ext_funcs" = yes ; then
8894         NCURSES_EXT_FUNCS=1
8895         cat >>confdefs.h <<\EOF
8896 #define HAVE_USE_DEFAULT_COLORS 1
8897 EOF
8898
8899         cat >>confdefs.h <<\EOF
8900 #define NCURSES_EXT_FUNCS 1
8901 EOF
8902
8903 else
8904         NCURSES_EXT_FUNCS=0
8905 fi
8906
8907 ###   use option --enable-const to turn on use of const beyond that in XSI.
8908 echo "$as_me:8908: checking for extended use of const keyword" >&5
8909 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
8910
8911 # Check whether --enable-const or --disable-const was given.
8912 if test "${enable_const+set}" = set; then
8913   enableval="$enable_const"
8914   with_ext_const=$enableval
8915 else
8916   with_ext_const=no
8917 fi;
8918 echo "$as_me:8918: result: $with_ext_const" >&5
8919 echo "${ECHO_T}$with_ext_const" >&6
8920 NCURSES_CONST='/*nothing*/'
8921 if test "$with_ext_const" = yes ; then
8922         NCURSES_CONST=const
8923 fi
8924
8925 ###############################################################################
8926 # These options are relatively safe to experiment with.
8927
8928 echo "$as_me:8928: checking if you want all development code" >&5
8929 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
8930
8931 # Check whether --with-develop or --without-develop was given.
8932 if test "${with_develop+set}" = set; then
8933   withval="$with_develop"
8934   with_develop=$withval
8935 else
8936   with_develop=no
8937 fi;
8938 echo "$as_me:8938: result: $with_develop" >&5
8939 echo "${ECHO_T}$with_develop" >&6
8940
8941 ###############################################################################
8942 # These are just experimental, probably should not be in a package:
8943
8944 # This is still experimental (20080329), but should ultimately be moved to
8945 # the script-block --with-normal, etc.
8946
8947 echo "$as_me:8947: checking if you want to link with the pthread library" >&5
8948 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
8949
8950 # Check whether --with-pthread or --without-pthread was given.
8951 if test "${with_pthread+set}" = set; then
8952   withval="$with_pthread"
8953   with_pthread=$withval
8954 else
8955   with_pthread=no
8956 fi;
8957 echo "$as_me:8957: result: $with_pthread" >&5
8958 echo "${ECHO_T}$with_pthread" >&6
8959
8960 if test "$with_pthread" != no ; then
8961     echo "$as_me:8961: checking for pthread.h" >&5
8962 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
8963 if test "${ac_cv_header_pthread_h+set}" = set; then
8964   echo $ECHO_N "(cached) $ECHO_C" >&6
8965 else
8966   cat >conftest.$ac_ext <<_ACEOF
8967 #line 8967 "configure"
8968 #include "confdefs.h"
8969 #include <pthread.h>
8970 _ACEOF
8971 if { (eval echo "$as_me:8971: \"$ac_cpp conftest.$ac_ext\"") >&5
8972   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8973   ac_status=$?
8974   egrep -v '^ *\+' conftest.er1 >conftest.err
8975   rm -f conftest.er1
8976   cat conftest.err >&5
8977   echo "$as_me:8977: \$? = $ac_status" >&5
8978   (exit $ac_status); } >/dev/null; then
8979   if test -s conftest.err; then
8980     ac_cpp_err=$ac_c_preproc_warn_flag
8981   else
8982     ac_cpp_err=
8983   fi
8984 else
8985   ac_cpp_err=yes
8986 fi
8987 if test -z "$ac_cpp_err"; then
8988   ac_cv_header_pthread_h=yes
8989 else
8990   echo "$as_me: failed program was:" >&5
8991   cat conftest.$ac_ext >&5
8992   ac_cv_header_pthread_h=no
8993 fi
8994 rm -f conftest.err conftest.$ac_ext
8995 fi
8996 echo "$as_me:8996: result: $ac_cv_header_pthread_h" >&5
8997 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
8998 if test $ac_cv_header_pthread_h = yes; then
8999
9000         cat >>confdefs.h <<\EOF
9001 #define HAVE_PTHREADS_H 1
9002 EOF
9003
9004         echo "$as_me:9004: checking if we can link with the pthread library" >&5
9005 echo $ECHO_N "checking if we can link with the pthread library... $ECHO_C" >&6
9006         cf_save_LIBS="$LIBS"
9007         LIBS="-lpthread $LIBS"
9008         cat >conftest.$ac_ext <<_ACEOF
9009 #line 9009 "configure"
9010 #include "confdefs.h"
9011
9012 #include <pthread.h>
9013
9014 int
9015 main ()
9016 {
9017
9018         int rc = pthread_create(0,0,0,0);
9019
9020   ;
9021   return 0;
9022 }
9023 _ACEOF
9024 rm -f conftest.$ac_objext conftest$ac_exeext
9025 if { (eval echo "$as_me:9025: \"$ac_link\"") >&5
9026   (eval $ac_link) 2>&5
9027   ac_status=$?
9028   echo "$as_me:9028: \$? = $ac_status" >&5
9029   (exit $ac_status); } &&
9030          { ac_try='test -s conftest$ac_exeext'
9031   { (eval echo "$as_me:9031: \"$ac_try\"") >&5
9032   (eval $ac_try) 2>&5
9033   ac_status=$?
9034   echo "$as_me:9034: \$? = $ac_status" >&5
9035   (exit $ac_status); }; }; then
9036   with_pthread=yes
9037 else
9038   echo "$as_me: failed program was:" >&5
9039 cat conftest.$ac_ext >&5
9040 with_pthread=no
9041 fi
9042 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9043         LIBS="$cf_save_LIBS"
9044         echo "$as_me:9044: result: $with_pthread" >&5
9045 echo "${ECHO_T}$with_pthread" >&6
9046
9047         if test "$with_pthread" = yes ; then
9048             LIBS="-lpthread $LIBS"
9049             cat >>confdefs.h <<\EOF
9050 #define HAVE_LIBPTHREADS 1
9051 EOF
9052
9053         else
9054             { { echo "$as_me:9054: error: Cannot link with pthread library" >&5
9055 echo "$as_me: error: Cannot link with pthread library" >&2;}
9056    { (exit 1); exit 1; }; }
9057         fi
9058
9059 fi
9060
9061 fi
9062
9063 echo "$as_me:9063: checking if you want to use weak-symbols for pthreads" >&5
9064 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
9065
9066 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
9067 if test "${enable_weak_symbols+set}" = set; then
9068   enableval="$enable_weak_symbols"
9069   use_weak_symbols=$withval
9070 else
9071   use_weak_symbols=no
9072 fi;
9073 echo "$as_me:9073: result: $use_weak_symbols" >&5
9074 echo "${ECHO_T}$use_weak_symbols" >&6
9075 if test "$use_weak_symbols" = yes ; then
9076
9077 echo "$as_me:9077: checking if $CC supports weak symbols" >&5
9078 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
9079 if test "${cf_cv_weak_symbols+set}" = set; then
9080   echo $ECHO_N "(cached) $ECHO_C" >&6
9081 else
9082
9083 cat >conftest.$ac_ext <<_ACEOF
9084 #line 9084 "configure"
9085 #include "confdefs.h"
9086
9087 #include <stdio.h>
9088 int
9089 main ()
9090 {
9091
9092 #if defined(__GNUC__)
9093 #  if defined __USE_ISOC99
9094 #    define _cat_pragma(exp)    _Pragma(#exp)
9095 #    define _weak_pragma(exp)   _cat_pragma(weak name)
9096 #  else
9097 #    define _weak_pragma(exp)
9098 #  endif
9099 #  define _declare(name)        __extension__ extern __typeof__(name) name
9100 #  define weak_symbol(name)     _weak_pragma(name) _declare(name) __attribute__((weak))
9101 #endif
9102
9103 weak_symbol(fopen);
9104
9105   ;
9106   return 0;
9107 }
9108 _ACEOF
9109 rm -f conftest.$ac_objext
9110 if { (eval echo "$as_me:9110: \"$ac_compile\"") >&5
9111   (eval $ac_compile) 2>&5
9112   ac_status=$?
9113   echo "$as_me:9113: \$? = $ac_status" >&5
9114   (exit $ac_status); } &&
9115          { ac_try='test -s conftest.$ac_objext'
9116   { (eval echo "$as_me:9116: \"$ac_try\"") >&5
9117   (eval $ac_try) 2>&5
9118   ac_status=$?
9119   echo "$as_me:9119: \$? = $ac_status" >&5
9120   (exit $ac_status); }; }; then
9121   cf_cv_weak_symbols=yes
9122 else
9123   echo "$as_me: failed program was:" >&5
9124 cat conftest.$ac_ext >&5
9125 cf_cv_weak_symbols=no
9126 fi
9127 rm -f conftest.$ac_objext conftest.$ac_ext
9128
9129 fi
9130 echo "$as_me:9130: result: $cf_cv_weak_symbols" >&5
9131 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
9132
9133 else
9134     cf_cv_weak_symbols=no
9135 fi
9136
9137 if test $cf_cv_weak_symbols = yes ; then
9138     cat >>confdefs.h <<\EOF
9139 #define USE_WEAK_SYMBOLS 1
9140 EOF
9141
9142 fi
9143
9144 PTHREAD=
9145 if test "$with_pthread" = "yes" ; then
9146     cat >>confdefs.h <<\EOF
9147 #define USE_PTHREADS 1
9148 EOF
9149
9150     enable_reentrant=yes
9151     if test $cf_cv_weak_symbols = yes ; then
9152         PTHREAD=-lpthread
9153     fi
9154 fi
9155
9156 # Reentrant code has to be opaque; there's little advantage to making ncurses
9157 # opaque outside of that, so there is no --enable-opaque option.  We can use
9158 # this option without --with-pthreads, but this will be always set for
9159 # pthreads.
9160 echo "$as_me:9160: checking if you want experimental reentrant code" >&5
9161 echo $ECHO_N "checking if you want experimental reentrant code... $ECHO_C" >&6
9162
9163 # Check whether --enable-reentrant or --disable-reentrant was given.
9164 if test "${enable_reentrant+set}" = set; then
9165   enableval="$enable_reentrant"
9166   with_reentrant=$enableval
9167 else
9168   with_reentrant=no
9169 fi;
9170 echo "$as_me:9170: result: $with_reentrant" >&5
9171 echo "${ECHO_T}$with_reentrant" >&6
9172 if test "$with_reentrant" = yes ; then
9173         cf_cv_enable_reentrant=1
9174         if test $cf_cv_weak_symbols = yes ; then
9175
9176 # remove pthread library from $LIBS
9177 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[       ]//g' -e 's/-lpthread$//'`
9178
9179         else
9180                 LIB_SUFFIX="t${LIB_SUFFIX}"
9181         fi
9182         cat >>confdefs.h <<\EOF
9183 #define USE_REENTRANT 1
9184 EOF
9185
9186 else
9187         cf_cv_enable_reentrant=0
9188 fi
9189
9190 ### Allow using a different wrap-prefix
9191 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
9192         echo "$as_me:9192: checking for prefix used to wrap public variables" >&5
9193 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
9194
9195 # Check whether --with-wrap-prefix or --without-wrap-prefix was given.
9196 if test "${with_wrap_prefix+set}" = set; then
9197   withval="$with_wrap_prefix"
9198   NCURSES_WRAP_PREFIX=$withval
9199 else
9200   NCURSES_WRAP_PREFIX=_nc_
9201 fi;
9202         echo "$as_me:9202: result: $NCURSES_WRAP_PREFIX" >&5
9203 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
9204 else
9205         NCURSES_WRAP_PREFIX=_nc_
9206 fi
9207
9208 cat >>confdefs.h <<EOF
9209 #define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
9210 EOF
9211
9212 ###############################################################################
9213
9214 ###     use option --disable-echo to suppress full display compiling commands
9215 echo "$as_me:9215: checking if you want to display full commands during build" >&5
9216 echo $ECHO_N "checking if you want to display full commands during build... $ECHO_C" >&6
9217
9218 # Check whether --enable-echo or --disable-echo was given.
9219 if test "${enable_echo+set}" = set; then
9220   enableval="$enable_echo"
9221   with_echo=$enableval
9222 else
9223   with_echo=yes
9224 fi;
9225 if test "$with_echo" = yes; then
9226         ECHO_LINK=
9227 else
9228         ECHO_LINK='@ echo linking $@ ... ;'
9229 fi
9230 echo "$as_me:9230: result: $with_echo" >&5
9231 echo "${ECHO_T}$with_echo" >&6
9232
9233 ###     use option --enable-warnings to turn on all gcc warnings
9234 echo "$as_me:9234: checking if you want to see compiler warnings" >&5
9235 echo $ECHO_N "checking if you want to see compiler warnings... $ECHO_C" >&6
9236
9237 # Check whether --enable-warnings or --disable-warnings was given.
9238 if test "${enable_warnings+set}" = set; then
9239   enableval="$enable_warnings"
9240   with_warnings=$enableval
9241 fi;
9242 echo "$as_me:9242: result: $with_warnings" >&5
9243 echo "${ECHO_T}$with_warnings" >&6
9244
9245 if test "x$with_warnings" = "xyes"; then
9246         ADAFLAGS="$ADAFLAGS -gnatg"
9247
9248 INTEL_COMPILER=no
9249
9250 if test "$GCC" = yes ; then
9251         case $host_os in
9252         linux*|gnu*)
9253                 echo "$as_me:9253: checking if this is really Intel C compiler" >&5
9254 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
9255                 cf_save_CFLAGS="$CFLAGS"
9256                 CFLAGS="$CFLAGS -no-gcc"
9257                 cat >conftest.$ac_ext <<_ACEOF
9258 #line 9258 "configure"
9259 #include "confdefs.h"
9260
9261 int
9262 main ()
9263 {
9264
9265 #ifdef __INTEL_COMPILER
9266 #else
9267 make an error
9268 #endif
9269
9270   ;
9271   return 0;
9272 }
9273 _ACEOF
9274 rm -f conftest.$ac_objext
9275 if { (eval echo "$as_me:9275: \"$ac_compile\"") >&5
9276   (eval $ac_compile) 2>&5
9277   ac_status=$?
9278   echo "$as_me:9278: \$? = $ac_status" >&5
9279   (exit $ac_status); } &&
9280          { ac_try='test -s conftest.$ac_objext'
9281   { (eval echo "$as_me:9281: \"$ac_try\"") >&5
9282   (eval $ac_try) 2>&5
9283   ac_status=$?
9284   echo "$as_me:9284: \$? = $ac_status" >&5
9285   (exit $ac_status); }; }; then
9286   INTEL_COMPILER=yes
9287 cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
9288
9289 else
9290   echo "$as_me: failed program was:" >&5
9291 cat conftest.$ac_ext >&5
9292 fi
9293 rm -f conftest.$ac_objext conftest.$ac_ext
9294                 CFLAGS="$cf_save_CFLAGS"
9295                 echo "$as_me:9295: result: $INTEL_COMPILER" >&5
9296 echo "${ECHO_T}$INTEL_COMPILER" >&6
9297                 ;;
9298         esac
9299 fi
9300
9301 cat > conftest.$ac_ext <<EOF
9302 #line 9302 "${as_me:-configure}"
9303 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
9304 EOF
9305
9306 if test "$INTEL_COMPILER" = yes
9307 then
9308 # The "-wdXXX" options suppress warnings:
9309 # remark #1419: external declaration in primary source file
9310 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
9311 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
9312 # remark #193: zero used for undefined preprocessing identifier
9313 # remark #593: variable "curs_sb_left_arrow" was set but never used
9314 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
9315 # remark #869: parameter "tw" was never referenced
9316 # remark #981: operands are evaluated in unspecified order
9317 # warning #279: controlling expression is constant
9318
9319         { echo "$as_me:9319: checking for $CC warning options..." >&5
9320 echo "$as_me: checking for $CC warning options..." >&6;}
9321         cf_save_CFLAGS="$CFLAGS"
9322         EXTRA_CFLAGS="-Wall"
9323         for cf_opt in \
9324                 wd1419 \
9325                 wd1683 \
9326                 wd1684 \
9327                 wd193 \
9328                 wd593 \
9329                 wd279 \
9330                 wd810 \
9331                 wd869 \
9332                 wd981
9333         do
9334                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
9335                 if { (eval echo "$as_me:9335: \"$ac_compile\"") >&5
9336   (eval $ac_compile) 2>&5
9337   ac_status=$?
9338   echo "$as_me:9338: \$? = $ac_status" >&5
9339   (exit $ac_status); }; then
9340                         test -n "$verbose" && echo "$as_me:9340: result: ... -$cf_opt" >&5
9341 echo "${ECHO_T}... -$cf_opt" >&6
9342                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
9343                 fi
9344         done
9345         CFLAGS="$cf_save_CFLAGS"
9346
9347 elif test "$GCC" = yes
9348 then
9349         { echo "$as_me:9349: checking for $CC warning options..." >&5
9350 echo "$as_me: checking for $CC warning options..." >&6;}
9351         cf_save_CFLAGS="$CFLAGS"
9352         EXTRA_CFLAGS=
9353         cf_warn_CONST=""
9354         test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
9355         for cf_opt in W Wall \
9356                 Wbad-function-cast \
9357                 Wcast-align \
9358                 Wcast-qual \
9359                 Winline \
9360                 Wmissing-declarations \
9361                 Wmissing-prototypes \
9362                 Wnested-externs \
9363                 Wpointer-arith \
9364                 Wshadow \
9365                 Wstrict-prototypes \
9366                 Wundef $cf_warn_CONST Wdeclaration-after-statement Wextra Wno-unknown-pragmas Wswitch-enum
9367         do
9368                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
9369                 if { (eval echo "$as_me:9369: \"$ac_compile\"") >&5
9370   (eval $ac_compile) 2>&5
9371   ac_status=$?
9372   echo "$as_me:9372: \$? = $ac_status" >&5
9373   (exit $ac_status); }; then
9374                         test -n "$verbose" && echo "$as_me:9374: result: ... -$cf_opt" >&5
9375 echo "${ECHO_T}... -$cf_opt" >&6
9376                         case $cf_opt in #(vi
9377                         Wcast-qual) #(vi
9378                                 CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
9379                                 ;;
9380                         Winline) #(vi
9381                                 case $GCC_VERSION in
9382                                 [34].*)
9383                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
9384
9385 echo "${as_me:-configure}:9385: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
9386
9387                                         continue;;
9388                                 esac
9389                                 ;;
9390                         esac
9391                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
9392                 fi
9393         done
9394         CFLAGS="$cf_save_CFLAGS"
9395 fi
9396 rm -rf conftest*
9397
9398 fi
9399
9400 if test "$GCC" = yes
9401 then
9402 cat > conftest.i <<EOF
9403 #ifndef GCC_PRINTF
9404 #define GCC_PRINTF 0
9405 #endif
9406 #ifndef GCC_SCANF
9407 #define GCC_SCANF 0
9408 #endif
9409 #ifndef GCC_NORETURN
9410 #define GCC_NORETURN /* nothing */
9411 #endif
9412 #ifndef GCC_UNUSED
9413 #define GCC_UNUSED /* nothing */
9414 #endif
9415 EOF
9416 if test "$GCC" = yes
9417 then
9418         { echo "$as_me:9418: checking for $CC __attribute__ directives..." >&5
9419 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
9420 cat > conftest.$ac_ext <<EOF
9421 #line 9421 "${as_me:-configure}"
9422 #include "confdefs.h"
9423 #include "conftest.h"
9424 #include "conftest.i"
9425 #if     GCC_PRINTF
9426 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
9427 #else
9428 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
9429 #endif
9430 #if     GCC_SCANF
9431 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
9432 #else
9433 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
9434 #endif
9435 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
9436 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
9437 extern void foo(void) GCC_NORETURN;
9438 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
9439 EOF
9440         cf_printf_attribute=no
9441         cf_scanf_attribute=no
9442         for cf_attribute in scanf printf unused noreturn
9443         do
9444
9445 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
9446
9447                 cf_directive="__attribute__(($cf_attribute))"
9448                 echo "checking for $CC $cf_directive" 1>&5
9449
9450                 case $cf_attribute in #(vi
9451                 printf) #(vi
9452                         cf_printf_attribute=yes
9453                         cat >conftest.h <<EOF
9454 #define GCC_$cf_ATTRIBUTE 1
9455 EOF
9456                         ;;
9457                 scanf) #(vi
9458                         cf_scanf_attribute=yes
9459                         cat >conftest.h <<EOF
9460 #define GCC_$cf_ATTRIBUTE 1
9461 EOF
9462                         ;;
9463                 *) #(vi
9464                         cat >conftest.h <<EOF
9465 #define GCC_$cf_ATTRIBUTE $cf_directive
9466 EOF
9467                         ;;
9468                 esac
9469
9470                 if { (eval echo "$as_me:9470: \"$ac_compile\"") >&5
9471   (eval $ac_compile) 2>&5
9472   ac_status=$?
9473   echo "$as_me:9473: \$? = $ac_status" >&5
9474   (exit $ac_status); }; then
9475                         test -n "$verbose" && echo "$as_me:9475: result: ... $cf_attribute" >&5
9476 echo "${ECHO_T}... $cf_attribute" >&6
9477                         cat conftest.h >>confdefs.h
9478                         case $cf_attribute in #(vi
9479                         printf) #(vi
9480                                 if test "$cf_printf_attribute" = no ; then
9481                                         cat >>confdefs.h <<EOF
9482 #define GCC_PRINTFLIKE(fmt,var) /* nothing */
9483 EOF
9484                                 else
9485                                         cat >>confdefs.h <<EOF
9486 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
9487 EOF
9488                                 fi
9489                                 ;;
9490                         scanf) #(vi
9491                                 if test "$cf_scanf_attribute" = no ; then
9492                                         cat >>confdefs.h <<EOF
9493 #define GCC_SCANFLIKE(fmt,var) /* nothing */
9494 EOF
9495                                 else
9496                                         cat >>confdefs.h <<EOF
9497 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
9498 EOF
9499                                 fi
9500                                 ;;
9501                         esac
9502                 fi
9503         done
9504 else
9505         fgrep define conftest.i >>confdefs.h
9506 fi
9507 rm -rf conftest*
9508 fi
9509
9510 ###     use option --enable-assertions to turn on generation of assertion code
9511 echo "$as_me:9511: checking if you want to enable runtime assertions" >&5
9512 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
9513
9514 # Check whether --enable-assertions or --disable-assertions was given.
9515 if test "${enable_assertions+set}" = set; then
9516   enableval="$enable_assertions"
9517   with_assertions=$enableval
9518 else
9519   with_assertions=no
9520 fi;
9521 echo "$as_me:9521: result: $with_assertions" >&5
9522 echo "${ECHO_T}$with_assertions" >&6
9523 if test -n "$GCC"
9524 then
9525         if test "$with_assertions" = no
9526         then
9527                 cat >>confdefs.h <<\EOF
9528 #define NDEBUG 1
9529 EOF
9530
9531                 CPPFLAGS="$CPPFLAGS -DNDEBUG"
9532         else
9533                 ADAFLAGS="$ADAFLAGS -gnata"
9534         fi
9535 fi
9536
9537 ###     use option --disable-leaks to suppress "permanent" leaks, for testing
9538 cat >>confdefs.h <<\EOF
9539 #define HAVE_NC_ALLOC_H 1
9540 EOF
9541
9542 ###     use option --enable-expanded to generate certain macros as functions
9543
9544 # Check whether --enable-expanded or --disable-expanded was given.
9545 if test "${enable_expanded+set}" = set; then
9546   enableval="$enable_expanded"
9547   test "$enableval" = yes && cat >>confdefs.h <<\EOF
9548 #define NCURSES_EXPANDED 1
9549 EOF
9550
9551 fi;
9552
9553 ###     use option --disable-macros to suppress macros in favor of functions
9554
9555 # Check whether --enable-macros or --disable-macros was given.
9556 if test "${enable_macros+set}" = set; then
9557   enableval="$enable_macros"
9558   test "$enableval" = no && cat >>confdefs.h <<\EOF
9559 #define NCURSES_NOMACROS 1
9560 EOF
9561
9562 fi;
9563
9564 # Normally we only add trace() to the debug-library.  Allow this to be
9565 # extended to all models of the ncurses library:
9566 cf_all_traces=no
9567 case "$CFLAGS $CPPFLAGS" in
9568 *-DTRACE*)
9569         cf_all_traces=yes
9570         ;;
9571 esac
9572
9573 echo "$as_me:9573: checking whether to add trace feature to all models" >&5
9574 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
9575
9576 # Check whether --with-trace or --without-trace was given.
9577 if test "${with_trace+set}" = set; then
9578   withval="$with_trace"
9579   cf_with_trace=$withval
9580 else
9581   cf_with_trace=$cf_all_traces
9582 fi;
9583 echo "$as_me:9583: result: $cf_with_trace" >&5
9584 echo "${ECHO_T}$cf_with_trace" >&6
9585
9586 if test "$cf_with_trace" = yes ; then
9587         ADA_TRACE=TRUE
9588
9589 cf_fix_cppflags=no
9590 cf_new_cflags=
9591 cf_new_cppflags=
9592 cf_new_extra_cppflags=
9593
9594 for cf_add_cflags in -DTRACE
9595 do
9596 case $cf_fix_cppflags in
9597 no)
9598         case $cf_add_cflags in #(vi
9599         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
9600                 case $cf_add_cflags in
9601                 -D*)
9602                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9603
9604                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
9605                                 && test -z "${cf_tst_cflags}" \
9606                                 && cf_fix_cppflags=yes
9607
9608                         if test $cf_fix_cppflags = yes ; then
9609                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9610                                 continue
9611                         elif test "${cf_tst_cflags}" = "\"'" ; then
9612                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9613                                 continue
9614                         fi
9615                         ;;
9616                 esac
9617                 case "$CPPFLAGS" in
9618                 *$cf_add_cflags) #(vi
9619                         ;;
9620                 *) #(vi
9621                         case $cf_add_cflags in #(vi
9622                         -D*)
9623                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9624
9625 CPPFLAGS=`echo "$CPPFLAGS" | \
9626         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
9627                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
9628
9629                                 ;;
9630                         esac
9631                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
9632                         ;;
9633                 esac
9634                 ;;
9635         *)
9636                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
9637                 ;;
9638         esac
9639         ;;
9640 yes)
9641         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9642
9643         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
9644
9645         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
9646                 && test -z "${cf_tst_cflags}" \
9647                 && cf_fix_cppflags=no
9648         ;;
9649 esac
9650 done
9651
9652 if test -n "$cf_new_cflags" ; then
9653
9654         CFLAGS="$CFLAGS $cf_new_cflags"
9655 fi
9656
9657 if test -n "$cf_new_cppflags" ; then
9658
9659         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
9660 fi
9661
9662 if test -n "$cf_new_extra_cppflags" ; then
9663
9664         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
9665 fi
9666
9667 else
9668         ADA_TRACE=FALSE
9669 fi
9670
9671 ###     Checks for libraries.
9672 case $cf_cv_system_name in #(vi
9673 *mingw32*) #(vi
9674         ;;
9675 *)
9676 echo "$as_me:9676: checking for gettimeofday" >&5
9677 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
9678 if test "${ac_cv_func_gettimeofday+set}" = set; then
9679   echo $ECHO_N "(cached) $ECHO_C" >&6
9680 else
9681   cat >conftest.$ac_ext <<_ACEOF
9682 #line 9682 "configure"
9683 #include "confdefs.h"
9684 /* System header to define __stub macros and hopefully few prototypes,
9685     which can conflict with char gettimeofday (); below.  */
9686 #include <assert.h>
9687 /* Override any gcc2 internal prototype to avoid an error.  */
9688 #ifdef __cplusplus
9689 extern "C"
9690 #endif
9691 /* We use char because int might match the return type of a gcc2
9692    builtin and then its argument prototype would still apply.  */
9693 char gettimeofday ();
9694 char (*f) ();
9695
9696 int
9697 main ()
9698 {
9699 /* The GNU C library defines this for functions which it implements
9700     to always fail with ENOSYS.  Some functions are actually named
9701     something starting with __ and the normal name is an alias.  */
9702 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
9703 choke me
9704 #else
9705 f = gettimeofday;
9706 #endif
9707
9708   ;
9709   return 0;
9710 }
9711 _ACEOF
9712 rm -f conftest.$ac_objext conftest$ac_exeext
9713 if { (eval echo "$as_me:9713: \"$ac_link\"") >&5
9714   (eval $ac_link) 2>&5
9715   ac_status=$?
9716   echo "$as_me:9716: \$? = $ac_status" >&5
9717   (exit $ac_status); } &&
9718          { ac_try='test -s conftest$ac_exeext'
9719   { (eval echo "$as_me:9719: \"$ac_try\"") >&5
9720   (eval $ac_try) 2>&5
9721   ac_status=$?
9722   echo "$as_me:9722: \$? = $ac_status" >&5
9723   (exit $ac_status); }; }; then
9724   ac_cv_func_gettimeofday=yes
9725 else
9726   echo "$as_me: failed program was:" >&5
9727 cat conftest.$ac_ext >&5
9728 ac_cv_func_gettimeofday=no
9729 fi
9730 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9731 fi
9732 echo "$as_me:9732: result: $ac_cv_func_gettimeofday" >&5
9733 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
9734 if test $ac_cv_func_gettimeofday = yes; then
9735   cat >>confdefs.h <<\EOF
9736 #define HAVE_GETTIMEOFDAY 1
9737 EOF
9738
9739 else
9740
9741 echo "$as_me:9741: checking for gettimeofday in -lbsd" >&5
9742 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
9743 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
9744   echo $ECHO_N "(cached) $ECHO_C" >&6
9745 else
9746   ac_check_lib_save_LIBS=$LIBS
9747 LIBS="-lbsd  $LIBS"
9748 cat >conftest.$ac_ext <<_ACEOF
9749 #line 9749 "configure"
9750 #include "confdefs.h"
9751
9752 /* Override any gcc2 internal prototype to avoid an error.  */
9753 #ifdef __cplusplus
9754 extern "C"
9755 #endif
9756 /* We use char because int might match the return type of a gcc2
9757    builtin and then its argument prototype would still apply.  */
9758 char gettimeofday ();
9759 int
9760 main ()
9761 {
9762 gettimeofday ();
9763   ;
9764   return 0;
9765 }
9766 _ACEOF
9767 rm -f conftest.$ac_objext conftest$ac_exeext
9768 if { (eval echo "$as_me:9768: \"$ac_link\"") >&5
9769   (eval $ac_link) 2>&5
9770   ac_status=$?
9771   echo "$as_me:9771: \$? = $ac_status" >&5
9772   (exit $ac_status); } &&
9773          { ac_try='test -s conftest$ac_exeext'
9774   { (eval echo "$as_me:9774: \"$ac_try\"") >&5
9775   (eval $ac_try) 2>&5
9776   ac_status=$?
9777   echo "$as_me:9777: \$? = $ac_status" >&5
9778   (exit $ac_status); }; }; then
9779   ac_cv_lib_bsd_gettimeofday=yes
9780 else
9781   echo "$as_me: failed program was:" >&5
9782 cat conftest.$ac_ext >&5
9783 ac_cv_lib_bsd_gettimeofday=no
9784 fi
9785 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9786 LIBS=$ac_check_lib_save_LIBS
9787 fi
9788 echo "$as_me:9788: result: $ac_cv_lib_bsd_gettimeofday" >&5
9789 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
9790 if test $ac_cv_lib_bsd_gettimeofday = yes; then
9791   cat >>confdefs.h <<\EOF
9792 #define HAVE_GETTIMEOFDAY 1
9793 EOF
9794
9795         LIBS="$LIBS -lbsd"
9796 fi
9797
9798 fi
9799         ;;
9800 esac
9801
9802 ###     Checks for header files.
9803 echo "$as_me:9803: checking for ANSI C header files" >&5
9804 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
9805 if test "${ac_cv_header_stdc+set}" = set; then
9806   echo $ECHO_N "(cached) $ECHO_C" >&6
9807 else
9808   cat >conftest.$ac_ext <<_ACEOF
9809 #line 9809 "configure"
9810 #include "confdefs.h"
9811 #include <stdlib.h>
9812 #include <stdarg.h>
9813 #include <string.h>
9814 #include <float.h>
9815
9816 _ACEOF
9817 if { (eval echo "$as_me:9817: \"$ac_cpp conftest.$ac_ext\"") >&5
9818   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9819   ac_status=$?
9820   egrep -v '^ *\+' conftest.er1 >conftest.err
9821   rm -f conftest.er1
9822   cat conftest.err >&5
9823   echo "$as_me:9823: \$? = $ac_status" >&5
9824   (exit $ac_status); } >/dev/null; then
9825   if test -s conftest.err; then
9826     ac_cpp_err=$ac_c_preproc_warn_flag
9827   else
9828     ac_cpp_err=
9829   fi
9830 else
9831   ac_cpp_err=yes
9832 fi
9833 if test -z "$ac_cpp_err"; then
9834   ac_cv_header_stdc=yes
9835 else
9836   echo "$as_me: failed program was:" >&5
9837   cat conftest.$ac_ext >&5
9838   ac_cv_header_stdc=no
9839 fi
9840 rm -f conftest.err conftest.$ac_ext
9841
9842 if test $ac_cv_header_stdc = yes; then
9843   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
9844   cat >conftest.$ac_ext <<_ACEOF
9845 #line 9845 "configure"
9846 #include "confdefs.h"
9847 #include <string.h>
9848
9849 _ACEOF
9850 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9851   egrep "memchr" >/dev/null 2>&1; then
9852   :
9853 else
9854   ac_cv_header_stdc=no
9855 fi
9856 rm -rf conftest*
9857
9858 fi
9859
9860 if test $ac_cv_header_stdc = yes; then
9861   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
9862   cat >conftest.$ac_ext <<_ACEOF
9863 #line 9863 "configure"
9864 #include "confdefs.h"
9865 #include <stdlib.h>
9866
9867 _ACEOF
9868 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9869   egrep "free" >/dev/null 2>&1; then
9870   :
9871 else
9872   ac_cv_header_stdc=no
9873 fi
9874 rm -rf conftest*
9875
9876 fi
9877
9878 if test $ac_cv_header_stdc = yes; then
9879   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
9880   if test "$cross_compiling" = yes; then
9881   :
9882 else
9883   cat >conftest.$ac_ext <<_ACEOF
9884 #line 9884 "configure"
9885 #include "confdefs.h"
9886 #include <ctype.h>
9887 #if ((' ' & 0x0FF) == 0x020)
9888 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
9889 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
9890 #else
9891 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
9892                      || ('j' <= (c) && (c) <= 'r') \
9893                      || ('s' <= (c) && (c) <= 'z'))
9894 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
9895 #endif
9896
9897 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
9898 int
9899 main ()
9900 {
9901   int i;
9902   for (i = 0; i < 256; i++)
9903     if (XOR (islower (i), ISLOWER (i))
9904         || toupper (i) != TOUPPER (i))
9905       $ac_main_return(2);
9906   $ac_main_return (0);
9907 }
9908 _ACEOF
9909 rm -f conftest$ac_exeext
9910 if { (eval echo "$as_me:9910: \"$ac_link\"") >&5
9911   (eval $ac_link) 2>&5
9912   ac_status=$?
9913   echo "$as_me:9913: \$? = $ac_status" >&5
9914   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9915   { (eval echo "$as_me:9915: \"$ac_try\"") >&5
9916   (eval $ac_try) 2>&5
9917   ac_status=$?
9918   echo "$as_me:9918: \$? = $ac_status" >&5
9919   (exit $ac_status); }; }; then
9920   :
9921 else
9922   echo "$as_me: program exited with status $ac_status" >&5
9923 echo "$as_me: failed program was:" >&5
9924 cat conftest.$ac_ext >&5
9925 ac_cv_header_stdc=no
9926 fi
9927 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
9928 fi
9929 fi
9930 fi
9931 echo "$as_me:9931: result: $ac_cv_header_stdc" >&5
9932 echo "${ECHO_T}$ac_cv_header_stdc" >&6
9933 if test $ac_cv_header_stdc = yes; then
9934
9935 cat >>confdefs.h <<\EOF
9936 #define STDC_HEADERS 1
9937 EOF
9938
9939 fi
9940
9941 ac_header_dirent=no
9942 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
9943   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
9944 echo "$as_me:9944: checking for $ac_hdr that defines DIR" >&5
9945 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
9946 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9947   echo $ECHO_N "(cached) $ECHO_C" >&6
9948 else
9949   cat >conftest.$ac_ext <<_ACEOF
9950 #line 9950 "configure"
9951 #include "confdefs.h"
9952 #include <sys/types.h>
9953 #include <$ac_hdr>
9954
9955 int
9956 main ()
9957 {
9958 if ((DIR *) 0)
9959 return 0;
9960   ;
9961   return 0;
9962 }
9963 _ACEOF
9964 rm -f conftest.$ac_objext
9965 if { (eval echo "$as_me:9965: \"$ac_compile\"") >&5
9966   (eval $ac_compile) 2>&5
9967   ac_status=$?
9968   echo "$as_me:9968: \$? = $ac_status" >&5
9969   (exit $ac_status); } &&
9970          { ac_try='test -s conftest.$ac_objext'
9971   { (eval echo "$as_me:9971: \"$ac_try\"") >&5
9972   (eval $ac_try) 2>&5
9973   ac_status=$?
9974   echo "$as_me:9974: \$? = $ac_status" >&5
9975   (exit $ac_status); }; }; then
9976   eval "$as_ac_Header=yes"
9977 else
9978   echo "$as_me: failed program was:" >&5
9979 cat conftest.$ac_ext >&5
9980 eval "$as_ac_Header=no"
9981 fi
9982 rm -f conftest.$ac_objext conftest.$ac_ext
9983 fi
9984 echo "$as_me:9984: result: `eval echo '${'$as_ac_Header'}'`" >&5
9985 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9986 if test `eval echo '${'$as_ac_Header'}'` = yes; then
9987   cat >>confdefs.h <<EOF
9988 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
9989 EOF
9990
9991 ac_header_dirent=$ac_hdr; break
9992 fi
9993
9994 done
9995 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
9996 if test $ac_header_dirent = dirent.h; then
9997   echo "$as_me:9997: checking for opendir in -ldir" >&5
9998 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
9999 if test "${ac_cv_lib_dir_opendir+set}" = set; then
10000   echo $ECHO_N "(cached) $ECHO_C" >&6
10001 else
10002   ac_check_lib_save_LIBS=$LIBS
10003 LIBS="-ldir  $LIBS"
10004 cat >conftest.$ac_ext <<_ACEOF
10005 #line 10005 "configure"
10006 #include "confdefs.h"
10007
10008 /* Override any gcc2 internal prototype to avoid an error.  */
10009 #ifdef __cplusplus
10010 extern "C"
10011 #endif
10012 /* We use char because int might match the return type of a gcc2
10013    builtin and then its argument prototype would still apply.  */
10014 char opendir ();
10015 int
10016 main ()
10017 {
10018 opendir ();
10019   ;
10020   return 0;
10021 }
10022 _ACEOF
10023 rm -f conftest.$ac_objext conftest$ac_exeext
10024 if { (eval echo "$as_me:10024: \"$ac_link\"") >&5
10025   (eval $ac_link) 2>&5
10026   ac_status=$?
10027   echo "$as_me:10027: \$? = $ac_status" >&5
10028   (exit $ac_status); } &&
10029          { ac_try='test -s conftest$ac_exeext'
10030   { (eval echo "$as_me:10030: \"$ac_try\"") >&5
10031   (eval $ac_try) 2>&5
10032   ac_status=$?
10033   echo "$as_me:10033: \$? = $ac_status" >&5
10034   (exit $ac_status); }; }; then
10035   ac_cv_lib_dir_opendir=yes
10036 else
10037   echo "$as_me: failed program was:" >&5
10038 cat conftest.$ac_ext >&5
10039 ac_cv_lib_dir_opendir=no
10040 fi
10041 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10042 LIBS=$ac_check_lib_save_LIBS
10043 fi
10044 echo "$as_me:10044: result: $ac_cv_lib_dir_opendir" >&5
10045 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
10046 if test $ac_cv_lib_dir_opendir = yes; then
10047   LIBS="$LIBS -ldir"
10048 fi
10049
10050 else
10051   echo "$as_me:10051: checking for opendir in -lx" >&5
10052 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
10053 if test "${ac_cv_lib_x_opendir+set}" = set; then
10054   echo $ECHO_N "(cached) $ECHO_C" >&6
10055 else
10056   ac_check_lib_save_LIBS=$LIBS
10057 LIBS="-lx  $LIBS"
10058 cat >conftest.$ac_ext <<_ACEOF
10059 #line 10059 "configure"
10060 #include "confdefs.h"
10061
10062 /* Override any gcc2 internal prototype to avoid an error.  */
10063 #ifdef __cplusplus
10064 extern "C"
10065 #endif
10066 /* We use char because int might match the return type of a gcc2
10067    builtin and then its argument prototype would still apply.  */
10068 char opendir ();
10069 int
10070 main ()
10071 {
10072 opendir ();
10073   ;
10074   return 0;
10075 }
10076 _ACEOF
10077 rm -f conftest.$ac_objext conftest$ac_exeext
10078 if { (eval echo "$as_me:10078: \"$ac_link\"") >&5
10079   (eval $ac_link) 2>&5
10080   ac_status=$?
10081   echo "$as_me:10081: \$? = $ac_status" >&5
10082   (exit $ac_status); } &&
10083          { ac_try='test -s conftest$ac_exeext'
10084   { (eval echo "$as_me:10084: \"$ac_try\"") >&5
10085   (eval $ac_try) 2>&5
10086   ac_status=$?
10087   echo "$as_me:10087: \$? = $ac_status" >&5
10088   (exit $ac_status); }; }; then
10089   ac_cv_lib_x_opendir=yes
10090 else
10091   echo "$as_me: failed program was:" >&5
10092 cat conftest.$ac_ext >&5
10093 ac_cv_lib_x_opendir=no
10094 fi
10095 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10096 LIBS=$ac_check_lib_save_LIBS
10097 fi
10098 echo "$as_me:10098: result: $ac_cv_lib_x_opendir" >&5
10099 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
10100 if test $ac_cv_lib_x_opendir = yes; then
10101   LIBS="$LIBS -lx"
10102 fi
10103
10104 fi
10105
10106 echo "$as_me:10106: checking whether time.h and sys/time.h may both be included" >&5
10107 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
10108 if test "${ac_cv_header_time+set}" = set; then
10109   echo $ECHO_N "(cached) $ECHO_C" >&6
10110 else
10111   cat >conftest.$ac_ext <<_ACEOF
10112 #line 10112 "configure"
10113 #include "confdefs.h"
10114 #include <sys/types.h>
10115 #include <sys/time.h>
10116 #include <time.h>
10117
10118 int
10119 main ()
10120 {
10121 if ((struct tm *) 0)
10122 return 0;
10123   ;
10124   return 0;
10125 }
10126 _ACEOF
10127 rm -f conftest.$ac_objext
10128 if { (eval echo "$as_me:10128: \"$ac_compile\"") >&5
10129   (eval $ac_compile) 2>&5
10130   ac_status=$?
10131   echo "$as_me:10131: \$? = $ac_status" >&5
10132   (exit $ac_status); } &&
10133          { ac_try='test -s conftest.$ac_objext'
10134   { (eval echo "$as_me:10134: \"$ac_try\"") >&5
10135   (eval $ac_try) 2>&5
10136   ac_status=$?
10137   echo "$as_me:10137: \$? = $ac_status" >&5
10138   (exit $ac_status); }; }; then
10139   ac_cv_header_time=yes
10140 else
10141   echo "$as_me: failed program was:" >&5
10142 cat conftest.$ac_ext >&5
10143 ac_cv_header_time=no
10144 fi
10145 rm -f conftest.$ac_objext conftest.$ac_ext
10146 fi
10147 echo "$as_me:10147: result: $ac_cv_header_time" >&5
10148 echo "${ECHO_T}$ac_cv_header_time" >&6
10149 if test $ac_cv_header_time = yes; then
10150
10151 cat >>confdefs.h <<\EOF
10152 #define TIME_WITH_SYS_TIME 1
10153 EOF
10154
10155 fi
10156
10157 ###     checks for compiler characteristics
10158 ac_ext=c
10159 ac_cpp='$CPP $CPPFLAGS'
10160 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
10161 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
10162 ac_compiler_gnu=$ac_cv_c_compiler_gnu
10163 ac_main_return=return
10164
10165 echo "$as_me:10165: checking for $CC option to accept ANSI C" >&5
10166 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
10167 if test "${ac_cv_prog_cc_stdc+set}" = set; then
10168   echo $ECHO_N "(cached) $ECHO_C" >&6
10169 else
10170   ac_cv_prog_cc_stdc=no
10171 ac_save_CC=$CC
10172 cat >conftest.$ac_ext <<_ACEOF
10173 #line 10173 "configure"
10174 #include "confdefs.h"
10175 #include <stdarg.h>
10176 #include <stdio.h>
10177 #include <sys/types.h>
10178 #include <sys/stat.h>
10179 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
10180 struct buf { int x; };
10181 FILE * (*rcsopen) (struct buf *, struct stat *, int);
10182 static char *e (p, i)
10183      char **p;
10184      int i;
10185 {
10186   return p[i];
10187 }
10188 static char *f (char * (*g) (char **, int), char **p, ...)
10189 {
10190   char *s;
10191   va_list v;
10192   va_start (v,p);
10193   s = g (p, va_arg (v,int));
10194   va_end (v);
10195   return s;
10196 }
10197 int test (int i, double x);
10198 struct s1 {int (*f) (int a);};
10199 struct s2 {int (*f) (double a);};
10200 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
10201 int argc;
10202 char **argv;
10203 int
10204 main ()
10205 {
10206 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
10207   ;
10208   return 0;
10209 }
10210 _ACEOF
10211 # Don't try gcc -ansi; that turns off useful extensions and
10212 # breaks some systems' header files.
10213 # AIX                   -qlanglvl=ansi
10214 # Ultrix and OSF/1      -std1
10215 # HP-UX 10.20 and later -Ae
10216 # HP-UX older versions  -Aa -D_HPUX_SOURCE
10217 # SVR4                  -Xc -D__EXTENSIONS__
10218 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
10219 do
10220   CC="$ac_save_CC $ac_arg"
10221   rm -f conftest.$ac_objext
10222 if { (eval echo "$as_me:10222: \"$ac_compile\"") >&5
10223   (eval $ac_compile) 2>&5
10224   ac_status=$?
10225   echo "$as_me:10225: \$? = $ac_status" >&5
10226   (exit $ac_status); } &&
10227          { ac_try='test -s conftest.$ac_objext'
10228   { (eval echo "$as_me:10228: \"$ac_try\"") >&5
10229   (eval $ac_try) 2>&5
10230   ac_status=$?
10231   echo "$as_me:10231: \$? = $ac_status" >&5
10232   (exit $ac_status); }; }; then
10233   ac_cv_prog_cc_stdc=$ac_arg
10234 break
10235 else
10236   echo "$as_me: failed program was:" >&5
10237 cat conftest.$ac_ext >&5
10238 fi
10239 rm -f conftest.$ac_objext
10240 done
10241 rm -f conftest.$ac_ext conftest.$ac_objext
10242 CC=$ac_save_CC
10243
10244 fi
10245
10246 case "x$ac_cv_prog_cc_stdc" in
10247   x|xno)
10248     echo "$as_me:10248: result: none needed" >&5
10249 echo "${ECHO_T}none needed" >&6 ;;
10250   *)
10251     echo "$as_me:10251: result: $ac_cv_prog_cc_stdc" >&5
10252 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
10253     CC="$CC $ac_cv_prog_cc_stdc" ;;
10254 esac
10255
10256 echo "$as_me:10256: checking for an ANSI C-conforming const" >&5
10257 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
10258 if test "${ac_cv_c_const+set}" = set; then
10259   echo $ECHO_N "(cached) $ECHO_C" >&6
10260 else
10261   cat >conftest.$ac_ext <<_ACEOF
10262 #line 10262 "configure"
10263 #include "confdefs.h"
10264
10265 int
10266 main ()
10267 {
10268 /* FIXME: Include the comments suggested by Paul. */
10269 #ifndef __cplusplus
10270   /* Ultrix mips cc rejects this.  */
10271   typedef int charset[2];
10272   const charset x;
10273   /* SunOS 4.1.1 cc rejects this.  */
10274   char const *const *ccp;
10275   char **p;
10276   /* NEC SVR4.0.2 mips cc rejects this.  */
10277   struct point {int x, y;};
10278   static struct point const zero = {0,0};
10279   /* AIX XL C 1.02.0.0 rejects this.
10280      It does not let you subtract one const X* pointer from another in
10281      an arm of an if-expression whose if-part is not a constant
10282      expression */
10283   const char *g = "string";
10284   ccp = &g + (g ? g-g : 0);
10285   /* HPUX 7.0 cc rejects these. */
10286   ++ccp;
10287   p = (char**) ccp;
10288   ccp = (char const *const *) p;
10289   { /* SCO 3.2v4 cc rejects this.  */
10290     char *t;
10291     char const *s = 0 ? (char *) 0 : (char const *) 0;
10292
10293     *t++ = 0;
10294   }
10295   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
10296     int x[] = {25, 17};
10297     const int *foo = &x[0];
10298     ++foo;
10299   }
10300   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
10301     typedef const int *iptr;
10302     iptr p = 0;
10303     ++p;
10304   }
10305   { /* AIX XL C 1.02.0.0 rejects this saying
10306        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
10307     struct s { int j; const int *ap[3]; };
10308     struct s *b; b->j = 5;
10309   }
10310   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
10311     const int foo = 10;
10312   }
10313 #endif
10314
10315   ;
10316   return 0;
10317 }
10318 _ACEOF
10319 rm -f conftest.$ac_objext
10320 if { (eval echo "$as_me:10320: \"$ac_compile\"") >&5
10321   (eval $ac_compile) 2>&5
10322   ac_status=$?
10323   echo "$as_me:10323: \$? = $ac_status" >&5
10324   (exit $ac_status); } &&
10325          { ac_try='test -s conftest.$ac_objext'
10326   { (eval echo "$as_me:10326: \"$ac_try\"") >&5
10327   (eval $ac_try) 2>&5
10328   ac_status=$?
10329   echo "$as_me:10329: \$? = $ac_status" >&5
10330   (exit $ac_status); }; }; then
10331   ac_cv_c_const=yes
10332 else
10333   echo "$as_me: failed program was:" >&5
10334 cat conftest.$ac_ext >&5
10335 ac_cv_c_const=no
10336 fi
10337 rm -f conftest.$ac_objext conftest.$ac_ext
10338 fi
10339 echo "$as_me:10339: result: $ac_cv_c_const" >&5
10340 echo "${ECHO_T}$ac_cv_c_const" >&6
10341 if test $ac_cv_c_const = no; then
10342
10343 cat >>confdefs.h <<\EOF
10344 #define const
10345 EOF
10346
10347 fi
10348
10349 ###     Checks for external-data
10350
10351 echo "$as_me:10351: checking if data-only library module links" >&5
10352 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
10353 if test "${cf_cv_link_dataonly+set}" = set; then
10354   echo $ECHO_N "(cached) $ECHO_C" >&6
10355 else
10356
10357         rm -f conftest.a
10358         cat >conftest.$ac_ext <<EOF
10359 #line 10359 "configure"
10360 int     testdata[3] = { 123, 456, 789 };
10361 EOF
10362         if { (eval echo "$as_me:10362: \"$ac_compile\"") >&5
10363   (eval $ac_compile) 2>&5
10364   ac_status=$?
10365   echo "$as_me:10365: \$? = $ac_status" >&5
10366   (exit $ac_status); } ; then
10367                 mv conftest.o data.o && \
10368                 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
10369         fi
10370         rm -f conftest.$ac_ext data.o
10371         cat >conftest.$ac_ext <<EOF
10372 #line 10372 "configure"
10373 int     testfunc()
10374 {
10375 #if defined(NeXT)
10376         ${cf_cv_main_return:-return}(1);        /* I'm told this linker is broken */
10377 #else
10378         extern int testdata[3];
10379         return testdata[0] == 123
10380            &&  testdata[1] == 456
10381            &&  testdata[2] == 789;
10382 #endif
10383 }
10384 EOF
10385         if { (eval echo "$as_me:10385: \"$ac_compile\"") >&5
10386   (eval $ac_compile) 2>&5
10387   ac_status=$?
10388   echo "$as_me:10388: \$? = $ac_status" >&5
10389   (exit $ac_status); }; then
10390                 mv conftest.o func.o && \
10391                 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
10392         fi
10393         rm -f conftest.$ac_ext func.o
10394         ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
10395         cf_saveLIBS="$LIBS"
10396         LIBS="conftest.a $LIBS"
10397         if test "$cross_compiling" = yes; then
10398   cf_cv_link_dataonly=unknown
10399 else
10400   cat >conftest.$ac_ext <<_ACEOF
10401 #line 10401 "configure"
10402 #include "confdefs.h"
10403
10404         int main()
10405         {
10406                 extern int testfunc();
10407                 ${cf_cv_main_return:-return} (!testfunc());
10408         }
10409
10410 _ACEOF
10411 rm -f conftest$ac_exeext
10412 if { (eval echo "$as_me:10412: \"$ac_link\"") >&5
10413   (eval $ac_link) 2>&5
10414   ac_status=$?
10415   echo "$as_me:10415: \$? = $ac_status" >&5
10416   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10417   { (eval echo "$as_me:10417: \"$ac_try\"") >&5
10418   (eval $ac_try) 2>&5
10419   ac_status=$?
10420   echo "$as_me:10420: \$? = $ac_status" >&5
10421   (exit $ac_status); }; }; then
10422   cf_cv_link_dataonly=yes
10423 else
10424   echo "$as_me: program exited with status $ac_status" >&5
10425 echo "$as_me: failed program was:" >&5
10426 cat conftest.$ac_ext >&5
10427 cf_cv_link_dataonly=no
10428 fi
10429 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
10430 fi
10431         LIBS="$cf_saveLIBS"
10432
10433 fi
10434
10435 echo "$as_me:10435: result: $cf_cv_link_dataonly" >&5
10436 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
10437
10438 if test "$cf_cv_link_dataonly" = no ; then
10439         cat >>confdefs.h <<\EOF
10440 #define BROKEN_LINKER 1
10441 EOF
10442
10443         BROKEN_LINKER=1
10444 fi
10445
10446 ###     Checks for library functions.
10447
10448 echo "$as_me:10448: checking for working mkstemp" >&5
10449 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
10450 if test "${cf_cv_func_mkstemp+set}" = set; then
10451   echo $ECHO_N "(cached) $ECHO_C" >&6
10452 else
10453
10454 rm -rf conftest*
10455 if test "$cross_compiling" = yes; then
10456   echo "$as_me:10456: checking for mkstemp" >&5
10457 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
10458 if test "${ac_cv_func_mkstemp+set}" = set; then
10459   echo $ECHO_N "(cached) $ECHO_C" >&6
10460 else
10461   cat >conftest.$ac_ext <<_ACEOF
10462 #line 10462 "configure"
10463 #include "confdefs.h"
10464 /* System header to define __stub macros and hopefully few prototypes,
10465     which can conflict with char mkstemp (); below.  */
10466 #include <assert.h>
10467 /* Override any gcc2 internal prototype to avoid an error.  */
10468 #ifdef __cplusplus
10469 extern "C"
10470 #endif
10471 /* We use char because int might match the return type of a gcc2
10472    builtin and then its argument prototype would still apply.  */
10473 char mkstemp ();
10474 char (*f) ();
10475
10476 int
10477 main ()
10478 {
10479 /* The GNU C library defines this for functions which it implements
10480     to always fail with ENOSYS.  Some functions are actually named
10481     something starting with __ and the normal name is an alias.  */
10482 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
10483 choke me
10484 #else
10485 f = mkstemp;
10486 #endif
10487
10488   ;
10489   return 0;
10490 }
10491 _ACEOF
10492 rm -f conftest.$ac_objext conftest$ac_exeext
10493 if { (eval echo "$as_me:10493: \"$ac_link\"") >&5
10494   (eval $ac_link) 2>&5
10495   ac_status=$?
10496   echo "$as_me:10496: \$? = $ac_status" >&5
10497   (exit $ac_status); } &&
10498          { ac_try='test -s 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   ac_cv_func_mkstemp=yes
10505 else
10506   echo "$as_me: failed program was:" >&5
10507 cat conftest.$ac_ext >&5
10508 ac_cv_func_mkstemp=no
10509 fi
10510 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10511 fi
10512 echo "$as_me:10512: result: $ac_cv_func_mkstemp" >&5
10513 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
10514
10515 else
10516   cat >conftest.$ac_ext <<_ACEOF
10517 #line 10517 "configure"
10518 #include "confdefs.h"
10519
10520 #include <sys/types.h>
10521 #include <stdlib.h>
10522 #include <stdio.h>
10523 #include <string.h>
10524 #include <sys/stat.h>
10525 int main()
10526 {
10527         char *tmpl = "conftestXXXXXX";
10528         char name[2][80];
10529         int n;
10530         int result = 0;
10531         int fd;
10532         struct stat sb;
10533
10534         umask(077);
10535         for (n = 0; n < 2; ++n) {
10536                 strcpy(name[n], tmpl);
10537                 if ((fd = mkstemp(name[n])) >= 0) {
10538                         if (!strcmp(name[n], tmpl)
10539                          || stat(name[n], &sb) != 0
10540                          || (sb.st_mode & S_IFMT) != S_IFREG
10541                          || (sb.st_mode & 077) != 0) {
10542                                 result = 1;
10543                         }
10544                         close(fd);
10545                 }
10546         }
10547         if (result == 0
10548          && !strcmp(name[0], name[1]))
10549                 result = 1;
10550         ${cf_cv_main_return:-return}(result);
10551 }
10552
10553 _ACEOF
10554 rm -f conftest$ac_exeext
10555 if { (eval echo "$as_me:10555: \"$ac_link\"") >&5
10556   (eval $ac_link) 2>&5
10557   ac_status=$?
10558   echo "$as_me:10558: \$? = $ac_status" >&5
10559   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
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   cf_cv_func_mkstemp=yes
10566
10567 else
10568   echo "$as_me: program exited with status $ac_status" >&5
10569 echo "$as_me: failed program was:" >&5
10570 cat conftest.$ac_ext >&5
10571 cf_cv_func_mkstemp=no
10572
10573 fi
10574 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
10575 fi
10576
10577 fi
10578 echo "$as_me:10578: result: $cf_cv_func_mkstemp" >&5
10579 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
10580 if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
10581         cat >>confdefs.h <<\EOF
10582 #define HAVE_MKSTEMP 1
10583 EOF
10584
10585 fi
10586
10587 echo "$as_me:10587: checking return type of signal handlers" >&5
10588 echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
10589 if test "${ac_cv_type_signal+set}" = set; then
10590   echo $ECHO_N "(cached) $ECHO_C" >&6
10591 else
10592   cat >conftest.$ac_ext <<_ACEOF
10593 #line 10593 "configure"
10594 #include "confdefs.h"
10595 #include <sys/types.h>
10596 #include <signal.h>
10597 #ifdef signal
10598 # undef signal
10599 #endif
10600 #ifdef __cplusplus
10601 extern "C" void (*signal (int, void (*)(int)))(int);
10602 #else
10603 void (*signal ()) ();
10604 #endif
10605
10606 int
10607 main ()
10608 {
10609 int i;
10610   ;
10611   return 0;
10612 }
10613 _ACEOF
10614 rm -f conftest.$ac_objext
10615 if { (eval echo "$as_me:10615: \"$ac_compile\"") >&5
10616   (eval $ac_compile) 2>&5
10617   ac_status=$?
10618   echo "$as_me:10618: \$? = $ac_status" >&5
10619   (exit $ac_status); } &&
10620          { ac_try='test -s conftest.$ac_objext'
10621   { (eval echo "$as_me:10621: \"$ac_try\"") >&5
10622   (eval $ac_try) 2>&5
10623   ac_status=$?
10624   echo "$as_me:10624: \$? = $ac_status" >&5
10625   (exit $ac_status); }; }; then
10626   ac_cv_type_signal=void
10627 else
10628   echo "$as_me: failed program was:" >&5
10629 cat conftest.$ac_ext >&5
10630 ac_cv_type_signal=int
10631 fi
10632 rm -f conftest.$ac_objext conftest.$ac_ext
10633 fi
10634 echo "$as_me:10634: result: $ac_cv_type_signal" >&5
10635 echo "${ECHO_T}$ac_cv_type_signal" >&6
10636
10637 cat >>confdefs.h <<EOF
10638 #define RETSIGTYPE $ac_cv_type_signal
10639 EOF
10640
10641 if test -z "$cf_user_CFLAGS" && test "$with_no_leaks" = no ; then
10642         CFLAGS=`echo ${CFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
10643         CXXFLAGS=`echo ${CXXFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
10644 fi
10645
10646 if test "$cf_with_ada" != "no" ; then
10647
10648 cf_ada_make=gnatmake
10649 # Extract the first word of "$cf_ada_make", so it can be a program name with args.
10650 set dummy $cf_ada_make; ac_word=$2
10651 echo "$as_me:10651: checking for $ac_word" >&5
10652 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
10653 if test "${ac_cv_prog_gnat_exists+set}" = set; then
10654   echo $ECHO_N "(cached) $ECHO_C" >&6
10655 else
10656   if test -n "$gnat_exists"; then
10657   ac_cv_prog_gnat_exists="$gnat_exists" # Let the user override the test.
10658 else
10659   ac_save_IFS=$IFS; IFS=$ac_path_separator
10660 ac_dummy="$PATH"
10661 for ac_dir in $ac_dummy; do
10662   IFS=$ac_save_IFS
10663   test -z "$ac_dir" && ac_dir=.
10664   $as_executable_p "$ac_dir/$ac_word" || continue
10665 ac_cv_prog_gnat_exists="yes"
10666 echo "$as_me:10666: found $ac_dir/$ac_word" >&5
10667 break
10668 done
10669
10670   test -z "$ac_cv_prog_gnat_exists" && ac_cv_prog_gnat_exists="no"
10671 fi
10672 fi
10673 gnat_exists=$ac_cv_prog_gnat_exists
10674 if test -n "$gnat_exists"; then
10675   echo "$as_me:10675: result: $gnat_exists" >&5
10676 echo "${ECHO_T}$gnat_exists" >&6
10677 else
10678   echo "$as_me:10678: result: no" >&5
10679 echo "${ECHO_T}no" >&6
10680 fi
10681
10682 if test "$ac_cv_prog_gnat_exists" = no; then
10683    cf_ada_make=
10684 else
10685
10686 echo "$as_me:10686: checking for gnat version" >&5
10687 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
10688 cf_gnat_version=`${cf_ada_make:-gnatmake} -v 2>&1 | \
10689         grep '[0-9].[0-9][0-9]*' |\
10690     sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
10691 echo "$as_me:10691: result: $cf_gnat_version" >&5
10692 echo "${ECHO_T}$cf_gnat_version" >&6
10693
10694 case $cf_gnat_version in #(vi
10695 3.1[1-9]*|3.[2-9]*|[4-9].*) #(vi
10696         cf_cv_prog_gnat_correct=yes
10697         ;;
10698 *)
10699         { echo "$as_me:10699: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5
10700 echo "$as_me: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&2;}
10701         cf_cv_prog_gnat_correct=no
10702         ;;
10703 esac
10704
10705 echo "$as_me:10705: checking if GNAT supports generics" >&5
10706 echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6
10707 case $cf_gnat_version in #(vi
10708 3.[1-9]*|[4-9].*) #(vi
10709         cf_gnat_generics=yes
10710         ;;
10711 *)
10712         cf_gnat_generics=no
10713         ;;
10714 esac
10715 echo "$as_me:10715: result: $cf_gnat_generics" >&5
10716 echo "${ECHO_T}$cf_gnat_generics" >&6
10717
10718 if test "$cf_gnat_generics" = yes
10719 then
10720         cf_compile_generics=generics
10721         cf_generic_objects="\${GENOBJS}"
10722 else
10723         cf_compile_generics=
10724         cf_generic_objects=
10725 fi
10726
10727 echo "$as_me:10727: checking if GNAT supports project files" >&5
10728 echo $ECHO_N "checking if GNAT supports project files... $ECHO_C" >&6
10729 case $cf_gnat_version in #(vi
10730 3.[0-9]*) #(vi
10731         cf_gnat_projects=no
10732         ;;
10733 *)
10734         case $cf_cv_system_name in #(vi
10735         cygwin*) #(vi
10736                 cf_gnat_projects=no
10737                 ;;
10738         *)
10739                 cf_gnat_projects=yes
10740                 ;;
10741         esac
10742         ;;
10743 esac
10744 echo "$as_me:10744: result: $cf_gnat_projects" >&5
10745 echo "${ECHO_T}$cf_gnat_projects" >&6
10746
10747 if test "$cf_gnat_projects" = yes
10748 then
10749         USE_OLD_MAKERULES="#"
10750         USE_GNAT_PROJECTS=""
10751 else
10752         USE_OLD_MAKERULES=""
10753         USE_GNAT_PROJECTS="#"
10754 fi
10755
10756    # Extract the first word of "m4", so it can be a program name with args.
10757 set dummy m4; ac_word=$2
10758 echo "$as_me:10758: checking for $ac_word" >&5
10759 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
10760 if test "${ac_cv_prog_M4_exists+set}" = set; then
10761   echo $ECHO_N "(cached) $ECHO_C" >&6
10762 else
10763   if test -n "$M4_exists"; then
10764   ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
10765 else
10766   ac_save_IFS=$IFS; IFS=$ac_path_separator
10767 ac_dummy="$PATH"
10768 for ac_dir in $ac_dummy; do
10769   IFS=$ac_save_IFS
10770   test -z "$ac_dir" && ac_dir=.
10771   $as_executable_p "$ac_dir/$ac_word" || continue
10772 ac_cv_prog_M4_exists="yes"
10773 echo "$as_me:10773: found $ac_dir/$ac_word" >&5
10774 break
10775 done
10776
10777   test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
10778 fi
10779 fi
10780 M4_exists=$ac_cv_prog_M4_exists
10781 if test -n "$M4_exists"; then
10782   echo "$as_me:10782: result: $M4_exists" >&5
10783 echo "${ECHO_T}$M4_exists" >&6
10784 else
10785   echo "$as_me:10785: result: no" >&5
10786 echo "${ECHO_T}no" >&6
10787 fi
10788
10789    if test "$ac_cv_prog_M4_exists" = no; then
10790       cf_cv_prog_gnat_correct=no
10791       echo Ada95 binding required program m4 not found. Ada95 binding disabled.
10792    fi
10793    if test "$cf_cv_prog_gnat_correct" = yes; then
10794       echo "$as_me:10794: checking if GNAT works" >&5
10795 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
10796
10797 rm -rf conftest*
10798 cat >>conftest.ads <<CF_EOF
10799 procedure conftest;
10800 CF_EOF
10801 cat >>conftest.adb <<CF_EOF
10802 with Text_IO;
10803 with GNAT.OS_Lib;
10804 procedure conftest is
10805 begin
10806    Text_IO.Put ("Hello World");
10807    Text_IO.New_Line;
10808    GNAT.OS_Lib.OS_Exit (0);
10809 end conftest;
10810 CF_EOF
10811 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
10812    if ( ./conftest 1>&5 2>&1 ) ; then
10813       cf_cv_prog_gnat_correct=yes
10814    else
10815       cf_cv_prog_gnat_correct=no
10816    fi
10817 else
10818    cf_cv_prog_gnat_correct=no
10819 fi
10820 rm -rf conftest*
10821
10822       echo "$as_me:10822: result: $cf_cv_prog_gnat_correct" >&5
10823 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
10824    fi
10825 fi
10826
10827         if test "$cf_cv_prog_gnat_correct" = yes; then
10828
10829         ADAFLAGS="$ADAFLAGS -O3 -gnatpn"
10830
10831 echo "$as_me:10831: checking if GNAT pragma Unreferenced works" >&5
10832 echo $ECHO_N "checking if GNAT pragma Unreferenced works... $ECHO_C" >&6
10833 if test "${cf_cv_pragma_unreferenced+set}" = set; then
10834   echo $ECHO_N "(cached) $ECHO_C" >&6
10835 else
10836
10837 rm -rf conftest*
10838 cat >>conftest.ads <<CF_EOF
10839 procedure conftest;
10840 CF_EOF
10841 cat >>conftest.adb <<CF_EOF
10842 with Text_IO;
10843 with GNAT.OS_Lib;
10844 procedure conftest is
10845    test : Integer;
10846    pragma Unreferenced (test);
10847 begin
10848    test := 1;
10849    Text_IO.Put ("Hello World");
10850    Text_IO.New_Line;
10851    GNAT.OS_Lib.OS_Exit (0);
10852 end conftest;
10853 CF_EOF
10854 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
10855       cf_cv_pragma_unreferenced=yes
10856 else
10857    cf_cv_pragma_unreferenced=no
10858 fi
10859 rm -rf conftest*
10860
10861 fi
10862 echo "$as_me:10862: result: $cf_cv_pragma_unreferenced" >&5
10863 echo "${ECHO_T}$cf_cv_pragma_unreferenced" >&6
10864
10865 # if the pragma is supported, use it (needed in the Trace code).
10866 if test $cf_cv_pragma_unreferenced = yes ; then
10867         PRAGMA_UNREF=TRUE
10868 else
10869         PRAGMA_UNREF=FALSE
10870 fi
10871
10872 echo "$as_me:10872: checking for ada-compiler" >&5
10873 echo $ECHO_N "checking for ada-compiler... $ECHO_C" >&6
10874
10875 # Check whether --with-ada-compiler or --without-ada-compiler was given.
10876 if test "${with_ada_compiler+set}" = set; then
10877   withval="$with_ada_compiler"
10878   cf_ada_compiler=$withval
10879 else
10880   cf_ada_compiler=gnatmake
10881 fi;
10882
10883 echo "$as_me:10883: result: $cf_ada_compiler" >&5
10884 echo "${ECHO_T}$cf_ada_compiler" >&6
10885
10886                 cf_ada_package=terminal_interface
10887
10888 echo "$as_me:10888: checking for ada-include" >&5
10889 echo $ECHO_N "checking for ada-include... $ECHO_C" >&6
10890
10891 # Check whether --with-ada-include or --without-ada-include was given.
10892 if test "${with_ada_include+set}" = set; then
10893   withval="$with_ada_include"
10894
10895 else
10896   withval="${ADA_INCLUDE:-$prefix/share/ada/adainclude}"
10897 fi; if test -n "$prefix/share/ada/adainclude" ; then
10898
10899 if test "x$prefix" != xNONE; then
10900   cf_path_syntax="$prefix"
10901 else
10902   cf_path_syntax="$ac_default_prefix"
10903 fi
10904
10905 case ".$withval" in #(vi
10906 .\$\(*\)*|.\'*\'*) #(vi
10907   ;;
10908 ..|./*|.\\*) #(vi
10909   ;;
10910 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
10911   ;;
10912 .\${*prefix}*) #(vi
10913   eval withval="$withval"
10914   case ".$withval" in #(vi
10915   .NONE/*)
10916     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
10917     ;;
10918   esac
10919   ;; #(vi
10920 .no|.NONE/*)
10921   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
10922   ;;
10923 *)
10924   { { echo "$as_me:10924: error: expected a pathname, not \"$withval\"" >&5
10925 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
10926    { (exit 1); exit 1; }; }
10927   ;;
10928 esac
10929
10930 fi
10931 ADA_INCLUDE="$withval"
10932
10933 echo "$as_me:10933: result: $ADA_INCLUDE" >&5
10934 echo "${ECHO_T}$ADA_INCLUDE" >&6
10935
10936 echo "$as_me:10936: checking for ada-objects" >&5
10937 echo $ECHO_N "checking for ada-objects... $ECHO_C" >&6
10938
10939 # Check whether --with-ada-objects or --without-ada-objects was given.
10940 if test "${with_ada_objects+set}" = set; then
10941   withval="$with_ada_objects"
10942
10943 else
10944   withval="${ADA_OBJECTS:-$prefix/lib/ada/adalib}"
10945 fi; if test -n "$prefix/lib/ada/adalib" ; then
10946
10947 if test "x$prefix" != xNONE; then
10948   cf_path_syntax="$prefix"
10949 else
10950   cf_path_syntax="$ac_default_prefix"
10951 fi
10952
10953 case ".$withval" in #(vi
10954 .\$\(*\)*|.\'*\'*) #(vi
10955   ;;
10956 ..|./*|.\\*) #(vi
10957   ;;
10958 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
10959   ;;
10960 .\${*prefix}*) #(vi
10961   eval withval="$withval"
10962   case ".$withval" in #(vi
10963   .NONE/*)
10964     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
10965     ;;
10966   esac
10967   ;; #(vi
10968 .no|.NONE/*)
10969   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
10970   ;;
10971 *)
10972   { { echo "$as_me:10972: error: expected a pathname, not \"$withval\"" >&5
10973 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
10974    { (exit 1); exit 1; }; }
10975   ;;
10976 esac
10977
10978 fi
10979 ADA_OBJECTS="$withval"
10980
10981 echo "$as_me:10981: result: $ADA_OBJECTS" >&5
10982 echo "${ECHO_T}$ADA_OBJECTS" >&6
10983
10984 echo "$as_me:10984: checking if an Ada95 shared-library should be built" >&5
10985 echo $ECHO_N "checking if an Ada95 shared-library should be built... $ECHO_C" >&6
10986
10987 # Check whether --with-ada-sharedlib or --without-ada-sharedlib was given.
10988 if test "${with_ada_sharedlib+set}" = set; then
10989   withval="$with_ada_sharedlib"
10990   with_ada_sharedlib=$withval
10991 else
10992   with_ada_sharedlib=no
10993 fi;
10994 echo "$as_me:10994: result: $with_ada_sharedlib" >&5
10995 echo "${ECHO_T}$with_ada_sharedlib" >&6
10996
10997 ADA_SHAREDLIB='lib$(LIB_NAME).so.1'
10998 MAKE_ADA_SHAREDLIB="#"
10999
11000 if test "x$with_ada_sharedlib" != xno
11001 then
11002         MAKE_ADA_SHAREDLIB=
11003         if test "x$with_ada_sharedlib" != xyes
11004         then
11005                 ADA_SHAREDLIB="$with_ada_sharedlib"
11006         fi
11007 fi
11008
11009         fi
11010 fi
11011
11012 ################################################################################
11013
11014 # not needed
11015 TINFO_ARGS2=
11016
11017 ### Construct the list of include-directories to be generated
11018
11019 CPPFLAGS="$CPPFLAGS -I. -I../include"
11020 if test "$srcdir" != "."; then
11021         CPPFLAGS="$CPPFLAGS -I\${srcdir}/../include"
11022 fi
11023 if test "$GCC" != yes; then
11024         CPPFLAGS="$CPPFLAGS -I\${includedir}"
11025 elif test "$includedir" != "/usr/include"; then
11026         if test "$includedir" = '${prefix}/include' ; then
11027                 if test $prefix != /usr ; then
11028                         CPPFLAGS="$CPPFLAGS -I\${includedir}"
11029                 fi
11030         else
11031                 CPPFLAGS="$CPPFLAGS -I\${includedir}"
11032         fi
11033 fi
11034
11035 ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
11036 if test "$srcdir" != "."; then
11037         ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
11038 fi
11039 if test "$GCC" != yes; then
11040         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
11041 elif test "$includedir" != "/usr/include"; then
11042         if test "$includedir" = '${prefix}/include' ; then
11043                 if test $prefix != /usr ; then
11044                         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
11045                 fi
11046         else
11047                 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
11048         fi
11049 fi
11050
11051 ### Build up pieces for makefile rules
11052 echo "$as_me:11052: checking default library suffix" >&5
11053 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
11054
11055         case $DFT_LWR_MODEL in
11056         libtool) DFT_ARG_SUFFIX=''   ;;
11057         normal)  DFT_ARG_SUFFIX=''   ;;
11058         debug)   DFT_ARG_SUFFIX='_g' ;;
11059         profile) DFT_ARG_SUFFIX='_p' ;;
11060         shared)  DFT_ARG_SUFFIX=''   ;;
11061         esac
11062         test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
11063 echo "$as_me:11063: result: $DFT_ARG_SUFFIX" >&5
11064 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
11065
11066 echo "$as_me:11066: checking default library-dependency suffix" >&5
11067 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
11068
11069         case $DFT_LWR_MODEL in #(vi
11070         libtool) #(vi
11071                 DFT_LIB_SUFFIX='.la'
11072                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
11073                 ;;
11074         normal) #(vi
11075                 DFT_LIB_SUFFIX='.a'
11076                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
11077                 ;;
11078         debug) #(vi
11079                 DFT_LIB_SUFFIX='_g.a'
11080                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
11081                 ;;
11082         profile) #(vi
11083                 DFT_LIB_SUFFIX='_p.a'
11084                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
11085                 ;;
11086         shared) #(vi
11087                 case $cf_cv_system_name in
11088                 aix[56]*) #(vi
11089                         DFT_LIB_SUFFIX='.a'
11090                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
11091                         ;;
11092                 cygwin*) #(vi
11093                         DFT_LIB_SUFFIX='.dll'
11094                         DFT_DEP_SUFFIX='.dll.a'
11095                         ;;
11096                 darwin*) #(vi
11097                         DFT_LIB_SUFFIX='.dylib'
11098                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
11099                         ;;
11100                 hpux*) #(vi
11101                         case $target in
11102                         ia64*) #(vi
11103                                 DFT_LIB_SUFFIX='.so'
11104                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
11105                                 ;;
11106                         *) #(vi
11107                                 DFT_LIB_SUFFIX='.sl'
11108                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
11109                                 ;;
11110                         esac
11111                         ;;
11112                 *)      DFT_LIB_SUFFIX='.so'
11113                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
11114                         ;;
11115                 esac
11116         esac
11117         test -n "$LIB_SUFFIX" && DFT_LIB_SUFFIX="${LIB_SUFFIX}${DFT_LIB_SUFFIX}"
11118         test -n "$LIB_SUFFIX" && DFT_DEP_SUFFIX="${LIB_SUFFIX}${DFT_DEP_SUFFIX}"
11119 echo "$as_me:11119: result: $DFT_DEP_SUFFIX" >&5
11120 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
11121
11122 echo "$as_me:11122: checking default object directory" >&5
11123 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
11124
11125         case $DFT_LWR_MODEL in
11126         libtool) DFT_OBJ_SUBDIR='obj_lo'  ;;
11127         normal)  DFT_OBJ_SUBDIR='objects' ;;
11128         debug)   DFT_OBJ_SUBDIR='obj_g' ;;
11129         profile) DFT_OBJ_SUBDIR='obj_p' ;;
11130         shared)
11131                 case $cf_cv_system_name in #(vi
11132                 cygwin) #(vi
11133                         DFT_OBJ_SUBDIR='objects' ;;
11134                 *)
11135                         DFT_OBJ_SUBDIR='obj_s' ;;
11136                 esac
11137         esac
11138 echo "$as_me:11138: result: $DFT_OBJ_SUBDIR" >&5
11139 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
11140
11141 ### Set up low-level terminfo dependencies for makefiles.
11142
11143 if test "$DFT_LWR_MODEL" = shared ; then
11144         case $cf_cv_system_name in #(vi
11145         cygwin*)
11146                 # "lib" files have ".dll.a" suffix, "cyg" files have ".dll"
11147                 ;;
11148         esac
11149 fi
11150
11151 ### Construct the list of subdirectories for which we'll customize makefiles
11152 ### with the appropriate compile-rules.
11153
11154 SUB_MAKEFILES="gen/adacurses${DFT_ARG_SUFFIX}-config:gen/adacurses-config.in"
11155
11156 cat >>confdefs.h <<EOF
11157 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
11158 EOF
11159
11160 ### Now that we're done running tests, add the compiler-warnings, if any
11161
11162 cf_fix_cppflags=no
11163 cf_new_cflags=
11164 cf_new_cppflags=
11165 cf_new_extra_cppflags=
11166
11167 for cf_add_cflags in $EXTRA_CFLAGS
11168 do
11169 case $cf_fix_cppflags in
11170 no)
11171         case $cf_add_cflags in #(vi
11172         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
11173                 case $cf_add_cflags in
11174                 -D*)
11175                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11176
11177                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11178                                 && test -z "${cf_tst_cflags}" \
11179                                 && cf_fix_cppflags=yes
11180
11181                         if test $cf_fix_cppflags = yes ; then
11182                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11183                                 continue
11184                         elif test "${cf_tst_cflags}" = "\"'" ; then
11185                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11186                                 continue
11187                         fi
11188                         ;;
11189                 esac
11190                 case "$CPPFLAGS" in
11191                 *$cf_add_cflags) #(vi
11192                         ;;
11193                 *) #(vi
11194                         case $cf_add_cflags in #(vi
11195                         -D*)
11196                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11197
11198 CPPFLAGS=`echo "$CPPFLAGS" | \
11199         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11200                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11201
11202                                 ;;
11203                         esac
11204                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11205                         ;;
11206                 esac
11207                 ;;
11208         *)
11209                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11210                 ;;
11211         esac
11212         ;;
11213 yes)
11214         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11215
11216         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11217
11218         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11219                 && test -z "${cf_tst_cflags}" \
11220                 && cf_fix_cppflags=no
11221         ;;
11222 esac
11223 done
11224
11225 if test -n "$cf_new_cflags" ; then
11226
11227         CFLAGS="$CFLAGS $cf_new_cflags"
11228 fi
11229
11230 if test -n "$cf_new_cppflags" ; then
11231
11232         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
11233 fi
11234
11235 if test -n "$cf_new_extra_cppflags" ; then
11236
11237         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11238 fi
11239
11240 ################################################################################
11241
11242 if test x"$enable_pc_files" = xyes ; then \
11243 SUB_MAKEFILES="$SUB_MAKEFILES misc/gen-pkgconfig:misc/gen-pkgconfig.in"
11244 MAKE_PC_FILES=
11245 else
11246 MAKE_PC_FILES="#"
11247 fi
11248
11249 ################################################################################
11250
11251 TEST_ARG2=
11252
11253 TEST_LIBS2=
11254
11255 NCURSES_SHLIB2="sh -c"
11256
11257 ADA_SUBDIRS="include gen src"
11258 if test "x$cf_with_tests" != "xno" ; then
11259         ADA_SUBDIRS="$ADA_SUBDIRS samples"
11260 fi
11261 for cf_dir in $ADA_SUBDIRS
11262 do
11263         SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
11264 done
11265
11266 NCURSES_TREE="#"
11267
11268 EXTERNAL_TREE=
11269
11270 ac_config_files="$ac_config_files $SUB_MAKEFILES Makefile"
11271 ac_config_commands="$ac_config_commands default"
11272 cat >confcache <<\_ACEOF
11273 # This file is a shell script that caches the results of configure
11274 # tests run on this system so they can be shared between configure
11275 # scripts and configure runs, see configure's option --config-cache.
11276 # It is not useful on other systems.  If it contains results you don't
11277 # want to keep, you may remove or edit it.
11278 #
11279 # config.status only pays attention to the cache file if you give it
11280 # the --recheck option to rerun configure.
11281 #
11282 # `ac_cv_env_foo' variables (set or unset) will be overriden when
11283 # loading this file, other *unset* `ac_cv_foo' will be assigned the
11284 # following values.
11285
11286 _ACEOF
11287
11288 # The following way of writing the cache mishandles newlines in values,
11289 # but we know of no workaround that is simple, portable, and efficient.
11290 # So, don't put newlines in cache variables' values.
11291 # Ultrix sh set writes to stderr and can't be redirected directly,
11292 # and sets the high bit in the cache file unless we assign to the vars.
11293 {
11294   (set) 2>&1 |
11295     case `(ac_space=' '; set | grep ac_space) 2>&1` in
11296     *ac_space=\ *)
11297       # `set' does not quote correctly, so add quotes (double-quote
11298       # substitution turns \\\\ into \\, and sed turns \\ into \).
11299       sed -n \
11300         "s/'/'\\\\''/g;
11301           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
11302       ;;
11303     *)
11304       # `set' quotes correctly as required by POSIX, so do not add quotes.
11305       sed -n \
11306         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
11307       ;;
11308     esac;
11309 } |
11310   sed '
11311      t clear
11312      : clear
11313      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
11314      t end
11315      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
11316      : end' >>confcache
11317 if cmp -s $cache_file confcache; then :; else
11318   if test -w $cache_file; then
11319     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
11320     cat confcache >$cache_file
11321   else
11322     echo "not updating unwritable cache $cache_file"
11323   fi
11324 fi
11325 rm -f confcache
11326
11327 test "x$prefix" = xNONE && prefix=$ac_default_prefix
11328 # Let make expand exec_prefix.
11329 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
11330
11331 # VPATH may cause trouble with some makes, so we remove $(srcdir),
11332 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
11333 # trailing colons and then remove the whole line if VPATH becomes empty
11334 # (actually we leave an empty line to preserve line numbers).
11335 if test "x$srcdir" = x.; then
11336   ac_vpsub='/^[         ]*VPATH[        ]*=/{
11337 s/:*\$(srcdir):*/:/;
11338 s/:*\${srcdir}:*/:/;
11339 s/:*@srcdir@:*/:/;
11340 s/^\([^=]*=[    ]*\):*/\1/;
11341 s/:*$//;
11342 s/^[^=]*=[      ]*$//;
11343 }'
11344 fi
11345
11346 DEFS=-DHAVE_CONFIG_H
11347
11348 : ${CONFIG_STATUS=./config.status}
11349 ac_clean_files_save=$ac_clean_files
11350 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
11351 { echo "$as_me:11351: creating $CONFIG_STATUS" >&5
11352 echo "$as_me: creating $CONFIG_STATUS" >&6;}
11353 cat >$CONFIG_STATUS <<_ACEOF
11354 #! $SHELL
11355 # Generated automatically by configure.
11356 # Run this file to recreate the current configuration.
11357 # Compiler output produced by configure, useful for debugging
11358 # configure, is in config.log if it exists.
11359
11360 debug=false
11361 SHELL=\${CONFIG_SHELL-$SHELL}
11362 ac_cs_invocation="\$0 \$@"
11363
11364 _ACEOF
11365
11366 cat >>$CONFIG_STATUS <<\_ACEOF
11367 # Be Bourne compatible
11368 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
11369   emulate sh
11370   NULLCMD=:
11371 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
11372   set -o posix
11373 fi
11374
11375 # Name of the executable.
11376 as_me=`echo "$0" |sed 's,.*[\\/],,'`
11377
11378 if expr a : '\(a\)' >/dev/null 2>&1; then
11379   as_expr=expr
11380 else
11381   as_expr=false
11382 fi
11383
11384 rm -f conf$$ conf$$.exe conf$$.file
11385 echo >conf$$.file
11386 if ln -s conf$$.file conf$$ 2>/dev/null; then
11387   # We could just check for DJGPP; but this test a) works b) is more generic
11388   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
11389   if test -f conf$$.exe; then
11390     # Don't use ln at all; we don't have any links
11391     as_ln_s='cp -p'
11392   else
11393     as_ln_s='ln -s'
11394   fi
11395 elif ln conf$$.file conf$$ 2>/dev/null; then
11396   as_ln_s=ln
11397 else
11398   as_ln_s='cp -p'
11399 fi
11400 rm -f conf$$ conf$$.exe conf$$.file
11401
11402 as_executable_p="test -f"
11403
11404 # Support unset when possible.
11405 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
11406   as_unset=unset
11407 else
11408   as_unset=false
11409 fi
11410
11411 # NLS nuisances.
11412 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
11413 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
11414 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
11415 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
11416 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
11417 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
11418 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
11419 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
11420
11421 # IFS
11422 # We need space, tab and new line, in precisely that order.
11423 as_nl='
11424 '
11425 IFS="   $as_nl"
11426
11427 # CDPATH.
11428 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
11429
11430 exec 6>&1
11431
11432 _ACEOF
11433
11434 # Files that config.status was made for.
11435 if test -n "$ac_config_files"; then
11436   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
11437 fi
11438
11439 if test -n "$ac_config_headers"; then
11440   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
11441 fi
11442
11443 if test -n "$ac_config_links"; then
11444   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
11445 fi
11446
11447 if test -n "$ac_config_commands"; then
11448   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
11449 fi
11450
11451 cat >>$CONFIG_STATUS <<\EOF
11452
11453 ac_cs_usage="\
11454 \`$as_me' instantiates files from templates according to the
11455 current configuration.
11456
11457 Usage: $0 [OPTIONS] [FILE]...
11458
11459   -h, --help       print this help, then exit
11460   -V, --version    print version number, then exit
11461   -d, --debug      don't remove temporary files
11462       --recheck    update $as_me by reconfiguring in the same conditions
11463   --file=FILE[:TEMPLATE]
11464                    instantiate the configuration file FILE
11465   --header=FILE[:TEMPLATE]
11466                    instantiate the configuration header FILE
11467
11468 Configuration files:
11469 $config_files
11470
11471 Configuration headers:
11472 $config_headers
11473
11474 Configuration commands:
11475 $config_commands
11476
11477 Report bugs to <dickey@invisible-island.net>."
11478 EOF
11479
11480 cat >>$CONFIG_STATUS <<EOF
11481 ac_cs_version="\\
11482 config.status
11483 configured by $0, generated by GNU Autoconf 2.52.20101001,
11484   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
11485
11486 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
11487 Free Software Foundation, Inc.
11488 This config.status script is free software; the Free Software Foundation
11489 gives unlimited permission to copy, distribute and modify it."
11490 srcdir=$srcdir
11491 INSTALL="$INSTALL"
11492 EOF
11493
11494 cat >>$CONFIG_STATUS <<\EOF
11495 # If no file are specified by the user, then we need to provide default
11496 # value.  By we need to know if files were specified by the user.
11497 ac_need_defaults=:
11498 while test $# != 0
11499 do
11500   case $1 in
11501   --*=*)
11502     ac_option=`expr "x$1" : 'x\([^=]*\)='`
11503     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
11504     shift
11505     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
11506     shift
11507     ;;
11508   -*);;
11509   *) # This is not an option, so the user has probably given explicit
11510      # arguments.
11511      ac_need_defaults=false;;
11512   esac
11513
11514   case $1 in
11515   # Handling of the options.
11516 EOF
11517 cat >>$CONFIG_STATUS <<EOF
11518   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
11519     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
11520     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
11521 EOF
11522 cat >>$CONFIG_STATUS <<\EOF
11523   --version | --vers* | -V )
11524     echo "$ac_cs_version"; exit 0 ;;
11525   --he | --h)
11526     # Conflict between --help and --header
11527     { { echo "$as_me:11527: error: ambiguous option: $1
11528 Try \`$0 --help' for more information." >&5
11529 echo "$as_me: error: ambiguous option: $1
11530 Try \`$0 --help' for more information." >&2;}
11531    { (exit 1); exit 1; }; };;
11532   --help | --hel | -h )
11533     echo "$ac_cs_usage"; exit 0 ;;
11534   --debug | --d* | -d )
11535     debug=: ;;
11536   --file | --fil | --fi | --f )
11537     shift
11538     CONFIG_FILES="$CONFIG_FILES $1"
11539     ac_need_defaults=false;;
11540   --header | --heade | --head | --hea )
11541     shift
11542     CONFIG_HEADERS="$CONFIG_HEADERS $1"
11543     ac_need_defaults=false;;
11544
11545   # This is an error.
11546   -*) { { echo "$as_me:11546: error: unrecognized option: $1
11547 Try \`$0 --help' for more information." >&5
11548 echo "$as_me: error: unrecognized option: $1
11549 Try \`$0 --help' for more information." >&2;}
11550    { (exit 1); exit 1; }; } ;;
11551
11552   *) ac_config_targets="$ac_config_targets $1" ;;
11553
11554   esac
11555   shift
11556 done
11557
11558 exec 5>>config.log
11559 cat >&5 << _ACEOF
11560
11561 ## ----------------------- ##
11562 ## Running config.status.  ##
11563 ## ----------------------- ##
11564
11565 This file was extended by $as_me 2.52.20101001, executed with
11566   CONFIG_FILES    = $CONFIG_FILES
11567   CONFIG_HEADERS  = $CONFIG_HEADERS
11568   CONFIG_LINKS    = $CONFIG_LINKS
11569   CONFIG_COMMANDS = $CONFIG_COMMANDS
11570   > $ac_cs_invocation
11571 on `(hostname || uname -n) 2>/dev/null | sed 1q`
11572
11573 _ACEOF
11574 EOF
11575
11576 cat >>$CONFIG_STATUS <<EOF
11577 #
11578 # INIT-COMMANDS section.
11579 #
11580
11581 ### Special initialization commands, used to pass information from the
11582 ### configuration-run into config.status
11583
11584 AWK="$AWK"
11585 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
11586 DFT_LWR_MODEL="$DFT_LWR_MODEL"
11587 ECHO_LINK="$ECHO_LINK"
11588 LIB_NAME="$LIB_NAME"
11589 LIB_SUFFIX="$LIB_SUFFIX"
11590 LN_S="$LN_S"
11591 NCURSES_MAJOR="$NCURSES_MAJOR"
11592 NCURSES_MINOR="$NCURSES_MINOR"
11593 NCURSES_PATCH="$NCURSES_PATCH"
11594 USE_OLD_MAKERULES="$USE_OLD_MAKERULES"
11595 cf_cv_abi_version="$cf_cv_abi_version"
11596 cf_cv_rel_version="$cf_cv_rel_version"
11597 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
11598 cf_cv_shared_soname='$cf_cv_shared_soname'
11599 cf_cv_shlib_version="$cf_cv_shlib_version"
11600 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
11601 cf_cv_system_name="$cf_cv_system_name"
11602 host="$host"
11603 target="$target"
11604
11605 EOF
11606
11607 cat >>$CONFIG_STATUS <<\EOF
11608 for ac_config_target in $ac_config_targets
11609 do
11610   case "$ac_config_target" in
11611   # Handling of arguments.
11612   "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
11613   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
11614   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
11615   "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
11616   *) { { echo "$as_me:11616: error: invalid argument: $ac_config_target" >&5
11617 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
11618    { (exit 1); exit 1; }; };;
11619   esac
11620 done
11621
11622 # If the user did not use the arguments to specify the items to instantiate,
11623 # then the envvar interface is used.  Set only those that are not.
11624 # We use the long form for the default assignment because of an extremely
11625 # bizarre bug on SunOS 4.1.3.
11626 if $ac_need_defaults; then
11627   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
11628   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
11629   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
11630 fi
11631
11632 # Create a temporary directory, and hook for its removal unless debugging.
11633 $debug ||
11634 {
11635   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
11636   trap '{ (exit 1); exit 1; }' 1 2 13 15
11637 }
11638
11639 # Create a (secure) tmp directory for tmp files.
11640 : ${TMPDIR=/tmp}
11641 {
11642   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
11643   test -n "$tmp" && test -d "$tmp"
11644 }  ||
11645 {
11646   tmp=$TMPDIR/cs$$-$RANDOM
11647   (umask 077 && mkdir $tmp)
11648 } ||
11649 {
11650    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
11651    { (exit 1); exit 1; }
11652 }
11653
11654 EOF
11655
11656 cat >>$CONFIG_STATUS <<EOF
11657
11658 #
11659 # CONFIG_FILES section.
11660 #
11661
11662 # No need to generate the scripts if there are no CONFIG_FILES.
11663 # This happens for instance when ./config.status config.h
11664 if test -n "\$CONFIG_FILES"; then
11665   # Protect against being on the right side of a sed subst in config.status.
11666   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
11667    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
11668 s,@SHELL@,$SHELL,;t t
11669 s,@exec_prefix@,$exec_prefix,;t t
11670 s,@prefix@,$prefix,;t t
11671 s,@program_transform_name@,$program_transform_name,;t t
11672 s,@bindir@,$bindir,;t t
11673 s,@sbindir@,$sbindir,;t t
11674 s,@libexecdir@,$libexecdir,;t t
11675 s,@datadir@,$datadir,;t t
11676 s,@sysconfdir@,$sysconfdir,;t t
11677 s,@sharedstatedir@,$sharedstatedir,;t t
11678 s,@localstatedir@,$localstatedir,;t t
11679 s,@libdir@,$libdir,;t t
11680 s,@includedir@,$includedir,;t t
11681 s,@oldincludedir@,$oldincludedir,;t t
11682 s,@infodir@,$infodir,;t t
11683 s,@mandir@,$mandir,;t t
11684 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
11685 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
11686 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
11687 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
11688 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
11689 s,@build_alias@,$build_alias,;t t
11690 s,@host_alias@,$host_alias,;t t
11691 s,@target_alias@,$target_alias,;t t
11692 s,@ECHO_C@,$ECHO_C,;t t
11693 s,@ECHO_N@,$ECHO_N,;t t
11694 s,@ECHO_T@,$ECHO_T,;t t
11695 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
11696 s,@DEFS@,$DEFS,;t t
11697 s,@LIBS@,$LIBS,;t t
11698 s,@top_builddir@,$top_builddir,;t t
11699 s,@build@,$build,;t t
11700 s,@build_cpu@,$build_cpu,;t t
11701 s,@build_vendor@,$build_vendor,;t t
11702 s,@build_os@,$build_os,;t t
11703 s,@host@,$host,;t t
11704 s,@host_cpu@,$host_cpu,;t t
11705 s,@host_vendor@,$host_vendor,;t t
11706 s,@host_os@,$host_os,;t t
11707 s,@target@,$target,;t t
11708 s,@target_cpu@,$target_cpu,;t t
11709 s,@target_vendor@,$target_vendor,;t t
11710 s,@target_os@,$target_os,;t t
11711 s,@CC@,$CC,;t t
11712 s,@CFLAGS@,$CFLAGS,;t t
11713 s,@LDFLAGS@,$LDFLAGS,;t t
11714 s,@CPPFLAGS@,$CPPFLAGS,;t t
11715 s,@ac_ct_CC@,$ac_ct_CC,;t t
11716 s,@EXEEXT@,$EXEEXT,;t t
11717 s,@OBJEXT@,$OBJEXT,;t t
11718 s,@CPP@,$CPP,;t t
11719 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
11720 s,@PROG_EXT@,$PROG_EXT,;t t
11721 s,@AWK@,$AWK,;t t
11722 s,@EGREP@,$EGREP,;t t
11723 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
11724 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
11725 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
11726 s,@LN_S@,$LN_S,;t t
11727 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
11728 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
11729 s,@SET_MAKE@,$SET_MAKE,;t t
11730 s,@CTAGS@,$CTAGS,;t t
11731 s,@ETAGS@,$ETAGS,;t t
11732 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
11733 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
11734 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
11735 s,@RANLIB@,$RANLIB,;t t
11736 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
11737 s,@LD@,$LD,;t t
11738 s,@ac_ct_LD@,$ac_ct_LD,;t t
11739 s,@AR@,$AR,;t t
11740 s,@ac_ct_AR@,$ac_ct_AR,;t t
11741 s,@ARFLAGS@,$ARFLAGS,;t t
11742 s,@DESTDIR@,$DESTDIR,;t t
11743 s,@BUILD_CC@,$BUILD_CC,;t t
11744 s,@BUILD_CPP@,$BUILD_CPP,;t t
11745 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
11746 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
11747 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
11748 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
11749 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
11750 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
11751 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
11752 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
11753 s,@NCURSES_CONFIG@,$NCURSES_CONFIG,;t t
11754 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
11755 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
11756 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
11757 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
11758 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
11759 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
11760 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
11761 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
11762 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
11763 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
11764 s,@CC_G_OPT@,$CC_G_OPT,;t t
11765 s,@LD_MODEL@,$LD_MODEL,;t t
11766 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
11767 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
11768 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
11769 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
11770 s,@LINK_PROGS@,$LINK_PROGS,;t t
11771 s,@LINK_TESTS@,$LINK_TESTS,;t t
11772 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
11773 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
11774 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
11775 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
11776 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
11777 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
11778 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
11779 s,@PTHREAD@,$PTHREAD,;t t
11780 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
11781 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
11782 s,@ECHO_LINK@,$ECHO_LINK,;t t
11783 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
11784 s,@ADA_TRACE@,$ADA_TRACE,;t t
11785 s,@gnat_exists@,$gnat_exists,;t t
11786 s,@cf_compile_generics@,$cf_compile_generics,;t t
11787 s,@cf_generic_objects@,$cf_generic_objects,;t t
11788 s,@USE_OLD_MAKERULES@,$USE_OLD_MAKERULES,;t t
11789 s,@USE_GNAT_PROJECTS@,$USE_GNAT_PROJECTS,;t t
11790 s,@M4_exists@,$M4_exists,;t t
11791 s,@cf_ada_make@,$cf_ada_make,;t t
11792 s,@ADAFLAGS@,$ADAFLAGS,;t t
11793 s,@PRAGMA_UNREF@,$PRAGMA_UNREF,;t t
11794 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
11795 s,@cf_ada_package@,$cf_ada_package,;t t
11796 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
11797 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
11798 s,@ADA_SHAREDLIB@,$ADA_SHAREDLIB,;t t
11799 s,@MAKE_ADA_SHAREDLIB@,$MAKE_ADA_SHAREDLIB,;t t
11800 s,@TINFO_ARGS2@,$TINFO_ARGS2,;t t
11801 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
11802 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
11803 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
11804 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
11805 s,@MAKE_PC_FILES@,$MAKE_PC_FILES,;t t
11806 s,@cross_compiling@,$cross_compiling,;t t
11807 s,@TEST_ARG2@,$TEST_ARG2,;t t
11808 s,@TEST_LIBS2@,$TEST_LIBS2,;t t
11809 s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
11810 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
11811 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
11812 s,@EXTERNAL_TREE@,$EXTERNAL_TREE,;t t
11813 CEOF
11814
11815 EOF
11816
11817   cat >>$CONFIG_STATUS <<\EOF
11818   # Split the substitutions into bite-sized pieces for seds with
11819   # small command number limits, like on Digital OSF/1 and HP-UX.
11820   ac_max_sed_lines=48
11821   ac_sed_frag=1 # Number of current file.
11822   ac_beg=1 # First line for current file.
11823   ac_end=$ac_max_sed_lines # Line after last line for current file.
11824   ac_more_lines=:
11825   ac_sed_cmds=
11826   while $ac_more_lines; do
11827     if test $ac_beg -gt 1; then
11828       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
11829     else
11830       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
11831     fi
11832     if test ! -s $tmp/subs.frag; then
11833       ac_more_lines=false
11834     else
11835       # The purpose of the label and of the branching condition is to
11836       # speed up the sed processing (if there are no `@' at all, there
11837       # is no need to browse any of the substitutions).
11838       # These are the two extra sed commands mentioned above.
11839       (echo ':t
11840   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
11841       if test -z "$ac_sed_cmds"; then
11842         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
11843       else
11844         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
11845       fi
11846       ac_sed_frag=`expr $ac_sed_frag + 1`
11847       ac_beg=$ac_end
11848       ac_end=`expr $ac_end + $ac_max_sed_lines`
11849     fi
11850   done
11851   if test -z "$ac_sed_cmds"; then
11852     ac_sed_cmds=cat
11853   fi
11854 fi # test -n "$CONFIG_FILES"
11855
11856 EOF
11857 cat >>$CONFIG_STATUS <<\EOF
11858 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
11859   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
11860   case $ac_file in
11861   - | *:- | *:-:* ) # input from stdin
11862         cat >$tmp/stdin
11863         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
11864         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
11865   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
11866         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
11867   * )   ac_file_in=$ac_file.in ;;
11868   esac
11869
11870   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
11871   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
11872          X"$ac_file" : 'X\(//\)[^/]' \| \
11873          X"$ac_file" : 'X\(//\)$' \| \
11874          X"$ac_file" : 'X\(/\)' \| \
11875          .     : '\(.\)' 2>/dev/null ||
11876 echo X"$ac_file" |
11877     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
11878           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
11879           /^X\(\/\/\)$/{ s//\1/; q; }
11880           /^X\(\/\).*/{ s//\1/; q; }
11881           s/.*/./; q'`
11882   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
11883     { case "$ac_dir" in
11884   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
11885   *)                      as_incr_dir=.;;
11886 esac
11887 as_dummy="$ac_dir"
11888 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
11889   case $as_mkdir_dir in
11890     # Skip DOS drivespec
11891     ?:) as_incr_dir=$as_mkdir_dir ;;
11892     *)
11893       as_incr_dir=$as_incr_dir/$as_mkdir_dir
11894       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
11895     ;;
11896   esac
11897 done; }
11898
11899     ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
11900     # A "../" for each directory in $ac_dir_suffix.
11901     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
11902   else
11903     ac_dir_suffix= ac_dots=
11904   fi
11905
11906   case $srcdir in
11907   .)  ac_srcdir=.
11908       if test -z "$ac_dots"; then
11909          ac_top_srcdir=.
11910       else
11911          ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
11912       fi ;;
11913   [\\/]* | ?:[\\/]* )
11914       ac_srcdir=$srcdir$ac_dir_suffix;
11915       ac_top_srcdir=$srcdir ;;
11916   *) # Relative path.
11917     ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
11918     ac_top_srcdir=$ac_dots$srcdir ;;
11919   esac
11920
11921   case $INSTALL in
11922   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
11923   *) ac_INSTALL=$ac_dots$INSTALL ;;
11924   esac
11925
11926   if test x"$ac_file" != x-; then
11927     { echo "$as_me:11927: creating $ac_file" >&5
11928 echo "$as_me: creating $ac_file" >&6;}
11929     rm -f "$ac_file"
11930   fi
11931   # Let's still pretend it is `configure' which instantiates (i.e., don't
11932   # use $as_me), people would be surprised to read:
11933   #    /* config.h.  Generated automatically by config.status.  */
11934   configure_input="Generated automatically from `echo $ac_file_in |
11935                                                  sed 's,.*/,,'` by configure."
11936
11937   # First look for the input files in the build tree, otherwise in the
11938   # src tree.
11939   ac_file_inputs=`IFS=:
11940     for f in $ac_file_in; do
11941       case $f in
11942       -) echo $tmp/stdin ;;
11943       [\\/$]*)
11944          # Absolute (can't be DOS-style, as IFS=:)
11945          test -f "$f" || { { echo "$as_me:11945: error: cannot find input file: $f" >&5
11946 echo "$as_me: error: cannot find input file: $f" >&2;}
11947    { (exit 1); exit 1; }; }
11948          echo $f;;
11949       *) # Relative
11950          if test -f "$f"; then
11951            # Build tree
11952            echo $f
11953          elif test -f "$srcdir/$f"; then
11954            # Source tree
11955            echo $srcdir/$f
11956          else
11957            # /dev/null tree
11958            { { echo "$as_me:11958: error: cannot find input file: $f" >&5
11959 echo "$as_me: error: cannot find input file: $f" >&2;}
11960    { (exit 1); exit 1; }; }
11961          fi;;
11962       esac
11963     done` || { (exit 1); exit 1; }
11964 EOF
11965 cat >>$CONFIG_STATUS <<EOF
11966   sed "$ac_vpsub
11967 $extrasub
11968 EOF
11969 cat >>$CONFIG_STATUS <<\EOF
11970 :t
11971 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
11972 s,@configure_input@,$configure_input,;t t
11973 s,@srcdir@,$ac_srcdir,;t t
11974 s,@top_srcdir@,$ac_top_srcdir,;t t
11975 s,@INSTALL@,$ac_INSTALL,;t t
11976 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
11977   rm -f $tmp/stdin
11978   if test x"$ac_file" != x-; then
11979     mv $tmp/out $ac_file
11980   else
11981     cat $tmp/out
11982     rm -f $tmp/out
11983   fi
11984
11985 done
11986 EOF
11987 cat >>$CONFIG_STATUS <<\EOF
11988
11989 #
11990 # CONFIG_HEADER section.
11991 #
11992
11993 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
11994 # NAME is the cpp macro being defined and VALUE is the value it is being given.
11995 #
11996 # ac_d sets the value in "#define NAME VALUE" lines.
11997 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
11998 ac_dB='[        ].*$,\1#\2'
11999 ac_dC=' '
12000 ac_dD=',;t'
12001 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
12002 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
12003 ac_iB='\([      ]\),\1#\2define\3'
12004 ac_iC=' '
12005 ac_iD='\4,;t'
12006 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
12007 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
12008 ac_uB='$,\1#\2define\3'
12009 ac_uC=' '
12010 ac_uD=',;t'
12011
12012 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
12013   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
12014   case $ac_file in
12015   - | *:- | *:-:* ) # input from stdin
12016         cat >$tmp/stdin
12017         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
12018         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
12019   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
12020         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
12021   * )   ac_file_in=$ac_file.in ;;
12022   esac
12023
12024   test x"$ac_file" != x- && { echo "$as_me:12024: creating $ac_file" >&5
12025 echo "$as_me: creating $ac_file" >&6;}
12026
12027   # First look for the input files in the build tree, otherwise in the
12028   # src tree.
12029   ac_file_inputs=`IFS=:
12030     for f in $ac_file_in; do
12031       case $f in
12032       -) echo $tmp/stdin ;;
12033       [\\/$]*)
12034          # Absolute (can't be DOS-style, as IFS=:)
12035          test -f "$f" || { { echo "$as_me:12035: error: cannot find input file: $f" >&5
12036 echo "$as_me: error: cannot find input file: $f" >&2;}
12037    { (exit 1); exit 1; }; }
12038          echo $f;;
12039       *) # Relative
12040          if test -f "$f"; then
12041            # Build tree
12042            echo $f
12043          elif test -f "$srcdir/$f"; then
12044            # Source tree
12045            echo $srcdir/$f
12046          else
12047            # /dev/null tree
12048            { { echo "$as_me:12048: error: cannot find input file: $f" >&5
12049 echo "$as_me: error: cannot find input file: $f" >&2;}
12050    { (exit 1); exit 1; }; }
12051          fi;;
12052       esac
12053     done` || { (exit 1); exit 1; }
12054   # Remove the trailing spaces.
12055   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
12056
12057 EOF
12058
12059 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
12060 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
12061 # be either 'cat' or 'sort'.
12062 cat confdefs.h | uniq >conftest.vals
12063
12064 # Break up conftest.vals because some shells have a limit on
12065 # the size of here documents, and old seds have small limits too.
12066
12067 rm -f conftest.tail
12068 echo '  rm -f conftest.frag' >> $CONFIG_STATUS
12069 while grep . conftest.vals >/dev/null
12070 do
12071   # Write chunks of a limited-size here document to conftest.frag.
12072   echo '  cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
12073   sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
12074   echo 'CEOF' >> $CONFIG_STATUS
12075   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
12076   rm -f conftest.vals
12077   mv conftest.tail conftest.vals
12078 done
12079 rm -f conftest.vals
12080
12081 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
12082 # marker @DEFS@.
12083 echo '  cat >> conftest.edit <<CEOF
12084 /@DEFS@/r conftest.frag
12085 /@DEFS@/d
12086 CEOF
12087 sed -f conftest.edit $tmp/in > $tmp/out
12088 rm -f $tmp/in
12089 mv $tmp/out $tmp/in
12090 rm -f conftest.edit conftest.frag
12091 ' >> $CONFIG_STATUS
12092
12093 cat >>$CONFIG_STATUS <<\EOF
12094   # Let's still pretend it is `configure' which instantiates (i.e., don't
12095   # use $as_me), people would be surprised to read:
12096   #    /* config.h.  Generated automatically by config.status.  */
12097   if test x"$ac_file" = x-; then
12098     echo "/* Generated automatically by configure.  */" >$tmp/config.h
12099   else
12100     echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
12101   fi
12102   cat $tmp/in >>$tmp/config.h
12103   rm -f $tmp/in
12104   if test x"$ac_file" != x-; then
12105     if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
12106       { echo "$as_me:12106: $ac_file is unchanged" >&5
12107 echo "$as_me: $ac_file is unchanged" >&6;}
12108     else
12109       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
12110          X"$ac_file" : 'X\(//\)[^/]' \| \
12111          X"$ac_file" : 'X\(//\)$' \| \
12112          X"$ac_file" : 'X\(/\)' \| \
12113          .     : '\(.\)' 2>/dev/null ||
12114 echo X"$ac_file" |
12115     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
12116           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
12117           /^X\(\/\/\)$/{ s//\1/; q; }
12118           /^X\(\/\).*/{ s//\1/; q; }
12119           s/.*/./; q'`
12120       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
12121         { case "$ac_dir" in
12122   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
12123   *)                      as_incr_dir=.;;
12124 esac
12125 as_dummy="$ac_dir"
12126 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
12127   case $as_mkdir_dir in
12128     # Skip DOS drivespec
12129     ?:) as_incr_dir=$as_mkdir_dir ;;
12130     *)
12131       as_incr_dir=$as_incr_dir/$as_mkdir_dir
12132       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
12133     ;;
12134   esac
12135 done; }
12136
12137       fi
12138       rm -f $ac_file
12139       mv $tmp/config.h $ac_file
12140     fi
12141   else
12142     cat $tmp/config.h
12143     rm -f $tmp/config.h
12144   fi
12145 done
12146 EOF
12147 cat >>$CONFIG_STATUS <<\EOF
12148 #
12149 # CONFIG_COMMANDS section.
12150 #
12151 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
12152   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
12153   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
12154
12155   case $ac_dest in
12156     default )
12157 if test -z "$USE_OLD_MAKERULES" ; then
12158         $AWK -f $srcdir/mk-1st.awk <$srcdir/src/modules >>src/Makefile
12159 fi
12160  ;;
12161   esac
12162 done
12163 EOF
12164
12165 cat >>$CONFIG_STATUS <<\EOF
12166
12167 { (exit 0); exit 0; }
12168 EOF
12169 chmod +x $CONFIG_STATUS
12170 ac_clean_files=$ac_clean_files_save
12171
12172 # configure is writing to config.log, and then calls config.status.
12173 # config.status does its own redirection, appending to config.log.
12174 # Unfortunately, on DOS this fails, as config.log is still kept open
12175 # by configure, so config.status won't be able to write to it; its
12176 # output is simply discarded.  So we exec the FD to /dev/null,
12177 # effectively closing config.log, so it can be properly (re)opened and
12178 # appended to by config.status.  When coming back to configure, we
12179 # need to make the FD available again.
12180 if test "$no_create" != yes; then
12181   ac_cs_success=:
12182   exec 5>/dev/null
12183   $SHELL $CONFIG_STATUS || ac_cs_success=false
12184   exec 5>>config.log
12185   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
12186   # would make configure fail if this is the last instruction.
12187   $ac_cs_success || { (exit 1); exit 1; }
12188 fi
12189 ${MAKE:-make} preinstall