]> ncurses.scripts.mit.edu Git - ncurses.git/blob - Ada95/configure
4db6f1f932e0d1ea12b92f4d9e8951ac7e5afcc0
[ncurses.git] / Ada95 / configure
1 #! /bin/sh
2 # From configure.in Revision: 1.30 .
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated by Autoconf 2.52.20101002.
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   --with-shared           generate shared C-objects (needed for --with-ada-sharedlib)
661   --enable-widec          compile with wide-char/UTF-8 code
662   --with-curses-dir=DIR   directory in which (n)curses is installed
663   --with-shlib-version=X  Specify rel or abi version for shared libs
664   --enable-rpath-link     link sample programs with rpath option
665 Fine-Tuning Your Configuration:
666   --enable-broken_linker  compile with broken-linker support code
667   --disable-largefile     omit support for large files
668   --with-rcs-ids          compile-in RCS identifiers
669 Extensions:
670   --disable-ext-funcs     disable function-extensions
671   --enable-const          compile with extra/non-standard const
672 Development Code:
673   --without-develop       disable development options
674 Experimental Code:
675   --with-pthread          use POSIX thread library
676   --enable-weak-symbols   enable weak-symbols for pthreads
677   --enable-reentrant      compile with experimental reentrant code
678   --with-wrap-prefix=XXX  override prefix used for public variables
679 Testing/development Options:
680   --enable-echo           build: display "compiling" commands (default)
681   --enable-warnings       build: turn on GCC compiler warnings
682   --enable-assertions     test: turn on generation of assertion code
683   --enable-expanded       test: generate functions for certain macros
684   --disable-macros        test: use functions rather than macros
685   --with-trace            test: add trace() function to all models of ncurses
686 Ada95 Binding Options:
687   --with-ada-compiler=CMD specify Ada95 compiler command (default gnatmake)
688   --with-ada-include=DIR  Ada includes are in DIR (default: PREFIX/share/ada/adainclude)
689   --with-ada-objects=DIR  Ada objects are in DIR (default: PREFIX/lib/ada/adalib)
690   --with-ada-sharedlib=XX build Ada95 shared-library
691
692 Some influential environment variables:
693   CC          C compiler command
694   CFLAGS      C compiler flags
695   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
696               nonstandard directory <lib dir>
697   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
698               headers in a nonstandard directory <include dir>
699   CPP         C preprocessor
700
701 Use these variables to override the choices made by `configure' or to help
702 it to find libraries and programs with nonstandard names/locations.
703
704 EOF
705 fi
706
707 if test "$ac_init_help" = "recursive"; then
708   # If there are subdirs, report their specific --help.
709   ac_popdir=`pwd`
710   for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
711     cd $ac_subdir
712     # A "../" for each directory in /$ac_subdir.
713     ac_dots=`echo $ac_subdir |
714              sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
715
716     case $srcdir in
717     .) # No --srcdir option.  We are building in place.
718       ac_sub_srcdir=$srcdir ;;
719     [\\/]* | ?:[\\/]* ) # Absolute path.
720       ac_sub_srcdir=$srcdir/$ac_subdir ;;
721     *) # Relative path.
722       ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;;
723     esac
724
725     # Check for guested configure; otherwise get Cygnus style configure.
726     if test -f $ac_sub_srcdir/configure.gnu; then
727       echo
728       $SHELL $ac_sub_srcdir/configure.gnu  --help=recursive
729     elif test -f $ac_sub_srcdir/configure; then
730       echo
731       $SHELL $ac_sub_srcdir/configure  --help=recursive
732     elif test -f $ac_sub_srcdir/configure.ac ||
733            test -f $ac_sub_srcdir/configure.in; then
734       echo
735       $ac_configure --help
736     else
737       echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
738     fi
739     cd $ac_popdir
740   done
741 fi
742
743 test -n "$ac_init_help" && exit 0
744 if $ac_init_version; then
745   cat <<\EOF
746
747 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
748 Free Software Foundation, Inc.
749 This configure script is free software; the Free Software Foundation
750 gives unlimited permission to copy, distribute and modify it.
751 EOF
752   exit 0
753 fi
754 exec 5>config.log
755 cat >&5 <<EOF
756 This file contains any messages produced by compilers while
757 running configure, to aid debugging if configure makes a mistake.
758
759 It was created by $as_me, which was
760 generated by GNU Autoconf 2.52.20101002.  Invocation command line was
761
762   $ $0 $@
763
764 EOF
765 {
766 cat <<_ASUNAME
767 ## ---------- ##
768 ## Platform.  ##
769 ## ---------- ##
770
771 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
772 uname -m = `(uname -m) 2>/dev/null || echo unknown`
773 uname -r = `(uname -r) 2>/dev/null || echo unknown`
774 uname -s = `(uname -s) 2>/dev/null || echo unknown`
775 uname -v = `(uname -v) 2>/dev/null || echo unknown`
776
777 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
778 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
779
780 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
781 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
782 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
783 hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
784 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
785 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
786 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
787
788 PATH = $PATH
789
790 _ASUNAME
791 } >&5
792
793 cat >&5 <<EOF
794 ## ------------ ##
795 ## Core tests.  ##
796 ## ------------ ##
797
798 EOF
799
800 # Keep a trace of the command line.
801 # Strip out --no-create and --no-recursion so they do not pile up.
802 # Also quote any args containing shell meta-characters.
803 ac_configure_args=
804 ac_sep=
805 for ac_arg
806 do
807   case $ac_arg in
808   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
809   | --no-cr | --no-c) ;;
810   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
811   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
812   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
813     ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
814     ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
815     ac_sep=" " ;;
816   *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
817      ac_sep=" " ;;
818   esac
819   # Get rid of the leading space.
820 done
821
822 # When interrupted or exit'd, cleanup temporary files, and complete
823 # config.log.  We remove comments because anyway the quotes in there
824 # would cause problems or look ugly.
825 trap 'exit_status=$?
826   # Save into config.log some information that might help in debugging.
827   echo >&5
828   echo "## ----------------- ##" >&5
829   echo "## Cache variables.  ##" >&5
830   echo "## ----------------- ##" >&5
831   echo >&5
832   # The following way of writing the cache mishandles newlines in values,
833 {
834   (set) 2>&1 |
835     case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
836     *ac_space=\ *)
837       sed -n \
838         "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
839           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
840       ;;
841     *)
842       sed -n \
843         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
844       ;;
845     esac;
846 } >&5
847   sed "/^$/d" confdefs.h >conftest.log
848   if test -s conftest.log; then
849     echo >&5
850     echo "## ------------ ##" >&5
851     echo "## confdefs.h.  ##" >&5
852     echo "## ------------ ##" >&5
853     echo >&5
854     cat conftest.log >&5
855   fi
856   (echo; echo) >&5
857   test "$ac_signal" != 0 &&
858     echo "$as_me: caught signal $ac_signal" >&5
859   echo "$as_me: exit $exit_status" >&5
860   rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
861     exit $exit_status
862      ' 0
863 for ac_signal in 1 2 13 15; do
864   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
865 done
866 ac_signal=0
867
868 # confdefs.h avoids OS command line length limits that DEFS can exceed.
869 rm -rf conftest* confdefs.h
870 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
871 echo >confdefs.h
872
873 # Let the site file select an alternate cache file if it wants to.
874 # Prefer explicitly selected file to automatically selected ones.
875 if test -z "$CONFIG_SITE"; then
876   if test "x$prefix" != xNONE; then
877     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
878   else
879     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
880   fi
881 fi
882 for ac_site_file in $CONFIG_SITE; do
883   if test -r "$ac_site_file"; then
884     { echo "$as_me:884: loading site script $ac_site_file" >&5
885 echo "$as_me: loading site script $ac_site_file" >&6;}
886     cat "$ac_site_file" >&5
887     . "$ac_site_file"
888   fi
889 done
890
891 if test -r "$cache_file"; then
892   # Some versions of bash will fail to source /dev/null (special
893   # files actually), so we avoid doing that.
894   if test -f "$cache_file"; then
895     { echo "$as_me:895: loading cache $cache_file" >&5
896 echo "$as_me: loading cache $cache_file" >&6;}
897     case $cache_file in
898       [\\/]* | ?:[\\/]* ) . $cache_file;;
899       *)                      . ./$cache_file;;
900     esac
901   fi
902 else
903   { echo "$as_me:903: creating cache $cache_file" >&5
904 echo "$as_me: creating cache $cache_file" >&6;}
905   >$cache_file
906 fi
907
908 # Check that the precious variables saved in the cache have kept the same
909 # value.
910 ac_cache_corrupted=false
911 for ac_var in `(set) 2>&1 |
912                sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
913   eval ac_old_set=\$ac_cv_env_${ac_var}_set
914   eval ac_new_set=\$ac_env_${ac_var}_set
915   eval ac_old_val="\$ac_cv_env_${ac_var}_value"
916   eval ac_new_val="\$ac_env_${ac_var}_value"
917   case $ac_old_set,$ac_new_set in
918     set,)
919       { echo "$as_me:919: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
920 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
921       ac_cache_corrupted=: ;;
922     ,set)
923       { echo "$as_me:923: error: \`$ac_var' was not set in the previous run" >&5
924 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
925       ac_cache_corrupted=: ;;
926     ,);;
927     *)
928       if test "x$ac_old_val" != "x$ac_new_val"; then
929         { echo "$as_me:929: error: \`$ac_var' has changed since the previous run:" >&5
930 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
931         { echo "$as_me:931:   former value:  $ac_old_val" >&5
932 echo "$as_me:   former value:  $ac_old_val" >&2;}
933         { echo "$as_me:933:   current value: $ac_new_val" >&5
934 echo "$as_me:   current value: $ac_new_val" >&2;}
935         ac_cache_corrupted=:
936       fi;;
937   esac
938   # Pass precious variables to config.status.  It doesn't matter if
939   # we pass some twice (in addition to the command line arguments).
940   if test "$ac_new_set" = set; then
941     case $ac_new_val in
942     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
943       ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
944       ac_configure_args="$ac_configure_args '$ac_arg'"
945       ;;
946     *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
947        ;;
948     esac
949   fi
950 done
951 if $ac_cache_corrupted; then
952   { echo "$as_me:952: error: changes in the environment can compromise the build" >&5
953 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
954   { { echo "$as_me:954: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
955 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
956    { (exit 1); exit 1; }; }
957 fi
958
959 ac_ext=c
960 ac_cpp='$CPP $CPPFLAGS'
961 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
962 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
963 ac_compiler_gnu=$ac_cv_c_compiler_gnu
964 ac_main_return=return
965
966 case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
967   *c*,-n*) ECHO_N= ECHO_C='
968 ' ECHO_T='      ' ;;
969   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
970   *)      ECHO_N= ECHO_C='\c' ECHO_T= ;;
971 esac
972 echo "#! $SHELL" >conftest.sh
973 echo  "exit 0"   >>conftest.sh
974 chmod +x conftest.sh
975 if { (echo "$as_me:975: PATH=\".;.\"; conftest.sh") >&5
976   (PATH=".;."; conftest.sh) 2>&5
977   ac_status=$?
978   echo "$as_me:978: \$? = $ac_status" >&5
979   (exit $ac_status); }; then
980   ac_path_separator=';'
981 else
982   ac_path_separator=:
983 fi
984 PATH_SEPARATOR="$ac_path_separator"
985 rm -f conftest.sh
986
987 ac_config_headers="$ac_config_headers include/ncurses_cfg.h:include/ncurses_cfg.hin"
988
989 top_builddir=`pwd`
990
991 ac_aux_dir=
992 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
993   if test -f $ac_dir/install-sh; then
994     ac_aux_dir=$ac_dir
995     ac_install_sh="$ac_aux_dir/install-sh -c"
996     break
997   elif test -f $ac_dir/install.sh; then
998     ac_aux_dir=$ac_dir
999     ac_install_sh="$ac_aux_dir/install.sh -c"
1000     break
1001   elif test -f $ac_dir/shtool; then
1002     ac_aux_dir=$ac_dir
1003     ac_install_sh="$ac_aux_dir/shtool install -c"
1004     break
1005   fi
1006 done
1007 if test -z "$ac_aux_dir"; then
1008   { { echo "$as_me:1008: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1009 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1010    { (exit 1); exit 1; }; }
1011 fi
1012 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1013 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1014 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1015
1016 # Make sure we can run config.sub.
1017 $ac_config_sub sun4 >/dev/null 2>&1 ||
1018   { { echo "$as_me:1018: error: cannot run $ac_config_sub" >&5
1019 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1020    { (exit 1); exit 1; }; }
1021
1022 echo "$as_me:1022: checking build system type" >&5
1023 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1024 if test "${ac_cv_build+set}" = set; then
1025   echo $ECHO_N "(cached) $ECHO_C" >&6
1026 else
1027   ac_cv_build_alias=$build_alias
1028 test -z "$ac_cv_build_alias" &&
1029   ac_cv_build_alias=`$ac_config_guess`
1030 test -z "$ac_cv_build_alias" &&
1031   { { echo "$as_me:1031: error: cannot guess build type; you must specify one" >&5
1032 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1033    { (exit 1); exit 1; }; }
1034 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1035   { { echo "$as_me:1035: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1036 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1037    { (exit 1); exit 1; }; }
1038
1039 fi
1040 echo "$as_me:1040: result: $ac_cv_build" >&5
1041 echo "${ECHO_T}$ac_cv_build" >&6
1042 build=$ac_cv_build
1043 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1044 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1045 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1046
1047 echo "$as_me:1047: checking host system type" >&5
1048 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1049 if test "${ac_cv_host+set}" = set; then
1050   echo $ECHO_N "(cached) $ECHO_C" >&6
1051 else
1052   ac_cv_host_alias=$host_alias
1053 test -z "$ac_cv_host_alias" &&
1054   ac_cv_host_alias=$ac_cv_build_alias
1055 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1056   { { echo "$as_me:1056: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1057 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1058    { (exit 1); exit 1; }; }
1059
1060 fi
1061 echo "$as_me:1061: result: $ac_cv_host" >&5
1062 echo "${ECHO_T}$ac_cv_host" >&6
1063 host=$ac_cv_host
1064 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1065 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1066 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1067
1068 if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then
1069         echo "$as_me:1069: checking target system type" >&5
1070 echo $ECHO_N "checking target system type... $ECHO_C" >&6
1071 if test "${ac_cv_target+set}" = set; then
1072   echo $ECHO_N "(cached) $ECHO_C" >&6
1073 else
1074   ac_cv_target_alias=$target_alias
1075 test "x$ac_cv_target_alias" = "x" &&
1076   ac_cv_target_alias=$ac_cv_host_alias
1077 ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
1078   { { echo "$as_me:1078: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1079 echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1080    { (exit 1); exit 1; }; }
1081
1082 fi
1083 echo "$as_me:1083: result: $ac_cv_target" >&5
1084 echo "${ECHO_T}$ac_cv_target" >&6
1085 target=$ac_cv_target
1086 target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1087 target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1088 target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1089
1090 # The aliases save the names the user supplied, while $host etc.
1091 # will get canonicalized.
1092 test -n "$target_alias" &&
1093   test "$program_prefix$program_suffix$program_transform_name" = \
1094     NONENONEs,x,x, &&
1095   program_prefix=${target_alias}-
1096         system_name="$host_os"
1097 else
1098         system_name="`(uname -s -r) 2>/dev/null`"
1099         if test -z "$system_name" ; then
1100                 system_name="`(hostname) 2>/dev/null`"
1101         fi
1102 fi
1103 test -n "$system_name" && cat >>confdefs.h <<EOF
1104 #define SYSTEM_NAME "$system_name"
1105 EOF
1106
1107 if test "${cf_cv_system_name+set}" = set; then
1108   echo $ECHO_N "(cached) $ECHO_C" >&6
1109 else
1110   cf_cv_system_name="$system_name"
1111 fi
1112
1113 test -z "$system_name" && system_name="$cf_cv_system_name"
1114 test -n "$cf_cv_system_name" && echo "$as_me:1114: result: Configuring for $cf_cv_system_name" >&5
1115 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1116
1117 if test ".$system_name" != ".$cf_cv_system_name" ; then
1118         echo "$as_me:1118: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1119 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1120         { { echo "$as_me:1120: error: \"Please remove config.cache and try again.\"" >&5
1121 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1122    { (exit 1); exit 1; }; }
1123 fi
1124
1125 # Check whether --with-system-type or --without-system-type was given.
1126 if test "${with_system_type+set}" = set; then
1127   withval="$with_system_type"
1128   { echo "$as_me:1128: WARNING: overriding system type to $withval" >&5
1129 echo "$as_me: WARNING: overriding system type to $withval" >&2;}
1130  cf_cv_system_name=$withval
1131 fi;
1132
1133 ###     Save the given $CFLAGS to allow user-override.
1134 cf_user_CFLAGS="$CFLAGS"
1135
1136 ###     Default install-location
1137
1138 echo "$as_me:1138: checking for prefix" >&5
1139 echo $ECHO_N "checking for prefix... $ECHO_C" >&6
1140 if test "x$prefix" = "xNONE" ; then
1141         case "$cf_cv_system_name" in
1142                 # non-vendor systems don't have a conflict
1143         openbsd*|freebsd*|linux*|cygwin*|k*bsd*-gnu)
1144                 prefix=/usr
1145                 ;;
1146         *)      prefix=$ac_default_prefix
1147                 ;;
1148         esac
1149 fi
1150 echo "$as_me:1150: result: $prefix" >&5
1151 echo "${ECHO_T}$prefix" >&6
1152
1153 if test "x$prefix" = "xNONE" ; then
1154 echo "$as_me:1154: checking for default include-directory" >&5
1155 echo $ECHO_N "checking for default include-directory... $ECHO_C" >&6
1156 test -n "$verbose" && echo 1>&6
1157 for cf_symbol in \
1158         $includedir \
1159         $includedir/ncurses \
1160         $prefix/include \
1161         $prefix/include/ncurses \
1162         /usr/local/include \
1163         /usr/local/include/ncurses \
1164         /usr/include \
1165         /usr/include/ncurses
1166 do
1167         cf_dir=`eval echo $cf_symbol`
1168         if test -f $cf_dir/curses.h ; then
1169         if ( fgrep NCURSES_VERSION $cf_dir/curses.h 2>&1 >/dev/null ) ; then
1170                 includedir="$cf_symbol"
1171                 test -n "$verbose"  && echo $ac_n "     found " 1>&6
1172                 break
1173         fi
1174         fi
1175         test -n "$verbose"  && echo "   tested $cf_dir" 1>&6
1176 done
1177 echo "$as_me:1177: result: $includedir" >&5
1178 echo "${ECHO_T}$includedir" >&6
1179 fi
1180
1181 ###     Checks for programs.
1182 ac_ext=c
1183 ac_cpp='$CPP $CPPFLAGS'
1184 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1185 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1186 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1187 ac_main_return=return
1188 if test -n "$ac_tool_prefix"; then
1189   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1190 set dummy ${ac_tool_prefix}gcc; ac_word=$2
1191 echo "$as_me:1191: checking for $ac_word" >&5
1192 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1193 if test "${ac_cv_prog_CC+set}" = set; then
1194   echo $ECHO_N "(cached) $ECHO_C" >&6
1195 else
1196   if test -n "$CC"; then
1197   ac_cv_prog_CC="$CC" # Let the user override the test.
1198 else
1199   ac_save_IFS=$IFS; IFS=$ac_path_separator
1200 ac_dummy="$PATH"
1201 for ac_dir in $ac_dummy; do
1202   IFS=$ac_save_IFS
1203   test -z "$ac_dir" && ac_dir=.
1204   $as_executable_p "$ac_dir/$ac_word" || continue
1205 ac_cv_prog_CC="${ac_tool_prefix}gcc"
1206 echo "$as_me:1206: found $ac_dir/$ac_word" >&5
1207 break
1208 done
1209
1210 fi
1211 fi
1212 CC=$ac_cv_prog_CC
1213 if test -n "$CC"; then
1214   echo "$as_me:1214: result: $CC" >&5
1215 echo "${ECHO_T}$CC" >&6
1216 else
1217   echo "$as_me:1217: result: no" >&5
1218 echo "${ECHO_T}no" >&6
1219 fi
1220
1221 fi
1222 if test -z "$ac_cv_prog_CC"; then
1223   ac_ct_CC=$CC
1224   # Extract the first word of "gcc", so it can be a program name with args.
1225 set dummy gcc; ac_word=$2
1226 echo "$as_me:1226: checking for $ac_word" >&5
1227 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1228 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1229   echo $ECHO_N "(cached) $ECHO_C" >&6
1230 else
1231   if test -n "$ac_ct_CC"; then
1232   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1233 else
1234   ac_save_IFS=$IFS; IFS=$ac_path_separator
1235 ac_dummy="$PATH"
1236 for ac_dir in $ac_dummy; do
1237   IFS=$ac_save_IFS
1238   test -z "$ac_dir" && ac_dir=.
1239   $as_executable_p "$ac_dir/$ac_word" || continue
1240 ac_cv_prog_ac_ct_CC="gcc"
1241 echo "$as_me:1241: found $ac_dir/$ac_word" >&5
1242 break
1243 done
1244
1245 fi
1246 fi
1247 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1248 if test -n "$ac_ct_CC"; then
1249   echo "$as_me:1249: result: $ac_ct_CC" >&5
1250 echo "${ECHO_T}$ac_ct_CC" >&6
1251 else
1252   echo "$as_me:1252: result: no" >&5
1253 echo "${ECHO_T}no" >&6
1254 fi
1255
1256   CC=$ac_ct_CC
1257 else
1258   CC="$ac_cv_prog_CC"
1259 fi
1260
1261 if test -z "$CC"; then
1262   if test -n "$ac_tool_prefix"; then
1263   # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1264 set dummy ${ac_tool_prefix}cc; ac_word=$2
1265 echo "$as_me:1265: checking for $ac_word" >&5
1266 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1267 if test "${ac_cv_prog_CC+set}" = set; then
1268   echo $ECHO_N "(cached) $ECHO_C" >&6
1269 else
1270   if test -n "$CC"; then
1271   ac_cv_prog_CC="$CC" # Let the user override the test.
1272 else
1273   ac_save_IFS=$IFS; IFS=$ac_path_separator
1274 ac_dummy="$PATH"
1275 for ac_dir in $ac_dummy; do
1276   IFS=$ac_save_IFS
1277   test -z "$ac_dir" && ac_dir=.
1278   $as_executable_p "$ac_dir/$ac_word" || continue
1279 ac_cv_prog_CC="${ac_tool_prefix}cc"
1280 echo "$as_me:1280: found $ac_dir/$ac_word" >&5
1281 break
1282 done
1283
1284 fi
1285 fi
1286 CC=$ac_cv_prog_CC
1287 if test -n "$CC"; then
1288   echo "$as_me:1288: result: $CC" >&5
1289 echo "${ECHO_T}$CC" >&6
1290 else
1291   echo "$as_me:1291: result: no" >&5
1292 echo "${ECHO_T}no" >&6
1293 fi
1294
1295 fi
1296 if test -z "$ac_cv_prog_CC"; then
1297   ac_ct_CC=$CC
1298   # Extract the first word of "cc", so it can be a program name with args.
1299 set dummy cc; ac_word=$2
1300 echo "$as_me:1300: checking for $ac_word" >&5
1301 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1302 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1303   echo $ECHO_N "(cached) $ECHO_C" >&6
1304 else
1305   if test -n "$ac_ct_CC"; then
1306   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1307 else
1308   ac_save_IFS=$IFS; IFS=$ac_path_separator
1309 ac_dummy="$PATH"
1310 for ac_dir in $ac_dummy; do
1311   IFS=$ac_save_IFS
1312   test -z "$ac_dir" && ac_dir=.
1313   $as_executable_p "$ac_dir/$ac_word" || continue
1314 ac_cv_prog_ac_ct_CC="cc"
1315 echo "$as_me:1315: found $ac_dir/$ac_word" >&5
1316 break
1317 done
1318
1319 fi
1320 fi
1321 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1322 if test -n "$ac_ct_CC"; then
1323   echo "$as_me:1323: result: $ac_ct_CC" >&5
1324 echo "${ECHO_T}$ac_ct_CC" >&6
1325 else
1326   echo "$as_me:1326: result: no" >&5
1327 echo "${ECHO_T}no" >&6
1328 fi
1329
1330   CC=$ac_ct_CC
1331 else
1332   CC="$ac_cv_prog_CC"
1333 fi
1334
1335 fi
1336 if test -z "$CC"; then
1337   # Extract the first word of "cc", so it can be a program name with args.
1338 set dummy cc; ac_word=$2
1339 echo "$as_me:1339: checking for $ac_word" >&5
1340 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1341 if test "${ac_cv_prog_CC+set}" = set; then
1342   echo $ECHO_N "(cached) $ECHO_C" >&6
1343 else
1344   if test -n "$CC"; then
1345   ac_cv_prog_CC="$CC" # Let the user override the test.
1346 else
1347   ac_prog_rejected=no
1348   ac_save_IFS=$IFS; IFS=$ac_path_separator
1349 ac_dummy="$PATH"
1350 for ac_dir in $ac_dummy; do
1351   IFS=$ac_save_IFS
1352   test -z "$ac_dir" && ac_dir=.
1353   $as_executable_p "$ac_dir/$ac_word" || continue
1354 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1355   ac_prog_rejected=yes
1356   continue
1357 fi
1358 ac_cv_prog_CC="cc"
1359 echo "$as_me:1359: found $ac_dir/$ac_word" >&5
1360 break
1361 done
1362
1363 if test $ac_prog_rejected = yes; then
1364   # We found a bogon in the path, so make sure we never use it.
1365   set dummy $ac_cv_prog_CC
1366   shift
1367   if test $# != 0; then
1368     # We chose a different compiler from the bogus one.
1369     # However, it has the same basename, so the bogon will be chosen
1370     # first if we set CC to just the basename; use the full file name.
1371     shift
1372     set dummy "$ac_dir/$ac_word" ${1+"$@"}
1373     shift
1374     ac_cv_prog_CC="$@"
1375   fi
1376 fi
1377 fi
1378 fi
1379 CC=$ac_cv_prog_CC
1380 if test -n "$CC"; then
1381   echo "$as_me:1381: result: $CC" >&5
1382 echo "${ECHO_T}$CC" >&6
1383 else
1384   echo "$as_me:1384: result: no" >&5
1385 echo "${ECHO_T}no" >&6
1386 fi
1387
1388 fi
1389 if test -z "$CC"; then
1390   if test -n "$ac_tool_prefix"; then
1391   for ac_prog in cl
1392   do
1393     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1394 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1395 echo "$as_me:1395: checking for $ac_word" >&5
1396 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1397 if test "${ac_cv_prog_CC+set}" = set; then
1398   echo $ECHO_N "(cached) $ECHO_C" >&6
1399 else
1400   if test -n "$CC"; then
1401   ac_cv_prog_CC="$CC" # Let the user override the test.
1402 else
1403   ac_save_IFS=$IFS; IFS=$ac_path_separator
1404 ac_dummy="$PATH"
1405 for ac_dir in $ac_dummy; do
1406   IFS=$ac_save_IFS
1407   test -z "$ac_dir" && ac_dir=.
1408   $as_executable_p "$ac_dir/$ac_word" || continue
1409 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1410 echo "$as_me:1410: found $ac_dir/$ac_word" >&5
1411 break
1412 done
1413
1414 fi
1415 fi
1416 CC=$ac_cv_prog_CC
1417 if test -n "$CC"; then
1418   echo "$as_me:1418: result: $CC" >&5
1419 echo "${ECHO_T}$CC" >&6
1420 else
1421   echo "$as_me:1421: result: no" >&5
1422 echo "${ECHO_T}no" >&6
1423 fi
1424
1425     test -n "$CC" && break
1426   done
1427 fi
1428 if test -z "$CC"; then
1429   ac_ct_CC=$CC
1430   for ac_prog in cl
1431 do
1432   # Extract the first word of "$ac_prog", so it can be a program name with args.
1433 set dummy $ac_prog; ac_word=$2
1434 echo "$as_me:1434: checking for $ac_word" >&5
1435 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1436 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1437   echo $ECHO_N "(cached) $ECHO_C" >&6
1438 else
1439   if test -n "$ac_ct_CC"; then
1440   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1441 else
1442   ac_save_IFS=$IFS; IFS=$ac_path_separator
1443 ac_dummy="$PATH"
1444 for ac_dir in $ac_dummy; do
1445   IFS=$ac_save_IFS
1446   test -z "$ac_dir" && ac_dir=.
1447   $as_executable_p "$ac_dir/$ac_word" || continue
1448 ac_cv_prog_ac_ct_CC="$ac_prog"
1449 echo "$as_me:1449: found $ac_dir/$ac_word" >&5
1450 break
1451 done
1452
1453 fi
1454 fi
1455 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1456 if test -n "$ac_ct_CC"; then
1457   echo "$as_me:1457: result: $ac_ct_CC" >&5
1458 echo "${ECHO_T}$ac_ct_CC" >&6
1459 else
1460   echo "$as_me:1460: result: no" >&5
1461 echo "${ECHO_T}no" >&6
1462 fi
1463
1464   test -n "$ac_ct_CC" && break
1465 done
1466
1467   CC=$ac_ct_CC
1468 fi
1469
1470 fi
1471
1472 test -z "$CC" && { { echo "$as_me:1472: error: no acceptable cc found in \$PATH" >&5
1473 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1474    { (exit 1); exit 1; }; }
1475
1476 # Provide some information about the compiler.
1477 echo "$as_me:1477:" \
1478      "checking for C compiler version" >&5
1479 ac_compiler=`set X $ac_compile; echo $2`
1480 { (eval echo "$as_me:1480: \"$ac_compiler --version </dev/null >&5\"") >&5
1481   (eval $ac_compiler --version </dev/null >&5) 2>&5
1482   ac_status=$?
1483   echo "$as_me:1483: \$? = $ac_status" >&5
1484   (exit $ac_status); }
1485 { (eval echo "$as_me:1485: \"$ac_compiler -v </dev/null >&5\"") >&5
1486   (eval $ac_compiler -v </dev/null >&5) 2>&5
1487   ac_status=$?
1488   echo "$as_me:1488: \$? = $ac_status" >&5
1489   (exit $ac_status); }
1490 { (eval echo "$as_me:1490: \"$ac_compiler -V </dev/null >&5\"") >&5
1491   (eval $ac_compiler -V </dev/null >&5) 2>&5
1492   ac_status=$?
1493   echo "$as_me:1493: \$? = $ac_status" >&5
1494   (exit $ac_status); }
1495
1496 cat >conftest.$ac_ext <<_ACEOF
1497 #line 1497 "configure"
1498 #include "confdefs.h"
1499
1500 int
1501 main ()
1502 {
1503
1504   ;
1505   return 0;
1506 }
1507 _ACEOF
1508 ac_clean_files_save=$ac_clean_files
1509 ac_clean_files="$ac_clean_files a.out a.exe"
1510 # Try to create an executable without -o first, disregard a.out.
1511 # It will help us diagnose broken compilers, and finding out an intuition
1512 # of exeext.
1513 echo "$as_me:1513: checking for C compiler default output" >&5
1514 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1515 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1516 if { (eval echo "$as_me:1516: \"$ac_link_default\"") >&5
1517   (eval $ac_link_default) 2>&5
1518   ac_status=$?
1519   echo "$as_me:1519: \$? = $ac_status" >&5
1520   (exit $ac_status); }; then
1521   # Find the output, starting from the most likely.  This scheme is
1522 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1523 # resort.
1524 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1525                 ls a.out conftest 2>/dev/null;
1526                 ls a.* conftest.* 2>/dev/null`; do
1527   case $ac_file in
1528     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1529     a.out ) # We found the default executable, but exeext='' is most
1530             # certainly right.
1531             break;;
1532     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1533           # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1534           export ac_cv_exeext
1535           break;;
1536     * ) break;;
1537   esac
1538 done
1539 else
1540   echo "$as_me: failed program was:" >&5
1541 cat conftest.$ac_ext >&5
1542 { { echo "$as_me:1542: error: C compiler cannot create executables" >&5
1543 echo "$as_me: error: C compiler cannot create executables" >&2;}
1544    { (exit 77); exit 77; }; }
1545 fi
1546
1547 ac_exeext=$ac_cv_exeext
1548 echo "$as_me:1548: result: $ac_file" >&5
1549 echo "${ECHO_T}$ac_file" >&6
1550
1551 # Check the compiler produces executables we can run.  If not, either
1552 # the compiler is broken, or we cross compile.
1553 echo "$as_me:1553: checking whether the C compiler works" >&5
1554 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1555 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1556 # If not cross compiling, check that we can run a simple program.
1557 if test "$cross_compiling" != yes; then
1558   if { ac_try='./$ac_file'
1559   { (eval echo "$as_me:1559: \"$ac_try\"") >&5
1560   (eval $ac_try) 2>&5
1561   ac_status=$?
1562   echo "$as_me:1562: \$? = $ac_status" >&5
1563   (exit $ac_status); }; }; then
1564     cross_compiling=no
1565   else
1566     if test "$cross_compiling" = maybe; then
1567         cross_compiling=yes
1568     else
1569         { { echo "$as_me:1569: error: cannot run C compiled programs.
1570 If you meant to cross compile, use \`--host'." >&5
1571 echo "$as_me: error: cannot run C compiled programs.
1572 If you meant to cross compile, use \`--host'." >&2;}
1573    { (exit 1); exit 1; }; }
1574     fi
1575   fi
1576 fi
1577 echo "$as_me:1577: result: yes" >&5
1578 echo "${ECHO_T}yes" >&6
1579
1580 rm -f a.out a.exe conftest$ac_cv_exeext
1581 ac_clean_files=$ac_clean_files_save
1582 # Check the compiler produces executables we can run.  If not, either
1583 # the compiler is broken, or we cross compile.
1584 echo "$as_me:1584: checking whether we are cross compiling" >&5
1585 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1586 echo "$as_me:1586: result: $cross_compiling" >&5
1587 echo "${ECHO_T}$cross_compiling" >&6
1588
1589 echo "$as_me:1589: checking for executable suffix" >&5
1590 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1591 if { (eval echo "$as_me:1591: \"$ac_link\"") >&5
1592   (eval $ac_link) 2>&5
1593   ac_status=$?
1594   echo "$as_me:1594: \$? = $ac_status" >&5
1595   (exit $ac_status); }; then
1596   # If both `conftest.exe' and `conftest' are `present' (well, observable)
1597 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
1598 # work properly (i.e., refer to `conftest.exe'), while it won't with
1599 # `rm'.
1600 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1601   case $ac_file in
1602     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1603     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1604           export ac_cv_exeext
1605           break;;
1606     * ) break;;
1607   esac
1608 done
1609 else
1610   { { echo "$as_me:1610: error: cannot compute EXEEXT: cannot compile and link" >&5
1611 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1612    { (exit 1); exit 1; }; }
1613 fi
1614
1615 rm -f conftest$ac_cv_exeext
1616 echo "$as_me:1616: result: $ac_cv_exeext" >&5
1617 echo "${ECHO_T}$ac_cv_exeext" >&6
1618
1619 rm -f conftest.$ac_ext
1620 EXEEXT=$ac_cv_exeext
1621 ac_exeext=$EXEEXT
1622 echo "$as_me:1622: checking for object suffix" >&5
1623 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1624 if test "${ac_cv_objext+set}" = set; then
1625   echo $ECHO_N "(cached) $ECHO_C" >&6
1626 else
1627   cat >conftest.$ac_ext <<_ACEOF
1628 #line 1628 "configure"
1629 #include "confdefs.h"
1630
1631 int
1632 main ()
1633 {
1634
1635   ;
1636   return 0;
1637 }
1638 _ACEOF
1639 rm -f conftest.o conftest.obj
1640 if { (eval echo "$as_me:1640: \"$ac_compile\"") >&5
1641   (eval $ac_compile) 2>&5
1642   ac_status=$?
1643   echo "$as_me:1643: \$? = $ac_status" >&5
1644   (exit $ac_status); }; then
1645   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1646   case $ac_file in
1647     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
1648     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1649        break;;
1650   esac
1651 done
1652 else
1653   echo "$as_me: failed program was:" >&5
1654 cat conftest.$ac_ext >&5
1655 { { echo "$as_me:1655: error: cannot compute OBJEXT: cannot compile" >&5
1656 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1657    { (exit 1); exit 1; }; }
1658 fi
1659
1660 rm -f conftest.$ac_cv_objext conftest.$ac_ext
1661 fi
1662 echo "$as_me:1662: result: $ac_cv_objext" >&5
1663 echo "${ECHO_T}$ac_cv_objext" >&6
1664 OBJEXT=$ac_cv_objext
1665 ac_objext=$OBJEXT
1666 echo "$as_me:1666: checking whether we are using the GNU C compiler" >&5
1667 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1668 if test "${ac_cv_c_compiler_gnu+set}" = set; then
1669   echo $ECHO_N "(cached) $ECHO_C" >&6
1670 else
1671   cat >conftest.$ac_ext <<_ACEOF
1672 #line 1672 "configure"
1673 #include "confdefs.h"
1674
1675 int
1676 main ()
1677 {
1678 #ifndef __GNUC__
1679        choke me
1680 #endif
1681
1682   ;
1683   return 0;
1684 }
1685 _ACEOF
1686 rm -f conftest.$ac_objext
1687 if { (eval echo "$as_me:1687: \"$ac_compile\"") >&5
1688   (eval $ac_compile) 2>&5
1689   ac_status=$?
1690   echo "$as_me:1690: \$? = $ac_status" >&5
1691   (exit $ac_status); } &&
1692          { ac_try='test -s conftest.$ac_objext'
1693   { (eval echo "$as_me:1693: \"$ac_try\"") >&5
1694   (eval $ac_try) 2>&5
1695   ac_status=$?
1696   echo "$as_me:1696: \$? = $ac_status" >&5
1697   (exit $ac_status); }; }; then
1698   ac_compiler_gnu=yes
1699 else
1700   echo "$as_me: failed program was:" >&5
1701 cat conftest.$ac_ext >&5
1702 ac_compiler_gnu=no
1703 fi
1704 rm -f conftest.$ac_objext conftest.$ac_ext
1705 ac_cv_c_compiler_gnu=$ac_compiler_gnu
1706
1707 fi
1708 echo "$as_me:1708: result: $ac_cv_c_compiler_gnu" >&5
1709 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1710 GCC=`test $ac_compiler_gnu = yes && echo yes`
1711 ac_test_CFLAGS=${CFLAGS+set}
1712 ac_save_CFLAGS=$CFLAGS
1713 CFLAGS="-g"
1714 echo "$as_me:1714: checking whether $CC accepts -g" >&5
1715 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1716 if test "${ac_cv_prog_cc_g+set}" = set; then
1717   echo $ECHO_N "(cached) $ECHO_C" >&6
1718 else
1719   cat >conftest.$ac_ext <<_ACEOF
1720 #line 1720 "configure"
1721 #include "confdefs.h"
1722
1723 int
1724 main ()
1725 {
1726
1727   ;
1728   return 0;
1729 }
1730 _ACEOF
1731 rm -f conftest.$ac_objext
1732 if { (eval echo "$as_me:1732: \"$ac_compile\"") >&5
1733   (eval $ac_compile) 2>&5
1734   ac_status=$?
1735   echo "$as_me:1735: \$? = $ac_status" >&5
1736   (exit $ac_status); } &&
1737          { ac_try='test -s conftest.$ac_objext'
1738   { (eval echo "$as_me:1738: \"$ac_try\"") >&5
1739   (eval $ac_try) 2>&5
1740   ac_status=$?
1741   echo "$as_me:1741: \$? = $ac_status" >&5
1742   (exit $ac_status); }; }; then
1743   ac_cv_prog_cc_g=yes
1744 else
1745   echo "$as_me: failed program was:" >&5
1746 cat conftest.$ac_ext >&5
1747 ac_cv_prog_cc_g=no
1748 fi
1749 rm -f conftest.$ac_objext conftest.$ac_ext
1750 fi
1751 echo "$as_me:1751: result: $ac_cv_prog_cc_g" >&5
1752 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1753 if test "$ac_test_CFLAGS" = set; then
1754   CFLAGS=$ac_save_CFLAGS
1755 elif test $ac_cv_prog_cc_g = yes; then
1756   if test "$GCC" = yes; then
1757     CFLAGS="-g -O2"
1758   else
1759     CFLAGS="-g"
1760   fi
1761 else
1762   if test "$GCC" = yes; then
1763     CFLAGS="-O2"
1764   else
1765     CFLAGS=
1766   fi
1767 fi
1768 # Some people use a C++ compiler to compile C.  Since we use `exit',
1769 # in C++ we need to declare it.  In case someone uses the same compiler
1770 # for both compiling C and C++ we need to have the C++ compiler decide
1771 # the declaration of exit, since it's the most demanding environment.
1772 cat >conftest.$ac_ext <<_ACEOF
1773 #ifndef __cplusplus
1774   choke me
1775 #endif
1776 _ACEOF
1777 rm -f conftest.$ac_objext
1778 if { (eval echo "$as_me:1778: \"$ac_compile\"") >&5
1779   (eval $ac_compile) 2>&5
1780   ac_status=$?
1781   echo "$as_me:1781: \$? = $ac_status" >&5
1782   (exit $ac_status); } &&
1783          { ac_try='test -s conftest.$ac_objext'
1784   { (eval echo "$as_me:1784: \"$ac_try\"") >&5
1785   (eval $ac_try) 2>&5
1786   ac_status=$?
1787   echo "$as_me:1787: \$? = $ac_status" >&5
1788   (exit $ac_status); }; }; then
1789   for ac_declaration in \
1790    ''\
1791    '#include <stdlib.h>' \
1792    'extern "C" void std::exit (int) throw (); using std::exit;' \
1793    'extern "C" void std::exit (int); using std::exit;' \
1794    'extern "C" void exit (int) throw ();' \
1795    'extern "C" void exit (int);' \
1796    'void exit (int);'
1797 do
1798   cat >conftest.$ac_ext <<_ACEOF
1799 #line 1799 "configure"
1800 #include "confdefs.h"
1801 #include <stdlib.h>
1802 $ac_declaration
1803 int
1804 main ()
1805 {
1806 exit (42);
1807   ;
1808   return 0;
1809 }
1810 _ACEOF
1811 rm -f conftest.$ac_objext
1812 if { (eval echo "$as_me:1812: \"$ac_compile\"") >&5
1813   (eval $ac_compile) 2>&5
1814   ac_status=$?
1815   echo "$as_me:1815: \$? = $ac_status" >&5
1816   (exit $ac_status); } &&
1817          { ac_try='test -s conftest.$ac_objext'
1818   { (eval echo "$as_me:1818: \"$ac_try\"") >&5
1819   (eval $ac_try) 2>&5
1820   ac_status=$?
1821   echo "$as_me:1821: \$? = $ac_status" >&5
1822   (exit $ac_status); }; }; then
1823   :
1824 else
1825   echo "$as_me: failed program was:" >&5
1826 cat conftest.$ac_ext >&5
1827 continue
1828 fi
1829 rm -f conftest.$ac_objext conftest.$ac_ext
1830   cat >conftest.$ac_ext <<_ACEOF
1831 #line 1831 "configure"
1832 #include "confdefs.h"
1833 $ac_declaration
1834 int
1835 main ()
1836 {
1837 exit (42);
1838   ;
1839   return 0;
1840 }
1841 _ACEOF
1842 rm -f conftest.$ac_objext
1843 if { (eval echo "$as_me:1843: \"$ac_compile\"") >&5
1844   (eval $ac_compile) 2>&5
1845   ac_status=$?
1846   echo "$as_me:1846: \$? = $ac_status" >&5
1847   (exit $ac_status); } &&
1848          { ac_try='test -s conftest.$ac_objext'
1849   { (eval echo "$as_me:1849: \"$ac_try\"") >&5
1850   (eval $ac_try) 2>&5
1851   ac_status=$?
1852   echo "$as_me:1852: \$? = $ac_status" >&5
1853   (exit $ac_status); }; }; then
1854   break
1855 else
1856   echo "$as_me: failed program was:" >&5
1857 cat conftest.$ac_ext >&5
1858 fi
1859 rm -f conftest.$ac_objext conftest.$ac_ext
1860 done
1861 rm -rf conftest*
1862 if test -n "$ac_declaration"; then
1863   echo '#ifdef __cplusplus' >>confdefs.h
1864   echo $ac_declaration      >>confdefs.h
1865   echo '#endif'             >>confdefs.h
1866 fi
1867
1868 else
1869   echo "$as_me: failed program was:" >&5
1870 cat conftest.$ac_ext >&5
1871 fi
1872 rm -f conftest.$ac_objext conftest.$ac_ext
1873 ac_ext=c
1874 ac_cpp='$CPP $CPPFLAGS'
1875 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1876 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1877 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1878 ac_main_return=return
1879
1880 GCC_VERSION=none
1881 if test "$GCC" = yes ; then
1882         echo "$as_me:1882: checking version of $CC" >&5
1883 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
1884         GCC_VERSION="`${CC} --version 2>/dev/null | sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
1885         test -z "$GCC_VERSION" && GCC_VERSION=unknown
1886         echo "$as_me:1886: result: $GCC_VERSION" >&5
1887 echo "${ECHO_T}$GCC_VERSION" >&6
1888 fi
1889
1890 ac_ext=c
1891 ac_cpp='$CPP $CPPFLAGS'
1892 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1893 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1894 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1895 ac_main_return=return
1896 echo "$as_me:1896: checking how to run the C preprocessor" >&5
1897 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
1898 # On Suns, sometimes $CPP names a directory.
1899 if test -n "$CPP" && test -d "$CPP"; then
1900   CPP=
1901 fi
1902 if test -z "$CPP"; then
1903   if test "${ac_cv_prog_CPP+set}" = set; then
1904   echo $ECHO_N "(cached) $ECHO_C" >&6
1905 else
1906       # Double quotes because CPP needs to be expanded
1907     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
1908     do
1909       ac_preproc_ok=false
1910 for ac_c_preproc_warn_flag in '' yes
1911 do
1912   # Use a header file that comes with gcc, so configuring glibc
1913   # with a fresh cross-compiler works.
1914   # On the NeXT, cc -E runs the code through the compiler's parser,
1915   # not just through cpp. "Syntax error" is here to catch this case.
1916   cat >conftest.$ac_ext <<_ACEOF
1917 #line 1917 "configure"
1918 #include "confdefs.h"
1919 #include <assert.h>
1920                      Syntax error
1921 _ACEOF
1922 if { (eval echo "$as_me:1922: \"$ac_cpp conftest.$ac_ext\"") >&5
1923   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
1924   ac_status=$?
1925   egrep -v '^ *\+' conftest.er1 >conftest.err
1926   rm -f conftest.er1
1927   cat conftest.err >&5
1928   echo "$as_me:1928: \$? = $ac_status" >&5
1929   (exit $ac_status); } >/dev/null; then
1930   if test -s conftest.err; then
1931     ac_cpp_err=$ac_c_preproc_warn_flag
1932   else
1933     ac_cpp_err=
1934   fi
1935 else
1936   ac_cpp_err=yes
1937 fi
1938 if test -z "$ac_cpp_err"; then
1939   :
1940 else
1941   echo "$as_me: failed program was:" >&5
1942   cat conftest.$ac_ext >&5
1943   # Broken: fails on valid input.
1944 continue
1945 fi
1946 rm -f conftest.err conftest.$ac_ext
1947
1948   # OK, works on sane cases.  Now check whether non-existent headers
1949   # can be detected and how.
1950   cat >conftest.$ac_ext <<_ACEOF
1951 #line 1951 "configure"
1952 #include "confdefs.h"
1953 #include <ac_nonexistent.h>
1954 _ACEOF
1955 if { (eval echo "$as_me:1955: \"$ac_cpp conftest.$ac_ext\"") >&5
1956   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
1957   ac_status=$?
1958   egrep -v '^ *\+' conftest.er1 >conftest.err
1959   rm -f conftest.er1
1960   cat conftest.err >&5
1961   echo "$as_me:1961: \$? = $ac_status" >&5
1962   (exit $ac_status); } >/dev/null; then
1963   if test -s conftest.err; then
1964     ac_cpp_err=$ac_c_preproc_warn_flag
1965   else
1966     ac_cpp_err=
1967   fi
1968 else
1969   ac_cpp_err=yes
1970 fi
1971 if test -z "$ac_cpp_err"; then
1972   # Broken: success on invalid input.
1973 continue
1974 else
1975   echo "$as_me: failed program was:" >&5
1976   cat conftest.$ac_ext >&5
1977   # Passes both tests.
1978 ac_preproc_ok=:
1979 break
1980 fi
1981 rm -f conftest.err conftest.$ac_ext
1982
1983 done
1984 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
1985 rm -f conftest.err conftest.$ac_ext
1986 if $ac_preproc_ok; then
1987   break
1988 fi
1989
1990     done
1991     ac_cv_prog_CPP=$CPP
1992
1993 fi
1994   CPP=$ac_cv_prog_CPP
1995 else
1996   ac_cv_prog_CPP=$CPP
1997 fi
1998 echo "$as_me:1998: result: $CPP" >&5
1999 echo "${ECHO_T}$CPP" >&6
2000 ac_preproc_ok=false
2001 for ac_c_preproc_warn_flag in '' yes
2002 do
2003   # Use a header file that comes with gcc, so configuring glibc
2004   # with a fresh cross-compiler works.
2005   # On the NeXT, cc -E runs the code through the compiler's parser,
2006   # not just through cpp. "Syntax error" is here to catch this case.
2007   cat >conftest.$ac_ext <<_ACEOF
2008 #line 2008 "configure"
2009 #include "confdefs.h"
2010 #include <assert.h>
2011                      Syntax error
2012 _ACEOF
2013 if { (eval echo "$as_me:2013: \"$ac_cpp conftest.$ac_ext\"") >&5
2014   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2015   ac_status=$?
2016   egrep -v '^ *\+' conftest.er1 >conftest.err
2017   rm -f conftest.er1
2018   cat conftest.err >&5
2019   echo "$as_me:2019: \$? = $ac_status" >&5
2020   (exit $ac_status); } >/dev/null; then
2021   if test -s conftest.err; then
2022     ac_cpp_err=$ac_c_preproc_warn_flag
2023   else
2024     ac_cpp_err=
2025   fi
2026 else
2027   ac_cpp_err=yes
2028 fi
2029 if test -z "$ac_cpp_err"; then
2030   :
2031 else
2032   echo "$as_me: failed program was:" >&5
2033   cat conftest.$ac_ext >&5
2034   # Broken: fails on valid input.
2035 continue
2036 fi
2037 rm -f conftest.err conftest.$ac_ext
2038
2039   # OK, works on sane cases.  Now check whether non-existent headers
2040   # can be detected and how.
2041   cat >conftest.$ac_ext <<_ACEOF
2042 #line 2042 "configure"
2043 #include "confdefs.h"
2044 #include <ac_nonexistent.h>
2045 _ACEOF
2046 if { (eval echo "$as_me:2046: \"$ac_cpp conftest.$ac_ext\"") >&5
2047   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2048   ac_status=$?
2049   egrep -v '^ *\+' conftest.er1 >conftest.err
2050   rm -f conftest.er1
2051   cat conftest.err >&5
2052   echo "$as_me:2052: \$? = $ac_status" >&5
2053   (exit $ac_status); } >/dev/null; then
2054   if test -s conftest.err; then
2055     ac_cpp_err=$ac_c_preproc_warn_flag
2056   else
2057     ac_cpp_err=
2058   fi
2059 else
2060   ac_cpp_err=yes
2061 fi
2062 if test -z "$ac_cpp_err"; then
2063   # Broken: success on invalid input.
2064 continue
2065 else
2066   echo "$as_me: failed program was:" >&5
2067   cat conftest.$ac_ext >&5
2068   # Passes both tests.
2069 ac_preproc_ok=:
2070 break
2071 fi
2072 rm -f conftest.err conftest.$ac_ext
2073
2074 done
2075 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2076 rm -f conftest.err conftest.$ac_ext
2077 if $ac_preproc_ok; then
2078   :
2079 else
2080   { { echo "$as_me:2080: error: C preprocessor \"$CPP\" fails sanity check" >&5
2081 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2082    { (exit 1); exit 1; }; }
2083 fi
2084
2085 ac_ext=c
2086 ac_cpp='$CPP $CPPFLAGS'
2087 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2088 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2089 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2090 ac_main_return=return
2091
2092 if test $ac_cv_c_compiler_gnu = yes; then
2093     echo "$as_me:2093: checking whether $CC needs -traditional" >&5
2094 echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
2095 if test "${ac_cv_prog_gcc_traditional+set}" = set; then
2096   echo $ECHO_N "(cached) $ECHO_C" >&6
2097 else
2098     ac_pattern="Autoconf.*'x'"
2099   cat >conftest.$ac_ext <<_ACEOF
2100 #line 2100 "configure"
2101 #include "confdefs.h"
2102 #include <sgtty.h>
2103 int Autoconf = TIOCGETP;
2104 _ACEOF
2105 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2106   egrep "$ac_pattern" >/dev/null 2>&1; then
2107   ac_cv_prog_gcc_traditional=yes
2108 else
2109   ac_cv_prog_gcc_traditional=no
2110 fi
2111 rm -rf conftest*
2112
2113   if test $ac_cv_prog_gcc_traditional = no; then
2114     cat >conftest.$ac_ext <<_ACEOF
2115 #line 2115 "configure"
2116 #include "confdefs.h"
2117 #include <termio.h>
2118 int Autoconf = TCGETA;
2119 _ACEOF
2120 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2121   egrep "$ac_pattern" >/dev/null 2>&1; then
2122   ac_cv_prog_gcc_traditional=yes
2123 fi
2124 rm -rf conftest*
2125
2126   fi
2127 fi
2128 echo "$as_me:2128: result: $ac_cv_prog_gcc_traditional" >&5
2129 echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
2130   if test $ac_cv_prog_gcc_traditional = yes; then
2131     CC="$CC -traditional"
2132   fi
2133 fi
2134
2135 echo "$as_me:2135: checking whether $CC understands -c and -o together" >&5
2136 echo $ECHO_N "checking whether $CC understands -c and -o together... $ECHO_C" >&6
2137 if test "${cf_cv_prog_CC_c_o+set}" = set; then
2138   echo $ECHO_N "(cached) $ECHO_C" >&6
2139 else
2140
2141 cat > conftest.$ac_ext <<CF_EOF
2142 #include <stdio.h>
2143 int main()
2144 {
2145         ${cf_cv_main_return:-return}(0);
2146 }
2147 CF_EOF
2148 # We do the test twice because some compilers refuse to overwrite an
2149 # existing .o file with -o, though they will create one.
2150 ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
2151 if { (eval echo "$as_me:2151: \"$ac_try\"") >&5
2152   (eval $ac_try) 2>&5
2153   ac_status=$?
2154   echo "$as_me:2154: \$? = $ac_status" >&5
2155   (exit $ac_status); } &&
2156   test -f conftest2.$ac_objext && { (eval echo "$as_me:2156: \"$ac_try\"") >&5
2157   (eval $ac_try) 2>&5
2158   ac_status=$?
2159   echo "$as_me:2159: \$? = $ac_status" >&5
2160   (exit $ac_status); };
2161 then
2162   eval cf_cv_prog_CC_c_o=yes
2163 else
2164   eval cf_cv_prog_CC_c_o=no
2165 fi
2166 rm -rf conftest*
2167
2168 fi
2169 if test $cf_cv_prog_CC_c_o = yes; then
2170   echo "$as_me:2170: result: yes" >&5
2171 echo "${ECHO_T}yes" >&6
2172 else
2173   echo "$as_me:2173: result: no" >&5
2174 echo "${ECHO_T}no" >&6
2175 fi
2176
2177 echo "$as_me:2177: checking for POSIXized ISC" >&5
2178 echo $ECHO_N "checking for POSIXized ISC... $ECHO_C" >&6
2179 if test -d /etc/conf/kconfig.d &&
2180    grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
2181 then
2182   echo "$as_me:2182: result: yes" >&5
2183 echo "${ECHO_T}yes" >&6
2184   ISC=yes # If later tests want to check for ISC.
2185
2186 cat >>confdefs.h <<\EOF
2187 #define _POSIX_SOURCE 1
2188 EOF
2189
2190   if test "$GCC" = yes; then
2191     CC="$CC -posix"
2192   else
2193     CC="$CC -Xp"
2194   fi
2195 else
2196   echo "$as_me:2196: result: no" >&5
2197 echo "${ECHO_T}no" >&6
2198   ISC=
2199 fi
2200
2201 echo "$as_me:2201: checking for ${CC:-cc} option to accept ANSI C" >&5
2202 echo $ECHO_N "checking for ${CC:-cc} option to accept ANSI C... $ECHO_C" >&6
2203 if test "${cf_cv_ansi_cc+set}" = set; then
2204   echo $ECHO_N "(cached) $ECHO_C" >&6
2205 else
2206
2207 cf_cv_ansi_cc=no
2208 cf_save_CFLAGS="$CFLAGS"
2209 cf_save_CPPFLAGS="$CPPFLAGS"
2210 # Don't try gcc -ansi; that turns off useful extensions and
2211 # breaks some systems' header files.
2212 # AIX                   -qlanglvl=ansi
2213 # Ultrix and OSF/1      -std1
2214 # HP-UX                 -Aa -D_HPUX_SOURCE
2215 # SVR4                  -Xc
2216 # UnixWare 1.2          (cannot use -Xc, since ANSI/POSIX clashes)
2217 for cf_arg in "-DCC_HAS_PROTOS" \
2218         "" \
2219         -qlanglvl=ansi \
2220         -std1 \
2221         -Ae \
2222         "-Aa -D_HPUX_SOURCE" \
2223         -Xc
2224 do
2225
2226 cf_fix_cppflags=no
2227 cf_new_cflags=
2228 cf_new_cppflags=
2229 cf_new_extra_cppflags=
2230
2231 for cf_add_cflags in $cf_arg
2232 do
2233 case $cf_fix_cppflags in
2234 no)
2235         case $cf_add_cflags in #(vi
2236         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2237                 case $cf_add_cflags in
2238                 -D*)
2239                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2240
2241                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2242                                 && test -z "${cf_tst_cflags}" \
2243                                 && cf_fix_cppflags=yes
2244
2245                         if test $cf_fix_cppflags = yes ; then
2246                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2247                                 continue
2248                         elif test "${cf_tst_cflags}" = "\"'" ; then
2249                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2250                                 continue
2251                         fi
2252                         ;;
2253                 esac
2254                 case "$CPPFLAGS" in
2255                 *$cf_add_cflags) #(vi
2256                         ;;
2257                 *) #(vi
2258                         case $cf_add_cflags in #(vi
2259                         -D*)
2260                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2261
2262 CPPFLAGS=`echo "$CPPFLAGS" | \
2263         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2264                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2265
2266                                 ;;
2267                         esac
2268                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2269                         ;;
2270                 esac
2271                 ;;
2272         *)
2273                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2274                 ;;
2275         esac
2276         ;;
2277 yes)
2278         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2279
2280         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2281
2282         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2283                 && test -z "${cf_tst_cflags}" \
2284                 && cf_fix_cppflags=no
2285         ;;
2286 esac
2287 done
2288
2289 if test -n "$cf_new_cflags" ; then
2290
2291         CFLAGS="$CFLAGS $cf_new_cflags"
2292 fi
2293
2294 if test -n "$cf_new_cppflags" ; then
2295
2296         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
2297 fi
2298
2299 if test -n "$cf_new_extra_cppflags" ; then
2300
2301         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2302 fi
2303
2304         cat >conftest.$ac_ext <<_ACEOF
2305 #line 2305 "configure"
2306 #include "confdefs.h"
2307
2308 #ifndef CC_HAS_PROTOS
2309 #if !defined(__STDC__) || (__STDC__ != 1)
2310 choke me
2311 #endif
2312 #endif
2313
2314 int
2315 main ()
2316 {
2317
2318         int test (int i, double x);
2319         struct s1 {int (*f) (int a);};
2320         struct s2 {int (*f) (double a);};
2321   ;
2322   return 0;
2323 }
2324 _ACEOF
2325 rm -f conftest.$ac_objext
2326 if { (eval echo "$as_me:2326: \"$ac_compile\"") >&5
2327   (eval $ac_compile) 2>&5
2328   ac_status=$?
2329   echo "$as_me:2329: \$? = $ac_status" >&5
2330   (exit $ac_status); } &&
2331          { ac_try='test -s conftest.$ac_objext'
2332   { (eval echo "$as_me:2332: \"$ac_try\"") >&5
2333   (eval $ac_try) 2>&5
2334   ac_status=$?
2335   echo "$as_me:2335: \$? = $ac_status" >&5
2336   (exit $ac_status); }; }; then
2337   cf_cv_ansi_cc="$cf_arg"; break
2338 else
2339   echo "$as_me: failed program was:" >&5
2340 cat conftest.$ac_ext >&5
2341 fi
2342 rm -f conftest.$ac_objext conftest.$ac_ext
2343 done
2344 CFLAGS="$cf_save_CFLAGS"
2345 CPPFLAGS="$cf_save_CPPFLAGS"
2346
2347 fi
2348 echo "$as_me:2348: result: $cf_cv_ansi_cc" >&5
2349 echo "${ECHO_T}$cf_cv_ansi_cc" >&6
2350
2351 if test "$cf_cv_ansi_cc" != "no"; then
2352 if test ".$cf_cv_ansi_cc" != ".-DCC_HAS_PROTOS"; then
2353
2354 cf_fix_cppflags=no
2355 cf_new_cflags=
2356 cf_new_cppflags=
2357 cf_new_extra_cppflags=
2358
2359 for cf_add_cflags in $cf_cv_ansi_cc
2360 do
2361 case $cf_fix_cppflags in
2362 no)
2363         case $cf_add_cflags in #(vi
2364         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2365                 case $cf_add_cflags in
2366                 -D*)
2367                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2368
2369                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2370                                 && test -z "${cf_tst_cflags}" \
2371                                 && cf_fix_cppflags=yes
2372
2373                         if test $cf_fix_cppflags = yes ; then
2374                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2375                                 continue
2376                         elif test "${cf_tst_cflags}" = "\"'" ; then
2377                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2378                                 continue
2379                         fi
2380                         ;;
2381                 esac
2382                 case "$CPPFLAGS" in
2383                 *$cf_add_cflags) #(vi
2384                         ;;
2385                 *) #(vi
2386                         case $cf_add_cflags in #(vi
2387                         -D*)
2388                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2389
2390 CPPFLAGS=`echo "$CPPFLAGS" | \
2391         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2392                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2393
2394                                 ;;
2395                         esac
2396                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2397                         ;;
2398                 esac
2399                 ;;
2400         *)
2401                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2402                 ;;
2403         esac
2404         ;;
2405 yes)
2406         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2407
2408         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2409
2410         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2411                 && test -z "${cf_tst_cflags}" \
2412                 && cf_fix_cppflags=no
2413         ;;
2414 esac
2415 done
2416
2417 if test -n "$cf_new_cflags" ; then
2418
2419         CFLAGS="$CFLAGS $cf_new_cflags"
2420 fi
2421
2422 if test -n "$cf_new_cppflags" ; then
2423
2424         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
2425 fi
2426
2427 if test -n "$cf_new_extra_cppflags" ; then
2428
2429         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2430 fi
2431
2432 else
2433         cat >>confdefs.h <<\EOF
2434 #define CC_HAS_PROTOS 1
2435 EOF
2436
2437 fi
2438 fi
2439
2440 if test "$cf_cv_ansi_cc" = "no"; then
2441         { { echo "$as_me:2441: error: Your compiler does not appear to recognize prototypes.
2442 You have the following choices:
2443         a. adjust your compiler options
2444         b. get an up-to-date compiler
2445         c. use a wrapper such as unproto" >&5
2446 echo "$as_me: error: Your compiler does not appear to recognize prototypes.
2447 You have the following choices:
2448         a. adjust your compiler options
2449         b. get an up-to-date compiler
2450         c. use a wrapper such as unproto" >&2;}
2451    { (exit 1); exit 1; }; }
2452 fi
2453
2454 case $cf_cv_system_name in
2455 os2*)
2456     CFLAGS="$CFLAGS -Zmt"
2457     CPPFLAGS="$CPPFLAGS -D__ST_MT_ERRNO__"
2458     CXXFLAGS="$CXXFLAGS -Zmt"
2459     # autoconf's macro sets -Zexe and suffix both, which conflict:w
2460     LDFLAGS="$LDFLAGS -Zmt -Zcrtdll"
2461     ac_cv_exeext=.exe
2462     ;;
2463 esac
2464
2465 PROG_EXT="$EXEEXT"
2466
2467 test -n "$PROG_EXT" && cat >>confdefs.h <<EOF
2468 #define PROG_EXT "$PROG_EXT"
2469 EOF
2470
2471 test "$program_prefix" != NONE &&
2472   program_transform_name="s,^,$program_prefix,;$program_transform_name"
2473 # Use a double $ so make ignores it.
2474 test "$program_suffix" != NONE &&
2475   program_transform_name="s,\$,$program_suffix,;$program_transform_name"
2476 # Double any \ or $.  echo might interpret backslashes.
2477 # By default was `s,x,x', remove it if useless.
2478 cat <<\_ACEOF >conftest.sed
2479 s/[\\$]/&&/g;s/;s,x,x,$//
2480 _ACEOF
2481 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
2482 rm conftest.sed
2483
2484 for ac_prog in mawk gawk nawk awk
2485 do
2486   # Extract the first word of "$ac_prog", so it can be a program name with args.
2487 set dummy $ac_prog; ac_word=$2
2488 echo "$as_me:2488: checking for $ac_word" >&5
2489 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2490 if test "${ac_cv_prog_AWK+set}" = set; then
2491   echo $ECHO_N "(cached) $ECHO_C" >&6
2492 else
2493   if test -n "$AWK"; then
2494   ac_cv_prog_AWK="$AWK" # Let the user override the test.
2495 else
2496   ac_save_IFS=$IFS; IFS=$ac_path_separator
2497 ac_dummy="$PATH"
2498 for ac_dir in $ac_dummy; do
2499   IFS=$ac_save_IFS
2500   test -z "$ac_dir" && ac_dir=.
2501   $as_executable_p "$ac_dir/$ac_word" || continue
2502 ac_cv_prog_AWK="$ac_prog"
2503 echo "$as_me:2503: found $ac_dir/$ac_word" >&5
2504 break
2505 done
2506
2507 fi
2508 fi
2509 AWK=$ac_cv_prog_AWK
2510 if test -n "$AWK"; then
2511   echo "$as_me:2511: result: $AWK" >&5
2512 echo "${ECHO_T}$AWK" >&6
2513 else
2514   echo "$as_me:2514: result: no" >&5
2515 echo "${ECHO_T}no" >&6
2516 fi
2517
2518   test -n "$AWK" && break
2519 done
2520
2521 test -z "$AWK" && { { echo "$as_me:2521: error: No awk program found" >&5
2522 echo "$as_me: error: No awk program found" >&2;}
2523    { (exit 1); exit 1; }; }
2524
2525 echo "$as_me:2525: checking for egrep" >&5
2526 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
2527 if test "${ac_cv_prog_egrep+set}" = set; then
2528   echo $ECHO_N "(cached) $ECHO_C" >&6
2529 else
2530   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
2531     then ac_cv_prog_egrep='grep -E'
2532     else ac_cv_prog_egrep='egrep'
2533     fi
2534 fi
2535 echo "$as_me:2535: result: $ac_cv_prog_egrep" >&5
2536 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
2537  EGREP=$ac_cv_prog_egrep
2538
2539 test -z "$EGREP" && { { echo "$as_me:2539: error: No egrep program found" >&5
2540 echo "$as_me: error: No egrep program found" >&2;}
2541    { (exit 1); exit 1; }; }
2542
2543 # Find a good install program.  We prefer a C program (faster),
2544 # so one script is as good as another.  But avoid the broken or
2545 # incompatible versions:
2546 # SysV /etc/install, /usr/sbin/install
2547 # SunOS /usr/etc/install
2548 # IRIX /sbin/install
2549 # AIX /bin/install
2550 # AmigaOS /C/install, which installs bootblocks on floppy discs
2551 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2552 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2553 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2554 # ./install, which can be erroneously created by make from ./install.sh.
2555 echo "$as_me:2555: checking for a BSD compatible install" >&5
2556 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
2557 if test -z "$INSTALL"; then
2558 if test "${ac_cv_path_install+set}" = set; then
2559   echo $ECHO_N "(cached) $ECHO_C" >&6
2560 else
2561     ac_save_IFS=$IFS; IFS=$ac_path_separator
2562   for ac_dir in $PATH; do
2563     IFS=$ac_save_IFS
2564     # Account for people who put trailing slashes in PATH elements.
2565     case $ac_dir/ in
2566     / | ./ | .// | /cC/* \
2567     | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
2568     | /usr/ucb/* ) ;;
2569     *)
2570       # OSF1 and SCO ODT 3.0 have their own names for install.
2571       # Don't use installbsd from OSF since it installs stuff as root
2572       # by default.
2573       for ac_prog in ginstall scoinst install; do
2574         if $as_executable_p "$ac_dir/$ac_prog"; then
2575           if test $ac_prog = install &&
2576             grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2577             # AIX install.  It has an incompatible calling convention.
2578             :
2579           elif test $ac_prog = install &&
2580             grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2581             # program-specific install script used by HP pwplus--don't use.
2582             :
2583           else
2584             ac_cv_path_install="$ac_dir/$ac_prog -c"
2585             break 2
2586           fi
2587         fi
2588       done
2589       ;;
2590     esac
2591   done
2592
2593 fi
2594   if test "${ac_cv_path_install+set}" = set; then
2595     INSTALL=$ac_cv_path_install
2596   else
2597     # As a last resort, use the slow shell script.  We don't cache a
2598     # path for INSTALL within a source directory, because that will
2599     # break other packages using the cache if that directory is
2600     # removed, or if the path is relative.
2601     INSTALL=$ac_install_sh
2602   fi
2603 fi
2604 echo "$as_me:2604: result: $INSTALL" >&5
2605 echo "${ECHO_T}$INSTALL" >&6
2606
2607 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2608 # It thinks the first close brace ends the variable substitution.
2609 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2610
2611 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
2612
2613 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2614
2615 echo "$as_me:2615: checking whether ln -s works" >&5
2616 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
2617 LN_S=$as_ln_s
2618 if test "$LN_S" = "ln -s"; then
2619   echo "$as_me:2619: result: yes" >&5
2620 echo "${ECHO_T}yes" >&6
2621 else
2622   echo "$as_me:2622: result: no, using $LN_S" >&5
2623 echo "${ECHO_T}no, using $LN_S" >&6
2624 fi
2625
2626 echo "$as_me:2626: checking if $LN_S -f options work" >&5
2627 echo $ECHO_N "checking if $LN_S -f options work... $ECHO_C" >&6
2628
2629 rm -f conf$$.src conf$$dst
2630 echo >conf$$.dst
2631 echo first >conf$$.src
2632 if $LN_S -f conf$$.src conf$$.dst 2>/dev/null; then
2633         cf_prog_ln_sf=yes
2634 else
2635         cf_prog_ln_sf=no
2636 fi
2637 rm -f conf$$.dst conf$$src
2638 echo "$as_me:2638: result: $cf_prog_ln_sf" >&5
2639 echo "${ECHO_T}$cf_prog_ln_sf" >&6
2640
2641 test "$cf_prog_ln_sf" = yes && LN_S="$LN_S -f"
2642
2643 echo "$as_me:2643: checking for long file names" >&5
2644 echo $ECHO_N "checking for long file names... $ECHO_C" >&6
2645 if test "${ac_cv_sys_long_file_names+set}" = set; then
2646   echo $ECHO_N "(cached) $ECHO_C" >&6
2647 else
2648   ac_cv_sys_long_file_names=yes
2649 # Test for long file names in all the places we know might matter:
2650 #      .                the current directory, where building will happen
2651 #      $prefix/lib      where we will be installing things
2652 #      $exec_prefix/lib likewise
2653 # eval it to expand exec_prefix.
2654 #      $TMPDIR          if set, where it might want to write temporary files
2655 # if $TMPDIR is not set:
2656 #      /tmp             where it might want to write temporary files
2657 #      /var/tmp         likewise
2658 #      /usr/tmp         likewise
2659 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
2660   ac_tmpdirs=$TMPDIR
2661 else
2662   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
2663 fi
2664 for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
2665   test -d $ac_dir || continue
2666   test -w $ac_dir || continue # It is less confusing to not echo anything here.
2667   ac_xdir=$ac_dir/cf$$
2668   (umask 077 && mkdir $ac_xdir 2>/dev/null) || continue
2669   ac_tf1=$ac_xdir/conftest9012345
2670   ac_tf2=$ac_xdir/conftest9012346
2671   (echo 1 >$ac_tf1) 2>/dev/null
2672   (echo 2 >$ac_tf2) 2>/dev/null
2673   ac_val=`cat $ac_tf1 2>/dev/null`
2674   if test ! -f $ac_tf1 || test "$ac_val" != 1; then
2675     ac_cv_sys_long_file_names=no
2676     rm -rf $ac_xdir 2>/dev/null
2677     break
2678   fi
2679   rm -rf $ac_xdir 2>/dev/null
2680 done
2681 fi
2682 echo "$as_me:2682: result: $ac_cv_sys_long_file_names" >&5
2683 echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
2684 if test $ac_cv_sys_long_file_names = yes; then
2685
2686 cat >>confdefs.h <<\EOF
2687 #define HAVE_LONG_FILE_NAMES 1
2688 EOF
2689
2690 fi
2691
2692 # if we find pkg-config, check if we should install the ".pc" files.
2693
2694 echo "$as_me:2694: checking if you want to use pkg-config" >&5
2695 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
2696
2697 # Check whether --with-pkg-config or --without-pkg-config was given.
2698 if test "${with_pkg_config+set}" = set; then
2699   withval="$with_pkg_config"
2700   cf_pkg_config=$withval
2701 else
2702   cf_pkg_config=yes
2703 fi;
2704 echo "$as_me:2704: result: $cf_pkg_config" >&5
2705 echo "${ECHO_T}$cf_pkg_config" >&6
2706
2707 case $cf_pkg_config in #(vi
2708 no) #(vi
2709         PKG_CONFIG=none
2710         ;;
2711 yes) #(vi
2712         if test -n "$ac_tool_prefix"; then
2713   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
2714 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
2715 echo "$as_me:2715: checking for $ac_word" >&5
2716 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2717 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
2718   echo $ECHO_N "(cached) $ECHO_C" >&6
2719 else
2720   case $PKG_CONFIG in
2721   [\\/]* | ?:[\\/]*)
2722   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
2723   ;;
2724   *)
2725   ac_save_IFS=$IFS; IFS=$ac_path_separator
2726 ac_dummy="$PATH"
2727 for ac_dir in $ac_dummy; do
2728   IFS=$ac_save_IFS
2729   test -z "$ac_dir" && ac_dir=.
2730   if $as_executable_p "$ac_dir/$ac_word"; then
2731    ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
2732    echo "$as_me:2732: found $ac_dir/$ac_word" >&5
2733    break
2734 fi
2735 done
2736
2737   ;;
2738 esac
2739 fi
2740 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
2741
2742 if test -n "$PKG_CONFIG"; then
2743   echo "$as_me:2743: result: $PKG_CONFIG" >&5
2744 echo "${ECHO_T}$PKG_CONFIG" >&6
2745 else
2746   echo "$as_me:2746: result: no" >&5
2747 echo "${ECHO_T}no" >&6
2748 fi
2749
2750 fi
2751 if test -z "$ac_cv_path_PKG_CONFIG"; then
2752   ac_pt_PKG_CONFIG=$PKG_CONFIG
2753   # Extract the first word of "pkg-config", so it can be a program name with args.
2754 set dummy pkg-config; ac_word=$2
2755 echo "$as_me:2755: checking for $ac_word" >&5
2756 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2757 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
2758   echo $ECHO_N "(cached) $ECHO_C" >&6
2759 else
2760   case $ac_pt_PKG_CONFIG in
2761   [\\/]* | ?:[\\/]*)
2762   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
2763   ;;
2764   *)
2765   ac_save_IFS=$IFS; IFS=$ac_path_separator
2766 ac_dummy="$PATH"
2767 for ac_dir in $ac_dummy; do
2768   IFS=$ac_save_IFS
2769   test -z "$ac_dir" && ac_dir=.
2770   if $as_executable_p "$ac_dir/$ac_word"; then
2771    ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
2772    echo "$as_me:2772: found $ac_dir/$ac_word" >&5
2773    break
2774 fi
2775 done
2776
2777   test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
2778   ;;
2779 esac
2780 fi
2781 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
2782
2783 if test -n "$ac_pt_PKG_CONFIG"; then
2784   echo "$as_me:2784: result: $ac_pt_PKG_CONFIG" >&5
2785 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
2786 else
2787   echo "$as_me:2787: result: no" >&5
2788 echo "${ECHO_T}no" >&6
2789 fi
2790
2791   PKG_CONFIG=$ac_pt_PKG_CONFIG
2792 else
2793   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
2794 fi
2795
2796         ;;
2797 *)
2798         PKG_CONFIG=$withval
2799         ;;
2800 esac
2801
2802 test -z "$PKG_CONFIG" && PKG_CONFIG=none
2803 if test "$PKG_CONFIG" != none ; then
2804
2805 if test "x$prefix" != xNONE; then
2806   cf_path_syntax="$prefix"
2807 else
2808   cf_path_syntax="$ac_default_prefix"
2809 fi
2810
2811 case ".$PKG_CONFIG" in #(vi
2812 .\$\(*\)*|.\'*\'*) #(vi
2813   ;;
2814 ..|./*|.\\*) #(vi
2815   ;;
2816 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
2817   ;;
2818 .\${*prefix}*) #(vi
2819   eval PKG_CONFIG="$PKG_CONFIG"
2820   case ".$PKG_CONFIG" in #(vi
2821   .NONE/*)
2822     PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
2823     ;;
2824   esac
2825   ;; #(vi
2826 .no|.NONE/*)
2827   PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
2828   ;;
2829 *)
2830   { { echo "$as_me:2830: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
2831 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
2832    { (exit 1); exit 1; }; }
2833   ;;
2834 esac
2835
2836 fi
2837
2838 if test "$PKG_CONFIG" != none ; then
2839         echo "$as_me:2839: checking if we should install .pc files for $PKG_CONFIG" >&5
2840 echo $ECHO_N "checking if we should install .pc files for $PKG_CONFIG... $ECHO_C" >&6
2841
2842         # Leave this as something that can be overridden in the environment.
2843         if test -z "$PKG_CONFIG_LIBDIR" ; then
2844                 PKG_CONFIG_LIBDIR=`echo "$PKG_CONFIG" | sed -e 's,/[^/]*/[^/]*$,,'`/lib/pkgconfig
2845         fi
2846         PKG_CONFIG_LIBDIR=`echo "$PKG_CONFIG_LIBDIR" | sed -e 's/^://' -e 's/:.*//'`
2847         if test -n "$PKG_CONFIG_LIBDIR" && test -d "$PKG_CONFIG_LIBDIR" ; then
2848
2849 # Check whether --enable-pc-files or --disable-pc-files was given.
2850 if test "${enable_pc_files+set}" = set; then
2851   enableval="$enable_pc_files"
2852   enable_pc_files=$enableval
2853 else
2854   enable_pc_files=no
2855 fi;
2856                 echo "$as_me:2856: result: $enable_pc_files" >&5
2857 echo "${ECHO_T}$enable_pc_files" >&6
2858         else
2859                 echo "$as_me:2859: result: no" >&5
2860 echo "${ECHO_T}no" >&6
2861                 { echo "$as_me:2861: WARNING: did not find library $PKG_CONFIG_LIBDIR" >&5
2862 echo "$as_me: WARNING: did not find library $PKG_CONFIG_LIBDIR" >&2;}
2863                 enable_pc_files=no
2864         fi
2865 fi
2866
2867 echo "$as_me:2867: checking if you want to build test-programs" >&5
2868 echo $ECHO_N "checking if you want to build test-programs... $ECHO_C" >&6
2869
2870 # Check whether --with-tests or --without-tests was given.
2871 if test "${with_tests+set}" = set; then
2872   withval="$with_tests"
2873   cf_with_tests=$withval
2874 else
2875   cf_with_tests=yes
2876 fi;
2877 echo "$as_me:2877: result: $cf_with_tests" >&5
2878 echo "${ECHO_T}$cf_with_tests" >&6
2879
2880 echo "$as_me:2880: checking if we should assume mixed-case filenames" >&5
2881 echo $ECHO_N "checking if we should assume mixed-case filenames... $ECHO_C" >&6
2882
2883 # Check whether --enable-mixed-case or --disable-mixed-case was given.
2884 if test "${enable_mixed_case+set}" = set; then
2885   enableval="$enable_mixed_case"
2886   enable_mixedcase=$enableval
2887 else
2888   enable_mixedcase=auto
2889 fi;
2890 echo "$as_me:2890: result: $enable_mixedcase" >&5
2891 echo "${ECHO_T}$enable_mixedcase" >&6
2892 if test "$enable_mixedcase" = "auto" ; then
2893
2894 echo "$as_me:2894: checking if filesystem supports mixed-case filenames" >&5
2895 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
2896 if test "${cf_cv_mixedcase+set}" = set; then
2897   echo $ECHO_N "(cached) $ECHO_C" >&6
2898 else
2899
2900 if test "$cross_compiling" = yes ; then
2901         case $target_alias in #(vi
2902         *-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-mingw32*|*-uwin*) #(vi
2903                 cf_cv_mixedcase=no
2904                 ;;
2905         *)
2906                 cf_cv_mixedcase=yes
2907                 ;;
2908         esac
2909 else
2910         rm -f conftest CONFTEST
2911         echo test >conftest
2912         if test -f CONFTEST ; then
2913                 cf_cv_mixedcase=no
2914         else
2915                 cf_cv_mixedcase=yes
2916         fi
2917         rm -f conftest CONFTEST
2918 fi
2919
2920 fi
2921 echo "$as_me:2921: result: $cf_cv_mixedcase" >&5
2922 echo "${ECHO_T}$cf_cv_mixedcase" >&6
2923 test "$cf_cv_mixedcase" = yes && cat >>confdefs.h <<\EOF
2924 #define MIXEDCASE_FILENAMES 1
2925 EOF
2926
2927 else
2928     cf_cv_mixedcase=$enable_mixedcase
2929     if test "$enable_mixedcase" = "yes" ; then
2930         cat >>confdefs.h <<\EOF
2931 #define MIXEDCASE_FILENAMES 1
2932 EOF
2933
2934     fi
2935 fi
2936
2937 # do this after mixed-case option (tags/TAGS is not as important as tic).
2938 echo "$as_me:2938: checking whether ${MAKE-make} sets \${MAKE}" >&5
2939 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
2940 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
2941 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
2942   echo $ECHO_N "(cached) $ECHO_C" >&6
2943 else
2944   cat >conftest.make <<\EOF
2945 all:
2946         @echo 'ac_maketemp="${MAKE}"'
2947 EOF
2948 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
2949 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
2950 if test -n "$ac_maketemp"; then
2951   eval ac_cv_prog_make_${ac_make}_set=yes
2952 else
2953   eval ac_cv_prog_make_${ac_make}_set=no
2954 fi
2955 rm -f conftest.make
2956 fi
2957 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
2958   echo "$as_me:2958: result: yes" >&5
2959 echo "${ECHO_T}yes" >&6
2960   SET_MAKE=
2961 else
2962   echo "$as_me:2962: result: no" >&5
2963 echo "${ECHO_T}no" >&6
2964   SET_MAKE="MAKE=${MAKE-make}"
2965 fi
2966
2967 for ac_prog in exctags ctags
2968 do
2969   # Extract the first word of "$ac_prog", so it can be a program name with args.
2970 set dummy $ac_prog; ac_word=$2
2971 echo "$as_me:2971: checking for $ac_word" >&5
2972 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2973 if test "${ac_cv_prog_CTAGS+set}" = set; then
2974   echo $ECHO_N "(cached) $ECHO_C" >&6
2975 else
2976   if test -n "$CTAGS"; then
2977   ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
2978 else
2979   ac_save_IFS=$IFS; IFS=$ac_path_separator
2980 ac_dummy="$PATH"
2981 for ac_dir in $ac_dummy; do
2982   IFS=$ac_save_IFS
2983   test -z "$ac_dir" && ac_dir=.
2984   $as_executable_p "$ac_dir/$ac_word" || continue
2985 ac_cv_prog_CTAGS="$ac_prog"
2986 echo "$as_me:2986: found $ac_dir/$ac_word" >&5
2987 break
2988 done
2989
2990 fi
2991 fi
2992 CTAGS=$ac_cv_prog_CTAGS
2993 if test -n "$CTAGS"; then
2994   echo "$as_me:2994: result: $CTAGS" >&5
2995 echo "${ECHO_T}$CTAGS" >&6
2996 else
2997   echo "$as_me:2997: result: no" >&5
2998 echo "${ECHO_T}no" >&6
2999 fi
3000
3001   test -n "$CTAGS" && break
3002 done
3003
3004 for ac_prog in exetags etags
3005 do
3006   # Extract the first word of "$ac_prog", so it can be a program name with args.
3007 set dummy $ac_prog; ac_word=$2
3008 echo "$as_me:3008: checking for $ac_word" >&5
3009 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3010 if test "${ac_cv_prog_ETAGS+set}" = set; then
3011   echo $ECHO_N "(cached) $ECHO_C" >&6
3012 else
3013   if test -n "$ETAGS"; then
3014   ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
3015 else
3016   ac_save_IFS=$IFS; IFS=$ac_path_separator
3017 ac_dummy="$PATH"
3018 for ac_dir in $ac_dummy; do
3019   IFS=$ac_save_IFS
3020   test -z "$ac_dir" && ac_dir=.
3021   $as_executable_p "$ac_dir/$ac_word" || continue
3022 ac_cv_prog_ETAGS="$ac_prog"
3023 echo "$as_me:3023: found $ac_dir/$ac_word" >&5
3024 break
3025 done
3026
3027 fi
3028 fi
3029 ETAGS=$ac_cv_prog_ETAGS
3030 if test -n "$ETAGS"; then
3031   echo "$as_me:3031: result: $ETAGS" >&5
3032 echo "${ECHO_T}$ETAGS" >&6
3033 else
3034   echo "$as_me:3034: result: no" >&5
3035 echo "${ECHO_T}no" >&6
3036 fi
3037
3038   test -n "$ETAGS" && break
3039 done
3040
3041 # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
3042 set dummy ${CTAGS:-ctags}; ac_word=$2
3043 echo "$as_me:3043: checking for $ac_word" >&5
3044 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3045 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
3046   echo $ECHO_N "(cached) $ECHO_C" >&6
3047 else
3048   if test -n "$MAKE_LOWER_TAGS"; then
3049   ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
3050 else
3051   ac_save_IFS=$IFS; IFS=$ac_path_separator
3052 ac_dummy="$PATH"
3053 for ac_dir in $ac_dummy; do
3054   IFS=$ac_save_IFS
3055   test -z "$ac_dir" && ac_dir=.
3056   $as_executable_p "$ac_dir/$ac_word" || continue
3057 ac_cv_prog_MAKE_LOWER_TAGS="yes"
3058 echo "$as_me:3058: found $ac_dir/$ac_word" >&5
3059 break
3060 done
3061
3062   test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
3063 fi
3064 fi
3065 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
3066 if test -n "$MAKE_LOWER_TAGS"; then
3067   echo "$as_me:3067: result: $MAKE_LOWER_TAGS" >&5
3068 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
3069 else
3070   echo "$as_me:3070: result: no" >&5
3071 echo "${ECHO_T}no" >&6
3072 fi
3073
3074 if test "$cf_cv_mixedcase" = yes ; then
3075         # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
3076 set dummy ${ETAGS:-etags}; ac_word=$2
3077 echo "$as_me:3077: checking for $ac_word" >&5
3078 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3079 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
3080   echo $ECHO_N "(cached) $ECHO_C" >&6
3081 else
3082   if test -n "$MAKE_UPPER_TAGS"; then
3083   ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
3084 else
3085   ac_save_IFS=$IFS; IFS=$ac_path_separator
3086 ac_dummy="$PATH"
3087 for ac_dir in $ac_dummy; do
3088   IFS=$ac_save_IFS
3089   test -z "$ac_dir" && ac_dir=.
3090   $as_executable_p "$ac_dir/$ac_word" || continue
3091 ac_cv_prog_MAKE_UPPER_TAGS="yes"
3092 echo "$as_me:3092: found $ac_dir/$ac_word" >&5
3093 break
3094 done
3095
3096   test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
3097 fi
3098 fi
3099 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
3100 if test -n "$MAKE_UPPER_TAGS"; then
3101   echo "$as_me:3101: result: $MAKE_UPPER_TAGS" >&5
3102 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
3103 else
3104   echo "$as_me:3104: result: no" >&5
3105 echo "${ECHO_T}no" >&6
3106 fi
3107
3108 else
3109         MAKE_UPPER_TAGS=no
3110 fi
3111
3112 if test "$MAKE_UPPER_TAGS" = yes ; then
3113         MAKE_UPPER_TAGS=
3114 else
3115         MAKE_UPPER_TAGS="#"
3116 fi
3117
3118 if test "$MAKE_LOWER_TAGS" = yes ; then
3119         MAKE_LOWER_TAGS=
3120 else
3121         MAKE_LOWER_TAGS="#"
3122 fi
3123
3124 echo "$as_me:3124: checking for makeflags variable" >&5
3125 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
3126 if test "${cf_cv_makeflags+set}" = set; then
3127   echo $ECHO_N "(cached) $ECHO_C" >&6
3128 else
3129
3130         cf_cv_makeflags=''
3131         for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
3132         do
3133                 cat >cf_makeflags.tmp <<CF_EOF
3134 SHELL = /bin/sh
3135 all :
3136         @ echo '.$cf_option'
3137 CF_EOF
3138                 cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp 2>/dev/null | fgrep -v "ing directory" | sed -e 's,[    ]*$,,'`
3139                 case "$cf_result" in
3140                 .*k)
3141                         cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`
3142                         case "$cf_result" in
3143                         .*CC=*) cf_cv_makeflags=
3144                                 ;;
3145                         *)      cf_cv_makeflags=$cf_option
3146                                 ;;
3147                         esac
3148                         break
3149                         ;;
3150                 .-)     ;;
3151                 *)      echo "given option \"$cf_option\", no match \"$cf_result\""
3152                         ;;
3153                 esac
3154         done
3155         rm -f cf_makeflags.tmp
3156
3157 fi
3158 echo "$as_me:3158: result: $cf_cv_makeflags" >&5
3159 echo "${ECHO_T}$cf_cv_makeflags" >&6
3160
3161 if test -n "$ac_tool_prefix"; then
3162   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3163 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3164 echo "$as_me:3164: checking for $ac_word" >&5
3165 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3166 if test "${ac_cv_prog_RANLIB+set}" = set; then
3167   echo $ECHO_N "(cached) $ECHO_C" >&6
3168 else
3169   if test -n "$RANLIB"; then
3170   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3171 else
3172   ac_save_IFS=$IFS; IFS=$ac_path_separator
3173 ac_dummy="$PATH"
3174 for ac_dir in $ac_dummy; do
3175   IFS=$ac_save_IFS
3176   test -z "$ac_dir" && ac_dir=.
3177   $as_executable_p "$ac_dir/$ac_word" || continue
3178 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3179 echo "$as_me:3179: found $ac_dir/$ac_word" >&5
3180 break
3181 done
3182
3183 fi
3184 fi
3185 RANLIB=$ac_cv_prog_RANLIB
3186 if test -n "$RANLIB"; then
3187   echo "$as_me:3187: result: $RANLIB" >&5
3188 echo "${ECHO_T}$RANLIB" >&6
3189 else
3190   echo "$as_me:3190: result: no" >&5
3191 echo "${ECHO_T}no" >&6
3192 fi
3193
3194 fi
3195 if test -z "$ac_cv_prog_RANLIB"; then
3196   ac_ct_RANLIB=$RANLIB
3197   # Extract the first word of "ranlib", so it can be a program name with args.
3198 set dummy ranlib; ac_word=$2
3199 echo "$as_me:3199: checking for $ac_word" >&5
3200 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3201 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
3202   echo $ECHO_N "(cached) $ECHO_C" >&6
3203 else
3204   if test -n "$ac_ct_RANLIB"; then
3205   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
3206 else
3207   ac_save_IFS=$IFS; IFS=$ac_path_separator
3208 ac_dummy="$PATH"
3209 for ac_dir in $ac_dummy; do
3210   IFS=$ac_save_IFS
3211   test -z "$ac_dir" && ac_dir=.
3212   $as_executable_p "$ac_dir/$ac_word" || continue
3213 ac_cv_prog_ac_ct_RANLIB="ranlib"
3214 echo "$as_me:3214: found $ac_dir/$ac_word" >&5
3215 break
3216 done
3217
3218   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
3219 fi
3220 fi
3221 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3222 if test -n "$ac_ct_RANLIB"; then
3223   echo "$as_me:3223: result: $ac_ct_RANLIB" >&5
3224 echo "${ECHO_T}$ac_ct_RANLIB" >&6
3225 else
3226   echo "$as_me:3226: result: no" >&5
3227 echo "${ECHO_T}no" >&6
3228 fi
3229
3230   RANLIB=$ac_ct_RANLIB
3231 else
3232   RANLIB="$ac_cv_prog_RANLIB"
3233 fi
3234
3235 if test -n "$ac_tool_prefix"; then
3236   # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
3237 set dummy ${ac_tool_prefix}ld; ac_word=$2
3238 echo "$as_me:3238: checking for $ac_word" >&5
3239 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3240 if test "${ac_cv_prog_LD+set}" = set; then
3241   echo $ECHO_N "(cached) $ECHO_C" >&6
3242 else
3243   if test -n "$LD"; then
3244   ac_cv_prog_LD="$LD" # Let the user override the test.
3245 else
3246   ac_save_IFS=$IFS; IFS=$ac_path_separator
3247 ac_dummy="$PATH"
3248 for ac_dir in $ac_dummy; do
3249   IFS=$ac_save_IFS
3250   test -z "$ac_dir" && ac_dir=.
3251   $as_executable_p "$ac_dir/$ac_word" || continue
3252 ac_cv_prog_LD="${ac_tool_prefix}ld"
3253 echo "$as_me:3253: found $ac_dir/$ac_word" >&5
3254 break
3255 done
3256
3257 fi
3258 fi
3259 LD=$ac_cv_prog_LD
3260 if test -n "$LD"; then
3261   echo "$as_me:3261: result: $LD" >&5
3262 echo "${ECHO_T}$LD" >&6
3263 else
3264   echo "$as_me:3264: result: no" >&5
3265 echo "${ECHO_T}no" >&6
3266 fi
3267
3268 fi
3269 if test -z "$ac_cv_prog_LD"; then
3270   ac_ct_LD=$LD
3271   # Extract the first word of "ld", so it can be a program name with args.
3272 set dummy ld; ac_word=$2
3273 echo "$as_me:3273: checking for $ac_word" >&5
3274 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3275 if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
3276   echo $ECHO_N "(cached) $ECHO_C" >&6
3277 else
3278   if test -n "$ac_ct_LD"; then
3279   ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
3280 else
3281   ac_save_IFS=$IFS; IFS=$ac_path_separator
3282 ac_dummy="$PATH"
3283 for ac_dir in $ac_dummy; do
3284   IFS=$ac_save_IFS
3285   test -z "$ac_dir" && ac_dir=.
3286   $as_executable_p "$ac_dir/$ac_word" || continue
3287 ac_cv_prog_ac_ct_LD="ld"
3288 echo "$as_me:3288: found $ac_dir/$ac_word" >&5
3289 break
3290 done
3291
3292   test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
3293 fi
3294 fi
3295 ac_ct_LD=$ac_cv_prog_ac_ct_LD
3296 if test -n "$ac_ct_LD"; then
3297   echo "$as_me:3297: result: $ac_ct_LD" >&5
3298 echo "${ECHO_T}$ac_ct_LD" >&6
3299 else
3300   echo "$as_me:3300: result: no" >&5
3301 echo "${ECHO_T}no" >&6
3302 fi
3303
3304   LD=$ac_ct_LD
3305 else
3306   LD="$ac_cv_prog_LD"
3307 fi
3308
3309 if test -n "$ac_tool_prefix"; then
3310   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
3311 set dummy ${ac_tool_prefix}ar; ac_word=$2
3312 echo "$as_me:3312: checking for $ac_word" >&5
3313 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3314 if test "${ac_cv_prog_AR+set}" = set; then
3315   echo $ECHO_N "(cached) $ECHO_C" >&6
3316 else
3317   if test -n "$AR"; then
3318   ac_cv_prog_AR="$AR" # Let the user override the test.
3319 else
3320   ac_save_IFS=$IFS; IFS=$ac_path_separator
3321 ac_dummy="$PATH"
3322 for ac_dir in $ac_dummy; do
3323   IFS=$ac_save_IFS
3324   test -z "$ac_dir" && ac_dir=.
3325   $as_executable_p "$ac_dir/$ac_word" || continue
3326 ac_cv_prog_AR="${ac_tool_prefix}ar"
3327 echo "$as_me:3327: found $ac_dir/$ac_word" >&5
3328 break
3329 done
3330
3331 fi
3332 fi
3333 AR=$ac_cv_prog_AR
3334 if test -n "$AR"; then
3335   echo "$as_me:3335: result: $AR" >&5
3336 echo "${ECHO_T}$AR" >&6
3337 else
3338   echo "$as_me:3338: result: no" >&5
3339 echo "${ECHO_T}no" >&6
3340 fi
3341
3342 fi
3343 if test -z "$ac_cv_prog_AR"; then
3344   ac_ct_AR=$AR
3345   # Extract the first word of "ar", so it can be a program name with args.
3346 set dummy ar; ac_word=$2
3347 echo "$as_me:3347: checking for $ac_word" >&5
3348 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3349 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
3350   echo $ECHO_N "(cached) $ECHO_C" >&6
3351 else
3352   if test -n "$ac_ct_AR"; then
3353   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
3354 else
3355   ac_save_IFS=$IFS; IFS=$ac_path_separator
3356 ac_dummy="$PATH"
3357 for ac_dir in $ac_dummy; do
3358   IFS=$ac_save_IFS
3359   test -z "$ac_dir" && ac_dir=.
3360   $as_executable_p "$ac_dir/$ac_word" || continue
3361 ac_cv_prog_ac_ct_AR="ar"
3362 echo "$as_me:3362: found $ac_dir/$ac_word" >&5
3363 break
3364 done
3365
3366   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
3367 fi
3368 fi
3369 ac_ct_AR=$ac_cv_prog_ac_ct_AR
3370 if test -n "$ac_ct_AR"; then
3371   echo "$as_me:3371: result: $ac_ct_AR" >&5
3372 echo "${ECHO_T}$ac_ct_AR" >&6
3373 else
3374   echo "$as_me:3374: result: no" >&5
3375 echo "${ECHO_T}no" >&6
3376 fi
3377
3378   AR=$ac_ct_AR
3379 else
3380   AR="$ac_cv_prog_AR"
3381 fi
3382
3383 if test -n "$ac_tool_prefix"; then
3384   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
3385 set dummy ${ac_tool_prefix}ar; ac_word=$2
3386 echo "$as_me:3386: checking for $ac_word" >&5
3387 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3388 if test "${ac_cv_prog_AR+set}" = set; then
3389   echo $ECHO_N "(cached) $ECHO_C" >&6
3390 else
3391   if test -n "$AR"; then
3392   ac_cv_prog_AR="$AR" # Let the user override the test.
3393 else
3394   ac_save_IFS=$IFS; IFS=$ac_path_separator
3395 ac_dummy="$PATH"
3396 for ac_dir in $ac_dummy; do
3397   IFS=$ac_save_IFS
3398   test -z "$ac_dir" && ac_dir=.
3399   $as_executable_p "$ac_dir/$ac_word" || continue
3400 ac_cv_prog_AR="${ac_tool_prefix}ar"
3401 echo "$as_me:3401: found $ac_dir/$ac_word" >&5
3402 break
3403 done
3404
3405 fi
3406 fi
3407 AR=$ac_cv_prog_AR
3408 if test -n "$AR"; then
3409   echo "$as_me:3409: result: $AR" >&5
3410 echo "${ECHO_T}$AR" >&6
3411 else
3412   echo "$as_me:3412: result: no" >&5
3413 echo "${ECHO_T}no" >&6
3414 fi
3415
3416 fi
3417 if test -z "$ac_cv_prog_AR"; then
3418   ac_ct_AR=$AR
3419   # Extract the first word of "ar", so it can be a program name with args.
3420 set dummy ar; ac_word=$2
3421 echo "$as_me:3421: checking for $ac_word" >&5
3422 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3423 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
3424   echo $ECHO_N "(cached) $ECHO_C" >&6
3425 else
3426   if test -n "$ac_ct_AR"; then
3427   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
3428 else
3429   ac_save_IFS=$IFS; IFS=$ac_path_separator
3430 ac_dummy="$PATH"
3431 for ac_dir in $ac_dummy; do
3432   IFS=$ac_save_IFS
3433   test -z "$ac_dir" && ac_dir=.
3434   $as_executable_p "$ac_dir/$ac_word" || continue
3435 ac_cv_prog_ac_ct_AR="ar"
3436 echo "$as_me:3436: found $ac_dir/$ac_word" >&5
3437 break
3438 done
3439
3440   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
3441 fi
3442 fi
3443 ac_ct_AR=$ac_cv_prog_ac_ct_AR
3444 if test -n "$ac_ct_AR"; then
3445   echo "$as_me:3445: result: $ac_ct_AR" >&5
3446 echo "${ECHO_T}$ac_ct_AR" >&6
3447 else
3448   echo "$as_me:3448: result: no" >&5
3449 echo "${ECHO_T}no" >&6
3450 fi
3451
3452   AR=$ac_ct_AR
3453 else
3454   AR="$ac_cv_prog_AR"
3455 fi
3456
3457 echo "$as_me:3457: checking for options to update archives" >&5
3458 echo $ECHO_N "checking for options to update archives... $ECHO_C" >&6
3459 if test "${cf_cv_ar_flags+set}" = set; then
3460   echo $ECHO_N "(cached) $ECHO_C" >&6
3461 else
3462
3463         cf_cv_ar_flags=unknown
3464         for cf_ar_flags in -curv curv -crv crv -cqv cqv -rv rv
3465         do
3466
3467                 # check if $ARFLAGS already contains this choice
3468                 if test "x$ARFLAGS" != "x" ; then
3469                         cf_check_ar_flags=`echo "x$ARFLAGS" | sed -e "s/$cf_ar_flags\$//" -e "s/$cf_ar_flags / /"`
3470                         if test "x$ARFLAGS" != "$cf_check_ar_flags" ; then
3471                                 cf_cv_ar_flags=
3472                                 break
3473                         fi
3474                 fi
3475
3476                 rm -f conftest.$ac_cv_objext
3477                 rm -f conftest.a
3478
3479                 cat >conftest.$ac_ext <<EOF
3480 #line 3480 "configure"
3481 int     testdata[3] = { 123, 456, 789 };
3482 EOF
3483                 if { (eval echo "$as_me:3483: \"$ac_compile\"") >&5
3484   (eval $ac_compile) 2>&5
3485   ac_status=$?
3486   echo "$as_me:3486: \$? = $ac_status" >&5
3487   (exit $ac_status); } ; then
3488                         echo "$AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext" >&5
3489                         $AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext 2>&5 1>/dev/null
3490                         if test -f conftest.a ; then
3491                                 cf_cv_ar_flags=$cf_ar_flags
3492                                 break
3493                         fi
3494                 else
3495                         test -n "$verbose" && echo "    cannot compile test-program" 1>&6
3496
3497 echo "${as_me:-configure}:3497: testing cannot compile test-program ..." 1>&5
3498
3499                         break
3500                 fi
3501         done
3502         rm -f conftest.a conftest.$ac_ext conftest.$ac_cv_objext
3503
3504 fi
3505 echo "$as_me:3505: result: $cf_cv_ar_flags" >&5
3506 echo "${ECHO_T}$cf_cv_ar_flags" >&6
3507
3508 if test -n "$ARFLAGS" ; then
3509         if test -n "$cf_cv_ar_flags" ; then
3510                 ARFLAGS="$ARFLAGS $cf_cv_ar_flags"
3511         fi
3512 else
3513         ARFLAGS=$cf_cv_ar_flags
3514 fi
3515
3516 echo "$as_me:3516: checking if you have specified an install-prefix" >&5
3517 echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
3518
3519 # Check whether --with-install-prefix or --without-install-prefix was given.
3520 if test "${with_install_prefix+set}" = set; then
3521   withval="$with_install_prefix"
3522   case "$withval" in #(vi
3523         yes|no) #(vi
3524                 ;;
3525         *)      DESTDIR="$withval"
3526                 ;;
3527         esac
3528 fi;
3529 echo "$as_me:3529: result: $DESTDIR" >&5
3530 echo "${ECHO_T}$DESTDIR" >&6
3531
3532 ###############################################################################
3533
3534 # If we're cross-compiling, allow the user to override the tools and their
3535 # options.  The configure script is oriented toward identifying the host
3536 # compiler, etc., but we need a build compiler to generate parts of the source.
3537
3538 if test "$cross_compiling" = yes ; then
3539
3540         # defaults that we might want to override
3541         : ${BUILD_CFLAGS:=''}
3542         : ${BUILD_CPPFLAGS:=''}
3543         : ${BUILD_LDFLAGS:=''}
3544         : ${BUILD_LIBS:=''}
3545         : ${BUILD_EXEEXT:='$x'}
3546         : ${BUILD_OBJEXT:='o'}
3547
3548 # Check whether --with-build-cc or --without-build-cc was given.
3549 if test "${with_build_cc+set}" = set; then
3550   withval="$with_build_cc"
3551   BUILD_CC="$withval"
3552 else
3553   for ac_prog in gcc cc cl
3554 do
3555   # Extract the first word of "$ac_prog", so it can be a program name with args.
3556 set dummy $ac_prog; ac_word=$2
3557 echo "$as_me:3557: checking for $ac_word" >&5
3558 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3559 if test "${ac_cv_prog_BUILD_CC+set}" = set; then
3560   echo $ECHO_N "(cached) $ECHO_C" >&6
3561 else
3562   if test -n "$BUILD_CC"; then
3563   ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
3564 else
3565   ac_save_IFS=$IFS; IFS=$ac_path_separator
3566 ac_dummy="$PATH"
3567 for ac_dir in $ac_dummy; do
3568   IFS=$ac_save_IFS
3569   test -z "$ac_dir" && ac_dir=.
3570   $as_executable_p "$ac_dir/$ac_word" || continue
3571 ac_cv_prog_BUILD_CC="$ac_prog"
3572 echo "$as_me:3572: found $ac_dir/$ac_word" >&5
3573 break
3574 done
3575
3576 fi
3577 fi
3578 BUILD_CC=$ac_cv_prog_BUILD_CC
3579 if test -n "$BUILD_CC"; then
3580   echo "$as_me:3580: result: $BUILD_CC" >&5
3581 echo "${ECHO_T}$BUILD_CC" >&6
3582 else
3583   echo "$as_me:3583: result: no" >&5
3584 echo "${ECHO_T}no" >&6
3585 fi
3586
3587   test -n "$BUILD_CC" && break
3588 done
3589
3590 fi;
3591         echo "$as_me:3591: checking for native build C compiler" >&5
3592 echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
3593         echo "$as_me:3593: result: $BUILD_CC" >&5
3594 echo "${ECHO_T}$BUILD_CC" >&6
3595
3596         echo "$as_me:3596: checking for native build C preprocessor" >&5
3597 echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
3598
3599 # Check whether --with-build-cpp or --without-build-cpp was given.
3600 if test "${with_build_cpp+set}" = set; then
3601   withval="$with_build_cpp"
3602   BUILD_CPP="$withval"
3603 else
3604   BUILD_CPP='${BUILD_CC} -E'
3605 fi;
3606         echo "$as_me:3606: result: $BUILD_CPP" >&5
3607 echo "${ECHO_T}$BUILD_CPP" >&6
3608
3609         echo "$as_me:3609: checking for native build C flags" >&5
3610 echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
3611
3612 # Check whether --with-build-cflags or --without-build-cflags was given.
3613 if test "${with_build_cflags+set}" = set; then
3614   withval="$with_build_cflags"
3615   BUILD_CFLAGS="$withval"
3616 fi;
3617         echo "$as_me:3617: result: $BUILD_CFLAGS" >&5
3618 echo "${ECHO_T}$BUILD_CFLAGS" >&6
3619
3620         echo "$as_me:3620: checking for native build C preprocessor-flags" >&5
3621 echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
3622
3623 # Check whether --with-build-cppflags or --without-build-cppflags was given.
3624 if test "${with_build_cppflags+set}" = set; then
3625   withval="$with_build_cppflags"
3626   BUILD_CPPFLAGS="$withval"
3627 fi;
3628         echo "$as_me:3628: result: $BUILD_CPPFLAGS" >&5
3629 echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
3630
3631         echo "$as_me:3631: checking for native build linker-flags" >&5
3632 echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
3633
3634 # Check whether --with-build-ldflags or --without-build-ldflags was given.
3635 if test "${with_build_ldflags+set}" = set; then
3636   withval="$with_build_ldflags"
3637   BUILD_LDFLAGS="$withval"
3638 fi;
3639         echo "$as_me:3639: result: $BUILD_LDFLAGS" >&5
3640 echo "${ECHO_T}$BUILD_LDFLAGS" >&6
3641
3642         echo "$as_me:3642: checking for native build linker-libraries" >&5
3643 echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
3644
3645 # Check whether --with-build-libs or --without-build-libs was given.
3646 if test "${with_build_libs+set}" = set; then
3647   withval="$with_build_libs"
3648   BUILD_LIBS="$withval"
3649 fi;
3650         echo "$as_me:3650: result: $BUILD_LIBS" >&5
3651 echo "${ECHO_T}$BUILD_LIBS" >&6
3652
3653         # this assumes we're on Unix.
3654         BUILD_EXEEXT=
3655         BUILD_OBJEXT=o
3656
3657         : ${BUILD_CC:='${CC}'}
3658
3659         if ( test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '${CC}' ) ; then
3660                 { { echo "$as_me:3660: error: Cross-build requires two compilers.
3661 Use --with-build-cc to specify the native compiler." >&5
3662 echo "$as_me: error: Cross-build requires two compilers.
3663 Use --with-build-cc to specify the native compiler." >&2;}
3664    { (exit 1); exit 1; }; }
3665         fi
3666
3667 else
3668         : ${BUILD_CC:='${CC}'}
3669         : ${BUILD_CPP:='${CPP}'}
3670         : ${BUILD_CFLAGS:='${CFLAGS}'}
3671         : ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
3672         : ${BUILD_LDFLAGS:='${LDFLAGS}'}
3673         : ${BUILD_LIBS:='${LIBS}'}
3674         : ${BUILD_EXEEXT:='$x'}
3675         : ${BUILD_OBJEXT:='o'}
3676 fi
3677
3678 ###############################################################################
3679
3680 ### Options to allow the user to specify the set of libraries which are used.
3681 ### Use "--without-normal --with-shared" to allow the default model to be
3682 ### shared, for example.
3683 cf_list_models=""
3684
3685 echo "$as_me:3685: checking if you want to build shared C-objects" >&5
3686 echo $ECHO_N "checking if you want to build shared C-objects... $ECHO_C" >&6
3687
3688 # Check whether --with-shared or --without-shared was given.
3689 if test "${with_shared+set}" = set; then
3690   withval="$with_shared"
3691   with_shared=$withval
3692 else
3693   with_shared=no
3694 fi;
3695 echo "$as_me:3695: result: $with_shared" >&5
3696 echo "${ECHO_T}$with_shared" >&6
3697 test "$with_shared" = "yes" && cf_list_models="$cf_list_models shared"
3698
3699 echo "$as_me:3699: checking for specified models" >&5
3700 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
3701 test -z "$cf_list_models" && cf_list_models=normal
3702 echo "$as_me:3702: result: $cf_list_models" >&5
3703 echo "${ECHO_T}$cf_list_models" >&6
3704
3705 ### Use the first model as the default, and save its suffix for use in building
3706 ### up test-applications.
3707 echo "$as_me:3707: checking for default model" >&5
3708 echo $ECHO_N "checking for default model... $ECHO_C" >&6
3709 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
3710 echo "$as_me:3710: result: $DFT_LWR_MODEL" >&5
3711 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
3712
3713 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
3714
3715 echo "$as_me:3715: checking for specific curses-directory" >&5
3716 echo $ECHO_N "checking for specific curses-directory... $ECHO_C" >&6
3717
3718 # Check whether --with-curses-dir or --without-curses-dir was given.
3719 if test "${with_curses_dir+set}" = set; then
3720   withval="$with_curses_dir"
3721   cf_cv_curses_dir=$withval
3722 else
3723   cf_cv_curses_dir=no
3724 fi;
3725 echo "$as_me:3725: result: $cf_cv_curses_dir" >&5
3726 echo "${ECHO_T}$cf_cv_curses_dir" >&6
3727
3728 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
3729 then
3730
3731 if test "x$prefix" != xNONE; then
3732   cf_path_syntax="$prefix"
3733 else
3734   cf_path_syntax="$ac_default_prefix"
3735 fi
3736
3737 case ".$withval" in #(vi
3738 .\$\(*\)*|.\'*\'*) #(vi
3739   ;;
3740 ..|./*|.\\*) #(vi
3741   ;;
3742 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
3743   ;;
3744 .\${*prefix}*) #(vi
3745   eval withval="$withval"
3746   case ".$withval" in #(vi
3747   .NONE/*)
3748     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
3749     ;;
3750   esac
3751   ;; #(vi
3752 .no|.NONE/*)
3753   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
3754   ;;
3755 *)
3756   { { echo "$as_me:3756: error: expected a pathname, not \"$withval\"" >&5
3757 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
3758    { (exit 1); exit 1; }; }
3759   ;;
3760 esac
3761
3762         if test -d "$cf_cv_curses_dir"
3763         then
3764
3765 if test -n "$cf_cv_curses_dir/include" ; then
3766   for cf_add_incdir in $cf_cv_curses_dir/include
3767   do
3768         while test $cf_add_incdir != /usr/include
3769         do
3770           if test -d $cf_add_incdir
3771           then
3772                 cf_have_incdir=no
3773                 if test -n "$CFLAGS$CPPFLAGS" ; then
3774                   # a loop is needed to ensure we can add subdirs of existing dirs
3775                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
3776                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
3777                           cf_have_incdir=yes; break
3778                         fi
3779                   done
3780                 fi
3781
3782                 if test "$cf_have_incdir" = no ; then
3783                   if test "$cf_add_incdir" = /usr/local/include ; then
3784                         if test "$GCC" = yes
3785                         then
3786                           cf_save_CPPFLAGS=$CPPFLAGS
3787                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
3788                           cat >conftest.$ac_ext <<_ACEOF
3789 #line 3789 "configure"
3790 #include "confdefs.h"
3791 #include <stdio.h>
3792 int
3793 main ()
3794 {
3795 printf("Hello")
3796   ;
3797   return 0;
3798 }
3799 _ACEOF
3800 rm -f conftest.$ac_objext
3801 if { (eval echo "$as_me:3801: \"$ac_compile\"") >&5
3802   (eval $ac_compile) 2>&5
3803   ac_status=$?
3804   echo "$as_me:3804: \$? = $ac_status" >&5
3805   (exit $ac_status); } &&
3806          { ac_try='test -s conftest.$ac_objext'
3807   { (eval echo "$as_me:3807: \"$ac_try\"") >&5
3808   (eval $ac_try) 2>&5
3809   ac_status=$?
3810   echo "$as_me:3810: \$? = $ac_status" >&5
3811   (exit $ac_status); }; }; then
3812   :
3813 else
3814   echo "$as_me: failed program was:" >&5
3815 cat conftest.$ac_ext >&5
3816 cf_have_incdir=yes
3817 fi
3818 rm -f conftest.$ac_objext conftest.$ac_ext
3819                           CPPFLAGS=$cf_save_CPPFLAGS
3820                         fi
3821                   fi
3822                 fi
3823
3824                 if test "$cf_have_incdir" = no ; then
3825                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
3826
3827 echo "${as_me:-configure}:3827: testing adding $cf_add_incdir to include-path ..." 1>&5
3828
3829                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
3830
3831                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
3832                   test "$cf_top_incdir" = "$cf_add_incdir" && break
3833                   cf_add_incdir="$cf_top_incdir"
3834                 else
3835                   break
3836                 fi
3837           fi
3838         done
3839   done
3840 fi
3841
3842 if test -n "$cf_cv_curses_dir/lib" ; then
3843   for cf_add_libdir in $cf_cv_curses_dir/lib
3844   do
3845     if test $cf_add_libdir = /usr/lib ; then
3846       :
3847     elif test -d $cf_add_libdir
3848     then
3849       cf_have_libdir=no
3850       if test -n "$LDFLAGS$LIBS" ; then
3851         # a loop is needed to ensure we can add subdirs of existing dirs
3852         for cf_test_libdir in $LDFLAGS $LIBS ; do
3853           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
3854             cf_have_libdir=yes; break
3855           fi
3856         done
3857       fi
3858       if test "$cf_have_libdir" = no ; then
3859         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
3860
3861 echo "${as_me:-configure}:3861: testing adding $cf_add_libdir to library-path ..." 1>&5
3862
3863         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
3864       fi
3865     fi
3866   done
3867 fi
3868
3869         fi
3870 fi
3871
3872 echo "$as_me:3872: checking if you want wide-character code" >&5
3873 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
3874
3875 # Check whether --enable-widec or --disable-widec was given.
3876 if test "${enable_widec+set}" = set; then
3877   enableval="$enable_widec"
3878   with_widec=$enableval
3879 else
3880   with_widec=no
3881 fi;
3882 echo "$as_me:3882: result: $with_widec" >&5
3883 echo "${ECHO_T}$with_widec" >&6
3884 if test "$with_widec" = yes ; then
3885
3886 echo "$as_me:3886: checking for multibyte character support" >&5
3887 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
3888 if test "${cf_cv_utf8_lib+set}" = set; then
3889   echo $ECHO_N "(cached) $ECHO_C" >&6
3890 else
3891
3892         cf_save_LIBS="$LIBS"
3893         cat >conftest.$ac_ext <<_ACEOF
3894 #line 3894 "configure"
3895 #include "confdefs.h"
3896
3897 #include <stdlib.h>
3898 int
3899 main ()
3900 {
3901 putwc(0,0);
3902   ;
3903   return 0;
3904 }
3905 _ACEOF
3906 rm -f conftest.$ac_objext conftest$ac_exeext
3907 if { (eval echo "$as_me:3907: \"$ac_link\"") >&5
3908   (eval $ac_link) 2>&5
3909   ac_status=$?
3910   echo "$as_me:3910: \$? = $ac_status" >&5
3911   (exit $ac_status); } &&
3912          { ac_try='test -s conftest$ac_exeext'
3913   { (eval echo "$as_me:3913: \"$ac_try\"") >&5
3914   (eval $ac_try) 2>&5
3915   ac_status=$?
3916   echo "$as_me:3916: \$? = $ac_status" >&5
3917   (exit $ac_status); }; }; then
3918   cf_cv_utf8_lib=yes
3919 else
3920   echo "$as_me: failed program was:" >&5
3921 cat conftest.$ac_ext >&5
3922
3923 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
3924 # will be set on completion of the AC_TRY_LINK below.
3925 cf_cv_header_path_utf8=
3926 cf_cv_library_path_utf8=
3927
3928 echo "${as_me:-configure}:3928: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
3929
3930 cf_save_LIBS="$LIBS"
3931
3932 cat >conftest.$ac_ext <<_ACEOF
3933 #line 3933 "configure"
3934 #include "confdefs.h"
3935
3936 #include <libutf8.h>
3937 int
3938 main ()
3939 {
3940 putwc(0,0);
3941   ;
3942   return 0;
3943 }
3944 _ACEOF
3945 rm -f conftest.$ac_objext conftest$ac_exeext
3946 if { (eval echo "$as_me:3946: \"$ac_link\"") >&5
3947   (eval $ac_link) 2>&5
3948   ac_status=$?
3949   echo "$as_me:3949: \$? = $ac_status" >&5
3950   (exit $ac_status); } &&
3951          { ac_try='test -s conftest$ac_exeext'
3952   { (eval echo "$as_me:3952: \"$ac_try\"") >&5
3953   (eval $ac_try) 2>&5
3954   ac_status=$?
3955   echo "$as_me:3955: \$? = $ac_status" >&5
3956   (exit $ac_status); }; }; then
3957
3958         cf_cv_find_linkage_utf8=yes
3959         cf_cv_header_path_utf8=/usr/include
3960         cf_cv_library_path_utf8=/usr/lib
3961
3962 else
3963   echo "$as_me: failed program was:" >&5
3964 cat conftest.$ac_ext >&5
3965
3966 LIBS="-lutf8  $cf_save_LIBS"
3967
3968 cat >conftest.$ac_ext <<_ACEOF
3969 #line 3969 "configure"
3970 #include "confdefs.h"
3971
3972 #include <libutf8.h>
3973 int
3974 main ()
3975 {
3976 putwc(0,0);
3977   ;
3978   return 0;
3979 }
3980 _ACEOF
3981 rm -f conftest.$ac_objext conftest$ac_exeext
3982 if { (eval echo "$as_me:3982: \"$ac_link\"") >&5
3983   (eval $ac_link) 2>&5
3984   ac_status=$?
3985   echo "$as_me:3985: \$? = $ac_status" >&5
3986   (exit $ac_status); } &&
3987          { ac_try='test -s conftest$ac_exeext'
3988   { (eval echo "$as_me:3988: \"$ac_try\"") >&5
3989   (eval $ac_try) 2>&5
3990   ac_status=$?
3991   echo "$as_me:3991: \$? = $ac_status" >&5
3992   (exit $ac_status); }; }; then
3993
3994         cf_cv_find_linkage_utf8=yes
3995         cf_cv_header_path_utf8=/usr/include
3996         cf_cv_library_path_utf8=/usr/lib
3997         cf_cv_library_file_utf8="-lutf8"
3998
3999 else
4000   echo "$as_me: failed program was:" >&5
4001 cat conftest.$ac_ext >&5
4002
4003         cf_cv_find_linkage_utf8=no
4004         LIBS="$cf_save_LIBS"
4005
4006     test -n "$verbose" && echo "        find linkage for utf8 library" 1>&6
4007
4008 echo "${as_me:-configure}:4008: testing find linkage for utf8 library ..." 1>&5
4009
4010 echo "${as_me:-configure}:4010: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
4011
4012     cf_save_CPPFLAGS="$CPPFLAGS"
4013     cf_test_CPPFLAGS="$CPPFLAGS"
4014
4015 cf_search=
4016
4017 # collect the current set of include-directories from compiler flags
4018 cf_header_path_list=""
4019 if test -n "${CFLAGS}${CPPFLAGS}" ; then
4020         for cf_header_path in $CPPFLAGS $CFLAGS
4021         do
4022                 case $cf_header_path in #(vi
4023                 -I*)
4024                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
4025
4026 test "$cf_header_path" != "NONE" && \
4027 test -d "$cf_header_path" && \
4028  {
4029         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
4030         test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
4031         test -d $cf_header_path/include/utf8 &&       cf_search="$cf_search $cf_header_path/include/utf8"
4032         test -d $cf_header_path/include/utf8/include &&    cf_search="$cf_search $cf_header_path/include/utf8/include"
4033         test -d $cf_header_path/utf8/include &&       cf_search="$cf_search $cf_header_path/utf8/include"
4034         test -d $cf_header_path/utf8/include/utf8 &&    cf_search="$cf_search $cf_header_path/utf8/include/utf8"
4035 }
4036
4037                         cf_header_path_list="$cf_header_path_list $cf_search"
4038                         ;;
4039                 esac
4040         done
4041 fi
4042
4043 # add the variations for the package we are looking for
4044
4045 cf_search=
4046
4047 test "/usr" != "$prefix" && \
4048 test -d "/usr" && \
4049 (test $prefix = NONE || test "/usr" != "$prefix") && {
4050         test -n "$verbose" && echo "    ... testing for include-directories under /usr"
4051         test -d /usr/include &&          cf_search="$cf_search /usr/include"
4052         test -d /usr/include/utf8 &&       cf_search="$cf_search /usr/include/utf8"
4053         test -d /usr/include/utf8/include &&    cf_search="$cf_search /usr/include/utf8/include"
4054         test -d /usr/utf8/include &&       cf_search="$cf_search /usr/utf8/include"
4055         test -d /usr/utf8/include/utf8 &&    cf_search="$cf_search /usr/utf8/include/utf8"
4056 }
4057
4058 test "$prefix" != "NONE" && \
4059 test -d "$prefix" && \
4060  {
4061         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
4062         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
4063         test -d $prefix/include/utf8 &&       cf_search="$cf_search $prefix/include/utf8"
4064         test -d $prefix/include/utf8/include &&    cf_search="$cf_search $prefix/include/utf8/include"
4065         test -d $prefix/utf8/include &&       cf_search="$cf_search $prefix/utf8/include"
4066         test -d $prefix/utf8/include/utf8 &&    cf_search="$cf_search $prefix/utf8/include/utf8"
4067 }
4068
4069 test "/usr/local" != "$prefix" && \
4070 test -d "/usr/local" && \
4071 (test $prefix = NONE || test "/usr/local" != "$prefix") && {
4072         test -n "$verbose" && echo "    ... testing for include-directories under /usr/local"
4073         test -d /usr/local/include &&          cf_search="$cf_search /usr/local/include"
4074         test -d /usr/local/include/utf8 &&       cf_search="$cf_search /usr/local/include/utf8"
4075         test -d /usr/local/include/utf8/include &&    cf_search="$cf_search /usr/local/include/utf8/include"
4076         test -d /usr/local/utf8/include &&       cf_search="$cf_search /usr/local/utf8/include"
4077         test -d /usr/local/utf8/include/utf8 &&    cf_search="$cf_search /usr/local/utf8/include/utf8"
4078 }
4079
4080 test "/opt" != "$prefix" && \
4081 test -d "/opt" && \
4082 (test $prefix = NONE || test "/opt" != "$prefix") && {
4083         test -n "$verbose" && echo "    ... testing for include-directories under /opt"
4084         test -d /opt/include &&          cf_search="$cf_search /opt/include"
4085         test -d /opt/include/utf8 &&       cf_search="$cf_search /opt/include/utf8"
4086         test -d /opt/include/utf8/include &&    cf_search="$cf_search /opt/include/utf8/include"
4087         test -d /opt/utf8/include &&       cf_search="$cf_search /opt/utf8/include"
4088         test -d /opt/utf8/include/utf8 &&    cf_search="$cf_search /opt/utf8/include/utf8"
4089 }
4090
4091 test "$HOME" != "$prefix" && \
4092 test -d "$HOME" && \
4093 (test $prefix = NONE || test "$HOME" != "$prefix") && {
4094         test -n "$verbose" && echo "    ... testing for include-directories under $HOME"
4095         test -d $HOME/include &&          cf_search="$cf_search $HOME/include"
4096         test -d $HOME/include/utf8 &&       cf_search="$cf_search $HOME/include/utf8"
4097         test -d $HOME/include/utf8/include &&    cf_search="$cf_search $HOME/include/utf8/include"
4098         test -d $HOME/utf8/include &&       cf_search="$cf_search $HOME/utf8/include"
4099         test -d $HOME/utf8/include/utf8 &&    cf_search="$cf_search $HOME/utf8/include/utf8"
4100 }
4101
4102 test "$includedir" != NONE && \
4103 test "$includedir" != "/usr/include" && \
4104 test -d "$includedir" && {
4105         test -d $includedir &&    cf_search="$cf_search $includedir"
4106         test -d $includedir/utf8 && cf_search="$cf_search $includedir/utf8"
4107 }
4108
4109 test "$oldincludedir" != NONE && \
4110 test "$oldincludedir" != "/usr/include" && \
4111 test -d "$oldincludedir" && {
4112         test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
4113         test -d $oldincludedir/utf8 && cf_search="$cf_search $oldincludedir/utf8"
4114 }
4115
4116 cf_search="$cf_search $cf_header_path_list"
4117
4118     for cf_cv_header_path_utf8 in $cf_search
4119     do
4120       if test -d $cf_cv_header_path_utf8 ; then
4121         test -n "$verbose" && echo "    ... testing $cf_cv_header_path_utf8" 1>&6
4122
4123 echo "${as_me:-configure}:4123: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
4124
4125         CPPFLAGS="$cf_save_CPPFLAGS -I$cf_cv_header_path_utf8"
4126         cat >conftest.$ac_ext <<_ACEOF
4127 #line 4127 "configure"
4128 #include "confdefs.h"
4129
4130 #include <libutf8.h>
4131 int
4132 main ()
4133 {
4134 putwc(0,0);
4135   ;
4136   return 0;
4137 }
4138 _ACEOF
4139 rm -f conftest.$ac_objext
4140 if { (eval echo "$as_me:4140: \"$ac_compile\"") >&5
4141   (eval $ac_compile) 2>&5
4142   ac_status=$?
4143   echo "$as_me:4143: \$? = $ac_status" >&5
4144   (exit $ac_status); } &&
4145          { ac_try='test -s conftest.$ac_objext'
4146   { (eval echo "$as_me:4146: \"$ac_try\"") >&5
4147   (eval $ac_try) 2>&5
4148   ac_status=$?
4149   echo "$as_me:4149: \$? = $ac_status" >&5
4150   (exit $ac_status); }; }; then
4151
4152             test -n "$verbose" && echo "        ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
4153
4154 echo "${as_me:-configure}:4154: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
4155
4156             cf_cv_find_linkage_utf8=maybe
4157             cf_test_CPPFLAGS="$CPPFLAGS"
4158             break
4159 else
4160   echo "$as_me: failed program was:" >&5
4161 cat conftest.$ac_ext >&5
4162
4163             CPPFLAGS="$cf_save_CPPFLAGS"
4164
4165 fi
4166 rm -f conftest.$ac_objext conftest.$ac_ext
4167       fi
4168     done
4169
4170     if test "$cf_cv_find_linkage_utf8" = maybe ; then
4171
4172 echo "${as_me:-configure}:4172: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
4173
4174       cf_save_LIBS="$LIBS"
4175       cf_save_LDFLAGS="$LDFLAGS"
4176
4177       if test "$cf_cv_find_linkage_utf8" != yes ; then
4178
4179 cf_search=
4180 cf_library_path_list=""
4181 if test -n "${LDFLAGS}${LIBS}" ; then
4182         for cf_library_path in $LDFLAGS $LIBS
4183         do
4184                 case $cf_library_path in #(vi
4185                 -L*)
4186                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
4187
4188 test "$cf_library_path" != "NONE" && \
4189 test -d "$cf_library_path" && \
4190  {
4191         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
4192         test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
4193         test -d $cf_library_path/lib/utf8 &&       cf_search="$cf_search $cf_library_path/lib/utf8"
4194         test -d $cf_library_path/lib/utf8/lib &&    cf_search="$cf_search $cf_library_path/lib/utf8/lib"
4195         test -d $cf_library_path/utf8/lib &&       cf_search="$cf_search $cf_library_path/utf8/lib"
4196         test -d $cf_library_path/utf8/lib/utf8 &&    cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
4197 }
4198
4199                         cf_library_path_list="$cf_library_path_list $cf_search"
4200                         ;;
4201                 esac
4202         done
4203 fi
4204
4205 cf_search=
4206
4207 test "/usr" != "$prefix" && \
4208 test -d "/usr" && \
4209 (test $prefix = NONE || test "/usr" != "$prefix") && {
4210         test -n "$verbose" && echo "    ... testing for lib-directories under /usr"
4211         test -d /usr/lib &&          cf_search="$cf_search /usr/lib"
4212         test -d /usr/lib/utf8 &&       cf_search="$cf_search /usr/lib/utf8"
4213         test -d /usr/lib/utf8/lib &&    cf_search="$cf_search /usr/lib/utf8/lib"
4214         test -d /usr/utf8/lib &&       cf_search="$cf_search /usr/utf8/lib"
4215         test -d /usr/utf8/lib/utf8 &&    cf_search="$cf_search /usr/utf8/lib/utf8"
4216 }
4217
4218 test "$prefix" != "NONE" && \
4219 test -d "$prefix" && \
4220  {
4221         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
4222         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
4223         test -d $prefix/lib/utf8 &&       cf_search="$cf_search $prefix/lib/utf8"
4224         test -d $prefix/lib/utf8/lib &&    cf_search="$cf_search $prefix/lib/utf8/lib"
4225         test -d $prefix/utf8/lib &&       cf_search="$cf_search $prefix/utf8/lib"
4226         test -d $prefix/utf8/lib/utf8 &&    cf_search="$cf_search $prefix/utf8/lib/utf8"
4227 }
4228
4229 test "/usr/local" != "$prefix" && \
4230 test -d "/usr/local" && \
4231 (test $prefix = NONE || test "/usr/local" != "$prefix") && {
4232         test -n "$verbose" && echo "    ... testing for lib-directories under /usr/local"
4233         test -d /usr/local/lib &&          cf_search="$cf_search /usr/local/lib"
4234         test -d /usr/local/lib/utf8 &&       cf_search="$cf_search /usr/local/lib/utf8"
4235         test -d /usr/local/lib/utf8/lib &&    cf_search="$cf_search /usr/local/lib/utf8/lib"
4236         test -d /usr/local/utf8/lib &&       cf_search="$cf_search /usr/local/utf8/lib"
4237         test -d /usr/local/utf8/lib/utf8 &&    cf_search="$cf_search /usr/local/utf8/lib/utf8"
4238 }
4239
4240 test "/opt" != "$prefix" && \
4241 test -d "/opt" && \
4242 (test $prefix = NONE || test "/opt" != "$prefix") && {
4243         test -n "$verbose" && echo "    ... testing for lib-directories under /opt"
4244         test -d /opt/lib &&          cf_search="$cf_search /opt/lib"
4245         test -d /opt/lib/utf8 &&       cf_search="$cf_search /opt/lib/utf8"
4246         test -d /opt/lib/utf8/lib &&    cf_search="$cf_search /opt/lib/utf8/lib"
4247         test -d /opt/utf8/lib &&       cf_search="$cf_search /opt/utf8/lib"
4248         test -d /opt/utf8/lib/utf8 &&    cf_search="$cf_search /opt/utf8/lib/utf8"
4249 }
4250
4251 test "$HOME" != "$prefix" && \
4252 test -d "$HOME" && \
4253 (test $prefix = NONE || test "$HOME" != "$prefix") && {
4254         test -n "$verbose" && echo "    ... testing for lib-directories under $HOME"
4255         test -d $HOME/lib &&          cf_search="$cf_search $HOME/lib"
4256         test -d $HOME/lib/utf8 &&       cf_search="$cf_search $HOME/lib/utf8"
4257         test -d $HOME/lib/utf8/lib &&    cf_search="$cf_search $HOME/lib/utf8/lib"
4258         test -d $HOME/utf8/lib &&       cf_search="$cf_search $HOME/utf8/lib"
4259         test -d $HOME/utf8/lib/utf8 &&    cf_search="$cf_search $HOME/utf8/lib/utf8"
4260 }
4261
4262 cf_search="$cf_library_path_list $cf_search"
4263
4264         for cf_cv_library_path_utf8 in $cf_search
4265         do
4266           if test -d $cf_cv_library_path_utf8 ; then
4267             test -n "$verbose" && echo "        ... testing $cf_cv_library_path_utf8" 1>&6
4268
4269 echo "${as_me:-configure}:4269: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
4270
4271             CPPFLAGS="$cf_test_CPPFLAGS"
4272             LIBS="-lutf8  $cf_save_LIBS"
4273             LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
4274             cat >conftest.$ac_ext <<_ACEOF
4275 #line 4275 "configure"
4276 #include "confdefs.h"
4277
4278 #include <libutf8.h>
4279 int
4280 main ()
4281 {
4282 putwc(0,0);
4283   ;
4284   return 0;
4285 }
4286 _ACEOF
4287 rm -f conftest.$ac_objext conftest$ac_exeext
4288 if { (eval echo "$as_me:4288: \"$ac_link\"") >&5
4289   (eval $ac_link) 2>&5
4290   ac_status=$?
4291   echo "$as_me:4291: \$? = $ac_status" >&5
4292   (exit $ac_status); } &&
4293          { ac_try='test -s conftest$ac_exeext'
4294   { (eval echo "$as_me:4294: \"$ac_try\"") >&5
4295   (eval $ac_try) 2>&5
4296   ac_status=$?
4297   echo "$as_me:4297: \$? = $ac_status" >&5
4298   (exit $ac_status); }; }; then
4299
4300                 test -n "$verbose" && echo "    ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
4301
4302 echo "${as_me:-configure}:4302: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
4303
4304                 cf_cv_find_linkage_utf8=yes
4305                 cf_cv_library_file_utf8="-lutf8"
4306                 break
4307 else
4308   echo "$as_me: failed program was:" >&5
4309 cat conftest.$ac_ext >&5
4310
4311                 CPPFLAGS="$cf_save_CPPFLAGS"
4312                 LIBS="$cf_save_LIBS"
4313                 LDFLAGS="$cf_save_LDFLAGS"
4314
4315 fi
4316 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4317           fi
4318         done
4319         CPPFLAGS="$cf_save_CPPFLAGS"
4320         LDFLAGS="$cf_save_LDFLAGS"
4321       fi
4322
4323     else
4324       cf_cv_find_linkage_utf8=no
4325     fi
4326
4327 fi
4328 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4329
4330 fi
4331 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4332
4333 LIBS="$cf_save_LIBS"
4334
4335 if test "$cf_cv_find_linkage_utf8" = yes ; then
4336 cf_cv_utf8_lib=add-on
4337 else
4338 cf_cv_utf8_lib=no
4339 fi
4340
4341 fi
4342 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4343 fi
4344 echo "$as_me:4344: result: $cf_cv_utf8_lib" >&5
4345 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
4346
4347 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
4348 # ncurses/ncursesw:
4349 if test "$cf_cv_utf8_lib" = "add-on" ; then
4350         cat >>confdefs.h <<\EOF
4351 #define HAVE_LIBUTF8_H 1
4352 EOF
4353
4354 if test -n "$cf_cv_header_path_utf8" ; then
4355   for cf_add_incdir in $cf_cv_header_path_utf8
4356   do
4357         while test $cf_add_incdir != /usr/include
4358         do
4359           if test -d $cf_add_incdir
4360           then
4361                 cf_have_incdir=no
4362                 if test -n "$CFLAGS$CPPFLAGS" ; then
4363                   # a loop is needed to ensure we can add subdirs of existing dirs
4364                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
4365                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
4366                           cf_have_incdir=yes; break
4367                         fi
4368                   done
4369                 fi
4370
4371                 if test "$cf_have_incdir" = no ; then
4372                   if test "$cf_add_incdir" = /usr/local/include ; then
4373                         if test "$GCC" = yes
4374                         then
4375                           cf_save_CPPFLAGS=$CPPFLAGS
4376                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4377                           cat >conftest.$ac_ext <<_ACEOF
4378 #line 4378 "configure"
4379 #include "confdefs.h"
4380 #include <stdio.h>
4381 int
4382 main ()
4383 {
4384 printf("Hello")
4385   ;
4386   return 0;
4387 }
4388 _ACEOF
4389 rm -f conftest.$ac_objext
4390 if { (eval echo "$as_me:4390: \"$ac_compile\"") >&5
4391   (eval $ac_compile) 2>&5
4392   ac_status=$?
4393   echo "$as_me:4393: \$? = $ac_status" >&5
4394   (exit $ac_status); } &&
4395          { ac_try='test -s conftest.$ac_objext'
4396   { (eval echo "$as_me:4396: \"$ac_try\"") >&5
4397   (eval $ac_try) 2>&5
4398   ac_status=$?
4399   echo "$as_me:4399: \$? = $ac_status" >&5
4400   (exit $ac_status); }; }; then
4401   :
4402 else
4403   echo "$as_me: failed program was:" >&5
4404 cat conftest.$ac_ext >&5
4405 cf_have_incdir=yes
4406 fi
4407 rm -f conftest.$ac_objext conftest.$ac_ext
4408                           CPPFLAGS=$cf_save_CPPFLAGS
4409                         fi
4410                   fi
4411                 fi
4412
4413                 if test "$cf_have_incdir" = no ; then
4414                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
4415
4416 echo "${as_me:-configure}:4416: testing adding $cf_add_incdir to include-path ..." 1>&5
4417
4418                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4419
4420                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
4421                   test "$cf_top_incdir" = "$cf_add_incdir" && break
4422                   cf_add_incdir="$cf_top_incdir"
4423                 else
4424                   break
4425                 fi
4426           fi
4427         done
4428   done
4429 fi
4430
4431 if test -n "$cf_cv_library_path_utf8" ; then
4432   for cf_add_libdir in $cf_cv_library_path_utf8
4433   do
4434     if test $cf_add_libdir = /usr/lib ; then
4435       :
4436     elif test -d $cf_add_libdir
4437     then
4438       cf_have_libdir=no
4439       if test -n "$LDFLAGS$LIBS" ; then
4440         # a loop is needed to ensure we can add subdirs of existing dirs
4441         for cf_test_libdir in $LDFLAGS $LIBS ; do
4442           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
4443             cf_have_libdir=yes; break
4444           fi
4445         done
4446       fi
4447       if test "$cf_have_libdir" = no ; then
4448         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
4449
4450 echo "${as_me:-configure}:4450: testing adding $cf_add_libdir to library-path ..." 1>&5
4451
4452         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
4453       fi
4454     fi
4455   done
4456 fi
4457
4458         LIBS="$cf_cv_library_file_utf8 $LIBS"
4459 fi
4460
4461 cf_ncuconfig_root=ncursesw
4462
4463 echo "Looking for ${cf_ncuconfig_root}-config"
4464 for ac_prog in ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
4465 do
4466   # Extract the first word of "$ac_prog", so it can be a program name with args.
4467 set dummy $ac_prog; ac_word=$2
4468 echo "$as_me:4468: checking for $ac_word" >&5
4469 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4470 if test "${ac_cv_path_NCURSES_CONFIG+set}" = set; then
4471   echo $ECHO_N "(cached) $ECHO_C" >&6
4472 else
4473   case $NCURSES_CONFIG in
4474   [\\/]* | ?:[\\/]*)
4475   ac_cv_path_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test with a path.
4476   ;;
4477   *)
4478   ac_save_IFS=$IFS; IFS=$ac_path_separator
4479 ac_dummy="$PATH"
4480 for ac_dir in $ac_dummy; do
4481   IFS=$ac_save_IFS
4482   test -z "$ac_dir" && ac_dir=.
4483   if $as_executable_p "$ac_dir/$ac_word"; then
4484    ac_cv_path_NCURSES_CONFIG="$ac_dir/$ac_word"
4485    echo "$as_me:4485: found $ac_dir/$ac_word" >&5
4486    break
4487 fi
4488 done
4489
4490   ;;
4491 esac
4492 fi
4493 NCURSES_CONFIG=$ac_cv_path_NCURSES_CONFIG
4494
4495 if test -n "$NCURSES_CONFIG"; then
4496   echo "$as_me:4496: result: $NCURSES_CONFIG" >&5
4497 echo "${ECHO_T}$NCURSES_CONFIG" >&6
4498 else
4499   echo "$as_me:4499: result: no" >&5
4500 echo "${ECHO_T}no" >&6
4501 fi
4502
4503   test -n "$NCURSES_CONFIG" && break
4504 done
4505 test -n "$NCURSES_CONFIG" || NCURSES_CONFIG="none"
4506
4507 if test "$NCURSES_CONFIG" != none ; then
4508
4509 CPPFLAGS="$CPPFLAGS `$NCURSES_CONFIG --cflags`"
4510 LIBS="`$NCURSES_CONFIG --libs` $LIBS"
4511
4512 # even with config script, some packages use no-override for curses.h
4513
4514 echo "$as_me:4514: checking if we have identified curses headers" >&5
4515 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
4516 if test "${cf_cv_ncurses_header+set}" = set; then
4517   echo $ECHO_N "(cached) $ECHO_C" >&6
4518 else
4519
4520 cf_cv_ncurses_header=none
4521 for cf_header in  \
4522     ncursesw/curses.h \
4523         ncursesw/ncurses.h \
4524         curses.h \
4525         ncurses.h
4526 do
4527 cat >conftest.$ac_ext <<_ACEOF
4528 #line 4528 "configure"
4529 #include "confdefs.h"
4530 #include <${cf_header}>
4531 int
4532 main ()
4533 {
4534 initscr(); tgoto("?", 0,0)
4535   ;
4536   return 0;
4537 }
4538 _ACEOF
4539 rm -f conftest.$ac_objext
4540 if { (eval echo "$as_me:4540: \"$ac_compile\"") >&5
4541   (eval $ac_compile) 2>&5
4542   ac_status=$?
4543   echo "$as_me:4543: \$? = $ac_status" >&5
4544   (exit $ac_status); } &&
4545          { ac_try='test -s conftest.$ac_objext'
4546   { (eval echo "$as_me:4546: \"$ac_try\"") >&5
4547   (eval $ac_try) 2>&5
4548   ac_status=$?
4549   echo "$as_me:4549: \$? = $ac_status" >&5
4550   (exit $ac_status); }; }; then
4551   cf_cv_ncurses_header=$cf_header; break
4552 else
4553   echo "$as_me: failed program was:" >&5
4554 cat conftest.$ac_ext >&5
4555 fi
4556 rm -f conftest.$ac_objext conftest.$ac_ext
4557 done
4558
4559 fi
4560 echo "$as_me:4560: result: $cf_cv_ncurses_header" >&5
4561 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
4562
4563 if test "$cf_cv_ncurses_header" = none ; then
4564         { { echo "$as_me:4564: error: No curses header-files found" >&5
4565 echo "$as_me: error: No curses header-files found" >&2;}
4566    { (exit 1); exit 1; }; }
4567 fi
4568
4569 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
4570
4571 for ac_header in $cf_cv_ncurses_header
4572 do
4573 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4574 echo "$as_me:4574: checking for $ac_header" >&5
4575 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4576 if eval "test \"\${$as_ac_Header+set}\" = set"; then
4577   echo $ECHO_N "(cached) $ECHO_C" >&6
4578 else
4579   cat >conftest.$ac_ext <<_ACEOF
4580 #line 4580 "configure"
4581 #include "confdefs.h"
4582 #include <$ac_header>
4583 _ACEOF
4584 if { (eval echo "$as_me:4584: \"$ac_cpp conftest.$ac_ext\"") >&5
4585   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4586   ac_status=$?
4587   egrep -v '^ *\+' conftest.er1 >conftest.err
4588   rm -f conftest.er1
4589   cat conftest.err >&5
4590   echo "$as_me:4590: \$? = $ac_status" >&5
4591   (exit $ac_status); } >/dev/null; then
4592   if test -s conftest.err; then
4593     ac_cpp_err=$ac_c_preproc_warn_flag
4594   else
4595     ac_cpp_err=
4596   fi
4597 else
4598   ac_cpp_err=yes
4599 fi
4600 if test -z "$ac_cpp_err"; then
4601   eval "$as_ac_Header=yes"
4602 else
4603   echo "$as_me: failed program was:" >&5
4604   cat conftest.$ac_ext >&5
4605   eval "$as_ac_Header=no"
4606 fi
4607 rm -f conftest.err conftest.$ac_ext
4608 fi
4609 echo "$as_me:4609: result: `eval echo '${'$as_ac_Header'}'`" >&5
4610 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4611 if test `eval echo '${'$as_ac_Header'}'` = yes; then
4612   cat >>confdefs.h <<EOF
4613 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4614 EOF
4615
4616 fi
4617 done
4618
4619 cat >>confdefs.h <<\EOF
4620 #define NCURSES 1
4621 EOF
4622
4623 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
4624
4625 cat >>confdefs.h <<EOF
4626 #define $cf_nculib_ROOT 1
4627 EOF
4628
4629 cf_cv_ncurses_version=`$NCURSES_CONFIG --version`
4630
4631 else
4632
4633 cf_ncuhdr_root=ncursesw
4634
4635 test -n "$cf_cv_curses_dir" && \
4636 test "$cf_cv_curses_dir" != "no" && { \
4637
4638 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
4639   for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
4640   do
4641         while test $cf_add_incdir != /usr/include
4642         do
4643           if test -d $cf_add_incdir
4644           then
4645                 cf_have_incdir=no
4646                 if test -n "$CFLAGS$CPPFLAGS" ; then
4647                   # a loop is needed to ensure we can add subdirs of existing dirs
4648                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
4649                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
4650                           cf_have_incdir=yes; break
4651                         fi
4652                   done
4653                 fi
4654
4655                 if test "$cf_have_incdir" = no ; then
4656                   if test "$cf_add_incdir" = /usr/local/include ; then
4657                         if test "$GCC" = yes
4658                         then
4659                           cf_save_CPPFLAGS=$CPPFLAGS
4660                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4661                           cat >conftest.$ac_ext <<_ACEOF
4662 #line 4662 "configure"
4663 #include "confdefs.h"
4664 #include <stdio.h>
4665 int
4666 main ()
4667 {
4668 printf("Hello")
4669   ;
4670   return 0;
4671 }
4672 _ACEOF
4673 rm -f conftest.$ac_objext
4674 if { (eval echo "$as_me:4674: \"$ac_compile\"") >&5
4675   (eval $ac_compile) 2>&5
4676   ac_status=$?
4677   echo "$as_me:4677: \$? = $ac_status" >&5
4678   (exit $ac_status); } &&
4679          { ac_try='test -s conftest.$ac_objext'
4680   { (eval echo "$as_me:4680: \"$ac_try\"") >&5
4681   (eval $ac_try) 2>&5
4682   ac_status=$?
4683   echo "$as_me:4683: \$? = $ac_status" >&5
4684   (exit $ac_status); }; }; then
4685   :
4686 else
4687   echo "$as_me: failed program was:" >&5
4688 cat conftest.$ac_ext >&5
4689 cf_have_incdir=yes
4690 fi
4691 rm -f conftest.$ac_objext conftest.$ac_ext
4692                           CPPFLAGS=$cf_save_CPPFLAGS
4693                         fi
4694                   fi
4695                 fi
4696
4697                 if test "$cf_have_incdir" = no ; then
4698                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
4699
4700 echo "${as_me:-configure}:4700: testing adding $cf_add_incdir to include-path ..." 1>&5
4701
4702                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4703
4704                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
4705                   test "$cf_top_incdir" = "$cf_add_incdir" && break
4706                   cf_add_incdir="$cf_top_incdir"
4707                 else
4708                   break
4709                 fi
4710           fi
4711         done
4712   done
4713 fi
4714
4715 }
4716
4717 echo "$as_me:4717: checking for $cf_ncuhdr_root header in include-path" >&5
4718 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
4719 if test "${cf_cv_ncurses_h+set}" = set; then
4720   echo $ECHO_N "(cached) $ECHO_C" >&6
4721 else
4722
4723         cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
4724         ( test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw ) && cf_header_list="$cf_header_list curses.h ncurses.h"
4725         for cf_header in $cf_header_list
4726         do
4727
4728         cat >conftest.$ac_ext <<_ACEOF
4729 #line 4729 "configure"
4730 #include "confdefs.h"
4731
4732 #define _XOPEN_SOURCE_EXTENDED
4733 #undef  HAVE_LIBUTF8_H  /* in case we used CF_UTF8_LIB */
4734 #define HAVE_LIBUTF8_H  /* to force ncurses' header file to use cchar_t */
4735
4736 #include <$cf_header>
4737 int
4738 main ()
4739 {
4740
4741 #ifdef NCURSES_VERSION
4742
4743 #ifndef WACS_BSSB
4744         make an error
4745 #endif
4746
4747 printf("%s\n", NCURSES_VERSION);
4748 #else
4749 #ifdef __NCURSES_H
4750 printf("old\n");
4751 #else
4752         make an error
4753 #endif
4754 #endif
4755
4756   ;
4757   return 0;
4758 }
4759 _ACEOF
4760 rm -f conftest.$ac_objext
4761 if { (eval echo "$as_me:4761: \"$ac_compile\"") >&5
4762   (eval $ac_compile) 2>&5
4763   ac_status=$?
4764   echo "$as_me:4764: \$? = $ac_status" >&5
4765   (exit $ac_status); } &&
4766          { ac_try='test -s conftest.$ac_objext'
4767   { (eval echo "$as_me:4767: \"$ac_try\"") >&5
4768   (eval $ac_try) 2>&5
4769   ac_status=$?
4770   echo "$as_me:4770: \$? = $ac_status" >&5
4771   (exit $ac_status); }; }; then
4772   cf_cv_ncurses_h=$cf_header
4773
4774 else
4775   echo "$as_me: failed program was:" >&5
4776 cat conftest.$ac_ext >&5
4777 cf_cv_ncurses_h=no
4778 fi
4779 rm -f conftest.$ac_objext conftest.$ac_ext
4780
4781                 test "$cf_cv_ncurses_h" != no && break
4782         done
4783
4784 fi
4785 echo "$as_me:4785: result: $cf_cv_ncurses_h" >&5
4786 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
4787
4788 if test "$cf_cv_ncurses_h" != no ; then
4789         cf_cv_ncurses_header=$cf_cv_ncurses_h
4790 else
4791
4792 echo "$as_me:4792: checking for $cf_ncuhdr_root include-path" >&5
4793 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
4794 if test "${cf_cv_ncurses_h2+set}" = set; then
4795   echo $ECHO_N "(cached) $ECHO_C" >&6
4796 else
4797
4798         test -n "$verbose" && echo
4799
4800 cf_search=
4801
4802 # collect the current set of include-directories from compiler flags
4803 cf_header_path_list=""
4804 if test -n "${CFLAGS}${CPPFLAGS}" ; then
4805         for cf_header_path in $CPPFLAGS $CFLAGS
4806         do
4807                 case $cf_header_path in #(vi
4808                 -I*)
4809                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
4810
4811 test "$cf_header_path" != "NONE" && \
4812 test -d "$cf_header_path" && \
4813  {
4814         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
4815         test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
4816         test -d $cf_header_path/include/$cf_ncuhdr_root &&       cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
4817         test -d $cf_header_path/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
4818         test -d $cf_header_path/$cf_ncuhdr_root/include &&       cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
4819         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"
4820 }
4821
4822                         cf_header_path_list="$cf_header_path_list $cf_search"
4823                         ;;
4824                 esac
4825         done
4826 fi
4827
4828 # add the variations for the package we are looking for
4829
4830 cf_search=
4831
4832 test "/usr" != "$prefix" && \
4833 test -d "/usr" && \
4834 (test $prefix = NONE || test "/usr" != "$prefix") && {
4835         test -n "$verbose" && echo "    ... testing for include-directories under /usr"
4836         test -d /usr/include &&          cf_search="$cf_search /usr/include"
4837         test -d /usr/include/$cf_ncuhdr_root &&       cf_search="$cf_search /usr/include/$cf_ncuhdr_root"
4838         test -d /usr/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search /usr/include/$cf_ncuhdr_root/include"
4839         test -d /usr/$cf_ncuhdr_root/include &&       cf_search="$cf_search /usr/$cf_ncuhdr_root/include"
4840         test -d /usr/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search /usr/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
4841 }
4842
4843 test "$prefix" != "NONE" && \
4844 test -d "$prefix" && \
4845  {
4846         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
4847         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
4848         test -d $prefix/include/$cf_ncuhdr_root &&       cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
4849         test -d $prefix/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
4850         test -d $prefix/$cf_ncuhdr_root/include &&       cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
4851         test -d $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
4852 }
4853
4854 test "/usr/local" != "$prefix" && \
4855 test -d "/usr/local" && \
4856 (test $prefix = NONE || test "/usr/local" != "$prefix") && {
4857         test -n "$verbose" && echo "    ... testing for include-directories under /usr/local"
4858         test -d /usr/local/include &&          cf_search="$cf_search /usr/local/include"
4859         test -d /usr/local/include/$cf_ncuhdr_root &&       cf_search="$cf_search /usr/local/include/$cf_ncuhdr_root"
4860         test -d /usr/local/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search /usr/local/include/$cf_ncuhdr_root/include"
4861         test -d /usr/local/$cf_ncuhdr_root/include &&       cf_search="$cf_search /usr/local/$cf_ncuhdr_root/include"
4862         test -d /usr/local/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search /usr/local/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
4863 }
4864
4865 test "/opt" != "$prefix" && \
4866 test -d "/opt" && \
4867 (test $prefix = NONE || test "/opt" != "$prefix") && {
4868         test -n "$verbose" && echo "    ... testing for include-directories under /opt"
4869         test -d /opt/include &&          cf_search="$cf_search /opt/include"
4870         test -d /opt/include/$cf_ncuhdr_root &&       cf_search="$cf_search /opt/include/$cf_ncuhdr_root"
4871         test -d /opt/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search /opt/include/$cf_ncuhdr_root/include"
4872         test -d /opt/$cf_ncuhdr_root/include &&       cf_search="$cf_search /opt/$cf_ncuhdr_root/include"
4873         test -d /opt/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search /opt/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
4874 }
4875
4876 test "$HOME" != "$prefix" && \
4877 test -d "$HOME" && \
4878 (test $prefix = NONE || test "$HOME" != "$prefix") && {
4879         test -n "$verbose" && echo "    ... testing for include-directories under $HOME"
4880         test -d $HOME/include &&          cf_search="$cf_search $HOME/include"
4881         test -d $HOME/include/$cf_ncuhdr_root &&       cf_search="$cf_search $HOME/include/$cf_ncuhdr_root"
4882         test -d $HOME/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search $HOME/include/$cf_ncuhdr_root/include"
4883         test -d $HOME/$cf_ncuhdr_root/include &&       cf_search="$cf_search $HOME/$cf_ncuhdr_root/include"
4884         test -d $HOME/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search $HOME/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
4885 }
4886
4887 test "$includedir" != NONE && \
4888 test "$includedir" != "/usr/include" && \
4889 test -d "$includedir" && {
4890         test -d $includedir &&    cf_search="$cf_search $includedir"
4891         test -d $includedir/$cf_ncuhdr_root && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
4892 }
4893
4894 test "$oldincludedir" != NONE && \
4895 test "$oldincludedir" != "/usr/include" && \
4896 test -d "$oldincludedir" && {
4897         test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
4898         test -d $oldincludedir/$cf_ncuhdr_root && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
4899 }
4900
4901 cf_search="$cf_search $cf_header_path_list"
4902
4903         test -n "$verbose" && echo search path $cf_search
4904         cf_save2_CPPFLAGS="$CPPFLAGS"
4905         for cf_incdir in $cf_search
4906         do
4907
4908 if test -n "$cf_incdir" ; then
4909   for cf_add_incdir in $cf_incdir
4910   do
4911         while test $cf_add_incdir != /usr/include
4912         do
4913           if test -d $cf_add_incdir
4914           then
4915                 cf_have_incdir=no
4916                 if test -n "$CFLAGS$CPPFLAGS" ; then
4917                   # a loop is needed to ensure we can add subdirs of existing dirs
4918                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
4919                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
4920                           cf_have_incdir=yes; break
4921                         fi
4922                   done
4923                 fi
4924
4925                 if test "$cf_have_incdir" = no ; then
4926                   if test "$cf_add_incdir" = /usr/local/include ; then
4927                         if test "$GCC" = yes
4928                         then
4929                           cf_save_CPPFLAGS=$CPPFLAGS
4930                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4931                           cat >conftest.$ac_ext <<_ACEOF
4932 #line 4932 "configure"
4933 #include "confdefs.h"
4934 #include <stdio.h>
4935 int
4936 main ()
4937 {
4938 printf("Hello")
4939   ;
4940   return 0;
4941 }
4942 _ACEOF
4943 rm -f conftest.$ac_objext
4944 if { (eval echo "$as_me:4944: \"$ac_compile\"") >&5
4945   (eval $ac_compile) 2>&5
4946   ac_status=$?
4947   echo "$as_me:4947: \$? = $ac_status" >&5
4948   (exit $ac_status); } &&
4949          { ac_try='test -s conftest.$ac_objext'
4950   { (eval echo "$as_me:4950: \"$ac_try\"") >&5
4951   (eval $ac_try) 2>&5
4952   ac_status=$?
4953   echo "$as_me:4953: \$? = $ac_status" >&5
4954   (exit $ac_status); }; }; then
4955   :
4956 else
4957   echo "$as_me: failed program was:" >&5
4958 cat conftest.$ac_ext >&5
4959 cf_have_incdir=yes
4960 fi
4961 rm -f conftest.$ac_objext conftest.$ac_ext
4962                           CPPFLAGS=$cf_save_CPPFLAGS
4963                         fi
4964                   fi
4965                 fi
4966
4967                 if test "$cf_have_incdir" = no ; then
4968                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
4969
4970 echo "${as_me:-configure}:4970: testing adding $cf_add_incdir to include-path ..." 1>&5
4971
4972                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4973
4974                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
4975                   test "$cf_top_incdir" = "$cf_add_incdir" && break
4976                   cf_add_incdir="$cf_top_incdir"
4977                 else
4978                   break
4979                 fi
4980           fi
4981         done
4982   done
4983 fi
4984
4985                 for cf_header in \
4986                         ncurses.h \
4987                         curses.h
4988                 do
4989
4990         cat >conftest.$ac_ext <<_ACEOF
4991 #line 4991 "configure"
4992 #include "confdefs.h"
4993
4994 #include <$cf_header>
4995 int
4996 main ()
4997 {
4998
4999 #ifdef NCURSES_VERSION
5000
5001 printf("%s\n", NCURSES_VERSION);
5002 #else
5003 #ifdef __NCURSES_H
5004 printf("old\n");
5005 #else
5006         make an error
5007 #endif
5008 #endif
5009
5010   ;
5011   return 0;
5012 }
5013 _ACEOF
5014 rm -f conftest.$ac_objext
5015 if { (eval echo "$as_me:5015: \"$ac_compile\"") >&5
5016   (eval $ac_compile) 2>&5
5017   ac_status=$?
5018   echo "$as_me:5018: \$? = $ac_status" >&5
5019   (exit $ac_status); } &&
5020          { ac_try='test -s conftest.$ac_objext'
5021   { (eval echo "$as_me:5021: \"$ac_try\"") >&5
5022   (eval $ac_try) 2>&5
5023   ac_status=$?
5024   echo "$as_me:5024: \$? = $ac_status" >&5
5025   (exit $ac_status); }; }; then
5026   cf_cv_ncurses_h2=$cf_header
5027
5028 else
5029   echo "$as_me: failed program was:" >&5
5030 cat conftest.$ac_ext >&5
5031 cf_cv_ncurses_h2=no
5032 fi
5033 rm -f conftest.$ac_objext conftest.$ac_ext
5034
5035                         if test "$cf_cv_ncurses_h2" != no ; then
5036                                 cf_cv_ncurses_h2=$cf_incdir/$cf_header
5037                                 test -n "$verbose" && echo $ac_n "      ... found $ac_c" 1>&6
5038                                 break
5039                         fi
5040                         test -n "$verbose" && echo "    ... tested $cf_incdir/$cf_header" 1>&6
5041                 done
5042                 CPPFLAGS="$cf_save2_CPPFLAGS"
5043                 test "$cf_cv_ncurses_h2" != no && break
5044         done
5045         test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:5045: error: not found" >&5
5046 echo "$as_me: error: not found" >&2;}
5047    { (exit 1); exit 1; }; }
5048
5049 fi
5050 echo "$as_me:5050: result: $cf_cv_ncurses_h2" >&5
5051 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
5052
5053         cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's%/[^/]*$%%'`
5054         cf_cv_ncurses_header=`basename $cf_cv_ncurses_h2`
5055         if test `basename $cf_1st_incdir` = $cf_ncuhdr_root ; then
5056                 cf_cv_ncurses_header=$cf_ncuhdr_root/$cf_cv_ncurses_header
5057         fi
5058
5059 if test -n "$cf_1st_incdir" ; then
5060   for cf_add_incdir in $cf_1st_incdir
5061   do
5062         while test $cf_add_incdir != /usr/include
5063         do
5064           if test -d $cf_add_incdir
5065           then
5066                 cf_have_incdir=no
5067                 if test -n "$CFLAGS$CPPFLAGS" ; then
5068                   # a loop is needed to ensure we can add subdirs of existing dirs
5069                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
5070                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
5071                           cf_have_incdir=yes; break
5072                         fi
5073                   done
5074                 fi
5075
5076                 if test "$cf_have_incdir" = no ; then
5077                   if test "$cf_add_incdir" = /usr/local/include ; then
5078                         if test "$GCC" = yes
5079                         then
5080                           cf_save_CPPFLAGS=$CPPFLAGS
5081                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
5082                           cat >conftest.$ac_ext <<_ACEOF
5083 #line 5083 "configure"
5084 #include "confdefs.h"
5085 #include <stdio.h>
5086 int
5087 main ()
5088 {
5089 printf("Hello")
5090   ;
5091   return 0;
5092 }
5093 _ACEOF
5094 rm -f conftest.$ac_objext
5095 if { (eval echo "$as_me:5095: \"$ac_compile\"") >&5
5096   (eval $ac_compile) 2>&5
5097   ac_status=$?
5098   echo "$as_me:5098: \$? = $ac_status" >&5
5099   (exit $ac_status); } &&
5100          { ac_try='test -s conftest.$ac_objext'
5101   { (eval echo "$as_me:5101: \"$ac_try\"") >&5
5102   (eval $ac_try) 2>&5
5103   ac_status=$?
5104   echo "$as_me:5104: \$? = $ac_status" >&5
5105   (exit $ac_status); }; }; then
5106   :
5107 else
5108   echo "$as_me: failed program was:" >&5
5109 cat conftest.$ac_ext >&5
5110 cf_have_incdir=yes
5111 fi
5112 rm -f conftest.$ac_objext conftest.$ac_ext
5113                           CPPFLAGS=$cf_save_CPPFLAGS
5114                         fi
5115                   fi
5116                 fi
5117
5118                 if test "$cf_have_incdir" = no ; then
5119                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
5120
5121 echo "${as_me:-configure}:5121: testing adding $cf_add_incdir to include-path ..." 1>&5
5122
5123                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
5124
5125                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
5126                   test "$cf_top_incdir" = "$cf_add_incdir" && break
5127                   cf_add_incdir="$cf_top_incdir"
5128                 else
5129                   break
5130                 fi
5131           fi
5132         done
5133   done
5134 fi
5135
5136 fi
5137
5138 # Set definitions to allow ifdef'ing for ncurses.h
5139
5140 case $cf_cv_ncurses_header in # (vi
5141 *ncurses.h)
5142         cat >>confdefs.h <<\EOF
5143 #define HAVE_NCURSES_H 1
5144 EOF
5145
5146         ;;
5147 esac
5148
5149 case $cf_cv_ncurses_header in # (vi
5150 ncurses/curses.h|ncurses/ncurses.h)
5151         cat >>confdefs.h <<\EOF
5152 #define HAVE_NCURSES_NCURSES_H 1
5153 EOF
5154
5155         ;;
5156 ncursesw/curses.h|ncursesw/ncurses.h)
5157         cat >>confdefs.h <<\EOF
5158 #define HAVE_NCURSESW_NCURSES_H 1
5159 EOF
5160
5161         ;;
5162 esac
5163
5164 echo "$as_me:5164: checking for terminfo header" >&5
5165 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
5166 if test "${cf_cv_term_header+set}" = set; then
5167   echo $ECHO_N "(cached) $ECHO_C" >&6
5168 else
5169
5170 case ${cf_cv_ncurses_header} in #(vi
5171 */ncurses.h|*/ncursesw.h) #(vi
5172         cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
5173         ;;
5174 *)
5175         cf_term_header=term.h
5176         ;;
5177 esac
5178
5179 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
5180 do
5181 cat >conftest.$ac_ext <<_ACEOF
5182 #line 5182 "configure"
5183 #include "confdefs.h"
5184 #include <stdio.h>
5185 #include <${cf_cv_ncurses_header:-curses.h}>
5186 #include <$cf_test>
5187
5188 int
5189 main ()
5190 {
5191 int x = auto_left_margin
5192   ;
5193   return 0;
5194 }
5195 _ACEOF
5196 rm -f conftest.$ac_objext
5197 if { (eval echo "$as_me:5197: \"$ac_compile\"") >&5
5198   (eval $ac_compile) 2>&5
5199   ac_status=$?
5200   echo "$as_me:5200: \$? = $ac_status" >&5
5201   (exit $ac_status); } &&
5202          { ac_try='test -s conftest.$ac_objext'
5203   { (eval echo "$as_me:5203: \"$ac_try\"") >&5
5204   (eval $ac_try) 2>&5
5205   ac_status=$?
5206   echo "$as_me:5206: \$? = $ac_status" >&5
5207   (exit $ac_status); }; }; then
5208
5209         cf_cv_term_header="$cf_test"
5210 else
5211   echo "$as_me: failed program was:" >&5
5212 cat conftest.$ac_ext >&5
5213
5214         cf_cv_term_header=unknown
5215
5216 fi
5217 rm -f conftest.$ac_objext conftest.$ac_ext
5218         test "$cf_cv_term_header" != unknown && break
5219 done
5220
5221 fi
5222 echo "$as_me:5222: result: $cf_cv_term_header" >&5
5223 echo "${ECHO_T}$cf_cv_term_header" >&6
5224
5225 # Set definitions to allow ifdef'ing to accommodate subdirectories
5226
5227 case $cf_cv_term_header in # (vi
5228 *term.h)
5229         cat >>confdefs.h <<\EOF
5230 #define HAVE_TERM_H 1
5231 EOF
5232
5233         ;;
5234 esac
5235
5236 case $cf_cv_term_header in # (vi
5237 ncurses/term.h) #(vi
5238         cat >>confdefs.h <<\EOF
5239 #define HAVE_NCURSES_TERM_H 1
5240 EOF
5241
5242         ;;
5243 ncursesw/term.h)
5244         cat >>confdefs.h <<\EOF
5245 #define HAVE_NCURSESW_TERM_H 1
5246 EOF
5247
5248         ;;
5249 esac
5250
5251 # some applications need this, but should check for NCURSES_VERSION
5252 cat >>confdefs.h <<\EOF
5253 #define NCURSES 1
5254 EOF
5255
5256 echo "$as_me:5256: checking for ncurses version" >&5
5257 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
5258 if test "${cf_cv_ncurses_version+set}" = set; then
5259   echo $ECHO_N "(cached) $ECHO_C" >&6
5260 else
5261
5262         cf_cv_ncurses_version=no
5263         cf_tempfile=out$$
5264         rm -f $cf_tempfile
5265         if test "$cross_compiling" = yes; then
5266
5267         # This will not work if the preprocessor splits the line after the
5268         # Autoconf token.  The 'unproto' program does that.
5269         cat > conftest.$ac_ext <<EOF
5270 #include <${cf_cv_ncurses_header:-curses.h}>
5271 #undef Autoconf
5272 #ifdef NCURSES_VERSION
5273 Autoconf NCURSES_VERSION
5274 #else
5275 #ifdef __NCURSES_H
5276 Autoconf "old"
5277 #endif
5278 ;
5279 #endif
5280 EOF
5281         cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
5282         { (eval echo "$as_me:5282: \"$cf_try\"") >&5
5283   (eval $cf_try) 2>&5
5284   ac_status=$?
5285   echo "$as_me:5285: \$? = $ac_status" >&5
5286   (exit $ac_status); }
5287         if test -f conftest.out ; then
5288                 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
5289                 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
5290                 rm -f conftest.out
5291         fi
5292
5293 else
5294   cat >conftest.$ac_ext <<_ACEOF
5295 #line 5295 "configure"
5296 #include "confdefs.h"
5297
5298 #include <${cf_cv_ncurses_header:-curses.h}>
5299 #include <stdio.h>
5300 int main()
5301 {
5302         FILE *fp = fopen("$cf_tempfile", "w");
5303 #ifdef NCURSES_VERSION
5304 # ifdef NCURSES_VERSION_PATCH
5305         fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
5306 # else
5307         fprintf(fp, "%s\n", NCURSES_VERSION);
5308 # endif
5309 #else
5310 # ifdef __NCURSES_H
5311         fprintf(fp, "old\n");
5312 # else
5313         make an error
5314 # endif
5315 #endif
5316         ${cf_cv_main_return:-return}(0);
5317 }
5318 _ACEOF
5319 rm -f conftest$ac_exeext
5320 if { (eval echo "$as_me:5320: \"$ac_link\"") >&5
5321   (eval $ac_link) 2>&5
5322   ac_status=$?
5323   echo "$as_me:5323: \$? = $ac_status" >&5
5324   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5325   { (eval echo "$as_me:5325: \"$ac_try\"") >&5
5326   (eval $ac_try) 2>&5
5327   ac_status=$?
5328   echo "$as_me:5328: \$? = $ac_status" >&5
5329   (exit $ac_status); }; }; then
5330
5331         cf_cv_ncurses_version=`cat $cf_tempfile`
5332 else
5333   echo "$as_me: program exited with status $ac_status" >&5
5334 echo "$as_me: failed program was:" >&5
5335 cat conftest.$ac_ext >&5
5336 fi
5337 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5338 fi
5339         rm -f $cf_tempfile
5340
5341 fi
5342 echo "$as_me:5342: result: $cf_cv_ncurses_version" >&5
5343 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
5344 test "$cf_cv_ncurses_version" = no || cat >>confdefs.h <<\EOF
5345 #define NCURSES 1
5346 EOF
5347
5348 cf_nculib_root=ncursesw
5349         # This works, except for the special case where we find gpm, but
5350         # ncurses is in a nonstandard location via $LIBS, and we really want
5351         # to link gpm.
5352 cf_ncurses_LIBS=""
5353 cf_ncurses_SAVE="$LIBS"
5354 echo "$as_me:5354: checking for Gpm_Open in -lgpm" >&5
5355 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
5356 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
5357   echo $ECHO_N "(cached) $ECHO_C" >&6
5358 else
5359   ac_check_lib_save_LIBS=$LIBS
5360 LIBS="-lgpm  $LIBS"
5361 cat >conftest.$ac_ext <<_ACEOF
5362 #line 5362 "configure"
5363 #include "confdefs.h"
5364
5365 /* Override any gcc2 internal prototype to avoid an error.  */
5366 #ifdef __cplusplus
5367 extern "C"
5368 #endif
5369 /* We use char because int might match the return type of a gcc2
5370    builtin and then its argument prototype would still apply.  */
5371 char Gpm_Open ();
5372 int
5373 main ()
5374 {
5375 Gpm_Open ();
5376   ;
5377   return 0;
5378 }
5379 _ACEOF
5380 rm -f conftest.$ac_objext conftest$ac_exeext
5381 if { (eval echo "$as_me:5381: \"$ac_link\"") >&5
5382   (eval $ac_link) 2>&5
5383   ac_status=$?
5384   echo "$as_me:5384: \$? = $ac_status" >&5
5385   (exit $ac_status); } &&
5386          { ac_try='test -s conftest$ac_exeext'
5387   { (eval echo "$as_me:5387: \"$ac_try\"") >&5
5388   (eval $ac_try) 2>&5
5389   ac_status=$?
5390   echo "$as_me:5390: \$? = $ac_status" >&5
5391   (exit $ac_status); }; }; then
5392   ac_cv_lib_gpm_Gpm_Open=yes
5393 else
5394   echo "$as_me: failed program was:" >&5
5395 cat conftest.$ac_ext >&5
5396 ac_cv_lib_gpm_Gpm_Open=no
5397 fi
5398 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5399 LIBS=$ac_check_lib_save_LIBS
5400 fi
5401 echo "$as_me:5401: result: $ac_cv_lib_gpm_Gpm_Open" >&5
5402 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
5403 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
5404   echo "$as_me:5404: checking for initscr in -lgpm" >&5
5405 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
5406 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
5407   echo $ECHO_N "(cached) $ECHO_C" >&6
5408 else
5409   ac_check_lib_save_LIBS=$LIBS
5410 LIBS="-lgpm  $LIBS"
5411 cat >conftest.$ac_ext <<_ACEOF
5412 #line 5412 "configure"
5413 #include "confdefs.h"
5414
5415 /* Override any gcc2 internal prototype to avoid an error.  */
5416 #ifdef __cplusplus
5417 extern "C"
5418 #endif
5419 /* We use char because int might match the return type of a gcc2
5420    builtin and then its argument prototype would still apply.  */
5421 char initscr ();
5422 int
5423 main ()
5424 {
5425 initscr ();
5426   ;
5427   return 0;
5428 }
5429 _ACEOF
5430 rm -f conftest.$ac_objext conftest$ac_exeext
5431 if { (eval echo "$as_me:5431: \"$ac_link\"") >&5
5432   (eval $ac_link) 2>&5
5433   ac_status=$?
5434   echo "$as_me:5434: \$? = $ac_status" >&5
5435   (exit $ac_status); } &&
5436          { ac_try='test -s conftest$ac_exeext'
5437   { (eval echo "$as_me:5437: \"$ac_try\"") >&5
5438   (eval $ac_try) 2>&5
5439   ac_status=$?
5440   echo "$as_me:5440: \$? = $ac_status" >&5
5441   (exit $ac_status); }; }; then
5442   ac_cv_lib_gpm_initscr=yes
5443 else
5444   echo "$as_me: failed program was:" >&5
5445 cat conftest.$ac_ext >&5
5446 ac_cv_lib_gpm_initscr=no
5447 fi
5448 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5449 LIBS=$ac_check_lib_save_LIBS
5450 fi
5451 echo "$as_me:5451: result: $ac_cv_lib_gpm_initscr" >&5
5452 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
5453 if test $ac_cv_lib_gpm_initscr = yes; then
5454   LIBS="$cf_ncurses_SAVE"
5455 else
5456   cf_ncurses_LIBS="-lgpm"
5457 fi
5458
5459 fi
5460
5461 case $host_os in #(vi
5462 freebsd*)
5463         # This is only necessary if you are linking against an obsolete
5464         # version of ncurses (but it should do no harm, since it's static).
5465         if test "$cf_nculib_root" = ncurses ; then
5466                 echo "$as_me:5466: checking for tgoto in -lmytinfo" >&5
5467 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
5468 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
5469   echo $ECHO_N "(cached) $ECHO_C" >&6
5470 else
5471   ac_check_lib_save_LIBS=$LIBS
5472 LIBS="-lmytinfo  $LIBS"
5473 cat >conftest.$ac_ext <<_ACEOF
5474 #line 5474 "configure"
5475 #include "confdefs.h"
5476
5477 /* Override any gcc2 internal prototype to avoid an error.  */
5478 #ifdef __cplusplus
5479 extern "C"
5480 #endif
5481 /* We use char because int might match the return type of a gcc2
5482    builtin and then its argument prototype would still apply.  */
5483 char tgoto ();
5484 int
5485 main ()
5486 {
5487 tgoto ();
5488   ;
5489   return 0;
5490 }
5491 _ACEOF
5492 rm -f conftest.$ac_objext conftest$ac_exeext
5493 if { (eval echo "$as_me:5493: \"$ac_link\"") >&5
5494   (eval $ac_link) 2>&5
5495   ac_status=$?
5496   echo "$as_me:5496: \$? = $ac_status" >&5
5497   (exit $ac_status); } &&
5498          { ac_try='test -s conftest$ac_exeext'
5499   { (eval echo "$as_me:5499: \"$ac_try\"") >&5
5500   (eval $ac_try) 2>&5
5501   ac_status=$?
5502   echo "$as_me:5502: \$? = $ac_status" >&5
5503   (exit $ac_status); }; }; then
5504   ac_cv_lib_mytinfo_tgoto=yes
5505 else
5506   echo "$as_me: failed program was:" >&5
5507 cat conftest.$ac_ext >&5
5508 ac_cv_lib_mytinfo_tgoto=no
5509 fi
5510 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5511 LIBS=$ac_check_lib_save_LIBS
5512 fi
5513 echo "$as_me:5513: result: $ac_cv_lib_mytinfo_tgoto" >&5
5514 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
5515 if test $ac_cv_lib_mytinfo_tgoto = yes; then
5516   cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
5517 fi
5518
5519         fi
5520         ;;
5521 esac
5522
5523 LIBS="$cf_ncurses_LIBS $LIBS"
5524
5525 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
5526 then
5527         LIBS="-l$cf_nculib_root $LIBS"
5528 else
5529
5530         eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
5531         cf_libdir=""
5532         echo "$as_me:5532: checking for initscr" >&5
5533 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
5534 if test "${ac_cv_func_initscr+set}" = set; then
5535   echo $ECHO_N "(cached) $ECHO_C" >&6
5536 else
5537   cat >conftest.$ac_ext <<_ACEOF
5538 #line 5538 "configure"
5539 #include "confdefs.h"
5540 /* System header to define __stub macros and hopefully few prototypes,
5541     which can conflict with char initscr (); below.  */
5542 #include <assert.h>
5543 /* Override any gcc2 internal prototype to avoid an error.  */
5544 #ifdef __cplusplus
5545 extern "C"
5546 #endif
5547 /* We use char because int might match the return type of a gcc2
5548    builtin and then its argument prototype would still apply.  */
5549 char initscr ();
5550 char (*f) ();
5551
5552 int
5553 main ()
5554 {
5555 /* The GNU C library defines this for functions which it implements
5556     to always fail with ENOSYS.  Some functions are actually named
5557     something starting with __ and the normal name is an alias.  */
5558 #if defined (__stub_initscr) || defined (__stub___initscr)
5559 choke me
5560 #else
5561 f = initscr;
5562 #endif
5563
5564   ;
5565   return 0;
5566 }
5567 _ACEOF
5568 rm -f conftest.$ac_objext conftest$ac_exeext
5569 if { (eval echo "$as_me:5569: \"$ac_link\"") >&5
5570   (eval $ac_link) 2>&5
5571   ac_status=$?
5572   echo "$as_me:5572: \$? = $ac_status" >&5
5573   (exit $ac_status); } &&
5574          { ac_try='test -s conftest$ac_exeext'
5575   { (eval echo "$as_me:5575: \"$ac_try\"") >&5
5576   (eval $ac_try) 2>&5
5577   ac_status=$?
5578   echo "$as_me:5578: \$? = $ac_status" >&5
5579   (exit $ac_status); }; }; then
5580   ac_cv_func_initscr=yes
5581 else
5582   echo "$as_me: failed program was:" >&5
5583 cat conftest.$ac_ext >&5
5584 ac_cv_func_initscr=no
5585 fi
5586 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5587 fi
5588 echo "$as_me:5588: result: $ac_cv_func_initscr" >&5
5589 echo "${ECHO_T}$ac_cv_func_initscr" >&6
5590 if test $ac_cv_func_initscr = yes; then
5591   eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
5592 else
5593
5594                 cf_save_LIBS="$LIBS"
5595                 echo "$as_me:5595: checking for initscr in -l$cf_nculib_root" >&5
5596 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
5597                 LIBS="-l$cf_nculib_root $LIBS"
5598                 cat >conftest.$ac_ext <<_ACEOF
5599 #line 5599 "configure"
5600 #include "confdefs.h"
5601 #include <${cf_cv_ncurses_header:-curses.h}>
5602 int
5603 main ()
5604 {
5605 initscr()
5606   ;
5607   return 0;
5608 }
5609 _ACEOF
5610 rm -f conftest.$ac_objext conftest$ac_exeext
5611 if { (eval echo "$as_me:5611: \"$ac_link\"") >&5
5612   (eval $ac_link) 2>&5
5613   ac_status=$?
5614   echo "$as_me:5614: \$? = $ac_status" >&5
5615   (exit $ac_status); } &&
5616          { ac_try='test -s conftest$ac_exeext'
5617   { (eval echo "$as_me:5617: \"$ac_try\"") >&5
5618   (eval $ac_try) 2>&5
5619   ac_status=$?
5620   echo "$as_me:5620: \$? = $ac_status" >&5
5621   (exit $ac_status); }; }; then
5622   echo "$as_me:5622: result: yes" >&5
5623 echo "${ECHO_T}yes" >&6
5624                          eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
5625
5626 else
5627   echo "$as_me: failed program was:" >&5
5628 cat conftest.$ac_ext >&5
5629 echo "$as_me:5629: result: no" >&5
5630 echo "${ECHO_T}no" >&6
5631
5632 cf_search=
5633 cf_library_path_list=""
5634 if test -n "${LDFLAGS}${LIBS}" ; then
5635         for cf_library_path in $LDFLAGS $LIBS
5636         do
5637                 case $cf_library_path in #(vi
5638                 -L*)
5639                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
5640
5641 test "$cf_library_path" != "NONE" && \
5642 test -d "$cf_library_path" && \
5643  {
5644         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
5645         test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
5646         test -d $cf_library_path/lib/$cf_nculib_root &&       cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
5647         test -d $cf_library_path/lib/$cf_nculib_root/lib &&    cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
5648         test -d $cf_library_path/$cf_nculib_root/lib &&       cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
5649         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"
5650 }
5651
5652                         cf_library_path_list="$cf_library_path_list $cf_search"
5653                         ;;
5654                 esac
5655         done
5656 fi
5657
5658 cf_search=
5659
5660 test "/usr" != "$prefix" && \
5661 test -d "/usr" && \
5662 (test $prefix = NONE || test "/usr" != "$prefix") && {
5663         test -n "$verbose" && echo "    ... testing for lib-directories under /usr"
5664         test -d /usr/lib &&          cf_search="$cf_search /usr/lib"
5665         test -d /usr/lib/$cf_nculib_root &&       cf_search="$cf_search /usr/lib/$cf_nculib_root"
5666         test -d /usr/lib/$cf_nculib_root/lib &&    cf_search="$cf_search /usr/lib/$cf_nculib_root/lib"
5667         test -d /usr/$cf_nculib_root/lib &&       cf_search="$cf_search /usr/$cf_nculib_root/lib"
5668         test -d /usr/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search /usr/$cf_nculib_root/lib/$cf_nculib_root"
5669 }
5670
5671 test "$prefix" != "NONE" && \
5672 test -d "$prefix" && \
5673  {
5674         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
5675         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
5676         test -d $prefix/lib/$cf_nculib_root &&       cf_search="$cf_search $prefix/lib/$cf_nculib_root"
5677         test -d $prefix/lib/$cf_nculib_root/lib &&    cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
5678         test -d $prefix/$cf_nculib_root/lib &&       cf_search="$cf_search $prefix/$cf_nculib_root/lib"
5679         test -d $prefix/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
5680 }
5681
5682 test "/usr/local" != "$prefix" && \
5683 test -d "/usr/local" && \
5684 (test $prefix = NONE || test "/usr/local" != "$prefix") && {
5685         test -n "$verbose" && echo "    ... testing for lib-directories under /usr/local"
5686         test -d /usr/local/lib &&          cf_search="$cf_search /usr/local/lib"
5687         test -d /usr/local/lib/$cf_nculib_root &&       cf_search="$cf_search /usr/local/lib/$cf_nculib_root"
5688         test -d /usr/local/lib/$cf_nculib_root/lib &&    cf_search="$cf_search /usr/local/lib/$cf_nculib_root/lib"
5689         test -d /usr/local/$cf_nculib_root/lib &&       cf_search="$cf_search /usr/local/$cf_nculib_root/lib"
5690         test -d /usr/local/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search /usr/local/$cf_nculib_root/lib/$cf_nculib_root"
5691 }
5692
5693 test "/opt" != "$prefix" && \
5694 test -d "/opt" && \
5695 (test $prefix = NONE || test "/opt" != "$prefix") && {
5696         test -n "$verbose" && echo "    ... testing for lib-directories under /opt"
5697         test -d /opt/lib &&          cf_search="$cf_search /opt/lib"
5698         test -d /opt/lib/$cf_nculib_root &&       cf_search="$cf_search /opt/lib/$cf_nculib_root"
5699         test -d /opt/lib/$cf_nculib_root/lib &&    cf_search="$cf_search /opt/lib/$cf_nculib_root/lib"
5700         test -d /opt/$cf_nculib_root/lib &&       cf_search="$cf_search /opt/$cf_nculib_root/lib"
5701         test -d /opt/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search /opt/$cf_nculib_root/lib/$cf_nculib_root"
5702 }
5703
5704 test "$HOME" != "$prefix" && \
5705 test -d "$HOME" && \
5706 (test $prefix = NONE || test "$HOME" != "$prefix") && {
5707         test -n "$verbose" && echo "    ... testing for lib-directories under $HOME"
5708         test -d $HOME/lib &&          cf_search="$cf_search $HOME/lib"
5709         test -d $HOME/lib/$cf_nculib_root &&       cf_search="$cf_search $HOME/lib/$cf_nculib_root"
5710         test -d $HOME/lib/$cf_nculib_root/lib &&    cf_search="$cf_search $HOME/lib/$cf_nculib_root/lib"
5711         test -d $HOME/$cf_nculib_root/lib &&       cf_search="$cf_search $HOME/$cf_nculib_root/lib"
5712         test -d $HOME/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search $HOME/$cf_nculib_root/lib/$cf_nculib_root"
5713 }
5714
5715 cf_search="$cf_library_path_list $cf_search"
5716
5717                         for cf_libdir in $cf_search
5718                         do
5719                                 echo "$as_me:5719: checking for -l$cf_nculib_root in $cf_libdir" >&5
5720 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
5721                                 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
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()
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                                          eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
5749                                          break
5750 else
5751   echo "$as_me: failed program was:" >&5
5752 cat conftest.$ac_ext >&5
5753 echo "$as_me:5753: result: no" >&5
5754 echo "${ECHO_T}no" >&6
5755                                          LIBS="$cf_save_LIBS"
5756 fi
5757 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5758                         done
5759
5760 fi
5761 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5762
5763 fi
5764
5765 eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root
5766
5767 if test $cf_found_library = no ; then
5768         { { echo "$as_me:5768: error: Cannot link $cf_nculib_root library" >&5
5769 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
5770    { (exit 1); exit 1; }; }
5771 fi
5772
5773 fi
5774
5775 if test -n "$cf_ncurses_LIBS" ; then
5776         echo "$as_me:5776: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
5777 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
5778         cf_ncurses_SAVE="$LIBS"
5779         for p in $cf_ncurses_LIBS ; do
5780                 q=`echo $LIBS | sed -e "s%$p %%" -e "s%$p$%%"`
5781                 if test "$q" != "$LIBS" ; then
5782                         LIBS="$q"
5783                 fi
5784         done
5785         cat >conftest.$ac_ext <<_ACEOF
5786 #line 5786 "configure"
5787 #include "confdefs.h"
5788 #include <${cf_cv_ncurses_header:-curses.h}>
5789 int
5790 main ()
5791 {
5792 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
5793   ;
5794   return 0;
5795 }
5796 _ACEOF
5797 rm -f conftest.$ac_objext conftest$ac_exeext
5798 if { (eval echo "$as_me:5798: \"$ac_link\"") >&5
5799   (eval $ac_link) 2>&5
5800   ac_status=$?
5801   echo "$as_me:5801: \$? = $ac_status" >&5
5802   (exit $ac_status); } &&
5803          { ac_try='test -s conftest$ac_exeext'
5804   { (eval echo "$as_me:5804: \"$ac_try\"") >&5
5805   (eval $ac_try) 2>&5
5806   ac_status=$?
5807   echo "$as_me:5807: \$? = $ac_status" >&5
5808   (exit $ac_status); }; }; then
5809   echo "$as_me:5809: result: yes" >&5
5810 echo "${ECHO_T}yes" >&6
5811 else
5812   echo "$as_me: failed program was:" >&5
5813 cat conftest.$ac_ext >&5
5814 echo "$as_me:5814: result: no" >&5
5815 echo "${ECHO_T}no" >&6
5816                  LIBS="$cf_ncurses_SAVE"
5817 fi
5818 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5819 fi
5820
5821 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
5822
5823 cat >>confdefs.h <<EOF
5824 #define $cf_nculib_ROOT 1
5825 EOF
5826
5827 fi
5828
5829 else
5830
5831 cf_ncuconfig_root=ncurses
5832
5833 echo "Looking for ${cf_ncuconfig_root}-config"
5834 for ac_prog in ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
5835 do
5836   # Extract the first word of "$ac_prog", so it can be a program name with args.
5837 set dummy $ac_prog; ac_word=$2
5838 echo "$as_me:5838: checking for $ac_word" >&5
5839 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5840 if test "${ac_cv_path_NCURSES_CONFIG+set}" = set; then
5841   echo $ECHO_N "(cached) $ECHO_C" >&6
5842 else
5843   case $NCURSES_CONFIG in
5844   [\\/]* | ?:[\\/]*)
5845   ac_cv_path_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test with a path.
5846   ;;
5847   *)
5848   ac_save_IFS=$IFS; IFS=$ac_path_separator
5849 ac_dummy="$PATH"
5850 for ac_dir in $ac_dummy; do
5851   IFS=$ac_save_IFS
5852   test -z "$ac_dir" && ac_dir=.
5853   if $as_executable_p "$ac_dir/$ac_word"; then
5854    ac_cv_path_NCURSES_CONFIG="$ac_dir/$ac_word"
5855    echo "$as_me:5855: found $ac_dir/$ac_word" >&5
5856    break
5857 fi
5858 done
5859
5860   ;;
5861 esac
5862 fi
5863 NCURSES_CONFIG=$ac_cv_path_NCURSES_CONFIG
5864
5865 if test -n "$NCURSES_CONFIG"; then
5866   echo "$as_me:5866: result: $NCURSES_CONFIG" >&5
5867 echo "${ECHO_T}$NCURSES_CONFIG" >&6
5868 else
5869   echo "$as_me:5869: result: no" >&5
5870 echo "${ECHO_T}no" >&6
5871 fi
5872
5873   test -n "$NCURSES_CONFIG" && break
5874 done
5875 test -n "$NCURSES_CONFIG" || NCURSES_CONFIG="none"
5876
5877 if test "$NCURSES_CONFIG" != none ; then
5878
5879 CPPFLAGS="$CPPFLAGS `$NCURSES_CONFIG --cflags`"
5880 LIBS="`$NCURSES_CONFIG --libs` $LIBS"
5881
5882 # even with config script, some packages use no-override for curses.h
5883
5884 echo "$as_me:5884: checking if we have identified curses headers" >&5
5885 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
5886 if test "${cf_cv_ncurses_header+set}" = set; then
5887   echo $ECHO_N "(cached) $ECHO_C" >&6
5888 else
5889
5890 cf_cv_ncurses_header=none
5891 for cf_header in  \
5892     ncurses/curses.h \
5893         ncurses/ncurses.h \
5894         curses.h \
5895         ncurses.h
5896 do
5897 cat >conftest.$ac_ext <<_ACEOF
5898 #line 5898 "configure"
5899 #include "confdefs.h"
5900 #include <${cf_header}>
5901 int
5902 main ()
5903 {
5904 initscr(); tgoto("?", 0,0)
5905   ;
5906   return 0;
5907 }
5908 _ACEOF
5909 rm -f conftest.$ac_objext
5910 if { (eval echo "$as_me:5910: \"$ac_compile\"") >&5
5911   (eval $ac_compile) 2>&5
5912   ac_status=$?
5913   echo "$as_me:5913: \$? = $ac_status" >&5
5914   (exit $ac_status); } &&
5915          { ac_try='test -s conftest.$ac_objext'
5916   { (eval echo "$as_me:5916: \"$ac_try\"") >&5
5917   (eval $ac_try) 2>&5
5918   ac_status=$?
5919   echo "$as_me:5919: \$? = $ac_status" >&5
5920   (exit $ac_status); }; }; then
5921   cf_cv_ncurses_header=$cf_header; break
5922 else
5923   echo "$as_me: failed program was:" >&5
5924 cat conftest.$ac_ext >&5
5925 fi
5926 rm -f conftest.$ac_objext conftest.$ac_ext
5927 done
5928
5929 fi
5930 echo "$as_me:5930: result: $cf_cv_ncurses_header" >&5
5931 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
5932
5933 if test "$cf_cv_ncurses_header" = none ; then
5934         { { echo "$as_me:5934: error: No curses header-files found" >&5
5935 echo "$as_me: error: No curses header-files found" >&2;}
5936    { (exit 1); exit 1; }; }
5937 fi
5938
5939 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
5940
5941 for ac_header in $cf_cv_ncurses_header
5942 do
5943 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5944 echo "$as_me:5944: checking for $ac_header" >&5
5945 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5946 if eval "test \"\${$as_ac_Header+set}\" = set"; then
5947   echo $ECHO_N "(cached) $ECHO_C" >&6
5948 else
5949   cat >conftest.$ac_ext <<_ACEOF
5950 #line 5950 "configure"
5951 #include "confdefs.h"
5952 #include <$ac_header>
5953 _ACEOF
5954 if { (eval echo "$as_me:5954: \"$ac_cpp conftest.$ac_ext\"") >&5
5955   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5956   ac_status=$?
5957   egrep -v '^ *\+' conftest.er1 >conftest.err
5958   rm -f conftest.er1
5959   cat conftest.err >&5
5960   echo "$as_me:5960: \$? = $ac_status" >&5
5961   (exit $ac_status); } >/dev/null; then
5962   if test -s conftest.err; then
5963     ac_cpp_err=$ac_c_preproc_warn_flag
5964   else
5965     ac_cpp_err=
5966   fi
5967 else
5968   ac_cpp_err=yes
5969 fi
5970 if test -z "$ac_cpp_err"; then
5971   eval "$as_ac_Header=yes"
5972 else
5973   echo "$as_me: failed program was:" >&5
5974   cat conftest.$ac_ext >&5
5975   eval "$as_ac_Header=no"
5976 fi
5977 rm -f conftest.err conftest.$ac_ext
5978 fi
5979 echo "$as_me:5979: result: `eval echo '${'$as_ac_Header'}'`" >&5
5980 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
5981 if test `eval echo '${'$as_ac_Header'}'` = yes; then
5982   cat >>confdefs.h <<EOF
5983 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5984 EOF
5985
5986 fi
5987 done
5988
5989 cat >>confdefs.h <<\EOF
5990 #define NCURSES 1
5991 EOF
5992
5993 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
5994
5995 cat >>confdefs.h <<EOF
5996 #define $cf_nculib_ROOT 1
5997 EOF
5998
5999 cf_cv_ncurses_version=`$NCURSES_CONFIG --version`
6000
6001 else
6002
6003 cf_ncuhdr_root=ncurses
6004
6005 test -n "$cf_cv_curses_dir" && \
6006 test "$cf_cv_curses_dir" != "no" && { \
6007
6008 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
6009   for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
6010   do
6011         while test $cf_add_incdir != /usr/include
6012         do
6013           if test -d $cf_add_incdir
6014           then
6015                 cf_have_incdir=no
6016                 if test -n "$CFLAGS$CPPFLAGS" ; then
6017                   # a loop is needed to ensure we can add subdirs of existing dirs
6018                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
6019                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
6020                           cf_have_incdir=yes; break
6021                         fi
6022                   done
6023                 fi
6024
6025                 if test "$cf_have_incdir" = no ; then
6026                   if test "$cf_add_incdir" = /usr/local/include ; then
6027                         if test "$GCC" = yes
6028                         then
6029                           cf_save_CPPFLAGS=$CPPFLAGS
6030                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6031                           cat >conftest.$ac_ext <<_ACEOF
6032 #line 6032 "configure"
6033 #include "confdefs.h"
6034 #include <stdio.h>
6035 int
6036 main ()
6037 {
6038 printf("Hello")
6039   ;
6040   return 0;
6041 }
6042 _ACEOF
6043 rm -f conftest.$ac_objext
6044 if { (eval echo "$as_me:6044: \"$ac_compile\"") >&5
6045   (eval $ac_compile) 2>&5
6046   ac_status=$?
6047   echo "$as_me:6047: \$? = $ac_status" >&5
6048   (exit $ac_status); } &&
6049          { ac_try='test -s conftest.$ac_objext'
6050   { (eval echo "$as_me:6050: \"$ac_try\"") >&5
6051   (eval $ac_try) 2>&5
6052   ac_status=$?
6053   echo "$as_me:6053: \$? = $ac_status" >&5
6054   (exit $ac_status); }; }; then
6055   :
6056 else
6057   echo "$as_me: failed program was:" >&5
6058 cat conftest.$ac_ext >&5
6059 cf_have_incdir=yes
6060 fi
6061 rm -f conftest.$ac_objext conftest.$ac_ext
6062                           CPPFLAGS=$cf_save_CPPFLAGS
6063                         fi
6064                   fi
6065                 fi
6066
6067                 if test "$cf_have_incdir" = no ; then
6068                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
6069
6070 echo "${as_me:-configure}:6070: testing adding $cf_add_incdir to include-path ..." 1>&5
6071
6072                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6073
6074                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
6075                   test "$cf_top_incdir" = "$cf_add_incdir" && break
6076                   cf_add_incdir="$cf_top_incdir"
6077                 else
6078                   break
6079                 fi
6080           fi
6081         done
6082   done
6083 fi
6084
6085 }
6086
6087 echo "$as_me:6087: checking for $cf_ncuhdr_root header in include-path" >&5
6088 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
6089 if test "${cf_cv_ncurses_h+set}" = set; then
6090   echo $ECHO_N "(cached) $ECHO_C" >&6
6091 else
6092
6093         cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
6094         ( test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw ) && cf_header_list="$cf_header_list curses.h ncurses.h"
6095         for cf_header in $cf_header_list
6096         do
6097
6098         cat >conftest.$ac_ext <<_ACEOF
6099 #line 6099 "configure"
6100 #include "confdefs.h"
6101
6102 #include <$cf_header>
6103 int
6104 main ()
6105 {
6106
6107 #ifdef NCURSES_VERSION
6108
6109 printf("%s\n", NCURSES_VERSION);
6110 #else
6111 #ifdef __NCURSES_H
6112 printf("old\n");
6113 #else
6114         make an error
6115 #endif
6116 #endif
6117
6118   ;
6119   return 0;
6120 }
6121 _ACEOF
6122 rm -f conftest.$ac_objext
6123 if { (eval echo "$as_me:6123: \"$ac_compile\"") >&5
6124   (eval $ac_compile) 2>&5
6125   ac_status=$?
6126   echo "$as_me:6126: \$? = $ac_status" >&5
6127   (exit $ac_status); } &&
6128          { ac_try='test -s conftest.$ac_objext'
6129   { (eval echo "$as_me:6129: \"$ac_try\"") >&5
6130   (eval $ac_try) 2>&5
6131   ac_status=$?
6132   echo "$as_me:6132: \$? = $ac_status" >&5
6133   (exit $ac_status); }; }; then
6134   cf_cv_ncurses_h=$cf_header
6135
6136 else
6137   echo "$as_me: failed program was:" >&5
6138 cat conftest.$ac_ext >&5
6139 cf_cv_ncurses_h=no
6140 fi
6141 rm -f conftest.$ac_objext conftest.$ac_ext
6142
6143                 test "$cf_cv_ncurses_h" != no && break
6144         done
6145
6146 fi
6147 echo "$as_me:6147: result: $cf_cv_ncurses_h" >&5
6148 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
6149
6150 if test "$cf_cv_ncurses_h" != no ; then
6151         cf_cv_ncurses_header=$cf_cv_ncurses_h
6152 else
6153
6154 echo "$as_me:6154: checking for $cf_ncuhdr_root include-path" >&5
6155 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
6156 if test "${cf_cv_ncurses_h2+set}" = set; then
6157   echo $ECHO_N "(cached) $ECHO_C" >&6
6158 else
6159
6160         test -n "$verbose" && echo
6161
6162 cf_search=
6163
6164 # collect the current set of include-directories from compiler flags
6165 cf_header_path_list=""
6166 if test -n "${CFLAGS}${CPPFLAGS}" ; then
6167         for cf_header_path in $CPPFLAGS $CFLAGS
6168         do
6169                 case $cf_header_path in #(vi
6170                 -I*)
6171                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
6172
6173 test "$cf_header_path" != "NONE" && \
6174 test -d "$cf_header_path" && \
6175  {
6176         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
6177         test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
6178         test -d $cf_header_path/include/$cf_ncuhdr_root &&       cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
6179         test -d $cf_header_path/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
6180         test -d $cf_header_path/$cf_ncuhdr_root/include &&       cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
6181         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"
6182 }
6183
6184                         cf_header_path_list="$cf_header_path_list $cf_search"
6185                         ;;
6186                 esac
6187         done
6188 fi
6189
6190 # add the variations for the package we are looking for
6191
6192 cf_search=
6193
6194 test "/usr" != "$prefix" && \
6195 test -d "/usr" && \
6196 (test $prefix = NONE || test "/usr" != "$prefix") && {
6197         test -n "$verbose" && echo "    ... testing for include-directories under /usr"
6198         test -d /usr/include &&          cf_search="$cf_search /usr/include"
6199         test -d /usr/include/$cf_ncuhdr_root &&       cf_search="$cf_search /usr/include/$cf_ncuhdr_root"
6200         test -d /usr/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search /usr/include/$cf_ncuhdr_root/include"
6201         test -d /usr/$cf_ncuhdr_root/include &&       cf_search="$cf_search /usr/$cf_ncuhdr_root/include"
6202         test -d /usr/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search /usr/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
6203 }
6204
6205 test "$prefix" != "NONE" && \
6206 test -d "$prefix" && \
6207  {
6208         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
6209         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
6210         test -d $prefix/include/$cf_ncuhdr_root &&       cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
6211         test -d $prefix/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
6212         test -d $prefix/$cf_ncuhdr_root/include &&       cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
6213         test -d $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
6214 }
6215
6216 test "/usr/local" != "$prefix" && \
6217 test -d "/usr/local" && \
6218 (test $prefix = NONE || test "/usr/local" != "$prefix") && {
6219         test -n "$verbose" && echo "    ... testing for include-directories under /usr/local"
6220         test -d /usr/local/include &&          cf_search="$cf_search /usr/local/include"
6221         test -d /usr/local/include/$cf_ncuhdr_root &&       cf_search="$cf_search /usr/local/include/$cf_ncuhdr_root"
6222         test -d /usr/local/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search /usr/local/include/$cf_ncuhdr_root/include"
6223         test -d /usr/local/$cf_ncuhdr_root/include &&       cf_search="$cf_search /usr/local/$cf_ncuhdr_root/include"
6224         test -d /usr/local/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search /usr/local/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
6225 }
6226
6227 test "/opt" != "$prefix" && \
6228 test -d "/opt" && \
6229 (test $prefix = NONE || test "/opt" != "$prefix") && {
6230         test -n "$verbose" && echo "    ... testing for include-directories under /opt"
6231         test -d /opt/include &&          cf_search="$cf_search /opt/include"
6232         test -d /opt/include/$cf_ncuhdr_root &&       cf_search="$cf_search /opt/include/$cf_ncuhdr_root"
6233         test -d /opt/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search /opt/include/$cf_ncuhdr_root/include"
6234         test -d /opt/$cf_ncuhdr_root/include &&       cf_search="$cf_search /opt/$cf_ncuhdr_root/include"
6235         test -d /opt/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search /opt/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
6236 }
6237
6238 test "$HOME" != "$prefix" && \
6239 test -d "$HOME" && \
6240 (test $prefix = NONE || test "$HOME" != "$prefix") && {
6241         test -n "$verbose" && echo "    ... testing for include-directories under $HOME"
6242         test -d $HOME/include &&          cf_search="$cf_search $HOME/include"
6243         test -d $HOME/include/$cf_ncuhdr_root &&       cf_search="$cf_search $HOME/include/$cf_ncuhdr_root"
6244         test -d $HOME/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search $HOME/include/$cf_ncuhdr_root/include"
6245         test -d $HOME/$cf_ncuhdr_root/include &&       cf_search="$cf_search $HOME/$cf_ncuhdr_root/include"
6246         test -d $HOME/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search $HOME/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
6247 }
6248
6249 test "$includedir" != NONE && \
6250 test "$includedir" != "/usr/include" && \
6251 test -d "$includedir" && {
6252         test -d $includedir &&    cf_search="$cf_search $includedir"
6253         test -d $includedir/$cf_ncuhdr_root && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
6254 }
6255
6256 test "$oldincludedir" != NONE && \
6257 test "$oldincludedir" != "/usr/include" && \
6258 test -d "$oldincludedir" && {
6259         test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
6260         test -d $oldincludedir/$cf_ncuhdr_root && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
6261 }
6262
6263 cf_search="$cf_search $cf_header_path_list"
6264
6265         test -n "$verbose" && echo search path $cf_search
6266         cf_save2_CPPFLAGS="$CPPFLAGS"
6267         for cf_incdir in $cf_search
6268         do
6269
6270 if test -n "$cf_incdir" ; then
6271   for cf_add_incdir in $cf_incdir
6272   do
6273         while test $cf_add_incdir != /usr/include
6274         do
6275           if test -d $cf_add_incdir
6276           then
6277                 cf_have_incdir=no
6278                 if test -n "$CFLAGS$CPPFLAGS" ; then
6279                   # a loop is needed to ensure we can add subdirs of existing dirs
6280                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
6281                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
6282                           cf_have_incdir=yes; break
6283                         fi
6284                   done
6285                 fi
6286
6287                 if test "$cf_have_incdir" = no ; then
6288                   if test "$cf_add_incdir" = /usr/local/include ; then
6289                         if test "$GCC" = yes
6290                         then
6291                           cf_save_CPPFLAGS=$CPPFLAGS
6292                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6293                           cat >conftest.$ac_ext <<_ACEOF
6294 #line 6294 "configure"
6295 #include "confdefs.h"
6296 #include <stdio.h>
6297 int
6298 main ()
6299 {
6300 printf("Hello")
6301   ;
6302   return 0;
6303 }
6304 _ACEOF
6305 rm -f conftest.$ac_objext
6306 if { (eval echo "$as_me:6306: \"$ac_compile\"") >&5
6307   (eval $ac_compile) 2>&5
6308   ac_status=$?
6309   echo "$as_me:6309: \$? = $ac_status" >&5
6310   (exit $ac_status); } &&
6311          { ac_try='test -s conftest.$ac_objext'
6312   { (eval echo "$as_me:6312: \"$ac_try\"") >&5
6313   (eval $ac_try) 2>&5
6314   ac_status=$?
6315   echo "$as_me:6315: \$? = $ac_status" >&5
6316   (exit $ac_status); }; }; then
6317   :
6318 else
6319   echo "$as_me: failed program was:" >&5
6320 cat conftest.$ac_ext >&5
6321 cf_have_incdir=yes
6322 fi
6323 rm -f conftest.$ac_objext conftest.$ac_ext
6324                           CPPFLAGS=$cf_save_CPPFLAGS
6325                         fi
6326                   fi
6327                 fi
6328
6329                 if test "$cf_have_incdir" = no ; then
6330                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
6331
6332 echo "${as_me:-configure}:6332: testing adding $cf_add_incdir to include-path ..." 1>&5
6333
6334                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6335
6336                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
6337                   test "$cf_top_incdir" = "$cf_add_incdir" && break
6338                   cf_add_incdir="$cf_top_incdir"
6339                 else
6340                   break
6341                 fi
6342           fi
6343         done
6344   done
6345 fi
6346
6347                 for cf_header in \
6348                         ncurses.h \
6349                         curses.h
6350                 do
6351
6352         cat >conftest.$ac_ext <<_ACEOF
6353 #line 6353 "configure"
6354 #include "confdefs.h"
6355
6356 #include <$cf_header>
6357 int
6358 main ()
6359 {
6360
6361 #ifdef NCURSES_VERSION
6362
6363 printf("%s\n", NCURSES_VERSION);
6364 #else
6365 #ifdef __NCURSES_H
6366 printf("old\n");
6367 #else
6368         make an error
6369 #endif
6370 #endif
6371
6372   ;
6373   return 0;
6374 }
6375 _ACEOF
6376 rm -f conftest.$ac_objext
6377 if { (eval echo "$as_me:6377: \"$ac_compile\"") >&5
6378   (eval $ac_compile) 2>&5
6379   ac_status=$?
6380   echo "$as_me:6380: \$? = $ac_status" >&5
6381   (exit $ac_status); } &&
6382          { ac_try='test -s conftest.$ac_objext'
6383   { (eval echo "$as_me:6383: \"$ac_try\"") >&5
6384   (eval $ac_try) 2>&5
6385   ac_status=$?
6386   echo "$as_me:6386: \$? = $ac_status" >&5
6387   (exit $ac_status); }; }; then
6388   cf_cv_ncurses_h2=$cf_header
6389
6390 else
6391   echo "$as_me: failed program was:" >&5
6392 cat conftest.$ac_ext >&5
6393 cf_cv_ncurses_h2=no
6394 fi
6395 rm -f conftest.$ac_objext conftest.$ac_ext
6396
6397                         if test "$cf_cv_ncurses_h2" != no ; then
6398                                 cf_cv_ncurses_h2=$cf_incdir/$cf_header
6399                                 test -n "$verbose" && echo $ac_n "      ... found $ac_c" 1>&6
6400                                 break
6401                         fi
6402                         test -n "$verbose" && echo "    ... tested $cf_incdir/$cf_header" 1>&6
6403                 done
6404                 CPPFLAGS="$cf_save2_CPPFLAGS"
6405                 test "$cf_cv_ncurses_h2" != no && break
6406         done
6407         test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:6407: error: not found" >&5
6408 echo "$as_me: error: not found" >&2;}
6409    { (exit 1); exit 1; }; }
6410
6411 fi
6412 echo "$as_me:6412: result: $cf_cv_ncurses_h2" >&5
6413 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
6414
6415         cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's%/[^/]*$%%'`
6416         cf_cv_ncurses_header=`basename $cf_cv_ncurses_h2`
6417         if test `basename $cf_1st_incdir` = $cf_ncuhdr_root ; then
6418                 cf_cv_ncurses_header=$cf_ncuhdr_root/$cf_cv_ncurses_header
6419         fi
6420
6421 if test -n "$cf_1st_incdir" ; then
6422   for cf_add_incdir in $cf_1st_incdir
6423   do
6424         while test $cf_add_incdir != /usr/include
6425         do
6426           if test -d $cf_add_incdir
6427           then
6428                 cf_have_incdir=no
6429                 if test -n "$CFLAGS$CPPFLAGS" ; then
6430                   # a loop is needed to ensure we can add subdirs of existing dirs
6431                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
6432                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
6433                           cf_have_incdir=yes; break
6434                         fi
6435                   done
6436                 fi
6437
6438                 if test "$cf_have_incdir" = no ; then
6439                   if test "$cf_add_incdir" = /usr/local/include ; then
6440                         if test "$GCC" = yes
6441                         then
6442                           cf_save_CPPFLAGS=$CPPFLAGS
6443                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6444                           cat >conftest.$ac_ext <<_ACEOF
6445 #line 6445 "configure"
6446 #include "confdefs.h"
6447 #include <stdio.h>
6448 int
6449 main ()
6450 {
6451 printf("Hello")
6452   ;
6453   return 0;
6454 }
6455 _ACEOF
6456 rm -f conftest.$ac_objext
6457 if { (eval echo "$as_me:6457: \"$ac_compile\"") >&5
6458   (eval $ac_compile) 2>&5
6459   ac_status=$?
6460   echo "$as_me:6460: \$? = $ac_status" >&5
6461   (exit $ac_status); } &&
6462          { ac_try='test -s conftest.$ac_objext'
6463   { (eval echo "$as_me:6463: \"$ac_try\"") >&5
6464   (eval $ac_try) 2>&5
6465   ac_status=$?
6466   echo "$as_me:6466: \$? = $ac_status" >&5
6467   (exit $ac_status); }; }; then
6468   :
6469 else
6470   echo "$as_me: failed program was:" >&5
6471 cat conftest.$ac_ext >&5
6472 cf_have_incdir=yes
6473 fi
6474 rm -f conftest.$ac_objext conftest.$ac_ext
6475                           CPPFLAGS=$cf_save_CPPFLAGS
6476                         fi
6477                   fi
6478                 fi
6479
6480                 if test "$cf_have_incdir" = no ; then
6481                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
6482
6483 echo "${as_me:-configure}:6483: testing adding $cf_add_incdir to include-path ..." 1>&5
6484
6485                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6486
6487                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
6488                   test "$cf_top_incdir" = "$cf_add_incdir" && break
6489                   cf_add_incdir="$cf_top_incdir"
6490                 else
6491                   break
6492                 fi
6493           fi
6494         done
6495   done
6496 fi
6497
6498 fi
6499
6500 # Set definitions to allow ifdef'ing for ncurses.h
6501
6502 case $cf_cv_ncurses_header in # (vi
6503 *ncurses.h)
6504         cat >>confdefs.h <<\EOF
6505 #define HAVE_NCURSES_H 1
6506 EOF
6507
6508         ;;
6509 esac
6510
6511 case $cf_cv_ncurses_header in # (vi
6512 ncurses/curses.h|ncurses/ncurses.h)
6513         cat >>confdefs.h <<\EOF
6514 #define HAVE_NCURSES_NCURSES_H 1
6515 EOF
6516
6517         ;;
6518 ncursesw/curses.h|ncursesw/ncurses.h)
6519         cat >>confdefs.h <<\EOF
6520 #define HAVE_NCURSESW_NCURSES_H 1
6521 EOF
6522
6523         ;;
6524 esac
6525
6526 echo "$as_me:6526: checking for terminfo header" >&5
6527 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
6528 if test "${cf_cv_term_header+set}" = set; then
6529   echo $ECHO_N "(cached) $ECHO_C" >&6
6530 else
6531
6532 case ${cf_cv_ncurses_header} in #(vi
6533 */ncurses.h|*/ncursesw.h) #(vi
6534         cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
6535         ;;
6536 *)
6537         cf_term_header=term.h
6538         ;;
6539 esac
6540
6541 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
6542 do
6543 cat >conftest.$ac_ext <<_ACEOF
6544 #line 6544 "configure"
6545 #include "confdefs.h"
6546 #include <stdio.h>
6547 #include <${cf_cv_ncurses_header:-curses.h}>
6548 #include <$cf_test>
6549
6550 int
6551 main ()
6552 {
6553 int x = auto_left_margin
6554   ;
6555   return 0;
6556 }
6557 _ACEOF
6558 rm -f conftest.$ac_objext
6559 if { (eval echo "$as_me:6559: \"$ac_compile\"") >&5
6560   (eval $ac_compile) 2>&5
6561   ac_status=$?
6562   echo "$as_me:6562: \$? = $ac_status" >&5
6563   (exit $ac_status); } &&
6564          { ac_try='test -s conftest.$ac_objext'
6565   { (eval echo "$as_me:6565: \"$ac_try\"") >&5
6566   (eval $ac_try) 2>&5
6567   ac_status=$?
6568   echo "$as_me:6568: \$? = $ac_status" >&5
6569   (exit $ac_status); }; }; then
6570
6571         cf_cv_term_header="$cf_test"
6572 else
6573   echo "$as_me: failed program was:" >&5
6574 cat conftest.$ac_ext >&5
6575
6576         cf_cv_term_header=unknown
6577
6578 fi
6579 rm -f conftest.$ac_objext conftest.$ac_ext
6580         test "$cf_cv_term_header" != unknown && break
6581 done
6582
6583 fi
6584 echo "$as_me:6584: result: $cf_cv_term_header" >&5
6585 echo "${ECHO_T}$cf_cv_term_header" >&6
6586
6587 # Set definitions to allow ifdef'ing to accommodate subdirectories
6588
6589 case $cf_cv_term_header in # (vi
6590 *term.h)
6591         cat >>confdefs.h <<\EOF
6592 #define HAVE_TERM_H 1
6593 EOF
6594
6595         ;;
6596 esac
6597
6598 case $cf_cv_term_header in # (vi
6599 ncurses/term.h) #(vi
6600         cat >>confdefs.h <<\EOF
6601 #define HAVE_NCURSES_TERM_H 1
6602 EOF
6603
6604         ;;
6605 ncursesw/term.h)
6606         cat >>confdefs.h <<\EOF
6607 #define HAVE_NCURSESW_TERM_H 1
6608 EOF
6609
6610         ;;
6611 esac
6612
6613 # some applications need this, but should check for NCURSES_VERSION
6614 cat >>confdefs.h <<\EOF
6615 #define NCURSES 1
6616 EOF
6617
6618 echo "$as_me:6618: checking for ncurses version" >&5
6619 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
6620 if test "${cf_cv_ncurses_version+set}" = set; then
6621   echo $ECHO_N "(cached) $ECHO_C" >&6
6622 else
6623
6624         cf_cv_ncurses_version=no
6625         cf_tempfile=out$$
6626         rm -f $cf_tempfile
6627         if test "$cross_compiling" = yes; then
6628
6629         # This will not work if the preprocessor splits the line after the
6630         # Autoconf token.  The 'unproto' program does that.
6631         cat > conftest.$ac_ext <<EOF
6632 #include <${cf_cv_ncurses_header:-curses.h}>
6633 #undef Autoconf
6634 #ifdef NCURSES_VERSION
6635 Autoconf NCURSES_VERSION
6636 #else
6637 #ifdef __NCURSES_H
6638 Autoconf "old"
6639 #endif
6640 ;
6641 #endif
6642 EOF
6643         cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
6644         { (eval echo "$as_me:6644: \"$cf_try\"") >&5
6645   (eval $cf_try) 2>&5
6646   ac_status=$?
6647   echo "$as_me:6647: \$? = $ac_status" >&5
6648   (exit $ac_status); }
6649         if test -f conftest.out ; then
6650                 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
6651                 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
6652                 rm -f conftest.out
6653         fi
6654
6655 else
6656   cat >conftest.$ac_ext <<_ACEOF
6657 #line 6657 "configure"
6658 #include "confdefs.h"
6659
6660 #include <${cf_cv_ncurses_header:-curses.h}>
6661 #include <stdio.h>
6662 int main()
6663 {
6664         FILE *fp = fopen("$cf_tempfile", "w");
6665 #ifdef NCURSES_VERSION
6666 # ifdef NCURSES_VERSION_PATCH
6667         fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
6668 # else
6669         fprintf(fp, "%s\n", NCURSES_VERSION);
6670 # endif
6671 #else
6672 # ifdef __NCURSES_H
6673         fprintf(fp, "old\n");
6674 # else
6675         make an error
6676 # endif
6677 #endif
6678         ${cf_cv_main_return:-return}(0);
6679 }
6680 _ACEOF
6681 rm -f conftest$ac_exeext
6682 if { (eval echo "$as_me:6682: \"$ac_link\"") >&5
6683   (eval $ac_link) 2>&5
6684   ac_status=$?
6685   echo "$as_me:6685: \$? = $ac_status" >&5
6686   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6687   { (eval echo "$as_me:6687: \"$ac_try\"") >&5
6688   (eval $ac_try) 2>&5
6689   ac_status=$?
6690   echo "$as_me:6690: \$? = $ac_status" >&5
6691   (exit $ac_status); }; }; then
6692
6693         cf_cv_ncurses_version=`cat $cf_tempfile`
6694 else
6695   echo "$as_me: program exited with status $ac_status" >&5
6696 echo "$as_me: failed program was:" >&5
6697 cat conftest.$ac_ext >&5
6698 fi
6699 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6700 fi
6701         rm -f $cf_tempfile
6702
6703 fi
6704 echo "$as_me:6704: result: $cf_cv_ncurses_version" >&5
6705 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
6706 test "$cf_cv_ncurses_version" = no || cat >>confdefs.h <<\EOF
6707 #define NCURSES 1
6708 EOF
6709
6710 cf_nculib_root=ncurses
6711         # This works, except for the special case where we find gpm, but
6712         # ncurses is in a nonstandard location via $LIBS, and we really want
6713         # to link gpm.
6714 cf_ncurses_LIBS=""
6715 cf_ncurses_SAVE="$LIBS"
6716 echo "$as_me:6716: checking for Gpm_Open in -lgpm" >&5
6717 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
6718 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
6719   echo $ECHO_N "(cached) $ECHO_C" >&6
6720 else
6721   ac_check_lib_save_LIBS=$LIBS
6722 LIBS="-lgpm  $LIBS"
6723 cat >conftest.$ac_ext <<_ACEOF
6724 #line 6724 "configure"
6725 #include "confdefs.h"
6726
6727 /* Override any gcc2 internal prototype to avoid an error.  */
6728 #ifdef __cplusplus
6729 extern "C"
6730 #endif
6731 /* We use char because int might match the return type of a gcc2
6732    builtin and then its argument prototype would still apply.  */
6733 char Gpm_Open ();
6734 int
6735 main ()
6736 {
6737 Gpm_Open ();
6738   ;
6739   return 0;
6740 }
6741 _ACEOF
6742 rm -f conftest.$ac_objext conftest$ac_exeext
6743 if { (eval echo "$as_me:6743: \"$ac_link\"") >&5
6744   (eval $ac_link) 2>&5
6745   ac_status=$?
6746   echo "$as_me:6746: \$? = $ac_status" >&5
6747   (exit $ac_status); } &&
6748          { ac_try='test -s conftest$ac_exeext'
6749   { (eval echo "$as_me:6749: \"$ac_try\"") >&5
6750   (eval $ac_try) 2>&5
6751   ac_status=$?
6752   echo "$as_me:6752: \$? = $ac_status" >&5
6753   (exit $ac_status); }; }; then
6754   ac_cv_lib_gpm_Gpm_Open=yes
6755 else
6756   echo "$as_me: failed program was:" >&5
6757 cat conftest.$ac_ext >&5
6758 ac_cv_lib_gpm_Gpm_Open=no
6759 fi
6760 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6761 LIBS=$ac_check_lib_save_LIBS
6762 fi
6763 echo "$as_me:6763: result: $ac_cv_lib_gpm_Gpm_Open" >&5
6764 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
6765 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
6766   echo "$as_me:6766: checking for initscr in -lgpm" >&5
6767 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
6768 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
6769   echo $ECHO_N "(cached) $ECHO_C" >&6
6770 else
6771   ac_check_lib_save_LIBS=$LIBS
6772 LIBS="-lgpm  $LIBS"
6773 cat >conftest.$ac_ext <<_ACEOF
6774 #line 6774 "configure"
6775 #include "confdefs.h"
6776
6777 /* Override any gcc2 internal prototype to avoid an error.  */
6778 #ifdef __cplusplus
6779 extern "C"
6780 #endif
6781 /* We use char because int might match the return type of a gcc2
6782    builtin and then its argument prototype would still apply.  */
6783 char initscr ();
6784 int
6785 main ()
6786 {
6787 initscr ();
6788   ;
6789   return 0;
6790 }
6791 _ACEOF
6792 rm -f conftest.$ac_objext conftest$ac_exeext
6793 if { (eval echo "$as_me:6793: \"$ac_link\"") >&5
6794   (eval $ac_link) 2>&5
6795   ac_status=$?
6796   echo "$as_me:6796: \$? = $ac_status" >&5
6797   (exit $ac_status); } &&
6798          { ac_try='test -s conftest$ac_exeext'
6799   { (eval echo "$as_me:6799: \"$ac_try\"") >&5
6800   (eval $ac_try) 2>&5
6801   ac_status=$?
6802   echo "$as_me:6802: \$? = $ac_status" >&5
6803   (exit $ac_status); }; }; then
6804   ac_cv_lib_gpm_initscr=yes
6805 else
6806   echo "$as_me: failed program was:" >&5
6807 cat conftest.$ac_ext >&5
6808 ac_cv_lib_gpm_initscr=no
6809 fi
6810 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6811 LIBS=$ac_check_lib_save_LIBS
6812 fi
6813 echo "$as_me:6813: result: $ac_cv_lib_gpm_initscr" >&5
6814 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
6815 if test $ac_cv_lib_gpm_initscr = yes; then
6816   LIBS="$cf_ncurses_SAVE"
6817 else
6818   cf_ncurses_LIBS="-lgpm"
6819 fi
6820
6821 fi
6822
6823 case $host_os in #(vi
6824 freebsd*)
6825         # This is only necessary if you are linking against an obsolete
6826         # version of ncurses (but it should do no harm, since it's static).
6827         if test "$cf_nculib_root" = ncurses ; then
6828                 echo "$as_me:6828: checking for tgoto in -lmytinfo" >&5
6829 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
6830 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
6831   echo $ECHO_N "(cached) $ECHO_C" >&6
6832 else
6833   ac_check_lib_save_LIBS=$LIBS
6834 LIBS="-lmytinfo  $LIBS"
6835 cat >conftest.$ac_ext <<_ACEOF
6836 #line 6836 "configure"
6837 #include "confdefs.h"
6838
6839 /* Override any gcc2 internal prototype to avoid an error.  */
6840 #ifdef __cplusplus
6841 extern "C"
6842 #endif
6843 /* We use char because int might match the return type of a gcc2
6844    builtin and then its argument prototype would still apply.  */
6845 char tgoto ();
6846 int
6847 main ()
6848 {
6849 tgoto ();
6850   ;
6851   return 0;
6852 }
6853 _ACEOF
6854 rm -f conftest.$ac_objext conftest$ac_exeext
6855 if { (eval echo "$as_me:6855: \"$ac_link\"") >&5
6856   (eval $ac_link) 2>&5
6857   ac_status=$?
6858   echo "$as_me:6858: \$? = $ac_status" >&5
6859   (exit $ac_status); } &&
6860          { ac_try='test -s conftest$ac_exeext'
6861   { (eval echo "$as_me:6861: \"$ac_try\"") >&5
6862   (eval $ac_try) 2>&5
6863   ac_status=$?
6864   echo "$as_me:6864: \$? = $ac_status" >&5
6865   (exit $ac_status); }; }; then
6866   ac_cv_lib_mytinfo_tgoto=yes
6867 else
6868   echo "$as_me: failed program was:" >&5
6869 cat conftest.$ac_ext >&5
6870 ac_cv_lib_mytinfo_tgoto=no
6871 fi
6872 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6873 LIBS=$ac_check_lib_save_LIBS
6874 fi
6875 echo "$as_me:6875: result: $ac_cv_lib_mytinfo_tgoto" >&5
6876 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
6877 if test $ac_cv_lib_mytinfo_tgoto = yes; then
6878   cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
6879 fi
6880
6881         fi
6882         ;;
6883 esac
6884
6885 LIBS="$cf_ncurses_LIBS $LIBS"
6886
6887 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
6888 then
6889         LIBS="-l$cf_nculib_root $LIBS"
6890 else
6891
6892         eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
6893         cf_libdir=""
6894         echo "$as_me:6894: checking for initscr" >&5
6895 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
6896 if test "${ac_cv_func_initscr+set}" = set; then
6897   echo $ECHO_N "(cached) $ECHO_C" >&6
6898 else
6899   cat >conftest.$ac_ext <<_ACEOF
6900 #line 6900 "configure"
6901 #include "confdefs.h"
6902 /* System header to define __stub macros and hopefully few prototypes,
6903     which can conflict with char initscr (); below.  */
6904 #include <assert.h>
6905 /* Override any gcc2 internal prototype to avoid an error.  */
6906 #ifdef __cplusplus
6907 extern "C"
6908 #endif
6909 /* We use char because int might match the return type of a gcc2
6910    builtin and then its argument prototype would still apply.  */
6911 char initscr ();
6912 char (*f) ();
6913
6914 int
6915 main ()
6916 {
6917 /* The GNU C library defines this for functions which it implements
6918     to always fail with ENOSYS.  Some functions are actually named
6919     something starting with __ and the normal name is an alias.  */
6920 #if defined (__stub_initscr) || defined (__stub___initscr)
6921 choke me
6922 #else
6923 f = initscr;
6924 #endif
6925
6926   ;
6927   return 0;
6928 }
6929 _ACEOF
6930 rm -f conftest.$ac_objext conftest$ac_exeext
6931 if { (eval echo "$as_me:6931: \"$ac_link\"") >&5
6932   (eval $ac_link) 2>&5
6933   ac_status=$?
6934   echo "$as_me:6934: \$? = $ac_status" >&5
6935   (exit $ac_status); } &&
6936          { ac_try='test -s conftest$ac_exeext'
6937   { (eval echo "$as_me:6937: \"$ac_try\"") >&5
6938   (eval $ac_try) 2>&5
6939   ac_status=$?
6940   echo "$as_me:6940: \$? = $ac_status" >&5
6941   (exit $ac_status); }; }; then
6942   ac_cv_func_initscr=yes
6943 else
6944   echo "$as_me: failed program was:" >&5
6945 cat conftest.$ac_ext >&5
6946 ac_cv_func_initscr=no
6947 fi
6948 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6949 fi
6950 echo "$as_me:6950: result: $ac_cv_func_initscr" >&5
6951 echo "${ECHO_T}$ac_cv_func_initscr" >&6
6952 if test $ac_cv_func_initscr = yes; then
6953   eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
6954 else
6955
6956                 cf_save_LIBS="$LIBS"
6957                 echo "$as_me:6957: checking for initscr in -l$cf_nculib_root" >&5
6958 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
6959                 LIBS="-l$cf_nculib_root $LIBS"
6960                 cat >conftest.$ac_ext <<_ACEOF
6961 #line 6961 "configure"
6962 #include "confdefs.h"
6963 #include <${cf_cv_ncurses_header:-curses.h}>
6964 int
6965 main ()
6966 {
6967 initscr()
6968   ;
6969   return 0;
6970 }
6971 _ACEOF
6972 rm -f conftest.$ac_objext conftest$ac_exeext
6973 if { (eval echo "$as_me:6973: \"$ac_link\"") >&5
6974   (eval $ac_link) 2>&5
6975   ac_status=$?
6976   echo "$as_me:6976: \$? = $ac_status" >&5
6977   (exit $ac_status); } &&
6978          { ac_try='test -s conftest$ac_exeext'
6979   { (eval echo "$as_me:6979: \"$ac_try\"") >&5
6980   (eval $ac_try) 2>&5
6981   ac_status=$?
6982   echo "$as_me:6982: \$? = $ac_status" >&5
6983   (exit $ac_status); }; }; then
6984   echo "$as_me:6984: result: yes" >&5
6985 echo "${ECHO_T}yes" >&6
6986                          eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
6987
6988 else
6989   echo "$as_me: failed program was:" >&5
6990 cat conftest.$ac_ext >&5
6991 echo "$as_me:6991: result: no" >&5
6992 echo "${ECHO_T}no" >&6
6993
6994 cf_search=
6995 cf_library_path_list=""
6996 if test -n "${LDFLAGS}${LIBS}" ; then
6997         for cf_library_path in $LDFLAGS $LIBS
6998         do
6999                 case $cf_library_path in #(vi
7000                 -L*)
7001                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
7002
7003 test "$cf_library_path" != "NONE" && \
7004 test -d "$cf_library_path" && \
7005  {
7006         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
7007         test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
7008         test -d $cf_library_path/lib/$cf_nculib_root &&       cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
7009         test -d $cf_library_path/lib/$cf_nculib_root/lib &&    cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
7010         test -d $cf_library_path/$cf_nculib_root/lib &&       cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
7011         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"
7012 }
7013
7014                         cf_library_path_list="$cf_library_path_list $cf_search"
7015                         ;;
7016                 esac
7017         done
7018 fi
7019
7020 cf_search=
7021
7022 test "/usr" != "$prefix" && \
7023 test -d "/usr" && \
7024 (test $prefix = NONE || test "/usr" != "$prefix") && {
7025         test -n "$verbose" && echo "    ... testing for lib-directories under /usr"
7026         test -d /usr/lib &&          cf_search="$cf_search /usr/lib"
7027         test -d /usr/lib/$cf_nculib_root &&       cf_search="$cf_search /usr/lib/$cf_nculib_root"
7028         test -d /usr/lib/$cf_nculib_root/lib &&    cf_search="$cf_search /usr/lib/$cf_nculib_root/lib"
7029         test -d /usr/$cf_nculib_root/lib &&       cf_search="$cf_search /usr/$cf_nculib_root/lib"
7030         test -d /usr/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search /usr/$cf_nculib_root/lib/$cf_nculib_root"
7031 }
7032
7033 test "$prefix" != "NONE" && \
7034 test -d "$prefix" && \
7035  {
7036         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
7037         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
7038         test -d $prefix/lib/$cf_nculib_root &&       cf_search="$cf_search $prefix/lib/$cf_nculib_root"
7039         test -d $prefix/lib/$cf_nculib_root/lib &&    cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
7040         test -d $prefix/$cf_nculib_root/lib &&       cf_search="$cf_search $prefix/$cf_nculib_root/lib"
7041         test -d $prefix/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
7042 }
7043
7044 test "/usr/local" != "$prefix" && \
7045 test -d "/usr/local" && \
7046 (test $prefix = NONE || test "/usr/local" != "$prefix") && {
7047         test -n "$verbose" && echo "    ... testing for lib-directories under /usr/local"
7048         test -d /usr/local/lib &&          cf_search="$cf_search /usr/local/lib"
7049         test -d /usr/local/lib/$cf_nculib_root &&       cf_search="$cf_search /usr/local/lib/$cf_nculib_root"
7050         test -d /usr/local/lib/$cf_nculib_root/lib &&    cf_search="$cf_search /usr/local/lib/$cf_nculib_root/lib"
7051         test -d /usr/local/$cf_nculib_root/lib &&       cf_search="$cf_search /usr/local/$cf_nculib_root/lib"
7052         test -d /usr/local/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search /usr/local/$cf_nculib_root/lib/$cf_nculib_root"
7053 }
7054
7055 test "/opt" != "$prefix" && \
7056 test -d "/opt" && \
7057 (test $prefix = NONE || test "/opt" != "$prefix") && {
7058         test -n "$verbose" && echo "    ... testing for lib-directories under /opt"
7059         test -d /opt/lib &&          cf_search="$cf_search /opt/lib"
7060         test -d /opt/lib/$cf_nculib_root &&       cf_search="$cf_search /opt/lib/$cf_nculib_root"
7061         test -d /opt/lib/$cf_nculib_root/lib &&    cf_search="$cf_search /opt/lib/$cf_nculib_root/lib"
7062         test -d /opt/$cf_nculib_root/lib &&       cf_search="$cf_search /opt/$cf_nculib_root/lib"
7063         test -d /opt/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search /opt/$cf_nculib_root/lib/$cf_nculib_root"
7064 }
7065
7066 test "$HOME" != "$prefix" && \
7067 test -d "$HOME" && \
7068 (test $prefix = NONE || test "$HOME" != "$prefix") && {
7069         test -n "$verbose" && echo "    ... testing for lib-directories under $HOME"
7070         test -d $HOME/lib &&          cf_search="$cf_search $HOME/lib"
7071         test -d $HOME/lib/$cf_nculib_root &&       cf_search="$cf_search $HOME/lib/$cf_nculib_root"
7072         test -d $HOME/lib/$cf_nculib_root/lib &&    cf_search="$cf_search $HOME/lib/$cf_nculib_root/lib"
7073         test -d $HOME/$cf_nculib_root/lib &&       cf_search="$cf_search $HOME/$cf_nculib_root/lib"
7074         test -d $HOME/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search $HOME/$cf_nculib_root/lib/$cf_nculib_root"
7075 }
7076
7077 cf_search="$cf_library_path_list $cf_search"
7078
7079                         for cf_libdir in $cf_search
7080                         do
7081                                 echo "$as_me:7081: checking for -l$cf_nculib_root in $cf_libdir" >&5
7082 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
7083                                 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
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()
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                                          eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
7111                                          break
7112 else
7113   echo "$as_me: failed program was:" >&5
7114 cat conftest.$ac_ext >&5
7115 echo "$as_me:7115: result: no" >&5
7116 echo "${ECHO_T}no" >&6
7117                                          LIBS="$cf_save_LIBS"
7118 fi
7119 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7120                         done
7121
7122 fi
7123 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7124
7125 fi
7126
7127 eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root
7128
7129 if test $cf_found_library = no ; then
7130         { { echo "$as_me:7130: error: Cannot link $cf_nculib_root library" >&5
7131 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
7132    { (exit 1); exit 1; }; }
7133 fi
7134
7135 fi
7136
7137 if test -n "$cf_ncurses_LIBS" ; then
7138         echo "$as_me:7138: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
7139 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
7140         cf_ncurses_SAVE="$LIBS"
7141         for p in $cf_ncurses_LIBS ; do
7142                 q=`echo $LIBS | sed -e "s%$p %%" -e "s%$p$%%"`
7143                 if test "$q" != "$LIBS" ; then
7144                         LIBS="$q"
7145                 fi
7146         done
7147         cat >conftest.$ac_ext <<_ACEOF
7148 #line 7148 "configure"
7149 #include "confdefs.h"
7150 #include <${cf_cv_ncurses_header:-curses.h}>
7151 int
7152 main ()
7153 {
7154 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
7155   ;
7156   return 0;
7157 }
7158 _ACEOF
7159 rm -f conftest.$ac_objext conftest$ac_exeext
7160 if { (eval echo "$as_me:7160: \"$ac_link\"") >&5
7161   (eval $ac_link) 2>&5
7162   ac_status=$?
7163   echo "$as_me:7163: \$? = $ac_status" >&5
7164   (exit $ac_status); } &&
7165          { ac_try='test -s conftest$ac_exeext'
7166   { (eval echo "$as_me:7166: \"$ac_try\"") >&5
7167   (eval $ac_try) 2>&5
7168   ac_status=$?
7169   echo "$as_me:7169: \$? = $ac_status" >&5
7170   (exit $ac_status); }; }; then
7171   echo "$as_me:7171: result: yes" >&5
7172 echo "${ECHO_T}yes" >&6
7173 else
7174   echo "$as_me: failed program was:" >&5
7175 cat conftest.$ac_ext >&5
7176 echo "$as_me:7176: result: no" >&5
7177 echo "${ECHO_T}no" >&6
7178                  LIBS="$cf_ncurses_SAVE"
7179 fi
7180 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7181 fi
7182
7183 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
7184
7185 cat >>confdefs.h <<EOF
7186 #define $cf_nculib_ROOT 1
7187 EOF
7188
7189 fi
7190
7191 fi
7192
7193 if test "$NCURSES_CONFIG" != none ; then
7194
7195 cf_version=`$NCURSES_CONFIG --version`
7196
7197 NCURSES_MAJOR=`echo "$cf_version" | sed -e 's/\..*//'`
7198 NCURSES_MINOR=`echo "$cf_version" | sed -e 's/^[0-9][0-9]*\.//' -e 's/\..*//'`
7199 NCURSES_PATCH=`echo "$cf_version" | sed -e 's/^[0-9][0-9]*\.[0-9][0-9]*\.//'`
7200
7201 # ABI version is not available from headers
7202 cf_cv_abi_version=`$NCURSES_CONFIG --abi-version`
7203
7204 else
7205
7206 for cf_name in MAJOR MINOR PATCH
7207 do
7208 cat >conftest.$ac_ext <<CF_EOF
7209 #include <${cf_cv_ncurses_header:-curses.h}>
7210 AUTOCONF_$cf_name NCURSES_VERSION_$cf_name
7211 CF_EOF
7212         cf_try="$ac_cpp conftest.$ac_ext 2>&5 | fgrep AUTOCONF_$cf_name >conftest.out"
7213         { (eval echo "$as_me:7213: \"$cf_try\"") >&5
7214   (eval $cf_try) 2>&5
7215   ac_status=$?
7216   echo "$as_me:7216: \$? = $ac_status" >&5
7217   (exit $ac_status); }
7218         if test -f conftest.out ; then
7219                 cf_result=`cat conftest.out | sed -e "s/^.*AUTOCONF_$cf_name[   ][      ]*//"`
7220                 eval NCURSES_$cf_name=\"$cf_result\"
7221                 # cat conftest.$ac_ext
7222                 # cat conftest.out
7223         fi
7224 done
7225
7226 cf_cv_abi_version=${NCURSES_MAJOR}
7227
7228 fi
7229
7230 cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
7231
7232 cf_cv_timestamp=`date`
7233
7234 echo "$as_me:7234: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&5
7235 echo "${ECHO_T}Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&6
7236
7237         case $cf_cv_system_name in #(vi
7238         OS/2*|os2*) #(vi
7239         LIB_PREFIX=''
7240         ;;
7241         *)      LIB_PREFIX='lib'
7242         ;;
7243         esac
7244 cf_prefix=$LIB_PREFIX
7245
7246 LIB_PREFIX=$cf_prefix
7247
7248 LIB_SUFFIX=
7249
7250 ###############################################################################
7251
7252 if test X"$CC_G_OPT" = X"" ; then
7253         CC_G_OPT='-g'
7254         test -n "$GCC" && test "${ac_cv_prog_cc_g}" != yes && CC_G_OPT=''
7255 fi
7256
7257 echo "$as_me:7257: checking for default loader flags" >&5
7258 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
7259 case $DFT_LWR_MODEL in
7260 normal)  LD_MODEL=''   ;;
7261 debug)   LD_MODEL=$CC_G_OPT ;;
7262 profile) LD_MODEL='-pg';;
7263 shared)  LD_MODEL=''   ;;
7264 esac
7265 echo "$as_me:7265: result: $LD_MODEL" >&5
7266 echo "${ECHO_T}$LD_MODEL" >&6
7267
7268 LD_RPATH_OPT=
7269 echo "$as_me:7269: checking for an rpath option" >&5
7270 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
7271 case $cf_cv_system_name in #(vi
7272 irix*) #(vi
7273         if test "$GCC" = yes; then
7274                 LD_RPATH_OPT="-Wl,-rpath,"
7275         else
7276                 LD_RPATH_OPT="-rpath "
7277         fi
7278         ;;
7279 linux*|gnu*|k*bsd*-gnu) #(vi
7280         LD_RPATH_OPT="-Wl,-rpath,"
7281         ;;
7282 openbsd[2-9].*) #(vi
7283         LD_RPATH_OPT="-Wl,-rpath,"
7284         ;;
7285 freebsd*) #(vi
7286         LD_RPATH_OPT="-rpath "
7287         ;;
7288 netbsd*) #(vi
7289         LD_RPATH_OPT="-Wl,-rpath,"
7290         ;;
7291 osf*|mls+*) #(vi
7292         LD_RPATH_OPT="-rpath "
7293         ;;
7294 solaris2*) #(vi
7295         LD_RPATH_OPT="-R"
7296         ;;
7297 *)
7298         ;;
7299 esac
7300 echo "$as_me:7300: result: $LD_RPATH_OPT" >&5
7301 echo "${ECHO_T}$LD_RPATH_OPT" >&6
7302
7303 case "x$LD_RPATH_OPT" in #(vi
7304 x-R*)
7305         echo "$as_me:7305: checking if we need a space after rpath option" >&5
7306 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
7307         cf_save_LIBS="$LIBS"
7308         LIBS="${LD_RPATH_OPT}$libdir $LIBS"
7309         cat >conftest.$ac_ext <<_ACEOF
7310 #line 7310 "configure"
7311 #include "confdefs.h"
7312
7313 int
7314 main ()
7315 {
7316
7317   ;
7318   return 0;
7319 }
7320 _ACEOF
7321 rm -f conftest.$ac_objext conftest$ac_exeext
7322 if { (eval echo "$as_me:7322: \"$ac_link\"") >&5
7323   (eval $ac_link) 2>&5
7324   ac_status=$?
7325   echo "$as_me:7325: \$? = $ac_status" >&5
7326   (exit $ac_status); } &&
7327          { ac_try='test -s conftest$ac_exeext'
7328   { (eval echo "$as_me:7328: \"$ac_try\"") >&5
7329   (eval $ac_try) 2>&5
7330   ac_status=$?
7331   echo "$as_me:7331: \$? = $ac_status" >&5
7332   (exit $ac_status); }; }; then
7333   cf_rpath_space=no
7334 else
7335   echo "$as_me: failed program was:" >&5
7336 cat conftest.$ac_ext >&5
7337 cf_rpath_space=yes
7338 fi
7339 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7340         LIBS="$cf_save_LIBS"
7341         echo "$as_me:7341: result: $cf_rpath_space" >&5
7342 echo "${ECHO_T}$cf_rpath_space" >&6
7343         test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
7344         ;;
7345 esac
7346
7347         LOCAL_LDFLAGS=
7348         LOCAL_LDFLAGS2=
7349         LD_SHARED_OPTS=
7350         INSTALL_LIB="-m 644"
7351
7352         cf_cv_do_symlinks=no
7353         cf_ld_rpath_opt=
7354         test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT"
7355
7356         echo "$as_me:7356: checking if release/abi version should be used for shared libs" >&5
7357 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
7358
7359 # Check whether --with-shlib-version or --without-shlib-version was given.
7360 if test "${with_shlib_version+set}" = set; then
7361   withval="$with_shlib_version"
7362   test -z "$withval" && withval=auto
7363         case $withval in #(vi
7364         yes) #(vi
7365                 cf_cv_shlib_version=auto
7366                 ;;
7367         rel|abi|auto|no) #(vi
7368                 cf_cv_shlib_version=$withval
7369                 ;;
7370         *)
7371                 { { echo "$as_me:7371: error: option value must be one of: rel, abi, auto or no" >&5
7372 echo "$as_me: error: option value must be one of: rel, abi, auto or no" >&2;}
7373    { (exit 1); exit 1; }; }
7374                 ;;
7375         esac
7376
7377 else
7378   cf_cv_shlib_version=auto
7379 fi;
7380         echo "$as_me:7380: result: $cf_cv_shlib_version" >&5
7381 echo "${ECHO_T}$cf_cv_shlib_version" >&6
7382
7383         cf_cv_rm_so_locs=no
7384
7385         # Some less-capable ports of gcc support only -fpic
7386         CC_SHARED_OPTS=
7387         if test "$GCC" = yes
7388         then
7389                 echo "$as_me:7389: checking which $CC option to use" >&5
7390 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
7391                 cf_save_CFLAGS="$CFLAGS"
7392                 for CC_SHARED_OPTS in -fPIC -fpic ''
7393                 do
7394                         CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
7395                         cat >conftest.$ac_ext <<_ACEOF
7396 #line 7396 "configure"
7397 #include "confdefs.h"
7398 #include <stdio.h>
7399 int
7400 main ()
7401 {
7402 int x = 1
7403   ;
7404   return 0;
7405 }
7406 _ACEOF
7407 rm -f conftest.$ac_objext
7408 if { (eval echo "$as_me:7408: \"$ac_compile\"") >&5
7409   (eval $ac_compile) 2>&5
7410   ac_status=$?
7411   echo "$as_me:7411: \$? = $ac_status" >&5
7412   (exit $ac_status); } &&
7413          { ac_try='test -s conftest.$ac_objext'
7414   { (eval echo "$as_me:7414: \"$ac_try\"") >&5
7415   (eval $ac_try) 2>&5
7416   ac_status=$?
7417   echo "$as_me:7417: \$? = $ac_status" >&5
7418   (exit $ac_status); }; }; then
7419   break
7420 else
7421   echo "$as_me: failed program was:" >&5
7422 cat conftest.$ac_ext >&5
7423 fi
7424 rm -f conftest.$ac_objext conftest.$ac_ext
7425                 done
7426                 echo "$as_me:7426: result: $CC_SHARED_OPTS" >&5
7427 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
7428                 CFLAGS="$cf_save_CFLAGS"
7429         fi
7430
7431         cf_cv_shlib_version_infix=no
7432
7433         case $cf_cv_system_name in #(vi
7434         aix[56]*) #(vi
7435                 if test "$GCC" = yes; then
7436                         CC_SHARED_OPTS=
7437                         MK_SHARED_LIB='$(CC) -shared'
7438                 fi
7439                 ;;
7440         beos*) #(vi
7441                 MK_SHARED_LIB='${CC} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
7442                 ;;
7443         cygwin*) #(vi
7444                 CC_SHARED_OPTS=
7445                 MK_SHARED_LIB='sh ../mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
7446                 cf_cv_shlib_version=cygdll
7447                 cf_cv_shlib_version_infix=cygdll
7448                 cat >mk_shared_lib.sh <<-CF_EOF
7449                 #!/bin/sh
7450                 SHARED_LIB=\$1
7451                 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
7452                 shift
7453                 cat <<-EOF
7454                 Linking shared library
7455                 ** SHARED_LIB \$SHARED_LIB
7456                 ** IMPORT_LIB \$IMPORT_LIB
7457 EOF
7458                 exec \$* -shared -Wl,--out-implib=../lib/\${IMPORT_LIB} -Wl,--export-all-symbols -o ../lib/\${SHARED_LIB}
7459 CF_EOF
7460                 chmod +x mk_shared_lib.sh
7461                 ;;
7462         darwin*) #(vi
7463                 EXTRA_CFLAGS="-no-cpp-precomp"
7464                 CC_SHARED_OPTS="-dynamic"
7465                 MK_SHARED_LIB='${CC} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
7466                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
7467                 cf_cv_shlib_version_infix=yes
7468                 echo "$as_me:7468: checking if ld -search_paths_first works" >&5
7469 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
7470 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
7471   echo $ECHO_N "(cached) $ECHO_C" >&6
7472 else
7473
7474                         cf_save_LDFLAGS=$LDFLAGS
7475                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
7476                         cat >conftest.$ac_ext <<_ACEOF
7477 #line 7477 "configure"
7478 #include "confdefs.h"
7479
7480 int
7481 main ()
7482 {
7483 int i;
7484   ;
7485   return 0;
7486 }
7487 _ACEOF
7488 rm -f conftest.$ac_objext conftest$ac_exeext
7489 if { (eval echo "$as_me:7489: \"$ac_link\"") >&5
7490   (eval $ac_link) 2>&5
7491   ac_status=$?
7492   echo "$as_me:7492: \$? = $ac_status" >&5
7493   (exit $ac_status); } &&
7494          { ac_try='test -s conftest$ac_exeext'
7495   { (eval echo "$as_me:7495: \"$ac_try\"") >&5
7496   (eval $ac_try) 2>&5
7497   ac_status=$?
7498   echo "$as_me:7498: \$? = $ac_status" >&5
7499   (exit $ac_status); }; }; then
7500   cf_cv_ldflags_search_paths_first=yes
7501 else
7502   echo "$as_me: failed program was:" >&5
7503 cat conftest.$ac_ext >&5
7504 cf_cv_ldflags_search_paths_first=no
7505 fi
7506 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7507                                 LDFLAGS=$cf_save_LDFLAGS
7508 fi
7509 echo "$as_me:7509: result: $cf_cv_ldflags_search_paths_first" >&5
7510 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
7511                 if test $cf_cv_ldflags_search_paths_first = yes; then
7512                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
7513                 fi
7514                 ;;
7515         hpux*) #(vi
7516                 # (tested with gcc 2.7.2 -- I don't have c89)
7517                 if test "$GCC" = yes; then
7518                         LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
7519                 else
7520                         CC_SHARED_OPTS='+Z'
7521                         LD_SHARED_OPTS='-Wl,+b,${libdir}'
7522                 fi
7523                 MK_SHARED_LIB='${LD} +b ${libdir} -b -o $@'
7524                 # HP-UX shared libraries must be executable, and should be
7525                 # readonly to exploit a quirk in the memory manager.
7526                 INSTALL_LIB="-m 555"
7527                 ;;
7528         irix*) #(vi
7529                 if test "$cf_cv_enable_rpath" = yes ; then
7530                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${libdir} $EXTRA_LDFLAGS"
7531                 fi
7532                 # tested with IRIX 5.2 and 'cc'.
7533                 if test "$GCC" != yes; then
7534                         CC_SHARED_OPTS='-KPIC'
7535                         MK_SHARED_LIB='${CC} -shared -rdata_shared -soname `basename $@` -o $@'
7536                 else
7537                         MK_SHARED_LIB='${CC} -shared -Wl,-soname,`basename $@` -o $@'
7538                 fi
7539                 cf_cv_rm_so_locs=yes
7540                 ;;
7541         linux*|gnu*|k*bsd*-gnu) #(vi
7542                 if test "$DFT_LWR_MODEL" = "shared" ; then
7543                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
7544                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
7545                 fi
7546                 if test "$cf_cv_enable_rpath" = yes ; then
7547                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${libdir} $EXTRA_LDFLAGS"
7548                 fi
7549
7550         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
7551         if test "$cf_cv_shlib_version" = rel; then
7552                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
7553         else
7554                 cf_cv_shared_soname='`basename $@`'
7555         fi
7556
7557                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
7558                 ;;
7559         openbsd[2-9].*) #(vi
7560                 if test "$DFT_LWR_MODEL" = "shared" ; then
7561                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
7562                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
7563                 fi
7564                 if test "$cf_cv_enable_rpath" = yes ; then
7565                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${libdir} $EXTRA_LDFLAGS"
7566                 fi
7567                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
7568
7569         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
7570         if test "$cf_cv_shlib_version" = rel; then
7571                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
7572         else
7573                 cf_cv_shared_soname='`basename $@`'
7574         fi
7575
7576                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
7577                 ;;
7578         nto-qnx*|openbsd*|freebsd[12].*) #(vi
7579                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
7580                 MK_SHARED_LIB='${LD} -Bshareable -o $@'
7581                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
7582                 ;;
7583         freebsd*) #(vi
7584                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
7585                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
7586                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
7587                         LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${libdir} $LOCAL_LDFLAGS"
7588                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${libdir} $EXTRA_LDFLAGS"
7589                 fi
7590
7591         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
7592         if test "$cf_cv_shlib_version" = rel; then
7593                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
7594         else
7595                 cf_cv_shared_soname='`basename $@`'
7596         fi
7597
7598                 MK_SHARED_LIB='${LD} -shared -Bshareable -soname=`basename $@` -o $@'
7599                 ;;
7600         netbsd*) #(vi
7601                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
7602                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
7603                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
7604                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
7605                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${libdir} $EXTRA_LDFLAGS"
7606                         if test "$cf_cv_shlib_version" = auto; then
7607                         if test -f /usr/libexec/ld.elf_so; then
7608                                 cf_cv_shlib_version=abi
7609                         else
7610                                 cf_cv_shlib_version=rel
7611                         fi
7612                         fi
7613
7614         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
7615         if test "$cf_cv_shlib_version" = rel; then
7616                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
7617         else
7618                 cf_cv_shared_soname='`basename $@`'
7619         fi
7620
7621                         MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
7622                 else
7623                         MK_SHARED_LIB='${LD} -shared -Bshareable -o $@'
7624                 fi
7625                 ;;
7626         osf*|mls+*) #(vi
7627                 # tested with OSF/1 V3.2 and 'cc'
7628                 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
7629                 # link with shared libs).
7630                 MK_SHARED_LIB='${LD} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
7631                 case $host_os in #(vi
7632                 osf4*)
7633                         MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
7634                         ;;
7635                 esac
7636                 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
7637                 if test "$DFT_LWR_MODEL" = "shared" ; then
7638                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
7639                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
7640                 fi
7641                 cf_cv_rm_so_locs=yes
7642                 ;;
7643         sco3.2v5*)  # (also uw2* and UW7: hops 13-Apr-98
7644                 # tested with osr5.0.5
7645                 if test "$GCC" != yes; then
7646                         CC_SHARED_OPTS='-belf -KPIC'
7647                 fi
7648                 MK_SHARED_LIB='${LD} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
7649                 if test "$cf_cv_enable_rpath" = yes ; then
7650                         # only way is to set LD_RUN_PATH but no switch for it
7651                         RUN_PATH=$libdir
7652                 fi
7653                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
7654                 LINK_PROGS='LD_RUN_PATH=${libdir}'
7655                 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
7656                 ;;
7657         sunos4*) #(vi
7658                 # tested with SunOS 4.1.1 and gcc 2.7.0
7659                 if test "$GCC" != yes; then
7660                         CC_SHARED_OPTS='-KPIC'
7661                 fi
7662                 MK_SHARED_LIB='${LD} -assert pure-text -o $@'
7663                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
7664                 ;;
7665         solaris2*) #(vi
7666                 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
7667                 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
7668                 if test "$DFT_LWR_MODEL" = "shared" ; then
7669                         LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
7670                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
7671                 fi
7672                 if test "$cf_cv_enable_rpath" = yes ; then
7673                         EXTRA_LDFLAGS="-R \${libdir} $EXTRA_LDFLAGS"
7674                 fi
7675
7676         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
7677         if test "$cf_cv_shlib_version" = rel; then
7678                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
7679         else
7680                 cf_cv_shared_soname='`basename $@`'
7681         fi
7682
7683                 if test "$GCC" != yes; then
7684                         cf_save_CFLAGS="$CFLAGS"
7685                         for cf_shared_opts in -xcode=pic32 -xcode=pic13 -KPIC -Kpic -O
7686                         do
7687                                 CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
7688                                 cat >conftest.$ac_ext <<_ACEOF
7689 #line 7689 "configure"
7690 #include "confdefs.h"
7691 #include <stdio.h>
7692 int
7693 main ()
7694 {
7695 printf("Hello\n");
7696   ;
7697   return 0;
7698 }
7699 _ACEOF
7700 rm -f conftest.$ac_objext
7701 if { (eval echo "$as_me:7701: \"$ac_compile\"") >&5
7702   (eval $ac_compile) 2>&5
7703   ac_status=$?
7704   echo "$as_me:7704: \$? = $ac_status" >&5
7705   (exit $ac_status); } &&
7706          { ac_try='test -s conftest.$ac_objext'
7707   { (eval echo "$as_me:7707: \"$ac_try\"") >&5
7708   (eval $ac_try) 2>&5
7709   ac_status=$?
7710   echo "$as_me:7710: \$? = $ac_status" >&5
7711   (exit $ac_status); }; }; then
7712   break
7713 else
7714   echo "$as_me: failed program was:" >&5
7715 cat conftest.$ac_ext >&5
7716 fi
7717 rm -f conftest.$ac_objext conftest.$ac_ext
7718                         done
7719                         CFLAGS="$cf_save_CFLAGS"
7720                         CC_SHARED_OPTS=$cf_shared_opts
7721                         MK_SHARED_LIB='${CC} -dy -G -h '$cf_cv_shared_soname' -o $@'
7722                 else
7723                         MK_SHARED_LIB='${CC} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
7724                 fi
7725                 ;;
7726         sysv5uw7*|unix_sv*) #(vi
7727                 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
7728                 if test "$GCC" != yes; then
7729                         CC_SHARED_OPTS='-KPIC'
7730                 fi
7731                 MK_SHARED_LIB='${LD} -d y -G -o $@'
7732                 ;;
7733         *)
7734                 CC_SHARED_OPTS='unknown'
7735                 MK_SHARED_LIB='echo unknown'
7736                 ;;
7737         esac
7738
7739         # This works if the last tokens in $MK_SHARED_LIB are the -o target.
7740         case "$cf_cv_shlib_version" in #(vi
7741         rel|abi)
7742                 case "$MK_SHARED_LIB" in #(vi
7743                 *'-o $@') #(vi
7744                         test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
7745                         ;;
7746                 *)
7747                         { echo "$as_me:7747: WARNING: ignored --with-shlib-version" >&5
7748 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
7749                         ;;
7750                 esac
7751                 ;;
7752         esac
7753
7754         if test -n "$cf_ld_rpath_opt" ; then
7755                 MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${libdir}"
7756         fi
7757
7758 # The test/sample programs in the original tree link using rpath option.
7759 # Make it optional for packagers.
7760 if test -n "$LOCAL_LDFLAGS"
7761 then
7762         echo "$as_me:7762: checking if you want to link sample programs with rpath option" >&5
7763 echo $ECHO_N "checking if you want to link sample programs with rpath option... $ECHO_C" >&6
7764
7765 # Check whether --enable-rpath-link or --disable-rpath-link was given.
7766 if test "${enable_rpath_link+set}" = set; then
7767   enableval="$enable_rpath_link"
7768   with_rpath_link=$enableval
7769 else
7770   with_rpath_link=yes
7771 fi;
7772         echo "$as_me:7772: result: $with_rpath_link" >&5
7773 echo "${ECHO_T}$with_rpath_link" >&6
7774         if test "$with_rpath_link" = no
7775         then
7776                 LOCAL_LDFLAGS=
7777                 LOCAL_LDFLAGS2=
7778         fi
7779 fi
7780
7781 ###############################################################################
7782
7783         case $cf_cv_system_name in
7784         os2*)   PATH_SEPARATOR=';'  ;;
7785         *)      PATH_SEPARATOR=':'  ;;
7786         esac
7787
7788 ###   use option --enable-broken-linker to force on use of broken-linker support
7789 echo "$as_me:7789: checking if you want broken-linker support code" >&5
7790 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
7791
7792 # Check whether --enable-broken_linker or --disable-broken_linker was given.
7793 if test "${enable_broken_linker+set}" = set; then
7794   enableval="$enable_broken_linker"
7795   with_broken_linker=$enableval
7796 else
7797   with_broken_linker=${BROKEN_LINKER:-no}
7798 fi;
7799 echo "$as_me:7799: result: $with_broken_linker" >&5
7800 echo "${ECHO_T}$with_broken_linker" >&6
7801
7802 BROKEN_LINKER=0
7803 if test "$with_broken_linker" = yes ; then
7804         cat >>confdefs.h <<\EOF
7805 #define BROKEN_LINKER 1
7806 EOF
7807
7808         BROKEN_LINKER=1
7809 elif test "$DFT_LWR_MODEL" = shared ; then
7810         case $cf_cv_system_name in #(vi
7811         cygwin*)
7812                 cat >>confdefs.h <<\EOF
7813 #define BROKEN_LINKER 1
7814 EOF
7815
7816                 BROKEN_LINKER=1
7817                 test -n "$verbose" && echo "    cygwin linker is broken anyway" 1>&6
7818
7819 echo "${as_me:-configure}:7819: testing cygwin linker is broken anyway ..." 1>&5
7820
7821                 ;;
7822         esac
7823 fi
7824
7825 # Check to define _XOPEN_SOURCE "automatically"
7826
7827 cf_XOPEN_SOURCE=500
7828 cf_POSIX_C_SOURCE=199506L
7829 cf_xopen_source=
7830
7831 case $host_os in #(vi
7832 aix[456]*) #(vi
7833         cf_xopen_source="-D_ALL_SOURCE"
7834         ;;
7835 cygwin) #(vi
7836         cf_XOPEN_SOURCE=600
7837         ;;
7838 darwin[0-8].*) #(vi
7839         cf_xopen_source="-D_APPLE_C_SOURCE"
7840         ;;
7841 darwin*) #(vi
7842         cf_xopen_source="-D_DARWIN_C_SOURCE"
7843         ;;
7844 freebsd*|dragonfly*) #(vi
7845         # 5.x headers associate
7846         #       _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
7847         #       _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
7848         cf_POSIX_C_SOURCE=200112L
7849         cf_XOPEN_SOURCE=600
7850         cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
7851         ;;
7852 hpux11*) #(vi
7853         cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
7854         ;;
7855 hpux*) #(vi
7856         cf_xopen_source="-D_HPUX_SOURCE"
7857         ;;
7858 irix[56].*) #(vi
7859         cf_xopen_source="-D_SGI_SOURCE"
7860         ;;
7861 linux*|gnu*|mint*|k*bsd*-gnu) #(vi
7862
7863 echo "$as_me:7863: checking if we must define _GNU_SOURCE" >&5
7864 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
7865 if test "${cf_cv_gnu_source+set}" = set; then
7866   echo $ECHO_N "(cached) $ECHO_C" >&6
7867 else
7868
7869 cat >conftest.$ac_ext <<_ACEOF
7870 #line 7870 "configure"
7871 #include "confdefs.h"
7872 #include <sys/types.h>
7873 int
7874 main ()
7875 {
7876
7877 #ifndef _XOPEN_SOURCE
7878 make an error
7879 #endif
7880   ;
7881   return 0;
7882 }
7883 _ACEOF
7884 rm -f conftest.$ac_objext
7885 if { (eval echo "$as_me:7885: \"$ac_compile\"") >&5
7886   (eval $ac_compile) 2>&5
7887   ac_status=$?
7888   echo "$as_me:7888: \$? = $ac_status" >&5
7889   (exit $ac_status); } &&
7890          { ac_try='test -s conftest.$ac_objext'
7891   { (eval echo "$as_me:7891: \"$ac_try\"") >&5
7892   (eval $ac_try) 2>&5
7893   ac_status=$?
7894   echo "$as_me:7894: \$? = $ac_status" >&5
7895   (exit $ac_status); }; }; then
7896   cf_cv_gnu_source=no
7897 else
7898   echo "$as_me: failed program was:" >&5
7899 cat conftest.$ac_ext >&5
7900 cf_save="$CPPFLAGS"
7901          CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
7902          cat >conftest.$ac_ext <<_ACEOF
7903 #line 7903 "configure"
7904 #include "confdefs.h"
7905 #include <sys/types.h>
7906 int
7907 main ()
7908 {
7909
7910 #ifdef _XOPEN_SOURCE
7911 make an error
7912 #endif
7913   ;
7914   return 0;
7915 }
7916 _ACEOF
7917 rm -f conftest.$ac_objext
7918 if { (eval echo "$as_me:7918: \"$ac_compile\"") >&5
7919   (eval $ac_compile) 2>&5
7920   ac_status=$?
7921   echo "$as_me:7921: \$? = $ac_status" >&5
7922   (exit $ac_status); } &&
7923          { ac_try='test -s conftest.$ac_objext'
7924   { (eval echo "$as_me:7924: \"$ac_try\"") >&5
7925   (eval $ac_try) 2>&5
7926   ac_status=$?
7927   echo "$as_me:7927: \$? = $ac_status" >&5
7928   (exit $ac_status); }; }; then
7929   cf_cv_gnu_source=no
7930 else
7931   echo "$as_me: failed program was:" >&5
7932 cat conftest.$ac_ext >&5
7933 cf_cv_gnu_source=yes
7934 fi
7935 rm -f conftest.$ac_objext conftest.$ac_ext
7936         CPPFLAGS="$cf_save"
7937
7938 fi
7939 rm -f conftest.$ac_objext conftest.$ac_ext
7940
7941 fi
7942 echo "$as_me:7942: result: $cf_cv_gnu_source" >&5
7943 echo "${ECHO_T}$cf_cv_gnu_source" >&6
7944 test "$cf_cv_gnu_source" = yes && CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
7945
7946         ;;
7947 mirbsd*) #(vi
7948         # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <arpa/inet.h>
7949         ;;
7950 netbsd*) #(vi
7951         # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
7952         ;;
7953 openbsd*) #(vi
7954         # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
7955         ;;
7956 osf[45]*) #(vi
7957         cf_xopen_source="-D_OSF_SOURCE"
7958         ;;
7959 nto-qnx*) #(vi
7960         cf_xopen_source="-D_QNX_SOURCE"
7961         ;;
7962 sco*) #(vi
7963         # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
7964         ;;
7965 solaris2.1[0-9]) #(vi
7966         cf_xopen_source="-D__EXTENSIONS__ -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
7967         ;;
7968 solaris2.[1-9]) #(vi
7969         cf_xopen_source="-D__EXTENSIONS__"
7970         ;;
7971 *)
7972         echo "$as_me:7972: checking if we should define _XOPEN_SOURCE" >&5
7973 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
7974 if test "${cf_cv_xopen_source+set}" = set; then
7975   echo $ECHO_N "(cached) $ECHO_C" >&6
7976 else
7977
7978         cat >conftest.$ac_ext <<_ACEOF
7979 #line 7979 "configure"
7980 #include "confdefs.h"
7981 #include <sys/types.h>
7982 int
7983 main ()
7984 {
7985
7986 #ifndef _XOPEN_SOURCE
7987 make an error
7988 #endif
7989   ;
7990   return 0;
7991 }
7992 _ACEOF
7993 rm -f conftest.$ac_objext
7994 if { (eval echo "$as_me:7994: \"$ac_compile\"") >&5
7995   (eval $ac_compile) 2>&5
7996   ac_status=$?
7997   echo "$as_me:7997: \$? = $ac_status" >&5
7998   (exit $ac_status); } &&
7999          { ac_try='test -s conftest.$ac_objext'
8000   { (eval echo "$as_me:8000: \"$ac_try\"") >&5
8001   (eval $ac_try) 2>&5
8002   ac_status=$?
8003   echo "$as_me:8003: \$? = $ac_status" >&5
8004   (exit $ac_status); }; }; then
8005   cf_cv_xopen_source=no
8006 else
8007   echo "$as_me: failed program was:" >&5
8008 cat conftest.$ac_ext >&5
8009 cf_save="$CPPFLAGS"
8010          CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
8011          cat >conftest.$ac_ext <<_ACEOF
8012 #line 8012 "configure"
8013 #include "confdefs.h"
8014 #include <sys/types.h>
8015 int
8016 main ()
8017 {
8018
8019 #ifdef _XOPEN_SOURCE
8020 make an error
8021 #endif
8022   ;
8023   return 0;
8024 }
8025 _ACEOF
8026 rm -f conftest.$ac_objext
8027 if { (eval echo "$as_me:8027: \"$ac_compile\"") >&5
8028   (eval $ac_compile) 2>&5
8029   ac_status=$?
8030   echo "$as_me:8030: \$? = $ac_status" >&5
8031   (exit $ac_status); } &&
8032          { ac_try='test -s conftest.$ac_objext'
8033   { (eval echo "$as_me:8033: \"$ac_try\"") >&5
8034   (eval $ac_try) 2>&5
8035   ac_status=$?
8036   echo "$as_me:8036: \$? = $ac_status" >&5
8037   (exit $ac_status); }; }; then
8038   cf_cv_xopen_source=no
8039 else
8040   echo "$as_me: failed program was:" >&5
8041 cat conftest.$ac_ext >&5
8042 cf_cv_xopen_source=$cf_XOPEN_SOURCE
8043 fi
8044 rm -f conftest.$ac_objext conftest.$ac_ext
8045         CPPFLAGS="$cf_save"
8046
8047 fi
8048 rm -f conftest.$ac_objext conftest.$ac_ext
8049
8050 fi
8051 echo "$as_me:8051: result: $cf_cv_xopen_source" >&5
8052 echo "${ECHO_T}$cf_cv_xopen_source" >&6
8053         if test "$cf_cv_xopen_source" != no ; then
8054
8055 CFLAGS=`echo "$CFLAGS" | \
8056         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
8057                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
8058
8059 CPPFLAGS=`echo "$CPPFLAGS" | \
8060         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
8061                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
8062
8063                 cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
8064
8065 cf_fix_cppflags=no
8066 cf_new_cflags=
8067 cf_new_cppflags=
8068 cf_new_extra_cppflags=
8069
8070 for cf_add_cflags in $cf_temp_xopen_source
8071 do
8072 case $cf_fix_cppflags in
8073 no)
8074         case $cf_add_cflags in #(vi
8075         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
8076                 case $cf_add_cflags in
8077                 -D*)
8078                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8079
8080                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
8081                                 && test -z "${cf_tst_cflags}" \
8082                                 && cf_fix_cppflags=yes
8083
8084                         if test $cf_fix_cppflags = yes ; then
8085                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8086                                 continue
8087                         elif test "${cf_tst_cflags}" = "\"'" ; then
8088                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8089                                 continue
8090                         fi
8091                         ;;
8092                 esac
8093                 case "$CPPFLAGS" in
8094                 *$cf_add_cflags) #(vi
8095                         ;;
8096                 *) #(vi
8097                         case $cf_add_cflags in #(vi
8098                         -D*)
8099                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8100
8101 CPPFLAGS=`echo "$CPPFLAGS" | \
8102         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8103                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8104
8105                                 ;;
8106                         esac
8107                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8108                         ;;
8109                 esac
8110                 ;;
8111         *)
8112                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8113                 ;;
8114         esac
8115         ;;
8116 yes)
8117         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8118
8119         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8120
8121         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
8122                 && test -z "${cf_tst_cflags}" \
8123                 && cf_fix_cppflags=no
8124         ;;
8125 esac
8126 done
8127
8128 if test -n "$cf_new_cflags" ; then
8129
8130         CFLAGS="$CFLAGS $cf_new_cflags"
8131 fi
8132
8133 if test -n "$cf_new_cppflags" ; then
8134
8135         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8136 fi
8137
8138 if test -n "$cf_new_extra_cppflags" ; then
8139
8140         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8141 fi
8142
8143         fi
8144
8145 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
8146
8147 cf_save_CFLAGS="$CFLAGS"
8148 cf_save_CPPFLAGS="$CPPFLAGS"
8149
8150 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
8151         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
8152                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
8153
8154 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
8155         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
8156                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
8157
8158 echo "$as_me:8158: checking if we should define _POSIX_C_SOURCE" >&5
8159 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
8160 if test "${cf_cv_posix_c_source+set}" = set; then
8161   echo $ECHO_N "(cached) $ECHO_C" >&6
8162 else
8163
8164 echo "${as_me:-configure}:8164: testing if the symbol is already defined go no further ..." 1>&5
8165
8166         cat >conftest.$ac_ext <<_ACEOF
8167 #line 8167 "configure"
8168 #include "confdefs.h"
8169 #include <sys/types.h>
8170 int
8171 main ()
8172 {
8173
8174 #ifndef _POSIX_C_SOURCE
8175 make an error
8176 #endif
8177   ;
8178   return 0;
8179 }
8180 _ACEOF
8181 rm -f conftest.$ac_objext
8182 if { (eval echo "$as_me:8182: \"$ac_compile\"") >&5
8183   (eval $ac_compile) 2>&5
8184   ac_status=$?
8185   echo "$as_me:8185: \$? = $ac_status" >&5
8186   (exit $ac_status); } &&
8187          { ac_try='test -s conftest.$ac_objext'
8188   { (eval echo "$as_me:8188: \"$ac_try\"") >&5
8189   (eval $ac_try) 2>&5
8190   ac_status=$?
8191   echo "$as_me:8191: \$? = $ac_status" >&5
8192   (exit $ac_status); }; }; then
8193   cf_cv_posix_c_source=no
8194 else
8195   echo "$as_me: failed program was:" >&5
8196 cat conftest.$ac_ext >&5
8197 cf_want_posix_source=no
8198          case .$cf_POSIX_C_SOURCE in #(vi
8199          .[12]??*) #(vi
8200                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
8201                 ;;
8202          .2) #(vi
8203                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
8204                 cf_want_posix_source=yes
8205                 ;;
8206          .*)
8207                 cf_want_posix_source=yes
8208                 ;;
8209          esac
8210          if test "$cf_want_posix_source" = yes ; then
8211                 cat >conftest.$ac_ext <<_ACEOF
8212 #line 8212 "configure"
8213 #include "confdefs.h"
8214 #include <sys/types.h>
8215 int
8216 main ()
8217 {
8218
8219 #ifdef _POSIX_SOURCE
8220 make an error
8221 #endif
8222   ;
8223   return 0;
8224 }
8225 _ACEOF
8226 rm -f conftest.$ac_objext
8227 if { (eval echo "$as_me:8227: \"$ac_compile\"") >&5
8228   (eval $ac_compile) 2>&5
8229   ac_status=$?
8230   echo "$as_me:8230: \$? = $ac_status" >&5
8231   (exit $ac_status); } &&
8232          { ac_try='test -s conftest.$ac_objext'
8233   { (eval echo "$as_me:8233: \"$ac_try\"") >&5
8234   (eval $ac_try) 2>&5
8235   ac_status=$?
8236   echo "$as_me:8236: \$? = $ac_status" >&5
8237   (exit $ac_status); }; }; then
8238   :
8239 else
8240   echo "$as_me: failed program was:" >&5
8241 cat conftest.$ac_ext >&5
8242 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
8243 fi
8244 rm -f conftest.$ac_objext conftest.$ac_ext
8245          fi
8246
8247 echo "${as_me:-configure}:8247: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
8248
8249          CFLAGS="$cf_trim_CFLAGS"
8250          CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
8251
8252 echo "${as_me:-configure}:8252: testing if the second compile does not leave our definition intact error ..." 1>&5
8253
8254          cat >conftest.$ac_ext <<_ACEOF
8255 #line 8255 "configure"
8256 #include "confdefs.h"
8257 #include <sys/types.h>
8258 int
8259 main ()
8260 {
8261
8262 #ifndef _POSIX_C_SOURCE
8263 make an error
8264 #endif
8265   ;
8266   return 0;
8267 }
8268 _ACEOF
8269 rm -f conftest.$ac_objext
8270 if { (eval echo "$as_me:8270: \"$ac_compile\"") >&5
8271   (eval $ac_compile) 2>&5
8272   ac_status=$?
8273   echo "$as_me:8273: \$? = $ac_status" >&5
8274   (exit $ac_status); } &&
8275          { ac_try='test -s conftest.$ac_objext'
8276   { (eval echo "$as_me:8276: \"$ac_try\"") >&5
8277   (eval $ac_try) 2>&5
8278   ac_status=$?
8279   echo "$as_me:8279: \$? = $ac_status" >&5
8280   (exit $ac_status); }; }; then
8281   :
8282 else
8283   echo "$as_me: failed program was:" >&5
8284 cat conftest.$ac_ext >&5
8285 cf_cv_posix_c_source=no
8286 fi
8287 rm -f conftest.$ac_objext conftest.$ac_ext
8288          CFLAGS="$cf_save_CFLAGS"
8289          CPPFLAGS="$cf_save_CPPFLAGS"
8290
8291 fi
8292 rm -f conftest.$ac_objext conftest.$ac_ext
8293
8294 fi
8295 echo "$as_me:8295: result: $cf_cv_posix_c_source" >&5
8296 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
8297
8298 if test "$cf_cv_posix_c_source" != no ; then
8299         CFLAGS="$cf_trim_CFLAGS"
8300         CPPFLAGS="$cf_trim_CPPFLAGS"
8301
8302 cf_fix_cppflags=no
8303 cf_new_cflags=
8304 cf_new_cppflags=
8305 cf_new_extra_cppflags=
8306
8307 for cf_add_cflags in $cf_cv_posix_c_source
8308 do
8309 case $cf_fix_cppflags in
8310 no)
8311         case $cf_add_cflags in #(vi
8312         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
8313                 case $cf_add_cflags in
8314                 -D*)
8315                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8316
8317                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
8318                                 && test -z "${cf_tst_cflags}" \
8319                                 && cf_fix_cppflags=yes
8320
8321                         if test $cf_fix_cppflags = yes ; then
8322                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8323                                 continue
8324                         elif test "${cf_tst_cflags}" = "\"'" ; then
8325                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8326                                 continue
8327                         fi
8328                         ;;
8329                 esac
8330                 case "$CPPFLAGS" in
8331                 *$cf_add_cflags) #(vi
8332                         ;;
8333                 *) #(vi
8334                         case $cf_add_cflags in #(vi
8335                         -D*)
8336                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8337
8338 CPPFLAGS=`echo "$CPPFLAGS" | \
8339         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8340                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8341
8342                                 ;;
8343                         esac
8344                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8345                         ;;
8346                 esac
8347                 ;;
8348         *)
8349                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8350                 ;;
8351         esac
8352         ;;
8353 yes)
8354         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8355
8356         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8357
8358         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
8359                 && test -z "${cf_tst_cflags}" \
8360                 && cf_fix_cppflags=no
8361         ;;
8362 esac
8363 done
8364
8365 if test -n "$cf_new_cflags" ; then
8366
8367         CFLAGS="$CFLAGS $cf_new_cflags"
8368 fi
8369
8370 if test -n "$cf_new_cppflags" ; then
8371
8372         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8373 fi
8374
8375 if test -n "$cf_new_extra_cppflags" ; then
8376
8377         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8378 fi
8379
8380 fi
8381
8382         ;;
8383 esac
8384
8385 if test -n "$cf_xopen_source" ; then
8386
8387 cf_fix_cppflags=no
8388 cf_new_cflags=
8389 cf_new_cppflags=
8390 cf_new_extra_cppflags=
8391
8392 for cf_add_cflags in $cf_xopen_source
8393 do
8394 case $cf_fix_cppflags in
8395 no)
8396         case $cf_add_cflags in #(vi
8397         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
8398                 case $cf_add_cflags in
8399                 -D*)
8400                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8401
8402                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
8403                                 && test -z "${cf_tst_cflags}" \
8404                                 && cf_fix_cppflags=yes
8405
8406                         if test $cf_fix_cppflags = yes ; then
8407                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8408                                 continue
8409                         elif test "${cf_tst_cflags}" = "\"'" ; then
8410                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8411                                 continue
8412                         fi
8413                         ;;
8414                 esac
8415                 case "$CPPFLAGS" in
8416                 *$cf_add_cflags) #(vi
8417                         ;;
8418                 *) #(vi
8419                         case $cf_add_cflags in #(vi
8420                         -D*)
8421                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8422
8423 CPPFLAGS=`echo "$CPPFLAGS" | \
8424         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8425                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8426
8427                                 ;;
8428                         esac
8429                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8430                         ;;
8431                 esac
8432                 ;;
8433         *)
8434                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8435                 ;;
8436         esac
8437         ;;
8438 yes)
8439         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8440
8441         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8442
8443         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
8444                 && test -z "${cf_tst_cflags}" \
8445                 && cf_fix_cppflags=no
8446         ;;
8447 esac
8448 done
8449
8450 if test -n "$cf_new_cflags" ; then
8451
8452         CFLAGS="$CFLAGS $cf_new_cflags"
8453 fi
8454
8455 if test -n "$cf_new_cppflags" ; then
8456
8457         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8458 fi
8459
8460 if test -n "$cf_new_extra_cppflags" ; then
8461
8462         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8463 fi
8464
8465 fi
8466
8467 # Check whether --enable-largefile or --disable-largefile was given.
8468 if test "${enable_largefile+set}" = set; then
8469   enableval="$enable_largefile"
8470
8471 fi;
8472 if test "$enable_largefile" != no; then
8473
8474   echo "$as_me:8474: checking for special C compiler options needed for large files" >&5
8475 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
8476 if test "${ac_cv_sys_largefile_CC+set}" = set; then
8477   echo $ECHO_N "(cached) $ECHO_C" >&6
8478 else
8479   ac_cv_sys_largefile_CC=no
8480      if test "$GCC" != yes; then
8481        ac_save_CC=$CC
8482        while :; do
8483          # IRIX 6.2 and later do not support large files by default,
8484          # so use the C compiler's -n32 option if that helps.
8485          cat >conftest.$ac_ext <<_ACEOF
8486 #line 8486 "configure"
8487 #include "confdefs.h"
8488 #include <sys/types.h>
8489  /* Check that off_t can represent 2**63 - 1 correctly.
8490     We can't simply define LARGE_OFF_T to be 9223372036854775807,
8491     since some C++ compilers masquerading as C compilers
8492     incorrectly reject 9223372036854775807.  */
8493 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
8494   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
8495                        && LARGE_OFF_T % 2147483647 == 1)
8496                       ? 1 : -1];
8497 int
8498 main ()
8499 {
8500
8501   ;
8502   return 0;
8503 }
8504 _ACEOF
8505          rm -f conftest.$ac_objext
8506 if { (eval echo "$as_me:8506: \"$ac_compile\"") >&5
8507   (eval $ac_compile) 2>&5
8508   ac_status=$?
8509   echo "$as_me:8509: \$? = $ac_status" >&5
8510   (exit $ac_status); } &&
8511          { ac_try='test -s conftest.$ac_objext'
8512   { (eval echo "$as_me:8512: \"$ac_try\"") >&5
8513   (eval $ac_try) 2>&5
8514   ac_status=$?
8515   echo "$as_me:8515: \$? = $ac_status" >&5
8516   (exit $ac_status); }; }; then
8517   break
8518 else
8519   echo "$as_me: failed program was:" >&5
8520 cat conftest.$ac_ext >&5
8521 fi
8522 rm -f conftest.$ac_objext
8523          CC="$CC -n32"
8524          rm -f conftest.$ac_objext
8525 if { (eval echo "$as_me:8525: \"$ac_compile\"") >&5
8526   (eval $ac_compile) 2>&5
8527   ac_status=$?
8528   echo "$as_me:8528: \$? = $ac_status" >&5
8529   (exit $ac_status); } &&
8530          { ac_try='test -s conftest.$ac_objext'
8531   { (eval echo "$as_me:8531: \"$ac_try\"") >&5
8532   (eval $ac_try) 2>&5
8533   ac_status=$?
8534   echo "$as_me:8534: \$? = $ac_status" >&5
8535   (exit $ac_status); }; }; then
8536   ac_cv_sys_largefile_CC=' -n32'; break
8537 else
8538   echo "$as_me: failed program was:" >&5
8539 cat conftest.$ac_ext >&5
8540 fi
8541 rm -f conftest.$ac_objext
8542          break
8543        done
8544        CC=$ac_save_CC
8545        rm -f conftest.$ac_ext
8546     fi
8547 fi
8548 echo "$as_me:8548: result: $ac_cv_sys_largefile_CC" >&5
8549 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
8550   if test "$ac_cv_sys_largefile_CC" != no; then
8551     CC=$CC$ac_cv_sys_largefile_CC
8552   fi
8553
8554   echo "$as_me:8554: checking for _FILE_OFFSET_BITS value needed for large files" >&5
8555 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
8556 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
8557   echo $ECHO_N "(cached) $ECHO_C" >&6
8558 else
8559   while :; do
8560   ac_cv_sys_file_offset_bits=no
8561   cat >conftest.$ac_ext <<_ACEOF
8562 #line 8562 "configure"
8563 #include "confdefs.h"
8564 #include <sys/types.h>
8565  /* Check that off_t can represent 2**63 - 1 correctly.
8566     We can't simply define LARGE_OFF_T to be 9223372036854775807,
8567     since some C++ compilers masquerading as C compilers
8568     incorrectly reject 9223372036854775807.  */
8569 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
8570   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
8571                        && LARGE_OFF_T % 2147483647 == 1)
8572                       ? 1 : -1];
8573 int
8574 main ()
8575 {
8576
8577   ;
8578   return 0;
8579 }
8580 _ACEOF
8581 rm -f conftest.$ac_objext
8582 if { (eval echo "$as_me:8582: \"$ac_compile\"") >&5
8583   (eval $ac_compile) 2>&5
8584   ac_status=$?
8585   echo "$as_me:8585: \$? = $ac_status" >&5
8586   (exit $ac_status); } &&
8587          { ac_try='test -s conftest.$ac_objext'
8588   { (eval echo "$as_me:8588: \"$ac_try\"") >&5
8589   (eval $ac_try) 2>&5
8590   ac_status=$?
8591   echo "$as_me:8591: \$? = $ac_status" >&5
8592   (exit $ac_status); }; }; then
8593   break
8594 else
8595   echo "$as_me: failed program was:" >&5
8596 cat conftest.$ac_ext >&5
8597 fi
8598 rm -f conftest.$ac_objext conftest.$ac_ext
8599   cat >conftest.$ac_ext <<_ACEOF
8600 #line 8600 "configure"
8601 #include "confdefs.h"
8602 #define _FILE_OFFSET_BITS 64
8603 #include <sys/types.h>
8604  /* Check that off_t can represent 2**63 - 1 correctly.
8605     We can't simply define LARGE_OFF_T to be 9223372036854775807,
8606     since some C++ compilers masquerading as C compilers
8607     incorrectly reject 9223372036854775807.  */
8608 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
8609   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
8610                        && LARGE_OFF_T % 2147483647 == 1)
8611                       ? 1 : -1];
8612 int
8613 main ()
8614 {
8615
8616   ;
8617   return 0;
8618 }
8619 _ACEOF
8620 rm -f conftest.$ac_objext
8621 if { (eval echo "$as_me:8621: \"$ac_compile\"") >&5
8622   (eval $ac_compile) 2>&5
8623   ac_status=$?
8624   echo "$as_me:8624: \$? = $ac_status" >&5
8625   (exit $ac_status); } &&
8626          { ac_try='test -s conftest.$ac_objext'
8627   { (eval echo "$as_me:8627: \"$ac_try\"") >&5
8628   (eval $ac_try) 2>&5
8629   ac_status=$?
8630   echo "$as_me:8630: \$? = $ac_status" >&5
8631   (exit $ac_status); }; }; then
8632   ac_cv_sys_file_offset_bits=64; break
8633 else
8634   echo "$as_me: failed program was:" >&5
8635 cat conftest.$ac_ext >&5
8636 fi
8637 rm -f conftest.$ac_objext conftest.$ac_ext
8638   break
8639 done
8640 fi
8641 echo "$as_me:8641: result: $ac_cv_sys_file_offset_bits" >&5
8642 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
8643 if test "$ac_cv_sys_file_offset_bits" != no; then
8644
8645 cat >>confdefs.h <<EOF
8646 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
8647 EOF
8648
8649 fi
8650 rm -rf conftest*
8651   echo "$as_me:8651: checking for _LARGE_FILES value needed for large files" >&5
8652 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
8653 if test "${ac_cv_sys_large_files+set}" = set; then
8654   echo $ECHO_N "(cached) $ECHO_C" >&6
8655 else
8656   while :; do
8657   ac_cv_sys_large_files=no
8658   cat >conftest.$ac_ext <<_ACEOF
8659 #line 8659 "configure"
8660 #include "confdefs.h"
8661 #include <sys/types.h>
8662  /* Check that off_t can represent 2**63 - 1 correctly.
8663     We can't simply define LARGE_OFF_T to be 9223372036854775807,
8664     since some C++ compilers masquerading as C compilers
8665     incorrectly reject 9223372036854775807.  */
8666 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
8667   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
8668                        && LARGE_OFF_T % 2147483647 == 1)
8669                       ? 1 : -1];
8670 int
8671 main ()
8672 {
8673
8674   ;
8675   return 0;
8676 }
8677 _ACEOF
8678 rm -f conftest.$ac_objext
8679 if { (eval echo "$as_me:8679: \"$ac_compile\"") >&5
8680   (eval $ac_compile) 2>&5
8681   ac_status=$?
8682   echo "$as_me:8682: \$? = $ac_status" >&5
8683   (exit $ac_status); } &&
8684          { ac_try='test -s conftest.$ac_objext'
8685   { (eval echo "$as_me:8685: \"$ac_try\"") >&5
8686   (eval $ac_try) 2>&5
8687   ac_status=$?
8688   echo "$as_me:8688: \$? = $ac_status" >&5
8689   (exit $ac_status); }; }; then
8690   break
8691 else
8692   echo "$as_me: failed program was:" >&5
8693 cat conftest.$ac_ext >&5
8694 fi
8695 rm -f conftest.$ac_objext conftest.$ac_ext
8696   cat >conftest.$ac_ext <<_ACEOF
8697 #line 8697 "configure"
8698 #include "confdefs.h"
8699 #define _LARGE_FILES 1
8700 #include <sys/types.h>
8701  /* Check that off_t can represent 2**63 - 1 correctly.
8702     We can't simply define LARGE_OFF_T to be 9223372036854775807,
8703     since some C++ compilers masquerading as C compilers
8704     incorrectly reject 9223372036854775807.  */
8705 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
8706   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
8707                        && LARGE_OFF_T % 2147483647 == 1)
8708                       ? 1 : -1];
8709 int
8710 main ()
8711 {
8712
8713   ;
8714   return 0;
8715 }
8716 _ACEOF
8717 rm -f conftest.$ac_objext
8718 if { (eval echo "$as_me:8718: \"$ac_compile\"") >&5
8719   (eval $ac_compile) 2>&5
8720   ac_status=$?
8721   echo "$as_me:8721: \$? = $ac_status" >&5
8722   (exit $ac_status); } &&
8723          { ac_try='test -s conftest.$ac_objext'
8724   { (eval echo "$as_me:8724: \"$ac_try\"") >&5
8725   (eval $ac_try) 2>&5
8726   ac_status=$?
8727   echo "$as_me:8727: \$? = $ac_status" >&5
8728   (exit $ac_status); }; }; then
8729   ac_cv_sys_large_files=1; break
8730 else
8731   echo "$as_me: failed program was:" >&5
8732 cat conftest.$ac_ext >&5
8733 fi
8734 rm -f conftest.$ac_objext conftest.$ac_ext
8735   break
8736 done
8737 fi
8738 echo "$as_me:8738: result: $ac_cv_sys_large_files" >&5
8739 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
8740 if test "$ac_cv_sys_large_files" != no; then
8741
8742 cat >>confdefs.h <<EOF
8743 #define _LARGE_FILES $ac_cv_sys_large_files
8744 EOF
8745
8746 fi
8747 rm -rf conftest*
8748 fi
8749
8750     if test "$enable_largefile" != no ; then
8751         echo "$as_me:8751: checking for _LARGEFILE_SOURCE value needed for large files" >&5
8752 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
8753 if test "${ac_cv_sys_largefile_source+set}" = set; then
8754   echo $ECHO_N "(cached) $ECHO_C" >&6
8755 else
8756   while :; do
8757   ac_cv_sys_largefile_source=no
8758   cat >conftest.$ac_ext <<_ACEOF
8759 #line 8759 "configure"
8760 #include "confdefs.h"
8761 #include <stdio.h>
8762 int
8763 main ()
8764 {
8765 return !fseeko;
8766   ;
8767   return 0;
8768 }
8769 _ACEOF
8770 rm -f conftest.$ac_objext
8771 if { (eval echo "$as_me:8771: \"$ac_compile\"") >&5
8772   (eval $ac_compile) 2>&5
8773   ac_status=$?
8774   echo "$as_me:8774: \$? = $ac_status" >&5
8775   (exit $ac_status); } &&
8776          { ac_try='test -s conftest.$ac_objext'
8777   { (eval echo "$as_me:8777: \"$ac_try\"") >&5
8778   (eval $ac_try) 2>&5
8779   ac_status=$?
8780   echo "$as_me:8780: \$? = $ac_status" >&5
8781   (exit $ac_status); }; }; then
8782   break
8783 else
8784   echo "$as_me: failed program was:" >&5
8785 cat conftest.$ac_ext >&5
8786 fi
8787 rm -f conftest.$ac_objext conftest.$ac_ext
8788   cat >conftest.$ac_ext <<_ACEOF
8789 #line 8789 "configure"
8790 #include "confdefs.h"
8791 #define _LARGEFILE_SOURCE 1
8792 #include <stdio.h>
8793 int
8794 main ()
8795 {
8796 return !fseeko;
8797   ;
8798   return 0;
8799 }
8800 _ACEOF
8801 rm -f conftest.$ac_objext
8802 if { (eval echo "$as_me:8802: \"$ac_compile\"") >&5
8803   (eval $ac_compile) 2>&5
8804   ac_status=$?
8805   echo "$as_me:8805: \$? = $ac_status" >&5
8806   (exit $ac_status); } &&
8807          { ac_try='test -s conftest.$ac_objext'
8808   { (eval echo "$as_me:8808: \"$ac_try\"") >&5
8809   (eval $ac_try) 2>&5
8810   ac_status=$?
8811   echo "$as_me:8811: \$? = $ac_status" >&5
8812   (exit $ac_status); }; }; then
8813   ac_cv_sys_largefile_source=1; break
8814 else
8815   echo "$as_me: failed program was:" >&5
8816 cat conftest.$ac_ext >&5
8817 fi
8818 rm -f conftest.$ac_objext conftest.$ac_ext
8819   break
8820 done
8821 fi
8822 echo "$as_me:8822: result: $ac_cv_sys_largefile_source" >&5
8823 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
8824 if test "$ac_cv_sys_largefile_source" != no; then
8825
8826 cat >>confdefs.h <<EOF
8827 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
8828 EOF
8829
8830 fi
8831 rm -rf conftest*
8832
8833 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
8834 # in glibc 2.1.3, but that breaks too many other things.
8835 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
8836 echo "$as_me:8836: checking for fseeko" >&5
8837 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
8838 if test "${ac_cv_func_fseeko+set}" = set; then
8839   echo $ECHO_N "(cached) $ECHO_C" >&6
8840 else
8841   cat >conftest.$ac_ext <<_ACEOF
8842 #line 8842 "configure"
8843 #include "confdefs.h"
8844 #include <stdio.h>
8845 int
8846 main ()
8847 {
8848 return fseeko && fseeko (stdin, 0, 0);
8849   ;
8850   return 0;
8851 }
8852 _ACEOF
8853 rm -f conftest.$ac_objext conftest$ac_exeext
8854 if { (eval echo "$as_me:8854: \"$ac_link\"") >&5
8855   (eval $ac_link) 2>&5
8856   ac_status=$?
8857   echo "$as_me:8857: \$? = $ac_status" >&5
8858   (exit $ac_status); } &&
8859          { ac_try='test -s conftest$ac_exeext'
8860   { (eval echo "$as_me:8860: \"$ac_try\"") >&5
8861   (eval $ac_try) 2>&5
8862   ac_status=$?
8863   echo "$as_me:8863: \$? = $ac_status" >&5
8864   (exit $ac_status); }; }; then
8865   ac_cv_func_fseeko=yes
8866 else
8867   echo "$as_me: failed program was:" >&5
8868 cat conftest.$ac_ext >&5
8869 ac_cv_func_fseeko=no
8870 fi
8871 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8872 fi
8873 echo "$as_me:8873: result: $ac_cv_func_fseeko" >&5
8874 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
8875 if test $ac_cv_func_fseeko = yes; then
8876
8877 cat >>confdefs.h <<\EOF
8878 #define HAVE_FSEEKO 1
8879 EOF
8880
8881 fi
8882
8883         # Normally we would collect these definitions in the config.h,
8884         # but (like _XOPEN_SOURCE), some environments rely on having these
8885         # defined before any of the system headers are included.  Another
8886         # case comes up with C++, e.g., on AIX the compiler compiles the
8887         # header files by themselves before looking at the body files it is
8888         # told to compile.  For ncurses, those header files do not include
8889         # the config.h
8890         test "$ac_cv_sys_large_files"      != no && CPPFLAGS="$CPPFLAGS -D_LARGE_FILES "
8891         test "$ac_cv_sys_largefile_source" != no && CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE "
8892         test "$ac_cv_sys_file_offset_bits" != no && CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits "
8893
8894         echo "$as_me:8894: checking whether to use struct dirent64" >&5
8895 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
8896 if test "${cf_cv_struct_dirent64+set}" = set; then
8897   echo $ECHO_N "(cached) $ECHO_C" >&6
8898 else
8899
8900                 cat >conftest.$ac_ext <<_ACEOF
8901 #line 8901 "configure"
8902 #include "confdefs.h"
8903
8904 #include <sys/types.h>
8905 #include <dirent.h>
8906
8907 int
8908 main ()
8909 {
8910
8911                 /* if transitional largefile support is setup, this is true */
8912                 extern struct dirent64 * readdir(DIR *);
8913                 struct dirent64 *x = readdir((DIR *)0);
8914                 struct dirent *y = readdir((DIR *)0);
8915                 int z = x - y;
8916
8917   ;
8918   return 0;
8919 }
8920 _ACEOF
8921 rm -f conftest.$ac_objext
8922 if { (eval echo "$as_me:8922: \"$ac_compile\"") >&5
8923   (eval $ac_compile) 2>&5
8924   ac_status=$?
8925   echo "$as_me:8925: \$? = $ac_status" >&5
8926   (exit $ac_status); } &&
8927          { ac_try='test -s conftest.$ac_objext'
8928   { (eval echo "$as_me:8928: \"$ac_try\"") >&5
8929   (eval $ac_try) 2>&5
8930   ac_status=$?
8931   echo "$as_me:8931: \$? = $ac_status" >&5
8932   (exit $ac_status); }; }; then
8933   cf_cv_struct_dirent64=yes
8934 else
8935   echo "$as_me: failed program was:" >&5
8936 cat conftest.$ac_ext >&5
8937 cf_cv_struct_dirent64=no
8938 fi
8939 rm -f conftest.$ac_objext conftest.$ac_ext
8940
8941 fi
8942 echo "$as_me:8942: result: $cf_cv_struct_dirent64" >&5
8943 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
8944         test "$cf_cv_struct_dirent64" = yes && cat >>confdefs.h <<\EOF
8945 #define HAVE_STRUCT_DIRENT64 1
8946 EOF
8947
8948     fi
8949
8950 ### Enable compiling-in rcs id's
8951 echo "$as_me:8951: checking if RCS identifiers should be compiled-in" >&5
8952 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
8953
8954 # Check whether --with-rcs-ids or --without-rcs-ids was given.
8955 if test "${with_rcs_ids+set}" = set; then
8956   withval="$with_rcs_ids"
8957   with_rcs_ids=$withval
8958 else
8959   with_rcs_ids=no
8960 fi;
8961 echo "$as_me:8961: result: $with_rcs_ids" >&5
8962 echo "${ECHO_T}$with_rcs_ids" >&6
8963 test "$with_rcs_ids" = yes && cat >>confdefs.h <<\EOF
8964 #define USE_RCS_IDS 1
8965 EOF
8966
8967 ###############################################################################
8968
8969 ### Note that some functions (such as const) are normally disabled anyway.
8970 echo "$as_me:8970: checking if you want to build with function extensions" >&5
8971 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
8972
8973 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
8974 if test "${enable_ext_funcs+set}" = set; then
8975   enableval="$enable_ext_funcs"
8976   with_ext_funcs=$enableval
8977 else
8978   with_ext_funcs=yes
8979 fi;
8980 echo "$as_me:8980: result: $with_ext_funcs" >&5
8981 echo "${ECHO_T}$with_ext_funcs" >&6
8982 if test "$with_ext_funcs" = yes ; then
8983         NCURSES_EXT_FUNCS=1
8984         cat >>confdefs.h <<\EOF
8985 #define HAVE_USE_DEFAULT_COLORS 1
8986 EOF
8987
8988         cat >>confdefs.h <<\EOF
8989 #define NCURSES_EXT_FUNCS 1
8990 EOF
8991
8992 else
8993         NCURSES_EXT_FUNCS=0
8994 fi
8995
8996 ###   use option --enable-const to turn on use of const beyond that in XSI.
8997 echo "$as_me:8997: checking for extended use of const keyword" >&5
8998 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
8999
9000 # Check whether --enable-const or --disable-const was given.
9001 if test "${enable_const+set}" = set; then
9002   enableval="$enable_const"
9003   with_ext_const=$enableval
9004 else
9005   with_ext_const=no
9006 fi;
9007 echo "$as_me:9007: result: $with_ext_const" >&5
9008 echo "${ECHO_T}$with_ext_const" >&6
9009 NCURSES_CONST='/*nothing*/'
9010 if test "$with_ext_const" = yes ; then
9011         NCURSES_CONST=const
9012 fi
9013
9014 ###############################################################################
9015 # These options are relatively safe to experiment with.
9016
9017 echo "$as_me:9017: checking if you want all development code" >&5
9018 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
9019
9020 # Check whether --with-develop or --without-develop was given.
9021 if test "${with_develop+set}" = set; then
9022   withval="$with_develop"
9023   with_develop=$withval
9024 else
9025   with_develop=no
9026 fi;
9027 echo "$as_me:9027: result: $with_develop" >&5
9028 echo "${ECHO_T}$with_develop" >&6
9029
9030 ###############################################################################
9031 # These are just experimental, probably should not be in a package:
9032
9033 # This is still experimental (20080329), but should ultimately be moved to
9034 # the script-block --with-normal, etc.
9035
9036 echo "$as_me:9036: checking if you want to link with the pthread library" >&5
9037 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
9038
9039 # Check whether --with-pthread or --without-pthread was given.
9040 if test "${with_pthread+set}" = set; then
9041   withval="$with_pthread"
9042   with_pthread=$withval
9043 else
9044   with_pthread=no
9045 fi;
9046 echo "$as_me:9046: result: $with_pthread" >&5
9047 echo "${ECHO_T}$with_pthread" >&6
9048
9049 if test "$with_pthread" != no ; then
9050     echo "$as_me:9050: checking for pthread.h" >&5
9051 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
9052 if test "${ac_cv_header_pthread_h+set}" = set; then
9053   echo $ECHO_N "(cached) $ECHO_C" >&6
9054 else
9055   cat >conftest.$ac_ext <<_ACEOF
9056 #line 9056 "configure"
9057 #include "confdefs.h"
9058 #include <pthread.h>
9059 _ACEOF
9060 if { (eval echo "$as_me:9060: \"$ac_cpp conftest.$ac_ext\"") >&5
9061   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9062   ac_status=$?
9063   egrep -v '^ *\+' conftest.er1 >conftest.err
9064   rm -f conftest.er1
9065   cat conftest.err >&5
9066   echo "$as_me:9066: \$? = $ac_status" >&5
9067   (exit $ac_status); } >/dev/null; then
9068   if test -s conftest.err; then
9069     ac_cpp_err=$ac_c_preproc_warn_flag
9070   else
9071     ac_cpp_err=
9072   fi
9073 else
9074   ac_cpp_err=yes
9075 fi
9076 if test -z "$ac_cpp_err"; then
9077   ac_cv_header_pthread_h=yes
9078 else
9079   echo "$as_me: failed program was:" >&5
9080   cat conftest.$ac_ext >&5
9081   ac_cv_header_pthread_h=no
9082 fi
9083 rm -f conftest.err conftest.$ac_ext
9084 fi
9085 echo "$as_me:9085: result: $ac_cv_header_pthread_h" >&5
9086 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
9087 if test $ac_cv_header_pthread_h = yes; then
9088
9089         cat >>confdefs.h <<\EOF
9090 #define HAVE_PTHREADS_H 1
9091 EOF
9092
9093         echo "$as_me:9093: checking if we can link with the pthread library" >&5
9094 echo $ECHO_N "checking if we can link with the pthread library... $ECHO_C" >&6
9095         cf_save_LIBS="$LIBS"
9096         LIBS="-lpthread $LIBS"
9097         cat >conftest.$ac_ext <<_ACEOF
9098 #line 9098 "configure"
9099 #include "confdefs.h"
9100
9101 #include <pthread.h>
9102
9103 int
9104 main ()
9105 {
9106
9107         int rc = pthread_create(0,0,0,0);
9108
9109   ;
9110   return 0;
9111 }
9112 _ACEOF
9113 rm -f conftest.$ac_objext conftest$ac_exeext
9114 if { (eval echo "$as_me:9114: \"$ac_link\"") >&5
9115   (eval $ac_link) 2>&5
9116   ac_status=$?
9117   echo "$as_me:9117: \$? = $ac_status" >&5
9118   (exit $ac_status); } &&
9119          { ac_try='test -s conftest$ac_exeext'
9120   { (eval echo "$as_me:9120: \"$ac_try\"") >&5
9121   (eval $ac_try) 2>&5
9122   ac_status=$?
9123   echo "$as_me:9123: \$? = $ac_status" >&5
9124   (exit $ac_status); }; }; then
9125   with_pthread=yes
9126 else
9127   echo "$as_me: failed program was:" >&5
9128 cat conftest.$ac_ext >&5
9129 with_pthread=no
9130 fi
9131 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9132         LIBS="$cf_save_LIBS"
9133         echo "$as_me:9133: result: $with_pthread" >&5
9134 echo "${ECHO_T}$with_pthread" >&6
9135
9136         if test "$with_pthread" = yes ; then
9137             LIBS="-lpthread $LIBS"
9138             cat >>confdefs.h <<\EOF
9139 #define HAVE_LIBPTHREADS 1
9140 EOF
9141
9142         else
9143             { { echo "$as_me:9143: error: Cannot link with pthread library" >&5
9144 echo "$as_me: error: Cannot link with pthread library" >&2;}
9145    { (exit 1); exit 1; }; }
9146         fi
9147
9148 fi
9149
9150 fi
9151
9152 echo "$as_me:9152: checking if you want to use weak-symbols for pthreads" >&5
9153 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
9154
9155 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
9156 if test "${enable_weak_symbols+set}" = set; then
9157   enableval="$enable_weak_symbols"
9158   use_weak_symbols=$withval
9159 else
9160   use_weak_symbols=no
9161 fi;
9162 echo "$as_me:9162: result: $use_weak_symbols" >&5
9163 echo "${ECHO_T}$use_weak_symbols" >&6
9164 if test "$use_weak_symbols" = yes ; then
9165
9166 echo "$as_me:9166: checking if $CC supports weak symbols" >&5
9167 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
9168 if test "${cf_cv_weak_symbols+set}" = set; then
9169   echo $ECHO_N "(cached) $ECHO_C" >&6
9170 else
9171
9172 cat >conftest.$ac_ext <<_ACEOF
9173 #line 9173 "configure"
9174 #include "confdefs.h"
9175
9176 #include <stdio.h>
9177 int
9178 main ()
9179 {
9180
9181 #if defined(__GNUC__)
9182 #  if defined __USE_ISOC99
9183 #    define _cat_pragma(exp)    _Pragma(#exp)
9184 #    define _weak_pragma(exp)   _cat_pragma(weak name)
9185 #  else
9186 #    define _weak_pragma(exp)
9187 #  endif
9188 #  define _declare(name)        __extension__ extern __typeof__(name) name
9189 #  define weak_symbol(name)     _weak_pragma(name) _declare(name) __attribute__((weak))
9190 #endif
9191
9192 weak_symbol(fopen);
9193
9194   ;
9195   return 0;
9196 }
9197 _ACEOF
9198 rm -f conftest.$ac_objext
9199 if { (eval echo "$as_me:9199: \"$ac_compile\"") >&5
9200   (eval $ac_compile) 2>&5
9201   ac_status=$?
9202   echo "$as_me:9202: \$? = $ac_status" >&5
9203   (exit $ac_status); } &&
9204          { ac_try='test -s conftest.$ac_objext'
9205   { (eval echo "$as_me:9205: \"$ac_try\"") >&5
9206   (eval $ac_try) 2>&5
9207   ac_status=$?
9208   echo "$as_me:9208: \$? = $ac_status" >&5
9209   (exit $ac_status); }; }; then
9210   cf_cv_weak_symbols=yes
9211 else
9212   echo "$as_me: failed program was:" >&5
9213 cat conftest.$ac_ext >&5
9214 cf_cv_weak_symbols=no
9215 fi
9216 rm -f conftest.$ac_objext conftest.$ac_ext
9217
9218 fi
9219 echo "$as_me:9219: result: $cf_cv_weak_symbols" >&5
9220 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
9221
9222 else
9223     cf_cv_weak_symbols=no
9224 fi
9225
9226 if test $cf_cv_weak_symbols = yes ; then
9227     cat >>confdefs.h <<\EOF
9228 #define USE_WEAK_SYMBOLS 1
9229 EOF
9230
9231 fi
9232
9233 PTHREAD=
9234 if test "$with_pthread" = "yes" ; then
9235     cat >>confdefs.h <<\EOF
9236 #define USE_PTHREADS 1
9237 EOF
9238
9239     enable_reentrant=yes
9240     if test $cf_cv_weak_symbols = yes ; then
9241         PTHREAD=-lpthread
9242     fi
9243 fi
9244
9245 # OpenSUSE is installing ncurses6, using reentrant option.
9246 echo "$as_me:9246: checking for _nc_TABSIZE" >&5
9247 echo $ECHO_N "checking for _nc_TABSIZE... $ECHO_C" >&6
9248 if test "${ac_cv_func__nc_TABSIZE+set}" = set; then
9249   echo $ECHO_N "(cached) $ECHO_C" >&6
9250 else
9251   cat >conftest.$ac_ext <<_ACEOF
9252 #line 9252 "configure"
9253 #include "confdefs.h"
9254 /* System header to define __stub macros and hopefully few prototypes,
9255     which can conflict with char _nc_TABSIZE (); below.  */
9256 #include <assert.h>
9257 /* Override any gcc2 internal prototype to avoid an error.  */
9258 #ifdef __cplusplus
9259 extern "C"
9260 #endif
9261 /* We use char because int might match the return type of a gcc2
9262    builtin and then its argument prototype would still apply.  */
9263 char _nc_TABSIZE ();
9264 char (*f) ();
9265
9266 int
9267 main ()
9268 {
9269 /* The GNU C library defines this for functions which it implements
9270     to always fail with ENOSYS.  Some functions are actually named
9271     something starting with __ and the normal name is an alias.  */
9272 #if defined (__stub__nc_TABSIZE) || defined (__stub____nc_TABSIZE)
9273 choke me
9274 #else
9275 f = _nc_TABSIZE;
9276 #endif
9277
9278   ;
9279   return 0;
9280 }
9281 _ACEOF
9282 rm -f conftest.$ac_objext conftest$ac_exeext
9283 if { (eval echo "$as_me:9283: \"$ac_link\"") >&5
9284   (eval $ac_link) 2>&5
9285   ac_status=$?
9286   echo "$as_me:9286: \$? = $ac_status" >&5
9287   (exit $ac_status); } &&
9288          { ac_try='test -s conftest$ac_exeext'
9289   { (eval echo "$as_me:9289: \"$ac_try\"") >&5
9290   (eval $ac_try) 2>&5
9291   ac_status=$?
9292   echo "$as_me:9292: \$? = $ac_status" >&5
9293   (exit $ac_status); }; }; then
9294   ac_cv_func__nc_TABSIZE=yes
9295 else
9296   echo "$as_me: failed program was:" >&5
9297 cat conftest.$ac_ext >&5
9298 ac_cv_func__nc_TABSIZE=no
9299 fi
9300 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9301 fi
9302 echo "$as_me:9302: result: $ac_cv_func__nc_TABSIZE" >&5
9303 echo "${ECHO_T}$ac_cv_func__nc_TABSIZE" >&6
9304 if test $ac_cv_func__nc_TABSIZE = yes; then
9305   assume_reentrant=yes
9306 else
9307   assume_reentrant=no
9308 fi
9309
9310 # Reentrant code has to be opaque; there's little advantage to making ncurses
9311 # opaque outside of that, so there is no --enable-opaque option.  We can use
9312 # this option without --with-pthreads, but this will be always set for
9313 # pthreads.
9314 echo "$as_me:9314: checking if you want experimental reentrant code" >&5
9315 echo $ECHO_N "checking if you want experimental reentrant code... $ECHO_C" >&6
9316
9317 # Check whether --enable-reentrant or --disable-reentrant was given.
9318 if test "${enable_reentrant+set}" = set; then
9319   enableval="$enable_reentrant"
9320   with_reentrant=$enableval
9321 else
9322   with_reentrant=$assume_reentrant
9323 fi;
9324 echo "$as_me:9324: result: $with_reentrant" >&5
9325 echo "${ECHO_T}$with_reentrant" >&6
9326 if test "$with_reentrant" = yes ; then
9327         cf_cv_enable_reentrant=1
9328         if test $cf_cv_weak_symbols = yes ; then
9329
9330 # remove pthread library from $LIBS
9331 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[       ]//g' -e 's/-lpthread$//'`
9332
9333         elif test "$assume_reentrant" = no ; then
9334                 LIB_SUFFIX="t${LIB_SUFFIX}"
9335         fi
9336         cat >>confdefs.h <<\EOF
9337 #define USE_REENTRANT 1
9338 EOF
9339
9340 else
9341         cf_cv_enable_reentrant=0
9342 fi
9343
9344 ### Allow using a different wrap-prefix
9345 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
9346         echo "$as_me:9346: checking for prefix used to wrap public variables" >&5
9347 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
9348
9349 # Check whether --with-wrap-prefix or --without-wrap-prefix was given.
9350 if test "${with_wrap_prefix+set}" = set; then
9351   withval="$with_wrap_prefix"
9352   NCURSES_WRAP_PREFIX=$withval
9353 else
9354   NCURSES_WRAP_PREFIX=_nc_
9355 fi;
9356         echo "$as_me:9356: result: $NCURSES_WRAP_PREFIX" >&5
9357 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
9358 else
9359         NCURSES_WRAP_PREFIX=_nc_
9360 fi
9361
9362 cat >>confdefs.h <<EOF
9363 #define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
9364 EOF
9365
9366 ###############################################################################
9367
9368 ###     use option --disable-echo to suppress full display compiling commands
9369 echo "$as_me:9369: checking if you want to display full commands during build" >&5
9370 echo $ECHO_N "checking if you want to display full commands during build... $ECHO_C" >&6
9371
9372 # Check whether --enable-echo or --disable-echo was given.
9373 if test "${enable_echo+set}" = set; then
9374   enableval="$enable_echo"
9375   with_echo=$enableval
9376 else
9377   with_echo=yes
9378 fi;
9379 if test "$with_echo" = yes; then
9380         ECHO_LINK=
9381 else
9382         ECHO_LINK='@ echo linking $@ ... ;'
9383 fi
9384 echo "$as_me:9384: result: $with_echo" >&5
9385 echo "${ECHO_T}$with_echo" >&6
9386
9387 ###     use option --enable-warnings to turn on all gcc warnings
9388 echo "$as_me:9388: checking if you want to see compiler warnings" >&5
9389 echo $ECHO_N "checking if you want to see compiler warnings... $ECHO_C" >&6
9390
9391 # Check whether --enable-warnings or --disable-warnings was given.
9392 if test "${enable_warnings+set}" = set; then
9393   enableval="$enable_warnings"
9394   with_warnings=$enableval
9395 fi;
9396 echo "$as_me:9396: result: $with_warnings" >&5
9397 echo "${ECHO_T}$with_warnings" >&6
9398
9399 if test "x$with_warnings" = "xyes"; then
9400
9401         ADAFLAGS="$ADAFLAGS -gnatg"
9402
9403 INTEL_COMPILER=no
9404
9405 if test "$GCC" = yes ; then
9406         case $host_os in
9407         linux*|gnu*)
9408                 echo "$as_me:9408: checking if this is really Intel C compiler" >&5
9409 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
9410                 cf_save_CFLAGS="$CFLAGS"
9411                 CFLAGS="$CFLAGS -no-gcc"
9412                 cat >conftest.$ac_ext <<_ACEOF
9413 #line 9413 "configure"
9414 #include "confdefs.h"
9415
9416 int
9417 main ()
9418 {
9419
9420 #ifdef __INTEL_COMPILER
9421 #else
9422 make an error
9423 #endif
9424
9425   ;
9426   return 0;
9427 }
9428 _ACEOF
9429 rm -f conftest.$ac_objext
9430 if { (eval echo "$as_me:9430: \"$ac_compile\"") >&5
9431   (eval $ac_compile) 2>&5
9432   ac_status=$?
9433   echo "$as_me:9433: \$? = $ac_status" >&5
9434   (exit $ac_status); } &&
9435          { ac_try='test -s conftest.$ac_objext'
9436   { (eval echo "$as_me:9436: \"$ac_try\"") >&5
9437   (eval $ac_try) 2>&5
9438   ac_status=$?
9439   echo "$as_me:9439: \$? = $ac_status" >&5
9440   (exit $ac_status); }; }; then
9441   INTEL_COMPILER=yes
9442 cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
9443
9444 else
9445   echo "$as_me: failed program was:" >&5
9446 cat conftest.$ac_ext >&5
9447 fi
9448 rm -f conftest.$ac_objext conftest.$ac_ext
9449                 CFLAGS="$cf_save_CFLAGS"
9450                 echo "$as_me:9450: result: $INTEL_COMPILER" >&5
9451 echo "${ECHO_T}$INTEL_COMPILER" >&6
9452                 ;;
9453         esac
9454 fi
9455
9456 cat > conftest.$ac_ext <<EOF
9457 #line 9457 "${as_me:-configure}"
9458 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
9459 EOF
9460
9461 if test "$INTEL_COMPILER" = yes
9462 then
9463 # The "-wdXXX" options suppress warnings:
9464 # remark #1419: external declaration in primary source file
9465 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
9466 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
9467 # remark #193: zero used for undefined preprocessing identifier
9468 # remark #593: variable "curs_sb_left_arrow" was set but never used
9469 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
9470 # remark #869: parameter "tw" was never referenced
9471 # remark #981: operands are evaluated in unspecified order
9472 # warning #279: controlling expression is constant
9473
9474         { echo "$as_me:9474: checking for $CC warning options..." >&5
9475 echo "$as_me: checking for $CC warning options..." >&6;}
9476         cf_save_CFLAGS="$CFLAGS"
9477         EXTRA_CFLAGS="-Wall"
9478         for cf_opt in \
9479                 wd1419 \
9480                 wd1683 \
9481                 wd1684 \
9482                 wd193 \
9483                 wd593 \
9484                 wd279 \
9485                 wd810 \
9486                 wd869 \
9487                 wd981
9488         do
9489                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
9490                 if { (eval echo "$as_me:9490: \"$ac_compile\"") >&5
9491   (eval $ac_compile) 2>&5
9492   ac_status=$?
9493   echo "$as_me:9493: \$? = $ac_status" >&5
9494   (exit $ac_status); }; then
9495                         test -n "$verbose" && echo "$as_me:9495: result: ... -$cf_opt" >&5
9496 echo "${ECHO_T}... -$cf_opt" >&6
9497                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
9498                 fi
9499         done
9500         CFLAGS="$cf_save_CFLAGS"
9501
9502 elif test "$GCC" = yes
9503 then
9504         { echo "$as_me:9504: checking for $CC warning options..." >&5
9505 echo "$as_me: checking for $CC warning options..." >&6;}
9506         cf_save_CFLAGS="$CFLAGS"
9507         EXTRA_CFLAGS=
9508         cf_warn_CONST=""
9509         test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
9510         for cf_opt in W Wall \
9511                 Wbad-function-cast \
9512                 Wcast-align \
9513                 Wcast-qual \
9514                 Winline \
9515                 Wmissing-declarations \
9516                 Wmissing-prototypes \
9517                 Wnested-externs \
9518                 Wpointer-arith \
9519                 Wshadow \
9520                 Wstrict-prototypes \
9521                 Wundef $cf_warn_CONST Wdeclaration-after-statement Wextra Wno-unknown-pragmas Wswitch-enum
9522         do
9523                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
9524                 if { (eval echo "$as_me:9524: \"$ac_compile\"") >&5
9525   (eval $ac_compile) 2>&5
9526   ac_status=$?
9527   echo "$as_me:9527: \$? = $ac_status" >&5
9528   (exit $ac_status); }; then
9529                         test -n "$verbose" && echo "$as_me:9529: result: ... -$cf_opt" >&5
9530 echo "${ECHO_T}... -$cf_opt" >&6
9531                         case $cf_opt in #(vi
9532                         Wcast-qual) #(vi
9533                                 CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
9534                                 ;;
9535                         Winline) #(vi
9536                                 case $GCC_VERSION in
9537                                 [34].*)
9538                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
9539
9540 echo "${as_me:-configure}:9540: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
9541
9542                                         continue;;
9543                                 esac
9544                                 ;;
9545                         esac
9546                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
9547                 fi
9548         done
9549         CFLAGS="$cf_save_CFLAGS"
9550 fi
9551 rm -rf conftest*
9552
9553 fi
9554
9555 if test "$GCC" = yes
9556 then
9557 cat > conftest.i <<EOF
9558 #ifndef GCC_PRINTF
9559 #define GCC_PRINTF 0
9560 #endif
9561 #ifndef GCC_SCANF
9562 #define GCC_SCANF 0
9563 #endif
9564 #ifndef GCC_NORETURN
9565 #define GCC_NORETURN /* nothing */
9566 #endif
9567 #ifndef GCC_UNUSED
9568 #define GCC_UNUSED /* nothing */
9569 #endif
9570 EOF
9571 if test "$GCC" = yes
9572 then
9573         { echo "$as_me:9573: checking for $CC __attribute__ directives..." >&5
9574 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
9575 cat > conftest.$ac_ext <<EOF
9576 #line 9576 "${as_me:-configure}"
9577 #include "confdefs.h"
9578 #include "conftest.h"
9579 #include "conftest.i"
9580 #if     GCC_PRINTF
9581 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
9582 #else
9583 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
9584 #endif
9585 #if     GCC_SCANF
9586 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
9587 #else
9588 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
9589 #endif
9590 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
9591 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
9592 extern void foo(void) GCC_NORETURN;
9593 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
9594 EOF
9595         cf_printf_attribute=no
9596         cf_scanf_attribute=no
9597         for cf_attribute in scanf printf unused noreturn
9598         do
9599
9600 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
9601
9602                 cf_directive="__attribute__(($cf_attribute))"
9603                 echo "checking for $CC $cf_directive" 1>&5
9604
9605                 case $cf_attribute in #(vi
9606                 printf) #(vi
9607                         cf_printf_attribute=yes
9608                         cat >conftest.h <<EOF
9609 #define GCC_$cf_ATTRIBUTE 1
9610 EOF
9611                         ;;
9612                 scanf) #(vi
9613                         cf_scanf_attribute=yes
9614                         cat >conftest.h <<EOF
9615 #define GCC_$cf_ATTRIBUTE 1
9616 EOF
9617                         ;;
9618                 *) #(vi
9619                         cat >conftest.h <<EOF
9620 #define GCC_$cf_ATTRIBUTE $cf_directive
9621 EOF
9622                         ;;
9623                 esac
9624
9625                 if { (eval echo "$as_me:9625: \"$ac_compile\"") >&5
9626   (eval $ac_compile) 2>&5
9627   ac_status=$?
9628   echo "$as_me:9628: \$? = $ac_status" >&5
9629   (exit $ac_status); }; then
9630                         test -n "$verbose" && echo "$as_me:9630: result: ... $cf_attribute" >&5
9631 echo "${ECHO_T}... $cf_attribute" >&6
9632                         cat conftest.h >>confdefs.h
9633                         case $cf_attribute in #(vi
9634                         printf) #(vi
9635                                 if test "$cf_printf_attribute" = no ; then
9636                                         cat >>confdefs.h <<EOF
9637 #define GCC_PRINTFLIKE(fmt,var) /* nothing */
9638 EOF
9639                                 else
9640                                         cat >>confdefs.h <<EOF
9641 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
9642 EOF
9643                                 fi
9644                                 ;;
9645                         scanf) #(vi
9646                                 if test "$cf_scanf_attribute" = no ; then
9647                                         cat >>confdefs.h <<EOF
9648 #define GCC_SCANFLIKE(fmt,var) /* nothing */
9649 EOF
9650                                 else
9651                                         cat >>confdefs.h <<EOF
9652 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
9653 EOF
9654                                 fi
9655                                 ;;
9656                         esac
9657                 fi
9658         done
9659 else
9660         fgrep define conftest.i >>confdefs.h
9661 fi
9662 rm -rf conftest*
9663 fi
9664
9665 ###     use option --enable-assertions to turn on generation of assertion code
9666 echo "$as_me:9666: checking if you want to enable runtime assertions" >&5
9667 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
9668
9669 # Check whether --enable-assertions or --disable-assertions was given.
9670 if test "${enable_assertions+set}" = set; then
9671   enableval="$enable_assertions"
9672   with_assertions=$enableval
9673 else
9674   with_assertions=no
9675 fi;
9676 echo "$as_me:9676: result: $with_assertions" >&5
9677 echo "${ECHO_T}$with_assertions" >&6
9678 if test -n "$GCC"
9679 then
9680         if test "$with_assertions" = no
9681         then
9682                 cat >>confdefs.h <<\EOF
9683 #define NDEBUG 1
9684 EOF
9685
9686                 CPPFLAGS="$CPPFLAGS -DNDEBUG"
9687         else
9688
9689         ADAFLAGS="$ADAFLAGS -gnata"
9690
9691         fi
9692 fi
9693
9694 ###     use option --disable-leaks to suppress "permanent" leaks, for testing
9695 cat >>confdefs.h <<\EOF
9696 #define HAVE_NC_ALLOC_H 1
9697 EOF
9698
9699 ###     use option --enable-expanded to generate certain macros as functions
9700
9701 # Check whether --enable-expanded or --disable-expanded was given.
9702 if test "${enable_expanded+set}" = set; then
9703   enableval="$enable_expanded"
9704   test "$enableval" = yes && cat >>confdefs.h <<\EOF
9705 #define NCURSES_EXPANDED 1
9706 EOF
9707
9708 fi;
9709
9710 ###     use option --disable-macros to suppress macros in favor of functions
9711
9712 # Check whether --enable-macros or --disable-macros was given.
9713 if test "${enable_macros+set}" = set; then
9714   enableval="$enable_macros"
9715   test "$enableval" = no && cat >>confdefs.h <<\EOF
9716 #define NCURSES_NOMACROS 1
9717 EOF
9718
9719 fi;
9720
9721 # Normally we only add trace() to the debug-library.  Allow this to be
9722 # extended to all models of the ncurses library:
9723 cf_all_traces=no
9724 case "$CFLAGS $CPPFLAGS" in
9725 *-DTRACE*)
9726         cf_all_traces=yes
9727         ;;
9728 esac
9729
9730 echo "$as_me:9730: checking whether to add trace feature to all models" >&5
9731 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
9732
9733 # Check whether --with-trace or --without-trace was given.
9734 if test "${with_trace+set}" = set; then
9735   withval="$with_trace"
9736   cf_with_trace=$withval
9737 else
9738   cf_with_trace=$cf_all_traces
9739 fi;
9740 echo "$as_me:9740: result: $cf_with_trace" >&5
9741 echo "${ECHO_T}$cf_with_trace" >&6
9742
9743 if test "$cf_with_trace" = yes ; then
9744         ADA_TRACE=TRUE
9745
9746 cf_fix_cppflags=no
9747 cf_new_cflags=
9748 cf_new_cppflags=
9749 cf_new_extra_cppflags=
9750
9751 for cf_add_cflags in -DTRACE
9752 do
9753 case $cf_fix_cppflags in
9754 no)
9755         case $cf_add_cflags in #(vi
9756         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
9757                 case $cf_add_cflags in
9758                 -D*)
9759                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9760
9761                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
9762                                 && test -z "${cf_tst_cflags}" \
9763                                 && cf_fix_cppflags=yes
9764
9765                         if test $cf_fix_cppflags = yes ; then
9766                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9767                                 continue
9768                         elif test "${cf_tst_cflags}" = "\"'" ; then
9769                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9770                                 continue
9771                         fi
9772                         ;;
9773                 esac
9774                 case "$CPPFLAGS" in
9775                 *$cf_add_cflags) #(vi
9776                         ;;
9777                 *) #(vi
9778                         case $cf_add_cflags in #(vi
9779                         -D*)
9780                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9781
9782 CPPFLAGS=`echo "$CPPFLAGS" | \
9783         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
9784                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
9785
9786                                 ;;
9787                         esac
9788                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
9789                         ;;
9790                 esac
9791                 ;;
9792         *)
9793                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
9794                 ;;
9795         esac
9796         ;;
9797 yes)
9798         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9799
9800         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
9801
9802         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
9803                 && test -z "${cf_tst_cflags}" \
9804                 && cf_fix_cppflags=no
9805         ;;
9806 esac
9807 done
9808
9809 if test -n "$cf_new_cflags" ; then
9810
9811         CFLAGS="$CFLAGS $cf_new_cflags"
9812 fi
9813
9814 if test -n "$cf_new_cppflags" ; then
9815
9816         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
9817 fi
9818
9819 if test -n "$cf_new_extra_cppflags" ; then
9820
9821         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
9822 fi
9823
9824 else
9825         ADA_TRACE=FALSE
9826 fi
9827
9828 ###     Checks for libraries.
9829 case $cf_cv_system_name in #(vi
9830 *mingw32*) #(vi
9831         ;;
9832 *)
9833 echo "$as_me:9833: checking for gettimeofday" >&5
9834 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
9835 if test "${ac_cv_func_gettimeofday+set}" = set; then
9836   echo $ECHO_N "(cached) $ECHO_C" >&6
9837 else
9838   cat >conftest.$ac_ext <<_ACEOF
9839 #line 9839 "configure"
9840 #include "confdefs.h"
9841 /* System header to define __stub macros and hopefully few prototypes,
9842     which can conflict with char gettimeofday (); below.  */
9843 #include <assert.h>
9844 /* Override any gcc2 internal prototype to avoid an error.  */
9845 #ifdef __cplusplus
9846 extern "C"
9847 #endif
9848 /* We use char because int might match the return type of a gcc2
9849    builtin and then its argument prototype would still apply.  */
9850 char gettimeofday ();
9851 char (*f) ();
9852
9853 int
9854 main ()
9855 {
9856 /* The GNU C library defines this for functions which it implements
9857     to always fail with ENOSYS.  Some functions are actually named
9858     something starting with __ and the normal name is an alias.  */
9859 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
9860 choke me
9861 #else
9862 f = gettimeofday;
9863 #endif
9864
9865   ;
9866   return 0;
9867 }
9868 _ACEOF
9869 rm -f conftest.$ac_objext conftest$ac_exeext
9870 if { (eval echo "$as_me:9870: \"$ac_link\"") >&5
9871   (eval $ac_link) 2>&5
9872   ac_status=$?
9873   echo "$as_me:9873: \$? = $ac_status" >&5
9874   (exit $ac_status); } &&
9875          { ac_try='test -s conftest$ac_exeext'
9876   { (eval echo "$as_me:9876: \"$ac_try\"") >&5
9877   (eval $ac_try) 2>&5
9878   ac_status=$?
9879   echo "$as_me:9879: \$? = $ac_status" >&5
9880   (exit $ac_status); }; }; then
9881   ac_cv_func_gettimeofday=yes
9882 else
9883   echo "$as_me: failed program was:" >&5
9884 cat conftest.$ac_ext >&5
9885 ac_cv_func_gettimeofday=no
9886 fi
9887 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9888 fi
9889 echo "$as_me:9889: result: $ac_cv_func_gettimeofday" >&5
9890 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
9891 if test $ac_cv_func_gettimeofday = yes; then
9892   cat >>confdefs.h <<\EOF
9893 #define HAVE_GETTIMEOFDAY 1
9894 EOF
9895
9896 else
9897
9898 echo "$as_me:9898: checking for gettimeofday in -lbsd" >&5
9899 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
9900 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
9901   echo $ECHO_N "(cached) $ECHO_C" >&6
9902 else
9903   ac_check_lib_save_LIBS=$LIBS
9904 LIBS="-lbsd  $LIBS"
9905 cat >conftest.$ac_ext <<_ACEOF
9906 #line 9906 "configure"
9907 #include "confdefs.h"
9908
9909 /* Override any gcc2 internal prototype to avoid an error.  */
9910 #ifdef __cplusplus
9911 extern "C"
9912 #endif
9913 /* We use char because int might match the return type of a gcc2
9914    builtin and then its argument prototype would still apply.  */
9915 char gettimeofday ();
9916 int
9917 main ()
9918 {
9919 gettimeofday ();
9920   ;
9921   return 0;
9922 }
9923 _ACEOF
9924 rm -f conftest.$ac_objext conftest$ac_exeext
9925 if { (eval echo "$as_me:9925: \"$ac_link\"") >&5
9926   (eval $ac_link) 2>&5
9927   ac_status=$?
9928   echo "$as_me:9928: \$? = $ac_status" >&5
9929   (exit $ac_status); } &&
9930          { ac_try='test -s conftest$ac_exeext'
9931   { (eval echo "$as_me:9931: \"$ac_try\"") >&5
9932   (eval $ac_try) 2>&5
9933   ac_status=$?
9934   echo "$as_me:9934: \$? = $ac_status" >&5
9935   (exit $ac_status); }; }; then
9936   ac_cv_lib_bsd_gettimeofday=yes
9937 else
9938   echo "$as_me: failed program was:" >&5
9939 cat conftest.$ac_ext >&5
9940 ac_cv_lib_bsd_gettimeofday=no
9941 fi
9942 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9943 LIBS=$ac_check_lib_save_LIBS
9944 fi
9945 echo "$as_me:9945: result: $ac_cv_lib_bsd_gettimeofday" >&5
9946 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
9947 if test $ac_cv_lib_bsd_gettimeofday = yes; then
9948   cat >>confdefs.h <<\EOF
9949 #define HAVE_GETTIMEOFDAY 1
9950 EOF
9951
9952         LIBS="$LIBS -lbsd"
9953 fi
9954
9955 fi
9956         ;;
9957 esac
9958
9959 ###     Checks for header files.
9960 echo "$as_me:9960: checking for ANSI C header files" >&5
9961 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
9962 if test "${ac_cv_header_stdc+set}" = set; then
9963   echo $ECHO_N "(cached) $ECHO_C" >&6
9964 else
9965   cat >conftest.$ac_ext <<_ACEOF
9966 #line 9966 "configure"
9967 #include "confdefs.h"
9968 #include <stdlib.h>
9969 #include <stdarg.h>
9970 #include <string.h>
9971 #include <float.h>
9972
9973 _ACEOF
9974 if { (eval echo "$as_me:9974: \"$ac_cpp conftest.$ac_ext\"") >&5
9975   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9976   ac_status=$?
9977   egrep -v '^ *\+' conftest.er1 >conftest.err
9978   rm -f conftest.er1
9979   cat conftest.err >&5
9980   echo "$as_me:9980: \$? = $ac_status" >&5
9981   (exit $ac_status); } >/dev/null; then
9982   if test -s conftest.err; then
9983     ac_cpp_err=$ac_c_preproc_warn_flag
9984   else
9985     ac_cpp_err=
9986   fi
9987 else
9988   ac_cpp_err=yes
9989 fi
9990 if test -z "$ac_cpp_err"; then
9991   ac_cv_header_stdc=yes
9992 else
9993   echo "$as_me: failed program was:" >&5
9994   cat conftest.$ac_ext >&5
9995   ac_cv_header_stdc=no
9996 fi
9997 rm -f conftest.err conftest.$ac_ext
9998
9999 if test $ac_cv_header_stdc = yes; then
10000   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
10001   cat >conftest.$ac_ext <<_ACEOF
10002 #line 10002 "configure"
10003 #include "confdefs.h"
10004 #include <string.h>
10005
10006 _ACEOF
10007 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10008   egrep "memchr" >/dev/null 2>&1; then
10009   :
10010 else
10011   ac_cv_header_stdc=no
10012 fi
10013 rm -rf conftest*
10014
10015 fi
10016
10017 if test $ac_cv_header_stdc = yes; then
10018   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
10019   cat >conftest.$ac_ext <<_ACEOF
10020 #line 10020 "configure"
10021 #include "confdefs.h"
10022 #include <stdlib.h>
10023
10024 _ACEOF
10025 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10026   egrep "free" >/dev/null 2>&1; then
10027   :
10028 else
10029   ac_cv_header_stdc=no
10030 fi
10031 rm -rf conftest*
10032
10033 fi
10034
10035 if test $ac_cv_header_stdc = yes; then
10036   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
10037   if test "$cross_compiling" = yes; then
10038   :
10039 else
10040   cat >conftest.$ac_ext <<_ACEOF
10041 #line 10041 "configure"
10042 #include "confdefs.h"
10043 #include <ctype.h>
10044 #if ((' ' & 0x0FF) == 0x020)
10045 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
10046 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
10047 #else
10048 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
10049                      || ('j' <= (c) && (c) <= 'r') \
10050                      || ('s' <= (c) && (c) <= 'z'))
10051 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
10052 #endif
10053
10054 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
10055 int
10056 main ()
10057 {
10058   int i;
10059   for (i = 0; i < 256; i++)
10060     if (XOR (islower (i), ISLOWER (i))
10061         || toupper (i) != TOUPPER (i))
10062       $ac_main_return(2);
10063   $ac_main_return (0);
10064 }
10065 _ACEOF
10066 rm -f conftest$ac_exeext
10067 if { (eval echo "$as_me:10067: \"$ac_link\"") >&5
10068   (eval $ac_link) 2>&5
10069   ac_status=$?
10070   echo "$as_me:10070: \$? = $ac_status" >&5
10071   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10072   { (eval echo "$as_me:10072: \"$ac_try\"") >&5
10073   (eval $ac_try) 2>&5
10074   ac_status=$?
10075   echo "$as_me:10075: \$? = $ac_status" >&5
10076   (exit $ac_status); }; }; then
10077   :
10078 else
10079   echo "$as_me: program exited with status $ac_status" >&5
10080 echo "$as_me: failed program was:" >&5
10081 cat conftest.$ac_ext >&5
10082 ac_cv_header_stdc=no
10083 fi
10084 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
10085 fi
10086 fi
10087 fi
10088 echo "$as_me:10088: result: $ac_cv_header_stdc" >&5
10089 echo "${ECHO_T}$ac_cv_header_stdc" >&6
10090 if test $ac_cv_header_stdc = yes; then
10091
10092 cat >>confdefs.h <<\EOF
10093 #define STDC_HEADERS 1
10094 EOF
10095
10096 fi
10097
10098 ac_header_dirent=no
10099 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
10100   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
10101 echo "$as_me:10101: checking for $ac_hdr that defines DIR" >&5
10102 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
10103 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10104   echo $ECHO_N "(cached) $ECHO_C" >&6
10105 else
10106   cat >conftest.$ac_ext <<_ACEOF
10107 #line 10107 "configure"
10108 #include "confdefs.h"
10109 #include <sys/types.h>
10110 #include <$ac_hdr>
10111
10112 int
10113 main ()
10114 {
10115 if ((DIR *) 0)
10116 return 0;
10117   ;
10118   return 0;
10119 }
10120 _ACEOF
10121 rm -f conftest.$ac_objext
10122 if { (eval echo "$as_me:10122: \"$ac_compile\"") >&5
10123   (eval $ac_compile) 2>&5
10124   ac_status=$?
10125   echo "$as_me:10125: \$? = $ac_status" >&5
10126   (exit $ac_status); } &&
10127          { ac_try='test -s conftest.$ac_objext'
10128   { (eval echo "$as_me:10128: \"$ac_try\"") >&5
10129   (eval $ac_try) 2>&5
10130   ac_status=$?
10131   echo "$as_me:10131: \$? = $ac_status" >&5
10132   (exit $ac_status); }; }; then
10133   eval "$as_ac_Header=yes"
10134 else
10135   echo "$as_me: failed program was:" >&5
10136 cat conftest.$ac_ext >&5
10137 eval "$as_ac_Header=no"
10138 fi
10139 rm -f conftest.$ac_objext conftest.$ac_ext
10140 fi
10141 echo "$as_me:10141: result: `eval echo '${'$as_ac_Header'}'`" >&5
10142 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10143 if test `eval echo '${'$as_ac_Header'}'` = yes; then
10144   cat >>confdefs.h <<EOF
10145 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
10146 EOF
10147
10148 ac_header_dirent=$ac_hdr; break
10149 fi
10150
10151 done
10152 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
10153 if test $ac_header_dirent = dirent.h; then
10154   echo "$as_me:10154: checking for opendir in -ldir" >&5
10155 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
10156 if test "${ac_cv_lib_dir_opendir+set}" = set; then
10157   echo $ECHO_N "(cached) $ECHO_C" >&6
10158 else
10159   ac_check_lib_save_LIBS=$LIBS
10160 LIBS="-ldir  $LIBS"
10161 cat >conftest.$ac_ext <<_ACEOF
10162 #line 10162 "configure"
10163 #include "confdefs.h"
10164
10165 /* Override any gcc2 internal prototype to avoid an error.  */
10166 #ifdef __cplusplus
10167 extern "C"
10168 #endif
10169 /* We use char because int might match the return type of a gcc2
10170    builtin and then its argument prototype would still apply.  */
10171 char opendir ();
10172 int
10173 main ()
10174 {
10175 opendir ();
10176   ;
10177   return 0;
10178 }
10179 _ACEOF
10180 rm -f conftest.$ac_objext conftest$ac_exeext
10181 if { (eval echo "$as_me:10181: \"$ac_link\"") >&5
10182   (eval $ac_link) 2>&5
10183   ac_status=$?
10184   echo "$as_me:10184: \$? = $ac_status" >&5
10185   (exit $ac_status); } &&
10186          { ac_try='test -s conftest$ac_exeext'
10187   { (eval echo "$as_me:10187: \"$ac_try\"") >&5
10188   (eval $ac_try) 2>&5
10189   ac_status=$?
10190   echo "$as_me:10190: \$? = $ac_status" >&5
10191   (exit $ac_status); }; }; then
10192   ac_cv_lib_dir_opendir=yes
10193 else
10194   echo "$as_me: failed program was:" >&5
10195 cat conftest.$ac_ext >&5
10196 ac_cv_lib_dir_opendir=no
10197 fi
10198 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10199 LIBS=$ac_check_lib_save_LIBS
10200 fi
10201 echo "$as_me:10201: result: $ac_cv_lib_dir_opendir" >&5
10202 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
10203 if test $ac_cv_lib_dir_opendir = yes; then
10204   LIBS="$LIBS -ldir"
10205 fi
10206
10207 else
10208   echo "$as_me:10208: checking for opendir in -lx" >&5
10209 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
10210 if test "${ac_cv_lib_x_opendir+set}" = set; then
10211   echo $ECHO_N "(cached) $ECHO_C" >&6
10212 else
10213   ac_check_lib_save_LIBS=$LIBS
10214 LIBS="-lx  $LIBS"
10215 cat >conftest.$ac_ext <<_ACEOF
10216 #line 10216 "configure"
10217 #include "confdefs.h"
10218
10219 /* Override any gcc2 internal prototype to avoid an error.  */
10220 #ifdef __cplusplus
10221 extern "C"
10222 #endif
10223 /* We use char because int might match the return type of a gcc2
10224    builtin and then its argument prototype would still apply.  */
10225 char opendir ();
10226 int
10227 main ()
10228 {
10229 opendir ();
10230   ;
10231   return 0;
10232 }
10233 _ACEOF
10234 rm -f conftest.$ac_objext conftest$ac_exeext
10235 if { (eval echo "$as_me:10235: \"$ac_link\"") >&5
10236   (eval $ac_link) 2>&5
10237   ac_status=$?
10238   echo "$as_me:10238: \$? = $ac_status" >&5
10239   (exit $ac_status); } &&
10240          { ac_try='test -s conftest$ac_exeext'
10241   { (eval echo "$as_me:10241: \"$ac_try\"") >&5
10242   (eval $ac_try) 2>&5
10243   ac_status=$?
10244   echo "$as_me:10244: \$? = $ac_status" >&5
10245   (exit $ac_status); }; }; then
10246   ac_cv_lib_x_opendir=yes
10247 else
10248   echo "$as_me: failed program was:" >&5
10249 cat conftest.$ac_ext >&5
10250 ac_cv_lib_x_opendir=no
10251 fi
10252 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10253 LIBS=$ac_check_lib_save_LIBS
10254 fi
10255 echo "$as_me:10255: result: $ac_cv_lib_x_opendir" >&5
10256 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
10257 if test $ac_cv_lib_x_opendir = yes; then
10258   LIBS="$LIBS -lx"
10259 fi
10260
10261 fi
10262
10263 echo "$as_me:10263: checking whether time.h and sys/time.h may both be included" >&5
10264 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
10265 if test "${ac_cv_header_time+set}" = set; then
10266   echo $ECHO_N "(cached) $ECHO_C" >&6
10267 else
10268   cat >conftest.$ac_ext <<_ACEOF
10269 #line 10269 "configure"
10270 #include "confdefs.h"
10271 #include <sys/types.h>
10272 #include <sys/time.h>
10273 #include <time.h>
10274
10275 int
10276 main ()
10277 {
10278 if ((struct tm *) 0)
10279 return 0;
10280   ;
10281   return 0;
10282 }
10283 _ACEOF
10284 rm -f conftest.$ac_objext
10285 if { (eval echo "$as_me:10285: \"$ac_compile\"") >&5
10286   (eval $ac_compile) 2>&5
10287   ac_status=$?
10288   echo "$as_me:10288: \$? = $ac_status" >&5
10289   (exit $ac_status); } &&
10290          { ac_try='test -s conftest.$ac_objext'
10291   { (eval echo "$as_me:10291: \"$ac_try\"") >&5
10292   (eval $ac_try) 2>&5
10293   ac_status=$?
10294   echo "$as_me:10294: \$? = $ac_status" >&5
10295   (exit $ac_status); }; }; then
10296   ac_cv_header_time=yes
10297 else
10298   echo "$as_me: failed program was:" >&5
10299 cat conftest.$ac_ext >&5
10300 ac_cv_header_time=no
10301 fi
10302 rm -f conftest.$ac_objext conftest.$ac_ext
10303 fi
10304 echo "$as_me:10304: result: $ac_cv_header_time" >&5
10305 echo "${ECHO_T}$ac_cv_header_time" >&6
10306 if test $ac_cv_header_time = yes; then
10307
10308 cat >>confdefs.h <<\EOF
10309 #define TIME_WITH_SYS_TIME 1
10310 EOF
10311
10312 fi
10313
10314 ###     checks for compiler characteristics
10315 ac_ext=c
10316 ac_cpp='$CPP $CPPFLAGS'
10317 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
10318 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
10319 ac_compiler_gnu=$ac_cv_c_compiler_gnu
10320 ac_main_return=return
10321
10322 echo "$as_me:10322: checking for $CC option to accept ANSI C" >&5
10323 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
10324 if test "${ac_cv_prog_cc_stdc+set}" = set; then
10325   echo $ECHO_N "(cached) $ECHO_C" >&6
10326 else
10327   ac_cv_prog_cc_stdc=no
10328 ac_save_CC=$CC
10329 cat >conftest.$ac_ext <<_ACEOF
10330 #line 10330 "configure"
10331 #include "confdefs.h"
10332 #include <stdarg.h>
10333 #include <stdio.h>
10334 #include <sys/types.h>
10335 #include <sys/stat.h>
10336 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
10337 struct buf { int x; };
10338 FILE * (*rcsopen) (struct buf *, struct stat *, int);
10339 static char *e (p, i)
10340      char **p;
10341      int i;
10342 {
10343   return p[i];
10344 }
10345 static char *f (char * (*g) (char **, int), char **p, ...)
10346 {
10347   char *s;
10348   va_list v;
10349   va_start (v,p);
10350   s = g (p, va_arg (v,int));
10351   va_end (v);
10352   return s;
10353 }
10354 int test (int i, double x);
10355 struct s1 {int (*f) (int a);};
10356 struct s2 {int (*f) (double a);};
10357 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
10358 int argc;
10359 char **argv;
10360 int
10361 main ()
10362 {
10363 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
10364   ;
10365   return 0;
10366 }
10367 _ACEOF
10368 # Don't try gcc -ansi; that turns off useful extensions and
10369 # breaks some systems' header files.
10370 # AIX                   -qlanglvl=ansi
10371 # Ultrix and OSF/1      -std1
10372 # HP-UX 10.20 and later -Ae
10373 # HP-UX older versions  -Aa -D_HPUX_SOURCE
10374 # SVR4                  -Xc -D__EXTENSIONS__
10375 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
10376 do
10377   CC="$ac_save_CC $ac_arg"
10378   rm -f conftest.$ac_objext
10379 if { (eval echo "$as_me:10379: \"$ac_compile\"") >&5
10380   (eval $ac_compile) 2>&5
10381   ac_status=$?
10382   echo "$as_me:10382: \$? = $ac_status" >&5
10383   (exit $ac_status); } &&
10384          { ac_try='test -s conftest.$ac_objext'
10385   { (eval echo "$as_me:10385: \"$ac_try\"") >&5
10386   (eval $ac_try) 2>&5
10387   ac_status=$?
10388   echo "$as_me:10388: \$? = $ac_status" >&5
10389   (exit $ac_status); }; }; then
10390   ac_cv_prog_cc_stdc=$ac_arg
10391 break
10392 else
10393   echo "$as_me: failed program was:" >&5
10394 cat conftest.$ac_ext >&5
10395 fi
10396 rm -f conftest.$ac_objext
10397 done
10398 rm -f conftest.$ac_ext conftest.$ac_objext
10399 CC=$ac_save_CC
10400
10401 fi
10402
10403 case "x$ac_cv_prog_cc_stdc" in
10404   x|xno)
10405     echo "$as_me:10405: result: none needed" >&5
10406 echo "${ECHO_T}none needed" >&6 ;;
10407   *)
10408     echo "$as_me:10408: result: $ac_cv_prog_cc_stdc" >&5
10409 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
10410     CC="$CC $ac_cv_prog_cc_stdc" ;;
10411 esac
10412
10413 echo "$as_me:10413: checking for an ANSI C-conforming const" >&5
10414 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
10415 if test "${ac_cv_c_const+set}" = set; then
10416   echo $ECHO_N "(cached) $ECHO_C" >&6
10417 else
10418   cat >conftest.$ac_ext <<_ACEOF
10419 #line 10419 "configure"
10420 #include "confdefs.h"
10421
10422 int
10423 main ()
10424 {
10425 /* FIXME: Include the comments suggested by Paul. */
10426 #ifndef __cplusplus
10427   /* Ultrix mips cc rejects this.  */
10428   typedef int charset[2];
10429   const charset x;
10430   /* SunOS 4.1.1 cc rejects this.  */
10431   char const *const *ccp;
10432   char **p;
10433   /* NEC SVR4.0.2 mips cc rejects this.  */
10434   struct point {int x, y;};
10435   static struct point const zero = {0,0};
10436   /* AIX XL C 1.02.0.0 rejects this.
10437      It does not let you subtract one const X* pointer from another in
10438      an arm of an if-expression whose if-part is not a constant
10439      expression */
10440   const char *g = "string";
10441   ccp = &g + (g ? g-g : 0);
10442   /* HPUX 7.0 cc rejects these. */
10443   ++ccp;
10444   p = (char**) ccp;
10445   ccp = (char const *const *) p;
10446   { /* SCO 3.2v4 cc rejects this.  */
10447     char *t;
10448     char const *s = 0 ? (char *) 0 : (char const *) 0;
10449
10450     *t++ = 0;
10451   }
10452   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
10453     int x[] = {25, 17};
10454     const int *foo = &x[0];
10455     ++foo;
10456   }
10457   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
10458     typedef const int *iptr;
10459     iptr p = 0;
10460     ++p;
10461   }
10462   { /* AIX XL C 1.02.0.0 rejects this saying
10463        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
10464     struct s { int j; const int *ap[3]; };
10465     struct s *b; b->j = 5;
10466   }
10467   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
10468     const int foo = 10;
10469   }
10470 #endif
10471
10472   ;
10473   return 0;
10474 }
10475 _ACEOF
10476 rm -f conftest.$ac_objext
10477 if { (eval echo "$as_me:10477: \"$ac_compile\"") >&5
10478   (eval $ac_compile) 2>&5
10479   ac_status=$?
10480   echo "$as_me:10480: \$? = $ac_status" >&5
10481   (exit $ac_status); } &&
10482          { ac_try='test -s conftest.$ac_objext'
10483   { (eval echo "$as_me:10483: \"$ac_try\"") >&5
10484   (eval $ac_try) 2>&5
10485   ac_status=$?
10486   echo "$as_me:10486: \$? = $ac_status" >&5
10487   (exit $ac_status); }; }; then
10488   ac_cv_c_const=yes
10489 else
10490   echo "$as_me: failed program was:" >&5
10491 cat conftest.$ac_ext >&5
10492 ac_cv_c_const=no
10493 fi
10494 rm -f conftest.$ac_objext conftest.$ac_ext
10495 fi
10496 echo "$as_me:10496: result: $ac_cv_c_const" >&5
10497 echo "${ECHO_T}$ac_cv_c_const" >&6
10498 if test $ac_cv_c_const = no; then
10499
10500 cat >>confdefs.h <<\EOF
10501 #define const
10502 EOF
10503
10504 fi
10505
10506 ###     Checks for external-data
10507
10508 echo "$as_me:10508: checking if data-only library module links" >&5
10509 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
10510 if test "${cf_cv_link_dataonly+set}" = set; then
10511   echo $ECHO_N "(cached) $ECHO_C" >&6
10512 else
10513
10514         rm -f conftest.a
10515         cat >conftest.$ac_ext <<EOF
10516 #line 10516 "configure"
10517 int     testdata[3] = { 123, 456, 789 };
10518 EOF
10519         if { (eval echo "$as_me:10519: \"$ac_compile\"") >&5
10520   (eval $ac_compile) 2>&5
10521   ac_status=$?
10522   echo "$as_me:10522: \$? = $ac_status" >&5
10523   (exit $ac_status); } ; then
10524                 mv conftest.o data.o && \
10525                 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
10526         fi
10527         rm -f conftest.$ac_ext data.o
10528         cat >conftest.$ac_ext <<EOF
10529 #line 10529 "configure"
10530 int     testfunc()
10531 {
10532 #if defined(NeXT)
10533         ${cf_cv_main_return:-return}(1);        /* I'm told this linker is broken */
10534 #else
10535         extern int testdata[3];
10536         return testdata[0] == 123
10537            &&  testdata[1] == 456
10538            &&  testdata[2] == 789;
10539 #endif
10540 }
10541 EOF
10542         if { (eval echo "$as_me:10542: \"$ac_compile\"") >&5
10543   (eval $ac_compile) 2>&5
10544   ac_status=$?
10545   echo "$as_me:10545: \$? = $ac_status" >&5
10546   (exit $ac_status); }; then
10547                 mv conftest.o func.o && \
10548                 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
10549         fi
10550         rm -f conftest.$ac_ext func.o
10551         ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
10552         cf_saveLIBS="$LIBS"
10553         LIBS="conftest.a $LIBS"
10554         if test "$cross_compiling" = yes; then
10555   cf_cv_link_dataonly=unknown
10556 else
10557   cat >conftest.$ac_ext <<_ACEOF
10558 #line 10558 "configure"
10559 #include "confdefs.h"
10560
10561         int main()
10562         {
10563                 extern int testfunc();
10564                 ${cf_cv_main_return:-return} (!testfunc());
10565         }
10566
10567 _ACEOF
10568 rm -f conftest$ac_exeext
10569 if { (eval echo "$as_me:10569: \"$ac_link\"") >&5
10570   (eval $ac_link) 2>&5
10571   ac_status=$?
10572   echo "$as_me:10572: \$? = $ac_status" >&5
10573   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10574   { (eval echo "$as_me:10574: \"$ac_try\"") >&5
10575   (eval $ac_try) 2>&5
10576   ac_status=$?
10577   echo "$as_me:10577: \$? = $ac_status" >&5
10578   (exit $ac_status); }; }; then
10579   cf_cv_link_dataonly=yes
10580 else
10581   echo "$as_me: program exited with status $ac_status" >&5
10582 echo "$as_me: failed program was:" >&5
10583 cat conftest.$ac_ext >&5
10584 cf_cv_link_dataonly=no
10585 fi
10586 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
10587 fi
10588         LIBS="$cf_saveLIBS"
10589
10590 fi
10591
10592 echo "$as_me:10592: result: $cf_cv_link_dataonly" >&5
10593 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
10594
10595 if test "$cf_cv_link_dataonly" = no ; then
10596         cat >>confdefs.h <<\EOF
10597 #define BROKEN_LINKER 1
10598 EOF
10599
10600         BROKEN_LINKER=1
10601 fi
10602
10603 ###     Checks for library functions.
10604
10605 echo "$as_me:10605: checking for working mkstemp" >&5
10606 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
10607 if test "${cf_cv_func_mkstemp+set}" = set; then
10608   echo $ECHO_N "(cached) $ECHO_C" >&6
10609 else
10610
10611 rm -rf conftest*
10612 if test "$cross_compiling" = yes; then
10613   echo "$as_me:10613: checking for mkstemp" >&5
10614 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
10615 if test "${ac_cv_func_mkstemp+set}" = set; then
10616   echo $ECHO_N "(cached) $ECHO_C" >&6
10617 else
10618   cat >conftest.$ac_ext <<_ACEOF
10619 #line 10619 "configure"
10620 #include "confdefs.h"
10621 /* System header to define __stub macros and hopefully few prototypes,
10622     which can conflict with char mkstemp (); below.  */
10623 #include <assert.h>
10624 /* Override any gcc2 internal prototype to avoid an error.  */
10625 #ifdef __cplusplus
10626 extern "C"
10627 #endif
10628 /* We use char because int might match the return type of a gcc2
10629    builtin and then its argument prototype would still apply.  */
10630 char mkstemp ();
10631 char (*f) ();
10632
10633 int
10634 main ()
10635 {
10636 /* The GNU C library defines this for functions which it implements
10637     to always fail with ENOSYS.  Some functions are actually named
10638     something starting with __ and the normal name is an alias.  */
10639 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
10640 choke me
10641 #else
10642 f = mkstemp;
10643 #endif
10644
10645   ;
10646   return 0;
10647 }
10648 _ACEOF
10649 rm -f conftest.$ac_objext conftest$ac_exeext
10650 if { (eval echo "$as_me:10650: \"$ac_link\"") >&5
10651   (eval $ac_link) 2>&5
10652   ac_status=$?
10653   echo "$as_me:10653: \$? = $ac_status" >&5
10654   (exit $ac_status); } &&
10655          { ac_try='test -s conftest$ac_exeext'
10656   { (eval echo "$as_me:10656: \"$ac_try\"") >&5
10657   (eval $ac_try) 2>&5
10658   ac_status=$?
10659   echo "$as_me:10659: \$? = $ac_status" >&5
10660   (exit $ac_status); }; }; then
10661   ac_cv_func_mkstemp=yes
10662 else
10663   echo "$as_me: failed program was:" >&5
10664 cat conftest.$ac_ext >&5
10665 ac_cv_func_mkstemp=no
10666 fi
10667 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10668 fi
10669 echo "$as_me:10669: result: $ac_cv_func_mkstemp" >&5
10670 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
10671
10672 else
10673   cat >conftest.$ac_ext <<_ACEOF
10674 #line 10674 "configure"
10675 #include "confdefs.h"
10676
10677 #include <sys/types.h>
10678 #include <stdlib.h>
10679 #include <stdio.h>
10680 #include <string.h>
10681 #include <sys/stat.h>
10682 int main()
10683 {
10684         char *tmpl = "conftestXXXXXX";
10685         char name[2][80];
10686         int n;
10687         int result = 0;
10688         int fd;
10689         struct stat sb;
10690
10691         umask(077);
10692         for (n = 0; n < 2; ++n) {
10693                 strcpy(name[n], tmpl);
10694                 if ((fd = mkstemp(name[n])) >= 0) {
10695                         if (!strcmp(name[n], tmpl)
10696                          || stat(name[n], &sb) != 0
10697                          || (sb.st_mode & S_IFMT) != S_IFREG
10698                          || (sb.st_mode & 077) != 0) {
10699                                 result = 1;
10700                         }
10701                         close(fd);
10702                 }
10703         }
10704         if (result == 0
10705          && !strcmp(name[0], name[1]))
10706                 result = 1;
10707         ${cf_cv_main_return:-return}(result);
10708 }
10709
10710 _ACEOF
10711 rm -f conftest$ac_exeext
10712 if { (eval echo "$as_me:10712: \"$ac_link\"") >&5
10713   (eval $ac_link) 2>&5
10714   ac_status=$?
10715   echo "$as_me:10715: \$? = $ac_status" >&5
10716   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10717   { (eval echo "$as_me:10717: \"$ac_try\"") >&5
10718   (eval $ac_try) 2>&5
10719   ac_status=$?
10720   echo "$as_me:10720: \$? = $ac_status" >&5
10721   (exit $ac_status); }; }; then
10722   cf_cv_func_mkstemp=yes
10723
10724 else
10725   echo "$as_me: program exited with status $ac_status" >&5
10726 echo "$as_me: failed program was:" >&5
10727 cat conftest.$ac_ext >&5
10728 cf_cv_func_mkstemp=no
10729
10730 fi
10731 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
10732 fi
10733
10734 fi
10735 echo "$as_me:10735: result: $cf_cv_func_mkstemp" >&5
10736 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
10737 if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
10738         cat >>confdefs.h <<\EOF
10739 #define HAVE_MKSTEMP 1
10740 EOF
10741
10742 fi
10743
10744 echo "$as_me:10744: checking return type of signal handlers" >&5
10745 echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
10746 if test "${ac_cv_type_signal+set}" = set; then
10747   echo $ECHO_N "(cached) $ECHO_C" >&6
10748 else
10749   cat >conftest.$ac_ext <<_ACEOF
10750 #line 10750 "configure"
10751 #include "confdefs.h"
10752 #include <sys/types.h>
10753 #include <signal.h>
10754 #ifdef signal
10755 # undef signal
10756 #endif
10757 #ifdef __cplusplus
10758 extern "C" void (*signal (int, void (*)(int)))(int);
10759 #else
10760 void (*signal ()) ();
10761 #endif
10762
10763 int
10764 main ()
10765 {
10766 int i;
10767   ;
10768   return 0;
10769 }
10770 _ACEOF
10771 rm -f conftest.$ac_objext
10772 if { (eval echo "$as_me:10772: \"$ac_compile\"") >&5
10773   (eval $ac_compile) 2>&5
10774   ac_status=$?
10775   echo "$as_me:10775: \$? = $ac_status" >&5
10776   (exit $ac_status); } &&
10777          { ac_try='test -s conftest.$ac_objext'
10778   { (eval echo "$as_me:10778: \"$ac_try\"") >&5
10779   (eval $ac_try) 2>&5
10780   ac_status=$?
10781   echo "$as_me:10781: \$? = $ac_status" >&5
10782   (exit $ac_status); }; }; then
10783   ac_cv_type_signal=void
10784 else
10785   echo "$as_me: failed program was:" >&5
10786 cat conftest.$ac_ext >&5
10787 ac_cv_type_signal=int
10788 fi
10789 rm -f conftest.$ac_objext conftest.$ac_ext
10790 fi
10791 echo "$as_me:10791: result: $ac_cv_type_signal" >&5
10792 echo "${ECHO_T}$ac_cv_type_signal" >&6
10793
10794 cat >>confdefs.h <<EOF
10795 #define RETSIGTYPE $ac_cv_type_signal
10796 EOF
10797
10798 if test -z "$cf_user_CFLAGS" && test "$with_no_leaks" = no ; then
10799         CFLAGS=`echo ${CFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
10800         CXXFLAGS=`echo ${CXXFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
10801 fi
10802
10803 if test "$cf_with_ada" != "no" ; then
10804
10805 cf_ada_make=gnatmake
10806 # Extract the first word of "$cf_ada_make", so it can be a program name with args.
10807 set dummy $cf_ada_make; ac_word=$2
10808 echo "$as_me:10808: checking for $ac_word" >&5
10809 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
10810 if test "${ac_cv_prog_gnat_exists+set}" = set; then
10811   echo $ECHO_N "(cached) $ECHO_C" >&6
10812 else
10813   if test -n "$gnat_exists"; then
10814   ac_cv_prog_gnat_exists="$gnat_exists" # Let the user override the test.
10815 else
10816   ac_save_IFS=$IFS; IFS=$ac_path_separator
10817 ac_dummy="$PATH"
10818 for ac_dir in $ac_dummy; do
10819   IFS=$ac_save_IFS
10820   test -z "$ac_dir" && ac_dir=.
10821   $as_executable_p "$ac_dir/$ac_word" || continue
10822 ac_cv_prog_gnat_exists="yes"
10823 echo "$as_me:10823: found $ac_dir/$ac_word" >&5
10824 break
10825 done
10826
10827   test -z "$ac_cv_prog_gnat_exists" && ac_cv_prog_gnat_exists="no"
10828 fi
10829 fi
10830 gnat_exists=$ac_cv_prog_gnat_exists
10831 if test -n "$gnat_exists"; then
10832   echo "$as_me:10832: result: $gnat_exists" >&5
10833 echo "${ECHO_T}$gnat_exists" >&6
10834 else
10835   echo "$as_me:10835: result: no" >&5
10836 echo "${ECHO_T}no" >&6
10837 fi
10838
10839 if test "$ac_cv_prog_gnat_exists" = no; then
10840    cf_ada_make=
10841 else
10842
10843 echo "$as_me:10843: checking for gnat version" >&5
10844 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
10845 cf_gnat_version=`${cf_ada_make:-gnatmake} -v 2>&1 | \
10846         grep '[0-9].[0-9][0-9]*' |\
10847     sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
10848 echo "$as_me:10848: result: $cf_gnat_version" >&5
10849 echo "${ECHO_T}$cf_gnat_version" >&6
10850
10851 case $cf_gnat_version in #(vi
10852 3.1[1-9]*|3.[2-9]*|[4-9].*) #(vi
10853         cf_cv_prog_gnat_correct=yes
10854         ;;
10855 *)
10856         { echo "$as_me:10856: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5
10857 echo "$as_me: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&2;}
10858         cf_cv_prog_gnat_correct=no
10859         ;;
10860 esac
10861
10862    # Extract the first word of "m4", so it can be a program name with args.
10863 set dummy m4; ac_word=$2
10864 echo "$as_me:10864: checking for $ac_word" >&5
10865 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
10866 if test "${ac_cv_prog_M4_exists+set}" = set; then
10867   echo $ECHO_N "(cached) $ECHO_C" >&6
10868 else
10869   if test -n "$M4_exists"; then
10870   ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
10871 else
10872   ac_save_IFS=$IFS; IFS=$ac_path_separator
10873 ac_dummy="$PATH"
10874 for ac_dir in $ac_dummy; do
10875   IFS=$ac_save_IFS
10876   test -z "$ac_dir" && ac_dir=.
10877   $as_executable_p "$ac_dir/$ac_word" || continue
10878 ac_cv_prog_M4_exists="yes"
10879 echo "$as_me:10879: found $ac_dir/$ac_word" >&5
10880 break
10881 done
10882
10883   test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
10884 fi
10885 fi
10886 M4_exists=$ac_cv_prog_M4_exists
10887 if test -n "$M4_exists"; then
10888   echo "$as_me:10888: result: $M4_exists" >&5
10889 echo "${ECHO_T}$M4_exists" >&6
10890 else
10891   echo "$as_me:10891: result: no" >&5
10892 echo "${ECHO_T}no" >&6
10893 fi
10894
10895    if test "$ac_cv_prog_M4_exists" = no; then
10896       cf_cv_prog_gnat_correct=no
10897       echo Ada95 binding required program m4 not found. Ada95 binding disabled.
10898    fi
10899    if test "$cf_cv_prog_gnat_correct" = yes; then
10900       echo "$as_me:10900: checking if GNAT works" >&5
10901 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
10902
10903 rm -rf conftest* *~conftest*
10904 cat >>conftest.ads <<CF_EOF
10905 procedure conftest;
10906 CF_EOF
10907 cat >>conftest.adb <<CF_EOF
10908 with Text_IO;
10909 with GNAT.OS_Lib;
10910 procedure conftest is
10911 begin
10912    Text_IO.Put ("Hello World");
10913    Text_IO.New_Line;
10914    GNAT.OS_Lib.OS_Exit (0);
10915 end conftest;
10916 CF_EOF
10917 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
10918    if ( ./conftest 1>&5 2>&1 ) ; then
10919       cf_cv_prog_gnat_correct=yes
10920    else
10921       cf_cv_prog_gnat_correct=no
10922    fi
10923 else
10924    cf_cv_prog_gnat_correct=no
10925 fi
10926 rm -rf conftest* *~conftest*
10927
10928       echo "$as_me:10928: result: $cf_cv_prog_gnat_correct" >&5
10929 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
10930    fi
10931 fi
10932
10933         if test "$cf_cv_prog_gnat_correct" = yes; then
10934
10935                 # make ADAFLAGS consistent with CFLAGS
10936                 case "$CFLAGS" in
10937                 *-g*)
10938
10939         ADAFLAGS="$ADAFLAGS -g"
10940
10941                         ;;
10942                 esac
10943                 case "$CFLAGS" in
10944                 *-O*)
10945
10946         ADAFLAGS="$ADAFLAGS -O3"
10947
10948                         ;;
10949                 esac
10950
10951 echo "$as_me:10951: checking if GNAT supports generics" >&5
10952 echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6
10953 case $cf_gnat_version in #(vi
10954 3.[1-9]*|[4-9].*) #(vi
10955         cf_gnat_generics=yes
10956         ;;
10957 *)
10958         cf_gnat_generics=no
10959         ;;
10960 esac
10961 echo "$as_me:10961: result: $cf_gnat_generics" >&5
10962 echo "${ECHO_T}$cf_gnat_generics" >&6
10963
10964 if test "$cf_gnat_generics" = yes
10965 then
10966         cf_compile_generics=generics
10967         cf_generic_objects="\${GENOBJS}"
10968 else
10969         cf_compile_generics=
10970         cf_generic_objects=
10971 fi
10972
10973 echo "$as_me:10973: checking if GNAT supports SIGINT" >&5
10974 echo $ECHO_N "checking if GNAT supports SIGINT... $ECHO_C" >&6
10975 if test "${cf_cv_gnat_sigint+set}" = set; then
10976   echo $ECHO_N "(cached) $ECHO_C" >&6
10977 else
10978
10979 rm -rf conftest* *~conftest*
10980 cat >>conftest.ads <<CF_EOF
10981 with Ada.Interrupts.Names;
10982
10983 package ConfTest is
10984
10985    pragma Warnings (Off);  --  the next pragma exists since 3.11p
10986    pragma Unreserve_All_Interrupts;
10987    pragma Warnings (On);
10988
10989    protected Process is
10990       procedure Stop;
10991       function Continue return Boolean;
10992       pragma Attach_Handler (Stop, Ada.Interrupts.Names.SIGINT);
10993    private
10994       Done : Boolean := False;
10995    end Process;
10996
10997 end ConfTest;
10998 CF_EOF
10999 cat >>conftest.adb <<CF_EOF
11000 package body ConfTest is
11001    protected body Process is
11002       procedure Stop is
11003       begin
11004          Done := True;
11005       end Stop;
11006       function Continue return Boolean is
11007       begin
11008          return not Done;
11009       end Continue;
11010    end Process;
11011 end ConfTest;
11012 CF_EOF
11013 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
11014       cf_cv_gnat_sigint=yes
11015 else
11016    cf_cv_gnat_sigint=no
11017 fi
11018 rm -rf conftest* *~conftest*
11019
11020 fi
11021 echo "$as_me:11021: result: $cf_cv_gnat_sigint" >&5
11022 echo "${ECHO_T}$cf_cv_gnat_sigint" >&6
11023
11024 if test $cf_cv_gnat_sigint = yes ; then
11025         USE_GNAT_SIGINT=""
11026 else
11027         USE_GNAT_SIGINT="#"
11028 fi
11029
11030 echo "$as_me:11030: checking if GNAT pragma Unreferenced works" >&5
11031 echo $ECHO_N "checking if GNAT pragma Unreferenced works... $ECHO_C" >&6
11032 if test "${cf_cv_pragma_unreferenced+set}" = set; then
11033   echo $ECHO_N "(cached) $ECHO_C" >&6
11034 else
11035
11036 rm -rf conftest* *~conftest*
11037 cat >>conftest.ads <<CF_EOF
11038 procedure conftest;
11039 CF_EOF
11040 cat >>conftest.adb <<CF_EOF
11041 with Text_IO;
11042 with GNAT.OS_Lib;
11043 procedure conftest is
11044    test : Integer;
11045    pragma Unreferenced (test);
11046 begin
11047    test := 1;
11048    Text_IO.Put ("Hello World");
11049    Text_IO.New_Line;
11050    GNAT.OS_Lib.OS_Exit (0);
11051 end conftest;
11052 CF_EOF
11053 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
11054       cf_cv_pragma_unreferenced=yes
11055 else
11056    cf_cv_pragma_unreferenced=no
11057 fi
11058 rm -rf conftest* *~conftest*
11059
11060 fi
11061 echo "$as_me:11061: result: $cf_cv_pragma_unreferenced" >&5
11062 echo "${ECHO_T}$cf_cv_pragma_unreferenced" >&6
11063
11064 # if the pragma is supported, use it (needed in the Trace code).
11065 if test $cf_cv_pragma_unreferenced = yes ; then
11066         PRAGMA_UNREF=TRUE
11067 else
11068         PRAGMA_UNREF=FALSE
11069 fi
11070
11071 cf_gnat_libraries=no
11072 cf_gnat_projects=no
11073
11074 echo "$as_me:11074: checking if GNAT supports project files" >&5
11075 echo $ECHO_N "checking if GNAT supports project files... $ECHO_C" >&6
11076 case $cf_gnat_version in #(vi
11077 3.[0-9]*) #(vi
11078         ;;
11079 *)
11080         case $cf_cv_system_name in #(vi
11081         cygwin*) #(vi
11082                 ;;
11083         *)
11084                 mkdir conftest.src conftest.bin conftest.lib
11085                 cd conftest.src
11086                 rm -rf conftest* *~conftest*
11087                 cat >>library.gpr <<CF_EOF
11088 project Library is
11089   Kind := External ("LIB_KIND");
11090   for Library_Name use "ConfTest";
11091   for Object_Dir use ".";
11092   for Library_ALI_Dir use External("LIBRARY_DIR");
11093   for Library_Version use External ("SONAME");
11094   for Library_Kind use Kind;
11095   for Library_Dir use External("BUILD_DIR");
11096   Source_Dir := External ("SOURCE_DIR");
11097   for Source_Dirs use (Source_Dir);
11098   package Compiler is
11099      for Default_Switches ("Ada") use
11100        ("-g",
11101         "-O2",
11102         "-gnatafno",
11103         "-gnatVa",   -- All validity checks
11104         "-gnatwa");  -- Activate all optional errors
11105   end Compiler;
11106 end Library;
11107 CF_EOF
11108                 cat >>confpackage.ads <<CF_EOF
11109 package ConfPackage is
11110    procedure conftest;
11111 end ConfPackage;
11112 CF_EOF
11113                 cat >>confpackage.adb <<CF_EOF
11114 with Text_IO;
11115 package body ConfPackage is
11116    procedure conftest is
11117    begin
11118       Text_IO.Put ("Hello World");
11119       Text_IO.New_Line;
11120    end conftest;
11121 end ConfPackage;
11122 CF_EOF
11123                 if ( $cf_ada_make $ADAFLAGS \
11124                                 -Plibrary.gpr \
11125                                 -XBUILD_DIR=`cd ../conftest.bin;pwd` \
11126                                 -XLIBRARY_DIR=`cd ../conftest.lib;pwd` \
11127                                 -XSOURCE_DIR=`pwd` \
11128                                 -XSONAME=libConfTest.so.1 \
11129                                 -XLIB_KIND=static 1>&5 2>&1 ) ; then
11130                         cf_gnat_projects=yes
11131                 fi
11132                 cd ..
11133                 if test -f conftest.lib/confpackage.ali
11134                 then
11135                         cf_gnat_libraries=yes
11136                 fi
11137                 rm -rf conftest* *~conftest*
11138                 ;;
11139         esac
11140         ;;
11141 esac
11142 echo "$as_me:11142: result: $cf_gnat_projects" >&5
11143 echo "${ECHO_T}$cf_gnat_projects" >&6
11144
11145 if test $cf_gnat_projects = yes
11146 then
11147         echo "$as_me:11147: checking if GNAT supports libraries" >&5
11148 echo $ECHO_N "checking if GNAT supports libraries... $ECHO_C" >&6
11149         echo "$as_me:11149: result: $cf_gnat_libraries" >&5
11150 echo "${ECHO_T}$cf_gnat_libraries" >&6
11151 fi
11152
11153 if test "$cf_gnat_projects" = yes
11154 then
11155         USE_OLD_MAKERULES="#"
11156         USE_GNAT_PROJECTS=""
11157 else
11158         USE_OLD_MAKERULES=""
11159         USE_GNAT_PROJECTS="#"
11160 fi
11161
11162 if test "$cf_gnat_libraries" = yes
11163 then
11164         USE_GNAT_LIBRARIES=""
11165 else
11166         USE_GNAT_LIBRARIES="#"
11167 fi
11168
11169 echo "$as_me:11169: checking for ada-compiler" >&5
11170 echo $ECHO_N "checking for ada-compiler... $ECHO_C" >&6
11171
11172 # Check whether --with-ada-compiler or --without-ada-compiler was given.
11173 if test "${with_ada_compiler+set}" = set; then
11174   withval="$with_ada_compiler"
11175   cf_ada_compiler=$withval
11176 else
11177   cf_ada_compiler=gnatmake
11178 fi;
11179
11180 echo "$as_me:11180: result: $cf_ada_compiler" >&5
11181 echo "${ECHO_T}$cf_ada_compiler" >&6
11182
11183                 cf_ada_package=terminal_interface
11184
11185 echo "$as_me:11185: checking for ada-include" >&5
11186 echo $ECHO_N "checking for ada-include... $ECHO_C" >&6
11187
11188 # Check whether --with-ada-include or --without-ada-include was given.
11189 if test "${with_ada_include+set}" = set; then
11190   withval="$with_ada_include"
11191
11192 else
11193   withval="${ADA_INCLUDE:-$prefix/share/ada/adainclude}"
11194 fi; if test -n "$prefix/share/ada/adainclude" ; then
11195
11196 if test "x$prefix" != xNONE; then
11197   cf_path_syntax="$prefix"
11198 else
11199   cf_path_syntax="$ac_default_prefix"
11200 fi
11201
11202 case ".$withval" in #(vi
11203 .\$\(*\)*|.\'*\'*) #(vi
11204   ;;
11205 ..|./*|.\\*) #(vi
11206   ;;
11207 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
11208   ;;
11209 .\${*prefix}*) #(vi
11210   eval withval="$withval"
11211   case ".$withval" in #(vi
11212   .NONE/*)
11213     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
11214     ;;
11215   esac
11216   ;; #(vi
11217 .no|.NONE/*)
11218   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
11219   ;;
11220 *)
11221   { { echo "$as_me:11221: error: expected a pathname, not \"$withval\"" >&5
11222 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
11223    { (exit 1); exit 1; }; }
11224   ;;
11225 esac
11226
11227 fi
11228 ADA_INCLUDE="$withval"
11229
11230 echo "$as_me:11230: result: $ADA_INCLUDE" >&5
11231 echo "${ECHO_T}$ADA_INCLUDE" >&6
11232
11233 echo "$as_me:11233: checking for ada-objects" >&5
11234 echo $ECHO_N "checking for ada-objects... $ECHO_C" >&6
11235
11236 # Check whether --with-ada-objects or --without-ada-objects was given.
11237 if test "${with_ada_objects+set}" = set; then
11238   withval="$with_ada_objects"
11239
11240 else
11241   withval="${ADA_OBJECTS:-$prefix/lib/ada/adalib}"
11242 fi; if test -n "$prefix/lib/ada/adalib" ; then
11243
11244 if test "x$prefix" != xNONE; then
11245   cf_path_syntax="$prefix"
11246 else
11247   cf_path_syntax="$ac_default_prefix"
11248 fi
11249
11250 case ".$withval" in #(vi
11251 .\$\(*\)*|.\'*\'*) #(vi
11252   ;;
11253 ..|./*|.\\*) #(vi
11254   ;;
11255 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
11256   ;;
11257 .\${*prefix}*) #(vi
11258   eval withval="$withval"
11259   case ".$withval" in #(vi
11260   .NONE/*)
11261     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
11262     ;;
11263   esac
11264   ;; #(vi
11265 .no|.NONE/*)
11266   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
11267   ;;
11268 *)
11269   { { echo "$as_me:11269: error: expected a pathname, not \"$withval\"" >&5
11270 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
11271    { (exit 1); exit 1; }; }
11272   ;;
11273 esac
11274
11275 fi
11276 ADA_OBJECTS="$withval"
11277
11278 echo "$as_me:11278: result: $ADA_OBJECTS" >&5
11279 echo "${ECHO_T}$ADA_OBJECTS" >&6
11280
11281 echo "$as_me:11281: checking if an Ada95 shared-library should be built" >&5
11282 echo $ECHO_N "checking if an Ada95 shared-library should be built... $ECHO_C" >&6
11283
11284 # Check whether --with-ada-sharedlib or --without-ada-sharedlib was given.
11285 if test "${with_ada_sharedlib+set}" = set; then
11286   withval="$with_ada_sharedlib"
11287   with_ada_sharedlib=$withval
11288 else
11289   with_ada_sharedlib=no
11290 fi;
11291 echo "$as_me:11291: result: $with_ada_sharedlib" >&5
11292 echo "${ECHO_T}$with_ada_sharedlib" >&6
11293
11294 ADA_SHAREDLIB='lib$(LIB_NAME).so.1'
11295 MAKE_ADA_SHAREDLIB="#"
11296
11297 if test "x$with_ada_sharedlib" != xno
11298 then
11299         MAKE_ADA_SHAREDLIB=
11300         if test "x$with_ada_sharedlib" != xyes
11301         then
11302                 ADA_SHAREDLIB="$with_ada_sharedlib"
11303         fi
11304 fi
11305
11306         else
11307                 { { echo "$as_me:11307: error: No usable Ada compiler found" >&5
11308 echo "$as_me: error: No usable Ada compiler found" >&2;}
11309    { (exit 1); exit 1; }; }
11310         fi
11311 else
11312         { { echo "$as_me:11312: error: The Ada compiler is needed for this package" >&5
11313 echo "$as_me: error: The Ada compiler is needed for this package" >&2;}
11314    { (exit 1); exit 1; }; }
11315 fi
11316
11317 ################################################################################
11318
11319 # not needed
11320 TINFO_ARGS2=
11321
11322 ### Construct the list of include-directories to be generated
11323
11324 CPPFLAGS="$CPPFLAGS -I. -I../include"
11325 if test "$srcdir" != "."; then
11326         CPPFLAGS="$CPPFLAGS -I\${srcdir}/../include"
11327 fi
11328 if test "$GCC" != yes; then
11329         CPPFLAGS="$CPPFLAGS -I\${includedir}"
11330 elif test "$includedir" != "/usr/include"; then
11331         if test "$includedir" = '${prefix}/include' ; then
11332                 if test $prefix != /usr ; then
11333                         CPPFLAGS="$CPPFLAGS -I\${includedir}"
11334                 fi
11335         else
11336                 CPPFLAGS="$CPPFLAGS -I\${includedir}"
11337         fi
11338 fi
11339
11340 ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
11341 if test "$srcdir" != "."; then
11342         ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
11343 fi
11344 if test "$GCC" != yes; then
11345         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
11346 elif test "$includedir" != "/usr/include"; then
11347         if test "$includedir" = '${prefix}/include' ; then
11348                 if test $prefix != /usr ; then
11349                         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
11350                 fi
11351         else
11352                 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
11353         fi
11354 fi
11355
11356 ### Build up pieces for makefile rules
11357 echo "$as_me:11357: checking default library suffix" >&5
11358 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
11359
11360         case $DFT_LWR_MODEL in
11361         libtool) DFT_ARG_SUFFIX=''   ;;
11362         normal)  DFT_ARG_SUFFIX=''   ;;
11363         debug)   DFT_ARG_SUFFIX='_g' ;;
11364         profile) DFT_ARG_SUFFIX='_p' ;;
11365         shared)  DFT_ARG_SUFFIX=''   ;;
11366         esac
11367         test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
11368 echo "$as_me:11368: result: $DFT_ARG_SUFFIX" >&5
11369 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
11370
11371 echo "$as_me:11371: checking default library-dependency suffix" >&5
11372 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
11373
11374         case $DFT_LWR_MODEL in #(vi
11375         libtool) #(vi
11376                 DFT_LIB_SUFFIX='.la'
11377                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
11378                 ;;
11379         normal) #(vi
11380                 DFT_LIB_SUFFIX='.a'
11381                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
11382                 ;;
11383         debug) #(vi
11384                 DFT_LIB_SUFFIX='_g.a'
11385                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
11386                 ;;
11387         profile) #(vi
11388                 DFT_LIB_SUFFIX='_p.a'
11389                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
11390                 ;;
11391         shared) #(vi
11392                 case $cf_cv_system_name in
11393                 aix[56]*) #(vi
11394                         DFT_LIB_SUFFIX='.a'
11395                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
11396                         ;;
11397                 cygwin*) #(vi
11398                         DFT_LIB_SUFFIX='.dll'
11399                         DFT_DEP_SUFFIX='.dll.a'
11400                         ;;
11401                 darwin*) #(vi
11402                         DFT_LIB_SUFFIX='.dylib'
11403                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
11404                         ;;
11405                 hpux*) #(vi
11406                         case $target in
11407                         ia64*) #(vi
11408                                 DFT_LIB_SUFFIX='.so'
11409                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
11410                                 ;;
11411                         *) #(vi
11412                                 DFT_LIB_SUFFIX='.sl'
11413                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
11414                                 ;;
11415                         esac
11416                         ;;
11417                 *)      DFT_LIB_SUFFIX='.so'
11418                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
11419                         ;;
11420                 esac
11421         esac
11422         test -n "$LIB_SUFFIX" && DFT_LIB_SUFFIX="${LIB_SUFFIX}${DFT_LIB_SUFFIX}"
11423         test -n "$LIB_SUFFIX" && DFT_DEP_SUFFIX="${LIB_SUFFIX}${DFT_DEP_SUFFIX}"
11424 echo "$as_me:11424: result: $DFT_DEP_SUFFIX" >&5
11425 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
11426
11427 echo "$as_me:11427: checking default object directory" >&5
11428 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
11429
11430         case $DFT_LWR_MODEL in
11431         libtool) DFT_OBJ_SUBDIR='obj_lo'  ;;
11432         normal)  DFT_OBJ_SUBDIR='objects' ;;
11433         debug)   DFT_OBJ_SUBDIR='obj_g' ;;
11434         profile) DFT_OBJ_SUBDIR='obj_p' ;;
11435         shared)
11436                 case $cf_cv_system_name in #(vi
11437                 cygwin) #(vi
11438                         DFT_OBJ_SUBDIR='objects' ;;
11439                 *)
11440                         DFT_OBJ_SUBDIR='obj_s' ;;
11441                 esac
11442         esac
11443 echo "$as_me:11443: result: $DFT_OBJ_SUBDIR" >&5
11444 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
11445
11446 ### Set up low-level terminfo dependencies for makefiles.
11447
11448 if test "$DFT_LWR_MODEL" = shared ; then
11449         case $cf_cv_system_name in #(vi
11450         cygwin*)
11451                 # "lib" files have ".dll.a" suffix, "cyg" files have ".dll"
11452                 ;;
11453         esac
11454 fi
11455
11456 ### Construct the list of subdirectories for which we'll customize makefiles
11457 ### with the appropriate compile-rules.
11458
11459 SUB_MAKEFILES="gen/adacurses${DFT_ARG_SUFFIX}-config:gen/adacurses-config.in"
11460
11461 cat >>confdefs.h <<EOF
11462 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
11463 EOF
11464
11465 ### Now that we're done running tests, add the compiler-warnings, if any
11466
11467 cf_fix_cppflags=no
11468 cf_new_cflags=
11469 cf_new_cppflags=
11470 cf_new_extra_cppflags=
11471
11472 for cf_add_cflags in $EXTRA_CFLAGS
11473 do
11474 case $cf_fix_cppflags in
11475 no)
11476         case $cf_add_cflags in #(vi
11477         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
11478                 case $cf_add_cflags in
11479                 -D*)
11480                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11481
11482                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11483                                 && test -z "${cf_tst_cflags}" \
11484                                 && cf_fix_cppflags=yes
11485
11486                         if test $cf_fix_cppflags = yes ; then
11487                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11488                                 continue
11489                         elif test "${cf_tst_cflags}" = "\"'" ; then
11490                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11491                                 continue
11492                         fi
11493                         ;;
11494                 esac
11495                 case "$CPPFLAGS" in
11496                 *$cf_add_cflags) #(vi
11497                         ;;
11498                 *) #(vi
11499                         case $cf_add_cflags in #(vi
11500                         -D*)
11501                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11502
11503 CPPFLAGS=`echo "$CPPFLAGS" | \
11504         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11505                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11506
11507                                 ;;
11508                         esac
11509                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11510                         ;;
11511                 esac
11512                 ;;
11513         *)
11514                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11515                 ;;
11516         esac
11517         ;;
11518 yes)
11519         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11520
11521         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11522
11523         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11524                 && test -z "${cf_tst_cflags}" \
11525                 && cf_fix_cppflags=no
11526         ;;
11527 esac
11528 done
11529
11530 if test -n "$cf_new_cflags" ; then
11531
11532         CFLAGS="$CFLAGS $cf_new_cflags"
11533 fi
11534
11535 if test -n "$cf_new_cppflags" ; then
11536
11537         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
11538 fi
11539
11540 if test -n "$cf_new_extra_cppflags" ; then
11541
11542         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11543 fi
11544
11545 ################################################################################
11546
11547 if test x"$enable_pc_files" = xyes ; then \
11548 SUB_MAKEFILES="$SUB_MAKEFILES misc/gen-pkgconfig:misc/gen-pkgconfig.in"
11549 MAKE_PC_FILES=
11550 else
11551 MAKE_PC_FILES="#"
11552 fi
11553
11554 ################################################################################
11555
11556 TEST_ARG2=
11557
11558 TEST_LIBS2=
11559
11560 NCURSES_SHLIB2="sh -c"
11561
11562 ADA_SUBDIRS="include gen src doc"
11563 if test "x$cf_with_tests" != "xno" ; then
11564         ADA_SUBDIRS="$ADA_SUBDIRS samples"
11565 fi
11566 for cf_dir in $ADA_SUBDIRS
11567 do
11568         SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
11569 done
11570
11571 NCURSES_TREE="#"
11572
11573 EXTERNAL_TREE=
11574
11575 # match layout used by make-tar.sh
11576 ADAHTML_DIR=../doc/ada
11577
11578 ac_config_files="$ac_config_files $SUB_MAKEFILES doc/adacurses${DFT_ARG_SUFFIX}-config.1:doc/MKada_config.in Makefile"
11579 ac_config_commands="$ac_config_commands default"
11580 cat >confcache <<\_ACEOF
11581 # This file is a shell script that caches the results of configure
11582 # tests run on this system so they can be shared between configure
11583 # scripts and configure runs, see configure's option --config-cache.
11584 # It is not useful on other systems.  If it contains results you don't
11585 # want to keep, you may remove or edit it.
11586 #
11587 # config.status only pays attention to the cache file if you give it
11588 # the --recheck option to rerun configure.
11589 #
11590 # `ac_cv_env_foo' variables (set or unset) will be overriden when
11591 # loading this file, other *unset* `ac_cv_foo' will be assigned the
11592 # following values.
11593
11594 _ACEOF
11595
11596 # The following way of writing the cache mishandles newlines in values,
11597 # but we know of no workaround that is simple, portable, and efficient.
11598 # So, don't put newlines in cache variables' values.
11599 # Ultrix sh set writes to stderr and can't be redirected directly,
11600 # and sets the high bit in the cache file unless we assign to the vars.
11601 {
11602   (set) 2>&1 |
11603     case `(ac_space=' '; set | grep ac_space) 2>&1` in
11604     *ac_space=\ *)
11605       # `set' does not quote correctly, so add quotes (double-quote
11606       # substitution turns \\\\ into \\, and sed turns \\ into \).
11607       sed -n \
11608         "s/'/'\\\\''/g;
11609           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
11610       ;;
11611     *)
11612       # `set' quotes correctly as required by POSIX, so do not add quotes.
11613       sed -n \
11614         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
11615       ;;
11616     esac;
11617 } |
11618   sed '
11619      t clear
11620      : clear
11621      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
11622      t end
11623      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
11624      : end' >>confcache
11625 if cmp -s $cache_file confcache; then :; else
11626   if test -w $cache_file; then
11627     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
11628     cat confcache >$cache_file
11629   else
11630     echo "not updating unwritable cache $cache_file"
11631   fi
11632 fi
11633 rm -f confcache
11634
11635 test "x$prefix" = xNONE && prefix=$ac_default_prefix
11636 # Let make expand exec_prefix.
11637 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
11638
11639 # VPATH may cause trouble with some makes, so we remove $(srcdir),
11640 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
11641 # trailing colons and then remove the whole line if VPATH becomes empty
11642 # (actually we leave an empty line to preserve line numbers).
11643 if test "x$srcdir" = x.; then
11644   ac_vpsub='/^[         ]*VPATH[        ]*=/{
11645 s/:*\$(srcdir):*/:/;
11646 s/:*\${srcdir}:*/:/;
11647 s/:*@srcdir@:*/:/;
11648 s/^\([^=]*=[    ]*\):*/\1/;
11649 s/:*$//;
11650 s/^[^=]*=[      ]*$//;
11651 }'
11652 fi
11653
11654 DEFS=-DHAVE_CONFIG_H
11655
11656 : ${CONFIG_STATUS=./config.status}
11657 ac_clean_files_save=$ac_clean_files
11658 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
11659 { echo "$as_me:11659: creating $CONFIG_STATUS" >&5
11660 echo "$as_me: creating $CONFIG_STATUS" >&6;}
11661 cat >$CONFIG_STATUS <<_ACEOF
11662 #! $SHELL
11663 # Generated automatically by configure.
11664 # Run this file to recreate the current configuration.
11665 # Compiler output produced by configure, useful for debugging
11666 # configure, is in config.log if it exists.
11667
11668 debug=false
11669 SHELL=\${CONFIG_SHELL-$SHELL}
11670 ac_cs_invocation="\$0 \$@"
11671
11672 _ACEOF
11673
11674 cat >>$CONFIG_STATUS <<\_ACEOF
11675 # Be Bourne compatible
11676 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
11677   emulate sh
11678   NULLCMD=:
11679 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
11680   set -o posix
11681 fi
11682
11683 # Name of the executable.
11684 as_me=`echo "$0" |sed 's,.*[\\/],,'`
11685
11686 if expr a : '\(a\)' >/dev/null 2>&1; then
11687   as_expr=expr
11688 else
11689   as_expr=false
11690 fi
11691
11692 rm -f conf$$ conf$$.exe conf$$.file
11693 echo >conf$$.file
11694 if ln -s conf$$.file conf$$ 2>/dev/null; then
11695   # We could just check for DJGPP; but this test a) works b) is more generic
11696   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
11697   if test -f conf$$.exe; then
11698     # Don't use ln at all; we don't have any links
11699     as_ln_s='cp -p'
11700   else
11701     as_ln_s='ln -s'
11702   fi
11703 elif ln conf$$.file conf$$ 2>/dev/null; then
11704   as_ln_s=ln
11705 else
11706   as_ln_s='cp -p'
11707 fi
11708 rm -f conf$$ conf$$.exe conf$$.file
11709
11710 as_executable_p="test -f"
11711
11712 # Support unset when possible.
11713 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
11714   as_unset=unset
11715 else
11716   as_unset=false
11717 fi
11718
11719 # NLS nuisances.
11720 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
11721 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
11722 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
11723 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
11724 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
11725 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
11726 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
11727 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
11728
11729 # IFS
11730 # We need space, tab and new line, in precisely that order.
11731 as_nl='
11732 '
11733 IFS="   $as_nl"
11734
11735 # CDPATH.
11736 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
11737
11738 exec 6>&1
11739
11740 _ACEOF
11741
11742 # Files that config.status was made for.
11743 if test -n "$ac_config_files"; then
11744   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
11745 fi
11746
11747 if test -n "$ac_config_headers"; then
11748   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
11749 fi
11750
11751 if test -n "$ac_config_links"; then
11752   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
11753 fi
11754
11755 if test -n "$ac_config_commands"; then
11756   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
11757 fi
11758
11759 cat >>$CONFIG_STATUS <<\EOF
11760
11761 ac_cs_usage="\
11762 \`$as_me' instantiates files from templates according to the
11763 current configuration.
11764
11765 Usage: $0 [OPTIONS] [FILE]...
11766
11767   -h, --help       print this help, then exit
11768   -V, --version    print version number, then exit
11769   -d, --debug      don't remove temporary files
11770       --recheck    update $as_me by reconfiguring in the same conditions
11771   --file=FILE[:TEMPLATE]
11772                    instantiate the configuration file FILE
11773   --header=FILE[:TEMPLATE]
11774                    instantiate the configuration header FILE
11775
11776 Configuration files:
11777 $config_files
11778
11779 Configuration headers:
11780 $config_headers
11781
11782 Configuration commands:
11783 $config_commands
11784
11785 Report bugs to <dickey@invisible-island.net>."
11786 EOF
11787
11788 cat >>$CONFIG_STATUS <<EOF
11789 ac_cs_version="\\
11790 config.status
11791 configured by $0, generated by GNU Autoconf 2.52.20101002,
11792   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
11793
11794 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
11795 Free Software Foundation, Inc.
11796 This config.status script is free software; the Free Software Foundation
11797 gives unlimited permission to copy, distribute and modify it."
11798 srcdir=$srcdir
11799 INSTALL="$INSTALL"
11800 EOF
11801
11802 cat >>$CONFIG_STATUS <<\EOF
11803 # If no file are specified by the user, then we need to provide default
11804 # value.  By we need to know if files were specified by the user.
11805 ac_need_defaults=:
11806 while test $# != 0
11807 do
11808   case $1 in
11809   --*=*)
11810     ac_option=`expr "x$1" : 'x\([^=]*\)='`
11811     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
11812     shift
11813     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
11814     shift
11815     ;;
11816   -*);;
11817   *) # This is not an option, so the user has probably given explicit
11818      # arguments.
11819      ac_need_defaults=false;;
11820   esac
11821
11822   case $1 in
11823   # Handling of the options.
11824 EOF
11825 cat >>$CONFIG_STATUS <<EOF
11826   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
11827     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
11828     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
11829 EOF
11830 cat >>$CONFIG_STATUS <<\EOF
11831   --version | --vers* | -V )
11832     echo "$ac_cs_version"; exit 0 ;;
11833   --he | --h)
11834     # Conflict between --help and --header
11835     { { echo "$as_me:11835: error: ambiguous option: $1
11836 Try \`$0 --help' for more information." >&5
11837 echo "$as_me: error: ambiguous option: $1
11838 Try \`$0 --help' for more information." >&2;}
11839    { (exit 1); exit 1; }; };;
11840   --help | --hel | -h )
11841     echo "$ac_cs_usage"; exit 0 ;;
11842   --debug | --d* | -d )
11843     debug=: ;;
11844   --file | --fil | --fi | --f )
11845     shift
11846     CONFIG_FILES="$CONFIG_FILES $1"
11847     ac_need_defaults=false;;
11848   --header | --heade | --head | --hea )
11849     shift
11850     CONFIG_HEADERS="$CONFIG_HEADERS $1"
11851     ac_need_defaults=false;;
11852
11853   # This is an error.
11854   -*) { { echo "$as_me:11854: error: unrecognized option: $1
11855 Try \`$0 --help' for more information." >&5
11856 echo "$as_me: error: unrecognized option: $1
11857 Try \`$0 --help' for more information." >&2;}
11858    { (exit 1); exit 1; }; } ;;
11859
11860   *) ac_config_targets="$ac_config_targets $1" ;;
11861
11862   esac
11863   shift
11864 done
11865
11866 exec 5>>config.log
11867 cat >&5 << _ACEOF
11868
11869 ## ----------------------- ##
11870 ## Running config.status.  ##
11871 ## ----------------------- ##
11872
11873 This file was extended by $as_me 2.52.20101002, executed with
11874   CONFIG_FILES    = $CONFIG_FILES
11875   CONFIG_HEADERS  = $CONFIG_HEADERS
11876   CONFIG_LINKS    = $CONFIG_LINKS
11877   CONFIG_COMMANDS = $CONFIG_COMMANDS
11878   > $ac_cs_invocation
11879 on `(hostname || uname -n) 2>/dev/null | sed 1q`
11880
11881 _ACEOF
11882 EOF
11883
11884 cat >>$CONFIG_STATUS <<EOF
11885 #
11886 # INIT-COMMANDS section.
11887 #
11888
11889 ### Special initialization commands, used to pass information from the
11890 ### configuration-run into config.status
11891
11892 AWK="$AWK"
11893 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
11894 DFT_LWR_MODEL="$DFT_LWR_MODEL"
11895 ECHO_LINK="$ECHO_LINK"
11896 LIB_NAME="$LIB_NAME"
11897 LIB_SUFFIX="$LIB_SUFFIX"
11898 LN_S="$LN_S"
11899 NCURSES_MAJOR="$NCURSES_MAJOR"
11900 NCURSES_MINOR="$NCURSES_MINOR"
11901 NCURSES_PATCH="$NCURSES_PATCH"
11902 USE_OLD_MAKERULES="$USE_OLD_MAKERULES"
11903 cf_cv_abi_version="$cf_cv_abi_version"
11904 cf_cv_rel_version="$cf_cv_rel_version"
11905 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
11906 cf_cv_shared_soname='$cf_cv_shared_soname'
11907 cf_cv_shlib_version="$cf_cv_shlib_version"
11908 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
11909 cf_cv_system_name="$cf_cv_system_name"
11910 host="$host"
11911 target="$target"
11912
11913 EOF
11914
11915 cat >>$CONFIG_STATUS <<\EOF
11916 for ac_config_target in $ac_config_targets
11917 do
11918   case "$ac_config_target" in
11919   # Handling of arguments.
11920   "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
11921   "doc/adacurses${DFT_ARG_SUFFIX}-config.1" ) CONFIG_FILES="$CONFIG_FILES doc/adacurses${DFT_ARG_SUFFIX}-config.1:doc/MKada_config.in" ;;
11922   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
11923   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
11924   "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
11925   *) { { echo "$as_me:11925: error: invalid argument: $ac_config_target" >&5
11926 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
11927    { (exit 1); exit 1; }; };;
11928   esac
11929 done
11930
11931 # If the user did not use the arguments to specify the items to instantiate,
11932 # then the envvar interface is used.  Set only those that are not.
11933 # We use the long form for the default assignment because of an extremely
11934 # bizarre bug on SunOS 4.1.3.
11935 if $ac_need_defaults; then
11936   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
11937   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
11938   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
11939 fi
11940
11941 # Create a temporary directory, and hook for its removal unless debugging.
11942 $debug ||
11943 {
11944   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
11945   trap '{ (exit 1); exit 1; }' 1 2 13 15
11946 }
11947
11948 # Create a (secure) tmp directory for tmp files.
11949 : ${TMPDIR=/tmp}
11950 {
11951   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
11952   test -n "$tmp" && test -d "$tmp"
11953 }  ||
11954 {
11955   tmp=$TMPDIR/cs$$-$RANDOM
11956   (umask 077 && mkdir $tmp)
11957 } ||
11958 {
11959    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
11960    { (exit 1); exit 1; }
11961 }
11962
11963 EOF
11964
11965 cat >>$CONFIG_STATUS <<EOF
11966
11967 #
11968 # CONFIG_FILES section.
11969 #
11970
11971 # No need to generate the scripts if there are no CONFIG_FILES.
11972 # This happens for instance when ./config.status config.h
11973 if test -n "\$CONFIG_FILES"; then
11974   # Protect against being on the right side of a sed subst in config.status.
11975   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
11976    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
11977 s,@SHELL@,$SHELL,;t t
11978 s,@exec_prefix@,$exec_prefix,;t t
11979 s,@prefix@,$prefix,;t t
11980 s,@program_transform_name@,$program_transform_name,;t t
11981 s,@bindir@,$bindir,;t t
11982 s,@sbindir@,$sbindir,;t t
11983 s,@libexecdir@,$libexecdir,;t t
11984 s,@datadir@,$datadir,;t t
11985 s,@sysconfdir@,$sysconfdir,;t t
11986 s,@sharedstatedir@,$sharedstatedir,;t t
11987 s,@localstatedir@,$localstatedir,;t t
11988 s,@libdir@,$libdir,;t t
11989 s,@includedir@,$includedir,;t t
11990 s,@oldincludedir@,$oldincludedir,;t t
11991 s,@infodir@,$infodir,;t t
11992 s,@mandir@,$mandir,;t t
11993 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
11994 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
11995 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
11996 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
11997 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
11998 s,@build_alias@,$build_alias,;t t
11999 s,@host_alias@,$host_alias,;t t
12000 s,@target_alias@,$target_alias,;t t
12001 s,@ECHO_C@,$ECHO_C,;t t
12002 s,@ECHO_N@,$ECHO_N,;t t
12003 s,@ECHO_T@,$ECHO_T,;t t
12004 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
12005 s,@DEFS@,$DEFS,;t t
12006 s,@LIBS@,$LIBS,;t t
12007 s,@top_builddir@,$top_builddir,;t t
12008 s,@build@,$build,;t t
12009 s,@build_cpu@,$build_cpu,;t t
12010 s,@build_vendor@,$build_vendor,;t t
12011 s,@build_os@,$build_os,;t t
12012 s,@host@,$host,;t t
12013 s,@host_cpu@,$host_cpu,;t t
12014 s,@host_vendor@,$host_vendor,;t t
12015 s,@host_os@,$host_os,;t t
12016 s,@target@,$target,;t t
12017 s,@target_cpu@,$target_cpu,;t t
12018 s,@target_vendor@,$target_vendor,;t t
12019 s,@target_os@,$target_os,;t t
12020 s,@CC@,$CC,;t t
12021 s,@CFLAGS@,$CFLAGS,;t t
12022 s,@LDFLAGS@,$LDFLAGS,;t t
12023 s,@CPPFLAGS@,$CPPFLAGS,;t t
12024 s,@ac_ct_CC@,$ac_ct_CC,;t t
12025 s,@EXEEXT@,$EXEEXT,;t t
12026 s,@OBJEXT@,$OBJEXT,;t t
12027 s,@CPP@,$CPP,;t t
12028 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
12029 s,@PROG_EXT@,$PROG_EXT,;t t
12030 s,@AWK@,$AWK,;t t
12031 s,@EGREP@,$EGREP,;t t
12032 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
12033 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
12034 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
12035 s,@LN_S@,$LN_S,;t t
12036 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
12037 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
12038 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
12039 s,@SET_MAKE@,$SET_MAKE,;t t
12040 s,@CTAGS@,$CTAGS,;t t
12041 s,@ETAGS@,$ETAGS,;t t
12042 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
12043 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
12044 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
12045 s,@RANLIB@,$RANLIB,;t t
12046 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
12047 s,@LD@,$LD,;t t
12048 s,@ac_ct_LD@,$ac_ct_LD,;t t
12049 s,@AR@,$AR,;t t
12050 s,@ac_ct_AR@,$ac_ct_AR,;t t
12051 s,@ARFLAGS@,$ARFLAGS,;t t
12052 s,@DESTDIR@,$DESTDIR,;t t
12053 s,@BUILD_CC@,$BUILD_CC,;t t
12054 s,@BUILD_CPP@,$BUILD_CPP,;t t
12055 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
12056 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
12057 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
12058 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
12059 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
12060 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
12061 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
12062 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
12063 s,@NCURSES_CONFIG@,$NCURSES_CONFIG,;t t
12064 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
12065 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
12066 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
12067 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
12068 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
12069 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
12070 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
12071 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
12072 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
12073 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
12074 s,@CC_G_OPT@,$CC_G_OPT,;t t
12075 s,@LD_MODEL@,$LD_MODEL,;t t
12076 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
12077 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
12078 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
12079 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
12080 s,@LINK_PROGS@,$LINK_PROGS,;t t
12081 s,@LINK_TESTS@,$LINK_TESTS,;t t
12082 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
12083 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
12084 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
12085 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
12086 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
12087 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
12088 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
12089 s,@PTHREAD@,$PTHREAD,;t t
12090 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
12091 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
12092 s,@ECHO_LINK@,$ECHO_LINK,;t t
12093 s,@ADAFLAGS@,$ADAFLAGS,;t t
12094 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
12095 s,@ADA_TRACE@,$ADA_TRACE,;t t
12096 s,@gnat_exists@,$gnat_exists,;t t
12097 s,@M4_exists@,$M4_exists,;t t
12098 s,@cf_ada_make@,$cf_ada_make,;t t
12099 s,@cf_compile_generics@,$cf_compile_generics,;t t
12100 s,@cf_generic_objects@,$cf_generic_objects,;t t
12101 s,@USE_GNAT_SIGINT@,$USE_GNAT_SIGINT,;t t
12102 s,@PRAGMA_UNREF@,$PRAGMA_UNREF,;t t
12103 s,@USE_OLD_MAKERULES@,$USE_OLD_MAKERULES,;t t
12104 s,@USE_GNAT_PROJECTS@,$USE_GNAT_PROJECTS,;t t
12105 s,@USE_GNAT_LIBRARIES@,$USE_GNAT_LIBRARIES,;t t
12106 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
12107 s,@cf_ada_package@,$cf_ada_package,;t t
12108 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
12109 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
12110 s,@ADA_SHAREDLIB@,$ADA_SHAREDLIB,;t t
12111 s,@MAKE_ADA_SHAREDLIB@,$MAKE_ADA_SHAREDLIB,;t t
12112 s,@TINFO_ARGS2@,$TINFO_ARGS2,;t t
12113 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
12114 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
12115 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
12116 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
12117 s,@MAKE_PC_FILES@,$MAKE_PC_FILES,;t t
12118 s,@cross_compiling@,$cross_compiling,;t t
12119 s,@TEST_ARG2@,$TEST_ARG2,;t t
12120 s,@TEST_LIBS2@,$TEST_LIBS2,;t t
12121 s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
12122 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
12123 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
12124 s,@EXTERNAL_TREE@,$EXTERNAL_TREE,;t t
12125 s,@ADAHTML_DIR@,$ADAHTML_DIR,;t t
12126 CEOF
12127
12128 EOF
12129
12130   cat >>$CONFIG_STATUS <<\EOF
12131   # Split the substitutions into bite-sized pieces for seds with
12132   # small command number limits, like on Digital OSF/1 and HP-UX.
12133   ac_max_sed_lines=48
12134   ac_sed_frag=1 # Number of current file.
12135   ac_beg=1 # First line for current file.
12136   ac_end=$ac_max_sed_lines # Line after last line for current file.
12137   ac_more_lines=:
12138   ac_sed_cmds=
12139   while $ac_more_lines; do
12140     if test $ac_beg -gt 1; then
12141       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
12142     else
12143       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
12144     fi
12145     if test ! -s $tmp/subs.frag; then
12146       ac_more_lines=false
12147     else
12148       # The purpose of the label and of the branching condition is to
12149       # speed up the sed processing (if there are no `@' at all, there
12150       # is no need to browse any of the substitutions).
12151       # These are the two extra sed commands mentioned above.
12152       (echo ':t
12153   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
12154       if test -z "$ac_sed_cmds"; then
12155         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
12156       else
12157         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
12158       fi
12159       ac_sed_frag=`expr $ac_sed_frag + 1`
12160       ac_beg=$ac_end
12161       ac_end=`expr $ac_end + $ac_max_sed_lines`
12162     fi
12163   done
12164   if test -z "$ac_sed_cmds"; then
12165     ac_sed_cmds=cat
12166   fi
12167 fi # test -n "$CONFIG_FILES"
12168
12169 EOF
12170 cat >>$CONFIG_STATUS <<\EOF
12171 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
12172   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
12173   case $ac_file in
12174   - | *:- | *:-:* ) # input from stdin
12175         cat >$tmp/stdin
12176         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
12177         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
12178   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
12179         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
12180   * )   ac_file_in=$ac_file.in ;;
12181   esac
12182
12183   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
12184   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
12185          X"$ac_file" : 'X\(//\)[^/]' \| \
12186          X"$ac_file" : 'X\(//\)$' \| \
12187          X"$ac_file" : 'X\(/\)' \| \
12188          .     : '\(.\)' 2>/dev/null ||
12189 echo X"$ac_file" |
12190     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
12191           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
12192           /^X\(\/\/\)$/{ s//\1/; q; }
12193           /^X\(\/\).*/{ s//\1/; q; }
12194           s/.*/./; q'`
12195   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
12196     { case "$ac_dir" in
12197   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
12198   *)                      as_incr_dir=.;;
12199 esac
12200 as_dummy="$ac_dir"
12201 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
12202   case $as_mkdir_dir in
12203     # Skip DOS drivespec
12204     ?:) as_incr_dir=$as_mkdir_dir ;;
12205     *)
12206       as_incr_dir=$as_incr_dir/$as_mkdir_dir
12207       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
12208     ;;
12209   esac
12210 done; }
12211
12212     ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
12213     # A "../" for each directory in $ac_dir_suffix.
12214     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
12215   else
12216     ac_dir_suffix= ac_dots=
12217   fi
12218
12219   case $srcdir in
12220   .)  ac_srcdir=.
12221       if test -z "$ac_dots"; then
12222          ac_top_srcdir=.
12223       else
12224          ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
12225       fi ;;
12226   [\\/]* | ?:[\\/]* )
12227       ac_srcdir=$srcdir$ac_dir_suffix;
12228       ac_top_srcdir=$srcdir ;;
12229   *) # Relative path.
12230     ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
12231     ac_top_srcdir=$ac_dots$srcdir ;;
12232   esac
12233
12234   case $INSTALL in
12235   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
12236   *) ac_INSTALL=$ac_dots$INSTALL ;;
12237   esac
12238
12239   if test x"$ac_file" != x-; then
12240     { echo "$as_me:12240: creating $ac_file" >&5
12241 echo "$as_me: creating $ac_file" >&6;}
12242     rm -f "$ac_file"
12243   fi
12244   # Let's still pretend it is `configure' which instantiates (i.e., don't
12245   # use $as_me), people would be surprised to read:
12246   #    /* config.h.  Generated automatically by config.status.  */
12247   configure_input="Generated automatically from `echo $ac_file_in |
12248                                                  sed 's,.*/,,'` by configure."
12249
12250   # First look for the input files in the build tree, otherwise in the
12251   # src tree.
12252   ac_file_inputs=`IFS=:
12253     for f in $ac_file_in; do
12254       case $f in
12255       -) echo $tmp/stdin ;;
12256       [\\/$]*)
12257          # Absolute (can't be DOS-style, as IFS=:)
12258          test -f "$f" || { { echo "$as_me:12258: error: cannot find input file: $f" >&5
12259 echo "$as_me: error: cannot find input file: $f" >&2;}
12260    { (exit 1); exit 1; }; }
12261          echo $f;;
12262       *) # Relative
12263          if test -f "$f"; then
12264            # Build tree
12265            echo $f
12266          elif test -f "$srcdir/$f"; then
12267            # Source tree
12268            echo $srcdir/$f
12269          else
12270            # /dev/null tree
12271            { { echo "$as_me:12271: error: cannot find input file: $f" >&5
12272 echo "$as_me: error: cannot find input file: $f" >&2;}
12273    { (exit 1); exit 1; }; }
12274          fi;;
12275       esac
12276     done` || { (exit 1); exit 1; }
12277 EOF
12278 cat >>$CONFIG_STATUS <<EOF
12279   sed "$ac_vpsub
12280 $extrasub
12281 EOF
12282 cat >>$CONFIG_STATUS <<\EOF
12283 :t
12284 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
12285 s,@configure_input@,$configure_input,;t t
12286 s,@srcdir@,$ac_srcdir,;t t
12287 s,@top_srcdir@,$ac_top_srcdir,;t t
12288 s,@INSTALL@,$ac_INSTALL,;t t
12289 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
12290   rm -f $tmp/stdin
12291   if test x"$ac_file" != x-; then
12292     mv $tmp/out $ac_file
12293   else
12294     cat $tmp/out
12295     rm -f $tmp/out
12296   fi
12297
12298 done
12299 EOF
12300 cat >>$CONFIG_STATUS <<\EOF
12301
12302 #
12303 # CONFIG_HEADER section.
12304 #
12305
12306 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
12307 # NAME is the cpp macro being defined and VALUE is the value it is being given.
12308 #
12309 # ac_d sets the value in "#define NAME VALUE" lines.
12310 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
12311 ac_dB='[        ].*$,\1#\2'
12312 ac_dC=' '
12313 ac_dD=',;t'
12314 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
12315 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
12316 ac_iB='\([      ]\),\1#\2define\3'
12317 ac_iC=' '
12318 ac_iD='\4,;t'
12319 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
12320 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
12321 ac_uB='$,\1#\2define\3'
12322 ac_uC=' '
12323 ac_uD=',;t'
12324
12325 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
12326   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
12327   case $ac_file in
12328   - | *:- | *:-:* ) # input from stdin
12329         cat >$tmp/stdin
12330         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
12331         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
12332   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
12333         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
12334   * )   ac_file_in=$ac_file.in ;;
12335   esac
12336
12337   test x"$ac_file" != x- && { echo "$as_me:12337: creating $ac_file" >&5
12338 echo "$as_me: creating $ac_file" >&6;}
12339
12340   # First look for the input files in the build tree, otherwise in the
12341   # src tree.
12342   ac_file_inputs=`IFS=:
12343     for f in $ac_file_in; do
12344       case $f in
12345       -) echo $tmp/stdin ;;
12346       [\\/$]*)
12347          # Absolute (can't be DOS-style, as IFS=:)
12348          test -f "$f" || { { echo "$as_me:12348: error: cannot find input file: $f" >&5
12349 echo "$as_me: error: cannot find input file: $f" >&2;}
12350    { (exit 1); exit 1; }; }
12351          echo $f;;
12352       *) # Relative
12353          if test -f "$f"; then
12354            # Build tree
12355            echo $f
12356          elif test -f "$srcdir/$f"; then
12357            # Source tree
12358            echo $srcdir/$f
12359          else
12360            # /dev/null tree
12361            { { echo "$as_me:12361: error: cannot find input file: $f" >&5
12362 echo "$as_me: error: cannot find input file: $f" >&2;}
12363    { (exit 1); exit 1; }; }
12364          fi;;
12365       esac
12366     done` || { (exit 1); exit 1; }
12367   # Remove the trailing spaces.
12368   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
12369
12370 EOF
12371
12372 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
12373 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
12374 # be either 'cat' or 'sort'.
12375 cat confdefs.h | uniq >conftest.vals
12376
12377 # Break up conftest.vals because some shells have a limit on
12378 # the size of here documents, and old seds have small limits too.
12379
12380 rm -f conftest.tail
12381 echo '  rm -f conftest.frag' >> $CONFIG_STATUS
12382 while grep . conftest.vals >/dev/null
12383 do
12384   # Write chunks of a limited-size here document to conftest.frag.
12385   echo '  cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
12386   sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
12387   echo 'CEOF' >> $CONFIG_STATUS
12388   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
12389   rm -f conftest.vals
12390   mv conftest.tail conftest.vals
12391 done
12392 rm -f conftest.vals
12393
12394 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
12395 # marker @DEFS@.
12396 echo '  cat >> conftest.edit <<CEOF
12397 /@DEFS@/r conftest.frag
12398 /@DEFS@/d
12399 CEOF
12400 sed -f conftest.edit $tmp/in > $tmp/out
12401 rm -f $tmp/in
12402 mv $tmp/out $tmp/in
12403 rm -f conftest.edit conftest.frag
12404 ' >> $CONFIG_STATUS
12405
12406 cat >>$CONFIG_STATUS <<\EOF
12407   # Let's still pretend it is `configure' which instantiates (i.e., don't
12408   # use $as_me), people would be surprised to read:
12409   #    /* config.h.  Generated automatically by config.status.  */
12410   if test x"$ac_file" = x-; then
12411     echo "/* Generated automatically by configure.  */" >$tmp/config.h
12412   else
12413     echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
12414   fi
12415   cat $tmp/in >>$tmp/config.h
12416   rm -f $tmp/in
12417   if test x"$ac_file" != x-; then
12418     if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
12419       { echo "$as_me:12419: $ac_file is unchanged" >&5
12420 echo "$as_me: $ac_file is unchanged" >&6;}
12421     else
12422       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
12423          X"$ac_file" : 'X\(//\)[^/]' \| \
12424          X"$ac_file" : 'X\(//\)$' \| \
12425          X"$ac_file" : 'X\(/\)' \| \
12426          .     : '\(.\)' 2>/dev/null ||
12427 echo X"$ac_file" |
12428     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
12429           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
12430           /^X\(\/\/\)$/{ s//\1/; q; }
12431           /^X\(\/\).*/{ s//\1/; q; }
12432           s/.*/./; q'`
12433       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
12434         { case "$ac_dir" in
12435   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
12436   *)                      as_incr_dir=.;;
12437 esac
12438 as_dummy="$ac_dir"
12439 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
12440   case $as_mkdir_dir in
12441     # Skip DOS drivespec
12442     ?:) as_incr_dir=$as_mkdir_dir ;;
12443     *)
12444       as_incr_dir=$as_incr_dir/$as_mkdir_dir
12445       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
12446     ;;
12447   esac
12448 done; }
12449
12450       fi
12451       rm -f $ac_file
12452       mv $tmp/config.h $ac_file
12453     fi
12454   else
12455     cat $tmp/config.h
12456     rm -f $tmp/config.h
12457   fi
12458 done
12459 EOF
12460 cat >>$CONFIG_STATUS <<\EOF
12461 #
12462 # CONFIG_COMMANDS section.
12463 #
12464 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
12465   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
12466   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
12467
12468   case $ac_dest in
12469     default )
12470 if test -z "$USE_OLD_MAKERULES" ; then
12471         $AWK -f $srcdir/mk-1st.awk <$srcdir/src/modules >>src/Makefile
12472 fi
12473  ;;
12474   esac
12475 done
12476 EOF
12477
12478 cat >>$CONFIG_STATUS <<\EOF
12479
12480 { (exit 0); exit 0; }
12481 EOF
12482 chmod +x $CONFIG_STATUS
12483 ac_clean_files=$ac_clean_files_save
12484
12485 # configure is writing to config.log, and then calls config.status.
12486 # config.status does its own redirection, appending to config.log.
12487 # Unfortunately, on DOS this fails, as config.log is still kept open
12488 # by configure, so config.status won't be able to write to it; its
12489 # output is simply discarded.  So we exec the FD to /dev/null,
12490 # effectively closing config.log, so it can be properly (re)opened and
12491 # appended to by config.status.  When coming back to configure, we
12492 # need to make the FD available again.
12493 if test "$no_create" != yes; then
12494   ac_cs_success=:
12495   exec 5>/dev/null
12496   $SHELL $CONFIG_STATUS || ac_cs_success=false
12497   exec 5>>config.log
12498   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
12499   # would make configure fail if this is the last instruction.
12500   $ac_cs_success || { (exit 1); exit 1; }
12501 fi
12502 ${MAKE:-make} preinstall