]> ncurses.scripts.mit.edu Git - ncurses.git/blob - Ada95/configure
ncurses 5.9 - patch 20120902
[ncurses.git] / Ada95 / configure
1 #! /bin/sh
2 # From configure.in Revision: 1.41 .
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated by Autoconf 2.52.20120811.
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 datarootdir='${prefix}/share'
139 datadir='${datarootdir}'
140 sysconfdir='${prefix}/etc'
141 sharedstatedir='${prefix}/com'
142 localstatedir='${prefix}/var'
143 libdir='${exec_prefix}/lib'
144 includedir='${prefix}/include'
145 oldincludedir='/usr/include'
146 infodir='${datarootdir}/info'
147 mandir='${datarootdir}/man'
148
149 # Identity of this package.
150 PACKAGE_NAME=
151 PACKAGE_TARNAME=
152 PACKAGE_VERSION=
153 PACKAGE_STRING=
154 PACKAGE_BUGREPORT=
155
156 ac_prev=
157 for ac_option
158 do
159   # If the previous option needs an argument, assign it.
160   if test -n "$ac_prev"; then
161     eval "$ac_prev=\$ac_option"
162     ac_prev=
163     continue
164   fi
165
166   ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
167
168   # Accept the important Cygnus configure options, so we can diagnose typos.
169
170   case $ac_option in
171
172   -bindir | --bindir | --bindi | --bind | --bin | --bi)
173     ac_prev=bindir ;;
174   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
175     bindir=$ac_optarg ;;
176
177   -build | --build | --buil | --bui | --bu)
178     ac_prev=build_alias ;;
179   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
180     build_alias=$ac_optarg ;;
181
182   -cache-file | --cache-file | --cache-fil | --cache-fi \
183   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
184     ac_prev=cache_file ;;
185   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
186   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
187     cache_file=$ac_optarg ;;
188
189   --config-cache | -C)
190     cache_file=config.cache ;;
191
192   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
193     ac_prev=datadir ;;
194   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
195   | --da=*)
196     datadir=$ac_optarg ;;
197
198   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
199   | --dataroo | --dataro | --datar)
200     ac_prev=datarootdir ;;
201   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
202   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
203     datarootdir=$ac_optarg ;;
204
205   -disable-* | --disable-*)
206     ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
207     # Reject names that are not valid shell variable names.
208     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
209       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
210    { (exit 1); exit 1; }; }
211     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
212     eval "enable_$ac_feature=no" ;;
213
214   -enable-* | --enable-*)
215     ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
216     # Reject names that are not valid shell variable names.
217     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
218       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
219    { (exit 1); exit 1; }; }
220     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
221     case $ac_option in
222       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
223       *) ac_optarg=yes ;;
224     esac
225     eval "enable_$ac_feature='$ac_optarg'" ;;
226
227   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
228   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
229   | --exec | --exe | --ex)
230     ac_prev=exec_prefix ;;
231   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
232   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
233   | --exec=* | --exe=* | --ex=*)
234     exec_prefix=$ac_optarg ;;
235
236   -gas | --gas | --ga | --g)
237     # Obsolete; use --with-gas.
238     with_gas=yes ;;
239
240   -help | --help | --hel | --he | -h)
241     ac_init_help=long ;;
242   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
243     ac_init_help=recursive ;;
244   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
245     ac_init_help=short ;;
246
247   -host | --host | --hos | --ho)
248     ac_prev=host_alias ;;
249   -host=* | --host=* | --hos=* | --ho=*)
250     host_alias=$ac_optarg ;;
251
252   -includedir | --includedir | --includedi | --included | --include \
253   | --includ | --inclu | --incl | --inc)
254     ac_prev=includedir ;;
255   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
256   | --includ=* | --inclu=* | --incl=* | --inc=*)
257     includedir=$ac_optarg ;;
258
259   -infodir | --infodir | --infodi | --infod | --info | --inf)
260     ac_prev=infodir ;;
261   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
262     infodir=$ac_optarg ;;
263
264   -libdir | --libdir | --libdi | --libd)
265     ac_prev=libdir ;;
266   -libdir=* | --libdir=* | --libdi=* | --libd=*)
267     libdir=$ac_optarg ;;
268
269   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
270   | --libexe | --libex | --libe)
271     ac_prev=libexecdir ;;
272   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
273   | --libexe=* | --libex=* | --libe=*)
274     libexecdir=$ac_optarg ;;
275
276   -localstatedir | --localstatedir | --localstatedi | --localstated \
277   | --localstate | --localstat | --localsta | --localst \
278   | --locals | --local | --loca | --loc | --lo)
279     ac_prev=localstatedir ;;
280   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
281   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
282   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
283     localstatedir=$ac_optarg ;;
284
285   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
286     ac_prev=mandir ;;
287   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
288     mandir=$ac_optarg ;;
289
290   -nfp | --nfp | --nf)
291     # Obsolete; use --without-fp.
292     with_fp=no ;;
293
294   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
295   | --no-cr | --no-c)
296     no_create=yes ;;
297
298   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
299   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
300     no_recursion=yes ;;
301
302   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
303   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
304   | --oldin | --oldi | --old | --ol | --o)
305     ac_prev=oldincludedir ;;
306   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
307   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
308   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
309     oldincludedir=$ac_optarg ;;
310
311   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
312     ac_prev=prefix ;;
313   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
314     prefix=$ac_optarg ;;
315
316   -program-prefix | --program-prefix | --program-prefi | --program-pref \
317   | --program-pre | --program-pr | --program-p)
318     ac_prev=program_prefix ;;
319   -program-prefix=* | --program-prefix=* | --program-prefi=* \
320   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
321     program_prefix=$ac_optarg ;;
322
323   -program-suffix | --program-suffix | --program-suffi | --program-suff \
324   | --program-suf | --program-su | --program-s)
325     ac_prev=program_suffix ;;
326   -program-suffix=* | --program-suffix=* | --program-suffi=* \
327   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
328     program_suffix=$ac_optarg ;;
329
330   -program-transform-name | --program-transform-name \
331   | --program-transform-nam | --program-transform-na \
332   | --program-transform-n | --program-transform- \
333   | --program-transform | --program-transfor \
334   | --program-transfo | --program-transf \
335   | --program-trans | --program-tran \
336   | --progr-tra | --program-tr | --program-t)
337     ac_prev=program_transform_name ;;
338   -program-transform-name=* | --program-transform-name=* \
339   | --program-transform-nam=* | --program-transform-na=* \
340   | --program-transform-n=* | --program-transform-=* \
341   | --program-transform=* | --program-transfor=* \
342   | --program-transfo=* | --program-transf=* \
343   | --program-trans=* | --program-tran=* \
344   | --progr-tra=* | --program-tr=* | --program-t=*)
345     program_transform_name=$ac_optarg ;;
346
347   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
348   | -silent | --silent | --silen | --sile | --sil)
349     silent=yes ;;
350
351   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
352     ac_prev=sbindir ;;
353   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
354   | --sbi=* | --sb=*)
355     sbindir=$ac_optarg ;;
356
357   -sharedstatedir | --sharedstatedir | --sharedstatedi \
358   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
359   | --sharedst | --shareds | --shared | --share | --shar \
360   | --sha | --sh)
361     ac_prev=sharedstatedir ;;
362   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
363   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
364   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
365   | --sha=* | --sh=*)
366     sharedstatedir=$ac_optarg ;;
367
368   -site | --site | --sit)
369     ac_prev=site ;;
370   -site=* | --site=* | --sit=*)
371     site=$ac_optarg ;;
372
373   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
374     ac_prev=srcdir ;;
375   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
376     srcdir=$ac_optarg ;;
377
378   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
379   | --syscon | --sysco | --sysc | --sys | --sy)
380     ac_prev=sysconfdir ;;
381   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
382   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
383     sysconfdir=$ac_optarg ;;
384
385   -target | --target | --targe | --targ | --tar | --ta | --t)
386     ac_prev=target_alias ;;
387   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
388     target_alias=$ac_optarg ;;
389
390   -v | -verbose | --verbose | --verbos | --verbo | --verb)
391     verbose=yes ;;
392
393   -version | --version | --versio | --versi | --vers | -V)
394     ac_init_version=: ;;
395
396   -with-* | --with-*)
397     ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
398     # Reject names that are not valid shell variable names.
399     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
400       { echo "$as_me: error: invalid package name: $ac_package" >&2
401    { (exit 1); exit 1; }; }
402     ac_package=`echo $ac_package| sed 's/-/_/g'`
403     case $ac_option in
404       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
405       *) ac_optarg=yes ;;
406     esac
407     eval "with_$ac_package='$ac_optarg'" ;;
408
409   -without-* | --without-*)
410     ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
411     # Reject names that are not valid shell variable names.
412     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
413       { echo "$as_me: error: invalid package name: $ac_package" >&2
414    { (exit 1); exit 1; }; }
415     ac_package=`echo $ac_package | sed 's/-/_/g'`
416     eval "with_$ac_package=no" ;;
417
418   --x)
419     # Obsolete; use --with-x.
420     with_x=yes ;;
421
422   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
423   | --x-incl | --x-inc | --x-in | --x-i)
424     ac_prev=x_includes ;;
425   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
426   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
427     x_includes=$ac_optarg ;;
428
429   -x-libraries | --x-libraries | --x-librarie | --x-librari \
430   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
431     ac_prev=x_libraries ;;
432   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
433   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
434     x_libraries=$ac_optarg ;;
435
436   -*) { echo "$as_me: error: unrecognized option: $ac_option
437 Try \`$0 --help' for more information." >&2
438    { (exit 1); exit 1; }; }
439     ;;
440
441   *=*)
442     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
443     # Reject names that are not valid shell variable names.
444     expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
445       { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
446    { (exit 1); exit 1; }; }
447     ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
448     eval "$ac_envvar='$ac_optarg'"
449     export $ac_envvar ;;
450
451   *)
452     # FIXME: should be removed in autoconf 3.0.
453     echo "$as_me: WARNING: you should use --build, --host, --target" >&2
454     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
455       echo "$as_me: WARNING: invalid host type: $ac_option" >&2
456     : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
457     ;;
458
459   esac
460 done
461
462 if test -n "$ac_prev"; then
463   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
464   { echo "$as_me: error: missing argument to $ac_option" >&2
465    { (exit 1); exit 1; }; }
466 fi
467
468 # Be sure to have absolute paths.
469 for ac_var in exec_prefix prefix
470 do
471   eval ac_val=$`echo $ac_var`
472   case $ac_val in
473     [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
474     *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
475    { (exit 1); exit 1; }; };;
476   esac
477 done
478
479 # Be sure to have absolute paths.
480 for ac_var in bindir sbindir libexecdir datarootdir datadir sysconfdir sharedstatedir \
481               localstatedir libdir includedir oldincludedir infodir mandir
482 do
483   eval ac_val=$`echo $ac_var`
484   case $ac_val in
485     [\\/$]* | ?:[\\/]* ) ;;
486     *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
487    { (exit 1); exit 1; }; };;
488   esac
489 done
490
491 # There might be people who depend on the old broken behavior: `$host'
492 # used to hold the argument of --host etc.
493 build=$build_alias
494 host=$host_alias
495 target=$target_alias
496
497 # FIXME: should be removed in autoconf 3.0.
498 if test "x$host_alias" != x; then
499   if test "x$build_alias" = x; then
500     cross_compiling=maybe
501     echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
502     If a cross compiler is detected then cross compile mode will be used." >&2
503   elif test "x$build_alias" != "x$host_alias"; then
504     cross_compiling=yes
505   fi
506 fi
507
508 ac_tool_prefix=
509 test -n "$host_alias" && ac_tool_prefix=$host_alias-
510
511 test "$silent" = yes && exec 6>/dev/null
512
513 # Find the source files, if location was not specified.
514 if test -z "$srcdir"; then
515   ac_srcdir_defaulted=yes
516   # Try the directory containing this script, then its parent.
517   ac_prog=$0
518   ac_confdir=`echo "$ac_prog" | sed 's%[\\/][^\\/][^\\/]*$%%'`
519   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
520   srcdir=$ac_confdir
521   if test ! -r $srcdir/$ac_unique_file; then
522     srcdir=..
523   fi
524 else
525   ac_srcdir_defaulted=no
526 fi
527 if test ! -r $srcdir/$ac_unique_file; then
528   if test "$ac_srcdir_defaulted" = yes; then
529     { echo "$as_me: error: cannot find sources in $ac_confdir or .." >&2
530    { (exit 1); exit 1; }; }
531   else
532     { echo "$as_me: error: cannot find sources in $srcdir" >&2
533    { (exit 1); exit 1; }; }
534   fi
535 fi
536 srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
537 ac_env_build_alias_set=${build_alias+set}
538 ac_env_build_alias_value=$build_alias
539 ac_cv_env_build_alias_set=${build_alias+set}
540 ac_cv_env_build_alias_value=$build_alias
541 ac_env_host_alias_set=${host_alias+set}
542 ac_env_host_alias_value=$host_alias
543 ac_cv_env_host_alias_set=${host_alias+set}
544 ac_cv_env_host_alias_value=$host_alias
545 ac_env_target_alias_set=${target_alias+set}
546 ac_env_target_alias_value=$target_alias
547 ac_cv_env_target_alias_set=${target_alias+set}
548 ac_cv_env_target_alias_value=$target_alias
549 ac_env_CC_set=${CC+set}
550 ac_env_CC_value=$CC
551 ac_cv_env_CC_set=${CC+set}
552 ac_cv_env_CC_value=$CC
553 ac_env_CFLAGS_set=${CFLAGS+set}
554 ac_env_CFLAGS_value=$CFLAGS
555 ac_cv_env_CFLAGS_set=${CFLAGS+set}
556 ac_cv_env_CFLAGS_value=$CFLAGS
557 ac_env_LDFLAGS_set=${LDFLAGS+set}
558 ac_env_LDFLAGS_value=$LDFLAGS
559 ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
560 ac_cv_env_LDFLAGS_value=$LDFLAGS
561 ac_env_CPPFLAGS_set=${CPPFLAGS+set}
562 ac_env_CPPFLAGS_value=$CPPFLAGS
563 ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
564 ac_cv_env_CPPFLAGS_value=$CPPFLAGS
565 ac_env_CPP_set=${CPP+set}
566 ac_env_CPP_value=$CPP
567 ac_cv_env_CPP_set=${CPP+set}
568 ac_cv_env_CPP_value=$CPP
569
570 #
571 # Report the --help message.
572 #
573 if test "$ac_init_help" = "long"; then
574   # Omit some internal or obsolete options to make the list less imposing.
575   # This message is too long to be a string in the A/UX 3.1 sh.
576   cat <<EOF
577 \`configure' configures this package to adapt to many kinds of systems.
578
579 Usage: $0 [OPTION]... [VAR=VALUE]...
580
581 To assign environment variables (e.g., CC, CFLAGS...), specify them as
582 VAR=VALUE.  See below for descriptions of some of the useful variables.
583
584 Defaults for the options are specified in brackets.
585
586 Configuration:
587   -h, --help              display this help and exit
588       --help=short        display options specific to this package
589       --help=recursive    display the short help of all the included packages
590   -V, --version           display version information and exit
591   -q, --quiet, --silent   do not print \`checking...' messages
592       --cache-file=FILE   cache test results in FILE [disabled]
593   -C, --config-cache      alias for \`--cache-file=config.cache'
594   -n, --no-create         do not create output files
595       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
596
597 EOF
598
599   cat <<EOF
600 Installation directories:
601   --prefix=PREFIX         install architecture-independent files in PREFIX
602                           [$ac_default_prefix]
603   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
604                           [PREFIX]
605
606 By default, \`make install' will install all the files in
607 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
608 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
609 for instance \`--prefix=\$HOME'.
610
611 For better control, use the options below.
612
613 Fine tuning of the installation directories:
614   --bindir=DIR            user executables [EPREFIX/bin]
615   --sbindir=DIR           system admin executables [EPREFIX/sbin]
616   --libexecdir=DIR        program executables [EPREFIX/libexec]
617   --datarootdir=DIR       read-only architecture-independent data [PREFIX/share]
618   --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
619   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
620   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
621   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
622   --libdir=DIR            object code libraries [EPREFIX/lib]
623   --includedir=DIR        C header files [PREFIX/include]
624   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
625   --infodir=DIR           info documentation [DATAROOTDIR/info]
626   --mandir=DIR            man documentation [DATAROOTDIR/man]
627 EOF
628
629   cat <<\EOF
630
631 Program names:
632   --program-prefix=PREFIX            prepend PREFIX to installed program names
633   --program-suffix=SUFFIX            append SUFFIX to installed program names
634   --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
635
636 System types:
637   --build=BUILD           configure for building on BUILD [guessed]
638   --host=HOST       build programs to run on HOST [BUILD]
639   --target=TARGET   configure for building compilers for TARGET [HOST]
640 EOF
641 fi
642
643 if test -n "$ac_init_help"; then
644
645   cat <<\EOF
646
647 Optional Packages:
648   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
649   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
650
651 Optional Features:
652   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
653   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
654
655   --with-system-type=XXX  test: override derived host system-type
656   --with-pkg-config{=path} enable/disable use of pkg-config
657   --with-pkg-config-libdir=XXX use given directory for installing pc-files
658   --enable-pc-files       generate and install .pc files for pkg-config
659   --without-tests         suppress build with test-programs
660   --enable-mixed-case     tic should assume mixed-case filenames
661   --with-install-prefix   prefixes actual install-location ($DESTDIR)
662 Build-Tools Needed to Compile Temporary Applications for Cross-compiling:
663   --with-build-cc=XXX     the build C compiler ($BUILD_CC)
664   --with-build-cpp=XXX    the build C preprocessor ($BUILD_CPP)
665   --with-build-cflags=XXX the build C compiler-flags ($BUILD_CFLAGS)
666   --with-build-cppflags=XXX the build C preprocessor-flags ($BUILD_CPPFLAGS)
667   --with-build-ldflags=XXX the build linker-flags ($BUILD_LDFLAGS)
668   --with-build-libs=XXX   the build libraries (${BUILD_LIBS})
669 Options to Specify the Libraries Built/Used:
670   --with-shared           generate shared C-objects (needed for --with-ada-sharedlib)
671   --enable-widec          compile with wide-char/UTF-8 code
672   --with-curses-dir=DIR   directory in which (n)curses is installed
673   --with-lib-prefix       override library-prefix
674   --with-shlib-version=X  Specify rel or abi version for shared libs
675   --enable-rpath-link     link sample programs with rpath option
676 Fine-Tuning Your Configuration:
677   --enable-broken_linker  compile with broken-linker support code
678   --disable-largefile     omit support for large files
679   --with-rcs-ids          compile-in RCS identifiers
680 Extensions:
681   --disable-ext-funcs     disable function-extensions
682   --enable-const          compile with extra/non-standard const
683 Development Code:
684   --without-develop       disable development options
685 Experimental Code:
686   --with-pthread          use POSIX thread library
687   --enable-weak-symbols   enable weak-symbols for pthreads
688   --enable-reentrant      compile with experimental reentrant code
689   --with-wrap-prefix=XXX  override prefix used for public variables
690 Testing/development Options:
691   --disable-echo          display "compiling" commands
692   --enable-warnings       build: turn on GCC compiler warnings
693   --enable-assertions     test: turn on generation of assertion code
694   --enable-expanded       test: generate functions for certain macros
695   --disable-macros        test: use functions rather than macros
696   --with-trace            test: add trace() function to all models of ncurses
697 Ada95 Binding Options:
698   --with-ada-compiler=CMD specify Ada95 compiler command (default gnatmake)
699   --with-ada-include=DIR  Ada includes are in DIR (default: PREFIX/share/ada/adainclude)
700   --with-ada-objects=DIR  Ada objects are in DIR (default: PREFIX/lib/ada/adalib)
701   --with-ada-sharedlib=XX build Ada95 shared-library
702
703 Some influential environment variables:
704   CC          C compiler command
705   CFLAGS      C compiler flags
706   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
707               nonstandard directory <lib dir>
708   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
709               headers in a nonstandard directory <include dir>
710   CPP         C preprocessor
711
712 Use these variables to override the choices made by `configure' or to help
713 it to find libraries and programs with nonstandard names/locations.
714
715 EOF
716 fi
717
718 if test "$ac_init_help" = "recursive"; then
719   # If there are subdirs, report their specific --help.
720   ac_popdir=`pwd`
721   for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
722     cd $ac_subdir
723     # A "../" for each directory in /$ac_subdir.
724     ac_dots=`echo $ac_subdir |
725              sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
726
727     case $srcdir in
728     .) # No --srcdir option.  We are building in place.
729       ac_sub_srcdir=$srcdir ;;
730     [\\/]* | ?:[\\/]* ) # Absolute path.
731       ac_sub_srcdir=$srcdir/$ac_subdir ;;
732     *) # Relative path.
733       ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;;
734     esac
735
736     # Check for guested configure; otherwise get Cygnus style configure.
737     if test -f $ac_sub_srcdir/configure.gnu; then
738       echo
739       $SHELL $ac_sub_srcdir/configure.gnu  --help=recursive
740     elif test -f $ac_sub_srcdir/configure; then
741       echo
742       $SHELL $ac_sub_srcdir/configure  --help=recursive
743     elif test -f $ac_sub_srcdir/configure.ac ||
744            test -f $ac_sub_srcdir/configure.in; then
745       echo
746       $ac_configure --help
747     else
748       echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
749     fi
750     cd $ac_popdir
751   done
752 fi
753
754 test -n "$ac_init_help" && exit 0
755 if $ac_init_version; then
756   cat <<\EOF
757
758 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
759 Free Software Foundation, Inc.
760 This configure script is free software; the Free Software Foundation
761 gives unlimited permission to copy, distribute and modify it.
762 EOF
763   exit 0
764 fi
765 exec 5>config.log
766 cat >&5 <<EOF
767 This file contains any messages produced by compilers while
768 running configure, to aid debugging if configure makes a mistake.
769
770 It was created by $as_me, which was
771 generated by GNU Autoconf 2.52.20120811.  Invocation command line was
772
773   $ $0 $@
774
775 EOF
776 {
777 cat <<_ASUNAME
778 ## ---------- ##
779 ## Platform.  ##
780 ## ---------- ##
781
782 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
783 uname -m = `(uname -m) 2>/dev/null || echo unknown`
784 uname -r = `(uname -r) 2>/dev/null || echo unknown`
785 uname -s = `(uname -s) 2>/dev/null || echo unknown`
786 uname -v = `(uname -v) 2>/dev/null || echo unknown`
787
788 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
789 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
790
791 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
792 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
793 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
794 hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
795 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
796 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
797 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
798
799 PATH = $PATH
800
801 _ASUNAME
802 } >&5
803
804 cat >&5 <<EOF
805 ## ------------ ##
806 ## Core tests.  ##
807 ## ------------ ##
808
809 EOF
810
811 # Keep a trace of the command line.
812 # Strip out --no-create and --no-recursion so they do not pile up.
813 # Also quote any args containing shell meta-characters.
814 ac_configure_args=
815 ac_sep=
816 for ac_arg
817 do
818   case $ac_arg in
819   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
820   | --no-cr | --no-c) ;;
821   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
822   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
823   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
824     ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
825     ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
826     ac_sep=" " ;;
827   *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
828      ac_sep=" " ;;
829   esac
830   # Get rid of the leading space.
831 done
832
833 # When interrupted or exit'd, cleanup temporary files, and complete
834 # config.log.  We remove comments because anyway the quotes in there
835 # would cause problems or look ugly.
836 trap 'exit_status=$?
837   # Save into config.log some information that might help in debugging.
838   echo >&5
839   echo "## ----------------- ##" >&5
840   echo "## Cache variables.  ##" >&5
841   echo "## ----------------- ##" >&5
842   echo >&5
843   # The following way of writing the cache mishandles newlines in values,
844 {
845   (set) 2>&1 |
846     case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
847     *ac_space=\ *)
848       sed -n \
849         "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
850           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
851       ;;
852     *)
853       sed -n \
854         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
855       ;;
856     esac;
857 } >&5
858   sed "/^$/d" confdefs.h >conftest.log
859   if test -s conftest.log; then
860     echo >&5
861     echo "## ------------ ##" >&5
862     echo "## confdefs.h.  ##" >&5
863     echo "## ------------ ##" >&5
864     echo >&5
865     cat conftest.log >&5
866   fi
867   (echo; echo) >&5
868   test "$ac_signal" != 0 &&
869     echo "$as_me: caught signal $ac_signal" >&5
870   echo "$as_me: exit $exit_status" >&5
871   rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
872     exit $exit_status
873      ' 0
874 for ac_signal in 1 2 13 15; do
875   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
876 done
877 ac_signal=0
878
879 # confdefs.h avoids OS command line length limits that DEFS can exceed.
880 rm -rf conftest* confdefs.h
881 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
882 echo >confdefs.h
883
884 # Let the site file select an alternate cache file if it wants to.
885 # Prefer explicitly selected file to automatically selected ones.
886 if test -z "$CONFIG_SITE"; then
887   if test "x$prefix" != xNONE; then
888     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
889   else
890     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
891   fi
892 fi
893 for ac_site_file in $CONFIG_SITE; do
894   if test -r "$ac_site_file"; then
895     { echo "$as_me:895: loading site script $ac_site_file" >&5
896 echo "$as_me: loading site script $ac_site_file" >&6;}
897     cat "$ac_site_file" >&5
898     . "$ac_site_file"
899   fi
900 done
901
902 if test -r "$cache_file"; then
903   # Some versions of bash will fail to source /dev/null (special
904   # files actually), so we avoid doing that.
905   if test -f "$cache_file"; then
906     { echo "$as_me:906: loading cache $cache_file" >&5
907 echo "$as_me: loading cache $cache_file" >&6;}
908     case $cache_file in
909       [\\/]* | ?:[\\/]* ) . $cache_file;;
910       *)                      . ./$cache_file;;
911     esac
912   fi
913 else
914   { echo "$as_me:914: creating cache $cache_file" >&5
915 echo "$as_me: creating cache $cache_file" >&6;}
916   >$cache_file
917 fi
918
919 # Check that the precious variables saved in the cache have kept the same
920 # value.
921 ac_cache_corrupted=false
922 for ac_var in `(set) 2>&1 |
923                sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
924   eval ac_old_set=\$ac_cv_env_${ac_var}_set
925   eval ac_new_set=\$ac_env_${ac_var}_set
926   eval ac_old_val="\$ac_cv_env_${ac_var}_value"
927   eval ac_new_val="\$ac_env_${ac_var}_value"
928   case $ac_old_set,$ac_new_set in
929     set,)
930       { echo "$as_me:930: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
931 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
932       ac_cache_corrupted=: ;;
933     ,set)
934       { echo "$as_me:934: error: \`$ac_var' was not set in the previous run" >&5
935 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
936       ac_cache_corrupted=: ;;
937     ,);;
938     *)
939       if test "x$ac_old_val" != "x$ac_new_val"; then
940         { echo "$as_me:940: error: \`$ac_var' has changed since the previous run:" >&5
941 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
942         { echo "$as_me:942:   former value:  $ac_old_val" >&5
943 echo "$as_me:   former value:  $ac_old_val" >&2;}
944         { echo "$as_me:944:   current value: $ac_new_val" >&5
945 echo "$as_me:   current value: $ac_new_val" >&2;}
946         ac_cache_corrupted=:
947       fi;;
948   esac
949   # Pass precious variables to config.status.  It doesn't matter if
950   # we pass some twice (in addition to the command line arguments).
951   if test "$ac_new_set" = set; then
952     case $ac_new_val in
953     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
954       ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
955       ac_configure_args="$ac_configure_args '$ac_arg'"
956       ;;
957     *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
958        ;;
959     esac
960   fi
961 done
962 if $ac_cache_corrupted; then
963   { echo "$as_me:963: error: changes in the environment can compromise the build" >&5
964 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
965   { { echo "$as_me:965: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
966 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
967    { (exit 1); exit 1; }; }
968 fi
969
970 ac_ext=c
971 ac_cpp='$CPP $CPPFLAGS'
972 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
973 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
974 ac_compiler_gnu=$ac_cv_c_compiler_gnu
975 ac_main_return=return
976
977 case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
978   *c*,-n*) ECHO_N= ECHO_C='
979 ' ECHO_T='      ' ;;
980   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
981   *)      ECHO_N= ECHO_C='\c' ECHO_T= ;;
982 esac
983 echo "#! $SHELL" >conftest.sh
984 echo  "exit 0"   >>conftest.sh
985 chmod +x conftest.sh
986 if { (echo "$as_me:986: PATH=\".;.\"; conftest.sh") >&5
987   (PATH=".;."; conftest.sh) 2>&5
988   ac_status=$?
989   echo "$as_me:989: \$? = $ac_status" >&5
990   (exit $ac_status); }; then
991   ac_path_separator=';'
992 else
993   ac_path_separator=:
994 fi
995 PATH_SEPARATOR="$ac_path_separator"
996 rm -f conftest.sh
997
998 ac_config_headers="$ac_config_headers include/ncurses_cfg.h:include/ncurses_cfg.hin"
999
1000 top_builddir=`pwd`
1001
1002 ac_aux_dir=
1003 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1004   if test -f $ac_dir/install-sh; then
1005     ac_aux_dir=$ac_dir
1006     ac_install_sh="$ac_aux_dir/install-sh -c"
1007     break
1008   elif test -f $ac_dir/install.sh; then
1009     ac_aux_dir=$ac_dir
1010     ac_install_sh="$ac_aux_dir/install.sh -c"
1011     break
1012   elif test -f $ac_dir/shtool; then
1013     ac_aux_dir=$ac_dir
1014     ac_install_sh="$ac_aux_dir/shtool install -c"
1015     break
1016   fi
1017 done
1018 if test -z "$ac_aux_dir"; then
1019   { { echo "$as_me:1019: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1020 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1021    { (exit 1); exit 1; }; }
1022 fi
1023 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1024 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1025 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1026
1027 # Make sure we can run config.sub.
1028 $ac_config_sub sun4 >/dev/null 2>&1 ||
1029   { { echo "$as_me:1029: error: cannot run $ac_config_sub" >&5
1030 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1031    { (exit 1); exit 1; }; }
1032
1033 echo "$as_me:1033: checking build system type" >&5
1034 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1035 if test "${ac_cv_build+set}" = set; then
1036   echo $ECHO_N "(cached) $ECHO_C" >&6
1037 else
1038   ac_cv_build_alias=$build_alias
1039 test -z "$ac_cv_build_alias" &&
1040   ac_cv_build_alias=`$ac_config_guess`
1041 test -z "$ac_cv_build_alias" &&
1042   { { echo "$as_me:1042: error: cannot guess build type; you must specify one" >&5
1043 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1044    { (exit 1); exit 1; }; }
1045 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1046   { { echo "$as_me:1046: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1047 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1048    { (exit 1); exit 1; }; }
1049
1050 fi
1051 echo "$as_me:1051: result: $ac_cv_build" >&5
1052 echo "${ECHO_T}$ac_cv_build" >&6
1053 build=$ac_cv_build
1054 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1055 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1056 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1057
1058 echo "$as_me:1058: checking host system type" >&5
1059 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1060 if test "${ac_cv_host+set}" = set; then
1061   echo $ECHO_N "(cached) $ECHO_C" >&6
1062 else
1063   ac_cv_host_alias=$host_alias
1064 test -z "$ac_cv_host_alias" &&
1065   ac_cv_host_alias=$ac_cv_build_alias
1066 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1067   { { echo "$as_me:1067: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1068 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1069    { (exit 1); exit 1; }; }
1070
1071 fi
1072 echo "$as_me:1072: result: $ac_cv_host" >&5
1073 echo "${ECHO_T}$ac_cv_host" >&6
1074 host=$ac_cv_host
1075 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1076 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1077 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1078
1079 if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then
1080         echo "$as_me:1080: checking target system type" >&5
1081 echo $ECHO_N "checking target system type... $ECHO_C" >&6
1082 if test "${ac_cv_target+set}" = set; then
1083   echo $ECHO_N "(cached) $ECHO_C" >&6
1084 else
1085   ac_cv_target_alias=$target_alias
1086 test "x$ac_cv_target_alias" = "x" &&
1087   ac_cv_target_alias=$ac_cv_host_alias
1088 ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
1089   { { echo "$as_me:1089: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1090 echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1091    { (exit 1); exit 1; }; }
1092
1093 fi
1094 echo "$as_me:1094: result: $ac_cv_target" >&5
1095 echo "${ECHO_T}$ac_cv_target" >&6
1096 target=$ac_cv_target
1097 target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1098 target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1099 target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1100
1101 # The aliases save the names the user supplied, while $host etc.
1102 # will get canonicalized.
1103 test -n "$target_alias" &&
1104   test "$program_prefix$program_suffix$program_transform_name" = \
1105     NONENONEs,x,x, &&
1106   program_prefix=${target_alias}-
1107         system_name="$host_os"
1108 else
1109         system_name="`(uname -s -r) 2>/dev/null`"
1110         if test -z "$system_name" ; then
1111                 system_name="`(hostname) 2>/dev/null`"
1112         fi
1113 fi
1114 test -n "$system_name" && cat >>confdefs.h <<EOF
1115 #define SYSTEM_NAME "$system_name"
1116 EOF
1117
1118 if test "${cf_cv_system_name+set}" = set; then
1119   echo $ECHO_N "(cached) $ECHO_C" >&6
1120 else
1121   cf_cv_system_name="$system_name"
1122 fi
1123
1124 test -z "$system_name" && system_name="$cf_cv_system_name"
1125 test -n "$cf_cv_system_name" && echo "$as_me:1125: result: Configuring for $cf_cv_system_name" >&5
1126 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1127
1128 if test ".$system_name" != ".$cf_cv_system_name" ; then
1129         echo "$as_me:1129: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1130 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1131         { { echo "$as_me:1131: error: \"Please remove config.cache and try again.\"" >&5
1132 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1133    { (exit 1); exit 1; }; }
1134 fi
1135
1136 # Check whether --with-system-type or --without-system-type was given.
1137 if test "${with_system_type+set}" = set; then
1138   withval="$with_system_type"
1139   { echo "$as_me:1139: WARNING: overriding system type to $withval" >&5
1140 echo "$as_me: WARNING: overriding system type to $withval" >&2;}
1141  cf_cv_system_name=$withval
1142 fi;
1143
1144 ###     Save the given $CFLAGS to allow user-override.
1145 cf_user_CFLAGS="$CFLAGS"
1146
1147 ###     Default install-location
1148
1149 echo "$as_me:1149: checking for prefix" >&5
1150 echo $ECHO_N "checking for prefix... $ECHO_C" >&6
1151 if test "x$prefix" = "xNONE" ; then
1152         case "$cf_cv_system_name" in
1153                 # non-vendor systems don't have a conflict
1154         openbsd*|freebsd*|mirbsd*|linux*|cygwin*|k*bsd*-gnu)
1155                 prefix=/usr
1156                 ;;
1157         *)      prefix=$ac_default_prefix
1158                 ;;
1159         esac
1160 fi
1161 echo "$as_me:1161: result: $prefix" >&5
1162 echo "${ECHO_T}$prefix" >&6
1163
1164 if test "x$prefix" = "xNONE" ; then
1165 echo "$as_me:1165: checking for default include-directory" >&5
1166 echo $ECHO_N "checking for default include-directory... $ECHO_C" >&6
1167 test -n "$verbose" && echo 1>&6
1168 for cf_symbol in \
1169         $includedir \
1170         $includedir/ncurses \
1171         $prefix/include \
1172         $prefix/include/ncurses \
1173         /usr/local/include \
1174         /usr/local/include/ncurses \
1175         /usr/include \
1176         /usr/include/ncurses
1177 do
1178         cf_dir=`eval echo $cf_symbol`
1179         if test -f $cf_dir/curses.h ; then
1180         if ( fgrep NCURSES_VERSION $cf_dir/curses.h 2>&1 >/dev/null ) ; then
1181                 includedir="$cf_symbol"
1182                 test -n "$verbose"  && echo $ac_n "     found " 1>&6
1183                 break
1184         fi
1185         fi
1186         test -n "$verbose"  && echo "   tested $cf_dir" 1>&6
1187 done
1188 echo "$as_me:1188: result: $includedir" >&5
1189 echo "${ECHO_T}$includedir" >&6
1190 fi
1191
1192 ###     Checks for programs.
1193 ac_ext=c
1194 ac_cpp='$CPP $CPPFLAGS'
1195 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1196 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1197 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1198 ac_main_return=return
1199 if test -n "$ac_tool_prefix"; then
1200   for ac_prog in gnatgcc gcc cc
1201   do
1202     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1203 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1204 echo "$as_me:1204: checking for $ac_word" >&5
1205 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1206 if test "${ac_cv_prog_CC+set}" = set; then
1207   echo $ECHO_N "(cached) $ECHO_C" >&6
1208 else
1209   if test -n "$CC"; then
1210   ac_cv_prog_CC="$CC" # Let the user override the test.
1211 else
1212   ac_save_IFS=$IFS; IFS=$ac_path_separator
1213 ac_dummy="$PATH"
1214 for ac_dir in $ac_dummy; do
1215   IFS=$ac_save_IFS
1216   test -z "$ac_dir" && ac_dir=.
1217   $as_executable_p "$ac_dir/$ac_word" || continue
1218 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1219 echo "$as_me:1219: found $ac_dir/$ac_word" >&5
1220 break
1221 done
1222
1223 fi
1224 fi
1225 CC=$ac_cv_prog_CC
1226 if test -n "$CC"; then
1227   echo "$as_me:1227: result: $CC" >&5
1228 echo "${ECHO_T}$CC" >&6
1229 else
1230   echo "$as_me:1230: result: no" >&5
1231 echo "${ECHO_T}no" >&6
1232 fi
1233
1234     test -n "$CC" && break
1235   done
1236 fi
1237 if test -z "$CC"; then
1238   ac_ct_CC=$CC
1239   for ac_prog in gnatgcc gcc cc
1240 do
1241   # Extract the first word of "$ac_prog", so it can be a program name with args.
1242 set dummy $ac_prog; ac_word=$2
1243 echo "$as_me:1243: checking for $ac_word" >&5
1244 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1245 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1246   echo $ECHO_N "(cached) $ECHO_C" >&6
1247 else
1248   if test -n "$ac_ct_CC"; then
1249   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1250 else
1251   ac_save_IFS=$IFS; IFS=$ac_path_separator
1252 ac_dummy="$PATH"
1253 for ac_dir in $ac_dummy; do
1254   IFS=$ac_save_IFS
1255   test -z "$ac_dir" && ac_dir=.
1256   $as_executable_p "$ac_dir/$ac_word" || continue
1257 ac_cv_prog_ac_ct_CC="$ac_prog"
1258 echo "$as_me:1258: found $ac_dir/$ac_word" >&5
1259 break
1260 done
1261
1262 fi
1263 fi
1264 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1265 if test -n "$ac_ct_CC"; then
1266   echo "$as_me:1266: result: $ac_ct_CC" >&5
1267 echo "${ECHO_T}$ac_ct_CC" >&6
1268 else
1269   echo "$as_me:1269: result: no" >&5
1270 echo "${ECHO_T}no" >&6
1271 fi
1272
1273   test -n "$ac_ct_CC" && break
1274 done
1275
1276   CC=$ac_ct_CC
1277 fi
1278
1279 test -z "$CC" && { { echo "$as_me:1279: error: no acceptable cc found in \$PATH" >&5
1280 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1281    { (exit 1); exit 1; }; }
1282
1283 # Provide some information about the compiler.
1284 echo "$as_me:1284:" \
1285      "checking for C compiler version" >&5
1286 ac_compiler=`set X $ac_compile; echo $2`
1287 { (eval echo "$as_me:1287: \"$ac_compiler --version </dev/null >&5\"") >&5
1288   (eval $ac_compiler --version </dev/null >&5) 2>&5
1289   ac_status=$?
1290   echo "$as_me:1290: \$? = $ac_status" >&5
1291   (exit $ac_status); }
1292 { (eval echo "$as_me:1292: \"$ac_compiler -v </dev/null >&5\"") >&5
1293   (eval $ac_compiler -v </dev/null >&5) 2>&5
1294   ac_status=$?
1295   echo "$as_me:1295: \$? = $ac_status" >&5
1296   (exit $ac_status); }
1297 { (eval echo "$as_me:1297: \"$ac_compiler -V </dev/null >&5\"") >&5
1298   (eval $ac_compiler -V </dev/null >&5) 2>&5
1299   ac_status=$?
1300   echo "$as_me:1300: \$? = $ac_status" >&5
1301   (exit $ac_status); }
1302
1303 cat >conftest.$ac_ext <<_ACEOF
1304 #line 1304 "configure"
1305 #include "confdefs.h"
1306
1307 int
1308 main ()
1309 {
1310
1311   ;
1312   return 0;
1313 }
1314 _ACEOF
1315 ac_clean_files_save=$ac_clean_files
1316 ac_clean_files="$ac_clean_files a.out a.exe"
1317 # Try to create an executable without -o first, disregard a.out.
1318 # It will help us diagnose broken compilers, and finding out an intuition
1319 # of exeext.
1320 echo "$as_me:1320: checking for C compiler default output" >&5
1321 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1322 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1323 if { (eval echo "$as_me:1323: \"$ac_link_default\"") >&5
1324   (eval $ac_link_default) 2>&5
1325   ac_status=$?
1326   echo "$as_me:1326: \$? = $ac_status" >&5
1327   (exit $ac_status); }; then
1328   # Find the output, starting from the most likely.  This scheme is
1329 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1330 # resort.
1331 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1332                 ls a.out conftest 2>/dev/null;
1333                 ls a.* conftest.* 2>/dev/null`; do
1334   case $ac_file in
1335     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1336     a.out ) # We found the default executable, but exeext='' is most
1337             # certainly right.
1338             break;;
1339     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1340           # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1341           export ac_cv_exeext
1342           break;;
1343     * ) break;;
1344   esac
1345 done
1346 else
1347   echo "$as_me: failed program was:" >&5
1348 cat conftest.$ac_ext >&5
1349 { { echo "$as_me:1349: error: C compiler cannot create executables" >&5
1350 echo "$as_me: error: C compiler cannot create executables" >&2;}
1351    { (exit 77); exit 77; }; }
1352 fi
1353
1354 ac_exeext=$ac_cv_exeext
1355 echo "$as_me:1355: result: $ac_file" >&5
1356 echo "${ECHO_T}$ac_file" >&6
1357
1358 # Check the compiler produces executables we can run.  If not, either
1359 # the compiler is broken, or we cross compile.
1360 echo "$as_me:1360: checking whether the C compiler works" >&5
1361 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1362 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1363 # If not cross compiling, check that we can run a simple program.
1364 if test "$cross_compiling" != yes; then
1365   if { ac_try='./$ac_file'
1366   { (eval echo "$as_me:1366: \"$ac_try\"") >&5
1367   (eval $ac_try) 2>&5
1368   ac_status=$?
1369   echo "$as_me:1369: \$? = $ac_status" >&5
1370   (exit $ac_status); }; }; then
1371     cross_compiling=no
1372   else
1373     if test "$cross_compiling" = maybe; then
1374         cross_compiling=yes
1375     else
1376         { { echo "$as_me:1376: error: cannot run C compiled programs.
1377 If you meant to cross compile, use \`--host'." >&5
1378 echo "$as_me: error: cannot run C compiled programs.
1379 If you meant to cross compile, use \`--host'." >&2;}
1380    { (exit 1); exit 1; }; }
1381     fi
1382   fi
1383 fi
1384 echo "$as_me:1384: result: yes" >&5
1385 echo "${ECHO_T}yes" >&6
1386
1387 rm -f a.out a.exe conftest$ac_cv_exeext
1388 ac_clean_files=$ac_clean_files_save
1389 # Check the compiler produces executables we can run.  If not, either
1390 # the compiler is broken, or we cross compile.
1391 echo "$as_me:1391: checking whether we are cross compiling" >&5
1392 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1393 echo "$as_me:1393: result: $cross_compiling" >&5
1394 echo "${ECHO_T}$cross_compiling" >&6
1395
1396 echo "$as_me:1396: checking for executable suffix" >&5
1397 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1398 if { (eval echo "$as_me:1398: \"$ac_link\"") >&5
1399   (eval $ac_link) 2>&5
1400   ac_status=$?
1401   echo "$as_me:1401: \$? = $ac_status" >&5
1402   (exit $ac_status); }; then
1403   # If both `conftest.exe' and `conftest' are `present' (well, observable)
1404 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
1405 # work properly (i.e., refer to `conftest.exe'), while it won't with
1406 # `rm'.
1407 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1408   case $ac_file in
1409     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1410     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1411           export ac_cv_exeext
1412           break;;
1413     * ) break;;
1414   esac
1415 done
1416 else
1417   { { echo "$as_me:1417: error: cannot compute EXEEXT: cannot compile and link" >&5
1418 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1419    { (exit 1); exit 1; }; }
1420 fi
1421
1422 rm -f conftest$ac_cv_exeext
1423 echo "$as_me:1423: result: $ac_cv_exeext" >&5
1424 echo "${ECHO_T}$ac_cv_exeext" >&6
1425
1426 rm -f conftest.$ac_ext
1427 EXEEXT=$ac_cv_exeext
1428 ac_exeext=$EXEEXT
1429 echo "$as_me:1429: checking for object suffix" >&5
1430 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1431 if test "${ac_cv_objext+set}" = set; then
1432   echo $ECHO_N "(cached) $ECHO_C" >&6
1433 else
1434   cat >conftest.$ac_ext <<_ACEOF
1435 #line 1435 "configure"
1436 #include "confdefs.h"
1437
1438 int
1439 main ()
1440 {
1441
1442   ;
1443   return 0;
1444 }
1445 _ACEOF
1446 rm -f conftest.o conftest.obj
1447 if { (eval echo "$as_me:1447: \"$ac_compile\"") >&5
1448   (eval $ac_compile) 2>&5
1449   ac_status=$?
1450   echo "$as_me:1450: \$? = $ac_status" >&5
1451   (exit $ac_status); }; then
1452   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1453   case $ac_file in
1454     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
1455     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1456        break;;
1457   esac
1458 done
1459 else
1460   echo "$as_me: failed program was:" >&5
1461 cat conftest.$ac_ext >&5
1462 { { echo "$as_me:1462: error: cannot compute OBJEXT: cannot compile" >&5
1463 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1464    { (exit 1); exit 1; }; }
1465 fi
1466
1467 rm -f conftest.$ac_cv_objext conftest.$ac_ext
1468 fi
1469 echo "$as_me:1469: result: $ac_cv_objext" >&5
1470 echo "${ECHO_T}$ac_cv_objext" >&6
1471 OBJEXT=$ac_cv_objext
1472 ac_objext=$OBJEXT
1473 echo "$as_me:1473: checking whether we are using the GNU C compiler" >&5
1474 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1475 if test "${ac_cv_c_compiler_gnu+set}" = set; then
1476   echo $ECHO_N "(cached) $ECHO_C" >&6
1477 else
1478   cat >conftest.$ac_ext <<_ACEOF
1479 #line 1479 "configure"
1480 #include "confdefs.h"
1481
1482 int
1483 main ()
1484 {
1485 #ifndef __GNUC__
1486        choke me
1487 #endif
1488
1489   ;
1490   return 0;
1491 }
1492 _ACEOF
1493 rm -f conftest.$ac_objext
1494 if { (eval echo "$as_me:1494: \"$ac_compile\"") >&5
1495   (eval $ac_compile) 2>&5
1496   ac_status=$?
1497   echo "$as_me:1497: \$? = $ac_status" >&5
1498   (exit $ac_status); } &&
1499          { ac_try='test -s conftest.$ac_objext'
1500   { (eval echo "$as_me:1500: \"$ac_try\"") >&5
1501   (eval $ac_try) 2>&5
1502   ac_status=$?
1503   echo "$as_me:1503: \$? = $ac_status" >&5
1504   (exit $ac_status); }; }; then
1505   ac_compiler_gnu=yes
1506 else
1507   echo "$as_me: failed program was:" >&5
1508 cat conftest.$ac_ext >&5
1509 ac_compiler_gnu=no
1510 fi
1511 rm -f conftest.$ac_objext conftest.$ac_ext
1512 ac_cv_c_compiler_gnu=$ac_compiler_gnu
1513
1514 fi
1515 echo "$as_me:1515: result: $ac_cv_c_compiler_gnu" >&5
1516 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1517 GCC=`test $ac_compiler_gnu = yes && echo yes`
1518 ac_test_CFLAGS=${CFLAGS+set}
1519 ac_save_CFLAGS=$CFLAGS
1520 CFLAGS="-g"
1521 echo "$as_me:1521: checking whether $CC accepts -g" >&5
1522 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1523 if test "${ac_cv_prog_cc_g+set}" = set; then
1524   echo $ECHO_N "(cached) $ECHO_C" >&6
1525 else
1526   cat >conftest.$ac_ext <<_ACEOF
1527 #line 1527 "configure"
1528 #include "confdefs.h"
1529
1530 int
1531 main ()
1532 {
1533
1534   ;
1535   return 0;
1536 }
1537 _ACEOF
1538 rm -f conftest.$ac_objext
1539 if { (eval echo "$as_me:1539: \"$ac_compile\"") >&5
1540   (eval $ac_compile) 2>&5
1541   ac_status=$?
1542   echo "$as_me:1542: \$? = $ac_status" >&5
1543   (exit $ac_status); } &&
1544          { ac_try='test -s conftest.$ac_objext'
1545   { (eval echo "$as_me:1545: \"$ac_try\"") >&5
1546   (eval $ac_try) 2>&5
1547   ac_status=$?
1548   echo "$as_me:1548: \$? = $ac_status" >&5
1549   (exit $ac_status); }; }; then
1550   ac_cv_prog_cc_g=yes
1551 else
1552   echo "$as_me: failed program was:" >&5
1553 cat conftest.$ac_ext >&5
1554 ac_cv_prog_cc_g=no
1555 fi
1556 rm -f conftest.$ac_objext conftest.$ac_ext
1557 fi
1558 echo "$as_me:1558: result: $ac_cv_prog_cc_g" >&5
1559 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1560 if test "$ac_test_CFLAGS" = set; then
1561   CFLAGS=$ac_save_CFLAGS
1562 elif test $ac_cv_prog_cc_g = yes; then
1563   if test "$GCC" = yes; then
1564     CFLAGS="-g -O2"
1565   else
1566     CFLAGS="-g"
1567   fi
1568 else
1569   if test "$GCC" = yes; then
1570     CFLAGS="-O2"
1571   else
1572     CFLAGS=
1573   fi
1574 fi
1575 # Some people use a C++ compiler to compile C.  Since we use `exit',
1576 # in C++ we need to declare it.  In case someone uses the same compiler
1577 # for both compiling C and C++ we need to have the C++ compiler decide
1578 # the declaration of exit, since it's the most demanding environment.
1579 cat >conftest.$ac_ext <<_ACEOF
1580 #ifndef __cplusplus
1581   choke me
1582 #endif
1583 _ACEOF
1584 rm -f conftest.$ac_objext
1585 if { (eval echo "$as_me:1585: \"$ac_compile\"") >&5
1586   (eval $ac_compile) 2>&5
1587   ac_status=$?
1588   echo "$as_me:1588: \$? = $ac_status" >&5
1589   (exit $ac_status); } &&
1590          { ac_try='test -s conftest.$ac_objext'
1591   { (eval echo "$as_me:1591: \"$ac_try\"") >&5
1592   (eval $ac_try) 2>&5
1593   ac_status=$?
1594   echo "$as_me:1594: \$? = $ac_status" >&5
1595   (exit $ac_status); }; }; then
1596   for ac_declaration in \
1597    ''\
1598    '#include <stdlib.h>' \
1599    'extern "C" void std::exit (int) throw (); using std::exit;' \
1600    'extern "C" void std::exit (int); using std::exit;' \
1601    'extern "C" void exit (int) throw ();' \
1602    'extern "C" void exit (int);' \
1603    'void exit (int);'
1604 do
1605   cat >conftest.$ac_ext <<_ACEOF
1606 #line 1606 "configure"
1607 #include "confdefs.h"
1608 #include <stdlib.h>
1609 $ac_declaration
1610 int
1611 main ()
1612 {
1613 exit (42);
1614   ;
1615   return 0;
1616 }
1617 _ACEOF
1618 rm -f conftest.$ac_objext
1619 if { (eval echo "$as_me:1619: \"$ac_compile\"") >&5
1620   (eval $ac_compile) 2>&5
1621   ac_status=$?
1622   echo "$as_me:1622: \$? = $ac_status" >&5
1623   (exit $ac_status); } &&
1624          { ac_try='test -s conftest.$ac_objext'
1625   { (eval echo "$as_me:1625: \"$ac_try\"") >&5
1626   (eval $ac_try) 2>&5
1627   ac_status=$?
1628   echo "$as_me:1628: \$? = $ac_status" >&5
1629   (exit $ac_status); }; }; then
1630   :
1631 else
1632   echo "$as_me: failed program was:" >&5
1633 cat conftest.$ac_ext >&5
1634 continue
1635 fi
1636 rm -f conftest.$ac_objext conftest.$ac_ext
1637   cat >conftest.$ac_ext <<_ACEOF
1638 #line 1638 "configure"
1639 #include "confdefs.h"
1640 $ac_declaration
1641 int
1642 main ()
1643 {
1644 exit (42);
1645   ;
1646   return 0;
1647 }
1648 _ACEOF
1649 rm -f conftest.$ac_objext
1650 if { (eval echo "$as_me:1650: \"$ac_compile\"") >&5
1651   (eval $ac_compile) 2>&5
1652   ac_status=$?
1653   echo "$as_me:1653: \$? = $ac_status" >&5
1654   (exit $ac_status); } &&
1655          { ac_try='test -s conftest.$ac_objext'
1656   { (eval echo "$as_me:1656: \"$ac_try\"") >&5
1657   (eval $ac_try) 2>&5
1658   ac_status=$?
1659   echo "$as_me:1659: \$? = $ac_status" >&5
1660   (exit $ac_status); }; }; then
1661   break
1662 else
1663   echo "$as_me: failed program was:" >&5
1664 cat conftest.$ac_ext >&5
1665 fi
1666 rm -f conftest.$ac_objext conftest.$ac_ext
1667 done
1668 rm -rf conftest*
1669 if test -n "$ac_declaration"; then
1670   echo '#ifdef __cplusplus' >>confdefs.h
1671   echo $ac_declaration      >>confdefs.h
1672   echo '#endif'             >>confdefs.h
1673 fi
1674
1675 else
1676   echo "$as_me: failed program was:" >&5
1677 cat conftest.$ac_ext >&5
1678 fi
1679 rm -f conftest.$ac_objext conftest.$ac_ext
1680 ac_ext=c
1681 ac_cpp='$CPP $CPPFLAGS'
1682 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1683 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1684 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1685 ac_main_return=return
1686
1687 GCC_VERSION=none
1688 if test "$GCC" = yes ; then
1689         echo "$as_me:1689: checking version of $CC" >&5
1690 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
1691         GCC_VERSION="`${CC} --version 2>/dev/null | sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
1692         test -z "$GCC_VERSION" && GCC_VERSION=unknown
1693         echo "$as_me:1693: result: $GCC_VERSION" >&5
1694 echo "${ECHO_T}$GCC_VERSION" >&6
1695 fi
1696
1697 ac_ext=c
1698 ac_cpp='$CPP $CPPFLAGS'
1699 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1700 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1701 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1702 ac_main_return=return
1703 echo "$as_me:1703: checking how to run the C preprocessor" >&5
1704 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
1705 # On Suns, sometimes $CPP names a directory.
1706 if test -n "$CPP" && test -d "$CPP"; then
1707   CPP=
1708 fi
1709 if test -z "$CPP"; then
1710   if test "${ac_cv_prog_CPP+set}" = set; then
1711   echo $ECHO_N "(cached) $ECHO_C" >&6
1712 else
1713       # Double quotes because CPP needs to be expanded
1714     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
1715     do
1716       ac_preproc_ok=false
1717 for ac_c_preproc_warn_flag in '' yes
1718 do
1719   # Use a header file that comes with gcc, so configuring glibc
1720   # with a fresh cross-compiler works.
1721   # On the NeXT, cc -E runs the code through the compiler's parser,
1722   # not just through cpp. "Syntax error" is here to catch this case.
1723   cat >conftest.$ac_ext <<_ACEOF
1724 #line 1724 "configure"
1725 #include "confdefs.h"
1726 #include <assert.h>
1727                      Syntax error
1728 _ACEOF
1729 if { (eval echo "$as_me:1729: \"$ac_cpp conftest.$ac_ext\"") >&5
1730   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
1731   ac_status=$?
1732   egrep -v '^ *\+' conftest.er1 >conftest.err
1733   rm -f conftest.er1
1734   cat conftest.err >&5
1735   echo "$as_me:1735: \$? = $ac_status" >&5
1736   (exit $ac_status); } >/dev/null; then
1737   if test -s conftest.err; then
1738     ac_cpp_err=$ac_c_preproc_warn_flag
1739   else
1740     ac_cpp_err=
1741   fi
1742 else
1743   ac_cpp_err=yes
1744 fi
1745 if test -z "$ac_cpp_err"; then
1746   :
1747 else
1748   echo "$as_me: failed program was:" >&5
1749   cat conftest.$ac_ext >&5
1750   # Broken: fails on valid input.
1751 continue
1752 fi
1753 rm -f conftest.err conftest.$ac_ext
1754
1755   # OK, works on sane cases.  Now check whether non-existent headers
1756   # can be detected and how.
1757   cat >conftest.$ac_ext <<_ACEOF
1758 #line 1758 "configure"
1759 #include "confdefs.h"
1760 #include <ac_nonexistent.h>
1761 _ACEOF
1762 if { (eval echo "$as_me:1762: \"$ac_cpp conftest.$ac_ext\"") >&5
1763   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
1764   ac_status=$?
1765   egrep -v '^ *\+' conftest.er1 >conftest.err
1766   rm -f conftest.er1
1767   cat conftest.err >&5
1768   echo "$as_me:1768: \$? = $ac_status" >&5
1769   (exit $ac_status); } >/dev/null; then
1770   if test -s conftest.err; then
1771     ac_cpp_err=$ac_c_preproc_warn_flag
1772   else
1773     ac_cpp_err=
1774   fi
1775 else
1776   ac_cpp_err=yes
1777 fi
1778 if test -z "$ac_cpp_err"; then
1779   # Broken: success on invalid input.
1780 continue
1781 else
1782   echo "$as_me: failed program was:" >&5
1783   cat conftest.$ac_ext >&5
1784   # Passes both tests.
1785 ac_preproc_ok=:
1786 break
1787 fi
1788 rm -f conftest.err conftest.$ac_ext
1789
1790 done
1791 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
1792 rm -f conftest.err conftest.$ac_ext
1793 if $ac_preproc_ok; then
1794   break
1795 fi
1796
1797     done
1798     ac_cv_prog_CPP=$CPP
1799
1800 fi
1801   CPP=$ac_cv_prog_CPP
1802 else
1803   ac_cv_prog_CPP=$CPP
1804 fi
1805 echo "$as_me:1805: result: $CPP" >&5
1806 echo "${ECHO_T}$CPP" >&6
1807 ac_preproc_ok=false
1808 for ac_c_preproc_warn_flag in '' yes
1809 do
1810   # Use a header file that comes with gcc, so configuring glibc
1811   # with a fresh cross-compiler works.
1812   # On the NeXT, cc -E runs the code through the compiler's parser,
1813   # not just through cpp. "Syntax error" is here to catch this case.
1814   cat >conftest.$ac_ext <<_ACEOF
1815 #line 1815 "configure"
1816 #include "confdefs.h"
1817 #include <assert.h>
1818                      Syntax error
1819 _ACEOF
1820 if { (eval echo "$as_me:1820: \"$ac_cpp conftest.$ac_ext\"") >&5
1821   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
1822   ac_status=$?
1823   egrep -v '^ *\+' conftest.er1 >conftest.err
1824   rm -f conftest.er1
1825   cat conftest.err >&5
1826   echo "$as_me:1826: \$? = $ac_status" >&5
1827   (exit $ac_status); } >/dev/null; then
1828   if test -s conftest.err; then
1829     ac_cpp_err=$ac_c_preproc_warn_flag
1830   else
1831     ac_cpp_err=
1832   fi
1833 else
1834   ac_cpp_err=yes
1835 fi
1836 if test -z "$ac_cpp_err"; then
1837   :
1838 else
1839   echo "$as_me: failed program was:" >&5
1840   cat conftest.$ac_ext >&5
1841   # Broken: fails on valid input.
1842 continue
1843 fi
1844 rm -f conftest.err conftest.$ac_ext
1845
1846   # OK, works on sane cases.  Now check whether non-existent headers
1847   # can be detected and how.
1848   cat >conftest.$ac_ext <<_ACEOF
1849 #line 1849 "configure"
1850 #include "confdefs.h"
1851 #include <ac_nonexistent.h>
1852 _ACEOF
1853 if { (eval echo "$as_me:1853: \"$ac_cpp conftest.$ac_ext\"") >&5
1854   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
1855   ac_status=$?
1856   egrep -v '^ *\+' conftest.er1 >conftest.err
1857   rm -f conftest.er1
1858   cat conftest.err >&5
1859   echo "$as_me:1859: \$? = $ac_status" >&5
1860   (exit $ac_status); } >/dev/null; then
1861   if test -s conftest.err; then
1862     ac_cpp_err=$ac_c_preproc_warn_flag
1863   else
1864     ac_cpp_err=
1865   fi
1866 else
1867   ac_cpp_err=yes
1868 fi
1869 if test -z "$ac_cpp_err"; then
1870   # Broken: success on invalid input.
1871 continue
1872 else
1873   echo "$as_me: failed program was:" >&5
1874   cat conftest.$ac_ext >&5
1875   # Passes both tests.
1876 ac_preproc_ok=:
1877 break
1878 fi
1879 rm -f conftest.err conftest.$ac_ext
1880
1881 done
1882 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
1883 rm -f conftest.err conftest.$ac_ext
1884 if $ac_preproc_ok; then
1885   :
1886 else
1887   { { echo "$as_me:1887: error: C preprocessor \"$CPP\" fails sanity check" >&5
1888 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
1889    { (exit 1); exit 1; }; }
1890 fi
1891
1892 ac_ext=c
1893 ac_cpp='$CPP $CPPFLAGS'
1894 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1895 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1896 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1897 ac_main_return=return
1898
1899 if test $ac_cv_c_compiler_gnu = yes; then
1900     echo "$as_me:1900: checking whether $CC needs -traditional" >&5
1901 echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
1902 if test "${ac_cv_prog_gcc_traditional+set}" = set; then
1903   echo $ECHO_N "(cached) $ECHO_C" >&6
1904 else
1905     ac_pattern="Autoconf.*'x'"
1906   cat >conftest.$ac_ext <<_ACEOF
1907 #line 1907 "configure"
1908 #include "confdefs.h"
1909 #include <sgtty.h>
1910 int Autoconf = TIOCGETP;
1911 _ACEOF
1912 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1913   egrep "$ac_pattern" >/dev/null 2>&1; then
1914   ac_cv_prog_gcc_traditional=yes
1915 else
1916   ac_cv_prog_gcc_traditional=no
1917 fi
1918 rm -rf conftest*
1919
1920   if test $ac_cv_prog_gcc_traditional = no; then
1921     cat >conftest.$ac_ext <<_ACEOF
1922 #line 1922 "configure"
1923 #include "confdefs.h"
1924 #include <termio.h>
1925 int Autoconf = TCGETA;
1926 _ACEOF
1927 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1928   egrep "$ac_pattern" >/dev/null 2>&1; then
1929   ac_cv_prog_gcc_traditional=yes
1930 fi
1931 rm -rf conftest*
1932
1933   fi
1934 fi
1935 echo "$as_me:1935: result: $ac_cv_prog_gcc_traditional" >&5
1936 echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
1937   if test $ac_cv_prog_gcc_traditional = yes; then
1938     CC="$CC -traditional"
1939   fi
1940 fi
1941
1942 echo "$as_me:1942: checking whether $CC understands -c and -o together" >&5
1943 echo $ECHO_N "checking whether $CC understands -c and -o together... $ECHO_C" >&6
1944 if test "${cf_cv_prog_CC_c_o+set}" = set; then
1945   echo $ECHO_N "(cached) $ECHO_C" >&6
1946 else
1947
1948 cat > conftest.$ac_ext <<CF_EOF
1949 #include <stdio.h>
1950 int main()
1951 {
1952         ${cf_cv_main_return:-return}(0);
1953 }
1954 CF_EOF
1955 # We do the test twice because some compilers refuse to overwrite an
1956 # existing .o file with -o, though they will create one.
1957 ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
1958 if { (eval echo "$as_me:1958: \"$ac_try\"") >&5
1959   (eval $ac_try) 2>&5
1960   ac_status=$?
1961   echo "$as_me:1961: \$? = $ac_status" >&5
1962   (exit $ac_status); } &&
1963   test -f conftest2.$ac_objext && { (eval echo "$as_me:1963: \"$ac_try\"") >&5
1964   (eval $ac_try) 2>&5
1965   ac_status=$?
1966   echo "$as_me:1966: \$? = $ac_status" >&5
1967   (exit $ac_status); };
1968 then
1969   eval cf_cv_prog_CC_c_o=yes
1970 else
1971   eval cf_cv_prog_CC_c_o=no
1972 fi
1973 rm -rf conftest*
1974
1975 fi
1976 if test $cf_cv_prog_CC_c_o = yes; then
1977   echo "$as_me:1977: result: yes" >&5
1978 echo "${ECHO_T}yes" >&6
1979 else
1980   echo "$as_me:1980: result: no" >&5
1981 echo "${ECHO_T}no" >&6
1982 fi
1983
1984 echo "$as_me:1984: checking for POSIXized ISC" >&5
1985 echo $ECHO_N "checking for POSIXized ISC... $ECHO_C" >&6
1986 if test -d /etc/conf/kconfig.d &&
1987    grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
1988 then
1989   echo "$as_me:1989: result: yes" >&5
1990 echo "${ECHO_T}yes" >&6
1991   ISC=yes # If later tests want to check for ISC.
1992
1993 cat >>confdefs.h <<\EOF
1994 #define _POSIX_SOURCE 1
1995 EOF
1996
1997   if test "$GCC" = yes; then
1998     CC="$CC -posix"
1999   else
2000     CC="$CC -Xp"
2001   fi
2002 else
2003   echo "$as_me:2003: result: no" >&5
2004 echo "${ECHO_T}no" >&6
2005   ISC=
2006 fi
2007
2008 # This should have been defined by AC_PROG_CC
2009 : ${CC:=cc}
2010
2011 # Check for user's environment-breakage by stuffing CFLAGS/CPPFLAGS content
2012 # into CC.  This will not help with broken scripts that wrap the compiler with
2013 # options, but eliminates a more common category of user confusion.
2014 echo "$as_me:2014: checking \$CC variable" >&5
2015 echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
2016 case "$CC" in #(vi
2017 *[\ \   ]-[IUD]*)
2018         echo "$as_me:2018: result: broken" >&5
2019 echo "${ECHO_T}broken" >&6
2020         { echo "$as_me:2020: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
2021 echo "$as_me: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
2022         # humor him...
2023         cf_flags=`echo "$CC" | sed -e 's/^[^    ]*[     ]//'`
2024         CC=`echo "$CC" | sed -e 's/[    ].*//'`
2025
2026 cf_fix_cppflags=no
2027 cf_new_cflags=
2028 cf_new_cppflags=
2029 cf_new_extra_cppflags=
2030
2031 for cf_add_cflags in $cf_flags
2032 do
2033 case $cf_fix_cppflags in
2034 no)
2035         case $cf_add_cflags in #(vi
2036         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2037                 case $cf_add_cflags in
2038                 -D*)
2039                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2040
2041                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2042                                 && test -z "${cf_tst_cflags}" \
2043                                 && cf_fix_cppflags=yes
2044
2045                         if test $cf_fix_cppflags = yes ; then
2046                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2047                                 continue
2048                         elif test "${cf_tst_cflags}" = "\"'" ; then
2049                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2050                                 continue
2051                         fi
2052                         ;;
2053                 esac
2054                 case "$CPPFLAGS" in
2055                 *$cf_add_cflags) #(vi
2056                         ;;
2057                 *) #(vi
2058                         case $cf_add_cflags in #(vi
2059                         -D*)
2060                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2061
2062 CPPFLAGS=`echo "$CPPFLAGS" | \
2063         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2064                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2065
2066                                 ;;
2067                         esac
2068                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2069                         ;;
2070                 esac
2071                 ;;
2072         *)
2073                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2074                 ;;
2075         esac
2076         ;;
2077 yes)
2078         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2079
2080         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2081
2082         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2083                 && test -z "${cf_tst_cflags}" \
2084                 && cf_fix_cppflags=no
2085         ;;
2086 esac
2087 done
2088
2089 if test -n "$cf_new_cflags" ; then
2090
2091         CFLAGS="$CFLAGS $cf_new_cflags"
2092 fi
2093
2094 if test -n "$cf_new_cppflags" ; then
2095
2096         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
2097 fi
2098
2099 if test -n "$cf_new_extra_cppflags" ; then
2100
2101         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2102 fi
2103
2104         ;;
2105 *)
2106         echo "$as_me:2106: result: ok" >&5
2107 echo "${ECHO_T}ok" >&6
2108         ;;
2109 esac
2110
2111 echo "$as_me:2111: checking for ${CC:-cc} option to accept ANSI C" >&5
2112 echo $ECHO_N "checking for ${CC:-cc} option to accept ANSI C... $ECHO_C" >&6
2113 if test "${cf_cv_ansi_cc+set}" = set; then
2114   echo $ECHO_N "(cached) $ECHO_C" >&6
2115 else
2116
2117 cf_cv_ansi_cc=no
2118 cf_save_CFLAGS="$CFLAGS"
2119 cf_save_CPPFLAGS="$CPPFLAGS"
2120 # Don't try gcc -ansi; that turns off useful extensions and
2121 # breaks some systems' header files.
2122 # AIX                   -qlanglvl=ansi
2123 # Ultrix and OSF/1      -std1
2124 # HP-UX                 -Aa -D_HPUX_SOURCE
2125 # SVR4                  -Xc
2126 # UnixWare 1.2          (cannot use -Xc, since ANSI/POSIX clashes)
2127 for cf_arg in "-DCC_HAS_PROTOS" \
2128         "" \
2129         -qlanglvl=ansi \
2130         -std1 \
2131         -Ae \
2132         "-Aa -D_HPUX_SOURCE" \
2133         -Xc
2134 do
2135
2136 cf_fix_cppflags=no
2137 cf_new_cflags=
2138 cf_new_cppflags=
2139 cf_new_extra_cppflags=
2140
2141 for cf_add_cflags in $cf_arg
2142 do
2143 case $cf_fix_cppflags in
2144 no)
2145         case $cf_add_cflags in #(vi
2146         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2147                 case $cf_add_cflags in
2148                 -D*)
2149                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2150
2151                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2152                                 && test -z "${cf_tst_cflags}" \
2153                                 && cf_fix_cppflags=yes
2154
2155                         if test $cf_fix_cppflags = yes ; then
2156                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2157                                 continue
2158                         elif test "${cf_tst_cflags}" = "\"'" ; then
2159                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2160                                 continue
2161                         fi
2162                         ;;
2163                 esac
2164                 case "$CPPFLAGS" in
2165                 *$cf_add_cflags) #(vi
2166                         ;;
2167                 *) #(vi
2168                         case $cf_add_cflags in #(vi
2169                         -D*)
2170                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2171
2172 CPPFLAGS=`echo "$CPPFLAGS" | \
2173         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2174                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2175
2176                                 ;;
2177                         esac
2178                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2179                         ;;
2180                 esac
2181                 ;;
2182         *)
2183                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2184                 ;;
2185         esac
2186         ;;
2187 yes)
2188         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2189
2190         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2191
2192         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2193                 && test -z "${cf_tst_cflags}" \
2194                 && cf_fix_cppflags=no
2195         ;;
2196 esac
2197 done
2198
2199 if test -n "$cf_new_cflags" ; then
2200
2201         CFLAGS="$CFLAGS $cf_new_cflags"
2202 fi
2203
2204 if test -n "$cf_new_cppflags" ; then
2205
2206         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
2207 fi
2208
2209 if test -n "$cf_new_extra_cppflags" ; then
2210
2211         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2212 fi
2213
2214         cat >conftest.$ac_ext <<_ACEOF
2215 #line 2215 "configure"
2216 #include "confdefs.h"
2217
2218 #ifndef CC_HAS_PROTOS
2219 #if !defined(__STDC__) || (__STDC__ != 1)
2220 choke me
2221 #endif
2222 #endif
2223
2224 int
2225 main ()
2226 {
2227
2228         int test (int i, double x);
2229         struct s1 {int (*f) (int a);};
2230         struct s2 {int (*f) (double a);};
2231   ;
2232   return 0;
2233 }
2234 _ACEOF
2235 rm -f conftest.$ac_objext
2236 if { (eval echo "$as_me:2236: \"$ac_compile\"") >&5
2237   (eval $ac_compile) 2>&5
2238   ac_status=$?
2239   echo "$as_me:2239: \$? = $ac_status" >&5
2240   (exit $ac_status); } &&
2241          { ac_try='test -s conftest.$ac_objext'
2242   { (eval echo "$as_me:2242: \"$ac_try\"") >&5
2243   (eval $ac_try) 2>&5
2244   ac_status=$?
2245   echo "$as_me:2245: \$? = $ac_status" >&5
2246   (exit $ac_status); }; }; then
2247   cf_cv_ansi_cc="$cf_arg"; break
2248 else
2249   echo "$as_me: failed program was:" >&5
2250 cat conftest.$ac_ext >&5
2251 fi
2252 rm -f conftest.$ac_objext conftest.$ac_ext
2253 done
2254 CFLAGS="$cf_save_CFLAGS"
2255 CPPFLAGS="$cf_save_CPPFLAGS"
2256
2257 fi
2258 echo "$as_me:2258: result: $cf_cv_ansi_cc" >&5
2259 echo "${ECHO_T}$cf_cv_ansi_cc" >&6
2260
2261 if test "$cf_cv_ansi_cc" != "no"; then
2262 if test ".$cf_cv_ansi_cc" != ".-DCC_HAS_PROTOS"; then
2263
2264 cf_fix_cppflags=no
2265 cf_new_cflags=
2266 cf_new_cppflags=
2267 cf_new_extra_cppflags=
2268
2269 for cf_add_cflags in $cf_cv_ansi_cc
2270 do
2271 case $cf_fix_cppflags in
2272 no)
2273         case $cf_add_cflags in #(vi
2274         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2275                 case $cf_add_cflags in
2276                 -D*)
2277                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2278
2279                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2280                                 && test -z "${cf_tst_cflags}" \
2281                                 && cf_fix_cppflags=yes
2282
2283                         if test $cf_fix_cppflags = yes ; then
2284                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2285                                 continue
2286                         elif test "${cf_tst_cflags}" = "\"'" ; then
2287                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2288                                 continue
2289                         fi
2290                         ;;
2291                 esac
2292                 case "$CPPFLAGS" in
2293                 *$cf_add_cflags) #(vi
2294                         ;;
2295                 *) #(vi
2296                         case $cf_add_cflags in #(vi
2297                         -D*)
2298                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2299
2300 CPPFLAGS=`echo "$CPPFLAGS" | \
2301         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2302                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2303
2304                                 ;;
2305                         esac
2306                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2307                         ;;
2308                 esac
2309                 ;;
2310         *)
2311                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2312                 ;;
2313         esac
2314         ;;
2315 yes)
2316         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2317
2318         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2319
2320         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2321                 && test -z "${cf_tst_cflags}" \
2322                 && cf_fix_cppflags=no
2323         ;;
2324 esac
2325 done
2326
2327 if test -n "$cf_new_cflags" ; then
2328
2329         CFLAGS="$CFLAGS $cf_new_cflags"
2330 fi
2331
2332 if test -n "$cf_new_cppflags" ; then
2333
2334         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
2335 fi
2336
2337 if test -n "$cf_new_extra_cppflags" ; then
2338
2339         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2340 fi
2341
2342 else
2343         cat >>confdefs.h <<\EOF
2344 #define CC_HAS_PROTOS 1
2345 EOF
2346
2347 fi
2348 fi
2349
2350 if test "$cf_cv_ansi_cc" = "no"; then
2351         { { echo "$as_me:2351: error: Your compiler does not appear to recognize prototypes.
2352 You have the following choices:
2353         a. adjust your compiler options
2354         b. get an up-to-date compiler
2355         c. use a wrapper such as unproto" >&5
2356 echo "$as_me: error: Your compiler does not appear to recognize prototypes.
2357 You have the following choices:
2358         a. adjust your compiler options
2359         b. get an up-to-date compiler
2360         c. use a wrapper such as unproto" >&2;}
2361    { (exit 1); exit 1; }; }
2362 fi
2363
2364 case $cf_cv_system_name in
2365 os2*)
2366     CFLAGS="$CFLAGS -Zmt"
2367     CPPFLAGS="$CPPFLAGS -D__ST_MT_ERRNO__"
2368     CXXFLAGS="$CXXFLAGS -Zmt"
2369     # autoconf's macro sets -Zexe and suffix both, which conflict:w
2370     LDFLAGS="$LDFLAGS -Zmt -Zcrtdll"
2371     ac_cv_exeext=.exe
2372     ;;
2373 esac
2374
2375 PROG_EXT="$EXEEXT"
2376
2377 test -n "$PROG_EXT" && cat >>confdefs.h <<EOF
2378 #define PROG_EXT "$PROG_EXT"
2379 EOF
2380
2381 test "$program_prefix" != NONE &&
2382   program_transform_name="s,^,$program_prefix,;$program_transform_name"
2383 # Use a double $ so make ignores it.
2384 test "$program_suffix" != NONE &&
2385   program_transform_name="s,\$,$program_suffix,;$program_transform_name"
2386 # Double any \ or $.  echo might interpret backslashes.
2387 # By default was `s,x,x', remove it if useless.
2388 cat <<\_ACEOF >conftest.sed
2389 s/[\\$]/&&/g;s/;s,x,x,$//
2390 _ACEOF
2391 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
2392 rm conftest.sed
2393
2394 for ac_prog in mawk gawk nawk awk
2395 do
2396   # Extract the first word of "$ac_prog", so it can be a program name with args.
2397 set dummy $ac_prog; ac_word=$2
2398 echo "$as_me:2398: checking for $ac_word" >&5
2399 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2400 if test "${ac_cv_prog_AWK+set}" = set; then
2401   echo $ECHO_N "(cached) $ECHO_C" >&6
2402 else
2403   if test -n "$AWK"; then
2404   ac_cv_prog_AWK="$AWK" # Let the user override the test.
2405 else
2406   ac_save_IFS=$IFS; IFS=$ac_path_separator
2407 ac_dummy="$PATH"
2408 for ac_dir in $ac_dummy; do
2409   IFS=$ac_save_IFS
2410   test -z "$ac_dir" && ac_dir=.
2411   $as_executable_p "$ac_dir/$ac_word" || continue
2412 ac_cv_prog_AWK="$ac_prog"
2413 echo "$as_me:2413: found $ac_dir/$ac_word" >&5
2414 break
2415 done
2416
2417 fi
2418 fi
2419 AWK=$ac_cv_prog_AWK
2420 if test -n "$AWK"; then
2421   echo "$as_me:2421: result: $AWK" >&5
2422 echo "${ECHO_T}$AWK" >&6
2423 else
2424   echo "$as_me:2424: result: no" >&5
2425 echo "${ECHO_T}no" >&6
2426 fi
2427
2428   test -n "$AWK" && break
2429 done
2430
2431 test -z "$AWK" && { { echo "$as_me:2431: error: No awk program found" >&5
2432 echo "$as_me: error: No awk program found" >&2;}
2433    { (exit 1); exit 1; }; }
2434
2435 echo "$as_me:2435: checking for egrep" >&5
2436 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
2437 if test "${ac_cv_prog_egrep+set}" = set; then
2438   echo $ECHO_N "(cached) $ECHO_C" >&6
2439 else
2440   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
2441     then ac_cv_prog_egrep='grep -E'
2442     else ac_cv_prog_egrep='egrep'
2443     fi
2444 fi
2445 echo "$as_me:2445: result: $ac_cv_prog_egrep" >&5
2446 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
2447  EGREP=$ac_cv_prog_egrep
2448
2449 test -z "$EGREP" && { { echo "$as_me:2449: error: No egrep program found" >&5
2450 echo "$as_me: error: No egrep program found" >&2;}
2451    { (exit 1); exit 1; }; }
2452
2453 # Find a good install program.  We prefer a C program (faster),
2454 # so one script is as good as another.  But avoid the broken or
2455 # incompatible versions:
2456 # SysV /etc/install, /usr/sbin/install
2457 # SunOS /usr/etc/install
2458 # IRIX /sbin/install
2459 # AIX /bin/install
2460 # AmigaOS /C/install, which installs bootblocks on floppy discs
2461 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2462 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2463 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2464 # ./install, which can be erroneously created by make from ./install.sh.
2465 echo "$as_me:2465: checking for a BSD compatible install" >&5
2466 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
2467 if test -z "$INSTALL"; then
2468 if test "${ac_cv_path_install+set}" = set; then
2469   echo $ECHO_N "(cached) $ECHO_C" >&6
2470 else
2471     ac_save_IFS=$IFS; IFS=$ac_path_separator
2472   for ac_dir in $PATH; do
2473     IFS=$ac_save_IFS
2474     # Account for people who put trailing slashes in PATH elements.
2475     case $ac_dir/ in
2476     / | ./ | .// | /cC/* \
2477     | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
2478     | /usr/ucb/* ) ;;
2479     *)
2480       # OSF1 and SCO ODT 3.0 have their own names for install.
2481       # Don't use installbsd from OSF since it installs stuff as root
2482       # by default.
2483       for ac_prog in ginstall scoinst install; do
2484         if $as_executable_p "$ac_dir/$ac_prog"; then
2485           if test $ac_prog = install &&
2486             grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2487             # AIX install.  It has an incompatible calling convention.
2488             :
2489           elif test $ac_prog = install &&
2490             grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2491             # program-specific install script used by HP pwplus--don't use.
2492             :
2493           else
2494             ac_cv_path_install="$ac_dir/$ac_prog -c"
2495             break 2
2496           fi
2497         fi
2498       done
2499       ;;
2500     esac
2501   done
2502
2503 fi
2504   if test "${ac_cv_path_install+set}" = set; then
2505     INSTALL=$ac_cv_path_install
2506   else
2507     # As a last resort, use the slow shell script.  We don't cache a
2508     # path for INSTALL within a source directory, because that will
2509     # break other packages using the cache if that directory is
2510     # removed, or if the path is relative.
2511     INSTALL=$ac_install_sh
2512   fi
2513 fi
2514 echo "$as_me:2514: result: $INSTALL" >&5
2515 echo "${ECHO_T}$INSTALL" >&6
2516
2517 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2518 # It thinks the first close brace ends the variable substitution.
2519 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2520
2521 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
2522
2523 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2524
2525 echo "$as_me:2525: checking whether ln -s works" >&5
2526 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
2527 LN_S=$as_ln_s
2528 if test "$LN_S" = "ln -s"; then
2529   echo "$as_me:2529: result: yes" >&5
2530 echo "${ECHO_T}yes" >&6
2531 else
2532   echo "$as_me:2532: result: no, using $LN_S" >&5
2533 echo "${ECHO_T}no, using $LN_S" >&6
2534 fi
2535
2536 echo "$as_me:2536: checking if $LN_S -f options work" >&5
2537 echo $ECHO_N "checking if $LN_S -f options work... $ECHO_C" >&6
2538
2539 rm -f conf$$.src conf$$dst
2540 echo >conf$$.dst
2541 echo first >conf$$.src
2542 if $LN_S -f conf$$.src conf$$.dst 2>/dev/null; then
2543         cf_prog_ln_sf=yes
2544 else
2545         cf_prog_ln_sf=no
2546 fi
2547 rm -f conf$$.dst conf$$src
2548 echo "$as_me:2548: result: $cf_prog_ln_sf" >&5
2549 echo "${ECHO_T}$cf_prog_ln_sf" >&6
2550
2551 test "$cf_prog_ln_sf" = yes && LN_S="$LN_S -f"
2552
2553 echo "$as_me:2553: checking for long file names" >&5
2554 echo $ECHO_N "checking for long file names... $ECHO_C" >&6
2555 if test "${ac_cv_sys_long_file_names+set}" = set; then
2556   echo $ECHO_N "(cached) $ECHO_C" >&6
2557 else
2558   ac_cv_sys_long_file_names=yes
2559 # Test for long file names in all the places we know might matter:
2560 #      .                the current directory, where building will happen
2561 #      $prefix/lib      where we will be installing things
2562 #      $exec_prefix/lib likewise
2563 # eval it to expand exec_prefix.
2564 #      $TMPDIR          if set, where it might want to write temporary files
2565 # if $TMPDIR is not set:
2566 #      /tmp             where it might want to write temporary files
2567 #      /var/tmp         likewise
2568 #      /usr/tmp         likewise
2569 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
2570   ac_tmpdirs=$TMPDIR
2571 else
2572   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
2573 fi
2574 for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
2575   test -d $ac_dir || continue
2576   test -w $ac_dir || continue # It is less confusing to not echo anything here.
2577   ac_xdir=$ac_dir/cf$$
2578   (umask 077 && mkdir $ac_xdir 2>/dev/null) || continue
2579   ac_tf1=$ac_xdir/conftest9012345
2580   ac_tf2=$ac_xdir/conftest9012346
2581   (echo 1 >$ac_tf1) 2>/dev/null
2582   (echo 2 >$ac_tf2) 2>/dev/null
2583   ac_val=`cat $ac_tf1 2>/dev/null`
2584   if test ! -f $ac_tf1 || test "$ac_val" != 1; then
2585     ac_cv_sys_long_file_names=no
2586     rm -rf $ac_xdir 2>/dev/null
2587     break
2588   fi
2589   rm -rf $ac_xdir 2>/dev/null
2590 done
2591 fi
2592 echo "$as_me:2592: result: $ac_cv_sys_long_file_names" >&5
2593 echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
2594 if test $ac_cv_sys_long_file_names = yes; then
2595
2596 cat >>confdefs.h <<\EOF
2597 #define HAVE_LONG_FILE_NAMES 1
2598 EOF
2599
2600 fi
2601
2602 # if we find pkg-config, check if we should install the ".pc" files.
2603
2604 echo "$as_me:2604: checking if you want to use pkg-config" >&5
2605 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
2606
2607 # Check whether --with-pkg-config or --without-pkg-config was given.
2608 if test "${with_pkg_config+set}" = set; then
2609   withval="$with_pkg_config"
2610   cf_pkg_config=$withval
2611 else
2612   cf_pkg_config=yes
2613 fi;
2614 echo "$as_me:2614: result: $cf_pkg_config" >&5
2615 echo "${ECHO_T}$cf_pkg_config" >&6
2616
2617 case $cf_pkg_config in #(vi
2618 no) #(vi
2619         PKG_CONFIG=none
2620         ;;
2621 yes) #(vi
2622
2623 if test -n "$ac_tool_prefix"; then
2624   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
2625 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
2626 echo "$as_me:2626: checking for $ac_word" >&5
2627 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2628 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
2629   echo $ECHO_N "(cached) $ECHO_C" >&6
2630 else
2631   case $PKG_CONFIG in
2632   [\\/]* | ?:[\\/]*)
2633   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
2634   ;;
2635   *)
2636   ac_save_IFS=$IFS; IFS=$ac_path_separator
2637 ac_dummy="$PATH"
2638 for ac_dir in $ac_dummy; do
2639   IFS=$ac_save_IFS
2640   test -z "$ac_dir" && ac_dir=.
2641   if $as_executable_p "$ac_dir/$ac_word"; then
2642    ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
2643    echo "$as_me:2643: found $ac_dir/$ac_word" >&5
2644    break
2645 fi
2646 done
2647
2648   ;;
2649 esac
2650 fi
2651 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
2652
2653 if test -n "$PKG_CONFIG"; then
2654   echo "$as_me:2654: result: $PKG_CONFIG" >&5
2655 echo "${ECHO_T}$PKG_CONFIG" >&6
2656 else
2657   echo "$as_me:2657: result: no" >&5
2658 echo "${ECHO_T}no" >&6
2659 fi
2660
2661 fi
2662 if test -z "$ac_cv_path_PKG_CONFIG"; then
2663   ac_pt_PKG_CONFIG=$PKG_CONFIG
2664   # Extract the first word of "pkg-config", so it can be a program name with args.
2665 set dummy pkg-config; ac_word=$2
2666 echo "$as_me:2666: checking for $ac_word" >&5
2667 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2668 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
2669   echo $ECHO_N "(cached) $ECHO_C" >&6
2670 else
2671   case $ac_pt_PKG_CONFIG in
2672   [\\/]* | ?:[\\/]*)
2673   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
2674   ;;
2675   *)
2676   ac_save_IFS=$IFS; IFS=$ac_path_separator
2677 ac_dummy="$PATH"
2678 for ac_dir in $ac_dummy; do
2679   IFS=$ac_save_IFS
2680   test -z "$ac_dir" && ac_dir=.
2681   if $as_executable_p "$ac_dir/$ac_word"; then
2682    ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
2683    echo "$as_me:2683: found $ac_dir/$ac_word" >&5
2684    break
2685 fi
2686 done
2687
2688   test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
2689   ;;
2690 esac
2691 fi
2692 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
2693
2694 if test -n "$ac_pt_PKG_CONFIG"; then
2695   echo "$as_me:2695: result: $ac_pt_PKG_CONFIG" >&5
2696 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
2697 else
2698   echo "$as_me:2698: result: no" >&5
2699 echo "${ECHO_T}no" >&6
2700 fi
2701
2702   PKG_CONFIG=$ac_pt_PKG_CONFIG
2703 else
2704   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
2705 fi
2706
2707         ;;
2708 *)
2709         PKG_CONFIG=$withval
2710         ;;
2711 esac
2712
2713 test -z "$PKG_CONFIG" && PKG_CONFIG=none
2714 if test "$PKG_CONFIG" != none ; then
2715
2716 if test "x$prefix" != xNONE; then
2717   cf_path_syntax="$prefix"
2718 else
2719   cf_path_syntax="$ac_default_prefix"
2720 fi
2721
2722 case ".$PKG_CONFIG" in #(vi
2723 .\$\(*\)*|.\'*\'*) #(vi
2724   ;;
2725 ..|./*|.\\*) #(vi
2726   ;;
2727 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
2728   ;;
2729 .\${*prefix}*|.\${*dir}*) #(vi
2730   eval PKG_CONFIG="$PKG_CONFIG"
2731   case ".$PKG_CONFIG" in #(vi
2732   .NONE/*)
2733     PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
2734     ;;
2735   esac
2736   ;; #(vi
2737 .no|.NONE/*)
2738   PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
2739   ;;
2740 *)
2741   { { echo "$as_me:2741: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
2742 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
2743    { (exit 1); exit 1; }; }
2744   ;;
2745 esac
2746
2747 fi
2748
2749 if test "$PKG_CONFIG" != none ; then
2750         echo "$as_me:2750: checking for $PKG_CONFIG library directory" >&5
2751 echo $ECHO_N "checking for $PKG_CONFIG library directory... $ECHO_C" >&6
2752
2753 # Check whether --with-pkg-config-libdir or --without-pkg-config-libdir was given.
2754 if test "${with_pkg_config_libdir+set}" = set; then
2755   withval="$with_pkg_config_libdir"
2756   PKG_CONFIG_LIBDIR=$withval
2757 else
2758   PKG_CONFIG_LIBDIR=yes
2759 fi;
2760
2761         case x$PKG_CONFIG_LIBDIR in #(vi
2762         x/*) #(vi
2763                 ;;
2764         xyes) #(vi
2765                 # look for the library directory using the same prefix as the executable
2766                 cf_path=`echo "$PKG_CONFIG" | sed -e 's,/[^/]*/[^/]*$,,'`
2767                 case x`(arch) 2>/dev/null` in #(vi
2768                 *64) #(vi
2769                         for cf_config in $cf_path/share $cf_path/lib64 $cf_path/lib32 $cf_path/lib
2770                         do
2771                                 if test -d $cf_config/pkgconfig
2772                                 then
2773                                         PKG_CONFIG_LIBDIR=$cf_config/pkgconfig
2774                                         break
2775                                 fi
2776                         done
2777                         ;;
2778                 *)
2779                         PKG_CONFIG_LIBDIR=$cf_path/lib/pkgconfig
2780                         ;;
2781                 esac
2782                 ;;
2783         *)
2784                 ;;
2785         esac
2786
2787         echo "$as_me:2787: result: $PKG_CONFIG_LIBDIR" >&5
2788 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
2789 fi
2790
2791 if test "$PKG_CONFIG" != none ; then
2792         echo "$as_me:2792: checking if we should install .pc files for $PKG_CONFIG" >&5
2793 echo $ECHO_N "checking if we should install .pc files for $PKG_CONFIG... $ECHO_C" >&6
2794
2795 # Check whether --enable-pc-files or --disable-pc-files was given.
2796 if test "${enable_pc_files+set}" = set; then
2797   enableval="$enable_pc_files"
2798   enable_pc_files=$enableval
2799 else
2800   enable_pc_files=no
2801 fi;
2802         echo "$as_me:2802: result: $enable_pc_files" >&5
2803 echo "${ECHO_T}$enable_pc_files" >&6
2804         if test "$enable_pc_files" != no
2805         then
2806
2807 if test "x$prefix" != xNONE; then
2808   cf_path_syntax="$prefix"
2809 else
2810   cf_path_syntax="$ac_default_prefix"
2811 fi
2812
2813 case ".$PKG_CONFIG_LIBDIR" in #(vi
2814 .\$\(*\)*|.\'*\'*) #(vi
2815   ;;
2816 ..|./*|.\\*) #(vi
2817   ;;
2818 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
2819   ;;
2820 .\${*prefix}*|.\${*dir}*) #(vi
2821   eval PKG_CONFIG_LIBDIR="$PKG_CONFIG_LIBDIR"
2822   case ".$PKG_CONFIG_LIBDIR" in #(vi
2823   .NONE/*)
2824     PKG_CONFIG_LIBDIR=`echo $PKG_CONFIG_LIBDIR | sed -e s%NONE%$cf_path_syntax%`
2825     ;;
2826   esac
2827   ;; #(vi
2828 .no|.NONE/*)
2829   PKG_CONFIG_LIBDIR=`echo $PKG_CONFIG_LIBDIR | sed -e s%NONE%$cf_path_syntax%`
2830   ;;
2831 *)
2832   { { echo "$as_me:2832: error: expected a pathname, not \"$PKG_CONFIG_LIBDIR\"" >&5
2833 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG_LIBDIR\"" >&2;}
2834    { (exit 1); exit 1; }; }
2835   ;;
2836 esac
2837
2838         fi
2839 else
2840         enable_pc_files=no
2841 fi
2842
2843 echo "$as_me:2843: checking if you want to build test-programs" >&5
2844 echo $ECHO_N "checking if you want to build test-programs... $ECHO_C" >&6
2845
2846 # Check whether --with-tests or --without-tests was given.
2847 if test "${with_tests+set}" = set; then
2848   withval="$with_tests"
2849   cf_with_tests=$withval
2850 else
2851   cf_with_tests=yes
2852 fi;
2853 echo "$as_me:2853: result: $cf_with_tests" >&5
2854 echo "${ECHO_T}$cf_with_tests" >&6
2855
2856 echo "$as_me:2856: checking if we should assume mixed-case filenames" >&5
2857 echo $ECHO_N "checking if we should assume mixed-case filenames... $ECHO_C" >&6
2858
2859 # Check whether --enable-mixed-case or --disable-mixed-case was given.
2860 if test "${enable_mixed_case+set}" = set; then
2861   enableval="$enable_mixed_case"
2862   enable_mixedcase=$enableval
2863 else
2864   enable_mixedcase=auto
2865 fi;
2866 echo "$as_me:2866: result: $enable_mixedcase" >&5
2867 echo "${ECHO_T}$enable_mixedcase" >&6
2868 if test "$enable_mixedcase" = "auto" ; then
2869
2870 echo "$as_me:2870: checking if filesystem supports mixed-case filenames" >&5
2871 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
2872 if test "${cf_cv_mixedcase+set}" = set; then
2873   echo $ECHO_N "(cached) $ECHO_C" >&6
2874 else
2875
2876 if test "$cross_compiling" = yes ; then
2877         case $target_alias in #(vi
2878         *-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-mingw32*|*-uwin*) #(vi
2879                 cf_cv_mixedcase=no
2880                 ;;
2881         *)
2882                 cf_cv_mixedcase=yes
2883                 ;;
2884         esac
2885 else
2886         rm -f conftest CONFTEST
2887         echo test >conftest
2888         if test -f CONFTEST ; then
2889                 cf_cv_mixedcase=no
2890         else
2891                 cf_cv_mixedcase=yes
2892         fi
2893         rm -f conftest CONFTEST
2894 fi
2895
2896 fi
2897 echo "$as_me:2897: result: $cf_cv_mixedcase" >&5
2898 echo "${ECHO_T}$cf_cv_mixedcase" >&6
2899 test "$cf_cv_mixedcase" = yes && cat >>confdefs.h <<\EOF
2900 #define MIXEDCASE_FILENAMES 1
2901 EOF
2902
2903 else
2904     cf_cv_mixedcase=$enable_mixedcase
2905     if test "$enable_mixedcase" = "yes" ; then
2906         cat >>confdefs.h <<\EOF
2907 #define MIXEDCASE_FILENAMES 1
2908 EOF
2909
2910     fi
2911 fi
2912
2913 # do this after mixed-case option (tags/TAGS is not as important as tic).
2914 echo "$as_me:2914: checking whether ${MAKE-make} sets \${MAKE}" >&5
2915 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
2916 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
2917 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
2918   echo $ECHO_N "(cached) $ECHO_C" >&6
2919 else
2920   cat >conftest.make <<\EOF
2921 all:
2922         @echo 'ac_maketemp="${MAKE}"'
2923 EOF
2924 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
2925 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
2926 if test -n "$ac_maketemp"; then
2927   eval ac_cv_prog_make_${ac_make}_set=yes
2928 else
2929   eval ac_cv_prog_make_${ac_make}_set=no
2930 fi
2931 rm -f conftest.make
2932 fi
2933 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
2934   echo "$as_me:2934: result: yes" >&5
2935 echo "${ECHO_T}yes" >&6
2936   SET_MAKE=
2937 else
2938   echo "$as_me:2938: result: no" >&5
2939 echo "${ECHO_T}no" >&6
2940   SET_MAKE="MAKE=${MAKE-make}"
2941 fi
2942
2943 for ac_prog in exctags ctags
2944 do
2945   # Extract the first word of "$ac_prog", so it can be a program name with args.
2946 set dummy $ac_prog; ac_word=$2
2947 echo "$as_me:2947: checking for $ac_word" >&5
2948 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2949 if test "${ac_cv_prog_CTAGS+set}" = set; then
2950   echo $ECHO_N "(cached) $ECHO_C" >&6
2951 else
2952   if test -n "$CTAGS"; then
2953   ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
2954 else
2955   ac_save_IFS=$IFS; IFS=$ac_path_separator
2956 ac_dummy="$PATH"
2957 for ac_dir in $ac_dummy; do
2958   IFS=$ac_save_IFS
2959   test -z "$ac_dir" && ac_dir=.
2960   $as_executable_p "$ac_dir/$ac_word" || continue
2961 ac_cv_prog_CTAGS="$ac_prog"
2962 echo "$as_me:2962: found $ac_dir/$ac_word" >&5
2963 break
2964 done
2965
2966 fi
2967 fi
2968 CTAGS=$ac_cv_prog_CTAGS
2969 if test -n "$CTAGS"; then
2970   echo "$as_me:2970: result: $CTAGS" >&5
2971 echo "${ECHO_T}$CTAGS" >&6
2972 else
2973   echo "$as_me:2973: result: no" >&5
2974 echo "${ECHO_T}no" >&6
2975 fi
2976
2977   test -n "$CTAGS" && break
2978 done
2979
2980 for ac_prog in exetags etags
2981 do
2982   # Extract the first word of "$ac_prog", so it can be a program name with args.
2983 set dummy $ac_prog; ac_word=$2
2984 echo "$as_me:2984: checking for $ac_word" >&5
2985 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2986 if test "${ac_cv_prog_ETAGS+set}" = set; then
2987   echo $ECHO_N "(cached) $ECHO_C" >&6
2988 else
2989   if test -n "$ETAGS"; then
2990   ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
2991 else
2992   ac_save_IFS=$IFS; IFS=$ac_path_separator
2993 ac_dummy="$PATH"
2994 for ac_dir in $ac_dummy; do
2995   IFS=$ac_save_IFS
2996   test -z "$ac_dir" && ac_dir=.
2997   $as_executable_p "$ac_dir/$ac_word" || continue
2998 ac_cv_prog_ETAGS="$ac_prog"
2999 echo "$as_me:2999: found $ac_dir/$ac_word" >&5
3000 break
3001 done
3002
3003 fi
3004 fi
3005 ETAGS=$ac_cv_prog_ETAGS
3006 if test -n "$ETAGS"; then
3007   echo "$as_me:3007: result: $ETAGS" >&5
3008 echo "${ECHO_T}$ETAGS" >&6
3009 else
3010   echo "$as_me:3010: result: no" >&5
3011 echo "${ECHO_T}no" >&6
3012 fi
3013
3014   test -n "$ETAGS" && break
3015 done
3016
3017 # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
3018 set dummy ${CTAGS:-ctags}; ac_word=$2
3019 echo "$as_me:3019: checking for $ac_word" >&5
3020 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3021 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
3022   echo $ECHO_N "(cached) $ECHO_C" >&6
3023 else
3024   if test -n "$MAKE_LOWER_TAGS"; then
3025   ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
3026 else
3027   ac_save_IFS=$IFS; IFS=$ac_path_separator
3028 ac_dummy="$PATH"
3029 for ac_dir in $ac_dummy; do
3030   IFS=$ac_save_IFS
3031   test -z "$ac_dir" && ac_dir=.
3032   $as_executable_p "$ac_dir/$ac_word" || continue
3033 ac_cv_prog_MAKE_LOWER_TAGS="yes"
3034 echo "$as_me:3034: found $ac_dir/$ac_word" >&5
3035 break
3036 done
3037
3038   test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
3039 fi
3040 fi
3041 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
3042 if test -n "$MAKE_LOWER_TAGS"; then
3043   echo "$as_me:3043: result: $MAKE_LOWER_TAGS" >&5
3044 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
3045 else
3046   echo "$as_me:3046: result: no" >&5
3047 echo "${ECHO_T}no" >&6
3048 fi
3049
3050 if test "$cf_cv_mixedcase" = yes ; then
3051         # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
3052 set dummy ${ETAGS:-etags}; ac_word=$2
3053 echo "$as_me:3053: checking for $ac_word" >&5
3054 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3055 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
3056   echo $ECHO_N "(cached) $ECHO_C" >&6
3057 else
3058   if test -n "$MAKE_UPPER_TAGS"; then
3059   ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
3060 else
3061   ac_save_IFS=$IFS; IFS=$ac_path_separator
3062 ac_dummy="$PATH"
3063 for ac_dir in $ac_dummy; do
3064   IFS=$ac_save_IFS
3065   test -z "$ac_dir" && ac_dir=.
3066   $as_executable_p "$ac_dir/$ac_word" || continue
3067 ac_cv_prog_MAKE_UPPER_TAGS="yes"
3068 echo "$as_me:3068: found $ac_dir/$ac_word" >&5
3069 break
3070 done
3071
3072   test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
3073 fi
3074 fi
3075 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
3076 if test -n "$MAKE_UPPER_TAGS"; then
3077   echo "$as_me:3077: result: $MAKE_UPPER_TAGS" >&5
3078 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
3079 else
3080   echo "$as_me:3080: result: no" >&5
3081 echo "${ECHO_T}no" >&6
3082 fi
3083
3084 else
3085         MAKE_UPPER_TAGS=no
3086 fi
3087
3088 if test "$MAKE_UPPER_TAGS" = yes ; then
3089         MAKE_UPPER_TAGS=
3090 else
3091         MAKE_UPPER_TAGS="#"
3092 fi
3093
3094 if test "$MAKE_LOWER_TAGS" = yes ; then
3095         MAKE_LOWER_TAGS=
3096 else
3097         MAKE_LOWER_TAGS="#"
3098 fi
3099
3100 echo "$as_me:3100: checking for makeflags variable" >&5
3101 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
3102 if test "${cf_cv_makeflags+set}" = set; then
3103   echo $ECHO_N "(cached) $ECHO_C" >&6
3104 else
3105
3106         cf_cv_makeflags=''
3107         for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
3108         do
3109                 cat >cf_makeflags.tmp <<CF_EOF
3110 SHELL = /bin/sh
3111 all :
3112         @ echo '.$cf_option'
3113 CF_EOF
3114                 cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp 2>/dev/null | fgrep -v "ing directory" | sed -e 's,[    ]*$,,'`
3115                 case "$cf_result" in
3116                 .*k)
3117                         cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`
3118                         case "$cf_result" in
3119                         .*CC=*) cf_cv_makeflags=
3120                                 ;;
3121                         *)      cf_cv_makeflags=$cf_option
3122                                 ;;
3123                         esac
3124                         break
3125                         ;;
3126                 .-)     ;;
3127                 *)      echo "given option \"$cf_option\", no match \"$cf_result\""
3128                         ;;
3129                 esac
3130         done
3131         rm -f cf_makeflags.tmp
3132
3133 fi
3134 echo "$as_me:3134: result: $cf_cv_makeflags" >&5
3135 echo "${ECHO_T}$cf_cv_makeflags" >&6
3136
3137 if test -n "$ac_tool_prefix"; then
3138   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3139 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3140 echo "$as_me:3140: checking for $ac_word" >&5
3141 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3142 if test "${ac_cv_prog_RANLIB+set}" = set; then
3143   echo $ECHO_N "(cached) $ECHO_C" >&6
3144 else
3145   if test -n "$RANLIB"; then
3146   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3147 else
3148   ac_save_IFS=$IFS; IFS=$ac_path_separator
3149 ac_dummy="$PATH"
3150 for ac_dir in $ac_dummy; do
3151   IFS=$ac_save_IFS
3152   test -z "$ac_dir" && ac_dir=.
3153   $as_executable_p "$ac_dir/$ac_word" || continue
3154 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3155 echo "$as_me:3155: found $ac_dir/$ac_word" >&5
3156 break
3157 done
3158
3159 fi
3160 fi
3161 RANLIB=$ac_cv_prog_RANLIB
3162 if test -n "$RANLIB"; then
3163   echo "$as_me:3163: result: $RANLIB" >&5
3164 echo "${ECHO_T}$RANLIB" >&6
3165 else
3166   echo "$as_me:3166: result: no" >&5
3167 echo "${ECHO_T}no" >&6
3168 fi
3169
3170 fi
3171 if test -z "$ac_cv_prog_RANLIB"; then
3172   ac_ct_RANLIB=$RANLIB
3173   # Extract the first word of "ranlib", so it can be a program name with args.
3174 set dummy ranlib; ac_word=$2
3175 echo "$as_me:3175: checking for $ac_word" >&5
3176 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3177 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
3178   echo $ECHO_N "(cached) $ECHO_C" >&6
3179 else
3180   if test -n "$ac_ct_RANLIB"; then
3181   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
3182 else
3183   ac_save_IFS=$IFS; IFS=$ac_path_separator
3184 ac_dummy="$PATH"
3185 for ac_dir in $ac_dummy; do
3186   IFS=$ac_save_IFS
3187   test -z "$ac_dir" && ac_dir=.
3188   $as_executable_p "$ac_dir/$ac_word" || continue
3189 ac_cv_prog_ac_ct_RANLIB="ranlib"
3190 echo "$as_me:3190: found $ac_dir/$ac_word" >&5
3191 break
3192 done
3193
3194   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
3195 fi
3196 fi
3197 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3198 if test -n "$ac_ct_RANLIB"; then
3199   echo "$as_me:3199: result: $ac_ct_RANLIB" >&5
3200 echo "${ECHO_T}$ac_ct_RANLIB" >&6
3201 else
3202   echo "$as_me:3202: result: no" >&5
3203 echo "${ECHO_T}no" >&6
3204 fi
3205
3206   RANLIB=$ac_ct_RANLIB
3207 else
3208   RANLIB="$ac_cv_prog_RANLIB"
3209 fi
3210
3211 if test -n "$ac_tool_prefix"; then
3212   # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
3213 set dummy ${ac_tool_prefix}ld; ac_word=$2
3214 echo "$as_me:3214: checking for $ac_word" >&5
3215 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3216 if test "${ac_cv_prog_LD+set}" = set; then
3217   echo $ECHO_N "(cached) $ECHO_C" >&6
3218 else
3219   if test -n "$LD"; then
3220   ac_cv_prog_LD="$LD" # Let the user override the test.
3221 else
3222   ac_save_IFS=$IFS; IFS=$ac_path_separator
3223 ac_dummy="$PATH"
3224 for ac_dir in $ac_dummy; do
3225   IFS=$ac_save_IFS
3226   test -z "$ac_dir" && ac_dir=.
3227   $as_executable_p "$ac_dir/$ac_word" || continue
3228 ac_cv_prog_LD="${ac_tool_prefix}ld"
3229 echo "$as_me:3229: found $ac_dir/$ac_word" >&5
3230 break
3231 done
3232
3233 fi
3234 fi
3235 LD=$ac_cv_prog_LD
3236 if test -n "$LD"; then
3237   echo "$as_me:3237: result: $LD" >&5
3238 echo "${ECHO_T}$LD" >&6
3239 else
3240   echo "$as_me:3240: result: no" >&5
3241 echo "${ECHO_T}no" >&6
3242 fi
3243
3244 fi
3245 if test -z "$ac_cv_prog_LD"; then
3246   ac_ct_LD=$LD
3247   # Extract the first word of "ld", so it can be a program name with args.
3248 set dummy ld; ac_word=$2
3249 echo "$as_me:3249: checking for $ac_word" >&5
3250 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3251 if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
3252   echo $ECHO_N "(cached) $ECHO_C" >&6
3253 else
3254   if test -n "$ac_ct_LD"; then
3255   ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
3256 else
3257   ac_save_IFS=$IFS; IFS=$ac_path_separator
3258 ac_dummy="$PATH"
3259 for ac_dir in $ac_dummy; do
3260   IFS=$ac_save_IFS
3261   test -z "$ac_dir" && ac_dir=.
3262   $as_executable_p "$ac_dir/$ac_word" || continue
3263 ac_cv_prog_ac_ct_LD="ld"
3264 echo "$as_me:3264: found $ac_dir/$ac_word" >&5
3265 break
3266 done
3267
3268   test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
3269 fi
3270 fi
3271 ac_ct_LD=$ac_cv_prog_ac_ct_LD
3272 if test -n "$ac_ct_LD"; then
3273   echo "$as_me:3273: result: $ac_ct_LD" >&5
3274 echo "${ECHO_T}$ac_ct_LD" >&6
3275 else
3276   echo "$as_me:3276: result: no" >&5
3277 echo "${ECHO_T}no" >&6
3278 fi
3279
3280   LD=$ac_ct_LD
3281 else
3282   LD="$ac_cv_prog_LD"
3283 fi
3284
3285 if test -n "$ac_tool_prefix"; then
3286   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
3287 set dummy ${ac_tool_prefix}ar; ac_word=$2
3288 echo "$as_me:3288: checking for $ac_word" >&5
3289 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3290 if test "${ac_cv_prog_AR+set}" = set; then
3291   echo $ECHO_N "(cached) $ECHO_C" >&6
3292 else
3293   if test -n "$AR"; then
3294   ac_cv_prog_AR="$AR" # Let the user override the test.
3295 else
3296   ac_save_IFS=$IFS; IFS=$ac_path_separator
3297 ac_dummy="$PATH"
3298 for ac_dir in $ac_dummy; do
3299   IFS=$ac_save_IFS
3300   test -z "$ac_dir" && ac_dir=.
3301   $as_executable_p "$ac_dir/$ac_word" || continue
3302 ac_cv_prog_AR="${ac_tool_prefix}ar"
3303 echo "$as_me:3303: found $ac_dir/$ac_word" >&5
3304 break
3305 done
3306
3307 fi
3308 fi
3309 AR=$ac_cv_prog_AR
3310 if test -n "$AR"; then
3311   echo "$as_me:3311: result: $AR" >&5
3312 echo "${ECHO_T}$AR" >&6
3313 else
3314   echo "$as_me:3314: result: no" >&5
3315 echo "${ECHO_T}no" >&6
3316 fi
3317
3318 fi
3319 if test -z "$ac_cv_prog_AR"; then
3320   ac_ct_AR=$AR
3321   # Extract the first word of "ar", so it can be a program name with args.
3322 set dummy ar; ac_word=$2
3323 echo "$as_me:3323: checking for $ac_word" >&5
3324 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3325 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
3326   echo $ECHO_N "(cached) $ECHO_C" >&6
3327 else
3328   if test -n "$ac_ct_AR"; then
3329   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
3330 else
3331   ac_save_IFS=$IFS; IFS=$ac_path_separator
3332 ac_dummy="$PATH"
3333 for ac_dir in $ac_dummy; do
3334   IFS=$ac_save_IFS
3335   test -z "$ac_dir" && ac_dir=.
3336   $as_executable_p "$ac_dir/$ac_word" || continue
3337 ac_cv_prog_ac_ct_AR="ar"
3338 echo "$as_me:3338: found $ac_dir/$ac_word" >&5
3339 break
3340 done
3341
3342   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
3343 fi
3344 fi
3345 ac_ct_AR=$ac_cv_prog_ac_ct_AR
3346 if test -n "$ac_ct_AR"; then
3347   echo "$as_me:3347: result: $ac_ct_AR" >&5
3348 echo "${ECHO_T}$ac_ct_AR" >&6
3349 else
3350   echo "$as_me:3350: result: no" >&5
3351 echo "${ECHO_T}no" >&6
3352 fi
3353
3354   AR=$ac_ct_AR
3355 else
3356   AR="$ac_cv_prog_AR"
3357 fi
3358
3359 if test -n "$ac_tool_prefix"; then
3360   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
3361 set dummy ${ac_tool_prefix}ar; ac_word=$2
3362 echo "$as_me:3362: checking for $ac_word" >&5
3363 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3364 if test "${ac_cv_prog_AR+set}" = set; then
3365   echo $ECHO_N "(cached) $ECHO_C" >&6
3366 else
3367   if test -n "$AR"; then
3368   ac_cv_prog_AR="$AR" # Let the user override the test.
3369 else
3370   ac_save_IFS=$IFS; IFS=$ac_path_separator
3371 ac_dummy="$PATH"
3372 for ac_dir in $ac_dummy; do
3373   IFS=$ac_save_IFS
3374   test -z "$ac_dir" && ac_dir=.
3375   $as_executable_p "$ac_dir/$ac_word" || continue
3376 ac_cv_prog_AR="${ac_tool_prefix}ar"
3377 echo "$as_me:3377: found $ac_dir/$ac_word" >&5
3378 break
3379 done
3380
3381 fi
3382 fi
3383 AR=$ac_cv_prog_AR
3384 if test -n "$AR"; then
3385   echo "$as_me:3385: result: $AR" >&5
3386 echo "${ECHO_T}$AR" >&6
3387 else
3388   echo "$as_me:3388: result: no" >&5
3389 echo "${ECHO_T}no" >&6
3390 fi
3391
3392 fi
3393 if test -z "$ac_cv_prog_AR"; then
3394   ac_ct_AR=$AR
3395   # Extract the first word of "ar", so it can be a program name with args.
3396 set dummy ar; ac_word=$2
3397 echo "$as_me:3397: checking for $ac_word" >&5
3398 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3399 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
3400   echo $ECHO_N "(cached) $ECHO_C" >&6
3401 else
3402   if test -n "$ac_ct_AR"; then
3403   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
3404 else
3405   ac_save_IFS=$IFS; IFS=$ac_path_separator
3406 ac_dummy="$PATH"
3407 for ac_dir in $ac_dummy; do
3408   IFS=$ac_save_IFS
3409   test -z "$ac_dir" && ac_dir=.
3410   $as_executable_p "$ac_dir/$ac_word" || continue
3411 ac_cv_prog_ac_ct_AR="ar"
3412 echo "$as_me:3412: found $ac_dir/$ac_word" >&5
3413 break
3414 done
3415
3416   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
3417 fi
3418 fi
3419 ac_ct_AR=$ac_cv_prog_ac_ct_AR
3420 if test -n "$ac_ct_AR"; then
3421   echo "$as_me:3421: result: $ac_ct_AR" >&5
3422 echo "${ECHO_T}$ac_ct_AR" >&6
3423 else
3424   echo "$as_me:3424: result: no" >&5
3425 echo "${ECHO_T}no" >&6
3426 fi
3427
3428   AR=$ac_ct_AR
3429 else
3430   AR="$ac_cv_prog_AR"
3431 fi
3432
3433 echo "$as_me:3433: checking for options to update archives" >&5
3434 echo $ECHO_N "checking for options to update archives... $ECHO_C" >&6
3435 if test "${cf_cv_ar_flags+set}" = set; then
3436   echo $ECHO_N "(cached) $ECHO_C" >&6
3437 else
3438
3439         cf_cv_ar_flags=unknown
3440         for cf_ar_flags in -curv curv -crv crv -cqv cqv -rv rv
3441         do
3442
3443                 # check if $ARFLAGS already contains this choice
3444                 if test "x$ARFLAGS" != "x" ; then
3445                         cf_check_ar_flags=`echo "x$ARFLAGS" | sed -e "s/$cf_ar_flags\$//" -e "s/$cf_ar_flags / /"`
3446                         if test "x$ARFLAGS" != "$cf_check_ar_flags" ; then
3447                                 cf_cv_ar_flags=
3448                                 break
3449                         fi
3450                 fi
3451
3452                 rm -f conftest.$ac_cv_objext
3453                 rm -f conftest.a
3454
3455                 cat >conftest.$ac_ext <<EOF
3456 #line 3456 "configure"
3457 int     testdata[3] = { 123, 456, 789 };
3458 EOF
3459                 if { (eval echo "$as_me:3459: \"$ac_compile\"") >&5
3460   (eval $ac_compile) 2>&5
3461   ac_status=$?
3462   echo "$as_me:3462: \$? = $ac_status" >&5
3463   (exit $ac_status); } ; then
3464                         echo "$AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext" >&5
3465                         $AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext 2>&5 1>/dev/null
3466                         if test -f conftest.a ; then
3467                                 cf_cv_ar_flags=$cf_ar_flags
3468                                 break
3469                         fi
3470                 else
3471                         test -n "$verbose" && echo "    cannot compile test-program" 1>&6
3472
3473 echo "${as_me:-configure}:3473: testing cannot compile test-program ..." 1>&5
3474
3475                         break
3476                 fi
3477         done
3478         rm -f conftest.a conftest.$ac_ext conftest.$ac_cv_objext
3479
3480 fi
3481 echo "$as_me:3481: result: $cf_cv_ar_flags" >&5
3482 echo "${ECHO_T}$cf_cv_ar_flags" >&6
3483
3484 if test -n "$ARFLAGS" ; then
3485         if test -n "$cf_cv_ar_flags" ; then
3486                 ARFLAGS="$ARFLAGS $cf_cv_ar_flags"
3487         fi
3488 else
3489         ARFLAGS=$cf_cv_ar_flags
3490 fi
3491
3492 echo "$as_me:3492: checking if you have specified an install-prefix" >&5
3493 echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
3494
3495 # Check whether --with-install-prefix or --without-install-prefix was given.
3496 if test "${with_install_prefix+set}" = set; then
3497   withval="$with_install_prefix"
3498   case "$withval" in #(vi
3499         yes|no) #(vi
3500                 ;;
3501         *)      DESTDIR="$withval"
3502                 ;;
3503         esac
3504 fi;
3505 echo "$as_me:3505: result: $DESTDIR" >&5
3506 echo "${ECHO_T}$DESTDIR" >&6
3507
3508 ###############################################################################
3509
3510 # If we're cross-compiling, allow the user to override the tools and their
3511 # options.  The configure script is oriented toward identifying the host
3512 # compiler, etc., but we need a build compiler to generate parts of the source.
3513
3514 if test "$cross_compiling" = yes ; then
3515
3516         # defaults that we might want to override
3517         : ${BUILD_CFLAGS:=''}
3518         : ${BUILD_CPPFLAGS:=''}
3519         : ${BUILD_LDFLAGS:=''}
3520         : ${BUILD_LIBS:=''}
3521         : ${BUILD_EXEEXT:='$x'}
3522         : ${BUILD_OBJEXT:='o'}
3523
3524 # Check whether --with-build-cc or --without-build-cc was given.
3525 if test "${with_build_cc+set}" = set; then
3526   withval="$with_build_cc"
3527   BUILD_CC="$withval"
3528 else
3529   for ac_prog in gcc cc cl
3530 do
3531   # Extract the first word of "$ac_prog", so it can be a program name with args.
3532 set dummy $ac_prog; ac_word=$2
3533 echo "$as_me:3533: checking for $ac_word" >&5
3534 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3535 if test "${ac_cv_prog_BUILD_CC+set}" = set; then
3536   echo $ECHO_N "(cached) $ECHO_C" >&6
3537 else
3538   if test -n "$BUILD_CC"; then
3539   ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
3540 else
3541   ac_save_IFS=$IFS; IFS=$ac_path_separator
3542 ac_dummy="$PATH"
3543 for ac_dir in $ac_dummy; do
3544   IFS=$ac_save_IFS
3545   test -z "$ac_dir" && ac_dir=.
3546   $as_executable_p "$ac_dir/$ac_word" || continue
3547 ac_cv_prog_BUILD_CC="$ac_prog"
3548 echo "$as_me:3548: found $ac_dir/$ac_word" >&5
3549 break
3550 done
3551
3552 fi
3553 fi
3554 BUILD_CC=$ac_cv_prog_BUILD_CC
3555 if test -n "$BUILD_CC"; then
3556   echo "$as_me:3556: result: $BUILD_CC" >&5
3557 echo "${ECHO_T}$BUILD_CC" >&6
3558 else
3559   echo "$as_me:3559: result: no" >&5
3560 echo "${ECHO_T}no" >&6
3561 fi
3562
3563   test -n "$BUILD_CC" && break
3564 done
3565
3566 fi;
3567         echo "$as_me:3567: checking for native build C compiler" >&5
3568 echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
3569         echo "$as_me:3569: result: $BUILD_CC" >&5
3570 echo "${ECHO_T}$BUILD_CC" >&6
3571
3572         echo "$as_me:3572: checking for native build C preprocessor" >&5
3573 echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
3574
3575 # Check whether --with-build-cpp or --without-build-cpp was given.
3576 if test "${with_build_cpp+set}" = set; then
3577   withval="$with_build_cpp"
3578   BUILD_CPP="$withval"
3579 else
3580   BUILD_CPP='${BUILD_CC} -E'
3581 fi;
3582         echo "$as_me:3582: result: $BUILD_CPP" >&5
3583 echo "${ECHO_T}$BUILD_CPP" >&6
3584
3585         echo "$as_me:3585: checking for native build C flags" >&5
3586 echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
3587
3588 # Check whether --with-build-cflags or --without-build-cflags was given.
3589 if test "${with_build_cflags+set}" = set; then
3590   withval="$with_build_cflags"
3591   BUILD_CFLAGS="$withval"
3592 fi;
3593         echo "$as_me:3593: result: $BUILD_CFLAGS" >&5
3594 echo "${ECHO_T}$BUILD_CFLAGS" >&6
3595
3596         echo "$as_me:3596: checking for native build C preprocessor-flags" >&5
3597 echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
3598
3599 # Check whether --with-build-cppflags or --without-build-cppflags was given.
3600 if test "${with_build_cppflags+set}" = set; then
3601   withval="$with_build_cppflags"
3602   BUILD_CPPFLAGS="$withval"
3603 fi;
3604         echo "$as_me:3604: result: $BUILD_CPPFLAGS" >&5
3605 echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
3606
3607         echo "$as_me:3607: checking for native build linker-flags" >&5
3608 echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
3609
3610 # Check whether --with-build-ldflags or --without-build-ldflags was given.
3611 if test "${with_build_ldflags+set}" = set; then
3612   withval="$with_build_ldflags"
3613   BUILD_LDFLAGS="$withval"
3614 fi;
3615         echo "$as_me:3615: result: $BUILD_LDFLAGS" >&5
3616 echo "${ECHO_T}$BUILD_LDFLAGS" >&6
3617
3618         echo "$as_me:3618: checking for native build linker-libraries" >&5
3619 echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
3620
3621 # Check whether --with-build-libs or --without-build-libs was given.
3622 if test "${with_build_libs+set}" = set; then
3623   withval="$with_build_libs"
3624   BUILD_LIBS="$withval"
3625 fi;
3626         echo "$as_me:3626: result: $BUILD_LIBS" >&5
3627 echo "${ECHO_T}$BUILD_LIBS" >&6
3628
3629         # this assumes we're on Unix.
3630         BUILD_EXEEXT=
3631         BUILD_OBJEXT=o
3632
3633         : ${BUILD_CC:='${CC}'}
3634
3635         if ( test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '${CC}' ) ; then
3636                 { { echo "$as_me:3636: error: Cross-build requires two compilers.
3637 Use --with-build-cc to specify the native compiler." >&5
3638 echo "$as_me: error: Cross-build requires two compilers.
3639 Use --with-build-cc to specify the native compiler." >&2;}
3640    { (exit 1); exit 1; }; }
3641         fi
3642
3643 else
3644         : ${BUILD_CC:='${CC}'}
3645         : ${BUILD_CPP:='${CPP}'}
3646         : ${BUILD_CFLAGS:='${CFLAGS}'}
3647         : ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
3648         : ${BUILD_LDFLAGS:='${LDFLAGS}'}
3649         : ${BUILD_LIBS:='${LIBS}'}
3650         : ${BUILD_EXEEXT:='$x'}
3651         : ${BUILD_OBJEXT:='o'}
3652 fi
3653
3654 ###############################################################################
3655
3656 ### Options to allow the user to specify the set of libraries which are used.
3657 ### Use "--without-normal --with-shared" to allow the default model to be
3658 ### shared, for example.
3659 cf_list_models=""
3660
3661 echo "$as_me:3661: checking if you want to build shared C-objects" >&5
3662 echo $ECHO_N "checking if you want to build shared C-objects... $ECHO_C" >&6
3663
3664 # Check whether --with-shared or --without-shared was given.
3665 if test "${with_shared+set}" = set; then
3666   withval="$with_shared"
3667   with_shared=$withval
3668 else
3669   with_shared=no
3670 fi;
3671 echo "$as_me:3671: result: $with_shared" >&5
3672 echo "${ECHO_T}$with_shared" >&6
3673 test "$with_shared" = "yes" && cf_list_models="$cf_list_models shared"
3674
3675 echo "$as_me:3675: checking for specified models" >&5
3676 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
3677 test -z "$cf_list_models" && cf_list_models=normal
3678 echo "$as_me:3678: result: $cf_list_models" >&5
3679 echo "${ECHO_T}$cf_list_models" >&6
3680
3681 ### Use the first model as the default, and save its suffix for use in building
3682 ### up test-applications.
3683 echo "$as_me:3683: checking for default model" >&5
3684 echo $ECHO_N "checking for default model... $ECHO_C" >&6
3685 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
3686 echo "$as_me:3686: result: $DFT_LWR_MODEL" >&5
3687 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
3688
3689 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
3690
3691 echo "$as_me:3691: checking for specific curses-directory" >&5
3692 echo $ECHO_N "checking for specific curses-directory... $ECHO_C" >&6
3693
3694 # Check whether --with-curses-dir or --without-curses-dir was given.
3695 if test "${with_curses_dir+set}" = set; then
3696   withval="$with_curses_dir"
3697   cf_cv_curses_dir=$withval
3698 else
3699   cf_cv_curses_dir=no
3700 fi;
3701 echo "$as_me:3701: result: $cf_cv_curses_dir" >&5
3702 echo "${ECHO_T}$cf_cv_curses_dir" >&6
3703
3704 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
3705 then
3706
3707 if test "x$prefix" != xNONE; then
3708   cf_path_syntax="$prefix"
3709 else
3710   cf_path_syntax="$ac_default_prefix"
3711 fi
3712
3713 case ".$withval" in #(vi
3714 .\$\(*\)*|.\'*\'*) #(vi
3715   ;;
3716 ..|./*|.\\*) #(vi
3717   ;;
3718 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
3719   ;;
3720 .\${*prefix}*|.\${*dir}*) #(vi
3721   eval withval="$withval"
3722   case ".$withval" in #(vi
3723   .NONE/*)
3724     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
3725     ;;
3726   esac
3727   ;; #(vi
3728 .no|.NONE/*)
3729   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
3730   ;;
3731 *)
3732   { { echo "$as_me:3732: error: expected a pathname, not \"$withval\"" >&5
3733 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
3734    { (exit 1); exit 1; }; }
3735   ;;
3736 esac
3737
3738         if test -d "$cf_cv_curses_dir"
3739         then
3740
3741 if test -n "$cf_cv_curses_dir/include" ; then
3742   for cf_add_incdir in $cf_cv_curses_dir/include
3743   do
3744         while test $cf_add_incdir != /usr/include
3745         do
3746           if test -d $cf_add_incdir
3747           then
3748                 cf_have_incdir=no
3749                 if test -n "$CFLAGS$CPPFLAGS" ; then
3750                   # a loop is needed to ensure we can add subdirs of existing dirs
3751                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
3752                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
3753                           cf_have_incdir=yes; break
3754                         fi
3755                   done
3756                 fi
3757
3758                 if test "$cf_have_incdir" = no ; then
3759                   if test "$cf_add_incdir" = /usr/local/include ; then
3760                         if test "$GCC" = yes
3761                         then
3762                           cf_save_CPPFLAGS=$CPPFLAGS
3763                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
3764                           cat >conftest.$ac_ext <<_ACEOF
3765 #line 3765 "configure"
3766 #include "confdefs.h"
3767 #include <stdio.h>
3768 int
3769 main ()
3770 {
3771 printf("Hello")
3772   ;
3773   return 0;
3774 }
3775 _ACEOF
3776 rm -f conftest.$ac_objext
3777 if { (eval echo "$as_me:3777: \"$ac_compile\"") >&5
3778   (eval $ac_compile) 2>&5
3779   ac_status=$?
3780   echo "$as_me:3780: \$? = $ac_status" >&5
3781   (exit $ac_status); } &&
3782          { ac_try='test -s conftest.$ac_objext'
3783   { (eval echo "$as_me:3783: \"$ac_try\"") >&5
3784   (eval $ac_try) 2>&5
3785   ac_status=$?
3786   echo "$as_me:3786: \$? = $ac_status" >&5
3787   (exit $ac_status); }; }; then
3788   :
3789 else
3790   echo "$as_me: failed program was:" >&5
3791 cat conftest.$ac_ext >&5
3792 cf_have_incdir=yes
3793 fi
3794 rm -f conftest.$ac_objext conftest.$ac_ext
3795                           CPPFLAGS=$cf_save_CPPFLAGS
3796                         fi
3797                   fi
3798                 fi
3799
3800                 if test "$cf_have_incdir" = no ; then
3801                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
3802
3803 echo "${as_me:-configure}:3803: testing adding $cf_add_incdir to include-path ..." 1>&5
3804
3805                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
3806
3807                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
3808                   test "$cf_top_incdir" = "$cf_add_incdir" && break
3809                   cf_add_incdir="$cf_top_incdir"
3810                 else
3811                   break
3812                 fi
3813           fi
3814         done
3815   done
3816 fi
3817
3818 if test -n "$cf_cv_curses_dir/lib" ; then
3819   for cf_add_libdir in $cf_cv_curses_dir/lib
3820   do
3821     if test $cf_add_libdir = /usr/lib ; then
3822       :
3823     elif test -d $cf_add_libdir
3824     then
3825       cf_have_libdir=no
3826       if test -n "$LDFLAGS$LIBS" ; then
3827         # a loop is needed to ensure we can add subdirs of existing dirs
3828         for cf_test_libdir in $LDFLAGS $LIBS ; do
3829           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
3830             cf_have_libdir=yes; break
3831           fi
3832         done
3833       fi
3834       if test "$cf_have_libdir" = no ; then
3835         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
3836
3837 echo "${as_me:-configure}:3837: testing adding $cf_add_libdir to library-path ..." 1>&5
3838
3839         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
3840       fi
3841     fi
3842   done
3843 fi
3844
3845         fi
3846 fi
3847
3848 echo "$as_me:3848: checking if you want wide-character code" >&5
3849 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
3850
3851 # Check whether --enable-widec or --disable-widec was given.
3852 if test "${enable_widec+set}" = set; then
3853   enableval="$enable_widec"
3854   with_widec=$enableval
3855 else
3856   with_widec=no
3857 fi;
3858 echo "$as_me:3858: result: $with_widec" >&5
3859 echo "${ECHO_T}$with_widec" >&6
3860 if test "$with_widec" = yes ; then
3861
3862 echo "$as_me:3862: checking for multibyte character support" >&5
3863 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
3864 if test "${cf_cv_utf8_lib+set}" = set; then
3865   echo $ECHO_N "(cached) $ECHO_C" >&6
3866 else
3867
3868         cf_save_LIBS="$LIBS"
3869         cat >conftest.$ac_ext <<_ACEOF
3870 #line 3870 "configure"
3871 #include "confdefs.h"
3872
3873 #include <stdlib.h>
3874 int
3875 main ()
3876 {
3877 putwc(0,0);
3878   ;
3879   return 0;
3880 }
3881 _ACEOF
3882 rm -f conftest.$ac_objext conftest$ac_exeext
3883 if { (eval echo "$as_me:3883: \"$ac_link\"") >&5
3884   (eval $ac_link) 2>&5
3885   ac_status=$?
3886   echo "$as_me:3886: \$? = $ac_status" >&5
3887   (exit $ac_status); } &&
3888          { ac_try='test -s conftest$ac_exeext'
3889   { (eval echo "$as_me:3889: \"$ac_try\"") >&5
3890   (eval $ac_try) 2>&5
3891   ac_status=$?
3892   echo "$as_me:3892: \$? = $ac_status" >&5
3893   (exit $ac_status); }; }; then
3894   cf_cv_utf8_lib=yes
3895 else
3896   echo "$as_me: failed program was:" >&5
3897 cat conftest.$ac_ext >&5
3898
3899 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
3900 # will be set on completion of the AC_TRY_LINK below.
3901 cf_cv_header_path_utf8=
3902 cf_cv_library_path_utf8=
3903
3904 echo "${as_me:-configure}:3904: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
3905
3906 cf_save_LIBS="$LIBS"
3907
3908 cat >conftest.$ac_ext <<_ACEOF
3909 #line 3909 "configure"
3910 #include "confdefs.h"
3911
3912 #include <libutf8.h>
3913 int
3914 main ()
3915 {
3916 putwc(0,0);
3917   ;
3918   return 0;
3919 }
3920 _ACEOF
3921 rm -f conftest.$ac_objext conftest$ac_exeext
3922 if { (eval echo "$as_me:3922: \"$ac_link\"") >&5
3923   (eval $ac_link) 2>&5
3924   ac_status=$?
3925   echo "$as_me:3925: \$? = $ac_status" >&5
3926   (exit $ac_status); } &&
3927          { ac_try='test -s conftest$ac_exeext'
3928   { (eval echo "$as_me:3928: \"$ac_try\"") >&5
3929   (eval $ac_try) 2>&5
3930   ac_status=$?
3931   echo "$as_me:3931: \$? = $ac_status" >&5
3932   (exit $ac_status); }; }; then
3933
3934         cf_cv_find_linkage_utf8=yes
3935         cf_cv_header_path_utf8=/usr/include
3936         cf_cv_library_path_utf8=/usr/lib
3937
3938 else
3939   echo "$as_me: failed program was:" >&5
3940 cat conftest.$ac_ext >&5
3941
3942 LIBS="-lutf8  $cf_save_LIBS"
3943
3944 cat >conftest.$ac_ext <<_ACEOF
3945 #line 3945 "configure"
3946 #include "confdefs.h"
3947
3948 #include <libutf8.h>
3949 int
3950 main ()
3951 {
3952 putwc(0,0);
3953   ;
3954   return 0;
3955 }
3956 _ACEOF
3957 rm -f conftest.$ac_objext conftest$ac_exeext
3958 if { (eval echo "$as_me:3958: \"$ac_link\"") >&5
3959   (eval $ac_link) 2>&5
3960   ac_status=$?
3961   echo "$as_me:3961: \$? = $ac_status" >&5
3962   (exit $ac_status); } &&
3963          { ac_try='test -s conftest$ac_exeext'
3964   { (eval echo "$as_me:3964: \"$ac_try\"") >&5
3965   (eval $ac_try) 2>&5
3966   ac_status=$?
3967   echo "$as_me:3967: \$? = $ac_status" >&5
3968   (exit $ac_status); }; }; then
3969
3970         cf_cv_find_linkage_utf8=yes
3971         cf_cv_header_path_utf8=/usr/include
3972         cf_cv_library_path_utf8=/usr/lib
3973         cf_cv_library_file_utf8="-lutf8"
3974
3975 else
3976   echo "$as_me: failed program was:" >&5
3977 cat conftest.$ac_ext >&5
3978
3979         cf_cv_find_linkage_utf8=no
3980         LIBS="$cf_save_LIBS"
3981
3982     test -n "$verbose" && echo "        find linkage for utf8 library" 1>&6
3983
3984 echo "${as_me:-configure}:3984: testing find linkage for utf8 library ..." 1>&5
3985
3986 echo "${as_me:-configure}:3986: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
3987
3988     cf_save_CPPFLAGS="$CPPFLAGS"
3989     cf_test_CPPFLAGS="$CPPFLAGS"
3990
3991 cf_search=
3992
3993 # collect the current set of include-directories from compiler flags
3994 cf_header_path_list=""
3995 if test -n "${CFLAGS}${CPPFLAGS}" ; then
3996         for cf_header_path in $CPPFLAGS $CFLAGS
3997         do
3998                 case $cf_header_path in #(vi
3999                 -I*)
4000                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
4001
4002 test "$cf_header_path" != "NONE" && \
4003 test -d "$cf_header_path" && \
4004  {
4005         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
4006         test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
4007         test -d $cf_header_path/include/utf8 &&       cf_search="$cf_search $cf_header_path/include/utf8"
4008         test -d $cf_header_path/include/utf8/include &&    cf_search="$cf_search $cf_header_path/include/utf8/include"
4009         test -d $cf_header_path/utf8/include &&       cf_search="$cf_search $cf_header_path/utf8/include"
4010         test -d $cf_header_path/utf8/include/utf8 &&    cf_search="$cf_search $cf_header_path/utf8/include/utf8"
4011 }
4012
4013                         cf_header_path_list="$cf_header_path_list $cf_search"
4014                         ;;
4015                 esac
4016         done
4017 fi
4018
4019 # add the variations for the package we are looking for
4020
4021 cf_search=
4022
4023 test "/usr" != "$prefix" && \
4024 test -d "/usr" && \
4025 (test $prefix = NONE || test "/usr" != "$prefix") && {
4026         test -n "$verbose" && echo "    ... testing for include-directories under /usr"
4027         test -d /usr/include &&          cf_search="$cf_search /usr/include"
4028         test -d /usr/include/utf8 &&       cf_search="$cf_search /usr/include/utf8"
4029         test -d /usr/include/utf8/include &&    cf_search="$cf_search /usr/include/utf8/include"
4030         test -d /usr/utf8/include &&       cf_search="$cf_search /usr/utf8/include"
4031         test -d /usr/utf8/include/utf8 &&    cf_search="$cf_search /usr/utf8/include/utf8"
4032 }
4033
4034 test "$prefix" != "NONE" && \
4035 test -d "$prefix" && \
4036  {
4037         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
4038         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
4039         test -d $prefix/include/utf8 &&       cf_search="$cf_search $prefix/include/utf8"
4040         test -d $prefix/include/utf8/include &&    cf_search="$cf_search $prefix/include/utf8/include"
4041         test -d $prefix/utf8/include &&       cf_search="$cf_search $prefix/utf8/include"
4042         test -d $prefix/utf8/include/utf8 &&    cf_search="$cf_search $prefix/utf8/include/utf8"
4043 }
4044
4045 test "/usr/local" != "$prefix" && \
4046 test -d "/usr/local" && \
4047 (test $prefix = NONE || test "/usr/local" != "$prefix") && {
4048         test -n "$verbose" && echo "    ... testing for include-directories under /usr/local"
4049         test -d /usr/local/include &&          cf_search="$cf_search /usr/local/include"
4050         test -d /usr/local/include/utf8 &&       cf_search="$cf_search /usr/local/include/utf8"
4051         test -d /usr/local/include/utf8/include &&    cf_search="$cf_search /usr/local/include/utf8/include"
4052         test -d /usr/local/utf8/include &&       cf_search="$cf_search /usr/local/utf8/include"
4053         test -d /usr/local/utf8/include/utf8 &&    cf_search="$cf_search /usr/local/utf8/include/utf8"
4054 }
4055
4056 test "/opt" != "$prefix" && \
4057 test -d "/opt" && \
4058 (test $prefix = NONE || test "/opt" != "$prefix") && {
4059         test -n "$verbose" && echo "    ... testing for include-directories under /opt"
4060         test -d /opt/include &&          cf_search="$cf_search /opt/include"
4061         test -d /opt/include/utf8 &&       cf_search="$cf_search /opt/include/utf8"
4062         test -d /opt/include/utf8/include &&    cf_search="$cf_search /opt/include/utf8/include"
4063         test -d /opt/utf8/include &&       cf_search="$cf_search /opt/utf8/include"
4064         test -d /opt/utf8/include/utf8 &&    cf_search="$cf_search /opt/utf8/include/utf8"
4065 }
4066
4067 test "$HOME" != "$prefix" && \
4068 test -d "$HOME" && \
4069 (test $prefix = NONE || test "$HOME" != "$prefix") && {
4070         test -n "$verbose" && echo "    ... testing for include-directories under $HOME"
4071         test -d $HOME/include &&          cf_search="$cf_search $HOME/include"
4072         test -d $HOME/include/utf8 &&       cf_search="$cf_search $HOME/include/utf8"
4073         test -d $HOME/include/utf8/include &&    cf_search="$cf_search $HOME/include/utf8/include"
4074         test -d $HOME/utf8/include &&       cf_search="$cf_search $HOME/utf8/include"
4075         test -d $HOME/utf8/include/utf8 &&    cf_search="$cf_search $HOME/utf8/include/utf8"
4076 }
4077
4078 test "$includedir" != NONE && \
4079 test "$includedir" != "/usr/include" && \
4080 test -d "$includedir" && {
4081         test -d $includedir &&    cf_search="$cf_search $includedir"
4082         test -d $includedir/utf8 && cf_search="$cf_search $includedir/utf8"
4083 }
4084
4085 test "$oldincludedir" != NONE && \
4086 test "$oldincludedir" != "/usr/include" && \
4087 test -d "$oldincludedir" && {
4088         test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
4089         test -d $oldincludedir/utf8 && cf_search="$cf_search $oldincludedir/utf8"
4090 }
4091
4092 cf_search="$cf_search $cf_header_path_list"
4093
4094     for cf_cv_header_path_utf8 in $cf_search
4095     do
4096       if test -d $cf_cv_header_path_utf8 ; then
4097         test -n "$verbose" && echo "    ... testing $cf_cv_header_path_utf8" 1>&6
4098
4099 echo "${as_me:-configure}:4099: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
4100
4101         CPPFLAGS="$cf_save_CPPFLAGS -I$cf_cv_header_path_utf8"
4102         cat >conftest.$ac_ext <<_ACEOF
4103 #line 4103 "configure"
4104 #include "confdefs.h"
4105
4106 #include <libutf8.h>
4107 int
4108 main ()
4109 {
4110 putwc(0,0);
4111   ;
4112   return 0;
4113 }
4114 _ACEOF
4115 rm -f conftest.$ac_objext
4116 if { (eval echo "$as_me:4116: \"$ac_compile\"") >&5
4117   (eval $ac_compile) 2>&5
4118   ac_status=$?
4119   echo "$as_me:4119: \$? = $ac_status" >&5
4120   (exit $ac_status); } &&
4121          { ac_try='test -s conftest.$ac_objext'
4122   { (eval echo "$as_me:4122: \"$ac_try\"") >&5
4123   (eval $ac_try) 2>&5
4124   ac_status=$?
4125   echo "$as_me:4125: \$? = $ac_status" >&5
4126   (exit $ac_status); }; }; then
4127
4128             test -n "$verbose" && echo "        ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
4129
4130 echo "${as_me:-configure}:4130: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
4131
4132             cf_cv_find_linkage_utf8=maybe
4133             cf_test_CPPFLAGS="$CPPFLAGS"
4134             break
4135 else
4136   echo "$as_me: failed program was:" >&5
4137 cat conftest.$ac_ext >&5
4138
4139             CPPFLAGS="$cf_save_CPPFLAGS"
4140
4141 fi
4142 rm -f conftest.$ac_objext conftest.$ac_ext
4143       fi
4144     done
4145
4146     if test "$cf_cv_find_linkage_utf8" = maybe ; then
4147
4148 echo "${as_me:-configure}:4148: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
4149
4150       cf_save_LIBS="$LIBS"
4151       cf_save_LDFLAGS="$LDFLAGS"
4152
4153       if test "$cf_cv_find_linkage_utf8" != yes ; then
4154
4155 cf_search=
4156 cf_library_path_list=""
4157 if test -n "${LDFLAGS}${LIBS}" ; then
4158         for cf_library_path in $LDFLAGS $LIBS
4159         do
4160                 case $cf_library_path in #(vi
4161                 -L*)
4162                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
4163
4164 test "$cf_library_path" != "NONE" && \
4165 test -d "$cf_library_path" && \
4166  {
4167         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
4168         test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
4169         test -d $cf_library_path/lib/utf8 &&       cf_search="$cf_search $cf_library_path/lib/utf8"
4170         test -d $cf_library_path/lib/utf8/lib &&    cf_search="$cf_search $cf_library_path/lib/utf8/lib"
4171         test -d $cf_library_path/utf8/lib &&       cf_search="$cf_search $cf_library_path/utf8/lib"
4172         test -d $cf_library_path/utf8/lib/utf8 &&    cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
4173 }
4174
4175                         cf_library_path_list="$cf_library_path_list $cf_search"
4176                         ;;
4177                 esac
4178         done
4179 fi
4180
4181 cf_search=
4182
4183 test "/usr" != "$prefix" && \
4184 test -d "/usr" && \
4185 (test $prefix = NONE || test "/usr" != "$prefix") && {
4186         test -n "$verbose" && echo "    ... testing for lib-directories under /usr"
4187         test -d /usr/lib &&          cf_search="$cf_search /usr/lib"
4188         test -d /usr/lib/utf8 &&       cf_search="$cf_search /usr/lib/utf8"
4189         test -d /usr/lib/utf8/lib &&    cf_search="$cf_search /usr/lib/utf8/lib"
4190         test -d /usr/utf8/lib &&       cf_search="$cf_search /usr/utf8/lib"
4191         test -d /usr/utf8/lib/utf8 &&    cf_search="$cf_search /usr/utf8/lib/utf8"
4192 }
4193
4194 test "$prefix" != "NONE" && \
4195 test -d "$prefix" && \
4196  {
4197         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
4198         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
4199         test -d $prefix/lib/utf8 &&       cf_search="$cf_search $prefix/lib/utf8"
4200         test -d $prefix/lib/utf8/lib &&    cf_search="$cf_search $prefix/lib/utf8/lib"
4201         test -d $prefix/utf8/lib &&       cf_search="$cf_search $prefix/utf8/lib"
4202         test -d $prefix/utf8/lib/utf8 &&    cf_search="$cf_search $prefix/utf8/lib/utf8"
4203 }
4204
4205 test "/usr/local" != "$prefix" && \
4206 test -d "/usr/local" && \
4207 (test $prefix = NONE || test "/usr/local" != "$prefix") && {
4208         test -n "$verbose" && echo "    ... testing for lib-directories under /usr/local"
4209         test -d /usr/local/lib &&          cf_search="$cf_search /usr/local/lib"
4210         test -d /usr/local/lib/utf8 &&       cf_search="$cf_search /usr/local/lib/utf8"
4211         test -d /usr/local/lib/utf8/lib &&    cf_search="$cf_search /usr/local/lib/utf8/lib"
4212         test -d /usr/local/utf8/lib &&       cf_search="$cf_search /usr/local/utf8/lib"
4213         test -d /usr/local/utf8/lib/utf8 &&    cf_search="$cf_search /usr/local/utf8/lib/utf8"
4214 }
4215
4216 test "/opt" != "$prefix" && \
4217 test -d "/opt" && \
4218 (test $prefix = NONE || test "/opt" != "$prefix") && {
4219         test -n "$verbose" && echo "    ... testing for lib-directories under /opt"
4220         test -d /opt/lib &&          cf_search="$cf_search /opt/lib"
4221         test -d /opt/lib/utf8 &&       cf_search="$cf_search /opt/lib/utf8"
4222         test -d /opt/lib/utf8/lib &&    cf_search="$cf_search /opt/lib/utf8/lib"
4223         test -d /opt/utf8/lib &&       cf_search="$cf_search /opt/utf8/lib"
4224         test -d /opt/utf8/lib/utf8 &&    cf_search="$cf_search /opt/utf8/lib/utf8"
4225 }
4226
4227 test "$HOME" != "$prefix" && \
4228 test -d "$HOME" && \
4229 (test $prefix = NONE || test "$HOME" != "$prefix") && {
4230         test -n "$verbose" && echo "    ... testing for lib-directories under $HOME"
4231         test -d $HOME/lib &&          cf_search="$cf_search $HOME/lib"
4232         test -d $HOME/lib/utf8 &&       cf_search="$cf_search $HOME/lib/utf8"
4233         test -d $HOME/lib/utf8/lib &&    cf_search="$cf_search $HOME/lib/utf8/lib"
4234         test -d $HOME/utf8/lib &&       cf_search="$cf_search $HOME/utf8/lib"
4235         test -d $HOME/utf8/lib/utf8 &&    cf_search="$cf_search $HOME/utf8/lib/utf8"
4236 }
4237
4238 cf_search="$cf_library_path_list $cf_search"
4239
4240         for cf_cv_library_path_utf8 in $cf_search
4241         do
4242           if test -d $cf_cv_library_path_utf8 ; then
4243             test -n "$verbose" && echo "        ... testing $cf_cv_library_path_utf8" 1>&6
4244
4245 echo "${as_me:-configure}:4245: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
4246
4247             CPPFLAGS="$cf_test_CPPFLAGS"
4248             LIBS="-lutf8  $cf_save_LIBS"
4249             LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
4250             cat >conftest.$ac_ext <<_ACEOF
4251 #line 4251 "configure"
4252 #include "confdefs.h"
4253
4254 #include <libutf8.h>
4255 int
4256 main ()
4257 {
4258 putwc(0,0);
4259   ;
4260   return 0;
4261 }
4262 _ACEOF
4263 rm -f conftest.$ac_objext conftest$ac_exeext
4264 if { (eval echo "$as_me:4264: \"$ac_link\"") >&5
4265   (eval $ac_link) 2>&5
4266   ac_status=$?
4267   echo "$as_me:4267: \$? = $ac_status" >&5
4268   (exit $ac_status); } &&
4269          { ac_try='test -s conftest$ac_exeext'
4270   { (eval echo "$as_me:4270: \"$ac_try\"") >&5
4271   (eval $ac_try) 2>&5
4272   ac_status=$?
4273   echo "$as_me:4273: \$? = $ac_status" >&5
4274   (exit $ac_status); }; }; then
4275
4276                 test -n "$verbose" && echo "    ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
4277
4278 echo "${as_me:-configure}:4278: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
4279
4280                 cf_cv_find_linkage_utf8=yes
4281                 cf_cv_library_file_utf8="-lutf8"
4282                 break
4283 else
4284   echo "$as_me: failed program was:" >&5
4285 cat conftest.$ac_ext >&5
4286
4287                 CPPFLAGS="$cf_save_CPPFLAGS"
4288                 LIBS="$cf_save_LIBS"
4289                 LDFLAGS="$cf_save_LDFLAGS"
4290
4291 fi
4292 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4293           fi
4294         done
4295         CPPFLAGS="$cf_save_CPPFLAGS"
4296         LDFLAGS="$cf_save_LDFLAGS"
4297       fi
4298
4299     else
4300       cf_cv_find_linkage_utf8=no
4301     fi
4302
4303 fi
4304 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4305
4306 fi
4307 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4308
4309 LIBS="$cf_save_LIBS"
4310
4311 if test "$cf_cv_find_linkage_utf8" = yes ; then
4312 cf_cv_utf8_lib=add-on
4313 else
4314 cf_cv_utf8_lib=no
4315 fi
4316
4317 fi
4318 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4319 fi
4320 echo "$as_me:4320: result: $cf_cv_utf8_lib" >&5
4321 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
4322
4323 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
4324 # ncurses/ncursesw:
4325 if test "$cf_cv_utf8_lib" = "add-on" ; then
4326         cat >>confdefs.h <<\EOF
4327 #define HAVE_LIBUTF8_H 1
4328 EOF
4329
4330 if test -n "$cf_cv_header_path_utf8" ; then
4331   for cf_add_incdir in $cf_cv_header_path_utf8
4332   do
4333         while test $cf_add_incdir != /usr/include
4334         do
4335           if test -d $cf_add_incdir
4336           then
4337                 cf_have_incdir=no
4338                 if test -n "$CFLAGS$CPPFLAGS" ; then
4339                   # a loop is needed to ensure we can add subdirs of existing dirs
4340                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
4341                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
4342                           cf_have_incdir=yes; break
4343                         fi
4344                   done
4345                 fi
4346
4347                 if test "$cf_have_incdir" = no ; then
4348                   if test "$cf_add_incdir" = /usr/local/include ; then
4349                         if test "$GCC" = yes
4350                         then
4351                           cf_save_CPPFLAGS=$CPPFLAGS
4352                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4353                           cat >conftest.$ac_ext <<_ACEOF
4354 #line 4354 "configure"
4355 #include "confdefs.h"
4356 #include <stdio.h>
4357 int
4358 main ()
4359 {
4360 printf("Hello")
4361   ;
4362   return 0;
4363 }
4364 _ACEOF
4365 rm -f conftest.$ac_objext
4366 if { (eval echo "$as_me:4366: \"$ac_compile\"") >&5
4367   (eval $ac_compile) 2>&5
4368   ac_status=$?
4369   echo "$as_me:4369: \$? = $ac_status" >&5
4370   (exit $ac_status); } &&
4371          { ac_try='test -s conftest.$ac_objext'
4372   { (eval echo "$as_me:4372: \"$ac_try\"") >&5
4373   (eval $ac_try) 2>&5
4374   ac_status=$?
4375   echo "$as_me:4375: \$? = $ac_status" >&5
4376   (exit $ac_status); }; }; then
4377   :
4378 else
4379   echo "$as_me: failed program was:" >&5
4380 cat conftest.$ac_ext >&5
4381 cf_have_incdir=yes
4382 fi
4383 rm -f conftest.$ac_objext conftest.$ac_ext
4384                           CPPFLAGS=$cf_save_CPPFLAGS
4385                         fi
4386                   fi
4387                 fi
4388
4389                 if test "$cf_have_incdir" = no ; then
4390                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
4391
4392 echo "${as_me:-configure}:4392: testing adding $cf_add_incdir to include-path ..." 1>&5
4393
4394                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4395
4396                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
4397                   test "$cf_top_incdir" = "$cf_add_incdir" && break
4398                   cf_add_incdir="$cf_top_incdir"
4399                 else
4400                   break
4401                 fi
4402           fi
4403         done
4404   done
4405 fi
4406
4407 if test -n "$cf_cv_library_path_utf8" ; then
4408   for cf_add_libdir in $cf_cv_library_path_utf8
4409   do
4410     if test $cf_add_libdir = /usr/lib ; then
4411       :
4412     elif test -d $cf_add_libdir
4413     then
4414       cf_have_libdir=no
4415       if test -n "$LDFLAGS$LIBS" ; then
4416         # a loop is needed to ensure we can add subdirs of existing dirs
4417         for cf_test_libdir in $LDFLAGS $LIBS ; do
4418           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
4419             cf_have_libdir=yes; break
4420           fi
4421         done
4422       fi
4423       if test "$cf_have_libdir" = no ; then
4424         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
4425
4426 echo "${as_me:-configure}:4426: testing adding $cf_add_libdir to library-path ..." 1>&5
4427
4428         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
4429       fi
4430     fi
4431   done
4432 fi
4433
4434         LIBS="$cf_cv_library_file_utf8 $LIBS"
4435 fi
4436
4437 cf_ncuconfig_root=ncursesw
4438
4439 echo "Looking for ${cf_ncuconfig_root}-config"
4440
4441 if test -n "$ac_tool_prefix"; then
4442   for ac_prog in ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
4443   do
4444     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4445 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4446 echo "$as_me:4446: checking for $ac_word" >&5
4447 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4448 if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
4449   echo $ECHO_N "(cached) $ECHO_C" >&6
4450 else
4451   if test -n "$NCURSES_CONFIG"; then
4452   ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
4453 else
4454   ac_save_IFS=$IFS; IFS=$ac_path_separator
4455 ac_dummy="$PATH"
4456 for ac_dir in $ac_dummy; do
4457   IFS=$ac_save_IFS
4458   test -z "$ac_dir" && ac_dir=.
4459   $as_executable_p "$ac_dir/$ac_word" || continue
4460 ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
4461 echo "$as_me:4461: found $ac_dir/$ac_word" >&5
4462 break
4463 done
4464
4465 fi
4466 fi
4467 NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
4468 if test -n "$NCURSES_CONFIG"; then
4469   echo "$as_me:4469: result: $NCURSES_CONFIG" >&5
4470 echo "${ECHO_T}$NCURSES_CONFIG" >&6
4471 else
4472   echo "$as_me:4472: result: no" >&5
4473 echo "${ECHO_T}no" >&6
4474 fi
4475
4476     test -n "$NCURSES_CONFIG" && break
4477   done
4478 fi
4479 if test -z "$NCURSES_CONFIG"; then
4480   ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
4481   for ac_prog in ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
4482 do
4483   # Extract the first word of "$ac_prog", so it can be a program name with args.
4484 set dummy $ac_prog; ac_word=$2
4485 echo "$as_me:4485: checking for $ac_word" >&5
4486 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4487 if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
4488   echo $ECHO_N "(cached) $ECHO_C" >&6
4489 else
4490   if test -n "$ac_ct_NCURSES_CONFIG"; then
4491   ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
4492 else
4493   ac_save_IFS=$IFS; IFS=$ac_path_separator
4494 ac_dummy="$PATH"
4495 for ac_dir in $ac_dummy; do
4496   IFS=$ac_save_IFS
4497   test -z "$ac_dir" && ac_dir=.
4498   $as_executable_p "$ac_dir/$ac_word" || continue
4499 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
4500 echo "$as_me:4500: found $ac_dir/$ac_word" >&5
4501 break
4502 done
4503
4504 fi
4505 fi
4506 ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
4507 if test -n "$ac_ct_NCURSES_CONFIG"; then
4508   echo "$as_me:4508: result: $ac_ct_NCURSES_CONFIG" >&5
4509 echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
4510 else
4511   echo "$as_me:4511: result: no" >&5
4512 echo "${ECHO_T}no" >&6
4513 fi
4514
4515   test -n "$ac_ct_NCURSES_CONFIG" && break
4516 done
4517 test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
4518
4519   NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
4520 fi
4521
4522 if test "$NCURSES_CONFIG" != none ; then
4523
4524 CPPFLAGS="$CPPFLAGS `$NCURSES_CONFIG --cflags`"
4525 LIBS="`$NCURSES_CONFIG --libs` $LIBS"
4526
4527 # even with config script, some packages use no-override for curses.h
4528
4529 echo "$as_me:4529: checking if we have identified curses headers" >&5
4530 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
4531 if test "${cf_cv_ncurses_header+set}" = set; then
4532   echo $ECHO_N "(cached) $ECHO_C" >&6
4533 else
4534
4535 cf_cv_ncurses_header=none
4536 for cf_header in  \
4537     ncursesw/ncurses.h \
4538         ncursesw/curses.h \
4539         ncurses.h \
4540         curses.h
4541 do
4542 cat >conftest.$ac_ext <<_ACEOF
4543 #line 4543 "configure"
4544 #include "confdefs.h"
4545 #include <${cf_header}>
4546 int
4547 main ()
4548 {
4549 initscr(); tgoto("?", 0,0)
4550   ;
4551   return 0;
4552 }
4553 _ACEOF
4554 rm -f conftest.$ac_objext
4555 if { (eval echo "$as_me:4555: \"$ac_compile\"") >&5
4556   (eval $ac_compile) 2>&5
4557   ac_status=$?
4558   echo "$as_me:4558: \$? = $ac_status" >&5
4559   (exit $ac_status); } &&
4560          { ac_try='test -s conftest.$ac_objext'
4561   { (eval echo "$as_me:4561: \"$ac_try\"") >&5
4562   (eval $ac_try) 2>&5
4563   ac_status=$?
4564   echo "$as_me:4564: \$? = $ac_status" >&5
4565   (exit $ac_status); }; }; then
4566   cf_cv_ncurses_header=$cf_header; break
4567 else
4568   echo "$as_me: failed program was:" >&5
4569 cat conftest.$ac_ext >&5
4570 fi
4571 rm -f conftest.$ac_objext conftest.$ac_ext
4572 done
4573
4574 fi
4575 echo "$as_me:4575: result: $cf_cv_ncurses_header" >&5
4576 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
4577
4578 if test "$cf_cv_ncurses_header" = none ; then
4579         { { echo "$as_me:4579: error: No curses header-files found" >&5
4580 echo "$as_me: error: No curses header-files found" >&2;}
4581    { (exit 1); exit 1; }; }
4582 fi
4583
4584 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
4585
4586 for ac_header in $cf_cv_ncurses_header
4587 do
4588 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4589 echo "$as_me:4589: checking for $ac_header" >&5
4590 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4591 if eval "test \"\${$as_ac_Header+set}\" = set"; then
4592   echo $ECHO_N "(cached) $ECHO_C" >&6
4593 else
4594   cat >conftest.$ac_ext <<_ACEOF
4595 #line 4595 "configure"
4596 #include "confdefs.h"
4597 #include <$ac_header>
4598 _ACEOF
4599 if { (eval echo "$as_me:4599: \"$ac_cpp conftest.$ac_ext\"") >&5
4600   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4601   ac_status=$?
4602   egrep -v '^ *\+' conftest.er1 >conftest.err
4603   rm -f conftest.er1
4604   cat conftest.err >&5
4605   echo "$as_me:4605: \$? = $ac_status" >&5
4606   (exit $ac_status); } >/dev/null; then
4607   if test -s conftest.err; then
4608     ac_cpp_err=$ac_c_preproc_warn_flag
4609   else
4610     ac_cpp_err=
4611   fi
4612 else
4613   ac_cpp_err=yes
4614 fi
4615 if test -z "$ac_cpp_err"; then
4616   eval "$as_ac_Header=yes"
4617 else
4618   echo "$as_me: failed program was:" >&5
4619   cat conftest.$ac_ext >&5
4620   eval "$as_ac_Header=no"
4621 fi
4622 rm -f conftest.err conftest.$ac_ext
4623 fi
4624 echo "$as_me:4624: result: `eval echo '${'$as_ac_Header'}'`" >&5
4625 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4626 if test `eval echo '${'$as_ac_Header'}'` = yes; then
4627   cat >>confdefs.h <<EOF
4628 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4629 EOF
4630
4631 fi
4632 done
4633
4634 cat >>confdefs.h <<\EOF
4635 #define NCURSES 1
4636 EOF
4637
4638 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
4639
4640 cat >>confdefs.h <<EOF
4641 #define $cf_nculib_ROOT 1
4642 EOF
4643
4644 cf_cv_ncurses_version=`$NCURSES_CONFIG --version`
4645
4646 else
4647
4648 cf_ncuhdr_root=ncursesw
4649
4650 test -n "$cf_cv_curses_dir" && \
4651 test "$cf_cv_curses_dir" != "no" && { \
4652
4653 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
4654   for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
4655   do
4656         while test $cf_add_incdir != /usr/include
4657         do
4658           if test -d $cf_add_incdir
4659           then
4660                 cf_have_incdir=no
4661                 if test -n "$CFLAGS$CPPFLAGS" ; then
4662                   # a loop is needed to ensure we can add subdirs of existing dirs
4663                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
4664                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
4665                           cf_have_incdir=yes; break
4666                         fi
4667                   done
4668                 fi
4669
4670                 if test "$cf_have_incdir" = no ; then
4671                   if test "$cf_add_incdir" = /usr/local/include ; then
4672                         if test "$GCC" = yes
4673                         then
4674                           cf_save_CPPFLAGS=$CPPFLAGS
4675                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4676                           cat >conftest.$ac_ext <<_ACEOF
4677 #line 4677 "configure"
4678 #include "confdefs.h"
4679 #include <stdio.h>
4680 int
4681 main ()
4682 {
4683 printf("Hello")
4684   ;
4685   return 0;
4686 }
4687 _ACEOF
4688 rm -f conftest.$ac_objext
4689 if { (eval echo "$as_me:4689: \"$ac_compile\"") >&5
4690   (eval $ac_compile) 2>&5
4691   ac_status=$?
4692   echo "$as_me:4692: \$? = $ac_status" >&5
4693   (exit $ac_status); } &&
4694          { ac_try='test -s conftest.$ac_objext'
4695   { (eval echo "$as_me:4695: \"$ac_try\"") >&5
4696   (eval $ac_try) 2>&5
4697   ac_status=$?
4698   echo "$as_me:4698: \$? = $ac_status" >&5
4699   (exit $ac_status); }; }; then
4700   :
4701 else
4702   echo "$as_me: failed program was:" >&5
4703 cat conftest.$ac_ext >&5
4704 cf_have_incdir=yes
4705 fi
4706 rm -f conftest.$ac_objext conftest.$ac_ext
4707                           CPPFLAGS=$cf_save_CPPFLAGS
4708                         fi
4709                   fi
4710                 fi
4711
4712                 if test "$cf_have_incdir" = no ; then
4713                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
4714
4715 echo "${as_me:-configure}:4715: testing adding $cf_add_incdir to include-path ..." 1>&5
4716
4717                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4718
4719                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
4720                   test "$cf_top_incdir" = "$cf_add_incdir" && break
4721                   cf_add_incdir="$cf_top_incdir"
4722                 else
4723                   break
4724                 fi
4725           fi
4726         done
4727   done
4728 fi
4729
4730 }
4731
4732 echo "$as_me:4732: checking for $cf_ncuhdr_root header in include-path" >&5
4733 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
4734 if test "${cf_cv_ncurses_h+set}" = set; then
4735   echo $ECHO_N "(cached) $ECHO_C" >&6
4736 else
4737
4738         cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
4739         ( test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw ) && cf_header_list="$cf_header_list curses.h ncurses.h"
4740         for cf_header in $cf_header_list
4741         do
4742
4743         cat >conftest.$ac_ext <<_ACEOF
4744 #line 4744 "configure"
4745 #include "confdefs.h"
4746
4747 #define _XOPEN_SOURCE_EXTENDED
4748 #undef  HAVE_LIBUTF8_H  /* in case we used CF_UTF8_LIB */
4749 #define HAVE_LIBUTF8_H  /* to force ncurses' header file to use cchar_t */
4750
4751 #include <$cf_header>
4752 int
4753 main ()
4754 {
4755
4756 #ifdef NCURSES_VERSION
4757
4758 #ifndef WACS_BSSB
4759         make an error
4760 #endif
4761
4762 printf("%s\n", NCURSES_VERSION);
4763 #else
4764 #ifdef __NCURSES_H
4765 printf("old\n");
4766 #else
4767         make an error
4768 #endif
4769 #endif
4770
4771   ;
4772   return 0;
4773 }
4774 _ACEOF
4775 rm -f conftest.$ac_objext
4776 if { (eval echo "$as_me:4776: \"$ac_compile\"") >&5
4777   (eval $ac_compile) 2>&5
4778   ac_status=$?
4779   echo "$as_me:4779: \$? = $ac_status" >&5
4780   (exit $ac_status); } &&
4781          { ac_try='test -s conftest.$ac_objext'
4782   { (eval echo "$as_me:4782: \"$ac_try\"") >&5
4783   (eval $ac_try) 2>&5
4784   ac_status=$?
4785   echo "$as_me:4785: \$? = $ac_status" >&5
4786   (exit $ac_status); }; }; then
4787   cf_cv_ncurses_h=$cf_header
4788
4789 else
4790   echo "$as_me: failed program was:" >&5
4791 cat conftest.$ac_ext >&5
4792 cf_cv_ncurses_h=no
4793 fi
4794 rm -f conftest.$ac_objext conftest.$ac_ext
4795
4796                 test "$cf_cv_ncurses_h" != no && break
4797         done
4798
4799 fi
4800 echo "$as_me:4800: result: $cf_cv_ncurses_h" >&5
4801 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
4802
4803 if test "$cf_cv_ncurses_h" != no ; then
4804         cf_cv_ncurses_header=$cf_cv_ncurses_h
4805 else
4806
4807 echo "$as_me:4807: checking for $cf_ncuhdr_root include-path" >&5
4808 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
4809 if test "${cf_cv_ncurses_h2+set}" = set; then
4810   echo $ECHO_N "(cached) $ECHO_C" >&6
4811 else
4812
4813         test -n "$verbose" && echo
4814
4815 cf_search=
4816
4817 # collect the current set of include-directories from compiler flags
4818 cf_header_path_list=""
4819 if test -n "${CFLAGS}${CPPFLAGS}" ; then
4820         for cf_header_path in $CPPFLAGS $CFLAGS
4821         do
4822                 case $cf_header_path in #(vi
4823                 -I*)
4824                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
4825
4826 test "$cf_header_path" != "NONE" && \
4827 test -d "$cf_header_path" && \
4828  {
4829         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
4830         test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
4831         test -d $cf_header_path/include/$cf_ncuhdr_root &&       cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
4832         test -d $cf_header_path/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
4833         test -d $cf_header_path/$cf_ncuhdr_root/include &&       cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
4834         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"
4835 }
4836
4837                         cf_header_path_list="$cf_header_path_list $cf_search"
4838                         ;;
4839                 esac
4840         done
4841 fi
4842
4843 # add the variations for the package we are looking for
4844
4845 cf_search=
4846
4847 test "/usr" != "$prefix" && \
4848 test -d "/usr" && \
4849 (test $prefix = NONE || test "/usr" != "$prefix") && {
4850         test -n "$verbose" && echo "    ... testing for include-directories under /usr"
4851         test -d /usr/include &&          cf_search="$cf_search /usr/include"
4852         test -d /usr/include/$cf_ncuhdr_root &&       cf_search="$cf_search /usr/include/$cf_ncuhdr_root"
4853         test -d /usr/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search /usr/include/$cf_ncuhdr_root/include"
4854         test -d /usr/$cf_ncuhdr_root/include &&       cf_search="$cf_search /usr/$cf_ncuhdr_root/include"
4855         test -d /usr/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search /usr/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
4856 }
4857
4858 test "$prefix" != "NONE" && \
4859 test -d "$prefix" && \
4860  {
4861         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
4862         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
4863         test -d $prefix/include/$cf_ncuhdr_root &&       cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
4864         test -d $prefix/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
4865         test -d $prefix/$cf_ncuhdr_root/include &&       cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
4866         test -d $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
4867 }
4868
4869 test "/usr/local" != "$prefix" && \
4870 test -d "/usr/local" && \
4871 (test $prefix = NONE || test "/usr/local" != "$prefix") && {
4872         test -n "$verbose" && echo "    ... testing for include-directories under /usr/local"
4873         test -d /usr/local/include &&          cf_search="$cf_search /usr/local/include"
4874         test -d /usr/local/include/$cf_ncuhdr_root &&       cf_search="$cf_search /usr/local/include/$cf_ncuhdr_root"
4875         test -d /usr/local/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search /usr/local/include/$cf_ncuhdr_root/include"
4876         test -d /usr/local/$cf_ncuhdr_root/include &&       cf_search="$cf_search /usr/local/$cf_ncuhdr_root/include"
4877         test -d /usr/local/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search /usr/local/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
4878 }
4879
4880 test "/opt" != "$prefix" && \
4881 test -d "/opt" && \
4882 (test $prefix = NONE || test "/opt" != "$prefix") && {
4883         test -n "$verbose" && echo "    ... testing for include-directories under /opt"
4884         test -d /opt/include &&          cf_search="$cf_search /opt/include"
4885         test -d /opt/include/$cf_ncuhdr_root &&       cf_search="$cf_search /opt/include/$cf_ncuhdr_root"
4886         test -d /opt/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search /opt/include/$cf_ncuhdr_root/include"
4887         test -d /opt/$cf_ncuhdr_root/include &&       cf_search="$cf_search /opt/$cf_ncuhdr_root/include"
4888         test -d /opt/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search /opt/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
4889 }
4890
4891 test "$HOME" != "$prefix" && \
4892 test -d "$HOME" && \
4893 (test $prefix = NONE || test "$HOME" != "$prefix") && {
4894         test -n "$verbose" && echo "    ... testing for include-directories under $HOME"
4895         test -d $HOME/include &&          cf_search="$cf_search $HOME/include"
4896         test -d $HOME/include/$cf_ncuhdr_root &&       cf_search="$cf_search $HOME/include/$cf_ncuhdr_root"
4897         test -d $HOME/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search $HOME/include/$cf_ncuhdr_root/include"
4898         test -d $HOME/$cf_ncuhdr_root/include &&       cf_search="$cf_search $HOME/$cf_ncuhdr_root/include"
4899         test -d $HOME/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search $HOME/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
4900 }
4901
4902 test "$includedir" != NONE && \
4903 test "$includedir" != "/usr/include" && \
4904 test -d "$includedir" && {
4905         test -d $includedir &&    cf_search="$cf_search $includedir"
4906         test -d $includedir/$cf_ncuhdr_root && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
4907 }
4908
4909 test "$oldincludedir" != NONE && \
4910 test "$oldincludedir" != "/usr/include" && \
4911 test -d "$oldincludedir" && {
4912         test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
4913         test -d $oldincludedir/$cf_ncuhdr_root && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
4914 }
4915
4916 cf_search="$cf_search $cf_header_path_list"
4917
4918         test -n "$verbose" && echo search path $cf_search
4919         cf_save2_CPPFLAGS="$CPPFLAGS"
4920         for cf_incdir in $cf_search
4921         do
4922
4923 if test -n "$cf_incdir" ; then
4924   for cf_add_incdir in $cf_incdir
4925   do
4926         while test $cf_add_incdir != /usr/include
4927         do
4928           if test -d $cf_add_incdir
4929           then
4930                 cf_have_incdir=no
4931                 if test -n "$CFLAGS$CPPFLAGS" ; then
4932                   # a loop is needed to ensure we can add subdirs of existing dirs
4933                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
4934                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
4935                           cf_have_incdir=yes; break
4936                         fi
4937                   done
4938                 fi
4939
4940                 if test "$cf_have_incdir" = no ; then
4941                   if test "$cf_add_incdir" = /usr/local/include ; then
4942                         if test "$GCC" = yes
4943                         then
4944                           cf_save_CPPFLAGS=$CPPFLAGS
4945                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4946                           cat >conftest.$ac_ext <<_ACEOF
4947 #line 4947 "configure"
4948 #include "confdefs.h"
4949 #include <stdio.h>
4950 int
4951 main ()
4952 {
4953 printf("Hello")
4954   ;
4955   return 0;
4956 }
4957 _ACEOF
4958 rm -f conftest.$ac_objext
4959 if { (eval echo "$as_me:4959: \"$ac_compile\"") >&5
4960   (eval $ac_compile) 2>&5
4961   ac_status=$?
4962   echo "$as_me:4962: \$? = $ac_status" >&5
4963   (exit $ac_status); } &&
4964          { ac_try='test -s conftest.$ac_objext'
4965   { (eval echo "$as_me:4965: \"$ac_try\"") >&5
4966   (eval $ac_try) 2>&5
4967   ac_status=$?
4968   echo "$as_me:4968: \$? = $ac_status" >&5
4969   (exit $ac_status); }; }; then
4970   :
4971 else
4972   echo "$as_me: failed program was:" >&5
4973 cat conftest.$ac_ext >&5
4974 cf_have_incdir=yes
4975 fi
4976 rm -f conftest.$ac_objext conftest.$ac_ext
4977                           CPPFLAGS=$cf_save_CPPFLAGS
4978                         fi
4979                   fi
4980                 fi
4981
4982                 if test "$cf_have_incdir" = no ; then
4983                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
4984
4985 echo "${as_me:-configure}:4985: testing adding $cf_add_incdir to include-path ..." 1>&5
4986
4987                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4988
4989                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
4990                   test "$cf_top_incdir" = "$cf_add_incdir" && break
4991                   cf_add_incdir="$cf_top_incdir"
4992                 else
4993                   break
4994                 fi
4995           fi
4996         done
4997   done
4998 fi
4999
5000                 for cf_header in \
5001                         ncurses.h \
5002                         curses.h
5003                 do
5004
5005         cat >conftest.$ac_ext <<_ACEOF
5006 #line 5006 "configure"
5007 #include "confdefs.h"
5008
5009 #include <$cf_header>
5010 int
5011 main ()
5012 {
5013
5014 #ifdef NCURSES_VERSION
5015
5016 printf("%s\n", NCURSES_VERSION);
5017 #else
5018 #ifdef __NCURSES_H
5019 printf("old\n");
5020 #else
5021         make an error
5022 #endif
5023 #endif
5024
5025   ;
5026   return 0;
5027 }
5028 _ACEOF
5029 rm -f conftest.$ac_objext
5030 if { (eval echo "$as_me:5030: \"$ac_compile\"") >&5
5031   (eval $ac_compile) 2>&5
5032   ac_status=$?
5033   echo "$as_me:5033: \$? = $ac_status" >&5
5034   (exit $ac_status); } &&
5035          { ac_try='test -s conftest.$ac_objext'
5036   { (eval echo "$as_me:5036: \"$ac_try\"") >&5
5037   (eval $ac_try) 2>&5
5038   ac_status=$?
5039   echo "$as_me:5039: \$? = $ac_status" >&5
5040   (exit $ac_status); }; }; then
5041   cf_cv_ncurses_h2=$cf_header
5042
5043 else
5044   echo "$as_me: failed program was:" >&5
5045 cat conftest.$ac_ext >&5
5046 cf_cv_ncurses_h2=no
5047 fi
5048 rm -f conftest.$ac_objext conftest.$ac_ext
5049
5050                         if test "$cf_cv_ncurses_h2" != no ; then
5051                                 cf_cv_ncurses_h2=$cf_incdir/$cf_header
5052                                 test -n "$verbose" && echo $ac_n "      ... found $ac_c" 1>&6
5053                                 break
5054                         fi
5055                         test -n "$verbose" && echo "    ... tested $cf_incdir/$cf_header" 1>&6
5056                 done
5057                 CPPFLAGS="$cf_save2_CPPFLAGS"
5058                 test "$cf_cv_ncurses_h2" != no && break
5059         done
5060         test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:5060: error: not found" >&5
5061 echo "$as_me: error: not found" >&2;}
5062    { (exit 1); exit 1; }; }
5063
5064 fi
5065 echo "$as_me:5065: result: $cf_cv_ncurses_h2" >&5
5066 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
5067
5068         cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's%/[^/]*$%%'`
5069         cf_cv_ncurses_header=`basename $cf_cv_ncurses_h2`
5070         if test `basename $cf_1st_incdir` = $cf_ncuhdr_root ; then
5071                 cf_cv_ncurses_header=$cf_ncuhdr_root/$cf_cv_ncurses_header
5072         fi
5073
5074 if test -n "$cf_1st_incdir" ; then
5075   for cf_add_incdir in $cf_1st_incdir
5076   do
5077         while test $cf_add_incdir != /usr/include
5078         do
5079           if test -d $cf_add_incdir
5080           then
5081                 cf_have_incdir=no
5082                 if test -n "$CFLAGS$CPPFLAGS" ; then
5083                   # a loop is needed to ensure we can add subdirs of existing dirs
5084                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
5085                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
5086                           cf_have_incdir=yes; break
5087                         fi
5088                   done
5089                 fi
5090
5091                 if test "$cf_have_incdir" = no ; then
5092                   if test "$cf_add_incdir" = /usr/local/include ; then
5093                         if test "$GCC" = yes
5094                         then
5095                           cf_save_CPPFLAGS=$CPPFLAGS
5096                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
5097                           cat >conftest.$ac_ext <<_ACEOF
5098 #line 5098 "configure"
5099 #include "confdefs.h"
5100 #include <stdio.h>
5101 int
5102 main ()
5103 {
5104 printf("Hello")
5105   ;
5106   return 0;
5107 }
5108 _ACEOF
5109 rm -f conftest.$ac_objext
5110 if { (eval echo "$as_me:5110: \"$ac_compile\"") >&5
5111   (eval $ac_compile) 2>&5
5112   ac_status=$?
5113   echo "$as_me:5113: \$? = $ac_status" >&5
5114   (exit $ac_status); } &&
5115          { ac_try='test -s conftest.$ac_objext'
5116   { (eval echo "$as_me:5116: \"$ac_try\"") >&5
5117   (eval $ac_try) 2>&5
5118   ac_status=$?
5119   echo "$as_me:5119: \$? = $ac_status" >&5
5120   (exit $ac_status); }; }; then
5121   :
5122 else
5123   echo "$as_me: failed program was:" >&5
5124 cat conftest.$ac_ext >&5
5125 cf_have_incdir=yes
5126 fi
5127 rm -f conftest.$ac_objext conftest.$ac_ext
5128                           CPPFLAGS=$cf_save_CPPFLAGS
5129                         fi
5130                   fi
5131                 fi
5132
5133                 if test "$cf_have_incdir" = no ; then
5134                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
5135
5136 echo "${as_me:-configure}:5136: testing adding $cf_add_incdir to include-path ..." 1>&5
5137
5138                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
5139
5140                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
5141                   test "$cf_top_incdir" = "$cf_add_incdir" && break
5142                   cf_add_incdir="$cf_top_incdir"
5143                 else
5144                   break
5145                 fi
5146           fi
5147         done
5148   done
5149 fi
5150
5151 fi
5152
5153 # Set definitions to allow ifdef'ing for ncurses.h
5154
5155 case $cf_cv_ncurses_header in # (vi
5156 *ncurses.h)
5157         cat >>confdefs.h <<\EOF
5158 #define HAVE_NCURSES_H 1
5159 EOF
5160
5161         ;;
5162 esac
5163
5164 case $cf_cv_ncurses_header in # (vi
5165 ncurses/curses.h|ncurses/ncurses.h)
5166         cat >>confdefs.h <<\EOF
5167 #define HAVE_NCURSES_NCURSES_H 1
5168 EOF
5169
5170         ;;
5171 ncursesw/curses.h|ncursesw/ncurses.h)
5172         cat >>confdefs.h <<\EOF
5173 #define HAVE_NCURSESW_NCURSES_H 1
5174 EOF
5175
5176         ;;
5177 esac
5178
5179 echo "$as_me:5179: checking for terminfo header" >&5
5180 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
5181 if test "${cf_cv_term_header+set}" = set; then
5182   echo $ECHO_N "(cached) $ECHO_C" >&6
5183 else
5184
5185 case ${cf_cv_ncurses_header} in #(vi
5186 */ncurses.h|*/ncursesw.h) #(vi
5187         cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
5188         ;;
5189 *)
5190         cf_term_header=term.h
5191         ;;
5192 esac
5193
5194 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
5195 do
5196 cat >conftest.$ac_ext <<_ACEOF
5197 #line 5197 "configure"
5198 #include "confdefs.h"
5199 #include <stdio.h>
5200 #include <${cf_cv_ncurses_header:-curses.h}>
5201 #include <$cf_test>
5202
5203 int
5204 main ()
5205 {
5206 int x = auto_left_margin
5207   ;
5208   return 0;
5209 }
5210 _ACEOF
5211 rm -f conftest.$ac_objext
5212 if { (eval echo "$as_me:5212: \"$ac_compile\"") >&5
5213   (eval $ac_compile) 2>&5
5214   ac_status=$?
5215   echo "$as_me:5215: \$? = $ac_status" >&5
5216   (exit $ac_status); } &&
5217          { ac_try='test -s conftest.$ac_objext'
5218   { (eval echo "$as_me:5218: \"$ac_try\"") >&5
5219   (eval $ac_try) 2>&5
5220   ac_status=$?
5221   echo "$as_me:5221: \$? = $ac_status" >&5
5222   (exit $ac_status); }; }; then
5223
5224         cf_cv_term_header="$cf_test"
5225 else
5226   echo "$as_me: failed program was:" >&5
5227 cat conftest.$ac_ext >&5
5228
5229         cf_cv_term_header=unknown
5230
5231 fi
5232 rm -f conftest.$ac_objext conftest.$ac_ext
5233         test "$cf_cv_term_header" != unknown && break
5234 done
5235
5236 fi
5237 echo "$as_me:5237: result: $cf_cv_term_header" >&5
5238 echo "${ECHO_T}$cf_cv_term_header" >&6
5239
5240 # Set definitions to allow ifdef'ing to accommodate subdirectories
5241
5242 case $cf_cv_term_header in # (vi
5243 *term.h)
5244         cat >>confdefs.h <<\EOF
5245 #define HAVE_TERM_H 1
5246 EOF
5247
5248         ;;
5249 esac
5250
5251 case $cf_cv_term_header in # (vi
5252 ncurses/term.h) #(vi
5253         cat >>confdefs.h <<\EOF
5254 #define HAVE_NCURSES_TERM_H 1
5255 EOF
5256
5257         ;;
5258 ncursesw/term.h)
5259         cat >>confdefs.h <<\EOF
5260 #define HAVE_NCURSESW_TERM_H 1
5261 EOF
5262
5263         ;;
5264 esac
5265
5266 # some applications need this, but should check for NCURSES_VERSION
5267 cat >>confdefs.h <<\EOF
5268 #define NCURSES 1
5269 EOF
5270
5271 echo "$as_me:5271: checking for ncurses version" >&5
5272 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
5273 if test "${cf_cv_ncurses_version+set}" = set; then
5274   echo $ECHO_N "(cached) $ECHO_C" >&6
5275 else
5276
5277         cf_cv_ncurses_version=no
5278         cf_tempfile=out$$
5279         rm -f $cf_tempfile
5280         if test "$cross_compiling" = yes; then
5281
5282         # This will not work if the preprocessor splits the line after the
5283         # Autoconf token.  The 'unproto' program does that.
5284         cat > conftest.$ac_ext <<EOF
5285 #include <${cf_cv_ncurses_header:-curses.h}>
5286 #undef Autoconf
5287 #ifdef NCURSES_VERSION
5288 Autoconf NCURSES_VERSION
5289 #else
5290 #ifdef __NCURSES_H
5291 Autoconf "old"
5292 #endif
5293 ;
5294 #endif
5295 EOF
5296         cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
5297         { (eval echo "$as_me:5297: \"$cf_try\"") >&5
5298   (eval $cf_try) 2>&5
5299   ac_status=$?
5300   echo "$as_me:5300: \$? = $ac_status" >&5
5301   (exit $ac_status); }
5302         if test -f conftest.out ; then
5303                 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
5304                 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
5305                 rm -f conftest.out
5306         fi
5307
5308 else
5309   cat >conftest.$ac_ext <<_ACEOF
5310 #line 5310 "configure"
5311 #include "confdefs.h"
5312
5313 #include <${cf_cv_ncurses_header:-curses.h}>
5314 #include <stdio.h>
5315 int main()
5316 {
5317         FILE *fp = fopen("$cf_tempfile", "w");
5318 #ifdef NCURSES_VERSION
5319 # ifdef NCURSES_VERSION_PATCH
5320         fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
5321 # else
5322         fprintf(fp, "%s\n", NCURSES_VERSION);
5323 # endif
5324 #else
5325 # ifdef __NCURSES_H
5326         fprintf(fp, "old\n");
5327 # else
5328         make an error
5329 # endif
5330 #endif
5331         ${cf_cv_main_return:-return}(0);
5332 }
5333 _ACEOF
5334 rm -f conftest$ac_exeext
5335 if { (eval echo "$as_me:5335: \"$ac_link\"") >&5
5336   (eval $ac_link) 2>&5
5337   ac_status=$?
5338   echo "$as_me:5338: \$? = $ac_status" >&5
5339   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5340   { (eval echo "$as_me:5340: \"$ac_try\"") >&5
5341   (eval $ac_try) 2>&5
5342   ac_status=$?
5343   echo "$as_me:5343: \$? = $ac_status" >&5
5344   (exit $ac_status); }; }; then
5345
5346         cf_cv_ncurses_version=`cat $cf_tempfile`
5347 else
5348   echo "$as_me: program exited with status $ac_status" >&5
5349 echo "$as_me: failed program was:" >&5
5350 cat conftest.$ac_ext >&5
5351 fi
5352 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5353 fi
5354         rm -f $cf_tempfile
5355
5356 fi
5357 echo "$as_me:5357: result: $cf_cv_ncurses_version" >&5
5358 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
5359 test "$cf_cv_ncurses_version" = no || cat >>confdefs.h <<\EOF
5360 #define NCURSES 1
5361 EOF
5362
5363 cf_nculib_root=ncursesw
5364         # This works, except for the special case where we find gpm, but
5365         # ncurses is in a nonstandard location via $LIBS, and we really want
5366         # to link gpm.
5367 cf_ncurses_LIBS=""
5368 cf_ncurses_SAVE="$LIBS"
5369 echo "$as_me:5369: checking for Gpm_Open in -lgpm" >&5
5370 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
5371 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
5372   echo $ECHO_N "(cached) $ECHO_C" >&6
5373 else
5374   ac_check_lib_save_LIBS=$LIBS
5375 LIBS="-lgpm  $LIBS"
5376 cat >conftest.$ac_ext <<_ACEOF
5377 #line 5377 "configure"
5378 #include "confdefs.h"
5379
5380 /* Override any gcc2 internal prototype to avoid an error.  */
5381 #ifdef __cplusplus
5382 extern "C"
5383 #endif
5384 /* We use char because int might match the return type of a gcc2
5385    builtin and then its argument prototype would still apply.  */
5386 char Gpm_Open ();
5387 int
5388 main ()
5389 {
5390 Gpm_Open ();
5391   ;
5392   return 0;
5393 }
5394 _ACEOF
5395 rm -f conftest.$ac_objext conftest$ac_exeext
5396 if { (eval echo "$as_me:5396: \"$ac_link\"") >&5
5397   (eval $ac_link) 2>&5
5398   ac_status=$?
5399   echo "$as_me:5399: \$? = $ac_status" >&5
5400   (exit $ac_status); } &&
5401          { ac_try='test -s conftest$ac_exeext'
5402   { (eval echo "$as_me:5402: \"$ac_try\"") >&5
5403   (eval $ac_try) 2>&5
5404   ac_status=$?
5405   echo "$as_me:5405: \$? = $ac_status" >&5
5406   (exit $ac_status); }; }; then
5407   ac_cv_lib_gpm_Gpm_Open=yes
5408 else
5409   echo "$as_me: failed program was:" >&5
5410 cat conftest.$ac_ext >&5
5411 ac_cv_lib_gpm_Gpm_Open=no
5412 fi
5413 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5414 LIBS=$ac_check_lib_save_LIBS
5415 fi
5416 echo "$as_me:5416: result: $ac_cv_lib_gpm_Gpm_Open" >&5
5417 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
5418 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
5419   echo "$as_me:5419: checking for initscr in -lgpm" >&5
5420 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
5421 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
5422   echo $ECHO_N "(cached) $ECHO_C" >&6
5423 else
5424   ac_check_lib_save_LIBS=$LIBS
5425 LIBS="-lgpm  $LIBS"
5426 cat >conftest.$ac_ext <<_ACEOF
5427 #line 5427 "configure"
5428 #include "confdefs.h"
5429
5430 /* Override any gcc2 internal prototype to avoid an error.  */
5431 #ifdef __cplusplus
5432 extern "C"
5433 #endif
5434 /* We use char because int might match the return type of a gcc2
5435    builtin and then its argument prototype would still apply.  */
5436 char initscr ();
5437 int
5438 main ()
5439 {
5440 initscr ();
5441   ;
5442   return 0;
5443 }
5444 _ACEOF
5445 rm -f conftest.$ac_objext conftest$ac_exeext
5446 if { (eval echo "$as_me:5446: \"$ac_link\"") >&5
5447   (eval $ac_link) 2>&5
5448   ac_status=$?
5449   echo "$as_me:5449: \$? = $ac_status" >&5
5450   (exit $ac_status); } &&
5451          { ac_try='test -s conftest$ac_exeext'
5452   { (eval echo "$as_me:5452: \"$ac_try\"") >&5
5453   (eval $ac_try) 2>&5
5454   ac_status=$?
5455   echo "$as_me:5455: \$? = $ac_status" >&5
5456   (exit $ac_status); }; }; then
5457   ac_cv_lib_gpm_initscr=yes
5458 else
5459   echo "$as_me: failed program was:" >&5
5460 cat conftest.$ac_ext >&5
5461 ac_cv_lib_gpm_initscr=no
5462 fi
5463 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5464 LIBS=$ac_check_lib_save_LIBS
5465 fi
5466 echo "$as_me:5466: result: $ac_cv_lib_gpm_initscr" >&5
5467 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
5468 if test $ac_cv_lib_gpm_initscr = yes; then
5469   LIBS="$cf_ncurses_SAVE"
5470 else
5471   cf_ncurses_LIBS="-lgpm"
5472 fi
5473
5474 fi
5475
5476 case $host_os in #(vi
5477 freebsd*)
5478         # This is only necessary if you are linking against an obsolete
5479         # version of ncurses (but it should do no harm, since it's static).
5480         if test "$cf_nculib_root" = ncurses ; then
5481                 echo "$as_me:5481: checking for tgoto in -lmytinfo" >&5
5482 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
5483 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
5484   echo $ECHO_N "(cached) $ECHO_C" >&6
5485 else
5486   ac_check_lib_save_LIBS=$LIBS
5487 LIBS="-lmytinfo  $LIBS"
5488 cat >conftest.$ac_ext <<_ACEOF
5489 #line 5489 "configure"
5490 #include "confdefs.h"
5491
5492 /* Override any gcc2 internal prototype to avoid an error.  */
5493 #ifdef __cplusplus
5494 extern "C"
5495 #endif
5496 /* We use char because int might match the return type of a gcc2
5497    builtin and then its argument prototype would still apply.  */
5498 char tgoto ();
5499 int
5500 main ()
5501 {
5502 tgoto ();
5503   ;
5504   return 0;
5505 }
5506 _ACEOF
5507 rm -f conftest.$ac_objext conftest$ac_exeext
5508 if { (eval echo "$as_me:5508: \"$ac_link\"") >&5
5509   (eval $ac_link) 2>&5
5510   ac_status=$?
5511   echo "$as_me:5511: \$? = $ac_status" >&5
5512   (exit $ac_status); } &&
5513          { ac_try='test -s conftest$ac_exeext'
5514   { (eval echo "$as_me:5514: \"$ac_try\"") >&5
5515   (eval $ac_try) 2>&5
5516   ac_status=$?
5517   echo "$as_me:5517: \$? = $ac_status" >&5
5518   (exit $ac_status); }; }; then
5519   ac_cv_lib_mytinfo_tgoto=yes
5520 else
5521   echo "$as_me: failed program was:" >&5
5522 cat conftest.$ac_ext >&5
5523 ac_cv_lib_mytinfo_tgoto=no
5524 fi
5525 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5526 LIBS=$ac_check_lib_save_LIBS
5527 fi
5528 echo "$as_me:5528: result: $ac_cv_lib_mytinfo_tgoto" >&5
5529 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
5530 if test $ac_cv_lib_mytinfo_tgoto = yes; then
5531   cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
5532 fi
5533
5534         fi
5535         ;;
5536 esac
5537
5538 LIBS="$cf_ncurses_LIBS $LIBS"
5539
5540 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
5541 then
5542         LIBS="-l$cf_nculib_root $LIBS"
5543 else
5544
5545         eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
5546         cf_libdir=""
5547         echo "$as_me:5547: checking for initscr" >&5
5548 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
5549 if test "${ac_cv_func_initscr+set}" = set; then
5550   echo $ECHO_N "(cached) $ECHO_C" >&6
5551 else
5552   cat >conftest.$ac_ext <<_ACEOF
5553 #line 5553 "configure"
5554 #include "confdefs.h"
5555 /* System header to define __stub macros and hopefully few prototypes,
5556     which can conflict with char initscr (); below.  */
5557 #include <assert.h>
5558 /* Override any gcc2 internal prototype to avoid an error.  */
5559 #ifdef __cplusplus
5560 extern "C"
5561 #endif
5562 /* We use char because int might match the return type of a gcc2
5563    builtin and then its argument prototype would still apply.  */
5564 char initscr ();
5565 char (*f) ();
5566
5567 int
5568 main ()
5569 {
5570 /* The GNU C library defines this for functions which it implements
5571     to always fail with ENOSYS.  Some functions are actually named
5572     something starting with __ and the normal name is an alias.  */
5573 #if defined (__stub_initscr) || defined (__stub___initscr)
5574 choke me
5575 #else
5576 f = initscr; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
5577 #endif
5578
5579   ;
5580   return 0;
5581 }
5582 _ACEOF
5583 rm -f conftest.$ac_objext conftest$ac_exeext
5584 if { (eval echo "$as_me:5584: \"$ac_link\"") >&5
5585   (eval $ac_link) 2>&5
5586   ac_status=$?
5587   echo "$as_me:5587: \$? = $ac_status" >&5
5588   (exit $ac_status); } &&
5589          { ac_try='test -s conftest$ac_exeext'
5590   { (eval echo "$as_me:5590: \"$ac_try\"") >&5
5591   (eval $ac_try) 2>&5
5592   ac_status=$?
5593   echo "$as_me:5593: \$? = $ac_status" >&5
5594   (exit $ac_status); }; }; then
5595   ac_cv_func_initscr=yes
5596 else
5597   echo "$as_me: failed program was:" >&5
5598 cat conftest.$ac_ext >&5
5599 ac_cv_func_initscr=no
5600 fi
5601 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5602 fi
5603 echo "$as_me:5603: result: $ac_cv_func_initscr" >&5
5604 echo "${ECHO_T}$ac_cv_func_initscr" >&6
5605 if test $ac_cv_func_initscr = yes; then
5606   eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
5607 else
5608
5609                 cf_save_LIBS="$LIBS"
5610                 echo "$as_me:5610: checking for initscr in -l$cf_nculib_root" >&5
5611 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
5612                 LIBS="-l$cf_nculib_root $LIBS"
5613                 cat >conftest.$ac_ext <<_ACEOF
5614 #line 5614 "configure"
5615 #include "confdefs.h"
5616 #include <${cf_cv_ncurses_header:-curses.h}>
5617 int
5618 main ()
5619 {
5620 initscr()
5621   ;
5622   return 0;
5623 }
5624 _ACEOF
5625 rm -f conftest.$ac_objext conftest$ac_exeext
5626 if { (eval echo "$as_me:5626: \"$ac_link\"") >&5
5627   (eval $ac_link) 2>&5
5628   ac_status=$?
5629   echo "$as_me:5629: \$? = $ac_status" >&5
5630   (exit $ac_status); } &&
5631          { ac_try='test -s conftest$ac_exeext'
5632   { (eval echo "$as_me:5632: \"$ac_try\"") >&5
5633   (eval $ac_try) 2>&5
5634   ac_status=$?
5635   echo "$as_me:5635: \$? = $ac_status" >&5
5636   (exit $ac_status); }; }; then
5637   echo "$as_me:5637: result: yes" >&5
5638 echo "${ECHO_T}yes" >&6
5639                          eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
5640
5641 else
5642   echo "$as_me: failed program was:" >&5
5643 cat conftest.$ac_ext >&5
5644 echo "$as_me:5644: result: no" >&5
5645 echo "${ECHO_T}no" >&6
5646
5647 cf_search=
5648 cf_library_path_list=""
5649 if test -n "${LDFLAGS}${LIBS}" ; then
5650         for cf_library_path in $LDFLAGS $LIBS
5651         do
5652                 case $cf_library_path in #(vi
5653                 -L*)
5654                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
5655
5656 test "$cf_library_path" != "NONE" && \
5657 test -d "$cf_library_path" && \
5658  {
5659         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
5660         test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
5661         test -d $cf_library_path/lib/$cf_nculib_root &&       cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
5662         test -d $cf_library_path/lib/$cf_nculib_root/lib &&    cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
5663         test -d $cf_library_path/$cf_nculib_root/lib &&       cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
5664         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"
5665 }
5666
5667                         cf_library_path_list="$cf_library_path_list $cf_search"
5668                         ;;
5669                 esac
5670         done
5671 fi
5672
5673 cf_search=
5674
5675 test "/usr" != "$prefix" && \
5676 test -d "/usr" && \
5677 (test $prefix = NONE || test "/usr" != "$prefix") && {
5678         test -n "$verbose" && echo "    ... testing for lib-directories under /usr"
5679         test -d /usr/lib &&          cf_search="$cf_search /usr/lib"
5680         test -d /usr/lib/$cf_nculib_root &&       cf_search="$cf_search /usr/lib/$cf_nculib_root"
5681         test -d /usr/lib/$cf_nculib_root/lib &&    cf_search="$cf_search /usr/lib/$cf_nculib_root/lib"
5682         test -d /usr/$cf_nculib_root/lib &&       cf_search="$cf_search /usr/$cf_nculib_root/lib"
5683         test -d /usr/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search /usr/$cf_nculib_root/lib/$cf_nculib_root"
5684 }
5685
5686 test "$prefix" != "NONE" && \
5687 test -d "$prefix" && \
5688  {
5689         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
5690         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
5691         test -d $prefix/lib/$cf_nculib_root &&       cf_search="$cf_search $prefix/lib/$cf_nculib_root"
5692         test -d $prefix/lib/$cf_nculib_root/lib &&    cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
5693         test -d $prefix/$cf_nculib_root/lib &&       cf_search="$cf_search $prefix/$cf_nculib_root/lib"
5694         test -d $prefix/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
5695 }
5696
5697 test "/usr/local" != "$prefix" && \
5698 test -d "/usr/local" && \
5699 (test $prefix = NONE || test "/usr/local" != "$prefix") && {
5700         test -n "$verbose" && echo "    ... testing for lib-directories under /usr/local"
5701         test -d /usr/local/lib &&          cf_search="$cf_search /usr/local/lib"
5702         test -d /usr/local/lib/$cf_nculib_root &&       cf_search="$cf_search /usr/local/lib/$cf_nculib_root"
5703         test -d /usr/local/lib/$cf_nculib_root/lib &&    cf_search="$cf_search /usr/local/lib/$cf_nculib_root/lib"
5704         test -d /usr/local/$cf_nculib_root/lib &&       cf_search="$cf_search /usr/local/$cf_nculib_root/lib"
5705         test -d /usr/local/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search /usr/local/$cf_nculib_root/lib/$cf_nculib_root"
5706 }
5707
5708 test "/opt" != "$prefix" && \
5709 test -d "/opt" && \
5710 (test $prefix = NONE || test "/opt" != "$prefix") && {
5711         test -n "$verbose" && echo "    ... testing for lib-directories under /opt"
5712         test -d /opt/lib &&          cf_search="$cf_search /opt/lib"
5713         test -d /opt/lib/$cf_nculib_root &&       cf_search="$cf_search /opt/lib/$cf_nculib_root"
5714         test -d /opt/lib/$cf_nculib_root/lib &&    cf_search="$cf_search /opt/lib/$cf_nculib_root/lib"
5715         test -d /opt/$cf_nculib_root/lib &&       cf_search="$cf_search /opt/$cf_nculib_root/lib"
5716         test -d /opt/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search /opt/$cf_nculib_root/lib/$cf_nculib_root"
5717 }
5718
5719 test "$HOME" != "$prefix" && \
5720 test -d "$HOME" && \
5721 (test $prefix = NONE || test "$HOME" != "$prefix") && {
5722         test -n "$verbose" && echo "    ... testing for lib-directories under $HOME"
5723         test -d $HOME/lib &&          cf_search="$cf_search $HOME/lib"
5724         test -d $HOME/lib/$cf_nculib_root &&       cf_search="$cf_search $HOME/lib/$cf_nculib_root"
5725         test -d $HOME/lib/$cf_nculib_root/lib &&    cf_search="$cf_search $HOME/lib/$cf_nculib_root/lib"
5726         test -d $HOME/$cf_nculib_root/lib &&       cf_search="$cf_search $HOME/$cf_nculib_root/lib"
5727         test -d $HOME/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search $HOME/$cf_nculib_root/lib/$cf_nculib_root"
5728 }
5729
5730 cf_search="$cf_library_path_list $cf_search"
5731
5732                         for cf_libdir in $cf_search
5733                         do
5734                                 echo "$as_me:5734: checking for -l$cf_nculib_root in $cf_libdir" >&5
5735 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
5736                                 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
5737                                 cat >conftest.$ac_ext <<_ACEOF
5738 #line 5738 "configure"
5739 #include "confdefs.h"
5740 #include <${cf_cv_ncurses_header:-curses.h}>
5741 int
5742 main ()
5743 {
5744 initscr()
5745   ;
5746   return 0;
5747 }
5748 _ACEOF
5749 rm -f conftest.$ac_objext conftest$ac_exeext
5750 if { (eval echo "$as_me:5750: \"$ac_link\"") >&5
5751   (eval $ac_link) 2>&5
5752   ac_status=$?
5753   echo "$as_me:5753: \$? = $ac_status" >&5
5754   (exit $ac_status); } &&
5755          { ac_try='test -s conftest$ac_exeext'
5756   { (eval echo "$as_me:5756: \"$ac_try\"") >&5
5757   (eval $ac_try) 2>&5
5758   ac_status=$?
5759   echo "$as_me:5759: \$? = $ac_status" >&5
5760   (exit $ac_status); }; }; then
5761   echo "$as_me:5761: result: yes" >&5
5762 echo "${ECHO_T}yes" >&6
5763                                          eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
5764                                          break
5765 else
5766   echo "$as_me: failed program was:" >&5
5767 cat conftest.$ac_ext >&5
5768 echo "$as_me:5768: result: no" >&5
5769 echo "${ECHO_T}no" >&6
5770                                          LIBS="$cf_save_LIBS"
5771 fi
5772 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5773                         done
5774
5775 fi
5776 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5777
5778 fi
5779
5780 eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root
5781
5782 if test $cf_found_library = no ; then
5783         { { echo "$as_me:5783: error: Cannot link $cf_nculib_root library" >&5
5784 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
5785    { (exit 1); exit 1; }; }
5786 fi
5787
5788 fi
5789
5790 if test -n "$cf_ncurses_LIBS" ; then
5791         echo "$as_me:5791: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
5792 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
5793         cf_ncurses_SAVE="$LIBS"
5794         for p in $cf_ncurses_LIBS ; do
5795                 q=`echo $LIBS | sed -e "s%$p %%" -e "s%$p$%%"`
5796                 if test "$q" != "$LIBS" ; then
5797                         LIBS="$q"
5798                 fi
5799         done
5800         cat >conftest.$ac_ext <<_ACEOF
5801 #line 5801 "configure"
5802 #include "confdefs.h"
5803 #include <${cf_cv_ncurses_header:-curses.h}>
5804 int
5805 main ()
5806 {
5807 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
5808   ;
5809   return 0;
5810 }
5811 _ACEOF
5812 rm -f conftest.$ac_objext conftest$ac_exeext
5813 if { (eval echo "$as_me:5813: \"$ac_link\"") >&5
5814   (eval $ac_link) 2>&5
5815   ac_status=$?
5816   echo "$as_me:5816: \$? = $ac_status" >&5
5817   (exit $ac_status); } &&
5818          { ac_try='test -s conftest$ac_exeext'
5819   { (eval echo "$as_me:5819: \"$ac_try\"") >&5
5820   (eval $ac_try) 2>&5
5821   ac_status=$?
5822   echo "$as_me:5822: \$? = $ac_status" >&5
5823   (exit $ac_status); }; }; then
5824   echo "$as_me:5824: result: yes" >&5
5825 echo "${ECHO_T}yes" >&6
5826 else
5827   echo "$as_me: failed program was:" >&5
5828 cat conftest.$ac_ext >&5
5829 echo "$as_me:5829: result: no" >&5
5830 echo "${ECHO_T}no" >&6
5831                  LIBS="$cf_ncurses_SAVE"
5832 fi
5833 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5834 fi
5835
5836 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
5837
5838 cat >>confdefs.h <<EOF
5839 #define $cf_nculib_ROOT 1
5840 EOF
5841
5842 fi
5843
5844 else
5845
5846 cf_ncuconfig_root=ncurses
5847
5848 echo "Looking for ${cf_ncuconfig_root}-config"
5849
5850 if test -n "$ac_tool_prefix"; then
5851   for ac_prog in ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
5852   do
5853     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5854 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5855 echo "$as_me:5855: checking for $ac_word" >&5
5856 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5857 if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
5858   echo $ECHO_N "(cached) $ECHO_C" >&6
5859 else
5860   if test -n "$NCURSES_CONFIG"; then
5861   ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
5862 else
5863   ac_save_IFS=$IFS; IFS=$ac_path_separator
5864 ac_dummy="$PATH"
5865 for ac_dir in $ac_dummy; do
5866   IFS=$ac_save_IFS
5867   test -z "$ac_dir" && ac_dir=.
5868   $as_executable_p "$ac_dir/$ac_word" || continue
5869 ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
5870 echo "$as_me:5870: found $ac_dir/$ac_word" >&5
5871 break
5872 done
5873
5874 fi
5875 fi
5876 NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
5877 if test -n "$NCURSES_CONFIG"; then
5878   echo "$as_me:5878: result: $NCURSES_CONFIG" >&5
5879 echo "${ECHO_T}$NCURSES_CONFIG" >&6
5880 else
5881   echo "$as_me:5881: result: no" >&5
5882 echo "${ECHO_T}no" >&6
5883 fi
5884
5885     test -n "$NCURSES_CONFIG" && break
5886   done
5887 fi
5888 if test -z "$NCURSES_CONFIG"; then
5889   ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
5890   for ac_prog in ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
5891 do
5892   # Extract the first word of "$ac_prog", so it can be a program name with args.
5893 set dummy $ac_prog; ac_word=$2
5894 echo "$as_me:5894: checking for $ac_word" >&5
5895 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5896 if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
5897   echo $ECHO_N "(cached) $ECHO_C" >&6
5898 else
5899   if test -n "$ac_ct_NCURSES_CONFIG"; then
5900   ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
5901 else
5902   ac_save_IFS=$IFS; IFS=$ac_path_separator
5903 ac_dummy="$PATH"
5904 for ac_dir in $ac_dummy; do
5905   IFS=$ac_save_IFS
5906   test -z "$ac_dir" && ac_dir=.
5907   $as_executable_p "$ac_dir/$ac_word" || continue
5908 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
5909 echo "$as_me:5909: found $ac_dir/$ac_word" >&5
5910 break
5911 done
5912
5913 fi
5914 fi
5915 ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
5916 if test -n "$ac_ct_NCURSES_CONFIG"; then
5917   echo "$as_me:5917: result: $ac_ct_NCURSES_CONFIG" >&5
5918 echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
5919 else
5920   echo "$as_me:5920: result: no" >&5
5921 echo "${ECHO_T}no" >&6
5922 fi
5923
5924   test -n "$ac_ct_NCURSES_CONFIG" && break
5925 done
5926 test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
5927
5928   NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
5929 fi
5930
5931 if test "$NCURSES_CONFIG" != none ; then
5932
5933 CPPFLAGS="$CPPFLAGS `$NCURSES_CONFIG --cflags`"
5934 LIBS="`$NCURSES_CONFIG --libs` $LIBS"
5935
5936 # even with config script, some packages use no-override for curses.h
5937
5938 echo "$as_me:5938: checking if we have identified curses headers" >&5
5939 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
5940 if test "${cf_cv_ncurses_header+set}" = set; then
5941   echo $ECHO_N "(cached) $ECHO_C" >&6
5942 else
5943
5944 cf_cv_ncurses_header=none
5945 for cf_header in  \
5946     ncurses/ncurses.h \
5947         ncurses/curses.h \
5948         ncurses.h \
5949         curses.h
5950 do
5951 cat >conftest.$ac_ext <<_ACEOF
5952 #line 5952 "configure"
5953 #include "confdefs.h"
5954 #include <${cf_header}>
5955 int
5956 main ()
5957 {
5958 initscr(); tgoto("?", 0,0)
5959   ;
5960   return 0;
5961 }
5962 _ACEOF
5963 rm -f conftest.$ac_objext
5964 if { (eval echo "$as_me:5964: \"$ac_compile\"") >&5
5965   (eval $ac_compile) 2>&5
5966   ac_status=$?
5967   echo "$as_me:5967: \$? = $ac_status" >&5
5968   (exit $ac_status); } &&
5969          { ac_try='test -s conftest.$ac_objext'
5970   { (eval echo "$as_me:5970: \"$ac_try\"") >&5
5971   (eval $ac_try) 2>&5
5972   ac_status=$?
5973   echo "$as_me:5973: \$? = $ac_status" >&5
5974   (exit $ac_status); }; }; then
5975   cf_cv_ncurses_header=$cf_header; break
5976 else
5977   echo "$as_me: failed program was:" >&5
5978 cat conftest.$ac_ext >&5
5979 fi
5980 rm -f conftest.$ac_objext conftest.$ac_ext
5981 done
5982
5983 fi
5984 echo "$as_me:5984: result: $cf_cv_ncurses_header" >&5
5985 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
5986
5987 if test "$cf_cv_ncurses_header" = none ; then
5988         { { echo "$as_me:5988: error: No curses header-files found" >&5
5989 echo "$as_me: error: No curses header-files found" >&2;}
5990    { (exit 1); exit 1; }; }
5991 fi
5992
5993 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
5994
5995 for ac_header in $cf_cv_ncurses_header
5996 do
5997 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5998 echo "$as_me:5998: checking for $ac_header" >&5
5999 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6000 if eval "test \"\${$as_ac_Header+set}\" = set"; then
6001   echo $ECHO_N "(cached) $ECHO_C" >&6
6002 else
6003   cat >conftest.$ac_ext <<_ACEOF
6004 #line 6004 "configure"
6005 #include "confdefs.h"
6006 #include <$ac_header>
6007 _ACEOF
6008 if { (eval echo "$as_me:6008: \"$ac_cpp conftest.$ac_ext\"") >&5
6009   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6010   ac_status=$?
6011   egrep -v '^ *\+' conftest.er1 >conftest.err
6012   rm -f conftest.er1
6013   cat conftest.err >&5
6014   echo "$as_me:6014: \$? = $ac_status" >&5
6015   (exit $ac_status); } >/dev/null; then
6016   if test -s conftest.err; then
6017     ac_cpp_err=$ac_c_preproc_warn_flag
6018   else
6019     ac_cpp_err=
6020   fi
6021 else
6022   ac_cpp_err=yes
6023 fi
6024 if test -z "$ac_cpp_err"; then
6025   eval "$as_ac_Header=yes"
6026 else
6027   echo "$as_me: failed program was:" >&5
6028   cat conftest.$ac_ext >&5
6029   eval "$as_ac_Header=no"
6030 fi
6031 rm -f conftest.err conftest.$ac_ext
6032 fi
6033 echo "$as_me:6033: result: `eval echo '${'$as_ac_Header'}'`" >&5
6034 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
6035 if test `eval echo '${'$as_ac_Header'}'` = yes; then
6036   cat >>confdefs.h <<EOF
6037 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6038 EOF
6039
6040 fi
6041 done
6042
6043 cat >>confdefs.h <<\EOF
6044 #define NCURSES 1
6045 EOF
6046
6047 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
6048
6049 cat >>confdefs.h <<EOF
6050 #define $cf_nculib_ROOT 1
6051 EOF
6052
6053 cf_cv_ncurses_version=`$NCURSES_CONFIG --version`
6054
6055 else
6056
6057 cf_ncuhdr_root=ncurses
6058
6059 test -n "$cf_cv_curses_dir" && \
6060 test "$cf_cv_curses_dir" != "no" && { \
6061
6062 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
6063   for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
6064   do
6065         while test $cf_add_incdir != /usr/include
6066         do
6067           if test -d $cf_add_incdir
6068           then
6069                 cf_have_incdir=no
6070                 if test -n "$CFLAGS$CPPFLAGS" ; then
6071                   # a loop is needed to ensure we can add subdirs of existing dirs
6072                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
6073                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
6074                           cf_have_incdir=yes; break
6075                         fi
6076                   done
6077                 fi
6078
6079                 if test "$cf_have_incdir" = no ; then
6080                   if test "$cf_add_incdir" = /usr/local/include ; then
6081                         if test "$GCC" = yes
6082                         then
6083                           cf_save_CPPFLAGS=$CPPFLAGS
6084                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6085                           cat >conftest.$ac_ext <<_ACEOF
6086 #line 6086 "configure"
6087 #include "confdefs.h"
6088 #include <stdio.h>
6089 int
6090 main ()
6091 {
6092 printf("Hello")
6093   ;
6094   return 0;
6095 }
6096 _ACEOF
6097 rm -f conftest.$ac_objext
6098 if { (eval echo "$as_me:6098: \"$ac_compile\"") >&5
6099   (eval $ac_compile) 2>&5
6100   ac_status=$?
6101   echo "$as_me:6101: \$? = $ac_status" >&5
6102   (exit $ac_status); } &&
6103          { ac_try='test -s conftest.$ac_objext'
6104   { (eval echo "$as_me:6104: \"$ac_try\"") >&5
6105   (eval $ac_try) 2>&5
6106   ac_status=$?
6107   echo "$as_me:6107: \$? = $ac_status" >&5
6108   (exit $ac_status); }; }; then
6109   :
6110 else
6111   echo "$as_me: failed program was:" >&5
6112 cat conftest.$ac_ext >&5
6113 cf_have_incdir=yes
6114 fi
6115 rm -f conftest.$ac_objext conftest.$ac_ext
6116                           CPPFLAGS=$cf_save_CPPFLAGS
6117                         fi
6118                   fi
6119                 fi
6120
6121                 if test "$cf_have_incdir" = no ; then
6122                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
6123
6124 echo "${as_me:-configure}:6124: testing adding $cf_add_incdir to include-path ..." 1>&5
6125
6126                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6127
6128                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
6129                   test "$cf_top_incdir" = "$cf_add_incdir" && break
6130                   cf_add_incdir="$cf_top_incdir"
6131                 else
6132                   break
6133                 fi
6134           fi
6135         done
6136   done
6137 fi
6138
6139 }
6140
6141 echo "$as_me:6141: checking for $cf_ncuhdr_root header in include-path" >&5
6142 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
6143 if test "${cf_cv_ncurses_h+set}" = set; then
6144   echo $ECHO_N "(cached) $ECHO_C" >&6
6145 else
6146
6147         cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
6148         ( test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw ) && cf_header_list="$cf_header_list curses.h ncurses.h"
6149         for cf_header in $cf_header_list
6150         do
6151
6152         cat >conftest.$ac_ext <<_ACEOF
6153 #line 6153 "configure"
6154 #include "confdefs.h"
6155
6156 #include <$cf_header>
6157 int
6158 main ()
6159 {
6160
6161 #ifdef NCURSES_VERSION
6162
6163 printf("%s\n", NCURSES_VERSION);
6164 #else
6165 #ifdef __NCURSES_H
6166 printf("old\n");
6167 #else
6168         make an error
6169 #endif
6170 #endif
6171
6172   ;
6173   return 0;
6174 }
6175 _ACEOF
6176 rm -f conftest.$ac_objext
6177 if { (eval echo "$as_me:6177: \"$ac_compile\"") >&5
6178   (eval $ac_compile) 2>&5
6179   ac_status=$?
6180   echo "$as_me:6180: \$? = $ac_status" >&5
6181   (exit $ac_status); } &&
6182          { ac_try='test -s conftest.$ac_objext'
6183   { (eval echo "$as_me:6183: \"$ac_try\"") >&5
6184   (eval $ac_try) 2>&5
6185   ac_status=$?
6186   echo "$as_me:6186: \$? = $ac_status" >&5
6187   (exit $ac_status); }; }; then
6188   cf_cv_ncurses_h=$cf_header
6189
6190 else
6191   echo "$as_me: failed program was:" >&5
6192 cat conftest.$ac_ext >&5
6193 cf_cv_ncurses_h=no
6194 fi
6195 rm -f conftest.$ac_objext conftest.$ac_ext
6196
6197                 test "$cf_cv_ncurses_h" != no && break
6198         done
6199
6200 fi
6201 echo "$as_me:6201: result: $cf_cv_ncurses_h" >&5
6202 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
6203
6204 if test "$cf_cv_ncurses_h" != no ; then
6205         cf_cv_ncurses_header=$cf_cv_ncurses_h
6206 else
6207
6208 echo "$as_me:6208: checking for $cf_ncuhdr_root include-path" >&5
6209 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
6210 if test "${cf_cv_ncurses_h2+set}" = set; then
6211   echo $ECHO_N "(cached) $ECHO_C" >&6
6212 else
6213
6214         test -n "$verbose" && echo
6215
6216 cf_search=
6217
6218 # collect the current set of include-directories from compiler flags
6219 cf_header_path_list=""
6220 if test -n "${CFLAGS}${CPPFLAGS}" ; then
6221         for cf_header_path in $CPPFLAGS $CFLAGS
6222         do
6223                 case $cf_header_path in #(vi
6224                 -I*)
6225                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
6226
6227 test "$cf_header_path" != "NONE" && \
6228 test -d "$cf_header_path" && \
6229  {
6230         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
6231         test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
6232         test -d $cf_header_path/include/$cf_ncuhdr_root &&       cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
6233         test -d $cf_header_path/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
6234         test -d $cf_header_path/$cf_ncuhdr_root/include &&       cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
6235         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"
6236 }
6237
6238                         cf_header_path_list="$cf_header_path_list $cf_search"
6239                         ;;
6240                 esac
6241         done
6242 fi
6243
6244 # add the variations for the package we are looking for
6245
6246 cf_search=
6247
6248 test "/usr" != "$prefix" && \
6249 test -d "/usr" && \
6250 (test $prefix = NONE || test "/usr" != "$prefix") && {
6251         test -n "$verbose" && echo "    ... testing for include-directories under /usr"
6252         test -d /usr/include &&          cf_search="$cf_search /usr/include"
6253         test -d /usr/include/$cf_ncuhdr_root &&       cf_search="$cf_search /usr/include/$cf_ncuhdr_root"
6254         test -d /usr/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search /usr/include/$cf_ncuhdr_root/include"
6255         test -d /usr/$cf_ncuhdr_root/include &&       cf_search="$cf_search /usr/$cf_ncuhdr_root/include"
6256         test -d /usr/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search /usr/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
6257 }
6258
6259 test "$prefix" != "NONE" && \
6260 test -d "$prefix" && \
6261  {
6262         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
6263         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
6264         test -d $prefix/include/$cf_ncuhdr_root &&       cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
6265         test -d $prefix/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
6266         test -d $prefix/$cf_ncuhdr_root/include &&       cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
6267         test -d $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
6268 }
6269
6270 test "/usr/local" != "$prefix" && \
6271 test -d "/usr/local" && \
6272 (test $prefix = NONE || test "/usr/local" != "$prefix") && {
6273         test -n "$verbose" && echo "    ... testing for include-directories under /usr/local"
6274         test -d /usr/local/include &&          cf_search="$cf_search /usr/local/include"
6275         test -d /usr/local/include/$cf_ncuhdr_root &&       cf_search="$cf_search /usr/local/include/$cf_ncuhdr_root"
6276         test -d /usr/local/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search /usr/local/include/$cf_ncuhdr_root/include"
6277         test -d /usr/local/$cf_ncuhdr_root/include &&       cf_search="$cf_search /usr/local/$cf_ncuhdr_root/include"
6278         test -d /usr/local/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search /usr/local/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
6279 }
6280
6281 test "/opt" != "$prefix" && \
6282 test -d "/opt" && \
6283 (test $prefix = NONE || test "/opt" != "$prefix") && {
6284         test -n "$verbose" && echo "    ... testing for include-directories under /opt"
6285         test -d /opt/include &&          cf_search="$cf_search /opt/include"
6286         test -d /opt/include/$cf_ncuhdr_root &&       cf_search="$cf_search /opt/include/$cf_ncuhdr_root"
6287         test -d /opt/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search /opt/include/$cf_ncuhdr_root/include"
6288         test -d /opt/$cf_ncuhdr_root/include &&       cf_search="$cf_search /opt/$cf_ncuhdr_root/include"
6289         test -d /opt/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search /opt/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
6290 }
6291
6292 test "$HOME" != "$prefix" && \
6293 test -d "$HOME" && \
6294 (test $prefix = NONE || test "$HOME" != "$prefix") && {
6295         test -n "$verbose" && echo "    ... testing for include-directories under $HOME"
6296         test -d $HOME/include &&          cf_search="$cf_search $HOME/include"
6297         test -d $HOME/include/$cf_ncuhdr_root &&       cf_search="$cf_search $HOME/include/$cf_ncuhdr_root"
6298         test -d $HOME/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search $HOME/include/$cf_ncuhdr_root/include"
6299         test -d $HOME/$cf_ncuhdr_root/include &&       cf_search="$cf_search $HOME/$cf_ncuhdr_root/include"
6300         test -d $HOME/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search $HOME/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
6301 }
6302
6303 test "$includedir" != NONE && \
6304 test "$includedir" != "/usr/include" && \
6305 test -d "$includedir" && {
6306         test -d $includedir &&    cf_search="$cf_search $includedir"
6307         test -d $includedir/$cf_ncuhdr_root && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
6308 }
6309
6310 test "$oldincludedir" != NONE && \
6311 test "$oldincludedir" != "/usr/include" && \
6312 test -d "$oldincludedir" && {
6313         test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
6314         test -d $oldincludedir/$cf_ncuhdr_root && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
6315 }
6316
6317 cf_search="$cf_search $cf_header_path_list"
6318
6319         test -n "$verbose" && echo search path $cf_search
6320         cf_save2_CPPFLAGS="$CPPFLAGS"
6321         for cf_incdir in $cf_search
6322         do
6323
6324 if test -n "$cf_incdir" ; then
6325   for cf_add_incdir in $cf_incdir
6326   do
6327         while test $cf_add_incdir != /usr/include
6328         do
6329           if test -d $cf_add_incdir
6330           then
6331                 cf_have_incdir=no
6332                 if test -n "$CFLAGS$CPPFLAGS" ; then
6333                   # a loop is needed to ensure we can add subdirs of existing dirs
6334                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
6335                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
6336                           cf_have_incdir=yes; break
6337                         fi
6338                   done
6339                 fi
6340
6341                 if test "$cf_have_incdir" = no ; then
6342                   if test "$cf_add_incdir" = /usr/local/include ; then
6343                         if test "$GCC" = yes
6344                         then
6345                           cf_save_CPPFLAGS=$CPPFLAGS
6346                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6347                           cat >conftest.$ac_ext <<_ACEOF
6348 #line 6348 "configure"
6349 #include "confdefs.h"
6350 #include <stdio.h>
6351 int
6352 main ()
6353 {
6354 printf("Hello")
6355   ;
6356   return 0;
6357 }
6358 _ACEOF
6359 rm -f conftest.$ac_objext
6360 if { (eval echo "$as_me:6360: \"$ac_compile\"") >&5
6361   (eval $ac_compile) 2>&5
6362   ac_status=$?
6363   echo "$as_me:6363: \$? = $ac_status" >&5
6364   (exit $ac_status); } &&
6365          { ac_try='test -s conftest.$ac_objext'
6366   { (eval echo "$as_me:6366: \"$ac_try\"") >&5
6367   (eval $ac_try) 2>&5
6368   ac_status=$?
6369   echo "$as_me:6369: \$? = $ac_status" >&5
6370   (exit $ac_status); }; }; then
6371   :
6372 else
6373   echo "$as_me: failed program was:" >&5
6374 cat conftest.$ac_ext >&5
6375 cf_have_incdir=yes
6376 fi
6377 rm -f conftest.$ac_objext conftest.$ac_ext
6378                           CPPFLAGS=$cf_save_CPPFLAGS
6379                         fi
6380                   fi
6381                 fi
6382
6383                 if test "$cf_have_incdir" = no ; then
6384                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
6385
6386 echo "${as_me:-configure}:6386: testing adding $cf_add_incdir to include-path ..." 1>&5
6387
6388                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6389
6390                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
6391                   test "$cf_top_incdir" = "$cf_add_incdir" && break
6392                   cf_add_incdir="$cf_top_incdir"
6393                 else
6394                   break
6395                 fi
6396           fi
6397         done
6398   done
6399 fi
6400
6401                 for cf_header in \
6402                         ncurses.h \
6403                         curses.h
6404                 do
6405
6406         cat >conftest.$ac_ext <<_ACEOF
6407 #line 6407 "configure"
6408 #include "confdefs.h"
6409
6410 #include <$cf_header>
6411 int
6412 main ()
6413 {
6414
6415 #ifdef NCURSES_VERSION
6416
6417 printf("%s\n", NCURSES_VERSION);
6418 #else
6419 #ifdef __NCURSES_H
6420 printf("old\n");
6421 #else
6422         make an error
6423 #endif
6424 #endif
6425
6426   ;
6427   return 0;
6428 }
6429 _ACEOF
6430 rm -f conftest.$ac_objext
6431 if { (eval echo "$as_me:6431: \"$ac_compile\"") >&5
6432   (eval $ac_compile) 2>&5
6433   ac_status=$?
6434   echo "$as_me:6434: \$? = $ac_status" >&5
6435   (exit $ac_status); } &&
6436          { ac_try='test -s conftest.$ac_objext'
6437   { (eval echo "$as_me:6437: \"$ac_try\"") >&5
6438   (eval $ac_try) 2>&5
6439   ac_status=$?
6440   echo "$as_me:6440: \$? = $ac_status" >&5
6441   (exit $ac_status); }; }; then
6442   cf_cv_ncurses_h2=$cf_header
6443
6444 else
6445   echo "$as_me: failed program was:" >&5
6446 cat conftest.$ac_ext >&5
6447 cf_cv_ncurses_h2=no
6448 fi
6449 rm -f conftest.$ac_objext conftest.$ac_ext
6450
6451                         if test "$cf_cv_ncurses_h2" != no ; then
6452                                 cf_cv_ncurses_h2=$cf_incdir/$cf_header
6453                                 test -n "$verbose" && echo $ac_n "      ... found $ac_c" 1>&6
6454                                 break
6455                         fi
6456                         test -n "$verbose" && echo "    ... tested $cf_incdir/$cf_header" 1>&6
6457                 done
6458                 CPPFLAGS="$cf_save2_CPPFLAGS"
6459                 test "$cf_cv_ncurses_h2" != no && break
6460         done
6461         test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:6461: error: not found" >&5
6462 echo "$as_me: error: not found" >&2;}
6463    { (exit 1); exit 1; }; }
6464
6465 fi
6466 echo "$as_me:6466: result: $cf_cv_ncurses_h2" >&5
6467 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
6468
6469         cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's%/[^/]*$%%'`
6470         cf_cv_ncurses_header=`basename $cf_cv_ncurses_h2`
6471         if test `basename $cf_1st_incdir` = $cf_ncuhdr_root ; then
6472                 cf_cv_ncurses_header=$cf_ncuhdr_root/$cf_cv_ncurses_header
6473         fi
6474
6475 if test -n "$cf_1st_incdir" ; then
6476   for cf_add_incdir in $cf_1st_incdir
6477   do
6478         while test $cf_add_incdir != /usr/include
6479         do
6480           if test -d $cf_add_incdir
6481           then
6482                 cf_have_incdir=no
6483                 if test -n "$CFLAGS$CPPFLAGS" ; then
6484                   # a loop is needed to ensure we can add subdirs of existing dirs
6485                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
6486                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
6487                           cf_have_incdir=yes; break
6488                         fi
6489                   done
6490                 fi
6491
6492                 if test "$cf_have_incdir" = no ; then
6493                   if test "$cf_add_incdir" = /usr/local/include ; then
6494                         if test "$GCC" = yes
6495                         then
6496                           cf_save_CPPFLAGS=$CPPFLAGS
6497                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6498                           cat >conftest.$ac_ext <<_ACEOF
6499 #line 6499 "configure"
6500 #include "confdefs.h"
6501 #include <stdio.h>
6502 int
6503 main ()
6504 {
6505 printf("Hello")
6506   ;
6507   return 0;
6508 }
6509 _ACEOF
6510 rm -f conftest.$ac_objext
6511 if { (eval echo "$as_me:6511: \"$ac_compile\"") >&5
6512   (eval $ac_compile) 2>&5
6513   ac_status=$?
6514   echo "$as_me:6514: \$? = $ac_status" >&5
6515   (exit $ac_status); } &&
6516          { ac_try='test -s conftest.$ac_objext'
6517   { (eval echo "$as_me:6517: \"$ac_try\"") >&5
6518   (eval $ac_try) 2>&5
6519   ac_status=$?
6520   echo "$as_me:6520: \$? = $ac_status" >&5
6521   (exit $ac_status); }; }; then
6522   :
6523 else
6524   echo "$as_me: failed program was:" >&5
6525 cat conftest.$ac_ext >&5
6526 cf_have_incdir=yes
6527 fi
6528 rm -f conftest.$ac_objext conftest.$ac_ext
6529                           CPPFLAGS=$cf_save_CPPFLAGS
6530                         fi
6531                   fi
6532                 fi
6533
6534                 if test "$cf_have_incdir" = no ; then
6535                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
6536
6537 echo "${as_me:-configure}:6537: testing adding $cf_add_incdir to include-path ..." 1>&5
6538
6539                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6540
6541                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
6542                   test "$cf_top_incdir" = "$cf_add_incdir" && break
6543                   cf_add_incdir="$cf_top_incdir"
6544                 else
6545                   break
6546                 fi
6547           fi
6548         done
6549   done
6550 fi
6551
6552 fi
6553
6554 # Set definitions to allow ifdef'ing for ncurses.h
6555
6556 case $cf_cv_ncurses_header in # (vi
6557 *ncurses.h)
6558         cat >>confdefs.h <<\EOF
6559 #define HAVE_NCURSES_H 1
6560 EOF
6561
6562         ;;
6563 esac
6564
6565 case $cf_cv_ncurses_header in # (vi
6566 ncurses/curses.h|ncurses/ncurses.h)
6567         cat >>confdefs.h <<\EOF
6568 #define HAVE_NCURSES_NCURSES_H 1
6569 EOF
6570
6571         ;;
6572 ncursesw/curses.h|ncursesw/ncurses.h)
6573         cat >>confdefs.h <<\EOF
6574 #define HAVE_NCURSESW_NCURSES_H 1
6575 EOF
6576
6577         ;;
6578 esac
6579
6580 echo "$as_me:6580: checking for terminfo header" >&5
6581 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
6582 if test "${cf_cv_term_header+set}" = set; then
6583   echo $ECHO_N "(cached) $ECHO_C" >&6
6584 else
6585
6586 case ${cf_cv_ncurses_header} in #(vi
6587 */ncurses.h|*/ncursesw.h) #(vi
6588         cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
6589         ;;
6590 *)
6591         cf_term_header=term.h
6592         ;;
6593 esac
6594
6595 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
6596 do
6597 cat >conftest.$ac_ext <<_ACEOF
6598 #line 6598 "configure"
6599 #include "confdefs.h"
6600 #include <stdio.h>
6601 #include <${cf_cv_ncurses_header:-curses.h}>
6602 #include <$cf_test>
6603
6604 int
6605 main ()
6606 {
6607 int x = auto_left_margin
6608   ;
6609   return 0;
6610 }
6611 _ACEOF
6612 rm -f conftest.$ac_objext
6613 if { (eval echo "$as_me:6613: \"$ac_compile\"") >&5
6614   (eval $ac_compile) 2>&5
6615   ac_status=$?
6616   echo "$as_me:6616: \$? = $ac_status" >&5
6617   (exit $ac_status); } &&
6618          { ac_try='test -s conftest.$ac_objext'
6619   { (eval echo "$as_me:6619: \"$ac_try\"") >&5
6620   (eval $ac_try) 2>&5
6621   ac_status=$?
6622   echo "$as_me:6622: \$? = $ac_status" >&5
6623   (exit $ac_status); }; }; then
6624
6625         cf_cv_term_header="$cf_test"
6626 else
6627   echo "$as_me: failed program was:" >&5
6628 cat conftest.$ac_ext >&5
6629
6630         cf_cv_term_header=unknown
6631
6632 fi
6633 rm -f conftest.$ac_objext conftest.$ac_ext
6634         test "$cf_cv_term_header" != unknown && break
6635 done
6636
6637 fi
6638 echo "$as_me:6638: result: $cf_cv_term_header" >&5
6639 echo "${ECHO_T}$cf_cv_term_header" >&6
6640
6641 # Set definitions to allow ifdef'ing to accommodate subdirectories
6642
6643 case $cf_cv_term_header in # (vi
6644 *term.h)
6645         cat >>confdefs.h <<\EOF
6646 #define HAVE_TERM_H 1
6647 EOF
6648
6649         ;;
6650 esac
6651
6652 case $cf_cv_term_header in # (vi
6653 ncurses/term.h) #(vi
6654         cat >>confdefs.h <<\EOF
6655 #define HAVE_NCURSES_TERM_H 1
6656 EOF
6657
6658         ;;
6659 ncursesw/term.h)
6660         cat >>confdefs.h <<\EOF
6661 #define HAVE_NCURSESW_TERM_H 1
6662 EOF
6663
6664         ;;
6665 esac
6666
6667 # some applications need this, but should check for NCURSES_VERSION
6668 cat >>confdefs.h <<\EOF
6669 #define NCURSES 1
6670 EOF
6671
6672 echo "$as_me:6672: checking for ncurses version" >&5
6673 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
6674 if test "${cf_cv_ncurses_version+set}" = set; then
6675   echo $ECHO_N "(cached) $ECHO_C" >&6
6676 else
6677
6678         cf_cv_ncurses_version=no
6679         cf_tempfile=out$$
6680         rm -f $cf_tempfile
6681         if test "$cross_compiling" = yes; then
6682
6683         # This will not work if the preprocessor splits the line after the
6684         # Autoconf token.  The 'unproto' program does that.
6685         cat > conftest.$ac_ext <<EOF
6686 #include <${cf_cv_ncurses_header:-curses.h}>
6687 #undef Autoconf
6688 #ifdef NCURSES_VERSION
6689 Autoconf NCURSES_VERSION
6690 #else
6691 #ifdef __NCURSES_H
6692 Autoconf "old"
6693 #endif
6694 ;
6695 #endif
6696 EOF
6697         cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
6698         { (eval echo "$as_me:6698: \"$cf_try\"") >&5
6699   (eval $cf_try) 2>&5
6700   ac_status=$?
6701   echo "$as_me:6701: \$? = $ac_status" >&5
6702   (exit $ac_status); }
6703         if test -f conftest.out ; then
6704                 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
6705                 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
6706                 rm -f conftest.out
6707         fi
6708
6709 else
6710   cat >conftest.$ac_ext <<_ACEOF
6711 #line 6711 "configure"
6712 #include "confdefs.h"
6713
6714 #include <${cf_cv_ncurses_header:-curses.h}>
6715 #include <stdio.h>
6716 int main()
6717 {
6718         FILE *fp = fopen("$cf_tempfile", "w");
6719 #ifdef NCURSES_VERSION
6720 # ifdef NCURSES_VERSION_PATCH
6721         fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
6722 # else
6723         fprintf(fp, "%s\n", NCURSES_VERSION);
6724 # endif
6725 #else
6726 # ifdef __NCURSES_H
6727         fprintf(fp, "old\n");
6728 # else
6729         make an error
6730 # endif
6731 #endif
6732         ${cf_cv_main_return:-return}(0);
6733 }
6734 _ACEOF
6735 rm -f conftest$ac_exeext
6736 if { (eval echo "$as_me:6736: \"$ac_link\"") >&5
6737   (eval $ac_link) 2>&5
6738   ac_status=$?
6739   echo "$as_me:6739: \$? = $ac_status" >&5
6740   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6741   { (eval echo "$as_me:6741: \"$ac_try\"") >&5
6742   (eval $ac_try) 2>&5
6743   ac_status=$?
6744   echo "$as_me:6744: \$? = $ac_status" >&5
6745   (exit $ac_status); }; }; then
6746
6747         cf_cv_ncurses_version=`cat $cf_tempfile`
6748 else
6749   echo "$as_me: program exited with status $ac_status" >&5
6750 echo "$as_me: failed program was:" >&5
6751 cat conftest.$ac_ext >&5
6752 fi
6753 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6754 fi
6755         rm -f $cf_tempfile
6756
6757 fi
6758 echo "$as_me:6758: result: $cf_cv_ncurses_version" >&5
6759 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
6760 test "$cf_cv_ncurses_version" = no || cat >>confdefs.h <<\EOF
6761 #define NCURSES 1
6762 EOF
6763
6764 cf_nculib_root=ncurses
6765         # This works, except for the special case where we find gpm, but
6766         # ncurses is in a nonstandard location via $LIBS, and we really want
6767         # to link gpm.
6768 cf_ncurses_LIBS=""
6769 cf_ncurses_SAVE="$LIBS"
6770 echo "$as_me:6770: checking for Gpm_Open in -lgpm" >&5
6771 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
6772 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
6773   echo $ECHO_N "(cached) $ECHO_C" >&6
6774 else
6775   ac_check_lib_save_LIBS=$LIBS
6776 LIBS="-lgpm  $LIBS"
6777 cat >conftest.$ac_ext <<_ACEOF
6778 #line 6778 "configure"
6779 #include "confdefs.h"
6780
6781 /* Override any gcc2 internal prototype to avoid an error.  */
6782 #ifdef __cplusplus
6783 extern "C"
6784 #endif
6785 /* We use char because int might match the return type of a gcc2
6786    builtin and then its argument prototype would still apply.  */
6787 char Gpm_Open ();
6788 int
6789 main ()
6790 {
6791 Gpm_Open ();
6792   ;
6793   return 0;
6794 }
6795 _ACEOF
6796 rm -f conftest.$ac_objext conftest$ac_exeext
6797 if { (eval echo "$as_me:6797: \"$ac_link\"") >&5
6798   (eval $ac_link) 2>&5
6799   ac_status=$?
6800   echo "$as_me:6800: \$? = $ac_status" >&5
6801   (exit $ac_status); } &&
6802          { ac_try='test -s conftest$ac_exeext'
6803   { (eval echo "$as_me:6803: \"$ac_try\"") >&5
6804   (eval $ac_try) 2>&5
6805   ac_status=$?
6806   echo "$as_me:6806: \$? = $ac_status" >&5
6807   (exit $ac_status); }; }; then
6808   ac_cv_lib_gpm_Gpm_Open=yes
6809 else
6810   echo "$as_me: failed program was:" >&5
6811 cat conftest.$ac_ext >&5
6812 ac_cv_lib_gpm_Gpm_Open=no
6813 fi
6814 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6815 LIBS=$ac_check_lib_save_LIBS
6816 fi
6817 echo "$as_me:6817: result: $ac_cv_lib_gpm_Gpm_Open" >&5
6818 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
6819 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
6820   echo "$as_me:6820: checking for initscr in -lgpm" >&5
6821 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
6822 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
6823   echo $ECHO_N "(cached) $ECHO_C" >&6
6824 else
6825   ac_check_lib_save_LIBS=$LIBS
6826 LIBS="-lgpm  $LIBS"
6827 cat >conftest.$ac_ext <<_ACEOF
6828 #line 6828 "configure"
6829 #include "confdefs.h"
6830
6831 /* Override any gcc2 internal prototype to avoid an error.  */
6832 #ifdef __cplusplus
6833 extern "C"
6834 #endif
6835 /* We use char because int might match the return type of a gcc2
6836    builtin and then its argument prototype would still apply.  */
6837 char initscr ();
6838 int
6839 main ()
6840 {
6841 initscr ();
6842   ;
6843   return 0;
6844 }
6845 _ACEOF
6846 rm -f conftest.$ac_objext conftest$ac_exeext
6847 if { (eval echo "$as_me:6847: \"$ac_link\"") >&5
6848   (eval $ac_link) 2>&5
6849   ac_status=$?
6850   echo "$as_me:6850: \$? = $ac_status" >&5
6851   (exit $ac_status); } &&
6852          { ac_try='test -s conftest$ac_exeext'
6853   { (eval echo "$as_me:6853: \"$ac_try\"") >&5
6854   (eval $ac_try) 2>&5
6855   ac_status=$?
6856   echo "$as_me:6856: \$? = $ac_status" >&5
6857   (exit $ac_status); }; }; then
6858   ac_cv_lib_gpm_initscr=yes
6859 else
6860   echo "$as_me: failed program was:" >&5
6861 cat conftest.$ac_ext >&5
6862 ac_cv_lib_gpm_initscr=no
6863 fi
6864 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6865 LIBS=$ac_check_lib_save_LIBS
6866 fi
6867 echo "$as_me:6867: result: $ac_cv_lib_gpm_initscr" >&5
6868 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
6869 if test $ac_cv_lib_gpm_initscr = yes; then
6870   LIBS="$cf_ncurses_SAVE"
6871 else
6872   cf_ncurses_LIBS="-lgpm"
6873 fi
6874
6875 fi
6876
6877 case $host_os in #(vi
6878 freebsd*)
6879         # This is only necessary if you are linking against an obsolete
6880         # version of ncurses (but it should do no harm, since it's static).
6881         if test "$cf_nculib_root" = ncurses ; then
6882                 echo "$as_me:6882: checking for tgoto in -lmytinfo" >&5
6883 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
6884 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
6885   echo $ECHO_N "(cached) $ECHO_C" >&6
6886 else
6887   ac_check_lib_save_LIBS=$LIBS
6888 LIBS="-lmytinfo  $LIBS"
6889 cat >conftest.$ac_ext <<_ACEOF
6890 #line 6890 "configure"
6891 #include "confdefs.h"
6892
6893 /* Override any gcc2 internal prototype to avoid an error.  */
6894 #ifdef __cplusplus
6895 extern "C"
6896 #endif
6897 /* We use char because int might match the return type of a gcc2
6898    builtin and then its argument prototype would still apply.  */
6899 char tgoto ();
6900 int
6901 main ()
6902 {
6903 tgoto ();
6904   ;
6905   return 0;
6906 }
6907 _ACEOF
6908 rm -f conftest.$ac_objext conftest$ac_exeext
6909 if { (eval echo "$as_me:6909: \"$ac_link\"") >&5
6910   (eval $ac_link) 2>&5
6911   ac_status=$?
6912   echo "$as_me:6912: \$? = $ac_status" >&5
6913   (exit $ac_status); } &&
6914          { ac_try='test -s conftest$ac_exeext'
6915   { (eval echo "$as_me:6915: \"$ac_try\"") >&5
6916   (eval $ac_try) 2>&5
6917   ac_status=$?
6918   echo "$as_me:6918: \$? = $ac_status" >&5
6919   (exit $ac_status); }; }; then
6920   ac_cv_lib_mytinfo_tgoto=yes
6921 else
6922   echo "$as_me: failed program was:" >&5
6923 cat conftest.$ac_ext >&5
6924 ac_cv_lib_mytinfo_tgoto=no
6925 fi
6926 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6927 LIBS=$ac_check_lib_save_LIBS
6928 fi
6929 echo "$as_me:6929: result: $ac_cv_lib_mytinfo_tgoto" >&5
6930 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
6931 if test $ac_cv_lib_mytinfo_tgoto = yes; then
6932   cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
6933 fi
6934
6935         fi
6936         ;;
6937 esac
6938
6939 LIBS="$cf_ncurses_LIBS $LIBS"
6940
6941 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
6942 then
6943         LIBS="-l$cf_nculib_root $LIBS"
6944 else
6945
6946         eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
6947         cf_libdir=""
6948         echo "$as_me:6948: checking for initscr" >&5
6949 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
6950 if test "${ac_cv_func_initscr+set}" = set; then
6951   echo $ECHO_N "(cached) $ECHO_C" >&6
6952 else
6953   cat >conftest.$ac_ext <<_ACEOF
6954 #line 6954 "configure"
6955 #include "confdefs.h"
6956 /* System header to define __stub macros and hopefully few prototypes,
6957     which can conflict with char initscr (); below.  */
6958 #include <assert.h>
6959 /* Override any gcc2 internal prototype to avoid an error.  */
6960 #ifdef __cplusplus
6961 extern "C"
6962 #endif
6963 /* We use char because int might match the return type of a gcc2
6964    builtin and then its argument prototype would still apply.  */
6965 char initscr ();
6966 char (*f) ();
6967
6968 int
6969 main ()
6970 {
6971 /* The GNU C library defines this for functions which it implements
6972     to always fail with ENOSYS.  Some functions are actually named
6973     something starting with __ and the normal name is an alias.  */
6974 #if defined (__stub_initscr) || defined (__stub___initscr)
6975 choke me
6976 #else
6977 f = initscr; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
6978 #endif
6979
6980   ;
6981   return 0;
6982 }
6983 _ACEOF
6984 rm -f conftest.$ac_objext conftest$ac_exeext
6985 if { (eval echo "$as_me:6985: \"$ac_link\"") >&5
6986   (eval $ac_link) 2>&5
6987   ac_status=$?
6988   echo "$as_me:6988: \$? = $ac_status" >&5
6989   (exit $ac_status); } &&
6990          { ac_try='test -s conftest$ac_exeext'
6991   { (eval echo "$as_me:6991: \"$ac_try\"") >&5
6992   (eval $ac_try) 2>&5
6993   ac_status=$?
6994   echo "$as_me:6994: \$? = $ac_status" >&5
6995   (exit $ac_status); }; }; then
6996   ac_cv_func_initscr=yes
6997 else
6998   echo "$as_me: failed program was:" >&5
6999 cat conftest.$ac_ext >&5
7000 ac_cv_func_initscr=no
7001 fi
7002 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7003 fi
7004 echo "$as_me:7004: result: $ac_cv_func_initscr" >&5
7005 echo "${ECHO_T}$ac_cv_func_initscr" >&6
7006 if test $ac_cv_func_initscr = yes; then
7007   eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
7008 else
7009
7010                 cf_save_LIBS="$LIBS"
7011                 echo "$as_me:7011: checking for initscr in -l$cf_nculib_root" >&5
7012 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
7013                 LIBS="-l$cf_nculib_root $LIBS"
7014                 cat >conftest.$ac_ext <<_ACEOF
7015 #line 7015 "configure"
7016 #include "confdefs.h"
7017 #include <${cf_cv_ncurses_header:-curses.h}>
7018 int
7019 main ()
7020 {
7021 initscr()
7022   ;
7023   return 0;
7024 }
7025 _ACEOF
7026 rm -f conftest.$ac_objext conftest$ac_exeext
7027 if { (eval echo "$as_me:7027: \"$ac_link\"") >&5
7028   (eval $ac_link) 2>&5
7029   ac_status=$?
7030   echo "$as_me:7030: \$? = $ac_status" >&5
7031   (exit $ac_status); } &&
7032          { ac_try='test -s conftest$ac_exeext'
7033   { (eval echo "$as_me:7033: \"$ac_try\"") >&5
7034   (eval $ac_try) 2>&5
7035   ac_status=$?
7036   echo "$as_me:7036: \$? = $ac_status" >&5
7037   (exit $ac_status); }; }; then
7038   echo "$as_me:7038: result: yes" >&5
7039 echo "${ECHO_T}yes" >&6
7040                          eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
7041
7042 else
7043   echo "$as_me: failed program was:" >&5
7044 cat conftest.$ac_ext >&5
7045 echo "$as_me:7045: result: no" >&5
7046 echo "${ECHO_T}no" >&6
7047
7048 cf_search=
7049 cf_library_path_list=""
7050 if test -n "${LDFLAGS}${LIBS}" ; then
7051         for cf_library_path in $LDFLAGS $LIBS
7052         do
7053                 case $cf_library_path in #(vi
7054                 -L*)
7055                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
7056
7057 test "$cf_library_path" != "NONE" && \
7058 test -d "$cf_library_path" && \
7059  {
7060         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
7061         test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
7062         test -d $cf_library_path/lib/$cf_nculib_root &&       cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
7063         test -d $cf_library_path/lib/$cf_nculib_root/lib &&    cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
7064         test -d $cf_library_path/$cf_nculib_root/lib &&       cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
7065         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"
7066 }
7067
7068                         cf_library_path_list="$cf_library_path_list $cf_search"
7069                         ;;
7070                 esac
7071         done
7072 fi
7073
7074 cf_search=
7075
7076 test "/usr" != "$prefix" && \
7077 test -d "/usr" && \
7078 (test $prefix = NONE || test "/usr" != "$prefix") && {
7079         test -n "$verbose" && echo "    ... testing for lib-directories under /usr"
7080         test -d /usr/lib &&          cf_search="$cf_search /usr/lib"
7081         test -d /usr/lib/$cf_nculib_root &&       cf_search="$cf_search /usr/lib/$cf_nculib_root"
7082         test -d /usr/lib/$cf_nculib_root/lib &&    cf_search="$cf_search /usr/lib/$cf_nculib_root/lib"
7083         test -d /usr/$cf_nculib_root/lib &&       cf_search="$cf_search /usr/$cf_nculib_root/lib"
7084         test -d /usr/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search /usr/$cf_nculib_root/lib/$cf_nculib_root"
7085 }
7086
7087 test "$prefix" != "NONE" && \
7088 test -d "$prefix" && \
7089  {
7090         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
7091         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
7092         test -d $prefix/lib/$cf_nculib_root &&       cf_search="$cf_search $prefix/lib/$cf_nculib_root"
7093         test -d $prefix/lib/$cf_nculib_root/lib &&    cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
7094         test -d $prefix/$cf_nculib_root/lib &&       cf_search="$cf_search $prefix/$cf_nculib_root/lib"
7095         test -d $prefix/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
7096 }
7097
7098 test "/usr/local" != "$prefix" && \
7099 test -d "/usr/local" && \
7100 (test $prefix = NONE || test "/usr/local" != "$prefix") && {
7101         test -n "$verbose" && echo "    ... testing for lib-directories under /usr/local"
7102         test -d /usr/local/lib &&          cf_search="$cf_search /usr/local/lib"
7103         test -d /usr/local/lib/$cf_nculib_root &&       cf_search="$cf_search /usr/local/lib/$cf_nculib_root"
7104         test -d /usr/local/lib/$cf_nculib_root/lib &&    cf_search="$cf_search /usr/local/lib/$cf_nculib_root/lib"
7105         test -d /usr/local/$cf_nculib_root/lib &&       cf_search="$cf_search /usr/local/$cf_nculib_root/lib"
7106         test -d /usr/local/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search /usr/local/$cf_nculib_root/lib/$cf_nculib_root"
7107 }
7108
7109 test "/opt" != "$prefix" && \
7110 test -d "/opt" && \
7111 (test $prefix = NONE || test "/opt" != "$prefix") && {
7112         test -n "$verbose" && echo "    ... testing for lib-directories under /opt"
7113         test -d /opt/lib &&          cf_search="$cf_search /opt/lib"
7114         test -d /opt/lib/$cf_nculib_root &&       cf_search="$cf_search /opt/lib/$cf_nculib_root"
7115         test -d /opt/lib/$cf_nculib_root/lib &&    cf_search="$cf_search /opt/lib/$cf_nculib_root/lib"
7116         test -d /opt/$cf_nculib_root/lib &&       cf_search="$cf_search /opt/$cf_nculib_root/lib"
7117         test -d /opt/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search /opt/$cf_nculib_root/lib/$cf_nculib_root"
7118 }
7119
7120 test "$HOME" != "$prefix" && \
7121 test -d "$HOME" && \
7122 (test $prefix = NONE || test "$HOME" != "$prefix") && {
7123         test -n "$verbose" && echo "    ... testing for lib-directories under $HOME"
7124         test -d $HOME/lib &&          cf_search="$cf_search $HOME/lib"
7125         test -d $HOME/lib/$cf_nculib_root &&       cf_search="$cf_search $HOME/lib/$cf_nculib_root"
7126         test -d $HOME/lib/$cf_nculib_root/lib &&    cf_search="$cf_search $HOME/lib/$cf_nculib_root/lib"
7127         test -d $HOME/$cf_nculib_root/lib &&       cf_search="$cf_search $HOME/$cf_nculib_root/lib"
7128         test -d $HOME/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search $HOME/$cf_nculib_root/lib/$cf_nculib_root"
7129 }
7130
7131 cf_search="$cf_library_path_list $cf_search"
7132
7133                         for cf_libdir in $cf_search
7134                         do
7135                                 echo "$as_me:7135: checking for -l$cf_nculib_root in $cf_libdir" >&5
7136 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
7137                                 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
7138                                 cat >conftest.$ac_ext <<_ACEOF
7139 #line 7139 "configure"
7140 #include "confdefs.h"
7141 #include <${cf_cv_ncurses_header:-curses.h}>
7142 int
7143 main ()
7144 {
7145 initscr()
7146   ;
7147   return 0;
7148 }
7149 _ACEOF
7150 rm -f conftest.$ac_objext conftest$ac_exeext
7151 if { (eval echo "$as_me:7151: \"$ac_link\"") >&5
7152   (eval $ac_link) 2>&5
7153   ac_status=$?
7154   echo "$as_me:7154: \$? = $ac_status" >&5
7155   (exit $ac_status); } &&
7156          { ac_try='test -s conftest$ac_exeext'
7157   { (eval echo "$as_me:7157: \"$ac_try\"") >&5
7158   (eval $ac_try) 2>&5
7159   ac_status=$?
7160   echo "$as_me:7160: \$? = $ac_status" >&5
7161   (exit $ac_status); }; }; then
7162   echo "$as_me:7162: result: yes" >&5
7163 echo "${ECHO_T}yes" >&6
7164                                          eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
7165                                          break
7166 else
7167   echo "$as_me: failed program was:" >&5
7168 cat conftest.$ac_ext >&5
7169 echo "$as_me:7169: result: no" >&5
7170 echo "${ECHO_T}no" >&6
7171                                          LIBS="$cf_save_LIBS"
7172 fi
7173 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7174                         done
7175
7176 fi
7177 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7178
7179 fi
7180
7181 eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root
7182
7183 if test $cf_found_library = no ; then
7184         { { echo "$as_me:7184: error: Cannot link $cf_nculib_root library" >&5
7185 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
7186    { (exit 1); exit 1; }; }
7187 fi
7188
7189 fi
7190
7191 if test -n "$cf_ncurses_LIBS" ; then
7192         echo "$as_me:7192: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
7193 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
7194         cf_ncurses_SAVE="$LIBS"
7195         for p in $cf_ncurses_LIBS ; do
7196                 q=`echo $LIBS | sed -e "s%$p %%" -e "s%$p$%%"`
7197                 if test "$q" != "$LIBS" ; then
7198                         LIBS="$q"
7199                 fi
7200         done
7201         cat >conftest.$ac_ext <<_ACEOF
7202 #line 7202 "configure"
7203 #include "confdefs.h"
7204 #include <${cf_cv_ncurses_header:-curses.h}>
7205 int
7206 main ()
7207 {
7208 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
7209   ;
7210   return 0;
7211 }
7212 _ACEOF
7213 rm -f conftest.$ac_objext conftest$ac_exeext
7214 if { (eval echo "$as_me:7214: \"$ac_link\"") >&5
7215   (eval $ac_link) 2>&5
7216   ac_status=$?
7217   echo "$as_me:7217: \$? = $ac_status" >&5
7218   (exit $ac_status); } &&
7219          { ac_try='test -s conftest$ac_exeext'
7220   { (eval echo "$as_me:7220: \"$ac_try\"") >&5
7221   (eval $ac_try) 2>&5
7222   ac_status=$?
7223   echo "$as_me:7223: \$? = $ac_status" >&5
7224   (exit $ac_status); }; }; then
7225   echo "$as_me:7225: result: yes" >&5
7226 echo "${ECHO_T}yes" >&6
7227 else
7228   echo "$as_me: failed program was:" >&5
7229 cat conftest.$ac_ext >&5
7230 echo "$as_me:7230: result: no" >&5
7231 echo "${ECHO_T}no" >&6
7232                  LIBS="$cf_ncurses_SAVE"
7233 fi
7234 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7235 fi
7236
7237 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
7238
7239 cat >>confdefs.h <<EOF
7240 #define $cf_nculib_ROOT 1
7241 EOF
7242
7243 fi
7244
7245 fi
7246
7247 if test "$NCURSES_CONFIG" != none ; then
7248
7249 cf_version=`$NCURSES_CONFIG --version`
7250
7251 NCURSES_MAJOR=`echo "$cf_version" | sed -e 's/\..*//'`
7252 NCURSES_MINOR=`echo "$cf_version" | sed -e 's/^[0-9][0-9]*\.//' -e 's/\..*//'`
7253 NCURSES_PATCH=`echo "$cf_version" | sed -e 's/^[0-9][0-9]*\.[0-9][0-9]*\.//'`
7254
7255 # ABI version is not available from headers
7256 cf_cv_abi_version=`$NCURSES_CONFIG --abi-version`
7257
7258 else
7259
7260 for cf_name in MAJOR MINOR PATCH
7261 do
7262 cat >conftest.$ac_ext <<CF_EOF
7263 #include <${cf_cv_ncurses_header:-curses.h}>
7264 AUTOCONF_$cf_name NCURSES_VERSION_$cf_name
7265 CF_EOF
7266         cf_try="$ac_cpp conftest.$ac_ext 2>&5 | fgrep AUTOCONF_$cf_name >conftest.out"
7267         { (eval echo "$as_me:7267: \"$cf_try\"") >&5
7268   (eval $cf_try) 2>&5
7269   ac_status=$?
7270   echo "$as_me:7270: \$? = $ac_status" >&5
7271   (exit $ac_status); }
7272         if test -f conftest.out ; then
7273                 cf_result=`cat conftest.out | sed -e "s/^.*AUTOCONF_$cf_name[   ][      ]*//"`
7274                 eval NCURSES_$cf_name=\"$cf_result\"
7275                 # cat conftest.$ac_ext
7276                 # cat conftest.out
7277         fi
7278 done
7279
7280 cf_cv_abi_version=${NCURSES_MAJOR}
7281
7282 fi
7283
7284 cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
7285
7286 cf_cv_timestamp=`date`
7287
7288 echo "$as_me:7288: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&5
7289 echo "${ECHO_T}Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&6
7290
7291 echo "$as_me:7291: checking if you want to have a library-prefix" >&5
7292 echo $ECHO_N "checking if you want to have a library-prefix... $ECHO_C" >&6
7293
7294 # Check whether --with-lib-prefix or --without-lib-prefix was given.
7295 if test "${with_lib_prefix+set}" = set; then
7296   withval="$with_lib_prefix"
7297   with_lib_prefix=$withval
7298 else
7299   with_lib_prefix=auto
7300 fi;
7301 echo "$as_me:7301: result: $with_lib_prefix" >&5
7302 echo "${ECHO_T}$with_lib_prefix" >&6
7303
7304 if test $with_lib_prefix = auto
7305 then
7306
7307         case $cf_cv_system_name in #(vi
7308         OS/2*|os2*) #(vi
7309         LIB_PREFIX=''
7310         ;;
7311         *)      LIB_PREFIX='lib'
7312         ;;
7313         esac
7314 cf_prefix=$LIB_PREFIX
7315
7316 elif test $with_lib_prefix = no
7317 then
7318         LIB_PREFIX=
7319 else
7320         LIB_PREFIX=$with_lib_prefix
7321 fi
7322
7323 LIB_SUFFIX=
7324
7325 ###############################################################################
7326
7327 if test X"$CC_G_OPT" = X"" ; then
7328         CC_G_OPT='-g'
7329         test -n "$GCC" && test "${ac_cv_prog_cc_g}" != yes && CC_G_OPT=''
7330 fi
7331
7332 echo "$as_me:7332: checking for default loader flags" >&5
7333 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
7334 case $DFT_LWR_MODEL in
7335 normal)  LD_MODEL=''   ;;
7336 debug)   LD_MODEL=$CC_G_OPT ;;
7337 profile) LD_MODEL='-pg';;
7338 shared)  LD_MODEL=''   ;;
7339 esac
7340 echo "$as_me:7340: result: $LD_MODEL" >&5
7341 echo "${ECHO_T}$LD_MODEL" >&6
7342
7343 LD_RPATH_OPT=
7344 echo "$as_me:7344: checking for an rpath option" >&5
7345 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
7346 case $cf_cv_system_name in #(vi
7347 irix*) #(vi
7348         if test "$GCC" = yes; then
7349                 LD_RPATH_OPT="-Wl,-rpath,"
7350         else
7351                 LD_RPATH_OPT="-rpath "
7352         fi
7353         ;;
7354 linux*|gnu*|k*bsd*-gnu) #(vi
7355         LD_RPATH_OPT="-Wl,-rpath,"
7356         ;;
7357 openbsd[2-9].*|mirbsd*) #(vi
7358         LD_RPATH_OPT="-Wl,-rpath,"
7359         ;;
7360 dragonfly*|freebsd*) #(vi
7361         LD_RPATH_OPT="-rpath "
7362         ;;
7363 netbsd*) #(vi
7364         LD_RPATH_OPT="-Wl,-rpath,"
7365         ;;
7366 osf*|mls+*) #(vi
7367         LD_RPATH_OPT="-rpath "
7368         ;;
7369 solaris2*) #(vi
7370         LD_RPATH_OPT="-R"
7371         ;;
7372 *)
7373         ;;
7374 esac
7375 echo "$as_me:7375: result: $LD_RPATH_OPT" >&5
7376 echo "${ECHO_T}$LD_RPATH_OPT" >&6
7377
7378 case "x$LD_RPATH_OPT" in #(vi
7379 x-R*)
7380         echo "$as_me:7380: checking if we need a space after rpath option" >&5
7381 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
7382         cf_save_LIBS="$LIBS"
7383         LIBS="${LD_RPATH_OPT}$libdir $LIBS"
7384         cat >conftest.$ac_ext <<_ACEOF
7385 #line 7385 "configure"
7386 #include "confdefs.h"
7387
7388 int
7389 main ()
7390 {
7391
7392   ;
7393   return 0;
7394 }
7395 _ACEOF
7396 rm -f conftest.$ac_objext conftest$ac_exeext
7397 if { (eval echo "$as_me:7397: \"$ac_link\"") >&5
7398   (eval $ac_link) 2>&5
7399   ac_status=$?
7400   echo "$as_me:7400: \$? = $ac_status" >&5
7401   (exit $ac_status); } &&
7402          { ac_try='test -s conftest$ac_exeext'
7403   { (eval echo "$as_me:7403: \"$ac_try\"") >&5
7404   (eval $ac_try) 2>&5
7405   ac_status=$?
7406   echo "$as_me:7406: \$? = $ac_status" >&5
7407   (exit $ac_status); }; }; then
7408   cf_rpath_space=no
7409 else
7410   echo "$as_me: failed program was:" >&5
7411 cat conftest.$ac_ext >&5
7412 cf_rpath_space=yes
7413 fi
7414 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7415         LIBS="$cf_save_LIBS"
7416         echo "$as_me:7416: result: $cf_rpath_space" >&5
7417 echo "${ECHO_T}$cf_rpath_space" >&6
7418         test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
7419         ;;
7420 esac
7421
7422         LOCAL_LDFLAGS=
7423         LOCAL_LDFLAGS2=
7424         LD_SHARED_OPTS=
7425         INSTALL_LIB="-m 644"
7426
7427         cf_cv_do_symlinks=no
7428         cf_ld_rpath_opt=
7429         test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT"
7430
7431         echo "$as_me:7431: checking if release/abi version should be used for shared libs" >&5
7432 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
7433
7434 # Check whether --with-shlib-version or --without-shlib-version was given.
7435 if test "${with_shlib_version+set}" = set; then
7436   withval="$with_shlib_version"
7437   test -z "$withval" && withval=auto
7438         case $withval in #(vi
7439         yes) #(vi
7440                 cf_cv_shlib_version=auto
7441                 ;;
7442         rel|abi|auto|no) #(vi
7443                 cf_cv_shlib_version=$withval
7444                 ;;
7445         *)
7446                 { { echo "$as_me:7446: error: option value must be one of: rel, abi, auto or no" >&5
7447 echo "$as_me: error: option value must be one of: rel, abi, auto or no" >&2;}
7448    { (exit 1); exit 1; }; }
7449                 ;;
7450         esac
7451
7452 else
7453   cf_cv_shlib_version=auto
7454 fi;
7455         echo "$as_me:7455: result: $cf_cv_shlib_version" >&5
7456 echo "${ECHO_T}$cf_cv_shlib_version" >&6
7457
7458         cf_cv_rm_so_locs=no
7459
7460         # Some less-capable ports of gcc support only -fpic
7461         CC_SHARED_OPTS=
7462         if test "$GCC" = yes
7463         then
7464                 echo "$as_me:7464: checking which $CC option to use" >&5
7465 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
7466                 cf_save_CFLAGS="$CFLAGS"
7467                 for CC_SHARED_OPTS in -fPIC -fpic ''
7468                 do
7469                         CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
7470                         cat >conftest.$ac_ext <<_ACEOF
7471 #line 7471 "configure"
7472 #include "confdefs.h"
7473 #include <stdio.h>
7474 int
7475 main ()
7476 {
7477 int x = 1
7478   ;
7479   return 0;
7480 }
7481 _ACEOF
7482 rm -f conftest.$ac_objext
7483 if { (eval echo "$as_me:7483: \"$ac_compile\"") >&5
7484   (eval $ac_compile) 2>&5
7485   ac_status=$?
7486   echo "$as_me:7486: \$? = $ac_status" >&5
7487   (exit $ac_status); } &&
7488          { ac_try='test -s conftest.$ac_objext'
7489   { (eval echo "$as_me:7489: \"$ac_try\"") >&5
7490   (eval $ac_try) 2>&5
7491   ac_status=$?
7492   echo "$as_me:7492: \$? = $ac_status" >&5
7493   (exit $ac_status); }; }; then
7494   break
7495 else
7496   echo "$as_me: failed program was:" >&5
7497 cat conftest.$ac_ext >&5
7498 fi
7499 rm -f conftest.$ac_objext conftest.$ac_ext
7500                 done
7501                 echo "$as_me:7501: result: $CC_SHARED_OPTS" >&5
7502 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
7503                 CFLAGS="$cf_save_CFLAGS"
7504         fi
7505
7506         cf_cv_shlib_version_infix=no
7507
7508         case $cf_cv_system_name in #(vi
7509         aix4.3-9*|aix[5-7]*) #(vi
7510                 if test "$GCC" = yes; then
7511                         CC_SHARED_OPTS=
7512                         MK_SHARED_LIB='${CC} -shared -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
7513                 else
7514                         # CC_SHARED_OPTS='-qpic=large -G'
7515                         # perhaps "-bM:SRE -bnoentry -bexpall"
7516                         MK_SHARED_LIB='${CC} -G -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
7517                 fi
7518                 ;;
7519         beos*) #(vi
7520                 MK_SHARED_LIB='${CC} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
7521                 ;;
7522         cygwin*) #(vi
7523                 CC_SHARED_OPTS=
7524                 MK_SHARED_LIB='sh ../mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
7525                 cf_cv_shlib_version=cygdll
7526                 cf_cv_shlib_version_infix=cygdll
7527                 cat >mk_shared_lib.sh <<-CF_EOF
7528                 #!/bin/sh
7529                 SHARED_LIB=\$1
7530                 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
7531                 shift
7532                 cat <<-EOF
7533                 Linking shared library
7534                 ** SHARED_LIB \$SHARED_LIB
7535                 ** IMPORT_LIB \$IMPORT_LIB
7536 EOF
7537                 exec \$* -shared -Wl,--out-implib=../lib/\${IMPORT_LIB} -Wl,--export-all-symbols -o ../lib/\${SHARED_LIB}
7538 CF_EOF
7539                 chmod +x mk_shared_lib.sh
7540                 ;;
7541         darwin*) #(vi
7542                 EXTRA_CFLAGS="-no-cpp-precomp"
7543                 CC_SHARED_OPTS="-dynamic"
7544                 MK_SHARED_LIB='${CC} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
7545                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
7546                 cf_cv_shlib_version_infix=yes
7547                 echo "$as_me:7547: checking if ld -search_paths_first works" >&5
7548 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
7549 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
7550   echo $ECHO_N "(cached) $ECHO_C" >&6
7551 else
7552
7553                         cf_save_LDFLAGS=$LDFLAGS
7554                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
7555                         cat >conftest.$ac_ext <<_ACEOF
7556 #line 7556 "configure"
7557 #include "confdefs.h"
7558
7559 int
7560 main ()
7561 {
7562 int i;
7563   ;
7564   return 0;
7565 }
7566 _ACEOF
7567 rm -f conftest.$ac_objext conftest$ac_exeext
7568 if { (eval echo "$as_me:7568: \"$ac_link\"") >&5
7569   (eval $ac_link) 2>&5
7570   ac_status=$?
7571   echo "$as_me:7571: \$? = $ac_status" >&5
7572   (exit $ac_status); } &&
7573          { ac_try='test -s conftest$ac_exeext'
7574   { (eval echo "$as_me:7574: \"$ac_try\"") >&5
7575   (eval $ac_try) 2>&5
7576   ac_status=$?
7577   echo "$as_me:7577: \$? = $ac_status" >&5
7578   (exit $ac_status); }; }; then
7579   cf_cv_ldflags_search_paths_first=yes
7580 else
7581   echo "$as_me: failed program was:" >&5
7582 cat conftest.$ac_ext >&5
7583 cf_cv_ldflags_search_paths_first=no
7584 fi
7585 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7586                                 LDFLAGS=$cf_save_LDFLAGS
7587 fi
7588 echo "$as_me:7588: result: $cf_cv_ldflags_search_paths_first" >&5
7589 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
7590                 if test $cf_cv_ldflags_search_paths_first = yes; then
7591                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
7592                 fi
7593                 ;;
7594         hpux*) #(vi
7595                 # (tested with gcc 2.7.2 -- I don't have c89)
7596                 if test "$GCC" = yes; then
7597                         LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
7598                 else
7599                         CC_SHARED_OPTS='+Z'
7600                         LD_SHARED_OPTS='-Wl,+b,${libdir}'
7601                 fi
7602                 MK_SHARED_LIB='${LD} +b ${libdir} -b -o $@'
7603                 # HP-UX shared libraries must be executable, and should be
7604                 # readonly to exploit a quirk in the memory manager.
7605                 INSTALL_LIB="-m 555"
7606                 ;;
7607         interix*)
7608                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
7609                 if test "$cf_cv_shlib_version" = rel; then
7610                         cf_shared_soname='`basename  .${REL_VERSION}`.${ABI_VERSION}'
7611                 else
7612                         cf_shared_soname='`basename `'
7613                 fi
7614                 CC_SHARED_OPTS=
7615                 MK_SHARED_LIB='${CC} -shared -Wl,-rpath,${RPATH_LIST} -Wl,-h,'$cf_shared_soname' -o '
7616                 ;;
7617         irix*) #(vi
7618                 if test "$cf_cv_enable_rpath" = yes ; then
7619                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
7620                 fi
7621                 # tested with IRIX 5.2 and 'cc'.
7622                 if test "$GCC" != yes; then
7623                         CC_SHARED_OPTS='-KPIC'
7624                         MK_SHARED_LIB='${CC} -shared -rdata_shared -soname `basename $@` -o $@'
7625                 else
7626                         MK_SHARED_LIB='${CC} -shared -Wl,-soname,`basename $@` -o $@'
7627                 fi
7628                 cf_cv_rm_so_locs=yes
7629                 ;;
7630         linux*|gnu*|k*bsd*-gnu) #(vi
7631                 if test "$DFT_LWR_MODEL" = "shared" ; then
7632                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
7633                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
7634                 fi
7635                 if test "$cf_cv_enable_rpath" = yes ; then
7636                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
7637                 fi
7638
7639         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
7640         if test "$cf_cv_shlib_version" = rel; then
7641                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
7642         else
7643                 cf_cv_shared_soname='`basename $@`'
7644         fi
7645
7646                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
7647                 ;;
7648         mingw*) #(vi
7649                 cf_cv_shlib_version=mingw
7650                 cf_cv_shlib_version_infix=mingw
7651                 CC_SHARED_OPTS=
7652                 MK_SHARED_LIB='sh ../mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
7653                 #MK_SHARED_LIB='${CC} ${CFLAGS} -mdll -Wl,-soname,'$cf_cv_shared_soname',-stats -o $[@]'
7654                 #MK_SHARED_LIB='${DLLTOOL} --export-all-symbols --output-exp --output-lib $[@]'
7655                 cat >mk_shared_lib.sh <<-CF_EOF
7656                 #!/bin/sh
7657                 SHARED_LIB=\$1
7658                 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.a/'\`
7659                 shift
7660                 cat <<-EOF
7661                 Linking shared library
7662                 ** SHARED_LIB \$SHARED_LIB
7663                 ** IMPORT_LIB \$IMPORT_LIB
7664 EOF
7665                 exec \$* -shared -Wl,--out-implib=../lib/\${IMPORT_LIB} -Wl,--export-all-symbols -o ../lib/\${SHARED_LIB}
7666 CF_EOF
7667                 chmod +x mk_shared_lib.sh
7668                 ;;
7669         openbsd[2-9].*|mirbsd*) #(vi
7670                 if test "$DFT_LWR_MODEL" = "shared" ; then
7671                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
7672                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
7673                 fi
7674                 if test "$cf_cv_enable_rpath" = yes ; then
7675                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
7676                 fi
7677                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
7678
7679         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
7680         if test "$cf_cv_shlib_version" = rel; then
7681                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
7682         else
7683                 cf_cv_shared_soname='`basename $@`'
7684         fi
7685
7686                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
7687                 ;;
7688         nto-qnx*|openbsd*|freebsd[12].*) #(vi
7689                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
7690                 MK_SHARED_LIB='${LD} -Bshareable -o $@'
7691                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
7692                 ;;
7693         dragonfly*|freebsd*) #(vi
7694                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
7695                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
7696                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
7697                         LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${RPATH_LIST} $LOCAL_LDFLAGS"
7698                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
7699                 fi
7700
7701         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
7702         if test "$cf_cv_shlib_version" = rel; then
7703                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
7704         else
7705                 cf_cv_shared_soname='`basename $@`'
7706         fi
7707
7708                 MK_SHARED_LIB='${LD} -shared -Bshareable -soname=`basename $@` -o $@'
7709                 ;;
7710         netbsd*) #(vi
7711                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
7712                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
7713                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
7714                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
7715                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
7716                         if test "$cf_cv_shlib_version" = auto; then
7717                         if test -f /usr/libexec/ld.elf_so; then
7718                                 cf_cv_shlib_version=abi
7719                         else
7720                                 cf_cv_shlib_version=rel
7721                         fi
7722                         fi
7723
7724         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
7725         if test "$cf_cv_shlib_version" = rel; then
7726                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
7727         else
7728                 cf_cv_shared_soname='`basename $@`'
7729         fi
7730
7731                         MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
7732                 else
7733                         MK_SHARED_LIB='${LD} -shared -Bshareable -o $@'
7734                 fi
7735                 ;;
7736         osf*|mls+*) #(vi
7737                 # tested with OSF/1 V3.2 and 'cc'
7738                 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
7739                 # link with shared libs).
7740                 MK_SHARED_LIB='${LD} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
7741                 case $host_os in #(vi
7742                 osf4*)
7743                         MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
7744                         ;;
7745                 esac
7746                 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
7747                 if test "$DFT_LWR_MODEL" = "shared" ; then
7748                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
7749                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
7750                 fi
7751                 cf_cv_rm_so_locs=yes
7752                 ;;
7753         sco3.2v5*)  # (also uw2* and UW7: hops 13-Apr-98
7754                 # tested with osr5.0.5
7755                 if test "$GCC" != yes; then
7756                         CC_SHARED_OPTS='-belf -KPIC'
7757                 fi
7758                 MK_SHARED_LIB='${LD} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
7759                 if test "$cf_cv_enable_rpath" = yes ; then
7760                         # only way is to set LD_RUN_PATH but no switch for it
7761                         RUN_PATH=$libdir
7762                 fi
7763                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
7764                 LINK_PROGS='LD_RUN_PATH=${libdir}'
7765                 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
7766                 ;;
7767         sunos4*) #(vi
7768                 # tested with SunOS 4.1.1 and gcc 2.7.0
7769                 if test "$GCC" != yes; then
7770                         CC_SHARED_OPTS='-KPIC'
7771                 fi
7772                 MK_SHARED_LIB='${LD} -assert pure-text -o $@'
7773                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
7774                 ;;
7775         solaris2*) #(vi
7776                 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
7777                 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
7778                 if test "$DFT_LWR_MODEL" = "shared" ; then
7779                         LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
7780                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
7781                 fi
7782                 if test "$cf_cv_enable_rpath" = yes ; then
7783                         EXTRA_LDFLAGS="-R \${libdir} $EXTRA_LDFLAGS"
7784                 fi
7785
7786         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
7787         if test "$cf_cv_shlib_version" = rel; then
7788                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
7789         else
7790                 cf_cv_shared_soname='`basename $@`'
7791         fi
7792
7793                 if test "$GCC" != yes; then
7794                         cf_save_CFLAGS="$CFLAGS"
7795                         for cf_shared_opts in -xcode=pic32 -xcode=pic13 -KPIC -Kpic -O
7796                         do
7797                                 CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
7798                                 cat >conftest.$ac_ext <<_ACEOF
7799 #line 7799 "configure"
7800 #include "confdefs.h"
7801 #include <stdio.h>
7802 int
7803 main ()
7804 {
7805 printf("Hello\n");
7806   ;
7807   return 0;
7808 }
7809 _ACEOF
7810 rm -f conftest.$ac_objext
7811 if { (eval echo "$as_me:7811: \"$ac_compile\"") >&5
7812   (eval $ac_compile) 2>&5
7813   ac_status=$?
7814   echo "$as_me:7814: \$? = $ac_status" >&5
7815   (exit $ac_status); } &&
7816          { ac_try='test -s conftest.$ac_objext'
7817   { (eval echo "$as_me:7817: \"$ac_try\"") >&5
7818   (eval $ac_try) 2>&5
7819   ac_status=$?
7820   echo "$as_me:7820: \$? = $ac_status" >&5
7821   (exit $ac_status); }; }; then
7822   break
7823 else
7824   echo "$as_me: failed program was:" >&5
7825 cat conftest.$ac_ext >&5
7826 fi
7827 rm -f conftest.$ac_objext conftest.$ac_ext
7828                         done
7829                         CFLAGS="$cf_save_CFLAGS"
7830                         CC_SHARED_OPTS=$cf_shared_opts
7831                         MK_SHARED_LIB='${CC} -dy -G -h '$cf_cv_shared_soname' -o $@'
7832                 else
7833                         MK_SHARED_LIB='${CC} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
7834                 fi
7835                 ;;
7836         sysv5uw7*|unix_sv*) #(vi
7837                 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
7838                 if test "$GCC" != yes; then
7839                         CC_SHARED_OPTS='-KPIC'
7840                 fi
7841                 MK_SHARED_LIB='${LD} -d y -G -o $@'
7842                 ;;
7843         *)
7844                 CC_SHARED_OPTS='unknown'
7845                 MK_SHARED_LIB='echo unknown'
7846                 ;;
7847         esac
7848
7849         # This works if the last tokens in $MK_SHARED_LIB are the -o target.
7850         case "$cf_cv_shlib_version" in #(vi
7851         rel|abi)
7852                 case "$MK_SHARED_LIB" in #(vi
7853                 *'-o $@') #(vi
7854                         test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
7855                         ;;
7856                 *)
7857                         { echo "$as_me:7857: WARNING: ignored --with-shlib-version" >&5
7858 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
7859                         ;;
7860                 esac
7861                 ;;
7862         esac
7863
7864         # RPATH_LIST is a colon-separated list of directories
7865         test -n "$cf_ld_rpath_opt" && MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${RPATH_LIST}"
7866         test -z "$RPATH_LIST" && RPATH_LIST="\${libdir}"
7867
7868         test -n "$verbose" && echo "    CC_SHARED_OPTS: $CC_SHARED_OPTS" 1>&6
7869
7870 echo "${as_me:-configure}:7870: testing CC_SHARED_OPTS: $CC_SHARED_OPTS ..." 1>&5
7871
7872         test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
7873
7874 echo "${as_me:-configure}:7874: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
7875
7876 # The test/sample programs in the original tree link using rpath option.
7877 # Make it optional for packagers.
7878 if test -n "$LOCAL_LDFLAGS"
7879 then
7880         echo "$as_me:7880: checking if you want to link sample programs with rpath option" >&5
7881 echo $ECHO_N "checking if you want to link sample programs with rpath option... $ECHO_C" >&6
7882
7883 # Check whether --enable-rpath-link or --disable-rpath-link was given.
7884 if test "${enable_rpath_link+set}" = set; then
7885   enableval="$enable_rpath_link"
7886   with_rpath_link=$enableval
7887 else
7888   with_rpath_link=yes
7889 fi;
7890         echo "$as_me:7890: result: $with_rpath_link" >&5
7891 echo "${ECHO_T}$with_rpath_link" >&6
7892         if test "$with_rpath_link" = no
7893         then
7894                 LOCAL_LDFLAGS=
7895                 LOCAL_LDFLAGS2=
7896         fi
7897 fi
7898
7899 ###############################################################################
7900
7901 ###   use option --enable-broken-linker to force on use of broken-linker support
7902 echo "$as_me:7902: checking if you want broken-linker support code" >&5
7903 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
7904
7905 # Check whether --enable-broken_linker or --disable-broken_linker was given.
7906 if test "${enable_broken_linker+set}" = set; then
7907   enableval="$enable_broken_linker"
7908   with_broken_linker=$enableval
7909 else
7910   with_broken_linker=${BROKEN_LINKER:-no}
7911 fi;
7912 echo "$as_me:7912: result: $with_broken_linker" >&5
7913 echo "${ECHO_T}$with_broken_linker" >&6
7914
7915 BROKEN_LINKER=0
7916 if test "$with_broken_linker" = yes ; then
7917         cat >>confdefs.h <<\EOF
7918 #define BROKEN_LINKER 1
7919 EOF
7920
7921         BROKEN_LINKER=1
7922 elif test "$DFT_LWR_MODEL" = shared ; then
7923         case $cf_cv_system_name in #(vi
7924         cygwin*)
7925                 cat >>confdefs.h <<\EOF
7926 #define BROKEN_LINKER 1
7927 EOF
7928
7929                 BROKEN_LINKER=1
7930                 test -n "$verbose" && echo "    cygwin linker is broken anyway" 1>&6
7931
7932 echo "${as_me:-configure}:7932: testing cygwin linker is broken anyway ..." 1>&5
7933
7934                 ;;
7935         esac
7936 fi
7937
7938 # Check to define _XOPEN_SOURCE "automatically"
7939
7940 cf_XOPEN_SOURCE=500
7941 cf_POSIX_C_SOURCE=199506L
7942 cf_xopen_source=
7943
7944 case $host_os in #(vi
7945 aix[4-7]*) #(vi
7946         cf_xopen_source="-D_ALL_SOURCE"
7947         ;;
7948 cygwin) #(vi
7949         cf_XOPEN_SOURCE=600
7950         ;;
7951 darwin[0-8].*) #(vi
7952         cf_xopen_source="-D_APPLE_C_SOURCE"
7953         ;;
7954 darwin*) #(vi
7955         cf_xopen_source="-D_DARWIN_C_SOURCE"
7956         cf_XOPEN_SOURCE=
7957         ;;
7958 freebsd*|dragonfly*) #(vi
7959         # 5.x headers associate
7960         #       _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
7961         #       _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
7962         cf_POSIX_C_SOURCE=200112L
7963         cf_XOPEN_SOURCE=600
7964         cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
7965         ;;
7966 hpux11*) #(vi
7967         cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
7968         ;;
7969 hpux*) #(vi
7970         cf_xopen_source="-D_HPUX_SOURCE"
7971         ;;
7972 irix[56].*) #(vi
7973         cf_xopen_source="-D_SGI_SOURCE"
7974         cf_XOPEN_SOURCE=
7975         ;;
7976 linux*|gnu*|mint*|k*bsd*-gnu) #(vi
7977
7978 echo "$as_me:7978: checking if we must define _GNU_SOURCE" >&5
7979 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
7980 if test "${cf_cv_gnu_source+set}" = set; then
7981   echo $ECHO_N "(cached) $ECHO_C" >&6
7982 else
7983
7984 cat >conftest.$ac_ext <<_ACEOF
7985 #line 7985 "configure"
7986 #include "confdefs.h"
7987 #include <sys/types.h>
7988 int
7989 main ()
7990 {
7991
7992 #ifndef _XOPEN_SOURCE
7993 make an error
7994 #endif
7995   ;
7996   return 0;
7997 }
7998 _ACEOF
7999 rm -f conftest.$ac_objext
8000 if { (eval echo "$as_me:8000: \"$ac_compile\"") >&5
8001   (eval $ac_compile) 2>&5
8002   ac_status=$?
8003   echo "$as_me:8003: \$? = $ac_status" >&5
8004   (exit $ac_status); } &&
8005          { ac_try='test -s conftest.$ac_objext'
8006   { (eval echo "$as_me:8006: \"$ac_try\"") >&5
8007   (eval $ac_try) 2>&5
8008   ac_status=$?
8009   echo "$as_me:8009: \$? = $ac_status" >&5
8010   (exit $ac_status); }; }; then
8011   cf_cv_gnu_source=no
8012 else
8013   echo "$as_me: failed program was:" >&5
8014 cat conftest.$ac_ext >&5
8015 cf_save="$CPPFLAGS"
8016          CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
8017          cat >conftest.$ac_ext <<_ACEOF
8018 #line 8018 "configure"
8019 #include "confdefs.h"
8020 #include <sys/types.h>
8021 int
8022 main ()
8023 {
8024
8025 #ifdef _XOPEN_SOURCE
8026 make an error
8027 #endif
8028   ;
8029   return 0;
8030 }
8031 _ACEOF
8032 rm -f conftest.$ac_objext
8033 if { (eval echo "$as_me:8033: \"$ac_compile\"") >&5
8034   (eval $ac_compile) 2>&5
8035   ac_status=$?
8036   echo "$as_me:8036: \$? = $ac_status" >&5
8037   (exit $ac_status); } &&
8038          { ac_try='test -s conftest.$ac_objext'
8039   { (eval echo "$as_me:8039: \"$ac_try\"") >&5
8040   (eval $ac_try) 2>&5
8041   ac_status=$?
8042   echo "$as_me:8042: \$? = $ac_status" >&5
8043   (exit $ac_status); }; }; then
8044   cf_cv_gnu_source=no
8045 else
8046   echo "$as_me: failed program was:" >&5
8047 cat conftest.$ac_ext >&5
8048 cf_cv_gnu_source=yes
8049 fi
8050 rm -f conftest.$ac_objext conftest.$ac_ext
8051         CPPFLAGS="$cf_save"
8052
8053 fi
8054 rm -f conftest.$ac_objext conftest.$ac_ext
8055
8056 fi
8057 echo "$as_me:8057: result: $cf_cv_gnu_source" >&5
8058 echo "${ECHO_T}$cf_cv_gnu_source" >&6
8059 test "$cf_cv_gnu_source" = yes && CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
8060
8061         ;;
8062 mirbsd*) #(vi
8063         # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
8064         cf_XOPEN_SOURCE=
8065
8066 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
8067
8068 cf_save_CFLAGS="$CFLAGS"
8069 cf_save_CPPFLAGS="$CPPFLAGS"
8070
8071 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
8072         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
8073                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
8074
8075 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
8076         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
8077                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
8078
8079 echo "$as_me:8079: checking if we should define _POSIX_C_SOURCE" >&5
8080 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
8081 if test "${cf_cv_posix_c_source+set}" = set; then
8082   echo $ECHO_N "(cached) $ECHO_C" >&6
8083 else
8084
8085 echo "${as_me:-configure}:8085: testing if the symbol is already defined go no further ..." 1>&5
8086
8087         cat >conftest.$ac_ext <<_ACEOF
8088 #line 8088 "configure"
8089 #include "confdefs.h"
8090 #include <sys/types.h>
8091 int
8092 main ()
8093 {
8094
8095 #ifndef _POSIX_C_SOURCE
8096 make an error
8097 #endif
8098   ;
8099   return 0;
8100 }
8101 _ACEOF
8102 rm -f conftest.$ac_objext
8103 if { (eval echo "$as_me:8103: \"$ac_compile\"") >&5
8104   (eval $ac_compile) 2>&5
8105   ac_status=$?
8106   echo "$as_me:8106: \$? = $ac_status" >&5
8107   (exit $ac_status); } &&
8108          { ac_try='test -s conftest.$ac_objext'
8109   { (eval echo "$as_me:8109: \"$ac_try\"") >&5
8110   (eval $ac_try) 2>&5
8111   ac_status=$?
8112   echo "$as_me:8112: \$? = $ac_status" >&5
8113   (exit $ac_status); }; }; then
8114   cf_cv_posix_c_source=no
8115 else
8116   echo "$as_me: failed program was:" >&5
8117 cat conftest.$ac_ext >&5
8118 cf_want_posix_source=no
8119          case .$cf_POSIX_C_SOURCE in #(vi
8120          .[12]??*) #(vi
8121                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
8122                 ;;
8123          .2) #(vi
8124                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
8125                 cf_want_posix_source=yes
8126                 ;;
8127          .*)
8128                 cf_want_posix_source=yes
8129                 ;;
8130          esac
8131          if test "$cf_want_posix_source" = yes ; then
8132                 cat >conftest.$ac_ext <<_ACEOF
8133 #line 8133 "configure"
8134 #include "confdefs.h"
8135 #include <sys/types.h>
8136 int
8137 main ()
8138 {
8139
8140 #ifdef _POSIX_SOURCE
8141 make an error
8142 #endif
8143   ;
8144   return 0;
8145 }
8146 _ACEOF
8147 rm -f conftest.$ac_objext
8148 if { (eval echo "$as_me:8148: \"$ac_compile\"") >&5
8149   (eval $ac_compile) 2>&5
8150   ac_status=$?
8151   echo "$as_me:8151: \$? = $ac_status" >&5
8152   (exit $ac_status); } &&
8153          { ac_try='test -s conftest.$ac_objext'
8154   { (eval echo "$as_me:8154: \"$ac_try\"") >&5
8155   (eval $ac_try) 2>&5
8156   ac_status=$?
8157   echo "$as_me:8157: \$? = $ac_status" >&5
8158   (exit $ac_status); }; }; then
8159   :
8160 else
8161   echo "$as_me: failed program was:" >&5
8162 cat conftest.$ac_ext >&5
8163 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
8164 fi
8165 rm -f conftest.$ac_objext conftest.$ac_ext
8166          fi
8167
8168 echo "${as_me:-configure}:8168: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
8169
8170          CFLAGS="$cf_trim_CFLAGS"
8171          CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
8172
8173 echo "${as_me:-configure}:8173: testing if the second compile does not leave our definition intact error ..." 1>&5
8174
8175          cat >conftest.$ac_ext <<_ACEOF
8176 #line 8176 "configure"
8177 #include "confdefs.h"
8178 #include <sys/types.h>
8179 int
8180 main ()
8181 {
8182
8183 #ifndef _POSIX_C_SOURCE
8184 make an error
8185 #endif
8186   ;
8187   return 0;
8188 }
8189 _ACEOF
8190 rm -f conftest.$ac_objext
8191 if { (eval echo "$as_me:8191: \"$ac_compile\"") >&5
8192   (eval $ac_compile) 2>&5
8193   ac_status=$?
8194   echo "$as_me:8194: \$? = $ac_status" >&5
8195   (exit $ac_status); } &&
8196          { ac_try='test -s conftest.$ac_objext'
8197   { (eval echo "$as_me:8197: \"$ac_try\"") >&5
8198   (eval $ac_try) 2>&5
8199   ac_status=$?
8200   echo "$as_me:8200: \$? = $ac_status" >&5
8201   (exit $ac_status); }; }; then
8202   :
8203 else
8204   echo "$as_me: failed program was:" >&5
8205 cat conftest.$ac_ext >&5
8206 cf_cv_posix_c_source=no
8207 fi
8208 rm -f conftest.$ac_objext conftest.$ac_ext
8209          CFLAGS="$cf_save_CFLAGS"
8210          CPPFLAGS="$cf_save_CPPFLAGS"
8211
8212 fi
8213 rm -f conftest.$ac_objext conftest.$ac_ext
8214
8215 fi
8216 echo "$as_me:8216: result: $cf_cv_posix_c_source" >&5
8217 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
8218
8219 if test "$cf_cv_posix_c_source" != no ; then
8220         CFLAGS="$cf_trim_CFLAGS"
8221         CPPFLAGS="$cf_trim_CPPFLAGS"
8222
8223 cf_fix_cppflags=no
8224 cf_new_cflags=
8225 cf_new_cppflags=
8226 cf_new_extra_cppflags=
8227
8228 for cf_add_cflags in $cf_cv_posix_c_source
8229 do
8230 case $cf_fix_cppflags in
8231 no)
8232         case $cf_add_cflags in #(vi
8233         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
8234                 case $cf_add_cflags in
8235                 -D*)
8236                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8237
8238                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
8239                                 && test -z "${cf_tst_cflags}" \
8240                                 && cf_fix_cppflags=yes
8241
8242                         if test $cf_fix_cppflags = yes ; then
8243                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8244                                 continue
8245                         elif test "${cf_tst_cflags}" = "\"'" ; then
8246                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8247                                 continue
8248                         fi
8249                         ;;
8250                 esac
8251                 case "$CPPFLAGS" in
8252                 *$cf_add_cflags) #(vi
8253                         ;;
8254                 *) #(vi
8255                         case $cf_add_cflags in #(vi
8256                         -D*)
8257                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8258
8259 CPPFLAGS=`echo "$CPPFLAGS" | \
8260         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8261                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8262
8263                                 ;;
8264                         esac
8265                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8266                         ;;
8267                 esac
8268                 ;;
8269         *)
8270                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8271                 ;;
8272         esac
8273         ;;
8274 yes)
8275         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8276
8277         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8278
8279         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
8280                 && test -z "${cf_tst_cflags}" \
8281                 && cf_fix_cppflags=no
8282         ;;
8283 esac
8284 done
8285
8286 if test -n "$cf_new_cflags" ; then
8287
8288         CFLAGS="$CFLAGS $cf_new_cflags"
8289 fi
8290
8291 if test -n "$cf_new_cppflags" ; then
8292
8293         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8294 fi
8295
8296 if test -n "$cf_new_extra_cppflags" ; then
8297
8298         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8299 fi
8300
8301 fi
8302
8303         ;;
8304 netbsd*) #(vi
8305         cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
8306         ;;
8307 openbsd[4-9]*) #(vi
8308         # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
8309         cf_xopen_source="-D_BSD_SOURCE"
8310         cf_XOPEN_SOURCE=600
8311         ;;
8312 openbsd*) #(vi
8313         # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
8314         ;;
8315 osf[45]*) #(vi
8316         cf_xopen_source="-D_OSF_SOURCE"
8317         ;;
8318 nto-qnx*) #(vi
8319         cf_xopen_source="-D_QNX_SOURCE"
8320         ;;
8321 sco*) #(vi
8322         # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
8323         ;;
8324 solaris2.*) #(vi
8325         cf_xopen_source="-D__EXTENSIONS__"
8326         ;;
8327 *)
8328
8329 echo "$as_me:8329: checking if we should define _XOPEN_SOURCE" >&5
8330 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
8331 if test "${cf_cv_xopen_source+set}" = set; then
8332   echo $ECHO_N "(cached) $ECHO_C" >&6
8333 else
8334
8335         cat >conftest.$ac_ext <<_ACEOF
8336 #line 8336 "configure"
8337 #include "confdefs.h"
8338
8339 #include <stdlib.h>
8340 #include <string.h>
8341 #include <sys/types.h>
8342
8343 int
8344 main ()
8345 {
8346
8347 #ifndef _XOPEN_SOURCE
8348 make an error
8349 #endif
8350   ;
8351   return 0;
8352 }
8353 _ACEOF
8354 rm -f conftest.$ac_objext
8355 if { (eval echo "$as_me:8355: \"$ac_compile\"") >&5
8356   (eval $ac_compile) 2>&5
8357   ac_status=$?
8358   echo "$as_me:8358: \$? = $ac_status" >&5
8359   (exit $ac_status); } &&
8360          { ac_try='test -s conftest.$ac_objext'
8361   { (eval echo "$as_me:8361: \"$ac_try\"") >&5
8362   (eval $ac_try) 2>&5
8363   ac_status=$?
8364   echo "$as_me:8364: \$? = $ac_status" >&5
8365   (exit $ac_status); }; }; then
8366   cf_cv_xopen_source=no
8367 else
8368   echo "$as_me: failed program was:" >&5
8369 cat conftest.$ac_ext >&5
8370 cf_save="$CPPFLAGS"
8371          CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
8372          cat >conftest.$ac_ext <<_ACEOF
8373 #line 8373 "configure"
8374 #include "confdefs.h"
8375
8376 #include <stdlib.h>
8377 #include <string.h>
8378 #include <sys/types.h>
8379
8380 int
8381 main ()
8382 {
8383
8384 #ifdef _XOPEN_SOURCE
8385 make an error
8386 #endif
8387   ;
8388   return 0;
8389 }
8390 _ACEOF
8391 rm -f conftest.$ac_objext
8392 if { (eval echo "$as_me:8392: \"$ac_compile\"") >&5
8393   (eval $ac_compile) 2>&5
8394   ac_status=$?
8395   echo "$as_me:8395: \$? = $ac_status" >&5
8396   (exit $ac_status); } &&
8397          { ac_try='test -s conftest.$ac_objext'
8398   { (eval echo "$as_me:8398: \"$ac_try\"") >&5
8399   (eval $ac_try) 2>&5
8400   ac_status=$?
8401   echo "$as_me:8401: \$? = $ac_status" >&5
8402   (exit $ac_status); }; }; then
8403   cf_cv_xopen_source=no
8404 else
8405   echo "$as_me: failed program was:" >&5
8406 cat conftest.$ac_ext >&5
8407 cf_cv_xopen_source=$cf_XOPEN_SOURCE
8408 fi
8409 rm -f conftest.$ac_objext conftest.$ac_ext
8410         CPPFLAGS="$cf_save"
8411
8412 fi
8413 rm -f conftest.$ac_objext conftest.$ac_ext
8414
8415 fi
8416 echo "$as_me:8416: result: $cf_cv_xopen_source" >&5
8417 echo "${ECHO_T}$cf_cv_xopen_source" >&6
8418
8419 if test "$cf_cv_xopen_source" != no ; then
8420
8421 CFLAGS=`echo "$CFLAGS" | \
8422         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
8423                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
8424
8425 CPPFLAGS=`echo "$CPPFLAGS" | \
8426         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
8427                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
8428
8429         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
8430
8431 cf_fix_cppflags=no
8432 cf_new_cflags=
8433 cf_new_cppflags=
8434 cf_new_extra_cppflags=
8435
8436 for cf_add_cflags in $cf_temp_xopen_source
8437 do
8438 case $cf_fix_cppflags in
8439 no)
8440         case $cf_add_cflags in #(vi
8441         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
8442                 case $cf_add_cflags in
8443                 -D*)
8444                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8445
8446                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
8447                                 && test -z "${cf_tst_cflags}" \
8448                                 && cf_fix_cppflags=yes
8449
8450                         if test $cf_fix_cppflags = yes ; then
8451                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8452                                 continue
8453                         elif test "${cf_tst_cflags}" = "\"'" ; then
8454                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8455                                 continue
8456                         fi
8457                         ;;
8458                 esac
8459                 case "$CPPFLAGS" in
8460                 *$cf_add_cflags) #(vi
8461                         ;;
8462                 *) #(vi
8463                         case $cf_add_cflags in #(vi
8464                         -D*)
8465                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8466
8467 CPPFLAGS=`echo "$CPPFLAGS" | \
8468         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8469                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8470
8471                                 ;;
8472                         esac
8473                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8474                         ;;
8475                 esac
8476                 ;;
8477         *)
8478                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8479                 ;;
8480         esac
8481         ;;
8482 yes)
8483         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8484
8485         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8486
8487         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
8488                 && test -z "${cf_tst_cflags}" \
8489                 && cf_fix_cppflags=no
8490         ;;
8491 esac
8492 done
8493
8494 if test -n "$cf_new_cflags" ; then
8495
8496         CFLAGS="$CFLAGS $cf_new_cflags"
8497 fi
8498
8499 if test -n "$cf_new_cppflags" ; then
8500
8501         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8502 fi
8503
8504 if test -n "$cf_new_extra_cppflags" ; then
8505
8506         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8507 fi
8508
8509 fi
8510
8511 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
8512
8513 cf_save_CFLAGS="$CFLAGS"
8514 cf_save_CPPFLAGS="$CPPFLAGS"
8515
8516 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
8517         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
8518                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
8519
8520 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
8521         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
8522                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
8523
8524 echo "$as_me:8524: checking if we should define _POSIX_C_SOURCE" >&5
8525 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
8526 if test "${cf_cv_posix_c_source+set}" = set; then
8527   echo $ECHO_N "(cached) $ECHO_C" >&6
8528 else
8529
8530 echo "${as_me:-configure}:8530: testing if the symbol is already defined go no further ..." 1>&5
8531
8532         cat >conftest.$ac_ext <<_ACEOF
8533 #line 8533 "configure"
8534 #include "confdefs.h"
8535 #include <sys/types.h>
8536 int
8537 main ()
8538 {
8539
8540 #ifndef _POSIX_C_SOURCE
8541 make an error
8542 #endif
8543   ;
8544   return 0;
8545 }
8546 _ACEOF
8547 rm -f conftest.$ac_objext
8548 if { (eval echo "$as_me:8548: \"$ac_compile\"") >&5
8549   (eval $ac_compile) 2>&5
8550   ac_status=$?
8551   echo "$as_me:8551: \$? = $ac_status" >&5
8552   (exit $ac_status); } &&
8553          { ac_try='test -s conftest.$ac_objext'
8554   { (eval echo "$as_me:8554: \"$ac_try\"") >&5
8555   (eval $ac_try) 2>&5
8556   ac_status=$?
8557   echo "$as_me:8557: \$? = $ac_status" >&5
8558   (exit $ac_status); }; }; then
8559   cf_cv_posix_c_source=no
8560 else
8561   echo "$as_me: failed program was:" >&5
8562 cat conftest.$ac_ext >&5
8563 cf_want_posix_source=no
8564          case .$cf_POSIX_C_SOURCE in #(vi
8565          .[12]??*) #(vi
8566                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
8567                 ;;
8568          .2) #(vi
8569                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
8570                 cf_want_posix_source=yes
8571                 ;;
8572          .*)
8573                 cf_want_posix_source=yes
8574                 ;;
8575          esac
8576          if test "$cf_want_posix_source" = yes ; then
8577                 cat >conftest.$ac_ext <<_ACEOF
8578 #line 8578 "configure"
8579 #include "confdefs.h"
8580 #include <sys/types.h>
8581 int
8582 main ()
8583 {
8584
8585 #ifdef _POSIX_SOURCE
8586 make an error
8587 #endif
8588   ;
8589   return 0;
8590 }
8591 _ACEOF
8592 rm -f conftest.$ac_objext
8593 if { (eval echo "$as_me:8593: \"$ac_compile\"") >&5
8594   (eval $ac_compile) 2>&5
8595   ac_status=$?
8596   echo "$as_me:8596: \$? = $ac_status" >&5
8597   (exit $ac_status); } &&
8598          { ac_try='test -s conftest.$ac_objext'
8599   { (eval echo "$as_me:8599: \"$ac_try\"") >&5
8600   (eval $ac_try) 2>&5
8601   ac_status=$?
8602   echo "$as_me:8602: \$? = $ac_status" >&5
8603   (exit $ac_status); }; }; then
8604   :
8605 else
8606   echo "$as_me: failed program was:" >&5
8607 cat conftest.$ac_ext >&5
8608 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
8609 fi
8610 rm -f conftest.$ac_objext conftest.$ac_ext
8611          fi
8612
8613 echo "${as_me:-configure}:8613: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
8614
8615          CFLAGS="$cf_trim_CFLAGS"
8616          CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
8617
8618 echo "${as_me:-configure}:8618: testing if the second compile does not leave our definition intact error ..." 1>&5
8619
8620          cat >conftest.$ac_ext <<_ACEOF
8621 #line 8621 "configure"
8622 #include "confdefs.h"
8623 #include <sys/types.h>
8624 int
8625 main ()
8626 {
8627
8628 #ifndef _POSIX_C_SOURCE
8629 make an error
8630 #endif
8631   ;
8632   return 0;
8633 }
8634 _ACEOF
8635 rm -f conftest.$ac_objext
8636 if { (eval echo "$as_me:8636: \"$ac_compile\"") >&5
8637   (eval $ac_compile) 2>&5
8638   ac_status=$?
8639   echo "$as_me:8639: \$? = $ac_status" >&5
8640   (exit $ac_status); } &&
8641          { ac_try='test -s conftest.$ac_objext'
8642   { (eval echo "$as_me:8642: \"$ac_try\"") >&5
8643   (eval $ac_try) 2>&5
8644   ac_status=$?
8645   echo "$as_me:8645: \$? = $ac_status" >&5
8646   (exit $ac_status); }; }; then
8647   :
8648 else
8649   echo "$as_me: failed program was:" >&5
8650 cat conftest.$ac_ext >&5
8651 cf_cv_posix_c_source=no
8652 fi
8653 rm -f conftest.$ac_objext conftest.$ac_ext
8654          CFLAGS="$cf_save_CFLAGS"
8655          CPPFLAGS="$cf_save_CPPFLAGS"
8656
8657 fi
8658 rm -f conftest.$ac_objext conftest.$ac_ext
8659
8660 fi
8661 echo "$as_me:8661: result: $cf_cv_posix_c_source" >&5
8662 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
8663
8664 if test "$cf_cv_posix_c_source" != no ; then
8665         CFLAGS="$cf_trim_CFLAGS"
8666         CPPFLAGS="$cf_trim_CPPFLAGS"
8667
8668 cf_fix_cppflags=no
8669 cf_new_cflags=
8670 cf_new_cppflags=
8671 cf_new_extra_cppflags=
8672
8673 for cf_add_cflags in $cf_cv_posix_c_source
8674 do
8675 case $cf_fix_cppflags in
8676 no)
8677         case $cf_add_cflags in #(vi
8678         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
8679                 case $cf_add_cflags in
8680                 -D*)
8681                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8682
8683                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
8684                                 && test -z "${cf_tst_cflags}" \
8685                                 && cf_fix_cppflags=yes
8686
8687                         if test $cf_fix_cppflags = yes ; then
8688                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8689                                 continue
8690                         elif test "${cf_tst_cflags}" = "\"'" ; then
8691                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8692                                 continue
8693                         fi
8694                         ;;
8695                 esac
8696                 case "$CPPFLAGS" in
8697                 *$cf_add_cflags) #(vi
8698                         ;;
8699                 *) #(vi
8700                         case $cf_add_cflags in #(vi
8701                         -D*)
8702                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8703
8704 CPPFLAGS=`echo "$CPPFLAGS" | \
8705         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8706                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8707
8708                                 ;;
8709                         esac
8710                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8711                         ;;
8712                 esac
8713                 ;;
8714         *)
8715                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8716                 ;;
8717         esac
8718         ;;
8719 yes)
8720         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8721
8722         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8723
8724         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
8725                 && test -z "${cf_tst_cflags}" \
8726                 && cf_fix_cppflags=no
8727         ;;
8728 esac
8729 done
8730
8731 if test -n "$cf_new_cflags" ; then
8732
8733         CFLAGS="$CFLAGS $cf_new_cflags"
8734 fi
8735
8736 if test -n "$cf_new_cppflags" ; then
8737
8738         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8739 fi
8740
8741 if test -n "$cf_new_extra_cppflags" ; then
8742
8743         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8744 fi
8745
8746 fi
8747
8748         ;;
8749 esac
8750
8751 if test -n "$cf_xopen_source" ; then
8752
8753 cf_fix_cppflags=no
8754 cf_new_cflags=
8755 cf_new_cppflags=
8756 cf_new_extra_cppflags=
8757
8758 for cf_add_cflags in $cf_xopen_source
8759 do
8760 case $cf_fix_cppflags in
8761 no)
8762         case $cf_add_cflags in #(vi
8763         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
8764                 case $cf_add_cflags in
8765                 -D*)
8766                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8767
8768                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
8769                                 && test -z "${cf_tst_cflags}" \
8770                                 && cf_fix_cppflags=yes
8771
8772                         if test $cf_fix_cppflags = yes ; then
8773                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8774                                 continue
8775                         elif test "${cf_tst_cflags}" = "\"'" ; then
8776                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8777                                 continue
8778                         fi
8779                         ;;
8780                 esac
8781                 case "$CPPFLAGS" in
8782                 *$cf_add_cflags) #(vi
8783                         ;;
8784                 *) #(vi
8785                         case $cf_add_cflags in #(vi
8786                         -D*)
8787                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8788
8789 CPPFLAGS=`echo "$CPPFLAGS" | \
8790         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8791                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8792
8793                                 ;;
8794                         esac
8795                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8796                         ;;
8797                 esac
8798                 ;;
8799         *)
8800                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8801                 ;;
8802         esac
8803         ;;
8804 yes)
8805         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8806
8807         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8808
8809         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
8810                 && test -z "${cf_tst_cflags}" \
8811                 && cf_fix_cppflags=no
8812         ;;
8813 esac
8814 done
8815
8816 if test -n "$cf_new_cflags" ; then
8817
8818         CFLAGS="$CFLAGS $cf_new_cflags"
8819 fi
8820
8821 if test -n "$cf_new_cppflags" ; then
8822
8823         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8824 fi
8825
8826 if test -n "$cf_new_extra_cppflags" ; then
8827
8828         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8829 fi
8830
8831 fi
8832
8833 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
8834         echo "$as_me:8834: checking if _XOPEN_SOURCE really is set" >&5
8835 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
8836         cat >conftest.$ac_ext <<_ACEOF
8837 #line 8837 "configure"
8838 #include "confdefs.h"
8839 #include <stdlib.h>
8840 int
8841 main ()
8842 {
8843
8844 #ifndef _XOPEN_SOURCE
8845 make an error
8846 #endif
8847   ;
8848   return 0;
8849 }
8850 _ACEOF
8851 rm -f conftest.$ac_objext
8852 if { (eval echo "$as_me:8852: \"$ac_compile\"") >&5
8853   (eval $ac_compile) 2>&5
8854   ac_status=$?
8855   echo "$as_me:8855: \$? = $ac_status" >&5
8856   (exit $ac_status); } &&
8857          { ac_try='test -s conftest.$ac_objext'
8858   { (eval echo "$as_me:8858: \"$ac_try\"") >&5
8859   (eval $ac_try) 2>&5
8860   ac_status=$?
8861   echo "$as_me:8861: \$? = $ac_status" >&5
8862   (exit $ac_status); }; }; then
8863   cf_XOPEN_SOURCE_set=yes
8864 else
8865   echo "$as_me: failed program was:" >&5
8866 cat conftest.$ac_ext >&5
8867 cf_XOPEN_SOURCE_set=no
8868 fi
8869 rm -f conftest.$ac_objext conftest.$ac_ext
8870         echo "$as_me:8870: result: $cf_XOPEN_SOURCE_set" >&5
8871 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
8872         if test $cf_XOPEN_SOURCE_set = yes
8873         then
8874                 cat >conftest.$ac_ext <<_ACEOF
8875 #line 8875 "configure"
8876 #include "confdefs.h"
8877 #include <stdlib.h>
8878 int
8879 main ()
8880 {
8881
8882 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
8883 make an error
8884 #endif
8885   ;
8886   return 0;
8887 }
8888 _ACEOF
8889 rm -f conftest.$ac_objext
8890 if { (eval echo "$as_me:8890: \"$ac_compile\"") >&5
8891   (eval $ac_compile) 2>&5
8892   ac_status=$?
8893   echo "$as_me:8893: \$? = $ac_status" >&5
8894   (exit $ac_status); } &&
8895          { ac_try='test -s conftest.$ac_objext'
8896   { (eval echo "$as_me:8896: \"$ac_try\"") >&5
8897   (eval $ac_try) 2>&5
8898   ac_status=$?
8899   echo "$as_me:8899: \$? = $ac_status" >&5
8900   (exit $ac_status); }; }; then
8901   cf_XOPEN_SOURCE_set_ok=yes
8902 else
8903   echo "$as_me: failed program was:" >&5
8904 cat conftest.$ac_ext >&5
8905 cf_XOPEN_SOURCE_set_ok=no
8906 fi
8907 rm -f conftest.$ac_objext conftest.$ac_ext
8908                 if test $cf_XOPEN_SOURCE_set_ok = no
8909                 then
8910                         { echo "$as_me:8910: WARNING: _XOPEN_SOURCE is lower than requested" >&5
8911 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
8912                 fi
8913         else
8914
8915 echo "$as_me:8915: checking if we should define _XOPEN_SOURCE" >&5
8916 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
8917 if test "${cf_cv_xopen_source+set}" = set; then
8918   echo $ECHO_N "(cached) $ECHO_C" >&6
8919 else
8920
8921         cat >conftest.$ac_ext <<_ACEOF
8922 #line 8922 "configure"
8923 #include "confdefs.h"
8924
8925 #include <stdlib.h>
8926 #include <string.h>
8927 #include <sys/types.h>
8928
8929 int
8930 main ()
8931 {
8932
8933 #ifndef _XOPEN_SOURCE
8934 make an error
8935 #endif
8936   ;
8937   return 0;
8938 }
8939 _ACEOF
8940 rm -f conftest.$ac_objext
8941 if { (eval echo "$as_me:8941: \"$ac_compile\"") >&5
8942   (eval $ac_compile) 2>&5
8943   ac_status=$?
8944   echo "$as_me:8944: \$? = $ac_status" >&5
8945   (exit $ac_status); } &&
8946          { ac_try='test -s conftest.$ac_objext'
8947   { (eval echo "$as_me:8947: \"$ac_try\"") >&5
8948   (eval $ac_try) 2>&5
8949   ac_status=$?
8950   echo "$as_me:8950: \$? = $ac_status" >&5
8951   (exit $ac_status); }; }; then
8952   cf_cv_xopen_source=no
8953 else
8954   echo "$as_me: failed program was:" >&5
8955 cat conftest.$ac_ext >&5
8956 cf_save="$CPPFLAGS"
8957          CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
8958          cat >conftest.$ac_ext <<_ACEOF
8959 #line 8959 "configure"
8960 #include "confdefs.h"
8961
8962 #include <stdlib.h>
8963 #include <string.h>
8964 #include <sys/types.h>
8965
8966 int
8967 main ()
8968 {
8969
8970 #ifdef _XOPEN_SOURCE
8971 make an error
8972 #endif
8973   ;
8974   return 0;
8975 }
8976 _ACEOF
8977 rm -f conftest.$ac_objext
8978 if { (eval echo "$as_me:8978: \"$ac_compile\"") >&5
8979   (eval $ac_compile) 2>&5
8980   ac_status=$?
8981   echo "$as_me:8981: \$? = $ac_status" >&5
8982   (exit $ac_status); } &&
8983          { ac_try='test -s conftest.$ac_objext'
8984   { (eval echo "$as_me:8984: \"$ac_try\"") >&5
8985   (eval $ac_try) 2>&5
8986   ac_status=$?
8987   echo "$as_me:8987: \$? = $ac_status" >&5
8988   (exit $ac_status); }; }; then
8989   cf_cv_xopen_source=no
8990 else
8991   echo "$as_me: failed program was:" >&5
8992 cat conftest.$ac_ext >&5
8993 cf_cv_xopen_source=$cf_XOPEN_SOURCE
8994 fi
8995 rm -f conftest.$ac_objext conftest.$ac_ext
8996         CPPFLAGS="$cf_save"
8997
8998 fi
8999 rm -f conftest.$ac_objext conftest.$ac_ext
9000
9001 fi
9002 echo "$as_me:9002: result: $cf_cv_xopen_source" >&5
9003 echo "${ECHO_T}$cf_cv_xopen_source" >&6
9004
9005 if test "$cf_cv_xopen_source" != no ; then
9006
9007 CFLAGS=`echo "$CFLAGS" | \
9008         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
9009                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
9010
9011 CPPFLAGS=`echo "$CPPFLAGS" | \
9012         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
9013                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
9014
9015         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
9016
9017 cf_fix_cppflags=no
9018 cf_new_cflags=
9019 cf_new_cppflags=
9020 cf_new_extra_cppflags=
9021
9022 for cf_add_cflags in $cf_temp_xopen_source
9023 do
9024 case $cf_fix_cppflags in
9025 no)
9026         case $cf_add_cflags in #(vi
9027         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
9028                 case $cf_add_cflags in
9029                 -D*)
9030                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9031
9032                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
9033                                 && test -z "${cf_tst_cflags}" \
9034                                 && cf_fix_cppflags=yes
9035
9036                         if test $cf_fix_cppflags = yes ; then
9037                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9038                                 continue
9039                         elif test "${cf_tst_cflags}" = "\"'" ; then
9040                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9041                                 continue
9042                         fi
9043                         ;;
9044                 esac
9045                 case "$CPPFLAGS" in
9046                 *$cf_add_cflags) #(vi
9047                         ;;
9048                 *) #(vi
9049                         case $cf_add_cflags in #(vi
9050                         -D*)
9051                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9052
9053 CPPFLAGS=`echo "$CPPFLAGS" | \
9054         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
9055                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
9056
9057                                 ;;
9058                         esac
9059                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
9060                         ;;
9061                 esac
9062                 ;;
9063         *)
9064                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
9065                 ;;
9066         esac
9067         ;;
9068 yes)
9069         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9070
9071         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
9072
9073         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
9074                 && test -z "${cf_tst_cflags}" \
9075                 && cf_fix_cppflags=no
9076         ;;
9077 esac
9078 done
9079
9080 if test -n "$cf_new_cflags" ; then
9081
9082         CFLAGS="$CFLAGS $cf_new_cflags"
9083 fi
9084
9085 if test -n "$cf_new_cppflags" ; then
9086
9087         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
9088 fi
9089
9090 if test -n "$cf_new_extra_cppflags" ; then
9091
9092         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
9093 fi
9094
9095 fi
9096
9097         fi
9098 fi
9099
9100 # Check whether --enable-largefile or --disable-largefile was given.
9101 if test "${enable_largefile+set}" = set; then
9102   enableval="$enable_largefile"
9103
9104 fi;
9105 if test "$enable_largefile" != no; then
9106
9107   echo "$as_me:9107: checking for special C compiler options needed for large files" >&5
9108 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
9109 if test "${ac_cv_sys_largefile_CC+set}" = set; then
9110   echo $ECHO_N "(cached) $ECHO_C" >&6
9111 else
9112   ac_cv_sys_largefile_CC=no
9113      if test "$GCC" != yes; then
9114        ac_save_CC=$CC
9115        while :; do
9116          # IRIX 6.2 and later do not support large files by default,
9117          # so use the C compiler's -n32 option if that helps.
9118          cat >conftest.$ac_ext <<_ACEOF
9119 #line 9119 "configure"
9120 #include "confdefs.h"
9121 #include <sys/types.h>
9122  /* Check that off_t can represent 2**63 - 1 correctly.
9123     We can't simply define LARGE_OFF_T to be 9223372036854775807,
9124     since some C++ compilers masquerading as C compilers
9125     incorrectly reject 9223372036854775807.  */
9126 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9127   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9128                        && LARGE_OFF_T % 2147483647 == 1)
9129                       ? 1 : -1];
9130 int
9131 main ()
9132 {
9133
9134   ;
9135   return 0;
9136 }
9137 _ACEOF
9138          rm -f conftest.$ac_objext
9139 if { (eval echo "$as_me:9139: \"$ac_compile\"") >&5
9140   (eval $ac_compile) 2>&5
9141   ac_status=$?
9142   echo "$as_me:9142: \$? = $ac_status" >&5
9143   (exit $ac_status); } &&
9144          { ac_try='test -s conftest.$ac_objext'
9145   { (eval echo "$as_me:9145: \"$ac_try\"") >&5
9146   (eval $ac_try) 2>&5
9147   ac_status=$?
9148   echo "$as_me:9148: \$? = $ac_status" >&5
9149   (exit $ac_status); }; }; then
9150   break
9151 else
9152   echo "$as_me: failed program was:" >&5
9153 cat conftest.$ac_ext >&5
9154 fi
9155 rm -f conftest.$ac_objext
9156          CC="$CC -n32"
9157          rm -f conftest.$ac_objext
9158 if { (eval echo "$as_me:9158: \"$ac_compile\"") >&5
9159   (eval $ac_compile) 2>&5
9160   ac_status=$?
9161   echo "$as_me:9161: \$? = $ac_status" >&5
9162   (exit $ac_status); } &&
9163          { ac_try='test -s conftest.$ac_objext'
9164   { (eval echo "$as_me:9164: \"$ac_try\"") >&5
9165   (eval $ac_try) 2>&5
9166   ac_status=$?
9167   echo "$as_me:9167: \$? = $ac_status" >&5
9168   (exit $ac_status); }; }; then
9169   ac_cv_sys_largefile_CC=' -n32'; break
9170 else
9171   echo "$as_me: failed program was:" >&5
9172 cat conftest.$ac_ext >&5
9173 fi
9174 rm -f conftest.$ac_objext
9175          break
9176        done
9177        CC=$ac_save_CC
9178        rm -f conftest.$ac_ext
9179     fi
9180 fi
9181 echo "$as_me:9181: result: $ac_cv_sys_largefile_CC" >&5
9182 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
9183   if test "$ac_cv_sys_largefile_CC" != no; then
9184     CC=$CC$ac_cv_sys_largefile_CC
9185   fi
9186
9187   echo "$as_me:9187: checking for _FILE_OFFSET_BITS value needed for large files" >&5
9188 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
9189 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
9190   echo $ECHO_N "(cached) $ECHO_C" >&6
9191 else
9192   while :; do
9193   ac_cv_sys_file_offset_bits=no
9194   cat >conftest.$ac_ext <<_ACEOF
9195 #line 9195 "configure"
9196 #include "confdefs.h"
9197 #include <sys/types.h>
9198  /* Check that off_t can represent 2**63 - 1 correctly.
9199     We can't simply define LARGE_OFF_T to be 9223372036854775807,
9200     since some C++ compilers masquerading as C compilers
9201     incorrectly reject 9223372036854775807.  */
9202 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9203   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9204                        && LARGE_OFF_T % 2147483647 == 1)
9205                       ? 1 : -1];
9206 int
9207 main ()
9208 {
9209
9210   ;
9211   return 0;
9212 }
9213 _ACEOF
9214 rm -f conftest.$ac_objext
9215 if { (eval echo "$as_me:9215: \"$ac_compile\"") >&5
9216   (eval $ac_compile) 2>&5
9217   ac_status=$?
9218   echo "$as_me:9218: \$? = $ac_status" >&5
9219   (exit $ac_status); } &&
9220          { ac_try='test -s conftest.$ac_objext'
9221   { (eval echo "$as_me:9221: \"$ac_try\"") >&5
9222   (eval $ac_try) 2>&5
9223   ac_status=$?
9224   echo "$as_me:9224: \$? = $ac_status" >&5
9225   (exit $ac_status); }; }; then
9226   break
9227 else
9228   echo "$as_me: failed program was:" >&5
9229 cat conftest.$ac_ext >&5
9230 fi
9231 rm -f conftest.$ac_objext conftest.$ac_ext
9232   cat >conftest.$ac_ext <<_ACEOF
9233 #line 9233 "configure"
9234 #include "confdefs.h"
9235 #define _FILE_OFFSET_BITS 64
9236 #include <sys/types.h>
9237  /* Check that off_t can represent 2**63 - 1 correctly.
9238     We can't simply define LARGE_OFF_T to be 9223372036854775807,
9239     since some C++ compilers masquerading as C compilers
9240     incorrectly reject 9223372036854775807.  */
9241 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9242   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9243                        && LARGE_OFF_T % 2147483647 == 1)
9244                       ? 1 : -1];
9245 int
9246 main ()
9247 {
9248
9249   ;
9250   return 0;
9251 }
9252 _ACEOF
9253 rm -f conftest.$ac_objext
9254 if { (eval echo "$as_me:9254: \"$ac_compile\"") >&5
9255   (eval $ac_compile) 2>&5
9256   ac_status=$?
9257   echo "$as_me:9257: \$? = $ac_status" >&5
9258   (exit $ac_status); } &&
9259          { ac_try='test -s conftest.$ac_objext'
9260   { (eval echo "$as_me:9260: \"$ac_try\"") >&5
9261   (eval $ac_try) 2>&5
9262   ac_status=$?
9263   echo "$as_me:9263: \$? = $ac_status" >&5
9264   (exit $ac_status); }; }; then
9265   ac_cv_sys_file_offset_bits=64; break
9266 else
9267   echo "$as_me: failed program was:" >&5
9268 cat conftest.$ac_ext >&5
9269 fi
9270 rm -f conftest.$ac_objext conftest.$ac_ext
9271   break
9272 done
9273 fi
9274 echo "$as_me:9274: result: $ac_cv_sys_file_offset_bits" >&5
9275 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
9276 if test "$ac_cv_sys_file_offset_bits" != no; then
9277
9278 cat >>confdefs.h <<EOF
9279 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
9280 EOF
9281
9282 fi
9283 rm -rf conftest*
9284   echo "$as_me:9284: checking for _LARGE_FILES value needed for large files" >&5
9285 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
9286 if test "${ac_cv_sys_large_files+set}" = set; then
9287   echo $ECHO_N "(cached) $ECHO_C" >&6
9288 else
9289   while :; do
9290   ac_cv_sys_large_files=no
9291   cat >conftest.$ac_ext <<_ACEOF
9292 #line 9292 "configure"
9293 #include "confdefs.h"
9294 #include <sys/types.h>
9295  /* Check that off_t can represent 2**63 - 1 correctly.
9296     We can't simply define LARGE_OFF_T to be 9223372036854775807,
9297     since some C++ compilers masquerading as C compilers
9298     incorrectly reject 9223372036854775807.  */
9299 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9300   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9301                        && LARGE_OFF_T % 2147483647 == 1)
9302                       ? 1 : -1];
9303 int
9304 main ()
9305 {
9306
9307   ;
9308   return 0;
9309 }
9310 _ACEOF
9311 rm -f conftest.$ac_objext
9312 if { (eval echo "$as_me:9312: \"$ac_compile\"") >&5
9313   (eval $ac_compile) 2>&5
9314   ac_status=$?
9315   echo "$as_me:9315: \$? = $ac_status" >&5
9316   (exit $ac_status); } &&
9317          { ac_try='test -s conftest.$ac_objext'
9318   { (eval echo "$as_me:9318: \"$ac_try\"") >&5
9319   (eval $ac_try) 2>&5
9320   ac_status=$?
9321   echo "$as_me:9321: \$? = $ac_status" >&5
9322   (exit $ac_status); }; }; then
9323   break
9324 else
9325   echo "$as_me: failed program was:" >&5
9326 cat conftest.$ac_ext >&5
9327 fi
9328 rm -f conftest.$ac_objext conftest.$ac_ext
9329   cat >conftest.$ac_ext <<_ACEOF
9330 #line 9330 "configure"
9331 #include "confdefs.h"
9332 #define _LARGE_FILES 1
9333 #include <sys/types.h>
9334  /* Check that off_t can represent 2**63 - 1 correctly.
9335     We can't simply define LARGE_OFF_T to be 9223372036854775807,
9336     since some C++ compilers masquerading as C compilers
9337     incorrectly reject 9223372036854775807.  */
9338 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9339   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9340                        && LARGE_OFF_T % 2147483647 == 1)
9341                       ? 1 : -1];
9342 int
9343 main ()
9344 {
9345
9346   ;
9347   return 0;
9348 }
9349 _ACEOF
9350 rm -f conftest.$ac_objext
9351 if { (eval echo "$as_me:9351: \"$ac_compile\"") >&5
9352   (eval $ac_compile) 2>&5
9353   ac_status=$?
9354   echo "$as_me:9354: \$? = $ac_status" >&5
9355   (exit $ac_status); } &&
9356          { ac_try='test -s conftest.$ac_objext'
9357   { (eval echo "$as_me:9357: \"$ac_try\"") >&5
9358   (eval $ac_try) 2>&5
9359   ac_status=$?
9360   echo "$as_me:9360: \$? = $ac_status" >&5
9361   (exit $ac_status); }; }; then
9362   ac_cv_sys_large_files=1; break
9363 else
9364   echo "$as_me: failed program was:" >&5
9365 cat conftest.$ac_ext >&5
9366 fi
9367 rm -f conftest.$ac_objext conftest.$ac_ext
9368   break
9369 done
9370 fi
9371 echo "$as_me:9371: result: $ac_cv_sys_large_files" >&5
9372 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
9373 if test "$ac_cv_sys_large_files" != no; then
9374
9375 cat >>confdefs.h <<EOF
9376 #define _LARGE_FILES $ac_cv_sys_large_files
9377 EOF
9378
9379 fi
9380 rm -rf conftest*
9381 fi
9382
9383     if test "$enable_largefile" != no ; then
9384         echo "$as_me:9384: checking for _LARGEFILE_SOURCE value needed for large files" >&5
9385 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
9386 if test "${ac_cv_sys_largefile_source+set}" = set; then
9387   echo $ECHO_N "(cached) $ECHO_C" >&6
9388 else
9389   while :; do
9390   ac_cv_sys_largefile_source=no
9391   cat >conftest.$ac_ext <<_ACEOF
9392 #line 9392 "configure"
9393 #include "confdefs.h"
9394 #include <stdio.h>
9395 int
9396 main ()
9397 {
9398 return !fseeko;
9399   ;
9400   return 0;
9401 }
9402 _ACEOF
9403 rm -f conftest.$ac_objext
9404 if { (eval echo "$as_me:9404: \"$ac_compile\"") >&5
9405   (eval $ac_compile) 2>&5
9406   ac_status=$?
9407   echo "$as_me:9407: \$? = $ac_status" >&5
9408   (exit $ac_status); } &&
9409          { ac_try='test -s conftest.$ac_objext'
9410   { (eval echo "$as_me:9410: \"$ac_try\"") >&5
9411   (eval $ac_try) 2>&5
9412   ac_status=$?
9413   echo "$as_me:9413: \$? = $ac_status" >&5
9414   (exit $ac_status); }; }; then
9415   break
9416 else
9417   echo "$as_me: failed program was:" >&5
9418 cat conftest.$ac_ext >&5
9419 fi
9420 rm -f conftest.$ac_objext conftest.$ac_ext
9421   cat >conftest.$ac_ext <<_ACEOF
9422 #line 9422 "configure"
9423 #include "confdefs.h"
9424 #define _LARGEFILE_SOURCE 1
9425 #include <stdio.h>
9426 int
9427 main ()
9428 {
9429 return !fseeko;
9430   ;
9431   return 0;
9432 }
9433 _ACEOF
9434 rm -f conftest.$ac_objext
9435 if { (eval echo "$as_me:9435: \"$ac_compile\"") >&5
9436   (eval $ac_compile) 2>&5
9437   ac_status=$?
9438   echo "$as_me:9438: \$? = $ac_status" >&5
9439   (exit $ac_status); } &&
9440          { ac_try='test -s conftest.$ac_objext'
9441   { (eval echo "$as_me:9441: \"$ac_try\"") >&5
9442   (eval $ac_try) 2>&5
9443   ac_status=$?
9444   echo "$as_me:9444: \$? = $ac_status" >&5
9445   (exit $ac_status); }; }; then
9446   ac_cv_sys_largefile_source=1; break
9447 else
9448   echo "$as_me: failed program was:" >&5
9449 cat conftest.$ac_ext >&5
9450 fi
9451 rm -f conftest.$ac_objext conftest.$ac_ext
9452   break
9453 done
9454 fi
9455 echo "$as_me:9455: result: $ac_cv_sys_largefile_source" >&5
9456 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
9457 if test "$ac_cv_sys_largefile_source" != no; then
9458
9459 cat >>confdefs.h <<EOF
9460 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
9461 EOF
9462
9463 fi
9464 rm -rf conftest*
9465
9466 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
9467 # in glibc 2.1.3, but that breaks too many other things.
9468 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
9469 echo "$as_me:9469: checking for fseeko" >&5
9470 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
9471 if test "${ac_cv_func_fseeko+set}" = set; then
9472   echo $ECHO_N "(cached) $ECHO_C" >&6
9473 else
9474   cat >conftest.$ac_ext <<_ACEOF
9475 #line 9475 "configure"
9476 #include "confdefs.h"
9477 #include <stdio.h>
9478 int
9479 main ()
9480 {
9481 return fseeko && fseeko (stdin, 0, 0);
9482   ;
9483   return 0;
9484 }
9485 _ACEOF
9486 rm -f conftest.$ac_objext conftest$ac_exeext
9487 if { (eval echo "$as_me:9487: \"$ac_link\"") >&5
9488   (eval $ac_link) 2>&5
9489   ac_status=$?
9490   echo "$as_me:9490: \$? = $ac_status" >&5
9491   (exit $ac_status); } &&
9492          { ac_try='test -s conftest$ac_exeext'
9493   { (eval echo "$as_me:9493: \"$ac_try\"") >&5
9494   (eval $ac_try) 2>&5
9495   ac_status=$?
9496   echo "$as_me:9496: \$? = $ac_status" >&5
9497   (exit $ac_status); }; }; then
9498   ac_cv_func_fseeko=yes
9499 else
9500   echo "$as_me: failed program was:" >&5
9501 cat conftest.$ac_ext >&5
9502 ac_cv_func_fseeko=no
9503 fi
9504 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9505 fi
9506 echo "$as_me:9506: result: $ac_cv_func_fseeko" >&5
9507 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
9508 if test $ac_cv_func_fseeko = yes; then
9509
9510 cat >>confdefs.h <<\EOF
9511 #define HAVE_FSEEKO 1
9512 EOF
9513
9514 fi
9515
9516         # Normally we would collect these definitions in the config.h,
9517         # but (like _XOPEN_SOURCE), some environments rely on having these
9518         # defined before any of the system headers are included.  Another
9519         # case comes up with C++, e.g., on AIX the compiler compiles the
9520         # header files by themselves before looking at the body files it is
9521         # told to compile.  For ncurses, those header files do not include
9522         # the config.h
9523         test "$ac_cv_sys_large_files"      != no && CPPFLAGS="$CPPFLAGS -D_LARGE_FILES "
9524         test "$ac_cv_sys_largefile_source" != no && CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE "
9525         test "$ac_cv_sys_file_offset_bits" != no && CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits "
9526
9527         echo "$as_me:9527: checking whether to use struct dirent64" >&5
9528 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
9529 if test "${cf_cv_struct_dirent64+set}" = set; then
9530   echo $ECHO_N "(cached) $ECHO_C" >&6
9531 else
9532
9533                 cat >conftest.$ac_ext <<_ACEOF
9534 #line 9534 "configure"
9535 #include "confdefs.h"
9536
9537 #include <sys/types.h>
9538 #include <dirent.h>
9539
9540 int
9541 main ()
9542 {
9543
9544                 /* if transitional largefile support is setup, this is true */
9545                 extern struct dirent64 * readdir(DIR *);
9546                 struct dirent64 *x = readdir((DIR *)0);
9547                 struct dirent *y = readdir((DIR *)0);
9548                 int z = x - y;
9549
9550   ;
9551   return 0;
9552 }
9553 _ACEOF
9554 rm -f conftest.$ac_objext
9555 if { (eval echo "$as_me:9555: \"$ac_compile\"") >&5
9556   (eval $ac_compile) 2>&5
9557   ac_status=$?
9558   echo "$as_me:9558: \$? = $ac_status" >&5
9559   (exit $ac_status); } &&
9560          { ac_try='test -s conftest.$ac_objext'
9561   { (eval echo "$as_me:9561: \"$ac_try\"") >&5
9562   (eval $ac_try) 2>&5
9563   ac_status=$?
9564   echo "$as_me:9564: \$? = $ac_status" >&5
9565   (exit $ac_status); }; }; then
9566   cf_cv_struct_dirent64=yes
9567 else
9568   echo "$as_me: failed program was:" >&5
9569 cat conftest.$ac_ext >&5
9570 cf_cv_struct_dirent64=no
9571 fi
9572 rm -f conftest.$ac_objext conftest.$ac_ext
9573
9574 fi
9575 echo "$as_me:9575: result: $cf_cv_struct_dirent64" >&5
9576 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
9577         test "$cf_cv_struct_dirent64" = yes && cat >>confdefs.h <<\EOF
9578 #define HAVE_STRUCT_DIRENT64 1
9579 EOF
9580
9581     fi
9582
9583 ### Enable compiling-in rcs id's
9584 echo "$as_me:9584: checking if RCS identifiers should be compiled-in" >&5
9585 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
9586
9587 # Check whether --with-rcs-ids or --without-rcs-ids was given.
9588 if test "${with_rcs_ids+set}" = set; then
9589   withval="$with_rcs_ids"
9590   with_rcs_ids=$withval
9591 else
9592   with_rcs_ids=no
9593 fi;
9594 echo "$as_me:9594: result: $with_rcs_ids" >&5
9595 echo "${ECHO_T}$with_rcs_ids" >&6
9596 test "$with_rcs_ids" = yes && cat >>confdefs.h <<\EOF
9597 #define USE_RCS_IDS 1
9598 EOF
9599
9600 ###############################################################################
9601
9602 ### Note that some functions (such as const) are normally disabled anyway.
9603 echo "$as_me:9603: checking if you want to build with function extensions" >&5
9604 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
9605
9606 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
9607 if test "${enable_ext_funcs+set}" = set; then
9608   enableval="$enable_ext_funcs"
9609   with_ext_funcs=$enableval
9610 else
9611   with_ext_funcs=yes
9612 fi;
9613 echo "$as_me:9613: result: $with_ext_funcs" >&5
9614 echo "${ECHO_T}$with_ext_funcs" >&6
9615 if test "$with_ext_funcs" = yes ; then
9616         NCURSES_EXT_FUNCS=1
9617         cat >>confdefs.h <<\EOF
9618 #define HAVE_USE_DEFAULT_COLORS 1
9619 EOF
9620
9621         cat >>confdefs.h <<\EOF
9622 #define NCURSES_EXT_FUNCS 1
9623 EOF
9624
9625 else
9626         NCURSES_EXT_FUNCS=0
9627 fi
9628
9629 ###   use option --enable-const to turn on use of const beyond that in XSI.
9630 echo "$as_me:9630: checking for extended use of const keyword" >&5
9631 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
9632
9633 # Check whether --enable-const or --disable-const was given.
9634 if test "${enable_const+set}" = set; then
9635   enableval="$enable_const"
9636   with_ext_const=$enableval
9637 else
9638   with_ext_const=no
9639 fi;
9640 echo "$as_me:9640: result: $with_ext_const" >&5
9641 echo "${ECHO_T}$with_ext_const" >&6
9642 NCURSES_CONST='/*nothing*/'
9643 if test "$with_ext_const" = yes ; then
9644         NCURSES_CONST=const
9645 fi
9646
9647 ###############################################################################
9648 # These options are relatively safe to experiment with.
9649
9650 echo "$as_me:9650: checking if you want all development code" >&5
9651 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
9652
9653 # Check whether --with-develop or --without-develop was given.
9654 if test "${with_develop+set}" = set; then
9655   withval="$with_develop"
9656   with_develop=$withval
9657 else
9658   with_develop=no
9659 fi;
9660 echo "$as_me:9660: result: $with_develop" >&5
9661 echo "${ECHO_T}$with_develop" >&6
9662
9663 ###############################################################################
9664 # These are just experimental, probably should not be in a package:
9665
9666 # This is still experimental (20080329), but should ultimately be moved to
9667 # the script-block --with-normal, etc.
9668
9669 echo "$as_me:9669: checking if you want to link with the pthread library" >&5
9670 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
9671
9672 # Check whether --with-pthread or --without-pthread was given.
9673 if test "${with_pthread+set}" = set; then
9674   withval="$with_pthread"
9675   with_pthread=$withval
9676 else
9677   with_pthread=no
9678 fi;
9679 echo "$as_me:9679: result: $with_pthread" >&5
9680 echo "${ECHO_T}$with_pthread" >&6
9681
9682 if test "$with_pthread" != no ; then
9683     echo "$as_me:9683: checking for pthread.h" >&5
9684 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
9685 if test "${ac_cv_header_pthread_h+set}" = set; then
9686   echo $ECHO_N "(cached) $ECHO_C" >&6
9687 else
9688   cat >conftest.$ac_ext <<_ACEOF
9689 #line 9689 "configure"
9690 #include "confdefs.h"
9691 #include <pthread.h>
9692 _ACEOF
9693 if { (eval echo "$as_me:9693: \"$ac_cpp conftest.$ac_ext\"") >&5
9694   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9695   ac_status=$?
9696   egrep -v '^ *\+' conftest.er1 >conftest.err
9697   rm -f conftest.er1
9698   cat conftest.err >&5
9699   echo "$as_me:9699: \$? = $ac_status" >&5
9700   (exit $ac_status); } >/dev/null; then
9701   if test -s conftest.err; then
9702     ac_cpp_err=$ac_c_preproc_warn_flag
9703   else
9704     ac_cpp_err=
9705   fi
9706 else
9707   ac_cpp_err=yes
9708 fi
9709 if test -z "$ac_cpp_err"; then
9710   ac_cv_header_pthread_h=yes
9711 else
9712   echo "$as_me: failed program was:" >&5
9713   cat conftest.$ac_ext >&5
9714   ac_cv_header_pthread_h=no
9715 fi
9716 rm -f conftest.err conftest.$ac_ext
9717 fi
9718 echo "$as_me:9718: result: $ac_cv_header_pthread_h" >&5
9719 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
9720 if test $ac_cv_header_pthread_h = yes; then
9721
9722         cat >>confdefs.h <<\EOF
9723 #define HAVE_PTHREADS_H 1
9724 EOF
9725
9726         for cf_lib_pthread in pthread c_r
9727         do
9728             echo "$as_me:9728: checking if we can link with the $cf_lib_pthread library" >&5
9729 echo $ECHO_N "checking if we can link with the $cf_lib_pthread library... $ECHO_C" >&6
9730             cf_save_LIBS="$LIBS"
9731             LIBS="-l$cf_lib_pthread $LIBS"
9732             cat >conftest.$ac_ext <<_ACEOF
9733 #line 9733 "configure"
9734 #include "confdefs.h"
9735
9736 #include <pthread.h>
9737
9738 int
9739 main ()
9740 {
9741
9742                 int rc = pthread_create(0,0,0,0);
9743                 int r2 = pthread_mutexattr_settype(0, 0);
9744
9745   ;
9746   return 0;
9747 }
9748 _ACEOF
9749 rm -f conftest.$ac_objext conftest$ac_exeext
9750 if { (eval echo "$as_me:9750: \"$ac_link\"") >&5
9751   (eval $ac_link) 2>&5
9752   ac_status=$?
9753   echo "$as_me:9753: \$? = $ac_status" >&5
9754   (exit $ac_status); } &&
9755          { ac_try='test -s conftest$ac_exeext'
9756   { (eval echo "$as_me:9756: \"$ac_try\"") >&5
9757   (eval $ac_try) 2>&5
9758   ac_status=$?
9759   echo "$as_me:9759: \$? = $ac_status" >&5
9760   (exit $ac_status); }; }; then
9761   with_pthread=yes
9762 else
9763   echo "$as_me: failed program was:" >&5
9764 cat conftest.$ac_ext >&5
9765 with_pthread=no
9766 fi
9767 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9768             LIBS="$cf_save_LIBS"
9769             echo "$as_me:9769: result: $with_pthread" >&5
9770 echo "${ECHO_T}$with_pthread" >&6
9771             test "$with_pthread" = yes && break
9772         done
9773
9774         if test "$with_pthread" = yes ; then
9775             LIBS="-l$cf_lib_pthread $LIBS"
9776             cat >>confdefs.h <<\EOF
9777 #define HAVE_LIBPTHREADS 1
9778 EOF
9779
9780         else
9781             { { echo "$as_me:9781: error: Cannot link with pthread library" >&5
9782 echo "$as_me: error: Cannot link with pthread library" >&2;}
9783    { (exit 1); exit 1; }; }
9784         fi
9785
9786 fi
9787
9788 fi
9789
9790 echo "$as_me:9790: checking if you want to use weak-symbols for pthreads" >&5
9791 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
9792
9793 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
9794 if test "${enable_weak_symbols+set}" = set; then
9795   enableval="$enable_weak_symbols"
9796   use_weak_symbols=$withval
9797 else
9798   use_weak_symbols=no
9799 fi;
9800 echo "$as_me:9800: result: $use_weak_symbols" >&5
9801 echo "${ECHO_T}$use_weak_symbols" >&6
9802 if test "$use_weak_symbols" = yes ; then
9803
9804 echo "$as_me:9804: checking if $CC supports weak symbols" >&5
9805 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
9806 if test "${cf_cv_weak_symbols+set}" = set; then
9807   echo $ECHO_N "(cached) $ECHO_C" >&6
9808 else
9809
9810 cat >conftest.$ac_ext <<_ACEOF
9811 #line 9811 "configure"
9812 #include "confdefs.h"
9813
9814 #include <stdio.h>
9815 int
9816 main ()
9817 {
9818
9819 #if defined(__GNUC__)
9820 #  if defined __USE_ISOC99
9821 #    define _cat_pragma(exp)    _Pragma(#exp)
9822 #    define _weak_pragma(exp)   _cat_pragma(weak name)
9823 #  else
9824 #    define _weak_pragma(exp)
9825 #  endif
9826 #  define _declare(name)        __extension__ extern __typeof__(name) name
9827 #  define weak_symbol(name)     _weak_pragma(name) _declare(name) __attribute__((weak))
9828 #endif
9829
9830 weak_symbol(fopen);
9831
9832   ;
9833   return 0;
9834 }
9835 _ACEOF
9836 rm -f conftest.$ac_objext
9837 if { (eval echo "$as_me:9837: \"$ac_compile\"") >&5
9838   (eval $ac_compile) 2>&5
9839   ac_status=$?
9840   echo "$as_me:9840: \$? = $ac_status" >&5
9841   (exit $ac_status); } &&
9842          { ac_try='test -s conftest.$ac_objext'
9843   { (eval echo "$as_me:9843: \"$ac_try\"") >&5
9844   (eval $ac_try) 2>&5
9845   ac_status=$?
9846   echo "$as_me:9846: \$? = $ac_status" >&5
9847   (exit $ac_status); }; }; then
9848   cf_cv_weak_symbols=yes
9849 else
9850   echo "$as_me: failed program was:" >&5
9851 cat conftest.$ac_ext >&5
9852 cf_cv_weak_symbols=no
9853 fi
9854 rm -f conftest.$ac_objext conftest.$ac_ext
9855
9856 fi
9857 echo "$as_me:9857: result: $cf_cv_weak_symbols" >&5
9858 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
9859
9860 else
9861     cf_cv_weak_symbols=no
9862 fi
9863
9864 if test $cf_cv_weak_symbols = yes ; then
9865     cat >>confdefs.h <<\EOF
9866 #define USE_WEAK_SYMBOLS 1
9867 EOF
9868
9869 fi
9870
9871 PTHREAD=
9872 if test "$with_pthread" = "yes" ; then
9873     cat >>confdefs.h <<\EOF
9874 #define USE_PTHREADS 1
9875 EOF
9876
9877     enable_reentrant=yes
9878     if test $cf_cv_weak_symbols = yes ; then
9879         PTHREAD=-lpthread
9880     fi
9881 fi
9882
9883 # OpenSUSE is installing ncurses6, using reentrant option.
9884 echo "$as_me:9884: checking for _nc_TABSIZE" >&5
9885 echo $ECHO_N "checking for _nc_TABSIZE... $ECHO_C" >&6
9886 if test "${ac_cv_func__nc_TABSIZE+set}" = set; then
9887   echo $ECHO_N "(cached) $ECHO_C" >&6
9888 else
9889   cat >conftest.$ac_ext <<_ACEOF
9890 #line 9890 "configure"
9891 #include "confdefs.h"
9892 /* System header to define __stub macros and hopefully few prototypes,
9893     which can conflict with char _nc_TABSIZE (); below.  */
9894 #include <assert.h>
9895 /* Override any gcc2 internal prototype to avoid an error.  */
9896 #ifdef __cplusplus
9897 extern "C"
9898 #endif
9899 /* We use char because int might match the return type of a gcc2
9900    builtin and then its argument prototype would still apply.  */
9901 char _nc_TABSIZE ();
9902 char (*f) ();
9903
9904 int
9905 main ()
9906 {
9907 /* The GNU C library defines this for functions which it implements
9908     to always fail with ENOSYS.  Some functions are actually named
9909     something starting with __ and the normal name is an alias.  */
9910 #if defined (__stub__nc_TABSIZE) || defined (__stub____nc_TABSIZE)
9911 choke me
9912 #else
9913 f = _nc_TABSIZE; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
9914 #endif
9915
9916   ;
9917   return 0;
9918 }
9919 _ACEOF
9920 rm -f conftest.$ac_objext conftest$ac_exeext
9921 if { (eval echo "$as_me:9921: \"$ac_link\"") >&5
9922   (eval $ac_link) 2>&5
9923   ac_status=$?
9924   echo "$as_me:9924: \$? = $ac_status" >&5
9925   (exit $ac_status); } &&
9926          { ac_try='test -s conftest$ac_exeext'
9927   { (eval echo "$as_me:9927: \"$ac_try\"") >&5
9928   (eval $ac_try) 2>&5
9929   ac_status=$?
9930   echo "$as_me:9930: \$? = $ac_status" >&5
9931   (exit $ac_status); }; }; then
9932   ac_cv_func__nc_TABSIZE=yes
9933 else
9934   echo "$as_me: failed program was:" >&5
9935 cat conftest.$ac_ext >&5
9936 ac_cv_func__nc_TABSIZE=no
9937 fi
9938 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9939 fi
9940 echo "$as_me:9940: result: $ac_cv_func__nc_TABSIZE" >&5
9941 echo "${ECHO_T}$ac_cv_func__nc_TABSIZE" >&6
9942 if test $ac_cv_func__nc_TABSIZE = yes; then
9943   assume_reentrant=yes
9944 else
9945   assume_reentrant=no
9946 fi
9947
9948 # Reentrant code has to be opaque; there's little advantage to making ncurses
9949 # opaque outside of that, so there is no --enable-opaque option.  We can use
9950 # this option without --with-pthreads, but this will be always set for
9951 # pthreads.
9952 echo "$as_me:9952: checking if you want experimental reentrant code" >&5
9953 echo $ECHO_N "checking if you want experimental reentrant code... $ECHO_C" >&6
9954
9955 # Check whether --enable-reentrant or --disable-reentrant was given.
9956 if test "${enable_reentrant+set}" = set; then
9957   enableval="$enable_reentrant"
9958   with_reentrant=$enableval
9959 else
9960   with_reentrant=$assume_reentrant
9961 fi;
9962 echo "$as_me:9962: result: $with_reentrant" >&5
9963 echo "${ECHO_T}$with_reentrant" >&6
9964 if test "$with_reentrant" = yes ; then
9965         cf_cv_enable_reentrant=1
9966         if test $cf_cv_weak_symbols = yes ; then
9967
9968 # remove pthread library from $LIBS
9969 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[       ]//g' -e 's/-lpthread$//'`
9970
9971         elif test "$assume_reentrant" = no ; then
9972                 LIB_SUFFIX="t${LIB_SUFFIX}"
9973         fi
9974         cat >>confdefs.h <<\EOF
9975 #define USE_REENTRANT 1
9976 EOF
9977
9978 else
9979         cf_cv_enable_reentrant=0
9980 fi
9981
9982 ### Allow using a different wrap-prefix
9983 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
9984         echo "$as_me:9984: checking for prefix used to wrap public variables" >&5
9985 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
9986
9987 # Check whether --with-wrap-prefix or --without-wrap-prefix was given.
9988 if test "${with_wrap_prefix+set}" = set; then
9989   withval="$with_wrap_prefix"
9990   NCURSES_WRAP_PREFIX=$withval
9991 else
9992   NCURSES_WRAP_PREFIX=_nc_
9993 fi;
9994         echo "$as_me:9994: result: $NCURSES_WRAP_PREFIX" >&5
9995 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
9996 else
9997         NCURSES_WRAP_PREFIX=_nc_
9998 fi
9999
10000 cat >>confdefs.h <<EOF
10001 #define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
10002 EOF
10003
10004 ###############################################################################
10005
10006 ###     use option --disable-echo to suppress full display compiling commands
10007
10008 echo "$as_me:10008: checking if you want to see long compiling messages" >&5
10009 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
10010
10011 # Check whether --enable-echo or --disable-echo was given.
10012 if test "${enable_echo+set}" = set; then
10013   enableval="$enable_echo"
10014   test "$enableval" != no && enableval=yes
10015   if test "$enableval" != "yes" ; then
10016
10017     ECHO_LT='--silent'
10018     ECHO_LD='@echo linking $@;'
10019     RULE_CC='@echo compiling $<'
10020     SHOW_CC='@echo compiling $@'
10021     ECHO_CC='@'
10022
10023   else
10024
10025     ECHO_LT=''
10026     ECHO_LD=''
10027     RULE_CC=''
10028     SHOW_CC=''
10029     ECHO_CC=''
10030
10031   fi
10032 else
10033   enableval=yes
10034
10035     ECHO_LT=''
10036     ECHO_LD=''
10037     RULE_CC=''
10038     SHOW_CC=''
10039     ECHO_CC=''
10040
10041 fi;
10042 echo "$as_me:10042: result: $enableval" >&5
10043 echo "${ECHO_T}$enableval" >&6
10044
10045 ###     use option --enable-warnings to turn on all gcc warnings
10046 echo "$as_me:10046: checking if you want to see compiler warnings" >&5
10047 echo $ECHO_N "checking if you want to see compiler warnings... $ECHO_C" >&6
10048
10049 # Check whether --enable-warnings or --disable-warnings was given.
10050 if test "${enable_warnings+set}" = set; then
10051   enableval="$enable_warnings"
10052   with_warnings=$enableval
10053 fi;
10054 echo "$as_me:10054: result: $with_warnings" >&5
10055 echo "${ECHO_T}$with_warnings" >&6
10056
10057 if test "x$with_warnings" = "xyes"; then
10058
10059         ADAFLAGS="$ADAFLAGS -gnatg"
10060
10061 INTEL_COMPILER=no
10062
10063 if test "$GCC" = yes ; then
10064         case $host_os in
10065         linux*|gnu*)
10066                 echo "$as_me:10066: checking if this is really Intel C compiler" >&5
10067 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
10068                 cf_save_CFLAGS="$CFLAGS"
10069                 CFLAGS="$CFLAGS -no-gcc"
10070                 cat >conftest.$ac_ext <<_ACEOF
10071 #line 10071 "configure"
10072 #include "confdefs.h"
10073
10074 int
10075 main ()
10076 {
10077
10078 #ifdef __INTEL_COMPILER
10079 #else
10080 make an error
10081 #endif
10082
10083   ;
10084   return 0;
10085 }
10086 _ACEOF
10087 rm -f conftest.$ac_objext
10088 if { (eval echo "$as_me:10088: \"$ac_compile\"") >&5
10089   (eval $ac_compile) 2>&5
10090   ac_status=$?
10091   echo "$as_me:10091: \$? = $ac_status" >&5
10092   (exit $ac_status); } &&
10093          { ac_try='test -s conftest.$ac_objext'
10094   { (eval echo "$as_me:10094: \"$ac_try\"") >&5
10095   (eval $ac_try) 2>&5
10096   ac_status=$?
10097   echo "$as_me:10097: \$? = $ac_status" >&5
10098   (exit $ac_status); }; }; then
10099   INTEL_COMPILER=yes
10100 cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
10101
10102 else
10103   echo "$as_me: failed program was:" >&5
10104 cat conftest.$ac_ext >&5
10105 fi
10106 rm -f conftest.$ac_objext conftest.$ac_ext
10107                 CFLAGS="$cf_save_CFLAGS"
10108                 echo "$as_me:10108: result: $INTEL_COMPILER" >&5
10109 echo "${ECHO_T}$INTEL_COMPILER" >&6
10110                 ;;
10111         esac
10112 fi
10113
10114 CLANG_COMPILER=no
10115
10116 if test "$GCC" = yes ; then
10117         echo "$as_me:10117: checking if this is really Clang C compiler" >&5
10118 echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6
10119         cf_save_CFLAGS="$CFLAGS"
10120         CFLAGS="$CFLAGS -Qunused-arguments"
10121         cat >conftest.$ac_ext <<_ACEOF
10122 #line 10122 "configure"
10123 #include "confdefs.h"
10124
10125 int
10126 main ()
10127 {
10128
10129 #ifdef __clang__
10130 #else
10131 make an error
10132 #endif
10133
10134   ;
10135   return 0;
10136 }
10137 _ACEOF
10138 rm -f conftest.$ac_objext
10139 if { (eval echo "$as_me:10139: \"$ac_compile\"") >&5
10140   (eval $ac_compile) 2>&5
10141   ac_status=$?
10142   echo "$as_me:10142: \$? = $ac_status" >&5
10143   (exit $ac_status); } &&
10144          { ac_try='test -s conftest.$ac_objext'
10145   { (eval echo "$as_me:10145: \"$ac_try\"") >&5
10146   (eval $ac_try) 2>&5
10147   ac_status=$?
10148   echo "$as_me:10148: \$? = $ac_status" >&5
10149   (exit $ac_status); }; }; then
10150   CLANG_COMPILER=yes
10151 cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
10152
10153 else
10154   echo "$as_me: failed program was:" >&5
10155 cat conftest.$ac_ext >&5
10156 fi
10157 rm -f conftest.$ac_objext conftest.$ac_ext
10158         CFLAGS="$cf_save_CFLAGS"
10159         echo "$as_me:10159: result: $CLANG_COMPILER" >&5
10160 echo "${ECHO_T}$CLANG_COMPILER" >&6
10161 fi
10162
10163 cat > conftest.$ac_ext <<EOF
10164 #line 10164 "${as_me:-configure}"
10165 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
10166 EOF
10167
10168 if test "$INTEL_COMPILER" = yes
10169 then
10170 # The "-wdXXX" options suppress warnings:
10171 # remark #1419: external declaration in primary source file
10172 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
10173 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
10174 # remark #193: zero used for undefined preprocessing identifier
10175 # remark #593: variable "curs_sb_left_arrow" was set but never used
10176 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
10177 # remark #869: parameter "tw" was never referenced
10178 # remark #981: operands are evaluated in unspecified order
10179 # warning #279: controlling expression is constant
10180
10181         { echo "$as_me:10181: checking for $CC warning options..." >&5
10182 echo "$as_me: checking for $CC warning options..." >&6;}
10183         cf_save_CFLAGS="$CFLAGS"
10184         EXTRA_CFLAGS="-Wall"
10185         for cf_opt in \
10186                 wd1419 \
10187                 wd1683 \
10188                 wd1684 \
10189                 wd193 \
10190                 wd593 \
10191                 wd279 \
10192                 wd810 \
10193                 wd869 \
10194                 wd981
10195         do
10196                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
10197                 if { (eval echo "$as_me:10197: \"$ac_compile\"") >&5
10198   (eval $ac_compile) 2>&5
10199   ac_status=$?
10200   echo "$as_me:10200: \$? = $ac_status" >&5
10201   (exit $ac_status); }; then
10202                         test -n "$verbose" && echo "$as_me:10202: result: ... -$cf_opt" >&5
10203 echo "${ECHO_T}... -$cf_opt" >&6
10204                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
10205                 fi
10206         done
10207         CFLAGS="$cf_save_CFLAGS"
10208
10209 elif test "$GCC" = yes
10210 then
10211         { echo "$as_me:10211: checking for $CC warning options..." >&5
10212 echo "$as_me: checking for $CC warning options..." >&6;}
10213         cf_save_CFLAGS="$CFLAGS"
10214         EXTRA_CFLAGS=
10215         cf_warn_CONST=""
10216         test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
10217         for cf_opt in W Wall \
10218                 Wbad-function-cast \
10219                 Wcast-align \
10220                 Wcast-qual \
10221                 Winline \
10222                 Wmissing-declarations \
10223                 Wmissing-prototypes \
10224                 Wnested-externs \
10225                 Wpointer-arith \
10226                 Wshadow \
10227                 Wstrict-prototypes \
10228                 Wundef $cf_warn_CONST Wdeclaration-after-statement Wextra Wno-unknown-pragmas Wswitch-enum
10229         do
10230                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
10231                 if { (eval echo "$as_me:10231: \"$ac_compile\"") >&5
10232   (eval $ac_compile) 2>&5
10233   ac_status=$?
10234   echo "$as_me:10234: \$? = $ac_status" >&5
10235   (exit $ac_status); }; then
10236                         test -n "$verbose" && echo "$as_me:10236: result: ... -$cf_opt" >&5
10237 echo "${ECHO_T}... -$cf_opt" >&6
10238                         case $cf_opt in #(vi
10239                         Wcast-qual) #(vi
10240                                 CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
10241                                 ;;
10242                         Winline) #(vi
10243                                 case $GCC_VERSION in
10244                                 [34].*)
10245                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
10246
10247 echo "${as_me:-configure}:10247: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
10248
10249                                         continue;;
10250                                 esac
10251                                 ;;
10252                         Wpointer-arith) #(vi
10253                                 case $GCC_VERSION in
10254                                 [12].*)
10255                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
10256
10257 echo "${as_me:-configure}:10257: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
10258
10259                                         continue;;
10260                                 esac
10261                                 ;;
10262                         esac
10263                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
10264                 fi
10265         done
10266         CFLAGS="$cf_save_CFLAGS"
10267 fi
10268 rm -rf conftest*
10269
10270 fi
10271
10272 if test "$GCC" = yes
10273 then
10274 cat > conftest.i <<EOF
10275 #ifndef GCC_PRINTF
10276 #define GCC_PRINTF 0
10277 #endif
10278 #ifndef GCC_SCANF
10279 #define GCC_SCANF 0
10280 #endif
10281 #ifndef GCC_NORETURN
10282 #define GCC_NORETURN /* nothing */
10283 #endif
10284 #ifndef GCC_UNUSED
10285 #define GCC_UNUSED /* nothing */
10286 #endif
10287 EOF
10288 if test "$GCC" = yes
10289 then
10290         { echo "$as_me:10290: checking for $CC __attribute__ directives..." >&5
10291 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
10292 cat > conftest.$ac_ext <<EOF
10293 #line 10293 "${as_me:-configure}"
10294 #include "confdefs.h"
10295 #include "conftest.h"
10296 #include "conftest.i"
10297 #if     GCC_PRINTF
10298 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
10299 #else
10300 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
10301 #endif
10302 #if     GCC_SCANF
10303 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
10304 #else
10305 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
10306 #endif
10307 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
10308 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
10309 extern void foo(void) GCC_NORETURN;
10310 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
10311 EOF
10312         cf_printf_attribute=no
10313         cf_scanf_attribute=no
10314         for cf_attribute in scanf printf unused noreturn
10315         do
10316
10317 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
10318
10319                 cf_directive="__attribute__(($cf_attribute))"
10320                 echo "checking for $CC $cf_directive" 1>&5
10321
10322                 case $cf_attribute in #(vi
10323                 printf) #(vi
10324                         cf_printf_attribute=yes
10325                         cat >conftest.h <<EOF
10326 #define GCC_$cf_ATTRIBUTE 1
10327 EOF
10328                         ;;
10329                 scanf) #(vi
10330                         cf_scanf_attribute=yes
10331                         cat >conftest.h <<EOF
10332 #define GCC_$cf_ATTRIBUTE 1
10333 EOF
10334                         ;;
10335                 *) #(vi
10336                         cat >conftest.h <<EOF
10337 #define GCC_$cf_ATTRIBUTE $cf_directive
10338 EOF
10339                         ;;
10340                 esac
10341
10342                 if { (eval echo "$as_me:10342: \"$ac_compile\"") >&5
10343   (eval $ac_compile) 2>&5
10344   ac_status=$?
10345   echo "$as_me:10345: \$? = $ac_status" >&5
10346   (exit $ac_status); }; then
10347                         test -n "$verbose" && echo "$as_me:10347: result: ... $cf_attribute" >&5
10348 echo "${ECHO_T}... $cf_attribute" >&6
10349                         cat conftest.h >>confdefs.h
10350                         case $cf_attribute in #(vi
10351                         printf) #(vi
10352                                 if test "$cf_printf_attribute" = no ; then
10353                                         cat >>confdefs.h <<EOF
10354 #define GCC_PRINTFLIKE(fmt,var) /* nothing */
10355 EOF
10356                                 else
10357                                         cat >>confdefs.h <<EOF
10358 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
10359 EOF
10360                                 fi
10361                                 ;;
10362                         scanf) #(vi
10363                                 if test "$cf_scanf_attribute" = no ; then
10364                                         cat >>confdefs.h <<EOF
10365 #define GCC_SCANFLIKE(fmt,var) /* nothing */
10366 EOF
10367                                 else
10368                                         cat >>confdefs.h <<EOF
10369 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
10370 EOF
10371                                 fi
10372                                 ;;
10373                         esac
10374                 fi
10375         done
10376 else
10377         fgrep define conftest.i >>confdefs.h
10378 fi
10379 rm -rf conftest*
10380 fi
10381
10382 ###     use option --enable-assertions to turn on generation of assertion code
10383 echo "$as_me:10383: checking if you want to enable runtime assertions" >&5
10384 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
10385
10386 # Check whether --enable-assertions or --disable-assertions was given.
10387 if test "${enable_assertions+set}" = set; then
10388   enableval="$enable_assertions"
10389   with_assertions=$enableval
10390 else
10391   with_assertions=no
10392 fi;
10393 echo "$as_me:10393: result: $with_assertions" >&5
10394 echo "${ECHO_T}$with_assertions" >&6
10395 if test -n "$GCC"
10396 then
10397         if test "$with_assertions" = no
10398         then
10399                 CPPFLAGS="$CPPFLAGS -DNDEBUG"
10400         else
10401
10402         ADAFLAGS="$ADAFLAGS -gnata"
10403
10404         fi
10405 fi
10406
10407 ###     use option --disable-leaks to suppress "permanent" leaks, for testing
10408 cat >>confdefs.h <<\EOF
10409 #define HAVE_NC_ALLOC_H 1
10410 EOF
10411
10412 ###     use option --enable-expanded to generate certain macros as functions
10413
10414 # Check whether --enable-expanded or --disable-expanded was given.
10415 if test "${enable_expanded+set}" = set; then
10416   enableval="$enable_expanded"
10417   test "$enableval" = yes && cat >>confdefs.h <<\EOF
10418 #define NCURSES_EXPANDED 1
10419 EOF
10420
10421 fi;
10422
10423 ###     use option --disable-macros to suppress macros in favor of functions
10424
10425 # Check whether --enable-macros or --disable-macros was given.
10426 if test "${enable_macros+set}" = set; then
10427   enableval="$enable_macros"
10428   test "$enableval" = no && cat >>confdefs.h <<\EOF
10429 #define NCURSES_NOMACROS 1
10430 EOF
10431
10432 fi;
10433
10434 # Normally we only add trace() to the debug-library.  Allow this to be
10435 # extended to all models of the ncurses library:
10436 cf_all_traces=no
10437 case "$CFLAGS $CPPFLAGS" in
10438 *-DTRACE*)
10439         cf_all_traces=yes
10440         ;;
10441 esac
10442
10443 echo "$as_me:10443: checking whether to add trace feature to all models" >&5
10444 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
10445
10446 # Check whether --with-trace or --without-trace was given.
10447 if test "${with_trace+set}" = set; then
10448   withval="$with_trace"
10449   cf_with_trace=$withval
10450 else
10451   cf_with_trace=$cf_all_traces
10452 fi;
10453 echo "$as_me:10453: result: $cf_with_trace" >&5
10454 echo "${ECHO_T}$cf_with_trace" >&6
10455
10456 if test "$cf_with_trace" = yes ; then
10457         ADA_TRACE=TRUE
10458
10459 cf_fix_cppflags=no
10460 cf_new_cflags=
10461 cf_new_cppflags=
10462 cf_new_extra_cppflags=
10463
10464 for cf_add_cflags in -DTRACE
10465 do
10466 case $cf_fix_cppflags in
10467 no)
10468         case $cf_add_cflags in #(vi
10469         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
10470                 case $cf_add_cflags in
10471                 -D*)
10472                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10473
10474                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10475                                 && test -z "${cf_tst_cflags}" \
10476                                 && cf_fix_cppflags=yes
10477
10478                         if test $cf_fix_cppflags = yes ; then
10479                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10480                                 continue
10481                         elif test "${cf_tst_cflags}" = "\"'" ; then
10482                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10483                                 continue
10484                         fi
10485                         ;;
10486                 esac
10487                 case "$CPPFLAGS" in
10488                 *$cf_add_cflags) #(vi
10489                         ;;
10490                 *) #(vi
10491                         case $cf_add_cflags in #(vi
10492                         -D*)
10493                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10494
10495 CPPFLAGS=`echo "$CPPFLAGS" | \
10496         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10497                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10498
10499                                 ;;
10500                         esac
10501                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
10502                         ;;
10503                 esac
10504                 ;;
10505         *)
10506                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
10507                 ;;
10508         esac
10509         ;;
10510 yes)
10511         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10512
10513         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10514
10515         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10516                 && test -z "${cf_tst_cflags}" \
10517                 && cf_fix_cppflags=no
10518         ;;
10519 esac
10520 done
10521
10522 if test -n "$cf_new_cflags" ; then
10523
10524         CFLAGS="$CFLAGS $cf_new_cflags"
10525 fi
10526
10527 if test -n "$cf_new_cppflags" ; then
10528
10529         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
10530 fi
10531
10532 if test -n "$cf_new_extra_cppflags" ; then
10533
10534         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
10535 fi
10536
10537 else
10538         ADA_TRACE=FALSE
10539 fi
10540
10541 ###     Checks for libraries.
10542 case $cf_cv_system_name in #(vi
10543 *mingw32*) #(vi
10544         ;;
10545 *)
10546 echo "$as_me:10546: checking for gettimeofday" >&5
10547 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
10548 if test "${ac_cv_func_gettimeofday+set}" = set; then
10549   echo $ECHO_N "(cached) $ECHO_C" >&6
10550 else
10551   cat >conftest.$ac_ext <<_ACEOF
10552 #line 10552 "configure"
10553 #include "confdefs.h"
10554 /* System header to define __stub macros and hopefully few prototypes,
10555     which can conflict with char gettimeofday (); below.  */
10556 #include <assert.h>
10557 /* Override any gcc2 internal prototype to avoid an error.  */
10558 #ifdef __cplusplus
10559 extern "C"
10560 #endif
10561 /* We use char because int might match the return type of a gcc2
10562    builtin and then its argument prototype would still apply.  */
10563 char gettimeofday ();
10564 char (*f) ();
10565
10566 int
10567 main ()
10568 {
10569 /* The GNU C library defines this for functions which it implements
10570     to always fail with ENOSYS.  Some functions are actually named
10571     something starting with __ and the normal name is an alias.  */
10572 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
10573 choke me
10574 #else
10575 f = gettimeofday; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
10576 #endif
10577
10578   ;
10579   return 0;
10580 }
10581 _ACEOF
10582 rm -f conftest.$ac_objext conftest$ac_exeext
10583 if { (eval echo "$as_me:10583: \"$ac_link\"") >&5
10584   (eval $ac_link) 2>&5
10585   ac_status=$?
10586   echo "$as_me:10586: \$? = $ac_status" >&5
10587   (exit $ac_status); } &&
10588          { ac_try='test -s conftest$ac_exeext'
10589   { (eval echo "$as_me:10589: \"$ac_try\"") >&5
10590   (eval $ac_try) 2>&5
10591   ac_status=$?
10592   echo "$as_me:10592: \$? = $ac_status" >&5
10593   (exit $ac_status); }; }; then
10594   ac_cv_func_gettimeofday=yes
10595 else
10596   echo "$as_me: failed program was:" >&5
10597 cat conftest.$ac_ext >&5
10598 ac_cv_func_gettimeofday=no
10599 fi
10600 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10601 fi
10602 echo "$as_me:10602: result: $ac_cv_func_gettimeofday" >&5
10603 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
10604 if test $ac_cv_func_gettimeofday = yes; then
10605   cat >>confdefs.h <<\EOF
10606 #define HAVE_GETTIMEOFDAY 1
10607 EOF
10608
10609 else
10610
10611 echo "$as_me:10611: checking for gettimeofday in -lbsd" >&5
10612 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
10613 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
10614   echo $ECHO_N "(cached) $ECHO_C" >&6
10615 else
10616   ac_check_lib_save_LIBS=$LIBS
10617 LIBS="-lbsd  $LIBS"
10618 cat >conftest.$ac_ext <<_ACEOF
10619 #line 10619 "configure"
10620 #include "confdefs.h"
10621
10622 /* Override any gcc2 internal prototype to avoid an error.  */
10623 #ifdef __cplusplus
10624 extern "C"
10625 #endif
10626 /* We use char because int might match the return type of a gcc2
10627    builtin and then its argument prototype would still apply.  */
10628 char gettimeofday ();
10629 int
10630 main ()
10631 {
10632 gettimeofday ();
10633   ;
10634   return 0;
10635 }
10636 _ACEOF
10637 rm -f conftest.$ac_objext conftest$ac_exeext
10638 if { (eval echo "$as_me:10638: \"$ac_link\"") >&5
10639   (eval $ac_link) 2>&5
10640   ac_status=$?
10641   echo "$as_me:10641: \$? = $ac_status" >&5
10642   (exit $ac_status); } &&
10643          { ac_try='test -s conftest$ac_exeext'
10644   { (eval echo "$as_me:10644: \"$ac_try\"") >&5
10645   (eval $ac_try) 2>&5
10646   ac_status=$?
10647   echo "$as_me:10647: \$? = $ac_status" >&5
10648   (exit $ac_status); }; }; then
10649   ac_cv_lib_bsd_gettimeofday=yes
10650 else
10651   echo "$as_me: failed program was:" >&5
10652 cat conftest.$ac_ext >&5
10653 ac_cv_lib_bsd_gettimeofday=no
10654 fi
10655 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10656 LIBS=$ac_check_lib_save_LIBS
10657 fi
10658 echo "$as_me:10658: result: $ac_cv_lib_bsd_gettimeofday" >&5
10659 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
10660 if test $ac_cv_lib_bsd_gettimeofday = yes; then
10661   cat >>confdefs.h <<\EOF
10662 #define HAVE_GETTIMEOFDAY 1
10663 EOF
10664
10665         LIBS="$LIBS -lbsd"
10666 fi
10667
10668 fi
10669         ;;
10670 esac
10671
10672 ###     Checks for header files.
10673 echo "$as_me:10673: checking for ANSI C header files" >&5
10674 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
10675 if test "${ac_cv_header_stdc+set}" = set; then
10676   echo $ECHO_N "(cached) $ECHO_C" >&6
10677 else
10678   cat >conftest.$ac_ext <<_ACEOF
10679 #line 10679 "configure"
10680 #include "confdefs.h"
10681 #include <stdlib.h>
10682 #include <stdarg.h>
10683 #include <string.h>
10684 #include <float.h>
10685
10686 _ACEOF
10687 if { (eval echo "$as_me:10687: \"$ac_cpp conftest.$ac_ext\"") >&5
10688   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10689   ac_status=$?
10690   egrep -v '^ *\+' conftest.er1 >conftest.err
10691   rm -f conftest.er1
10692   cat conftest.err >&5
10693   echo "$as_me:10693: \$? = $ac_status" >&5
10694   (exit $ac_status); } >/dev/null; then
10695   if test -s conftest.err; then
10696     ac_cpp_err=$ac_c_preproc_warn_flag
10697   else
10698     ac_cpp_err=
10699   fi
10700 else
10701   ac_cpp_err=yes
10702 fi
10703 if test -z "$ac_cpp_err"; then
10704   ac_cv_header_stdc=yes
10705 else
10706   echo "$as_me: failed program was:" >&5
10707   cat conftest.$ac_ext >&5
10708   ac_cv_header_stdc=no
10709 fi
10710 rm -f conftest.err conftest.$ac_ext
10711
10712 if test $ac_cv_header_stdc = yes; then
10713   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
10714   cat >conftest.$ac_ext <<_ACEOF
10715 #line 10715 "configure"
10716 #include "confdefs.h"
10717 #include <string.h>
10718
10719 _ACEOF
10720 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10721   egrep "memchr" >/dev/null 2>&1; then
10722   :
10723 else
10724   ac_cv_header_stdc=no
10725 fi
10726 rm -rf conftest*
10727
10728 fi
10729
10730 if test $ac_cv_header_stdc = yes; then
10731   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
10732   cat >conftest.$ac_ext <<_ACEOF
10733 #line 10733 "configure"
10734 #include "confdefs.h"
10735 #include <stdlib.h>
10736
10737 _ACEOF
10738 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10739   egrep "free" >/dev/null 2>&1; then
10740   :
10741 else
10742   ac_cv_header_stdc=no
10743 fi
10744 rm -rf conftest*
10745
10746 fi
10747
10748 if test $ac_cv_header_stdc = yes; then
10749   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
10750   if test "$cross_compiling" = yes; then
10751   :
10752 else
10753   cat >conftest.$ac_ext <<_ACEOF
10754 #line 10754 "configure"
10755 #include "confdefs.h"
10756 #include <ctype.h>
10757 #if ((' ' & 0x0FF) == 0x020)
10758 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
10759 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
10760 #else
10761 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
10762                      || ('j' <= (c) && (c) <= 'r') \
10763                      || ('s' <= (c) && (c) <= 'z'))
10764 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
10765 #endif
10766
10767 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
10768 int
10769 main ()
10770 {
10771   int i;
10772   for (i = 0; i < 256; i++)
10773     if (XOR (islower (i), ISLOWER (i))
10774         || toupper (i) != TOUPPER (i))
10775       $ac_main_return(2);
10776   $ac_main_return (0);
10777 }
10778 _ACEOF
10779 rm -f conftest$ac_exeext
10780 if { (eval echo "$as_me:10780: \"$ac_link\"") >&5
10781   (eval $ac_link) 2>&5
10782   ac_status=$?
10783   echo "$as_me:10783: \$? = $ac_status" >&5
10784   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10785   { (eval echo "$as_me:10785: \"$ac_try\"") >&5
10786   (eval $ac_try) 2>&5
10787   ac_status=$?
10788   echo "$as_me:10788: \$? = $ac_status" >&5
10789   (exit $ac_status); }; }; then
10790   :
10791 else
10792   echo "$as_me: program exited with status $ac_status" >&5
10793 echo "$as_me: failed program was:" >&5
10794 cat conftest.$ac_ext >&5
10795 ac_cv_header_stdc=no
10796 fi
10797 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
10798 fi
10799 fi
10800 fi
10801 echo "$as_me:10801: result: $ac_cv_header_stdc" >&5
10802 echo "${ECHO_T}$ac_cv_header_stdc" >&6
10803 if test $ac_cv_header_stdc = yes; then
10804
10805 cat >>confdefs.h <<\EOF
10806 #define STDC_HEADERS 1
10807 EOF
10808
10809 fi
10810
10811 ac_header_dirent=no
10812 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
10813   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
10814 echo "$as_me:10814: checking for $ac_hdr that defines DIR" >&5
10815 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
10816 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10817   echo $ECHO_N "(cached) $ECHO_C" >&6
10818 else
10819   cat >conftest.$ac_ext <<_ACEOF
10820 #line 10820 "configure"
10821 #include "confdefs.h"
10822 #include <sys/types.h>
10823 #include <$ac_hdr>
10824
10825 int
10826 main ()
10827 {
10828 if ((DIR *) 0)
10829 return 0;
10830   ;
10831   return 0;
10832 }
10833 _ACEOF
10834 rm -f conftest.$ac_objext
10835 if { (eval echo "$as_me:10835: \"$ac_compile\"") >&5
10836   (eval $ac_compile) 2>&5
10837   ac_status=$?
10838   echo "$as_me:10838: \$? = $ac_status" >&5
10839   (exit $ac_status); } &&
10840          { ac_try='test -s conftest.$ac_objext'
10841   { (eval echo "$as_me:10841: \"$ac_try\"") >&5
10842   (eval $ac_try) 2>&5
10843   ac_status=$?
10844   echo "$as_me:10844: \$? = $ac_status" >&5
10845   (exit $ac_status); }; }; then
10846   eval "$as_ac_Header=yes"
10847 else
10848   echo "$as_me: failed program was:" >&5
10849 cat conftest.$ac_ext >&5
10850 eval "$as_ac_Header=no"
10851 fi
10852 rm -f conftest.$ac_objext conftest.$ac_ext
10853 fi
10854 echo "$as_me:10854: result: `eval echo '${'$as_ac_Header'}'`" >&5
10855 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10856 if test `eval echo '${'$as_ac_Header'}'` = yes; then
10857   cat >>confdefs.h <<EOF
10858 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
10859 EOF
10860
10861 ac_header_dirent=$ac_hdr; break
10862 fi
10863
10864 done
10865 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
10866 if test $ac_header_dirent = dirent.h; then
10867   echo "$as_me:10867: checking for opendir in -ldir" >&5
10868 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
10869 if test "${ac_cv_lib_dir_opendir+set}" = set; then
10870   echo $ECHO_N "(cached) $ECHO_C" >&6
10871 else
10872   ac_check_lib_save_LIBS=$LIBS
10873 LIBS="-ldir  $LIBS"
10874 cat >conftest.$ac_ext <<_ACEOF
10875 #line 10875 "configure"
10876 #include "confdefs.h"
10877
10878 /* Override any gcc2 internal prototype to avoid an error.  */
10879 #ifdef __cplusplus
10880 extern "C"
10881 #endif
10882 /* We use char because int might match the return type of a gcc2
10883    builtin and then its argument prototype would still apply.  */
10884 char opendir ();
10885 int
10886 main ()
10887 {
10888 opendir ();
10889   ;
10890   return 0;
10891 }
10892 _ACEOF
10893 rm -f conftest.$ac_objext conftest$ac_exeext
10894 if { (eval echo "$as_me:10894: \"$ac_link\"") >&5
10895   (eval $ac_link) 2>&5
10896   ac_status=$?
10897   echo "$as_me:10897: \$? = $ac_status" >&5
10898   (exit $ac_status); } &&
10899          { ac_try='test -s conftest$ac_exeext'
10900   { (eval echo "$as_me:10900: \"$ac_try\"") >&5
10901   (eval $ac_try) 2>&5
10902   ac_status=$?
10903   echo "$as_me:10903: \$? = $ac_status" >&5
10904   (exit $ac_status); }; }; then
10905   ac_cv_lib_dir_opendir=yes
10906 else
10907   echo "$as_me: failed program was:" >&5
10908 cat conftest.$ac_ext >&5
10909 ac_cv_lib_dir_opendir=no
10910 fi
10911 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10912 LIBS=$ac_check_lib_save_LIBS
10913 fi
10914 echo "$as_me:10914: result: $ac_cv_lib_dir_opendir" >&5
10915 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
10916 if test $ac_cv_lib_dir_opendir = yes; then
10917   LIBS="$LIBS -ldir"
10918 fi
10919
10920 else
10921   echo "$as_me:10921: checking for opendir in -lx" >&5
10922 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
10923 if test "${ac_cv_lib_x_opendir+set}" = set; then
10924   echo $ECHO_N "(cached) $ECHO_C" >&6
10925 else
10926   ac_check_lib_save_LIBS=$LIBS
10927 LIBS="-lx  $LIBS"
10928 cat >conftest.$ac_ext <<_ACEOF
10929 #line 10929 "configure"
10930 #include "confdefs.h"
10931
10932 /* Override any gcc2 internal prototype to avoid an error.  */
10933 #ifdef __cplusplus
10934 extern "C"
10935 #endif
10936 /* We use char because int might match the return type of a gcc2
10937    builtin and then its argument prototype would still apply.  */
10938 char opendir ();
10939 int
10940 main ()
10941 {
10942 opendir ();
10943   ;
10944   return 0;
10945 }
10946 _ACEOF
10947 rm -f conftest.$ac_objext conftest$ac_exeext
10948 if { (eval echo "$as_me:10948: \"$ac_link\"") >&5
10949   (eval $ac_link) 2>&5
10950   ac_status=$?
10951   echo "$as_me:10951: \$? = $ac_status" >&5
10952   (exit $ac_status); } &&
10953          { ac_try='test -s conftest$ac_exeext'
10954   { (eval echo "$as_me:10954: \"$ac_try\"") >&5
10955   (eval $ac_try) 2>&5
10956   ac_status=$?
10957   echo "$as_me:10957: \$? = $ac_status" >&5
10958   (exit $ac_status); }; }; then
10959   ac_cv_lib_x_opendir=yes
10960 else
10961   echo "$as_me: failed program was:" >&5
10962 cat conftest.$ac_ext >&5
10963 ac_cv_lib_x_opendir=no
10964 fi
10965 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10966 LIBS=$ac_check_lib_save_LIBS
10967 fi
10968 echo "$as_me:10968: result: $ac_cv_lib_x_opendir" >&5
10969 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
10970 if test $ac_cv_lib_x_opendir = yes; then
10971   LIBS="$LIBS -lx"
10972 fi
10973
10974 fi
10975
10976 echo "$as_me:10976: checking whether time.h and sys/time.h may both be included" >&5
10977 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
10978 if test "${ac_cv_header_time+set}" = set; then
10979   echo $ECHO_N "(cached) $ECHO_C" >&6
10980 else
10981   cat >conftest.$ac_ext <<_ACEOF
10982 #line 10982 "configure"
10983 #include "confdefs.h"
10984 #include <sys/types.h>
10985 #include <sys/time.h>
10986 #include <time.h>
10987
10988 int
10989 main ()
10990 {
10991 if ((struct tm *) 0)
10992 return 0;
10993   ;
10994   return 0;
10995 }
10996 _ACEOF
10997 rm -f conftest.$ac_objext
10998 if { (eval echo "$as_me:10998: \"$ac_compile\"") >&5
10999   (eval $ac_compile) 2>&5
11000   ac_status=$?
11001   echo "$as_me:11001: \$? = $ac_status" >&5
11002   (exit $ac_status); } &&
11003          { ac_try='test -s conftest.$ac_objext'
11004   { (eval echo "$as_me:11004: \"$ac_try\"") >&5
11005   (eval $ac_try) 2>&5
11006   ac_status=$?
11007   echo "$as_me:11007: \$? = $ac_status" >&5
11008   (exit $ac_status); }; }; then
11009   ac_cv_header_time=yes
11010 else
11011   echo "$as_me: failed program was:" >&5
11012 cat conftest.$ac_ext >&5
11013 ac_cv_header_time=no
11014 fi
11015 rm -f conftest.$ac_objext conftest.$ac_ext
11016 fi
11017 echo "$as_me:11017: result: $ac_cv_header_time" >&5
11018 echo "${ECHO_T}$ac_cv_header_time" >&6
11019 if test $ac_cv_header_time = yes; then
11020
11021 cat >>confdefs.h <<\EOF
11022 #define TIME_WITH_SYS_TIME 1
11023 EOF
11024
11025 fi
11026
11027 ###     checks for compiler characteristics
11028 ac_ext=c
11029 ac_cpp='$CPP $CPPFLAGS'
11030 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
11031 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
11032 ac_compiler_gnu=$ac_cv_c_compiler_gnu
11033 ac_main_return=return
11034
11035 echo "$as_me:11035: checking for $CC option to accept ANSI C" >&5
11036 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
11037 if test "${ac_cv_prog_cc_stdc+set}" = set; then
11038   echo $ECHO_N "(cached) $ECHO_C" >&6
11039 else
11040   ac_cv_prog_cc_stdc=no
11041 ac_save_CC=$CC
11042 cat >conftest.$ac_ext <<_ACEOF
11043 #line 11043 "configure"
11044 #include "confdefs.h"
11045 #include <stdarg.h>
11046 #include <stdio.h>
11047 #include <sys/types.h>
11048 #include <sys/stat.h>
11049 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
11050 struct buf { int x; };
11051 FILE * (*rcsopen) (struct buf *, struct stat *, int);
11052 static char *e (p, i)
11053      char **p;
11054      int i;
11055 {
11056   return p[i];
11057 }
11058 static char *f (char * (*g) (char **, int), char **p, ...)
11059 {
11060   char *s;
11061   va_list v;
11062   va_start (v,p);
11063   s = g (p, va_arg (v,int));
11064   va_end (v);
11065   return s;
11066 }
11067 int test (int i, double x);
11068 struct s1 {int (*f) (int a);};
11069 struct s2 {int (*f) (double a);};
11070 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
11071 int argc;
11072 char **argv;
11073 int
11074 main ()
11075 {
11076 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
11077   ;
11078   return 0;
11079 }
11080 _ACEOF
11081 # Don't try gcc -ansi; that turns off useful extensions and
11082 # breaks some systems' header files.
11083 # AIX                   -qlanglvl=ansi
11084 # Ultrix and OSF/1      -std1
11085 # HP-UX 10.20 and later -Ae
11086 # HP-UX older versions  -Aa -D_HPUX_SOURCE
11087 # SVR4                  -Xc -D__EXTENSIONS__
11088 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
11089 do
11090   CC="$ac_save_CC $ac_arg"
11091   rm -f conftest.$ac_objext
11092 if { (eval echo "$as_me:11092: \"$ac_compile\"") >&5
11093   (eval $ac_compile) 2>&5
11094   ac_status=$?
11095   echo "$as_me:11095: \$? = $ac_status" >&5
11096   (exit $ac_status); } &&
11097          { ac_try='test -s conftest.$ac_objext'
11098   { (eval echo "$as_me:11098: \"$ac_try\"") >&5
11099   (eval $ac_try) 2>&5
11100   ac_status=$?
11101   echo "$as_me:11101: \$? = $ac_status" >&5
11102   (exit $ac_status); }; }; then
11103   ac_cv_prog_cc_stdc=$ac_arg
11104 break
11105 else
11106   echo "$as_me: failed program was:" >&5
11107 cat conftest.$ac_ext >&5
11108 fi
11109 rm -f conftest.$ac_objext
11110 done
11111 rm -f conftest.$ac_ext conftest.$ac_objext
11112 CC=$ac_save_CC
11113
11114 fi
11115
11116 case "x$ac_cv_prog_cc_stdc" in
11117   x|xno)
11118     echo "$as_me:11118: result: none needed" >&5
11119 echo "${ECHO_T}none needed" >&6 ;;
11120   *)
11121     echo "$as_me:11121: result: $ac_cv_prog_cc_stdc" >&5
11122 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
11123     CC="$CC $ac_cv_prog_cc_stdc" ;;
11124 esac
11125
11126 echo "$as_me:11126: checking for an ANSI C-conforming const" >&5
11127 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
11128 if test "${ac_cv_c_const+set}" = set; then
11129   echo $ECHO_N "(cached) $ECHO_C" >&6
11130 else
11131   cat >conftest.$ac_ext <<_ACEOF
11132 #line 11132 "configure"
11133 #include "confdefs.h"
11134
11135 int
11136 main ()
11137 {
11138 /* FIXME: Include the comments suggested by Paul. */
11139 #ifndef __cplusplus
11140   /* Ultrix mips cc rejects this.  */
11141   typedef int charset[2];
11142   const charset x;
11143   /* SunOS 4.1.1 cc rejects this.  */
11144   char const *const *ccp;
11145   char **p;
11146   /* NEC SVR4.0.2 mips cc rejects this.  */
11147   struct point {int x, y;};
11148   static struct point const zero = {0,0};
11149   /* AIX XL C 1.02.0.0 rejects this.
11150      It does not let you subtract one const X* pointer from another in
11151      an arm of an if-expression whose if-part is not a constant
11152      expression */
11153   const char *g = "string";
11154   ccp = &g + (g ? g-g : 0);
11155   /* HPUX 7.0 cc rejects these. */
11156   ++ccp;
11157   p = (char**) ccp;
11158   ccp = (char const *const *) p;
11159   { /* SCO 3.2v4 cc rejects this.  */
11160     char *t;
11161     char const *s = 0 ? (char *) 0 : (char const *) 0;
11162
11163     *t++ = 0;
11164   }
11165   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
11166     int x[] = {25, 17};
11167     const int *foo = &x[0];
11168     ++foo;
11169   }
11170   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
11171     typedef const int *iptr;
11172     iptr p = 0;
11173     ++p;
11174   }
11175   { /* AIX XL C 1.02.0.0 rejects this saying
11176        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
11177     struct s { int j; const int *ap[3]; };
11178     struct s *b; b->j = 5;
11179   }
11180   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
11181     const int foo = 10;
11182   }
11183 #endif
11184
11185   ;
11186   return 0;
11187 }
11188 _ACEOF
11189 rm -f conftest.$ac_objext
11190 if { (eval echo "$as_me:11190: \"$ac_compile\"") >&5
11191   (eval $ac_compile) 2>&5
11192   ac_status=$?
11193   echo "$as_me:11193: \$? = $ac_status" >&5
11194   (exit $ac_status); } &&
11195          { ac_try='test -s conftest.$ac_objext'
11196   { (eval echo "$as_me:11196: \"$ac_try\"") >&5
11197   (eval $ac_try) 2>&5
11198   ac_status=$?
11199   echo "$as_me:11199: \$? = $ac_status" >&5
11200   (exit $ac_status); }; }; then
11201   ac_cv_c_const=yes
11202 else
11203   echo "$as_me: failed program was:" >&5
11204 cat conftest.$ac_ext >&5
11205 ac_cv_c_const=no
11206 fi
11207 rm -f conftest.$ac_objext conftest.$ac_ext
11208 fi
11209 echo "$as_me:11209: result: $ac_cv_c_const" >&5
11210 echo "${ECHO_T}$ac_cv_c_const" >&6
11211 if test $ac_cv_c_const = no; then
11212
11213 cat >>confdefs.h <<\EOF
11214 #define const
11215 EOF
11216
11217 fi
11218
11219 ###     Checks for external-data
11220
11221 echo "$as_me:11221: checking if data-only library module links" >&5
11222 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
11223 if test "${cf_cv_link_dataonly+set}" = set; then
11224   echo $ECHO_N "(cached) $ECHO_C" >&6
11225 else
11226
11227         rm -f conftest.a
11228         cat >conftest.$ac_ext <<EOF
11229 #line 11229 "configure"
11230 int     testdata[3] = { 123, 456, 789 };
11231 EOF
11232         if { (eval echo "$as_me:11232: \"$ac_compile\"") >&5
11233   (eval $ac_compile) 2>&5
11234   ac_status=$?
11235   echo "$as_me:11235: \$? = $ac_status" >&5
11236   (exit $ac_status); } ; then
11237                 mv conftest.o data.o && \
11238                 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
11239         fi
11240         rm -f conftest.$ac_ext data.o
11241         cat >conftest.$ac_ext <<EOF
11242 #line 11242 "configure"
11243 int     testfunc()
11244 {
11245 #if defined(NeXT)
11246         ${cf_cv_main_return:-return}(1);        /* I'm told this linker is broken */
11247 #else
11248         extern int testdata[3];
11249         return testdata[0] == 123
11250            &&  testdata[1] == 456
11251            &&  testdata[2] == 789;
11252 #endif
11253 }
11254 EOF
11255         if { (eval echo "$as_me:11255: \"$ac_compile\"") >&5
11256   (eval $ac_compile) 2>&5
11257   ac_status=$?
11258   echo "$as_me:11258: \$? = $ac_status" >&5
11259   (exit $ac_status); }; then
11260                 mv conftest.o func.o && \
11261                 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
11262         fi
11263         rm -f conftest.$ac_ext func.o
11264         ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
11265         cf_saveLIBS="$LIBS"
11266         LIBS="conftest.a $LIBS"
11267         if test "$cross_compiling" = yes; then
11268   cf_cv_link_dataonly=unknown
11269 else
11270   cat >conftest.$ac_ext <<_ACEOF
11271 #line 11271 "configure"
11272 #include "confdefs.h"
11273
11274         int main()
11275         {
11276                 extern int testfunc();
11277                 ${cf_cv_main_return:-return} (!testfunc());
11278         }
11279
11280 _ACEOF
11281 rm -f conftest$ac_exeext
11282 if { (eval echo "$as_me:11282: \"$ac_link\"") >&5
11283   (eval $ac_link) 2>&5
11284   ac_status=$?
11285   echo "$as_me:11285: \$? = $ac_status" >&5
11286   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11287   { (eval echo "$as_me:11287: \"$ac_try\"") >&5
11288   (eval $ac_try) 2>&5
11289   ac_status=$?
11290   echo "$as_me:11290: \$? = $ac_status" >&5
11291   (exit $ac_status); }; }; then
11292   cf_cv_link_dataonly=yes
11293 else
11294   echo "$as_me: program exited with status $ac_status" >&5
11295 echo "$as_me: failed program was:" >&5
11296 cat conftest.$ac_ext >&5
11297 cf_cv_link_dataonly=no
11298 fi
11299 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11300 fi
11301         LIBS="$cf_saveLIBS"
11302
11303 fi
11304
11305 echo "$as_me:11305: result: $cf_cv_link_dataonly" >&5
11306 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
11307
11308 if test "$cf_cv_link_dataonly" = no ; then
11309         cat >>confdefs.h <<\EOF
11310 #define BROKEN_LINKER 1
11311 EOF
11312
11313         BROKEN_LINKER=1
11314 fi
11315
11316 ###     Checks for library functions.
11317
11318 echo "$as_me:11318: checking for working mkstemp" >&5
11319 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
11320 if test "${cf_cv_func_mkstemp+set}" = set; then
11321   echo $ECHO_N "(cached) $ECHO_C" >&6
11322 else
11323
11324 rm -rf conftest*
11325 if test "$cross_compiling" = yes; then
11326   cf_cv_func_mkstemp=maybe
11327 else
11328   cat >conftest.$ac_ext <<_ACEOF
11329 #line 11329 "configure"
11330 #include "confdefs.h"
11331
11332 #include <sys/types.h>
11333 #include <stdlib.h>
11334 #include <stdio.h>
11335 #include <string.h>
11336 #include <sys/stat.h>
11337 int main()
11338 {
11339         char *tmpl = "conftestXXXXXX";
11340         char name[2][80];
11341         int n;
11342         int result = 0;
11343         int fd;
11344         struct stat sb;
11345
11346         umask(077);
11347         for (n = 0; n < 2; ++n) {
11348                 strcpy(name[n], tmpl);
11349                 if ((fd = mkstemp(name[n])) >= 0) {
11350                         if (!strcmp(name[n], tmpl)
11351                          || stat(name[n], &sb) != 0
11352                          || (sb.st_mode & S_IFMT) != S_IFREG
11353                          || (sb.st_mode & 077) != 0) {
11354                                 result = 1;
11355                         }
11356                         close(fd);
11357                 }
11358         }
11359         if (result == 0
11360          && !strcmp(name[0], name[1]))
11361                 result = 1;
11362         ${cf_cv_main_return:-return}(result);
11363 }
11364
11365 _ACEOF
11366 rm -f conftest$ac_exeext
11367 if { (eval echo "$as_me:11367: \"$ac_link\"") >&5
11368   (eval $ac_link) 2>&5
11369   ac_status=$?
11370   echo "$as_me:11370: \$? = $ac_status" >&5
11371   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11372   { (eval echo "$as_me:11372: \"$ac_try\"") >&5
11373   (eval $ac_try) 2>&5
11374   ac_status=$?
11375   echo "$as_me:11375: \$? = $ac_status" >&5
11376   (exit $ac_status); }; }; then
11377   cf_cv_func_mkstemp=yes
11378
11379 else
11380   echo "$as_me: program exited with status $ac_status" >&5
11381 echo "$as_me: failed program was:" >&5
11382 cat conftest.$ac_ext >&5
11383 cf_cv_func_mkstemp=no
11384
11385 fi
11386 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11387 fi
11388
11389 fi
11390 echo "$as_me:11390: result: $cf_cv_func_mkstemp" >&5
11391 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
11392 if test "x$cf_cv_func_mkstemp" = xmaybe ; then
11393         echo "$as_me:11393: checking for mkstemp" >&5
11394 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
11395 if test "${ac_cv_func_mkstemp+set}" = set; then
11396   echo $ECHO_N "(cached) $ECHO_C" >&6
11397 else
11398   cat >conftest.$ac_ext <<_ACEOF
11399 #line 11399 "configure"
11400 #include "confdefs.h"
11401 /* System header to define __stub macros and hopefully few prototypes,
11402     which can conflict with char mkstemp (); below.  */
11403 #include <assert.h>
11404 /* Override any gcc2 internal prototype to avoid an error.  */
11405 #ifdef __cplusplus
11406 extern "C"
11407 #endif
11408 /* We use char because int might match the return type of a gcc2
11409    builtin and then its argument prototype would still apply.  */
11410 char mkstemp ();
11411 char (*f) ();
11412
11413 int
11414 main ()
11415 {
11416 /* The GNU C library defines this for functions which it implements
11417     to always fail with ENOSYS.  Some functions are actually named
11418     something starting with __ and the normal name is an alias.  */
11419 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
11420 choke me
11421 #else
11422 f = mkstemp; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
11423 #endif
11424
11425   ;
11426   return 0;
11427 }
11428 _ACEOF
11429 rm -f conftest.$ac_objext conftest$ac_exeext
11430 if { (eval echo "$as_me:11430: \"$ac_link\"") >&5
11431   (eval $ac_link) 2>&5
11432   ac_status=$?
11433   echo "$as_me:11433: \$? = $ac_status" >&5
11434   (exit $ac_status); } &&
11435          { ac_try='test -s conftest$ac_exeext'
11436   { (eval echo "$as_me:11436: \"$ac_try\"") >&5
11437   (eval $ac_try) 2>&5
11438   ac_status=$?
11439   echo "$as_me:11439: \$? = $ac_status" >&5
11440   (exit $ac_status); }; }; then
11441   ac_cv_func_mkstemp=yes
11442 else
11443   echo "$as_me: failed program was:" >&5
11444 cat conftest.$ac_ext >&5
11445 ac_cv_func_mkstemp=no
11446 fi
11447 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11448 fi
11449 echo "$as_me:11449: result: $ac_cv_func_mkstemp" >&5
11450 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
11451
11452 fi
11453 if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
11454         cat >>confdefs.h <<\EOF
11455 #define HAVE_MKSTEMP 1
11456 EOF
11457
11458 fi
11459
11460 echo "$as_me:11460: checking return type of signal handlers" >&5
11461 echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
11462 if test "${ac_cv_type_signal+set}" = set; then
11463   echo $ECHO_N "(cached) $ECHO_C" >&6
11464 else
11465   cat >conftest.$ac_ext <<_ACEOF
11466 #line 11466 "configure"
11467 #include "confdefs.h"
11468 #include <sys/types.h>
11469 #include <signal.h>
11470 #ifdef signal
11471 # undef signal
11472 #endif
11473 #ifdef __cplusplus
11474 extern "C" void (*signal (int, void (*)(int)))(int);
11475 #else
11476 void (*signal ()) ();
11477 #endif
11478
11479 int
11480 main ()
11481 {
11482 int i;
11483   ;
11484   return 0;
11485 }
11486 _ACEOF
11487 rm -f conftest.$ac_objext
11488 if { (eval echo "$as_me:11488: \"$ac_compile\"") >&5
11489   (eval $ac_compile) 2>&5
11490   ac_status=$?
11491   echo "$as_me:11491: \$? = $ac_status" >&5
11492   (exit $ac_status); } &&
11493          { ac_try='test -s conftest.$ac_objext'
11494   { (eval echo "$as_me:11494: \"$ac_try\"") >&5
11495   (eval $ac_try) 2>&5
11496   ac_status=$?
11497   echo "$as_me:11497: \$? = $ac_status" >&5
11498   (exit $ac_status); }; }; then
11499   ac_cv_type_signal=void
11500 else
11501   echo "$as_me: failed program was:" >&5
11502 cat conftest.$ac_ext >&5
11503 ac_cv_type_signal=int
11504 fi
11505 rm -f conftest.$ac_objext conftest.$ac_ext
11506 fi
11507 echo "$as_me:11507: result: $ac_cv_type_signal" >&5
11508 echo "${ECHO_T}$ac_cv_type_signal" >&6
11509
11510 cat >>confdefs.h <<EOF
11511 #define RETSIGTYPE $ac_cv_type_signal
11512 EOF
11513
11514 if test -z "$cf_user_CFLAGS" && test "$with_no_leaks" = no ; then
11515         CFLAGS=`echo ${CFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
11516         CXXFLAGS=`echo ${CXXFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
11517 fi
11518
11519 cf_with_ada=yes
11520 if test "$cf_with_ada" != "no" ; then
11521
11522 cf_ada_make=gnatmake
11523 # Extract the first word of "$cf_ada_make", so it can be a program name with args.
11524 set dummy $cf_ada_make; ac_word=$2
11525 echo "$as_me:11525: checking for $ac_word" >&5
11526 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
11527 if test "${ac_cv_prog_gnat_exists+set}" = set; then
11528   echo $ECHO_N "(cached) $ECHO_C" >&6
11529 else
11530   if test -n "$gnat_exists"; then
11531   ac_cv_prog_gnat_exists="$gnat_exists" # Let the user override the test.
11532 else
11533   ac_save_IFS=$IFS; IFS=$ac_path_separator
11534 ac_dummy="$PATH"
11535 for ac_dir in $ac_dummy; do
11536   IFS=$ac_save_IFS
11537   test -z "$ac_dir" && ac_dir=.
11538   $as_executable_p "$ac_dir/$ac_word" || continue
11539 ac_cv_prog_gnat_exists="yes"
11540 echo "$as_me:11540: found $ac_dir/$ac_word" >&5
11541 break
11542 done
11543
11544   test -z "$ac_cv_prog_gnat_exists" && ac_cv_prog_gnat_exists="no"
11545 fi
11546 fi
11547 gnat_exists=$ac_cv_prog_gnat_exists
11548 if test -n "$gnat_exists"; then
11549   echo "$as_me:11549: result: $gnat_exists" >&5
11550 echo "${ECHO_T}$gnat_exists" >&6
11551 else
11552   echo "$as_me:11552: result: no" >&5
11553 echo "${ECHO_T}no" >&6
11554 fi
11555
11556 if test "$ac_cv_prog_gnat_exists" = no; then
11557    cf_ada_make=
11558    cf_cv_prog_gnat_correct=no
11559 else
11560
11561 echo "$as_me:11561: checking for gnat version" >&5
11562 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
11563 cf_gnat_version=`${cf_ada_make:-gnatmake} -v 2>&1 | \
11564         grep '[0-9].[0-9][0-9]*' |\
11565     sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
11566 echo "$as_me:11566: result: $cf_gnat_version" >&5
11567 echo "${ECHO_T}$cf_gnat_version" >&6
11568
11569 case $cf_gnat_version in #(vi
11570 3.1[1-9]*|3.[2-9]*|[4-9].*|20[0-9][0-9]) #(vi
11571         cf_cv_prog_gnat_correct=yes
11572         ;;
11573 *)
11574         { echo "$as_me:11574: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5
11575 echo "$as_me: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&2;}
11576         cf_cv_prog_gnat_correct=no
11577         ;;
11578 esac
11579
11580    # Extract the first word of "m4", so it can be a program name with args.
11581 set dummy m4; ac_word=$2
11582 echo "$as_me:11582: checking for $ac_word" >&5
11583 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
11584 if test "${ac_cv_prog_M4_exists+set}" = set; then
11585   echo $ECHO_N "(cached) $ECHO_C" >&6
11586 else
11587   if test -n "$M4_exists"; then
11588   ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
11589 else
11590   ac_save_IFS=$IFS; IFS=$ac_path_separator
11591 ac_dummy="$PATH"
11592 for ac_dir in $ac_dummy; do
11593   IFS=$ac_save_IFS
11594   test -z "$ac_dir" && ac_dir=.
11595   $as_executable_p "$ac_dir/$ac_word" || continue
11596 ac_cv_prog_M4_exists="yes"
11597 echo "$as_me:11597: found $ac_dir/$ac_word" >&5
11598 break
11599 done
11600
11601   test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
11602 fi
11603 fi
11604 M4_exists=$ac_cv_prog_M4_exists
11605 if test -n "$M4_exists"; then
11606   echo "$as_me:11606: result: $M4_exists" >&5
11607 echo "${ECHO_T}$M4_exists" >&6
11608 else
11609   echo "$as_me:11609: result: no" >&5
11610 echo "${ECHO_T}no" >&6
11611 fi
11612
11613    if test "$ac_cv_prog_M4_exists" = no; then
11614       cf_cv_prog_gnat_correct=no
11615       echo Ada95 binding required program m4 not found. Ada95 binding disabled.
11616    fi
11617    if test "$cf_cv_prog_gnat_correct" = yes; then
11618       echo "$as_me:11618: checking if GNAT works" >&5
11619 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
11620
11621 rm -rf conftest* *~conftest*
11622 cat >>conftest.ads <<CF_EOF
11623 procedure conftest;
11624 CF_EOF
11625 cat >>conftest.adb <<CF_EOF
11626 with Text_IO;
11627 with GNAT.OS_Lib;
11628 procedure conftest is
11629 begin
11630    Text_IO.Put ("Hello World");
11631    Text_IO.New_Line;
11632    GNAT.OS_Lib.OS_Exit (0);
11633 end conftest;
11634 CF_EOF
11635 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
11636    if ( ./conftest 1>&5 2>&1 ) ; then
11637       cf_cv_prog_gnat_correct=yes
11638    else
11639       cf_cv_prog_gnat_correct=no
11640    fi
11641 else
11642    cf_cv_prog_gnat_correct=no
11643 fi
11644 rm -rf conftest* *~conftest*
11645
11646       echo "$as_me:11646: result: $cf_cv_prog_gnat_correct" >&5
11647 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
11648    fi
11649 fi
11650
11651         if test "$cf_cv_prog_gnat_correct" = yes; then
11652
11653         echo "$as_me:11653: checking optimization options for ADAFLAGS" >&5
11654 echo $ECHO_N "checking optimization options for ADAFLAGS... $ECHO_C" >&6
11655         case "$CFLAGS" in
11656         *-g*)
11657
11658         ADAFLAGS="$ADAFLAGS -g"
11659
11660                 ;;
11661         esac
11662         case "$CFLAGS" in
11663         *-O*)
11664                 cf_O_flag=`echo "$CFLAGS" |sed -e 's/^.*-O/-O/' -e 's/[         ].*//'`
11665
11666         ADAFLAGS="$ADAFLAGS $cf_O_flag"
11667
11668                 ;;
11669         esac
11670         echo "$as_me:11670: result: $ADAFLAGS" >&5
11671 echo "${ECHO_T}$ADAFLAGS" >&6
11672
11673 echo "$as_me:11673: checking if GNAT supports generics" >&5
11674 echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6
11675 case $cf_gnat_version in #(vi
11676 3.[1-9]*|[4-9].*) #(vi
11677         cf_gnat_generics=yes
11678         ;;
11679 *)
11680         cf_gnat_generics=no
11681         ;;
11682 esac
11683 echo "$as_me:11683: result: $cf_gnat_generics" >&5
11684 echo "${ECHO_T}$cf_gnat_generics" >&6
11685
11686 if test "$cf_gnat_generics" = yes
11687 then
11688         cf_compile_generics=generics
11689         cf_generic_objects="\${GENOBJS}"
11690 else
11691         cf_compile_generics=
11692         cf_generic_objects=
11693 fi
11694
11695 echo "$as_me:11695: checking if GNAT supports SIGINT" >&5
11696 echo $ECHO_N "checking if GNAT supports SIGINT... $ECHO_C" >&6
11697 if test "${cf_cv_gnat_sigint+set}" = set; then
11698   echo $ECHO_N "(cached) $ECHO_C" >&6
11699 else
11700
11701 rm -rf conftest* *~conftest*
11702 cat >>conftest.ads <<CF_EOF
11703 with Ada.Interrupts.Names;
11704
11705 package ConfTest is
11706
11707    pragma Warnings (Off);  --  the next pragma exists since 3.11p
11708    pragma Unreserve_All_Interrupts;
11709    pragma Warnings (On);
11710
11711    protected Process is
11712       procedure Stop;
11713       function Continue return Boolean;
11714       pragma Attach_Handler (Stop, Ada.Interrupts.Names.SIGINT);
11715    private
11716       Done : Boolean := False;
11717    end Process;
11718
11719 end ConfTest;
11720 CF_EOF
11721 cat >>conftest.adb <<CF_EOF
11722 package body ConfTest is
11723    protected body Process is
11724       procedure Stop is
11725       begin
11726          Done := True;
11727       end Stop;
11728       function Continue return Boolean is
11729       begin
11730          return not Done;
11731       end Continue;
11732    end Process;
11733 end ConfTest;
11734 CF_EOF
11735 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
11736       cf_cv_gnat_sigint=yes
11737 else
11738    cf_cv_gnat_sigint=no
11739 fi
11740 rm -rf conftest* *~conftest*
11741
11742 fi
11743 echo "$as_me:11743: result: $cf_cv_gnat_sigint" >&5
11744 echo "${ECHO_T}$cf_cv_gnat_sigint" >&6
11745
11746 if test $cf_cv_gnat_sigint = yes ; then
11747         USE_GNAT_SIGINT=""
11748 else
11749         USE_GNAT_SIGINT="#"
11750 fi
11751
11752 echo "$as_me:11752: checking if GNAT pragma Unreferenced works" >&5
11753 echo $ECHO_N "checking if GNAT pragma Unreferenced works... $ECHO_C" >&6
11754 if test "${cf_cv_pragma_unreferenced+set}" = set; then
11755   echo $ECHO_N "(cached) $ECHO_C" >&6
11756 else
11757
11758 rm -rf conftest* *~conftest*
11759 cat >>conftest.ads <<CF_EOF
11760 procedure conftest;
11761 CF_EOF
11762 cat >>conftest.adb <<CF_EOF
11763 with Text_IO;
11764 with GNAT.OS_Lib;
11765 procedure conftest is
11766    test : Integer;
11767    pragma Unreferenced (test);
11768 begin
11769    test := 1;
11770    Text_IO.Put ("Hello World");
11771    Text_IO.New_Line;
11772    GNAT.OS_Lib.OS_Exit (0);
11773 end conftest;
11774 CF_EOF
11775 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
11776       cf_cv_pragma_unreferenced=yes
11777 else
11778    cf_cv_pragma_unreferenced=no
11779 fi
11780 rm -rf conftest* *~conftest*
11781
11782 fi
11783 echo "$as_me:11783: result: $cf_cv_pragma_unreferenced" >&5
11784 echo "${ECHO_T}$cf_cv_pragma_unreferenced" >&6
11785
11786 # if the pragma is supported, use it (needed in the Trace code).
11787 if test $cf_cv_pragma_unreferenced = yes ; then
11788         PRAGMA_UNREF=TRUE
11789 else
11790         PRAGMA_UNREF=FALSE
11791 fi
11792
11793 cf_gnat_libraries=no
11794 cf_gnat_projects=no
11795
11796 echo "$as_me:11796: checking if GNAT supports project files" >&5
11797 echo $ECHO_N "checking if GNAT supports project files... $ECHO_C" >&6
11798 case $cf_gnat_version in #(vi
11799 3.[0-9]*) #(vi
11800         ;;
11801 *)
11802         case $cf_cv_system_name in #(vi
11803         cygwin*) #(vi
11804                 ;;
11805         *)
11806                 mkdir conftest.src conftest.bin conftest.lib
11807                 cd conftest.src
11808                 rm -rf conftest* *~conftest*
11809                 cat >>library.gpr <<CF_EOF
11810 project Library is
11811   Kind := External ("LIB_KIND");
11812   for Library_Name use "ConfTest";
11813   for Object_Dir use ".";
11814   for Library_ALI_Dir use External("LIBRARY_DIR");
11815   for Library_Version use External ("SONAME");
11816   for Library_Kind use Kind;
11817   for Library_Dir use External("BUILD_DIR");
11818   Source_Dir := External ("SOURCE_DIR");
11819   for Source_Dirs use (Source_Dir);
11820   package Compiler is
11821      for Default_Switches ("Ada") use
11822        ("-g",
11823         "-O2",
11824         "-gnatafno",
11825         "-gnatVa",   -- All validity checks
11826         "-gnatwa");  -- Activate all optional errors
11827   end Compiler;
11828 end Library;
11829 CF_EOF
11830                 cat >>confpackage.ads <<CF_EOF
11831 package ConfPackage is
11832    procedure conftest;
11833 end ConfPackage;
11834 CF_EOF
11835                 cat >>confpackage.adb <<CF_EOF
11836 with Text_IO;
11837 package body ConfPackage is
11838    procedure conftest is
11839    begin
11840       Text_IO.Put ("Hello World");
11841       Text_IO.New_Line;
11842    end conftest;
11843 end ConfPackage;
11844 CF_EOF
11845                 if ( $cf_ada_make $ADAFLAGS \
11846                                 -Plibrary.gpr \
11847                                 -XBUILD_DIR=`cd ../conftest.bin;pwd` \
11848                                 -XLIBRARY_DIR=`cd ../conftest.lib;pwd` \
11849                                 -XSOURCE_DIR=`pwd` \
11850                                 -XSONAME=libConfTest.so.1 \
11851                                 -XLIB_KIND=static 1>&5 2>&1 ) ; then
11852                         cf_gnat_projects=yes
11853                 fi
11854                 cd ..
11855                 if test -f conftest.lib/confpackage.ali
11856                 then
11857                         cf_gnat_libraries=yes
11858                 fi
11859                 rm -rf conftest* *~conftest*
11860                 ;;
11861         esac
11862         ;;
11863 esac
11864 echo "$as_me:11864: result: $cf_gnat_projects" >&5
11865 echo "${ECHO_T}$cf_gnat_projects" >&6
11866
11867 if test $cf_gnat_projects = yes
11868 then
11869         echo "$as_me:11869: checking if GNAT supports libraries" >&5
11870 echo $ECHO_N "checking if GNAT supports libraries... $ECHO_C" >&6
11871         echo "$as_me:11871: result: $cf_gnat_libraries" >&5
11872 echo "${ECHO_T}$cf_gnat_libraries" >&6
11873 fi
11874
11875 if test "$cf_gnat_projects" = yes
11876 then
11877         USE_OLD_MAKERULES="#"
11878         USE_GNAT_PROJECTS=""
11879 else
11880         USE_OLD_MAKERULES=""
11881         USE_GNAT_PROJECTS="#"
11882 fi
11883
11884 if test "$cf_gnat_libraries" = yes
11885 then
11886         USE_GNAT_LIBRARIES=""
11887 else
11888         USE_GNAT_LIBRARIES="#"
11889 fi
11890
11891 echo "$as_me:11891: checking for ada-compiler" >&5
11892 echo $ECHO_N "checking for ada-compiler... $ECHO_C" >&6
11893
11894 # Check whether --with-ada-compiler or --without-ada-compiler was given.
11895 if test "${with_ada_compiler+set}" = set; then
11896   withval="$with_ada_compiler"
11897   cf_ada_compiler=$withval
11898 else
11899   cf_ada_compiler=gnatmake
11900 fi;
11901
11902 echo "$as_me:11902: result: $cf_ada_compiler" >&5
11903 echo "${ECHO_T}$cf_ada_compiler" >&6
11904
11905                 cf_ada_package=terminal_interface
11906
11907 echo "$as_me:11907: checking for ada-include" >&5
11908 echo $ECHO_N "checking for ada-include... $ECHO_C" >&6
11909
11910 # Check whether --with-ada-include or --without-ada-include was given.
11911 if test "${with_ada_include+set}" = set; then
11912   withval="$with_ada_include"
11913
11914 else
11915   withval="${ADA_INCLUDE:-$prefix/share/ada/adainclude}"
11916 fi; if test -n "$prefix/share/ada/adainclude" ; then
11917
11918 if test "x$prefix" != xNONE; then
11919   cf_path_syntax="$prefix"
11920 else
11921   cf_path_syntax="$ac_default_prefix"
11922 fi
11923
11924 case ".$withval" in #(vi
11925 .\$\(*\)*|.\'*\'*) #(vi
11926   ;;
11927 ..|./*|.\\*) #(vi
11928   ;;
11929 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
11930   ;;
11931 .\${*prefix}*|.\${*dir}*) #(vi
11932   eval withval="$withval"
11933   case ".$withval" in #(vi
11934   .NONE/*)
11935     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
11936     ;;
11937   esac
11938   ;; #(vi
11939 .no|.NONE/*)
11940   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
11941   ;;
11942 *)
11943   { { echo "$as_me:11943: error: expected a pathname, not \"$withval\"" >&5
11944 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
11945    { (exit 1); exit 1; }; }
11946   ;;
11947 esac
11948
11949 fi
11950 ADA_INCLUDE="$withval"
11951
11952 echo "$as_me:11952: result: $ADA_INCLUDE" >&5
11953 echo "${ECHO_T}$ADA_INCLUDE" >&6
11954
11955 echo "$as_me:11955: checking for ada-objects" >&5
11956 echo $ECHO_N "checking for ada-objects... $ECHO_C" >&6
11957
11958 # Check whether --with-ada-objects or --without-ada-objects was given.
11959 if test "${with_ada_objects+set}" = set; then
11960   withval="$with_ada_objects"
11961
11962 else
11963   withval="${ADA_OBJECTS:-$prefix/lib/ada/adalib}"
11964 fi; if test -n "$prefix/lib/ada/adalib" ; then
11965
11966 if test "x$prefix" != xNONE; then
11967   cf_path_syntax="$prefix"
11968 else
11969   cf_path_syntax="$ac_default_prefix"
11970 fi
11971
11972 case ".$withval" in #(vi
11973 .\$\(*\)*|.\'*\'*) #(vi
11974   ;;
11975 ..|./*|.\\*) #(vi
11976   ;;
11977 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
11978   ;;
11979 .\${*prefix}*|.\${*dir}*) #(vi
11980   eval withval="$withval"
11981   case ".$withval" in #(vi
11982   .NONE/*)
11983     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
11984     ;;
11985   esac
11986   ;; #(vi
11987 .no|.NONE/*)
11988   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
11989   ;;
11990 *)
11991   { { echo "$as_me:11991: error: expected a pathname, not \"$withval\"" >&5
11992 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
11993    { (exit 1); exit 1; }; }
11994   ;;
11995 esac
11996
11997 fi
11998 ADA_OBJECTS="$withval"
11999
12000 echo "$as_me:12000: result: $ADA_OBJECTS" >&5
12001 echo "${ECHO_T}$ADA_OBJECTS" >&6
12002
12003 echo "$as_me:12003: checking if an Ada95 shared-library should be built" >&5
12004 echo $ECHO_N "checking if an Ada95 shared-library should be built... $ECHO_C" >&6
12005
12006 # Check whether --with-ada-sharedlib or --without-ada-sharedlib was given.
12007 if test "${with_ada_sharedlib+set}" = set; then
12008   withval="$with_ada_sharedlib"
12009   with_ada_sharedlib=$withval
12010 else
12011   with_ada_sharedlib=no
12012 fi;
12013 echo "$as_me:12013: result: $with_ada_sharedlib" >&5
12014 echo "${ECHO_T}$with_ada_sharedlib" >&6
12015
12016 ADA_SHAREDLIB='lib$(LIB_NAME).so.1'
12017 MAKE_ADA_SHAREDLIB="#"
12018
12019 if test "x$with_ada_sharedlib" != xno
12020 then
12021         MAKE_ADA_SHAREDLIB=
12022         if test "x$with_ada_sharedlib" != xyes
12023         then
12024                 ADA_SHAREDLIB="$with_ada_sharedlib"
12025         fi
12026 fi
12027
12028         else
12029                 { { echo "$as_me:12029: error: No usable Ada compiler found" >&5
12030 echo "$as_me: error: No usable Ada compiler found" >&2;}
12031    { (exit 1); exit 1; }; }
12032         fi
12033 else
12034         { { echo "$as_me:12034: error: The Ada compiler is needed for this package" >&5
12035 echo "$as_me: error: The Ada compiler is needed for this package" >&2;}
12036    { (exit 1); exit 1; }; }
12037 fi
12038
12039 ################################################################################
12040
12041 # not needed
12042 TINFO_LDFLAGS2=
12043
12044 TINFO_LIBS=
12045
12046 ### Construct the list of include-directories to be generated
12047
12048 CPPFLAGS="$CPPFLAGS -I. -I../include"
12049 if test "$srcdir" != "."; then
12050         CPPFLAGS="$CPPFLAGS -I\${srcdir}/../include"
12051 fi
12052 if test "$GCC" != yes; then
12053         CPPFLAGS="$CPPFLAGS -I\${includedir}"
12054 elif test "$includedir" != "/usr/include"; then
12055         if test "$includedir" = '${prefix}/include' ; then
12056                 if test $prefix != /usr ; then
12057                         CPPFLAGS="$CPPFLAGS -I\${includedir}"
12058                 fi
12059         else
12060                 CPPFLAGS="$CPPFLAGS -I\${includedir}"
12061         fi
12062 fi
12063
12064 ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
12065 if test "$srcdir" != "."; then
12066         ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
12067 fi
12068 if test "$GCC" != yes; then
12069         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
12070 elif test "$includedir" != "/usr/include"; then
12071         if test "$includedir" = '${prefix}/include' ; then
12072                 if test $prefix != /usr ; then
12073                         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
12074                 fi
12075         else
12076                 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
12077         fi
12078 fi
12079
12080 ### Build up pieces for makefile rules
12081 echo "$as_me:12081: checking default library suffix" >&5
12082 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
12083
12084         case $DFT_LWR_MODEL in
12085         libtool) DFT_ARG_SUFFIX=''   ;;
12086         normal)  DFT_ARG_SUFFIX=''   ;;
12087         debug)   DFT_ARG_SUFFIX='_g' ;;
12088         profile) DFT_ARG_SUFFIX='_p' ;;
12089         shared)  DFT_ARG_SUFFIX=''   ;;
12090         esac
12091         test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
12092 echo "$as_me:12092: result: $DFT_ARG_SUFFIX" >&5
12093 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
12094
12095 echo "$as_me:12095: checking default library-dependency suffix" >&5
12096 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
12097
12098         case $DFT_LWR_MODEL in #(vi
12099         libtool) #(vi
12100                 DFT_LIB_SUFFIX='.la'
12101                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
12102                 ;;
12103         normal) #(vi
12104                 DFT_LIB_SUFFIX='.a'
12105                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
12106                 ;;
12107         debug) #(vi
12108                 DFT_LIB_SUFFIX='_g.a'
12109                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
12110                 ;;
12111         profile) #(vi
12112                 DFT_LIB_SUFFIX='_p.a'
12113                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
12114                 ;;
12115         shared) #(vi
12116                 case $cf_cv_system_name in
12117                 aix[5-7]*) #(vi
12118                         DFT_LIB_SUFFIX='.a'
12119                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
12120                         ;;
12121                 cygwin*|mingw*) #(vi
12122                         DFT_LIB_SUFFIX='.dll'
12123                         DFT_DEP_SUFFIX='.dll.a'
12124                         ;;
12125                 darwin*) #(vi
12126                         DFT_LIB_SUFFIX='.dylib'
12127                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
12128                         ;;
12129                 hpux*) #(vi
12130                         case $target in
12131                         ia64*) #(vi
12132                                 DFT_LIB_SUFFIX='.so'
12133                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
12134                                 ;;
12135                         *) #(vi
12136                                 DFT_LIB_SUFFIX='.sl'
12137                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
12138                                 ;;
12139                         esac
12140                         ;;
12141                 *)      DFT_LIB_SUFFIX='.so'
12142                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
12143                         ;;
12144                 esac
12145         esac
12146         test -n "$LIB_SUFFIX" && DFT_LIB_SUFFIX="${LIB_SUFFIX}${DFT_LIB_SUFFIX}"
12147         test -n "$LIB_SUFFIX" && DFT_DEP_SUFFIX="${LIB_SUFFIX}${DFT_DEP_SUFFIX}"
12148 echo "$as_me:12148: result: $DFT_DEP_SUFFIX" >&5
12149 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
12150
12151 echo "$as_me:12151: checking default object directory" >&5
12152 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
12153
12154         case $DFT_LWR_MODEL in
12155         libtool) DFT_OBJ_SUBDIR='obj_lo'  ;;
12156         normal)  DFT_OBJ_SUBDIR='objects' ;;
12157         debug)   DFT_OBJ_SUBDIR='obj_g' ;;
12158         profile) DFT_OBJ_SUBDIR='obj_p' ;;
12159         shared)
12160                 case $cf_cv_system_name in #(vi
12161                 cygwin) #(vi
12162                         DFT_OBJ_SUBDIR='objects' ;;
12163                 *)
12164                         DFT_OBJ_SUBDIR='obj_s' ;;
12165                 esac
12166         esac
12167 echo "$as_me:12167: result: $DFT_OBJ_SUBDIR" >&5
12168 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
12169
12170 ### Set up low-level terminfo dependencies for makefiles.
12171
12172 if test "$DFT_LWR_MODEL" = shared ; then
12173         case $cf_cv_system_name in #(vi
12174         cygwin*)
12175                 # "lib" files have ".dll.a" suffix, "cyg" files have ".dll"
12176                 ;;
12177         esac
12178 fi
12179
12180 ### Construct the list of subdirectories for which we'll customize makefiles
12181 ### with the appropriate compile-rules.
12182
12183 SUB_MAKEFILES="gen/adacurses${DFT_ARG_SUFFIX}-config:gen/adacurses-config.in"
12184
12185 cat >>confdefs.h <<EOF
12186 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
12187 EOF
12188
12189 ### Now that we're done running tests, add the compiler-warnings, if any
12190
12191 cf_fix_cppflags=no
12192 cf_new_cflags=
12193 cf_new_cppflags=
12194 cf_new_extra_cppflags=
12195
12196 for cf_add_cflags in $EXTRA_CFLAGS
12197 do
12198 case $cf_fix_cppflags in
12199 no)
12200         case $cf_add_cflags in #(vi
12201         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
12202                 case $cf_add_cflags in
12203                 -D*)
12204                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12205
12206                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12207                                 && test -z "${cf_tst_cflags}" \
12208                                 && cf_fix_cppflags=yes
12209
12210                         if test $cf_fix_cppflags = yes ; then
12211                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12212                                 continue
12213                         elif test "${cf_tst_cflags}" = "\"'" ; then
12214                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12215                                 continue
12216                         fi
12217                         ;;
12218                 esac
12219                 case "$CPPFLAGS" in
12220                 *$cf_add_cflags) #(vi
12221                         ;;
12222                 *) #(vi
12223                         case $cf_add_cflags in #(vi
12224                         -D*)
12225                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12226
12227 CPPFLAGS=`echo "$CPPFLAGS" | \
12228         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
12229                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
12230
12231                                 ;;
12232                         esac
12233                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
12234                         ;;
12235                 esac
12236                 ;;
12237         *)
12238                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
12239                 ;;
12240         esac
12241         ;;
12242 yes)
12243         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12244
12245         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12246
12247         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12248                 && test -z "${cf_tst_cflags}" \
12249                 && cf_fix_cppflags=no
12250         ;;
12251 esac
12252 done
12253
12254 if test -n "$cf_new_cflags" ; then
12255
12256         CFLAGS="$CFLAGS $cf_new_cflags"
12257 fi
12258
12259 if test -n "$cf_new_cppflags" ; then
12260
12261         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
12262 fi
12263
12264 if test -n "$cf_new_extra_cppflags" ; then
12265
12266         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
12267 fi
12268
12269 ################################################################################
12270
12271 if test x"$enable_pc_files" = xyes ; then \
12272 SUB_MAKEFILES="$SUB_MAKEFILES misc/gen-pkgconfig:misc/gen-pkgconfig.in"
12273 MAKE_PC_FILES=
12274 else
12275 MAKE_PC_FILES="#"
12276 fi
12277
12278 ################################################################################
12279
12280 TEST_ARG2=
12281
12282 TEST_LIBS2=
12283
12284 NCURSES_SHLIB2="sh -c"
12285
12286 ADA_SUBDIRS="include gen src doc"
12287 if test "x$cf_with_tests" != "xno" ; then
12288         ADA_SUBDIRS="$ADA_SUBDIRS samples"
12289 fi
12290 for cf_dir in $ADA_SUBDIRS
12291 do
12292         SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
12293 done
12294
12295 NCURSES_TREE="#"
12296
12297 EXTERNAL_TREE=
12298
12299 # match layout used by make-tar.sh
12300 ADAHTML_DIR=../doc/ada
12301
12302 ac_config_files="$ac_config_files $SUB_MAKEFILES doc/adacurses${DFT_ARG_SUFFIX}-config.1:doc/MKada_config.in Makefile"
12303 ac_config_commands="$ac_config_commands default"
12304 cat >confcache <<\_ACEOF
12305 # This file is a shell script that caches the results of configure
12306 # tests run on this system so they can be shared between configure
12307 # scripts and configure runs, see configure's option --config-cache.
12308 # It is not useful on other systems.  If it contains results you don't
12309 # want to keep, you may remove or edit it.
12310 #
12311 # config.status only pays attention to the cache file if you give it
12312 # the --recheck option to rerun configure.
12313 #
12314 # `ac_cv_env_foo' variables (set or unset) will be overriden when
12315 # loading this file, other *unset* `ac_cv_foo' will be assigned the
12316 # following values.
12317
12318 _ACEOF
12319
12320 # The following way of writing the cache mishandles newlines in values,
12321 # but we know of no workaround that is simple, portable, and efficient.
12322 # So, don't put newlines in cache variables' values.
12323 # Ultrix sh set writes to stderr and can't be redirected directly,
12324 # and sets the high bit in the cache file unless we assign to the vars.
12325 {
12326   (set) 2>&1 |
12327     case `(ac_space=' '; set | grep ac_space) 2>&1` in
12328     *ac_space=\ *)
12329       # `set' does not quote correctly, so add quotes (double-quote
12330       # substitution turns \\\\ into \\, and sed turns \\ into \).
12331       sed -n \
12332         "s/'/'\\\\''/g;
12333           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
12334       ;;
12335     *)
12336       # `set' quotes correctly as required by POSIX, so do not add quotes.
12337       sed -n \
12338         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
12339       ;;
12340     esac;
12341 } |
12342   sed '
12343      t clear
12344      : clear
12345      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
12346      t end
12347      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
12348      : end' >>confcache
12349 if cmp -s $cache_file confcache; then :; else
12350   if test -w $cache_file; then
12351     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
12352     cat confcache >$cache_file
12353   else
12354     echo "not updating unwritable cache $cache_file"
12355   fi
12356 fi
12357 rm -f confcache
12358
12359 test "x$prefix" = xNONE && prefix=$ac_default_prefix
12360 # Let make expand exec_prefix.
12361 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
12362
12363 # VPATH may cause trouble with some makes, so we remove $(srcdir),
12364 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
12365 # trailing colons and then remove the whole line if VPATH becomes empty
12366 # (actually we leave an empty line to preserve line numbers).
12367 if test "x$srcdir" = x.; then
12368   ac_vpsub='/^[         ]*VPATH[        ]*=/{
12369 s/:*\$(srcdir):*/:/;
12370 s/:*\${srcdir}:*/:/;
12371 s/:*@srcdir@:*/:/;
12372 s/^\([^=]*=[    ]*\):*/\1/;
12373 s/:*$//;
12374 s/^[^=]*=[      ]*$//;
12375 }'
12376 fi
12377
12378 DEFS=-DHAVE_CONFIG_H
12379
12380 : ${CONFIG_STATUS=./config.status}
12381 ac_clean_files_save=$ac_clean_files
12382 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
12383 { echo "$as_me:12383: creating $CONFIG_STATUS" >&5
12384 echo "$as_me: creating $CONFIG_STATUS" >&6;}
12385 cat >$CONFIG_STATUS <<_ACEOF
12386 #! $SHELL
12387 # Generated automatically by configure.
12388 # Run this file to recreate the current configuration.
12389 # Compiler output produced by configure, useful for debugging
12390 # configure, is in config.log if it exists.
12391
12392 debug=false
12393 SHELL=\${CONFIG_SHELL-$SHELL}
12394 ac_cs_invocation="\$0 \$@"
12395
12396 _ACEOF
12397
12398 cat >>$CONFIG_STATUS <<\_ACEOF
12399 # Be Bourne compatible
12400 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
12401   emulate sh
12402   NULLCMD=:
12403 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
12404   set -o posix
12405 fi
12406
12407 # Name of the executable.
12408 as_me=`echo "$0" |sed 's,.*[\\/],,'`
12409
12410 if expr a : '\(a\)' >/dev/null 2>&1; then
12411   as_expr=expr
12412 else
12413   as_expr=false
12414 fi
12415
12416 rm -f conf$$ conf$$.exe conf$$.file
12417 echo >conf$$.file
12418 if ln -s conf$$.file conf$$ 2>/dev/null; then
12419   # We could just check for DJGPP; but this test a) works b) is more generic
12420   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
12421   if test -f conf$$.exe; then
12422     # Don't use ln at all; we don't have any links
12423     as_ln_s='cp -p'
12424   else
12425     as_ln_s='ln -s'
12426   fi
12427 elif ln conf$$.file conf$$ 2>/dev/null; then
12428   as_ln_s=ln
12429 else
12430   as_ln_s='cp -p'
12431 fi
12432 rm -f conf$$ conf$$.exe conf$$.file
12433
12434 as_executable_p="test -f"
12435
12436 # Support unset when possible.
12437 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
12438   as_unset=unset
12439 else
12440   as_unset=false
12441 fi
12442
12443 # NLS nuisances.
12444 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
12445 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
12446 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
12447 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
12448 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
12449 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
12450 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
12451 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
12452
12453 # IFS
12454 # We need space, tab and new line, in precisely that order.
12455 as_nl='
12456 '
12457 IFS="   $as_nl"
12458
12459 # CDPATH.
12460 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
12461
12462 exec 6>&1
12463
12464 _ACEOF
12465
12466 # Files that config.status was made for.
12467 if test -n "$ac_config_files"; then
12468   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
12469 fi
12470
12471 if test -n "$ac_config_headers"; then
12472   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
12473 fi
12474
12475 if test -n "$ac_config_links"; then
12476   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
12477 fi
12478
12479 if test -n "$ac_config_commands"; then
12480   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
12481 fi
12482
12483 cat >>$CONFIG_STATUS <<\EOF
12484
12485 ac_cs_usage="\
12486 \`$as_me' instantiates files from templates according to the
12487 current configuration.
12488
12489 Usage: $0 [OPTIONS] [FILE]...
12490
12491   -h, --help       print this help, then exit
12492   -V, --version    print version number, then exit
12493   -d, --debug      don't remove temporary files
12494       --recheck    update $as_me by reconfiguring in the same conditions
12495   --file=FILE[:TEMPLATE]
12496                    instantiate the configuration file FILE
12497   --header=FILE[:TEMPLATE]
12498                    instantiate the configuration header FILE
12499
12500 Configuration files:
12501 $config_files
12502
12503 Configuration headers:
12504 $config_headers
12505
12506 Configuration commands:
12507 $config_commands
12508
12509 Report bugs to <dickey@invisible-island.net>."
12510 EOF
12511
12512 cat >>$CONFIG_STATUS <<EOF
12513 ac_cs_version="\\
12514 config.status
12515 configured by $0, generated by GNU Autoconf 2.52.20120811,
12516   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
12517
12518 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
12519 Free Software Foundation, Inc.
12520 This config.status script is free software; the Free Software Foundation
12521 gives unlimited permission to copy, distribute and modify it."
12522 srcdir=$srcdir
12523 INSTALL="$INSTALL"
12524 EOF
12525
12526 cat >>$CONFIG_STATUS <<\EOF
12527 # If no file are specified by the user, then we need to provide default
12528 # value.  By we need to know if files were specified by the user.
12529 ac_need_defaults=:
12530 while test $# != 0
12531 do
12532   case $1 in
12533   --*=*)
12534     ac_option=`expr "x$1" : 'x\([^=]*\)='`
12535     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
12536     shift
12537     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
12538     shift
12539     ;;
12540   -*);;
12541   *) # This is not an option, so the user has probably given explicit
12542      # arguments.
12543      ac_need_defaults=false;;
12544   esac
12545
12546   case $1 in
12547   # Handling of the options.
12548 EOF
12549 cat >>$CONFIG_STATUS <<EOF
12550   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
12551     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
12552     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
12553 EOF
12554 cat >>$CONFIG_STATUS <<\EOF
12555   --version | --vers* | -V )
12556     echo "$ac_cs_version"; exit 0 ;;
12557   --he | --h)
12558     # Conflict between --help and --header
12559     { { echo "$as_me:12559: error: ambiguous option: $1
12560 Try \`$0 --help' for more information." >&5
12561 echo "$as_me: error: ambiguous option: $1
12562 Try \`$0 --help' for more information." >&2;}
12563    { (exit 1); exit 1; }; };;
12564   --help | --hel | -h )
12565     echo "$ac_cs_usage"; exit 0 ;;
12566   --debug | --d* | -d )
12567     debug=: ;;
12568   --file | --fil | --fi | --f )
12569     shift
12570     CONFIG_FILES="$CONFIG_FILES $1"
12571     ac_need_defaults=false;;
12572   --header | --heade | --head | --hea )
12573     shift
12574     CONFIG_HEADERS="$CONFIG_HEADERS $1"
12575     ac_need_defaults=false;;
12576
12577   # This is an error.
12578   -*) { { echo "$as_me:12578: error: unrecognized option: $1
12579 Try \`$0 --help' for more information." >&5
12580 echo "$as_me: error: unrecognized option: $1
12581 Try \`$0 --help' for more information." >&2;}
12582    { (exit 1); exit 1; }; } ;;
12583
12584   *) ac_config_targets="$ac_config_targets $1" ;;
12585
12586   esac
12587   shift
12588 done
12589
12590 exec 5>>config.log
12591 cat >&5 << _ACEOF
12592
12593 ## ----------------------- ##
12594 ## Running config.status.  ##
12595 ## ----------------------- ##
12596
12597 This file was extended by $as_me 2.52.20120811, executed with
12598   CONFIG_FILES    = $CONFIG_FILES
12599   CONFIG_HEADERS  = $CONFIG_HEADERS
12600   CONFIG_LINKS    = $CONFIG_LINKS
12601   CONFIG_COMMANDS = $CONFIG_COMMANDS
12602   > $ac_cs_invocation
12603 on `(hostname || uname -n) 2>/dev/null | sed 1q`
12604
12605 _ACEOF
12606 EOF
12607
12608 cat >>$CONFIG_STATUS <<EOF
12609 #
12610 # INIT-COMMANDS section.
12611 #
12612
12613 ### Special initialization commands, used to pass information from the
12614 ### configuration-run into config.status
12615
12616 AWK="$AWK"
12617 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
12618 DFT_LWR_MODEL="$DFT_LWR_MODEL"
12619 LIB_NAME="$LIB_NAME"
12620 LIB_PREFIX="$LIB_PREFIX"
12621 LIB_SUFFIX="$LIB_SUFFIX"
12622 LN_S="$LN_S"
12623 NCURSES_MAJOR="$NCURSES_MAJOR"
12624 NCURSES_MINOR="$NCURSES_MINOR"
12625 NCURSES_PATCH="$NCURSES_PATCH"
12626 USE_OLD_MAKERULES="$USE_OLD_MAKERULES"
12627 cf_cv_abi_version="$cf_cv_abi_version"
12628 cf_cv_rel_version="$cf_cv_rel_version"
12629 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
12630 cf_cv_shared_soname='$cf_cv_shared_soname'
12631 cf_cv_shlib_version="$cf_cv_shlib_version"
12632 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
12633 cf_cv_system_name="$cf_cv_system_name"
12634 host="$host"
12635 target="$target"
12636
12637 EOF
12638
12639 cat >>$CONFIG_STATUS <<\EOF
12640 for ac_config_target in $ac_config_targets
12641 do
12642   case "$ac_config_target" in
12643   # Handling of arguments.
12644   "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
12645   "doc/adacurses${DFT_ARG_SUFFIX}-config.1" ) CONFIG_FILES="$CONFIG_FILES doc/adacurses${DFT_ARG_SUFFIX}-config.1:doc/MKada_config.in" ;;
12646   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
12647   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
12648   "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
12649   *) { { echo "$as_me:12649: error: invalid argument: $ac_config_target" >&5
12650 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
12651    { (exit 1); exit 1; }; };;
12652   esac
12653 done
12654
12655 # If the user did not use the arguments to specify the items to instantiate,
12656 # then the envvar interface is used.  Set only those that are not.
12657 # We use the long form for the default assignment because of an extremely
12658 # bizarre bug on SunOS 4.1.3.
12659 if $ac_need_defaults; then
12660   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
12661   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
12662   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
12663 fi
12664
12665 # Create a temporary directory, and hook for its removal unless debugging.
12666 $debug ||
12667 {
12668   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
12669   trap '{ (exit 1); exit 1; }' 1 2 13 15
12670 }
12671
12672 # Create a (secure) tmp directory for tmp files.
12673 : ${TMPDIR=/tmp}
12674 {
12675   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
12676   test -n "$tmp" && test -d "$tmp"
12677 }  ||
12678 {
12679   tmp=$TMPDIR/cs$$-$RANDOM
12680   (umask 077 && mkdir $tmp)
12681 } ||
12682 {
12683    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
12684    { (exit 1); exit 1; }
12685 }
12686
12687 EOF
12688
12689 cat >>$CONFIG_STATUS <<EOF
12690
12691 #
12692 # CONFIG_FILES section.
12693 #
12694
12695 # No need to generate the scripts if there are no CONFIG_FILES.
12696 # This happens for instance when ./config.status config.h
12697 if test -n "\$CONFIG_FILES"; then
12698   # Protect against being on the right side of a sed subst in config.status.
12699   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
12700    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
12701 s,@SHELL@,$SHELL,;t t
12702 s,@exec_prefix@,$exec_prefix,;t t
12703 s,@prefix@,$prefix,;t t
12704 s,@program_transform_name@,$program_transform_name,;t t
12705 s,@bindir@,$bindir,;t t
12706 s,@sbindir@,$sbindir,;t t
12707 s,@libexecdir@,$libexecdir,;t t
12708 s,@datarootdir@,$datarootdir,;t t
12709 s,@datadir@,$datadir,;t t
12710 s,@sysconfdir@,$sysconfdir,;t t
12711 s,@sharedstatedir@,$sharedstatedir,;t t
12712 s,@localstatedir@,$localstatedir,;t t
12713 s,@libdir@,$libdir,;t t
12714 s,@includedir@,$includedir,;t t
12715 s,@oldincludedir@,$oldincludedir,;t t
12716 s,@infodir@,$infodir,;t t
12717 s,@mandir@,$mandir,;t t
12718 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
12719 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
12720 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
12721 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
12722 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
12723 s,@build_alias@,$build_alias,;t t
12724 s,@host_alias@,$host_alias,;t t
12725 s,@target_alias@,$target_alias,;t t
12726 s,@ECHO_C@,$ECHO_C,;t t
12727 s,@ECHO_N@,$ECHO_N,;t t
12728 s,@ECHO_T@,$ECHO_T,;t t
12729 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
12730 s,@DEFS@,$DEFS,;t t
12731 s,@LIBS@,$LIBS,;t t
12732 s,@top_builddir@,$top_builddir,;t t
12733 s,@build@,$build,;t t
12734 s,@build_cpu@,$build_cpu,;t t
12735 s,@build_vendor@,$build_vendor,;t t
12736 s,@build_os@,$build_os,;t t
12737 s,@host@,$host,;t t
12738 s,@host_cpu@,$host_cpu,;t t
12739 s,@host_vendor@,$host_vendor,;t t
12740 s,@host_os@,$host_os,;t t
12741 s,@target@,$target,;t t
12742 s,@target_cpu@,$target_cpu,;t t
12743 s,@target_vendor@,$target_vendor,;t t
12744 s,@target_os@,$target_os,;t t
12745 s,@CC@,$CC,;t t
12746 s,@CFLAGS@,$CFLAGS,;t t
12747 s,@LDFLAGS@,$LDFLAGS,;t t
12748 s,@CPPFLAGS@,$CPPFLAGS,;t t
12749 s,@ac_ct_CC@,$ac_ct_CC,;t t
12750 s,@EXEEXT@,$EXEEXT,;t t
12751 s,@OBJEXT@,$OBJEXT,;t t
12752 s,@CPP@,$CPP,;t t
12753 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
12754 s,@PROG_EXT@,$PROG_EXT,;t t
12755 s,@AWK@,$AWK,;t t
12756 s,@EGREP@,$EGREP,;t t
12757 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
12758 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
12759 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
12760 s,@LN_S@,$LN_S,;t t
12761 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
12762 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
12763 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
12764 s,@SET_MAKE@,$SET_MAKE,;t t
12765 s,@CTAGS@,$CTAGS,;t t
12766 s,@ETAGS@,$ETAGS,;t t
12767 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
12768 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
12769 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
12770 s,@RANLIB@,$RANLIB,;t t
12771 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
12772 s,@LD@,$LD,;t t
12773 s,@ac_ct_LD@,$ac_ct_LD,;t t
12774 s,@AR@,$AR,;t t
12775 s,@ac_ct_AR@,$ac_ct_AR,;t t
12776 s,@ARFLAGS@,$ARFLAGS,;t t
12777 s,@DESTDIR@,$DESTDIR,;t t
12778 s,@BUILD_CC@,$BUILD_CC,;t t
12779 s,@BUILD_CPP@,$BUILD_CPP,;t t
12780 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
12781 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
12782 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
12783 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
12784 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
12785 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
12786 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
12787 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
12788 s,@NCURSES_CONFIG@,$NCURSES_CONFIG,;t t
12789 s,@ac_ct_NCURSES_CONFIG@,$ac_ct_NCURSES_CONFIG,;t t
12790 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
12791 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
12792 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
12793 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
12794 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
12795 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
12796 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
12797 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
12798 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
12799 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
12800 s,@CC_G_OPT@,$CC_G_OPT,;t t
12801 s,@LD_MODEL@,$LD_MODEL,;t t
12802 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
12803 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
12804 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
12805 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
12806 s,@LINK_PROGS@,$LINK_PROGS,;t t
12807 s,@LINK_TESTS@,$LINK_TESTS,;t t
12808 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
12809 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
12810 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
12811 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
12812 s,@RPATH_LIST@,$RPATH_LIST,;t t
12813 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
12814 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
12815 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
12816 s,@PTHREAD@,$PTHREAD,;t t
12817 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
12818 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
12819 s,@ECHO_LT@,$ECHO_LT,;t t
12820 s,@ECHO_LD@,$ECHO_LD,;t t
12821 s,@RULE_CC@,$RULE_CC,;t t
12822 s,@SHOW_CC@,$SHOW_CC,;t t
12823 s,@ECHO_CC@,$ECHO_CC,;t t
12824 s,@ADAFLAGS@,$ADAFLAGS,;t t
12825 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
12826 s,@ADA_TRACE@,$ADA_TRACE,;t t
12827 s,@gnat_exists@,$gnat_exists,;t t
12828 s,@M4_exists@,$M4_exists,;t t
12829 s,@cf_ada_make@,$cf_ada_make,;t t
12830 s,@cf_compile_generics@,$cf_compile_generics,;t t
12831 s,@cf_generic_objects@,$cf_generic_objects,;t t
12832 s,@USE_GNAT_SIGINT@,$USE_GNAT_SIGINT,;t t
12833 s,@PRAGMA_UNREF@,$PRAGMA_UNREF,;t t
12834 s,@USE_OLD_MAKERULES@,$USE_OLD_MAKERULES,;t t
12835 s,@USE_GNAT_PROJECTS@,$USE_GNAT_PROJECTS,;t t
12836 s,@USE_GNAT_LIBRARIES@,$USE_GNAT_LIBRARIES,;t t
12837 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
12838 s,@cf_ada_package@,$cf_ada_package,;t t
12839 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
12840 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
12841 s,@ADA_SHAREDLIB@,$ADA_SHAREDLIB,;t t
12842 s,@MAKE_ADA_SHAREDLIB@,$MAKE_ADA_SHAREDLIB,;t t
12843 s,@TINFO_LDFLAGS2@,$TINFO_LDFLAGS2,;t t
12844 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
12845 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
12846 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
12847 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
12848 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
12849 s,@MAKE_PC_FILES@,$MAKE_PC_FILES,;t t
12850 s,@cross_compiling@,$cross_compiling,;t t
12851 s,@TEST_ARG2@,$TEST_ARG2,;t t
12852 s,@TEST_LIBS2@,$TEST_LIBS2,;t t
12853 s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
12854 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
12855 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
12856 s,@EXTERNAL_TREE@,$EXTERNAL_TREE,;t t
12857 s,@ADAHTML_DIR@,$ADAHTML_DIR,;t t
12858 CEOF
12859
12860 EOF
12861
12862   cat >>$CONFIG_STATUS <<\EOF
12863   # Split the substitutions into bite-sized pieces for seds with
12864   # small command number limits, like on Digital OSF/1 and HP-UX.
12865   ac_max_sed_lines=48
12866   ac_sed_frag=1 # Number of current file.
12867   ac_beg=1 # First line for current file.
12868   ac_end=$ac_max_sed_lines # Line after last line for current file.
12869   ac_more_lines=:
12870   ac_sed_cmds=
12871   while $ac_more_lines; do
12872     if test $ac_beg -gt 1; then
12873       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
12874     else
12875       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
12876     fi
12877     if test ! -s $tmp/subs.frag; then
12878       ac_more_lines=false
12879     else
12880       # The purpose of the label and of the branching condition is to
12881       # speed up the sed processing (if there are no `@' at all, there
12882       # is no need to browse any of the substitutions).
12883       # These are the two extra sed commands mentioned above.
12884       (echo ':t
12885   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
12886       if test -z "$ac_sed_cmds"; then
12887         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
12888       else
12889         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
12890       fi
12891       ac_sed_frag=`expr $ac_sed_frag + 1`
12892       ac_beg=$ac_end
12893       ac_end=`expr $ac_end + $ac_max_sed_lines`
12894     fi
12895   done
12896   if test -z "$ac_sed_cmds"; then
12897     ac_sed_cmds=cat
12898   fi
12899 fi # test -n "$CONFIG_FILES"
12900
12901 EOF
12902 cat >>$CONFIG_STATUS <<\EOF
12903 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
12904   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
12905   case $ac_file in
12906   - | *:- | *:-:* ) # input from stdin
12907         cat >$tmp/stdin
12908         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
12909         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
12910   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
12911         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
12912   * )   ac_file_in=$ac_file.in ;;
12913   esac
12914
12915   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
12916   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
12917          X"$ac_file" : 'X\(//\)[^/]' \| \
12918          X"$ac_file" : 'X\(//\)$' \| \
12919          X"$ac_file" : 'X\(/\)' \| \
12920          .     : '\(.\)' 2>/dev/null ||
12921 echo X"$ac_file" |
12922     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
12923           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
12924           /^X\(\/\/\)$/{ s//\1/; q; }
12925           /^X\(\/\).*/{ s//\1/; q; }
12926           s/.*/./; q'`
12927   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
12928     { case "$ac_dir" in
12929   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
12930   *)                      as_incr_dir=.;;
12931 esac
12932 as_dummy="$ac_dir"
12933 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
12934   case $as_mkdir_dir in
12935     # Skip DOS drivespec
12936     ?:) as_incr_dir=$as_mkdir_dir ;;
12937     *)
12938       as_incr_dir=$as_incr_dir/$as_mkdir_dir
12939       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
12940     ;;
12941   esac
12942 done; }
12943
12944     ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
12945     # A "../" for each directory in $ac_dir_suffix.
12946     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
12947   else
12948     ac_dir_suffix= ac_dots=
12949   fi
12950
12951   case $srcdir in
12952   .)  ac_srcdir=.
12953       if test -z "$ac_dots"; then
12954          ac_top_srcdir=.
12955       else
12956          ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
12957       fi ;;
12958   [\\/]* | ?:[\\/]* )
12959       ac_srcdir=$srcdir$ac_dir_suffix;
12960       ac_top_srcdir=$srcdir ;;
12961   *) # Relative path.
12962     ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
12963     ac_top_srcdir=$ac_dots$srcdir ;;
12964   esac
12965
12966   case $INSTALL in
12967   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
12968   *) ac_INSTALL=$ac_dots$INSTALL ;;
12969   esac
12970
12971   if test x"$ac_file" != x-; then
12972     { echo "$as_me:12972: creating $ac_file" >&5
12973 echo "$as_me: creating $ac_file" >&6;}
12974     rm -f "$ac_file"
12975   fi
12976   # Let's still pretend it is `configure' which instantiates (i.e., don't
12977   # use $as_me), people would be surprised to read:
12978   #    /* config.h.  Generated automatically by config.status.  */
12979   configure_input="Generated automatically from `echo $ac_file_in |
12980                                                  sed 's,.*/,,'` by configure."
12981
12982   # First look for the input files in the build tree, otherwise in the
12983   # src tree.
12984   ac_file_inputs=`IFS=:
12985     for f in $ac_file_in; do
12986       case $f in
12987       -) echo $tmp/stdin ;;
12988       [\\/$]*)
12989          # Absolute (can't be DOS-style, as IFS=:)
12990          test -f "$f" || { { echo "$as_me:12990: error: cannot find input file: $f" >&5
12991 echo "$as_me: error: cannot find input file: $f" >&2;}
12992    { (exit 1); exit 1; }; }
12993          echo $f;;
12994       *) # Relative
12995          if test -f "$f"; then
12996            # Build tree
12997            echo $f
12998          elif test -f "$srcdir/$f"; then
12999            # Source tree
13000            echo $srcdir/$f
13001          else
13002            # /dev/null tree
13003            { { echo "$as_me:13003: error: cannot find input file: $f" >&5
13004 echo "$as_me: error: cannot find input file: $f" >&2;}
13005    { (exit 1); exit 1; }; }
13006          fi;;
13007       esac
13008     done` || { (exit 1); exit 1; }
13009 EOF
13010 cat >>$CONFIG_STATUS <<EOF
13011   sed "$ac_vpsub
13012 $extrasub
13013 EOF
13014 cat >>$CONFIG_STATUS <<\EOF
13015 :t
13016 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
13017 s,@configure_input@,$configure_input,;t t
13018 s,@srcdir@,$ac_srcdir,;t t
13019 s,@top_srcdir@,$ac_top_srcdir,;t t
13020 s,@INSTALL@,$ac_INSTALL,;t t
13021 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
13022   rm -f $tmp/stdin
13023   if test x"$ac_file" != x-; then
13024     mv $tmp/out $ac_file
13025   else
13026     cat $tmp/out
13027     rm -f $tmp/out
13028   fi
13029
13030 done
13031 EOF
13032 cat >>$CONFIG_STATUS <<\EOF
13033
13034 #
13035 # CONFIG_HEADER section.
13036 #
13037
13038 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
13039 # NAME is the cpp macro being defined and VALUE is the value it is being given.
13040 #
13041 # ac_d sets the value in "#define NAME VALUE" lines.
13042 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
13043 ac_dB='[        ].*$,\1#\2'
13044 ac_dC=' '
13045 ac_dD=',;t'
13046 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
13047 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
13048 ac_iB='\([      ]\),\1#\2define\3'
13049 ac_iC=' '
13050 ac_iD='\4,;t'
13051 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
13052 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
13053 ac_uB='$,\1#\2define\3'
13054 ac_uC=' '
13055 ac_uD=',;t'
13056
13057 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
13058   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
13059   case $ac_file in
13060   - | *:- | *:-:* ) # input from stdin
13061         cat >$tmp/stdin
13062         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
13063         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
13064   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
13065         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
13066   * )   ac_file_in=$ac_file.in ;;
13067   esac
13068
13069   test x"$ac_file" != x- && { echo "$as_me:13069: creating $ac_file" >&5
13070 echo "$as_me: creating $ac_file" >&6;}
13071
13072   # First look for the input files in the build tree, otherwise in the
13073   # src tree.
13074   ac_file_inputs=`IFS=:
13075     for f in $ac_file_in; do
13076       case $f in
13077       -) echo $tmp/stdin ;;
13078       [\\/$]*)
13079          # Absolute (can't be DOS-style, as IFS=:)
13080          test -f "$f" || { { echo "$as_me:13080: error: cannot find input file: $f" >&5
13081 echo "$as_me: error: cannot find input file: $f" >&2;}
13082    { (exit 1); exit 1; }; }
13083          echo $f;;
13084       *) # Relative
13085          if test -f "$f"; then
13086            # Build tree
13087            echo $f
13088          elif test -f "$srcdir/$f"; then
13089            # Source tree
13090            echo $srcdir/$f
13091          else
13092            # /dev/null tree
13093            { { echo "$as_me:13093: error: cannot find input file: $f" >&5
13094 echo "$as_me: error: cannot find input file: $f" >&2;}
13095    { (exit 1); exit 1; }; }
13096          fi;;
13097       esac
13098     done` || { (exit 1); exit 1; }
13099   # Remove the trailing spaces.
13100   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
13101
13102 EOF
13103
13104 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
13105 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
13106 # be either 'cat' or 'sort'.
13107 cat confdefs.h | uniq >conftest.vals
13108
13109 # Break up conftest.vals because some shells have a limit on
13110 # the size of here documents, and old seds have small limits too.
13111
13112 rm -f conftest.tail
13113 echo '  rm -f conftest.frag' >> $CONFIG_STATUS
13114 while grep . conftest.vals >/dev/null
13115 do
13116   # Write chunks of a limited-size here document to conftest.frag.
13117   echo '  cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
13118   sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
13119   echo 'CEOF' >> $CONFIG_STATUS
13120   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
13121   rm -f conftest.vals
13122   mv conftest.tail conftest.vals
13123 done
13124 rm -f conftest.vals
13125
13126 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
13127 # marker @DEFS@.
13128 echo '  cat >> conftest.edit <<CEOF
13129 /@DEFS@/r conftest.frag
13130 /@DEFS@/d
13131 CEOF
13132 sed -f conftest.edit $tmp/in > $tmp/out
13133 rm -f $tmp/in
13134 mv $tmp/out $tmp/in
13135 rm -f conftest.edit conftest.frag
13136 ' >> $CONFIG_STATUS
13137
13138 cat >>$CONFIG_STATUS <<\EOF
13139   # Let's still pretend it is `configure' which instantiates (i.e., don't
13140   # use $as_me), people would be surprised to read:
13141   #    /* config.h.  Generated automatically by config.status.  */
13142   if test x"$ac_file" = x-; then
13143     echo "/* Generated automatically by configure.  */" >$tmp/config.h
13144   else
13145     echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
13146   fi
13147   cat $tmp/in >>$tmp/config.h
13148   rm -f $tmp/in
13149   if test x"$ac_file" != x-; then
13150     if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
13151       { echo "$as_me:13151: $ac_file is unchanged" >&5
13152 echo "$as_me: $ac_file is unchanged" >&6;}
13153     else
13154       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
13155          X"$ac_file" : 'X\(//\)[^/]' \| \
13156          X"$ac_file" : 'X\(//\)$' \| \
13157          X"$ac_file" : 'X\(/\)' \| \
13158          .     : '\(.\)' 2>/dev/null ||
13159 echo X"$ac_file" |
13160     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
13161           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
13162           /^X\(\/\/\)$/{ s//\1/; q; }
13163           /^X\(\/\).*/{ s//\1/; q; }
13164           s/.*/./; q'`
13165       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
13166         { case "$ac_dir" in
13167   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
13168   *)                      as_incr_dir=.;;
13169 esac
13170 as_dummy="$ac_dir"
13171 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
13172   case $as_mkdir_dir in
13173     # Skip DOS drivespec
13174     ?:) as_incr_dir=$as_mkdir_dir ;;
13175     *)
13176       as_incr_dir=$as_incr_dir/$as_mkdir_dir
13177       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
13178     ;;
13179   esac
13180 done; }
13181
13182       fi
13183       rm -f $ac_file
13184       mv $tmp/config.h $ac_file
13185     fi
13186   else
13187     cat $tmp/config.h
13188     rm -f $tmp/config.h
13189   fi
13190 done
13191 EOF
13192 cat >>$CONFIG_STATUS <<\EOF
13193 #
13194 # CONFIG_COMMANDS section.
13195 #
13196 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
13197   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
13198   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
13199
13200   case $ac_dest in
13201     default )
13202 if test -z "$USE_OLD_MAKERULES" ; then
13203         $AWK -f $srcdir/mk-1st.awk <$srcdir/src/modules >>src/Makefile
13204 fi
13205  ;;
13206   esac
13207 done
13208 EOF
13209
13210 cat >>$CONFIG_STATUS <<\EOF
13211
13212 { (exit 0); exit 0; }
13213 EOF
13214 chmod +x $CONFIG_STATUS
13215 ac_clean_files=$ac_clean_files_save
13216
13217 # configure is writing to config.log, and then calls config.status.
13218 # config.status does its own redirection, appending to config.log.
13219 # Unfortunately, on DOS this fails, as config.log is still kept open
13220 # by configure, so config.status won't be able to write to it; its
13221 # output is simply discarded.  So we exec the FD to /dev/null,
13222 # effectively closing config.log, so it can be properly (re)opened and
13223 # appended to by config.status.  When coming back to configure, we
13224 # need to make the FD available again.
13225 if test "$no_create" != yes; then
13226   ac_cs_success=:
13227   exec 5>/dev/null
13228   $SHELL $CONFIG_STATUS || ac_cs_success=false
13229   exec 5>>config.log
13230   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
13231   # would make configure fail if this is the last instruction.
13232   $ac_cs_success || { (exit 1); exit 1; }
13233 fi
13234 ${MAKE:-make} preinstall