]> ncurses.scripts.mit.edu Git - ncurses.git/blob - Ada95/configure
ncurses 5.9 - patch 20120317
[ncurses.git] / Ada95 / configure
1 #! /bin/sh
2 # From configure.in Revision: 1.38 .
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated by Autoconf 2.52.20101002.
5 #
6 # Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
7 # Free Software Foundation, Inc.
8 # This configure script is free software; the Free Software Foundation
9 # gives unlimited permission to copy, distribute and modify it.
10
11 # Avoid depending upon Character Ranges.
12 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
13 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
14 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
15 as_cr_digits='0123456789'
16 as_cr_alnum=$as_cr_Letters$as_cr_digits
17
18 # Sed expression to map a string onto a valid variable name.
19 as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
20
21 # Sed expression to map a string onto a valid CPP name.
22 as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
23
24 # Be Bourne compatible
25 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
26   emulate sh
27   NULLCMD=:
28 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
29   set -o posix
30 fi
31
32 # Name of the executable.
33 as_me=`echo "$0" |sed 's,.*[\\/],,'`
34
35 if expr a : '\(a\)' >/dev/null 2>&1; then
36   as_expr=expr
37 else
38   as_expr=false
39 fi
40
41 rm -f conf$$ conf$$.exe conf$$.file
42 echo >conf$$.file
43 if ln -s conf$$.file conf$$ 2>/dev/null; then
44   # We could just check for DJGPP; but this test a) works b) is more generic
45   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
46   if test -f conf$$.exe; then
47     # Don't use ln at all; we don't have any links
48     as_ln_s='cp -p'
49   else
50     as_ln_s='ln -s'
51   fi
52 elif ln conf$$.file conf$$ 2>/dev/null; then
53   as_ln_s=ln
54 else
55   as_ln_s='cp -p'
56 fi
57 rm -f conf$$ conf$$.exe conf$$.file
58
59 as_executable_p="test -f"
60
61 # Support unset when possible.
62 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
63   as_unset=unset
64 else
65   as_unset=false
66 fi
67
68 # NLS nuisances.
69 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
70 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
71 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
72 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
73 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
74 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
75 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
76 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
77
78 # IFS
79 # We need space, tab and new line, in precisely that order.
80 as_nl='
81 '
82 IFS="   $as_nl"
83
84 # CDPATH.
85 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
86
87 # Name of the host.
88 # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
89 # so uname gets run too.
90 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
91
92 exec 6>&1
93
94 #
95 # Initializations.
96 #
97 ac_default_prefix=/usr/local
98 cross_compiling=no
99 subdirs=
100 MFLAGS= MAKEFLAGS=
101 SHELL=${CONFIG_SHELL-/bin/sh}
102
103 # Maximum number of lines to put in a shell here document.
104 # This variable seems obsolete.  It should probably be removed, and
105 # only ac_max_sed_lines should be used.
106 : ${ac_max_here_lines=38}
107
108 ac_unique_file="gen/gen.c"
109
110 # Initialize some variables set by options.
111 ac_init_help=
112 ac_init_version=false
113 # The variables have the same names as the options, with
114 # dashes changed to underlines.
115 cache_file=/dev/null
116 exec_prefix=NONE
117 no_create=
118 no_recursion=
119 prefix=NONE
120 program_prefix=NONE
121 program_suffix=NONE
122 program_transform_name=s,x,x,
123 silent=
124 site=
125 srcdir=
126 verbose=
127 x_includes=NONE
128 x_libraries=NONE
129
130 # Installation directory options.
131 # These are left unexpanded so users can "make install exec_prefix=/foo"
132 # and all the variables that are supposed to be based on exec_prefix
133 # by default will actually change.
134 # Use braces instead of parens because sh, perl, etc. also accept them.
135 bindir='${exec_prefix}/bin'
136 sbindir='${exec_prefix}/sbin'
137 libexecdir='${exec_prefix}/libexec'
138 datadir='${prefix}/share'
139 sysconfdir='${prefix}/etc'
140 sharedstatedir='${prefix}/com'
141 localstatedir='${prefix}/var'
142 libdir='${exec_prefix}/lib'
143 includedir='${prefix}/include'
144 oldincludedir='/usr/include'
145 infodir='${prefix}/info'
146 mandir='${prefix}/man'
147
148 # Identity of this package.
149 PACKAGE_NAME=
150 PACKAGE_TARNAME=
151 PACKAGE_VERSION=
152 PACKAGE_STRING=
153 PACKAGE_BUGREPORT=
154
155 ac_prev=
156 for ac_option
157 do
158   # If the previous option needs an argument, assign it.
159   if test -n "$ac_prev"; then
160     eval "$ac_prev=\$ac_option"
161     ac_prev=
162     continue
163   fi
164
165   ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
166
167   # Accept the important Cygnus configure options, so we can diagnose typos.
168
169   case $ac_option in
170
171   -bindir | --bindir | --bindi | --bind | --bin | --bi)
172     ac_prev=bindir ;;
173   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
174     bindir=$ac_optarg ;;
175
176   -build | --build | --buil | --bui | --bu)
177     ac_prev=build_alias ;;
178   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
179     build_alias=$ac_optarg ;;
180
181   -cache-file | --cache-file | --cache-fil | --cache-fi \
182   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
183     ac_prev=cache_file ;;
184   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
185   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
186     cache_file=$ac_optarg ;;
187
188   --config-cache | -C)
189     cache_file=config.cache ;;
190
191   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
192     ac_prev=datadir ;;
193   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
194   | --da=*)
195     datadir=$ac_optarg ;;
196
197   -disable-* | --disable-*)
198     ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
199     # Reject names that are not valid shell variable names.
200     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
201       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
202    { (exit 1); exit 1; }; }
203     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
204     eval "enable_$ac_feature=no" ;;
205
206   -enable-* | --enable-*)
207     ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
208     # Reject names that are not valid shell variable names.
209     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
210       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
211    { (exit 1); exit 1; }; }
212     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
213     case $ac_option in
214       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
215       *) ac_optarg=yes ;;
216     esac
217     eval "enable_$ac_feature='$ac_optarg'" ;;
218
219   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
220   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
221   | --exec | --exe | --ex)
222     ac_prev=exec_prefix ;;
223   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
224   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
225   | --exec=* | --exe=* | --ex=*)
226     exec_prefix=$ac_optarg ;;
227
228   -gas | --gas | --ga | --g)
229     # Obsolete; use --with-gas.
230     with_gas=yes ;;
231
232   -help | --help | --hel | --he | -h)
233     ac_init_help=long ;;
234   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
235     ac_init_help=recursive ;;
236   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
237     ac_init_help=short ;;
238
239   -host | --host | --hos | --ho)
240     ac_prev=host_alias ;;
241   -host=* | --host=* | --hos=* | --ho=*)
242     host_alias=$ac_optarg ;;
243
244   -includedir | --includedir | --includedi | --included | --include \
245   | --includ | --inclu | --incl | --inc)
246     ac_prev=includedir ;;
247   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
248   | --includ=* | --inclu=* | --incl=* | --inc=*)
249     includedir=$ac_optarg ;;
250
251   -infodir | --infodir | --infodi | --infod | --info | --inf)
252     ac_prev=infodir ;;
253   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
254     infodir=$ac_optarg ;;
255
256   -libdir | --libdir | --libdi | --libd)
257     ac_prev=libdir ;;
258   -libdir=* | --libdir=* | --libdi=* | --libd=*)
259     libdir=$ac_optarg ;;
260
261   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
262   | --libexe | --libex | --libe)
263     ac_prev=libexecdir ;;
264   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
265   | --libexe=* | --libex=* | --libe=*)
266     libexecdir=$ac_optarg ;;
267
268   -localstatedir | --localstatedir | --localstatedi | --localstated \
269   | --localstate | --localstat | --localsta | --localst \
270   | --locals | --local | --loca | --loc | --lo)
271     ac_prev=localstatedir ;;
272   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
273   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
274   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
275     localstatedir=$ac_optarg ;;
276
277   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
278     ac_prev=mandir ;;
279   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
280     mandir=$ac_optarg ;;
281
282   -nfp | --nfp | --nf)
283     # Obsolete; use --without-fp.
284     with_fp=no ;;
285
286   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
287   | --no-cr | --no-c)
288     no_create=yes ;;
289
290   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
291   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
292     no_recursion=yes ;;
293
294   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
295   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
296   | --oldin | --oldi | --old | --ol | --o)
297     ac_prev=oldincludedir ;;
298   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
299   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
300   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
301     oldincludedir=$ac_optarg ;;
302
303   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
304     ac_prev=prefix ;;
305   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
306     prefix=$ac_optarg ;;
307
308   -program-prefix | --program-prefix | --program-prefi | --program-pref \
309   | --program-pre | --program-pr | --program-p)
310     ac_prev=program_prefix ;;
311   -program-prefix=* | --program-prefix=* | --program-prefi=* \
312   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
313     program_prefix=$ac_optarg ;;
314
315   -program-suffix | --program-suffix | --program-suffi | --program-suff \
316   | --program-suf | --program-su | --program-s)
317     ac_prev=program_suffix ;;
318   -program-suffix=* | --program-suffix=* | --program-suffi=* \
319   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
320     program_suffix=$ac_optarg ;;
321
322   -program-transform-name | --program-transform-name \
323   | --program-transform-nam | --program-transform-na \
324   | --program-transform-n | --program-transform- \
325   | --program-transform | --program-transfor \
326   | --program-transfo | --program-transf \
327   | --program-trans | --program-tran \
328   | --progr-tra | --program-tr | --program-t)
329     ac_prev=program_transform_name ;;
330   -program-transform-name=* | --program-transform-name=* \
331   | --program-transform-nam=* | --program-transform-na=* \
332   | --program-transform-n=* | --program-transform-=* \
333   | --program-transform=* | --program-transfor=* \
334   | --program-transfo=* | --program-transf=* \
335   | --program-trans=* | --program-tran=* \
336   | --progr-tra=* | --program-tr=* | --program-t=*)
337     program_transform_name=$ac_optarg ;;
338
339   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
340   | -silent | --silent | --silen | --sile | --sil)
341     silent=yes ;;
342
343   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
344     ac_prev=sbindir ;;
345   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
346   | --sbi=* | --sb=*)
347     sbindir=$ac_optarg ;;
348
349   -sharedstatedir | --sharedstatedir | --sharedstatedi \
350   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
351   | --sharedst | --shareds | --shared | --share | --shar \
352   | --sha | --sh)
353     ac_prev=sharedstatedir ;;
354   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
355   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
356   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
357   | --sha=* | --sh=*)
358     sharedstatedir=$ac_optarg ;;
359
360   -site | --site | --sit)
361     ac_prev=site ;;
362   -site=* | --site=* | --sit=*)
363     site=$ac_optarg ;;
364
365   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
366     ac_prev=srcdir ;;
367   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
368     srcdir=$ac_optarg ;;
369
370   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
371   | --syscon | --sysco | --sysc | --sys | --sy)
372     ac_prev=sysconfdir ;;
373   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
374   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
375     sysconfdir=$ac_optarg ;;
376
377   -target | --target | --targe | --targ | --tar | --ta | --t)
378     ac_prev=target_alias ;;
379   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
380     target_alias=$ac_optarg ;;
381
382   -v | -verbose | --verbose | --verbos | --verbo | --verb)
383     verbose=yes ;;
384
385   -version | --version | --versio | --versi | --vers | -V)
386     ac_init_version=: ;;
387
388   -with-* | --with-*)
389     ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
390     # Reject names that are not valid shell variable names.
391     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
392       { echo "$as_me: error: invalid package name: $ac_package" >&2
393    { (exit 1); exit 1; }; }
394     ac_package=`echo $ac_package| sed 's/-/_/g'`
395     case $ac_option in
396       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
397       *) ac_optarg=yes ;;
398     esac
399     eval "with_$ac_package='$ac_optarg'" ;;
400
401   -without-* | --without-*)
402     ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
403     # Reject names that are not valid shell variable names.
404     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
405       { echo "$as_me: error: invalid package name: $ac_package" >&2
406    { (exit 1); exit 1; }; }
407     ac_package=`echo $ac_package | sed 's/-/_/g'`
408     eval "with_$ac_package=no" ;;
409
410   --x)
411     # Obsolete; use --with-x.
412     with_x=yes ;;
413
414   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
415   | --x-incl | --x-inc | --x-in | --x-i)
416     ac_prev=x_includes ;;
417   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
418   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
419     x_includes=$ac_optarg ;;
420
421   -x-libraries | --x-libraries | --x-librarie | --x-librari \
422   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
423     ac_prev=x_libraries ;;
424   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
425   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
426     x_libraries=$ac_optarg ;;
427
428   -*) { echo "$as_me: error: unrecognized option: $ac_option
429 Try \`$0 --help' for more information." >&2
430    { (exit 1); exit 1; }; }
431     ;;
432
433   *=*)
434     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
435     # Reject names that are not valid shell variable names.
436     expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
437       { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
438    { (exit 1); exit 1; }; }
439     ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
440     eval "$ac_envvar='$ac_optarg'"
441     export $ac_envvar ;;
442
443   *)
444     # FIXME: should be removed in autoconf 3.0.
445     echo "$as_me: WARNING: you should use --build, --host, --target" >&2
446     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
447       echo "$as_me: WARNING: invalid host type: $ac_option" >&2
448     : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
449     ;;
450
451   esac
452 done
453
454 if test -n "$ac_prev"; then
455   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
456   { echo "$as_me: error: missing argument to $ac_option" >&2
457    { (exit 1); exit 1; }; }
458 fi
459
460 # Be sure to have absolute paths.
461 for ac_var in exec_prefix prefix
462 do
463   eval ac_val=$`echo $ac_var`
464   case $ac_val in
465     [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
466     *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
467    { (exit 1); exit 1; }; };;
468   esac
469 done
470
471 # Be sure to have absolute paths.
472 for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
473               localstatedir libdir includedir oldincludedir infodir mandir
474 do
475   eval ac_val=$`echo $ac_var`
476   case $ac_val in
477     [\\/$]* | ?:[\\/]* ) ;;
478     *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
479    { (exit 1); exit 1; }; };;
480   esac
481 done
482
483 # There might be people who depend on the old broken behavior: `$host'
484 # used to hold the argument of --host etc.
485 build=$build_alias
486 host=$host_alias
487 target=$target_alias
488
489 # FIXME: should be removed in autoconf 3.0.
490 if test "x$host_alias" != x; then
491   if test "x$build_alias" = x; then
492     cross_compiling=maybe
493     echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
494     If a cross compiler is detected then cross compile mode will be used." >&2
495   elif test "x$build_alias" != "x$host_alias"; then
496     cross_compiling=yes
497   fi
498 fi
499
500 ac_tool_prefix=
501 test -n "$host_alias" && ac_tool_prefix=$host_alias-
502
503 test "$silent" = yes && exec 6>/dev/null
504
505 # Find the source files, if location was not specified.
506 if test -z "$srcdir"; then
507   ac_srcdir_defaulted=yes
508   # Try the directory containing this script, then its parent.
509   ac_prog=$0
510   ac_confdir=`echo "$ac_prog" | sed 's%[\\/][^\\/][^\\/]*$%%'`
511   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
512   srcdir=$ac_confdir
513   if test ! -r $srcdir/$ac_unique_file; then
514     srcdir=..
515   fi
516 else
517   ac_srcdir_defaulted=no
518 fi
519 if test ! -r $srcdir/$ac_unique_file; then
520   if test "$ac_srcdir_defaulted" = yes; then
521     { echo "$as_me: error: cannot find sources in $ac_confdir or .." >&2
522    { (exit 1); exit 1; }; }
523   else
524     { echo "$as_me: error: cannot find sources in $srcdir" >&2
525    { (exit 1); exit 1; }; }
526   fi
527 fi
528 srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
529 ac_env_build_alias_set=${build_alias+set}
530 ac_env_build_alias_value=$build_alias
531 ac_cv_env_build_alias_set=${build_alias+set}
532 ac_cv_env_build_alias_value=$build_alias
533 ac_env_host_alias_set=${host_alias+set}
534 ac_env_host_alias_value=$host_alias
535 ac_cv_env_host_alias_set=${host_alias+set}
536 ac_cv_env_host_alias_value=$host_alias
537 ac_env_target_alias_set=${target_alias+set}
538 ac_env_target_alias_value=$target_alias
539 ac_cv_env_target_alias_set=${target_alias+set}
540 ac_cv_env_target_alias_value=$target_alias
541 ac_env_CC_set=${CC+set}
542 ac_env_CC_value=$CC
543 ac_cv_env_CC_set=${CC+set}
544 ac_cv_env_CC_value=$CC
545 ac_env_CFLAGS_set=${CFLAGS+set}
546 ac_env_CFLAGS_value=$CFLAGS
547 ac_cv_env_CFLAGS_set=${CFLAGS+set}
548 ac_cv_env_CFLAGS_value=$CFLAGS
549 ac_env_LDFLAGS_set=${LDFLAGS+set}
550 ac_env_LDFLAGS_value=$LDFLAGS
551 ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
552 ac_cv_env_LDFLAGS_value=$LDFLAGS
553 ac_env_CPPFLAGS_set=${CPPFLAGS+set}
554 ac_env_CPPFLAGS_value=$CPPFLAGS
555 ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
556 ac_cv_env_CPPFLAGS_value=$CPPFLAGS
557 ac_env_CPP_set=${CPP+set}
558 ac_env_CPP_value=$CPP
559 ac_cv_env_CPP_set=${CPP+set}
560 ac_cv_env_CPP_value=$CPP
561
562 #
563 # Report the --help message.
564 #
565 if test "$ac_init_help" = "long"; then
566   # Omit some internal or obsolete options to make the list less imposing.
567   # This message is too long to be a string in the A/UX 3.1 sh.
568   cat <<EOF
569 \`configure' configures this package to adapt to many kinds of systems.
570
571 Usage: $0 [OPTION]... [VAR=VALUE]...
572
573 To assign environment variables (e.g., CC, CFLAGS...), specify them as
574 VAR=VALUE.  See below for descriptions of some of the useful variables.
575
576 Defaults for the options are specified in brackets.
577
578 Configuration:
579   -h, --help              display this help and exit
580       --help=short        display options specific to this package
581       --help=recursive    display the short help of all the included packages
582   -V, --version           display version information and exit
583   -q, --quiet, --silent   do not print \`checking...' messages
584       --cache-file=FILE   cache test results in FILE [disabled]
585   -C, --config-cache      alias for \`--cache-file=config.cache'
586   -n, --no-create         do not create output files
587       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
588
589 EOF
590
591   cat <<EOF
592 Installation directories:
593   --prefix=PREFIX         install architecture-independent files in PREFIX
594                           [$ac_default_prefix]
595   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
596                           [PREFIX]
597
598 By default, \`make install' will install all the files in
599 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
600 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
601 for instance \`--prefix=\$HOME'.
602
603 For better control, use the options below.
604
605 Fine tuning of the installation directories:
606   --bindir=DIR            user executables [EPREFIX/bin]
607   --sbindir=DIR           system admin executables [EPREFIX/sbin]
608   --libexecdir=DIR        program executables [EPREFIX/libexec]
609   --datadir=DIR           read-only architecture-independent data [PREFIX/share]
610   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
611   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
612   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
613   --libdir=DIR            object code libraries [EPREFIX/lib]
614   --includedir=DIR        C header files [PREFIX/include]
615   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
616   --infodir=DIR           info documentation [PREFIX/info]
617   --mandir=DIR            man documentation [PREFIX/man]
618 EOF
619
620   cat <<\EOF
621
622 Program names:
623   --program-prefix=PREFIX            prepend PREFIX to installed program names
624   --program-suffix=SUFFIX            append SUFFIX to installed program names
625   --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
626
627 System types:
628   --build=BUILD           configure for building on BUILD [guessed]
629   --host=HOST       build programs to run on HOST [BUILD]
630   --target=TARGET   configure for building compilers for TARGET [HOST]
631 EOF
632 fi
633
634 if test -n "$ac_init_help"; then
635
636   cat <<\EOF
637
638 Optional Packages:
639   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
640   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
641
642 Optional Features:
643   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
644   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
645
646   --with-system-type=XXX  test: override derived host system-type
647   --with-pkg-config{=path} enable/disable use of pkg-config
648   --with-pkg-config-libdir=XXX use given directory for installing pc-files
649   --enable-pc-files       generate and install .pc files for pkg-config
650   --without-tests         suppress build with test-programs
651   --enable-mixed-case     tic should assume mixed-case filenames
652   --with-install-prefix   prefixes actual install-location ($DESTDIR)
653 Build-Tools Needed to Compile Temporary Applications for Cross-compiling:
654   --with-build-cc=XXX     the build C compiler ($BUILD_CC)
655   --with-build-cpp=XXX    the build C preprocessor ($BUILD_CPP)
656   --with-build-cflags=XXX the build C compiler-flags ($BUILD_CFLAGS)
657   --with-build-cppflags=XXX the build C preprocessor-flags ($BUILD_CPPFLAGS)
658   --with-build-ldflags=XXX the build linker-flags ($BUILD_LDFLAGS)
659   --with-build-libs=XXX   the build libraries (${BUILD_LIBS})
660 Options to Specify the Libraries Built/Used:
661   --with-shared           generate shared C-objects (needed for --with-ada-sharedlib)
662   --enable-widec          compile with wide-char/UTF-8 code
663   --with-curses-dir=DIR   directory in which (n)curses is installed
664   --with-lib-prefix       override library-prefix
665   --with-shlib-version=X  Specify rel or abi version for shared libs
666   --enable-rpath-link     link sample programs with rpath option
667 Fine-Tuning Your Configuration:
668   --enable-broken_linker  compile with broken-linker support code
669   --disable-largefile     omit support for large files
670   --with-rcs-ids          compile-in RCS identifiers
671 Extensions:
672   --disable-ext-funcs     disable function-extensions
673   --enable-const          compile with extra/non-standard const
674 Development Code:
675   --without-develop       disable development options
676 Experimental Code:
677   --with-pthread          use POSIX thread library
678   --enable-weak-symbols   enable weak-symbols for pthreads
679   --enable-reentrant      compile with experimental reentrant code
680   --with-wrap-prefix=XXX  override prefix used for public variables
681 Testing/development Options:
682   --enable-echo           build: display "compiling" commands (default)
683   --enable-warnings       build: turn on GCC compiler warnings
684   --enable-assertions     test: turn on generation of assertion code
685   --enable-expanded       test: generate functions for certain macros
686   --disable-macros        test: use functions rather than macros
687   --with-trace            test: add trace() function to all models of ncurses
688 Ada95 Binding Options:
689   --with-ada-compiler=CMD specify Ada95 compiler command (default gnatmake)
690   --with-ada-include=DIR  Ada includes are in DIR (default: PREFIX/share/ada/adainclude)
691   --with-ada-objects=DIR  Ada objects are in DIR (default: PREFIX/lib/ada/adalib)
692   --with-ada-sharedlib=XX build Ada95 shared-library
693
694 Some influential environment variables:
695   CC          C compiler command
696   CFLAGS      C compiler flags
697   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
698               nonstandard directory <lib dir>
699   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
700               headers in a nonstandard directory <include dir>
701   CPP         C preprocessor
702
703 Use these variables to override the choices made by `configure' or to help
704 it to find libraries and programs with nonstandard names/locations.
705
706 EOF
707 fi
708
709 if test "$ac_init_help" = "recursive"; then
710   # If there are subdirs, report their specific --help.
711   ac_popdir=`pwd`
712   for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
713     cd $ac_subdir
714     # A "../" for each directory in /$ac_subdir.
715     ac_dots=`echo $ac_subdir |
716              sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
717
718     case $srcdir in
719     .) # No --srcdir option.  We are building in place.
720       ac_sub_srcdir=$srcdir ;;
721     [\\/]* | ?:[\\/]* ) # Absolute path.
722       ac_sub_srcdir=$srcdir/$ac_subdir ;;
723     *) # Relative path.
724       ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;;
725     esac
726
727     # Check for guested configure; otherwise get Cygnus style configure.
728     if test -f $ac_sub_srcdir/configure.gnu; then
729       echo
730       $SHELL $ac_sub_srcdir/configure.gnu  --help=recursive
731     elif test -f $ac_sub_srcdir/configure; then
732       echo
733       $SHELL $ac_sub_srcdir/configure  --help=recursive
734     elif test -f $ac_sub_srcdir/configure.ac ||
735            test -f $ac_sub_srcdir/configure.in; then
736       echo
737       $ac_configure --help
738     else
739       echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
740     fi
741     cd $ac_popdir
742   done
743 fi
744
745 test -n "$ac_init_help" && exit 0
746 if $ac_init_version; then
747   cat <<\EOF
748
749 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
750 Free Software Foundation, Inc.
751 This configure script is free software; the Free Software Foundation
752 gives unlimited permission to copy, distribute and modify it.
753 EOF
754   exit 0
755 fi
756 exec 5>config.log
757 cat >&5 <<EOF
758 This file contains any messages produced by compilers while
759 running configure, to aid debugging if configure makes a mistake.
760
761 It was created by $as_me, which was
762 generated by GNU Autoconf 2.52.20101002.  Invocation command line was
763
764   $ $0 $@
765
766 EOF
767 {
768 cat <<_ASUNAME
769 ## ---------- ##
770 ## Platform.  ##
771 ## ---------- ##
772
773 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
774 uname -m = `(uname -m) 2>/dev/null || echo unknown`
775 uname -r = `(uname -r) 2>/dev/null || echo unknown`
776 uname -s = `(uname -s) 2>/dev/null || echo unknown`
777 uname -v = `(uname -v) 2>/dev/null || echo unknown`
778
779 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
780 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
781
782 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
783 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
784 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
785 hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
786 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
787 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
788 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
789
790 PATH = $PATH
791
792 _ASUNAME
793 } >&5
794
795 cat >&5 <<EOF
796 ## ------------ ##
797 ## Core tests.  ##
798 ## ------------ ##
799
800 EOF
801
802 # Keep a trace of the command line.
803 # Strip out --no-create and --no-recursion so they do not pile up.
804 # Also quote any args containing shell meta-characters.
805 ac_configure_args=
806 ac_sep=
807 for ac_arg
808 do
809   case $ac_arg in
810   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
811   | --no-cr | --no-c) ;;
812   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
813   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
814   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
815     ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
816     ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
817     ac_sep=" " ;;
818   *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
819      ac_sep=" " ;;
820   esac
821   # Get rid of the leading space.
822 done
823
824 # When interrupted or exit'd, cleanup temporary files, and complete
825 # config.log.  We remove comments because anyway the quotes in there
826 # would cause problems or look ugly.
827 trap 'exit_status=$?
828   # Save into config.log some information that might help in debugging.
829   echo >&5
830   echo "## ----------------- ##" >&5
831   echo "## Cache variables.  ##" >&5
832   echo "## ----------------- ##" >&5
833   echo >&5
834   # The following way of writing the cache mishandles newlines in values,
835 {
836   (set) 2>&1 |
837     case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
838     *ac_space=\ *)
839       sed -n \
840         "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
841           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
842       ;;
843     *)
844       sed -n \
845         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
846       ;;
847     esac;
848 } >&5
849   sed "/^$/d" confdefs.h >conftest.log
850   if test -s conftest.log; then
851     echo >&5
852     echo "## ------------ ##" >&5
853     echo "## confdefs.h.  ##" >&5
854     echo "## ------------ ##" >&5
855     echo >&5
856     cat conftest.log >&5
857   fi
858   (echo; echo) >&5
859   test "$ac_signal" != 0 &&
860     echo "$as_me: caught signal $ac_signal" >&5
861   echo "$as_me: exit $exit_status" >&5
862   rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
863     exit $exit_status
864      ' 0
865 for ac_signal in 1 2 13 15; do
866   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
867 done
868 ac_signal=0
869
870 # confdefs.h avoids OS command line length limits that DEFS can exceed.
871 rm -rf conftest* confdefs.h
872 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
873 echo >confdefs.h
874
875 # Let the site file select an alternate cache file if it wants to.
876 # Prefer explicitly selected file to automatically selected ones.
877 if test -z "$CONFIG_SITE"; then
878   if test "x$prefix" != xNONE; then
879     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
880   else
881     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
882   fi
883 fi
884 for ac_site_file in $CONFIG_SITE; do
885   if test -r "$ac_site_file"; then
886     { echo "$as_me:886: loading site script $ac_site_file" >&5
887 echo "$as_me: loading site script $ac_site_file" >&6;}
888     cat "$ac_site_file" >&5
889     . "$ac_site_file"
890   fi
891 done
892
893 if test -r "$cache_file"; then
894   # Some versions of bash will fail to source /dev/null (special
895   # files actually), so we avoid doing that.
896   if test -f "$cache_file"; then
897     { echo "$as_me:897: loading cache $cache_file" >&5
898 echo "$as_me: loading cache $cache_file" >&6;}
899     case $cache_file in
900       [\\/]* | ?:[\\/]* ) . $cache_file;;
901       *)                      . ./$cache_file;;
902     esac
903   fi
904 else
905   { echo "$as_me:905: creating cache $cache_file" >&5
906 echo "$as_me: creating cache $cache_file" >&6;}
907   >$cache_file
908 fi
909
910 # Check that the precious variables saved in the cache have kept the same
911 # value.
912 ac_cache_corrupted=false
913 for ac_var in `(set) 2>&1 |
914                sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
915   eval ac_old_set=\$ac_cv_env_${ac_var}_set
916   eval ac_new_set=\$ac_env_${ac_var}_set
917   eval ac_old_val="\$ac_cv_env_${ac_var}_value"
918   eval ac_new_val="\$ac_env_${ac_var}_value"
919   case $ac_old_set,$ac_new_set in
920     set,)
921       { echo "$as_me:921: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
922 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
923       ac_cache_corrupted=: ;;
924     ,set)
925       { echo "$as_me:925: error: \`$ac_var' was not set in the previous run" >&5
926 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
927       ac_cache_corrupted=: ;;
928     ,);;
929     *)
930       if test "x$ac_old_val" != "x$ac_new_val"; then
931         { echo "$as_me:931: error: \`$ac_var' has changed since the previous run:" >&5
932 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
933         { echo "$as_me:933:   former value:  $ac_old_val" >&5
934 echo "$as_me:   former value:  $ac_old_val" >&2;}
935         { echo "$as_me:935:   current value: $ac_new_val" >&5
936 echo "$as_me:   current value: $ac_new_val" >&2;}
937         ac_cache_corrupted=:
938       fi;;
939   esac
940   # Pass precious variables to config.status.  It doesn't matter if
941   # we pass some twice (in addition to the command line arguments).
942   if test "$ac_new_set" = set; then
943     case $ac_new_val in
944     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
945       ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
946       ac_configure_args="$ac_configure_args '$ac_arg'"
947       ;;
948     *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
949        ;;
950     esac
951   fi
952 done
953 if $ac_cache_corrupted; then
954   { echo "$as_me:954: error: changes in the environment can compromise the build" >&5
955 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
956   { { echo "$as_me:956: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
957 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
958    { (exit 1); exit 1; }; }
959 fi
960
961 ac_ext=c
962 ac_cpp='$CPP $CPPFLAGS'
963 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
964 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
965 ac_compiler_gnu=$ac_cv_c_compiler_gnu
966 ac_main_return=return
967
968 case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
969   *c*,-n*) ECHO_N= ECHO_C='
970 ' ECHO_T='      ' ;;
971   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
972   *)      ECHO_N= ECHO_C='\c' ECHO_T= ;;
973 esac
974 echo "#! $SHELL" >conftest.sh
975 echo  "exit 0"   >>conftest.sh
976 chmod +x conftest.sh
977 if { (echo "$as_me:977: PATH=\".;.\"; conftest.sh") >&5
978   (PATH=".;."; conftest.sh) 2>&5
979   ac_status=$?
980   echo "$as_me:980: \$? = $ac_status" >&5
981   (exit $ac_status); }; then
982   ac_path_separator=';'
983 else
984   ac_path_separator=:
985 fi
986 PATH_SEPARATOR="$ac_path_separator"
987 rm -f conftest.sh
988
989 ac_config_headers="$ac_config_headers include/ncurses_cfg.h:include/ncurses_cfg.hin"
990
991 top_builddir=`pwd`
992
993 ac_aux_dir=
994 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
995   if test -f $ac_dir/install-sh; then
996     ac_aux_dir=$ac_dir
997     ac_install_sh="$ac_aux_dir/install-sh -c"
998     break
999   elif test -f $ac_dir/install.sh; then
1000     ac_aux_dir=$ac_dir
1001     ac_install_sh="$ac_aux_dir/install.sh -c"
1002     break
1003   elif test -f $ac_dir/shtool; then
1004     ac_aux_dir=$ac_dir
1005     ac_install_sh="$ac_aux_dir/shtool install -c"
1006     break
1007   fi
1008 done
1009 if test -z "$ac_aux_dir"; then
1010   { { echo "$as_me:1010: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1011 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1012    { (exit 1); exit 1; }; }
1013 fi
1014 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1015 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1016 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1017
1018 # Make sure we can run config.sub.
1019 $ac_config_sub sun4 >/dev/null 2>&1 ||
1020   { { echo "$as_me:1020: error: cannot run $ac_config_sub" >&5
1021 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1022    { (exit 1); exit 1; }; }
1023
1024 echo "$as_me:1024: checking build system type" >&5
1025 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1026 if test "${ac_cv_build+set}" = set; then
1027   echo $ECHO_N "(cached) $ECHO_C" >&6
1028 else
1029   ac_cv_build_alias=$build_alias
1030 test -z "$ac_cv_build_alias" &&
1031   ac_cv_build_alias=`$ac_config_guess`
1032 test -z "$ac_cv_build_alias" &&
1033   { { echo "$as_me:1033: error: cannot guess build type; you must specify one" >&5
1034 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1035    { (exit 1); exit 1; }; }
1036 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1037   { { echo "$as_me:1037: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1038 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1039    { (exit 1); exit 1; }; }
1040
1041 fi
1042 echo "$as_me:1042: result: $ac_cv_build" >&5
1043 echo "${ECHO_T}$ac_cv_build" >&6
1044 build=$ac_cv_build
1045 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1046 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1047 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1048
1049 echo "$as_me:1049: checking host system type" >&5
1050 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1051 if test "${ac_cv_host+set}" = set; then
1052   echo $ECHO_N "(cached) $ECHO_C" >&6
1053 else
1054   ac_cv_host_alias=$host_alias
1055 test -z "$ac_cv_host_alias" &&
1056   ac_cv_host_alias=$ac_cv_build_alias
1057 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1058   { { echo "$as_me:1058: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1059 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1060    { (exit 1); exit 1; }; }
1061
1062 fi
1063 echo "$as_me:1063: result: $ac_cv_host" >&5
1064 echo "${ECHO_T}$ac_cv_host" >&6
1065 host=$ac_cv_host
1066 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1067 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1068 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1069
1070 if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then
1071         echo "$as_me:1071: checking target system type" >&5
1072 echo $ECHO_N "checking target system type... $ECHO_C" >&6
1073 if test "${ac_cv_target+set}" = set; then
1074   echo $ECHO_N "(cached) $ECHO_C" >&6
1075 else
1076   ac_cv_target_alias=$target_alias
1077 test "x$ac_cv_target_alias" = "x" &&
1078   ac_cv_target_alias=$ac_cv_host_alias
1079 ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
1080   { { echo "$as_me:1080: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1081 echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1082    { (exit 1); exit 1; }; }
1083
1084 fi
1085 echo "$as_me:1085: result: $ac_cv_target" >&5
1086 echo "${ECHO_T}$ac_cv_target" >&6
1087 target=$ac_cv_target
1088 target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1089 target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1090 target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1091
1092 # The aliases save the names the user supplied, while $host etc.
1093 # will get canonicalized.
1094 test -n "$target_alias" &&
1095   test "$program_prefix$program_suffix$program_transform_name" = \
1096     NONENONEs,x,x, &&
1097   program_prefix=${target_alias}-
1098         system_name="$host_os"
1099 else
1100         system_name="`(uname -s -r) 2>/dev/null`"
1101         if test -z "$system_name" ; then
1102                 system_name="`(hostname) 2>/dev/null`"
1103         fi
1104 fi
1105 test -n "$system_name" && cat >>confdefs.h <<EOF
1106 #define SYSTEM_NAME "$system_name"
1107 EOF
1108
1109 if test "${cf_cv_system_name+set}" = set; then
1110   echo $ECHO_N "(cached) $ECHO_C" >&6
1111 else
1112   cf_cv_system_name="$system_name"
1113 fi
1114
1115 test -z "$system_name" && system_name="$cf_cv_system_name"
1116 test -n "$cf_cv_system_name" && echo "$as_me:1116: result: Configuring for $cf_cv_system_name" >&5
1117 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1118
1119 if test ".$system_name" != ".$cf_cv_system_name" ; then
1120         echo "$as_me:1120: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1121 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1122         { { echo "$as_me:1122: error: \"Please remove config.cache and try again.\"" >&5
1123 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1124    { (exit 1); exit 1; }; }
1125 fi
1126
1127 # Check whether --with-system-type or --without-system-type was given.
1128 if test "${with_system_type+set}" = set; then
1129   withval="$with_system_type"
1130   { echo "$as_me:1130: WARNING: overriding system type to $withval" >&5
1131 echo "$as_me: WARNING: overriding system type to $withval" >&2;}
1132  cf_cv_system_name=$withval
1133 fi;
1134
1135 ###     Save the given $CFLAGS to allow user-override.
1136 cf_user_CFLAGS="$CFLAGS"
1137
1138 ###     Default install-location
1139
1140 echo "$as_me:1140: checking for prefix" >&5
1141 echo $ECHO_N "checking for prefix... $ECHO_C" >&6
1142 if test "x$prefix" = "xNONE" ; then
1143         case "$cf_cv_system_name" in
1144                 # non-vendor systems don't have a conflict
1145         openbsd*|freebsd*|mirbsd*|linux*|cygwin*|k*bsd*-gnu)
1146                 prefix=/usr
1147                 ;;
1148         *)      prefix=$ac_default_prefix
1149                 ;;
1150         esac
1151 fi
1152 echo "$as_me:1152: result: $prefix" >&5
1153 echo "${ECHO_T}$prefix" >&6
1154
1155 if test "x$prefix" = "xNONE" ; then
1156 echo "$as_me:1156: checking for default include-directory" >&5
1157 echo $ECHO_N "checking for default include-directory... $ECHO_C" >&6
1158 test -n "$verbose" && echo 1>&6
1159 for cf_symbol in \
1160         $includedir \
1161         $includedir/ncurses \
1162         $prefix/include \
1163         $prefix/include/ncurses \
1164         /usr/local/include \
1165         /usr/local/include/ncurses \
1166         /usr/include \
1167         /usr/include/ncurses
1168 do
1169         cf_dir=`eval echo $cf_symbol`
1170         if test -f $cf_dir/curses.h ; then
1171         if ( fgrep NCURSES_VERSION $cf_dir/curses.h 2>&1 >/dev/null ) ; then
1172                 includedir="$cf_symbol"
1173                 test -n "$verbose"  && echo $ac_n "     found " 1>&6
1174                 break
1175         fi
1176         fi
1177         test -n "$verbose"  && echo "   tested $cf_dir" 1>&6
1178 done
1179 echo "$as_me:1179: result: $includedir" >&5
1180 echo "${ECHO_T}$includedir" >&6
1181 fi
1182
1183 ###     Checks for programs.
1184 ac_ext=c
1185 ac_cpp='$CPP $CPPFLAGS'
1186 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1187 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1188 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1189 ac_main_return=return
1190 if test -n "$ac_tool_prefix"; then
1191   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1192 set dummy ${ac_tool_prefix}gcc; ac_word=$2
1193 echo "$as_me:1193: checking for $ac_word" >&5
1194 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1195 if test "${ac_cv_prog_CC+set}" = set; then
1196   echo $ECHO_N "(cached) $ECHO_C" >&6
1197 else
1198   if test -n "$CC"; then
1199   ac_cv_prog_CC="$CC" # Let the user override the test.
1200 else
1201   ac_save_IFS=$IFS; IFS=$ac_path_separator
1202 ac_dummy="$PATH"
1203 for ac_dir in $ac_dummy; do
1204   IFS=$ac_save_IFS
1205   test -z "$ac_dir" && ac_dir=.
1206   $as_executable_p "$ac_dir/$ac_word" || continue
1207 ac_cv_prog_CC="${ac_tool_prefix}gcc"
1208 echo "$as_me:1208: found $ac_dir/$ac_word" >&5
1209 break
1210 done
1211
1212 fi
1213 fi
1214 CC=$ac_cv_prog_CC
1215 if test -n "$CC"; then
1216   echo "$as_me:1216: result: $CC" >&5
1217 echo "${ECHO_T}$CC" >&6
1218 else
1219   echo "$as_me:1219: result: no" >&5
1220 echo "${ECHO_T}no" >&6
1221 fi
1222
1223 fi
1224 if test -z "$ac_cv_prog_CC"; then
1225   ac_ct_CC=$CC
1226   # Extract the first word of "gcc", so it can be a program name with args.
1227 set dummy gcc; ac_word=$2
1228 echo "$as_me:1228: checking for $ac_word" >&5
1229 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1230 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1231   echo $ECHO_N "(cached) $ECHO_C" >&6
1232 else
1233   if test -n "$ac_ct_CC"; then
1234   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1235 else
1236   ac_save_IFS=$IFS; IFS=$ac_path_separator
1237 ac_dummy="$PATH"
1238 for ac_dir in $ac_dummy; do
1239   IFS=$ac_save_IFS
1240   test -z "$ac_dir" && ac_dir=.
1241   $as_executable_p "$ac_dir/$ac_word" || continue
1242 ac_cv_prog_ac_ct_CC="gcc"
1243 echo "$as_me:1243: found $ac_dir/$ac_word" >&5
1244 break
1245 done
1246
1247 fi
1248 fi
1249 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1250 if test -n "$ac_ct_CC"; then
1251   echo "$as_me:1251: result: $ac_ct_CC" >&5
1252 echo "${ECHO_T}$ac_ct_CC" >&6
1253 else
1254   echo "$as_me:1254: result: no" >&5
1255 echo "${ECHO_T}no" >&6
1256 fi
1257
1258   CC=$ac_ct_CC
1259 else
1260   CC="$ac_cv_prog_CC"
1261 fi
1262
1263 if test -z "$CC"; then
1264   if test -n "$ac_tool_prefix"; then
1265   # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1266 set dummy ${ac_tool_prefix}cc; ac_word=$2
1267 echo "$as_me:1267: checking for $ac_word" >&5
1268 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1269 if test "${ac_cv_prog_CC+set}" = set; then
1270   echo $ECHO_N "(cached) $ECHO_C" >&6
1271 else
1272   if test -n "$CC"; then
1273   ac_cv_prog_CC="$CC" # Let the user override the test.
1274 else
1275   ac_save_IFS=$IFS; IFS=$ac_path_separator
1276 ac_dummy="$PATH"
1277 for ac_dir in $ac_dummy; do
1278   IFS=$ac_save_IFS
1279   test -z "$ac_dir" && ac_dir=.
1280   $as_executable_p "$ac_dir/$ac_word" || continue
1281 ac_cv_prog_CC="${ac_tool_prefix}cc"
1282 echo "$as_me:1282: found $ac_dir/$ac_word" >&5
1283 break
1284 done
1285
1286 fi
1287 fi
1288 CC=$ac_cv_prog_CC
1289 if test -n "$CC"; then
1290   echo "$as_me:1290: result: $CC" >&5
1291 echo "${ECHO_T}$CC" >&6
1292 else
1293   echo "$as_me:1293: result: no" >&5
1294 echo "${ECHO_T}no" >&6
1295 fi
1296
1297 fi
1298 if test -z "$ac_cv_prog_CC"; then
1299   ac_ct_CC=$CC
1300   # Extract the first word of "cc", so it can be a program name with args.
1301 set dummy cc; ac_word=$2
1302 echo "$as_me:1302: checking for $ac_word" >&5
1303 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1304 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1305   echo $ECHO_N "(cached) $ECHO_C" >&6
1306 else
1307   if test -n "$ac_ct_CC"; then
1308   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1309 else
1310   ac_save_IFS=$IFS; IFS=$ac_path_separator
1311 ac_dummy="$PATH"
1312 for ac_dir in $ac_dummy; do
1313   IFS=$ac_save_IFS
1314   test -z "$ac_dir" && ac_dir=.
1315   $as_executable_p "$ac_dir/$ac_word" || continue
1316 ac_cv_prog_ac_ct_CC="cc"
1317 echo "$as_me:1317: found $ac_dir/$ac_word" >&5
1318 break
1319 done
1320
1321 fi
1322 fi
1323 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1324 if test -n "$ac_ct_CC"; then
1325   echo "$as_me:1325: result: $ac_ct_CC" >&5
1326 echo "${ECHO_T}$ac_ct_CC" >&6
1327 else
1328   echo "$as_me:1328: result: no" >&5
1329 echo "${ECHO_T}no" >&6
1330 fi
1331
1332   CC=$ac_ct_CC
1333 else
1334   CC="$ac_cv_prog_CC"
1335 fi
1336
1337 fi
1338 if test -z "$CC"; then
1339   # Extract the first word of "cc", so it can be a program name with args.
1340 set dummy cc; ac_word=$2
1341 echo "$as_me:1341: checking for $ac_word" >&5
1342 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1343 if test "${ac_cv_prog_CC+set}" = set; then
1344   echo $ECHO_N "(cached) $ECHO_C" >&6
1345 else
1346   if test -n "$CC"; then
1347   ac_cv_prog_CC="$CC" # Let the user override the test.
1348 else
1349   ac_prog_rejected=no
1350   ac_save_IFS=$IFS; IFS=$ac_path_separator
1351 ac_dummy="$PATH"
1352 for ac_dir in $ac_dummy; do
1353   IFS=$ac_save_IFS
1354   test -z "$ac_dir" && ac_dir=.
1355   $as_executable_p "$ac_dir/$ac_word" || continue
1356 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1357   ac_prog_rejected=yes
1358   continue
1359 fi
1360 ac_cv_prog_CC="cc"
1361 echo "$as_me:1361: found $ac_dir/$ac_word" >&5
1362 break
1363 done
1364
1365 if test $ac_prog_rejected = yes; then
1366   # We found a bogon in the path, so make sure we never use it.
1367   set dummy $ac_cv_prog_CC
1368   shift
1369   if test $# != 0; then
1370     # We chose a different compiler from the bogus one.
1371     # However, it has the same basename, so the bogon will be chosen
1372     # first if we set CC to just the basename; use the full file name.
1373     shift
1374     set dummy "$ac_dir/$ac_word" ${1+"$@"}
1375     shift
1376     ac_cv_prog_CC="$@"
1377   fi
1378 fi
1379 fi
1380 fi
1381 CC=$ac_cv_prog_CC
1382 if test -n "$CC"; then
1383   echo "$as_me:1383: result: $CC" >&5
1384 echo "${ECHO_T}$CC" >&6
1385 else
1386   echo "$as_me:1386: result: no" >&5
1387 echo "${ECHO_T}no" >&6
1388 fi
1389
1390 fi
1391 if test -z "$CC"; then
1392   if test -n "$ac_tool_prefix"; then
1393   for ac_prog in cl
1394   do
1395     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1396 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1397 echo "$as_me:1397: checking for $ac_word" >&5
1398 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1399 if test "${ac_cv_prog_CC+set}" = set; then
1400   echo $ECHO_N "(cached) $ECHO_C" >&6
1401 else
1402   if test -n "$CC"; then
1403   ac_cv_prog_CC="$CC" # Let the user override the test.
1404 else
1405   ac_save_IFS=$IFS; IFS=$ac_path_separator
1406 ac_dummy="$PATH"
1407 for ac_dir in $ac_dummy; do
1408   IFS=$ac_save_IFS
1409   test -z "$ac_dir" && ac_dir=.
1410   $as_executable_p "$ac_dir/$ac_word" || continue
1411 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1412 echo "$as_me:1412: found $ac_dir/$ac_word" >&5
1413 break
1414 done
1415
1416 fi
1417 fi
1418 CC=$ac_cv_prog_CC
1419 if test -n "$CC"; then
1420   echo "$as_me:1420: result: $CC" >&5
1421 echo "${ECHO_T}$CC" >&6
1422 else
1423   echo "$as_me:1423: result: no" >&5
1424 echo "${ECHO_T}no" >&6
1425 fi
1426
1427     test -n "$CC" && break
1428   done
1429 fi
1430 if test -z "$CC"; then
1431   ac_ct_CC=$CC
1432   for ac_prog in cl
1433 do
1434   # Extract the first word of "$ac_prog", so it can be a program name with args.
1435 set dummy $ac_prog; ac_word=$2
1436 echo "$as_me:1436: checking for $ac_word" >&5
1437 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1438 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1439   echo $ECHO_N "(cached) $ECHO_C" >&6
1440 else
1441   if test -n "$ac_ct_CC"; then
1442   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1443 else
1444   ac_save_IFS=$IFS; IFS=$ac_path_separator
1445 ac_dummy="$PATH"
1446 for ac_dir in $ac_dummy; do
1447   IFS=$ac_save_IFS
1448   test -z "$ac_dir" && ac_dir=.
1449   $as_executable_p "$ac_dir/$ac_word" || continue
1450 ac_cv_prog_ac_ct_CC="$ac_prog"
1451 echo "$as_me:1451: found $ac_dir/$ac_word" >&5
1452 break
1453 done
1454
1455 fi
1456 fi
1457 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1458 if test -n "$ac_ct_CC"; then
1459   echo "$as_me:1459: result: $ac_ct_CC" >&5
1460 echo "${ECHO_T}$ac_ct_CC" >&6
1461 else
1462   echo "$as_me:1462: result: no" >&5
1463 echo "${ECHO_T}no" >&6
1464 fi
1465
1466   test -n "$ac_ct_CC" && break
1467 done
1468
1469   CC=$ac_ct_CC
1470 fi
1471
1472 fi
1473
1474 test -z "$CC" && { { echo "$as_me:1474: error: no acceptable cc found in \$PATH" >&5
1475 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1476    { (exit 1); exit 1; }; }
1477
1478 # Provide some information about the compiler.
1479 echo "$as_me:1479:" \
1480      "checking for C compiler version" >&5
1481 ac_compiler=`set X $ac_compile; echo $2`
1482 { (eval echo "$as_me:1482: \"$ac_compiler --version </dev/null >&5\"") >&5
1483   (eval $ac_compiler --version </dev/null >&5) 2>&5
1484   ac_status=$?
1485   echo "$as_me:1485: \$? = $ac_status" >&5
1486   (exit $ac_status); }
1487 { (eval echo "$as_me:1487: \"$ac_compiler -v </dev/null >&5\"") >&5
1488   (eval $ac_compiler -v </dev/null >&5) 2>&5
1489   ac_status=$?
1490   echo "$as_me:1490: \$? = $ac_status" >&5
1491   (exit $ac_status); }
1492 { (eval echo "$as_me:1492: \"$ac_compiler -V </dev/null >&5\"") >&5
1493   (eval $ac_compiler -V </dev/null >&5) 2>&5
1494   ac_status=$?
1495   echo "$as_me:1495: \$? = $ac_status" >&5
1496   (exit $ac_status); }
1497
1498 cat >conftest.$ac_ext <<_ACEOF
1499 #line 1499 "configure"
1500 #include "confdefs.h"
1501
1502 int
1503 main ()
1504 {
1505
1506   ;
1507   return 0;
1508 }
1509 _ACEOF
1510 ac_clean_files_save=$ac_clean_files
1511 ac_clean_files="$ac_clean_files a.out a.exe"
1512 # Try to create an executable without -o first, disregard a.out.
1513 # It will help us diagnose broken compilers, and finding out an intuition
1514 # of exeext.
1515 echo "$as_me:1515: checking for C compiler default output" >&5
1516 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1517 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1518 if { (eval echo "$as_me:1518: \"$ac_link_default\"") >&5
1519   (eval $ac_link_default) 2>&5
1520   ac_status=$?
1521   echo "$as_me:1521: \$? = $ac_status" >&5
1522   (exit $ac_status); }; then
1523   # Find the output, starting from the most likely.  This scheme is
1524 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1525 # resort.
1526 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1527                 ls a.out conftest 2>/dev/null;
1528                 ls a.* conftest.* 2>/dev/null`; do
1529   case $ac_file in
1530     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1531     a.out ) # We found the default executable, but exeext='' is most
1532             # certainly right.
1533             break;;
1534     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1535           # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1536           export ac_cv_exeext
1537           break;;
1538     * ) break;;
1539   esac
1540 done
1541 else
1542   echo "$as_me: failed program was:" >&5
1543 cat conftest.$ac_ext >&5
1544 { { echo "$as_me:1544: error: C compiler cannot create executables" >&5
1545 echo "$as_me: error: C compiler cannot create executables" >&2;}
1546    { (exit 77); exit 77; }; }
1547 fi
1548
1549 ac_exeext=$ac_cv_exeext
1550 echo "$as_me:1550: result: $ac_file" >&5
1551 echo "${ECHO_T}$ac_file" >&6
1552
1553 # Check the compiler produces executables we can run.  If not, either
1554 # the compiler is broken, or we cross compile.
1555 echo "$as_me:1555: checking whether the C compiler works" >&5
1556 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1557 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1558 # If not cross compiling, check that we can run a simple program.
1559 if test "$cross_compiling" != yes; then
1560   if { ac_try='./$ac_file'
1561   { (eval echo "$as_me:1561: \"$ac_try\"") >&5
1562   (eval $ac_try) 2>&5
1563   ac_status=$?
1564   echo "$as_me:1564: \$? = $ac_status" >&5
1565   (exit $ac_status); }; }; then
1566     cross_compiling=no
1567   else
1568     if test "$cross_compiling" = maybe; then
1569         cross_compiling=yes
1570     else
1571         { { echo "$as_me:1571: error: cannot run C compiled programs.
1572 If you meant to cross compile, use \`--host'." >&5
1573 echo "$as_me: error: cannot run C compiled programs.
1574 If you meant to cross compile, use \`--host'." >&2;}
1575    { (exit 1); exit 1; }; }
1576     fi
1577   fi
1578 fi
1579 echo "$as_me:1579: result: yes" >&5
1580 echo "${ECHO_T}yes" >&6
1581
1582 rm -f a.out a.exe conftest$ac_cv_exeext
1583 ac_clean_files=$ac_clean_files_save
1584 # Check the compiler produces executables we can run.  If not, either
1585 # the compiler is broken, or we cross compile.
1586 echo "$as_me:1586: checking whether we are cross compiling" >&5
1587 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1588 echo "$as_me:1588: result: $cross_compiling" >&5
1589 echo "${ECHO_T}$cross_compiling" >&6
1590
1591 echo "$as_me:1591: checking for executable suffix" >&5
1592 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1593 if { (eval echo "$as_me:1593: \"$ac_link\"") >&5
1594   (eval $ac_link) 2>&5
1595   ac_status=$?
1596   echo "$as_me:1596: \$? = $ac_status" >&5
1597   (exit $ac_status); }; then
1598   # If both `conftest.exe' and `conftest' are `present' (well, observable)
1599 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
1600 # work properly (i.e., refer to `conftest.exe'), while it won't with
1601 # `rm'.
1602 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1603   case $ac_file in
1604     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1605     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1606           export ac_cv_exeext
1607           break;;
1608     * ) break;;
1609   esac
1610 done
1611 else
1612   { { echo "$as_me:1612: error: cannot compute EXEEXT: cannot compile and link" >&5
1613 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1614    { (exit 1); exit 1; }; }
1615 fi
1616
1617 rm -f conftest$ac_cv_exeext
1618 echo "$as_me:1618: result: $ac_cv_exeext" >&5
1619 echo "${ECHO_T}$ac_cv_exeext" >&6
1620
1621 rm -f conftest.$ac_ext
1622 EXEEXT=$ac_cv_exeext
1623 ac_exeext=$EXEEXT
1624 echo "$as_me:1624: checking for object suffix" >&5
1625 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1626 if test "${ac_cv_objext+set}" = set; then
1627   echo $ECHO_N "(cached) $ECHO_C" >&6
1628 else
1629   cat >conftest.$ac_ext <<_ACEOF
1630 #line 1630 "configure"
1631 #include "confdefs.h"
1632
1633 int
1634 main ()
1635 {
1636
1637   ;
1638   return 0;
1639 }
1640 _ACEOF
1641 rm -f conftest.o conftest.obj
1642 if { (eval echo "$as_me:1642: \"$ac_compile\"") >&5
1643   (eval $ac_compile) 2>&5
1644   ac_status=$?
1645   echo "$as_me:1645: \$? = $ac_status" >&5
1646   (exit $ac_status); }; then
1647   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1648   case $ac_file in
1649     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
1650     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1651        break;;
1652   esac
1653 done
1654 else
1655   echo "$as_me: failed program was:" >&5
1656 cat conftest.$ac_ext >&5
1657 { { echo "$as_me:1657: error: cannot compute OBJEXT: cannot compile" >&5
1658 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1659    { (exit 1); exit 1; }; }
1660 fi
1661
1662 rm -f conftest.$ac_cv_objext conftest.$ac_ext
1663 fi
1664 echo "$as_me:1664: result: $ac_cv_objext" >&5
1665 echo "${ECHO_T}$ac_cv_objext" >&6
1666 OBJEXT=$ac_cv_objext
1667 ac_objext=$OBJEXT
1668 echo "$as_me:1668: checking whether we are using the GNU C compiler" >&5
1669 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1670 if test "${ac_cv_c_compiler_gnu+set}" = set; then
1671   echo $ECHO_N "(cached) $ECHO_C" >&6
1672 else
1673   cat >conftest.$ac_ext <<_ACEOF
1674 #line 1674 "configure"
1675 #include "confdefs.h"
1676
1677 int
1678 main ()
1679 {
1680 #ifndef __GNUC__
1681        choke me
1682 #endif
1683
1684   ;
1685   return 0;
1686 }
1687 _ACEOF
1688 rm -f conftest.$ac_objext
1689 if { (eval echo "$as_me:1689: \"$ac_compile\"") >&5
1690   (eval $ac_compile) 2>&5
1691   ac_status=$?
1692   echo "$as_me:1692: \$? = $ac_status" >&5
1693   (exit $ac_status); } &&
1694          { ac_try='test -s conftest.$ac_objext'
1695   { (eval echo "$as_me:1695: \"$ac_try\"") >&5
1696   (eval $ac_try) 2>&5
1697   ac_status=$?
1698   echo "$as_me:1698: \$? = $ac_status" >&5
1699   (exit $ac_status); }; }; then
1700   ac_compiler_gnu=yes
1701 else
1702   echo "$as_me: failed program was:" >&5
1703 cat conftest.$ac_ext >&5
1704 ac_compiler_gnu=no
1705 fi
1706 rm -f conftest.$ac_objext conftest.$ac_ext
1707 ac_cv_c_compiler_gnu=$ac_compiler_gnu
1708
1709 fi
1710 echo "$as_me:1710: result: $ac_cv_c_compiler_gnu" >&5
1711 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1712 GCC=`test $ac_compiler_gnu = yes && echo yes`
1713 ac_test_CFLAGS=${CFLAGS+set}
1714 ac_save_CFLAGS=$CFLAGS
1715 CFLAGS="-g"
1716 echo "$as_me:1716: checking whether $CC accepts -g" >&5
1717 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1718 if test "${ac_cv_prog_cc_g+set}" = set; then
1719   echo $ECHO_N "(cached) $ECHO_C" >&6
1720 else
1721   cat >conftest.$ac_ext <<_ACEOF
1722 #line 1722 "configure"
1723 #include "confdefs.h"
1724
1725 int
1726 main ()
1727 {
1728
1729   ;
1730   return 0;
1731 }
1732 _ACEOF
1733 rm -f conftest.$ac_objext
1734 if { (eval echo "$as_me:1734: \"$ac_compile\"") >&5
1735   (eval $ac_compile) 2>&5
1736   ac_status=$?
1737   echo "$as_me:1737: \$? = $ac_status" >&5
1738   (exit $ac_status); } &&
1739          { ac_try='test -s conftest.$ac_objext'
1740   { (eval echo "$as_me:1740: \"$ac_try\"") >&5
1741   (eval $ac_try) 2>&5
1742   ac_status=$?
1743   echo "$as_me:1743: \$? = $ac_status" >&5
1744   (exit $ac_status); }; }; then
1745   ac_cv_prog_cc_g=yes
1746 else
1747   echo "$as_me: failed program was:" >&5
1748 cat conftest.$ac_ext >&5
1749 ac_cv_prog_cc_g=no
1750 fi
1751 rm -f conftest.$ac_objext conftest.$ac_ext
1752 fi
1753 echo "$as_me:1753: result: $ac_cv_prog_cc_g" >&5
1754 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1755 if test "$ac_test_CFLAGS" = set; then
1756   CFLAGS=$ac_save_CFLAGS
1757 elif test $ac_cv_prog_cc_g = yes; then
1758   if test "$GCC" = yes; then
1759     CFLAGS="-g -O2"
1760   else
1761     CFLAGS="-g"
1762   fi
1763 else
1764   if test "$GCC" = yes; then
1765     CFLAGS="-O2"
1766   else
1767     CFLAGS=
1768   fi
1769 fi
1770 # Some people use a C++ compiler to compile C.  Since we use `exit',
1771 # in C++ we need to declare it.  In case someone uses the same compiler
1772 # for both compiling C and C++ we need to have the C++ compiler decide
1773 # the declaration of exit, since it's the most demanding environment.
1774 cat >conftest.$ac_ext <<_ACEOF
1775 #ifndef __cplusplus
1776   choke me
1777 #endif
1778 _ACEOF
1779 rm -f conftest.$ac_objext
1780 if { (eval echo "$as_me:1780: \"$ac_compile\"") >&5
1781   (eval $ac_compile) 2>&5
1782   ac_status=$?
1783   echo "$as_me:1783: \$? = $ac_status" >&5
1784   (exit $ac_status); } &&
1785          { ac_try='test -s conftest.$ac_objext'
1786   { (eval echo "$as_me:1786: \"$ac_try\"") >&5
1787   (eval $ac_try) 2>&5
1788   ac_status=$?
1789   echo "$as_me:1789: \$? = $ac_status" >&5
1790   (exit $ac_status); }; }; then
1791   for ac_declaration in \
1792    ''\
1793    '#include <stdlib.h>' \
1794    'extern "C" void std::exit (int) throw (); using std::exit;' \
1795    'extern "C" void std::exit (int); using std::exit;' \
1796    'extern "C" void exit (int) throw ();' \
1797    'extern "C" void exit (int);' \
1798    'void exit (int);'
1799 do
1800   cat >conftest.$ac_ext <<_ACEOF
1801 #line 1801 "configure"
1802 #include "confdefs.h"
1803 #include <stdlib.h>
1804 $ac_declaration
1805 int
1806 main ()
1807 {
1808 exit (42);
1809   ;
1810   return 0;
1811 }
1812 _ACEOF
1813 rm -f conftest.$ac_objext
1814 if { (eval echo "$as_me:1814: \"$ac_compile\"") >&5
1815   (eval $ac_compile) 2>&5
1816   ac_status=$?
1817   echo "$as_me:1817: \$? = $ac_status" >&5
1818   (exit $ac_status); } &&
1819          { ac_try='test -s conftest.$ac_objext'
1820   { (eval echo "$as_me:1820: \"$ac_try\"") >&5
1821   (eval $ac_try) 2>&5
1822   ac_status=$?
1823   echo "$as_me:1823: \$? = $ac_status" >&5
1824   (exit $ac_status); }; }; then
1825   :
1826 else
1827   echo "$as_me: failed program was:" >&5
1828 cat conftest.$ac_ext >&5
1829 continue
1830 fi
1831 rm -f conftest.$ac_objext conftest.$ac_ext
1832   cat >conftest.$ac_ext <<_ACEOF
1833 #line 1833 "configure"
1834 #include "confdefs.h"
1835 $ac_declaration
1836 int
1837 main ()
1838 {
1839 exit (42);
1840   ;
1841   return 0;
1842 }
1843 _ACEOF
1844 rm -f conftest.$ac_objext
1845 if { (eval echo "$as_me:1845: \"$ac_compile\"") >&5
1846   (eval $ac_compile) 2>&5
1847   ac_status=$?
1848   echo "$as_me:1848: \$? = $ac_status" >&5
1849   (exit $ac_status); } &&
1850          { ac_try='test -s conftest.$ac_objext'
1851   { (eval echo "$as_me:1851: \"$ac_try\"") >&5
1852   (eval $ac_try) 2>&5
1853   ac_status=$?
1854   echo "$as_me:1854: \$? = $ac_status" >&5
1855   (exit $ac_status); }; }; then
1856   break
1857 else
1858   echo "$as_me: failed program was:" >&5
1859 cat conftest.$ac_ext >&5
1860 fi
1861 rm -f conftest.$ac_objext conftest.$ac_ext
1862 done
1863 rm -rf conftest*
1864 if test -n "$ac_declaration"; then
1865   echo '#ifdef __cplusplus' >>confdefs.h
1866   echo $ac_declaration      >>confdefs.h
1867   echo '#endif'             >>confdefs.h
1868 fi
1869
1870 else
1871   echo "$as_me: failed program was:" >&5
1872 cat conftest.$ac_ext >&5
1873 fi
1874 rm -f conftest.$ac_objext conftest.$ac_ext
1875 ac_ext=c
1876 ac_cpp='$CPP $CPPFLAGS'
1877 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1878 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1879 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1880 ac_main_return=return
1881
1882 GCC_VERSION=none
1883 if test "$GCC" = yes ; then
1884         echo "$as_me:1884: checking version of $CC" >&5
1885 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
1886         GCC_VERSION="`${CC} --version 2>/dev/null | sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
1887         test -z "$GCC_VERSION" && GCC_VERSION=unknown
1888         echo "$as_me:1888: result: $GCC_VERSION" >&5
1889 echo "${ECHO_T}$GCC_VERSION" >&6
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 echo "$as_me:1898: checking how to run the C preprocessor" >&5
1899 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
1900 # On Suns, sometimes $CPP names a directory.
1901 if test -n "$CPP" && test -d "$CPP"; then
1902   CPP=
1903 fi
1904 if test -z "$CPP"; then
1905   if test "${ac_cv_prog_CPP+set}" = set; then
1906   echo $ECHO_N "(cached) $ECHO_C" >&6
1907 else
1908       # Double quotes because CPP needs to be expanded
1909     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
1910     do
1911       ac_preproc_ok=false
1912 for ac_c_preproc_warn_flag in '' yes
1913 do
1914   # Use a header file that comes with gcc, so configuring glibc
1915   # with a fresh cross-compiler works.
1916   # On the NeXT, cc -E runs the code through the compiler's parser,
1917   # not just through cpp. "Syntax error" is here to catch this case.
1918   cat >conftest.$ac_ext <<_ACEOF
1919 #line 1919 "configure"
1920 #include "confdefs.h"
1921 #include <assert.h>
1922                      Syntax error
1923 _ACEOF
1924 if { (eval echo "$as_me:1924: \"$ac_cpp conftest.$ac_ext\"") >&5
1925   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
1926   ac_status=$?
1927   egrep -v '^ *\+' conftest.er1 >conftest.err
1928   rm -f conftest.er1
1929   cat conftest.err >&5
1930   echo "$as_me:1930: \$? = $ac_status" >&5
1931   (exit $ac_status); } >/dev/null; then
1932   if test -s conftest.err; then
1933     ac_cpp_err=$ac_c_preproc_warn_flag
1934   else
1935     ac_cpp_err=
1936   fi
1937 else
1938   ac_cpp_err=yes
1939 fi
1940 if test -z "$ac_cpp_err"; then
1941   :
1942 else
1943   echo "$as_me: failed program was:" >&5
1944   cat conftest.$ac_ext >&5
1945   # Broken: fails on valid input.
1946 continue
1947 fi
1948 rm -f conftest.err conftest.$ac_ext
1949
1950   # OK, works on sane cases.  Now check whether non-existent headers
1951   # can be detected and how.
1952   cat >conftest.$ac_ext <<_ACEOF
1953 #line 1953 "configure"
1954 #include "confdefs.h"
1955 #include <ac_nonexistent.h>
1956 _ACEOF
1957 if { (eval echo "$as_me:1957: \"$ac_cpp conftest.$ac_ext\"") >&5
1958   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
1959   ac_status=$?
1960   egrep -v '^ *\+' conftest.er1 >conftest.err
1961   rm -f conftest.er1
1962   cat conftest.err >&5
1963   echo "$as_me:1963: \$? = $ac_status" >&5
1964   (exit $ac_status); } >/dev/null; then
1965   if test -s conftest.err; then
1966     ac_cpp_err=$ac_c_preproc_warn_flag
1967   else
1968     ac_cpp_err=
1969   fi
1970 else
1971   ac_cpp_err=yes
1972 fi
1973 if test -z "$ac_cpp_err"; then
1974   # Broken: success on invalid input.
1975 continue
1976 else
1977   echo "$as_me: failed program was:" >&5
1978   cat conftest.$ac_ext >&5
1979   # Passes both tests.
1980 ac_preproc_ok=:
1981 break
1982 fi
1983 rm -f conftest.err conftest.$ac_ext
1984
1985 done
1986 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
1987 rm -f conftest.err conftest.$ac_ext
1988 if $ac_preproc_ok; then
1989   break
1990 fi
1991
1992     done
1993     ac_cv_prog_CPP=$CPP
1994
1995 fi
1996   CPP=$ac_cv_prog_CPP
1997 else
1998   ac_cv_prog_CPP=$CPP
1999 fi
2000 echo "$as_me:2000: result: $CPP" >&5
2001 echo "${ECHO_T}$CPP" >&6
2002 ac_preproc_ok=false
2003 for ac_c_preproc_warn_flag in '' yes
2004 do
2005   # Use a header file that comes with gcc, so configuring glibc
2006   # with a fresh cross-compiler works.
2007   # On the NeXT, cc -E runs the code through the compiler's parser,
2008   # not just through cpp. "Syntax error" is here to catch this case.
2009   cat >conftest.$ac_ext <<_ACEOF
2010 #line 2010 "configure"
2011 #include "confdefs.h"
2012 #include <assert.h>
2013                      Syntax error
2014 _ACEOF
2015 if { (eval echo "$as_me:2015: \"$ac_cpp conftest.$ac_ext\"") >&5
2016   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2017   ac_status=$?
2018   egrep -v '^ *\+' conftest.er1 >conftest.err
2019   rm -f conftest.er1
2020   cat conftest.err >&5
2021   echo "$as_me:2021: \$? = $ac_status" >&5
2022   (exit $ac_status); } >/dev/null; then
2023   if test -s conftest.err; then
2024     ac_cpp_err=$ac_c_preproc_warn_flag
2025   else
2026     ac_cpp_err=
2027   fi
2028 else
2029   ac_cpp_err=yes
2030 fi
2031 if test -z "$ac_cpp_err"; then
2032   :
2033 else
2034   echo "$as_me: failed program was:" >&5
2035   cat conftest.$ac_ext >&5
2036   # Broken: fails on valid input.
2037 continue
2038 fi
2039 rm -f conftest.err conftest.$ac_ext
2040
2041   # OK, works on sane cases.  Now check whether non-existent headers
2042   # can be detected and how.
2043   cat >conftest.$ac_ext <<_ACEOF
2044 #line 2044 "configure"
2045 #include "confdefs.h"
2046 #include <ac_nonexistent.h>
2047 _ACEOF
2048 if { (eval echo "$as_me:2048: \"$ac_cpp conftest.$ac_ext\"") >&5
2049   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2050   ac_status=$?
2051   egrep -v '^ *\+' conftest.er1 >conftest.err
2052   rm -f conftest.er1
2053   cat conftest.err >&5
2054   echo "$as_me:2054: \$? = $ac_status" >&5
2055   (exit $ac_status); } >/dev/null; then
2056   if test -s conftest.err; then
2057     ac_cpp_err=$ac_c_preproc_warn_flag
2058   else
2059     ac_cpp_err=
2060   fi
2061 else
2062   ac_cpp_err=yes
2063 fi
2064 if test -z "$ac_cpp_err"; then
2065   # Broken: success on invalid input.
2066 continue
2067 else
2068   echo "$as_me: failed program was:" >&5
2069   cat conftest.$ac_ext >&5
2070   # Passes both tests.
2071 ac_preproc_ok=:
2072 break
2073 fi
2074 rm -f conftest.err conftest.$ac_ext
2075
2076 done
2077 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2078 rm -f conftest.err conftest.$ac_ext
2079 if $ac_preproc_ok; then
2080   :
2081 else
2082   { { echo "$as_me:2082: error: C preprocessor \"$CPP\" fails sanity check" >&5
2083 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2084    { (exit 1); exit 1; }; }
2085 fi
2086
2087 ac_ext=c
2088 ac_cpp='$CPP $CPPFLAGS'
2089 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2090 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2091 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2092 ac_main_return=return
2093
2094 if test $ac_cv_c_compiler_gnu = yes; then
2095     echo "$as_me:2095: checking whether $CC needs -traditional" >&5
2096 echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
2097 if test "${ac_cv_prog_gcc_traditional+set}" = set; then
2098   echo $ECHO_N "(cached) $ECHO_C" >&6
2099 else
2100     ac_pattern="Autoconf.*'x'"
2101   cat >conftest.$ac_ext <<_ACEOF
2102 #line 2102 "configure"
2103 #include "confdefs.h"
2104 #include <sgtty.h>
2105 int Autoconf = TIOCGETP;
2106 _ACEOF
2107 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2108   egrep "$ac_pattern" >/dev/null 2>&1; then
2109   ac_cv_prog_gcc_traditional=yes
2110 else
2111   ac_cv_prog_gcc_traditional=no
2112 fi
2113 rm -rf conftest*
2114
2115   if test $ac_cv_prog_gcc_traditional = no; then
2116     cat >conftest.$ac_ext <<_ACEOF
2117 #line 2117 "configure"
2118 #include "confdefs.h"
2119 #include <termio.h>
2120 int Autoconf = TCGETA;
2121 _ACEOF
2122 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2123   egrep "$ac_pattern" >/dev/null 2>&1; then
2124   ac_cv_prog_gcc_traditional=yes
2125 fi
2126 rm -rf conftest*
2127
2128   fi
2129 fi
2130 echo "$as_me:2130: result: $ac_cv_prog_gcc_traditional" >&5
2131 echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
2132   if test $ac_cv_prog_gcc_traditional = yes; then
2133     CC="$CC -traditional"
2134   fi
2135 fi
2136
2137 echo "$as_me:2137: checking whether $CC understands -c and -o together" >&5
2138 echo $ECHO_N "checking whether $CC understands -c and -o together... $ECHO_C" >&6
2139 if test "${cf_cv_prog_CC_c_o+set}" = set; then
2140   echo $ECHO_N "(cached) $ECHO_C" >&6
2141 else
2142
2143 cat > conftest.$ac_ext <<CF_EOF
2144 #include <stdio.h>
2145 int main()
2146 {
2147         ${cf_cv_main_return:-return}(0);
2148 }
2149 CF_EOF
2150 # We do the test twice because some compilers refuse to overwrite an
2151 # existing .o file with -o, though they will create one.
2152 ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
2153 if { (eval echo "$as_me:2153: \"$ac_try\"") >&5
2154   (eval $ac_try) 2>&5
2155   ac_status=$?
2156   echo "$as_me:2156: \$? = $ac_status" >&5
2157   (exit $ac_status); } &&
2158   test -f conftest2.$ac_objext && { (eval echo "$as_me:2158: \"$ac_try\"") >&5
2159   (eval $ac_try) 2>&5
2160   ac_status=$?
2161   echo "$as_me:2161: \$? = $ac_status" >&5
2162   (exit $ac_status); };
2163 then
2164   eval cf_cv_prog_CC_c_o=yes
2165 else
2166   eval cf_cv_prog_CC_c_o=no
2167 fi
2168 rm -rf conftest*
2169
2170 fi
2171 if test $cf_cv_prog_CC_c_o = yes; then
2172   echo "$as_me:2172: result: yes" >&5
2173 echo "${ECHO_T}yes" >&6
2174 else
2175   echo "$as_me:2175: result: no" >&5
2176 echo "${ECHO_T}no" >&6
2177 fi
2178
2179 echo "$as_me:2179: checking for POSIXized ISC" >&5
2180 echo $ECHO_N "checking for POSIXized ISC... $ECHO_C" >&6
2181 if test -d /etc/conf/kconfig.d &&
2182    grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
2183 then
2184   echo "$as_me:2184: result: yes" >&5
2185 echo "${ECHO_T}yes" >&6
2186   ISC=yes # If later tests want to check for ISC.
2187
2188 cat >>confdefs.h <<\EOF
2189 #define _POSIX_SOURCE 1
2190 EOF
2191
2192   if test "$GCC" = yes; then
2193     CC="$CC -posix"
2194   else
2195     CC="$CC -Xp"
2196   fi
2197 else
2198   echo "$as_me:2198: result: no" >&5
2199 echo "${ECHO_T}no" >&6
2200   ISC=
2201 fi
2202
2203 # This should have been defined by AC_PROG_CC
2204 : ${CC:=cc}
2205
2206 # Check for user's environment-breakage by stuffing CFLAGS/CPPFLAGS content
2207 # into CC.  This will not help with broken scripts that wrap the compiler with
2208 # options, but eliminates a more common category of user confusion.
2209 echo "$as_me:2209: checking \$CC variable" >&5
2210 echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
2211 case "$CC" in #(vi
2212 *[\ \   ]-[IUD]*)
2213         echo "$as_me:2213: result: broken" >&5
2214 echo "${ECHO_T}broken" >&6
2215         { echo "$as_me:2215: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
2216 echo "$as_me: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
2217         # humor him...
2218         cf_flags=`echo "$CC" | sed -e 's/^[^    ]*[     ]//'`
2219         CC=`echo "$CC" | sed -e 's/[    ].*//'`
2220
2221 cf_fix_cppflags=no
2222 cf_new_cflags=
2223 cf_new_cppflags=
2224 cf_new_extra_cppflags=
2225
2226 for cf_add_cflags in $cf_flags
2227 do
2228 case $cf_fix_cppflags in
2229 no)
2230         case $cf_add_cflags in #(vi
2231         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2232                 case $cf_add_cflags in
2233                 -D*)
2234                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2235
2236                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2237                                 && test -z "${cf_tst_cflags}" \
2238                                 && cf_fix_cppflags=yes
2239
2240                         if test $cf_fix_cppflags = yes ; then
2241                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2242                                 continue
2243                         elif test "${cf_tst_cflags}" = "\"'" ; then
2244                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2245                                 continue
2246                         fi
2247                         ;;
2248                 esac
2249                 case "$CPPFLAGS" in
2250                 *$cf_add_cflags) #(vi
2251                         ;;
2252                 *) #(vi
2253                         case $cf_add_cflags in #(vi
2254                         -D*)
2255                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2256
2257 CPPFLAGS=`echo "$CPPFLAGS" | \
2258         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2259                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2260
2261                                 ;;
2262                         esac
2263                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2264                         ;;
2265                 esac
2266                 ;;
2267         *)
2268                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2269                 ;;
2270         esac
2271         ;;
2272 yes)
2273         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2274
2275         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2276
2277         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2278                 && test -z "${cf_tst_cflags}" \
2279                 && cf_fix_cppflags=no
2280         ;;
2281 esac
2282 done
2283
2284 if test -n "$cf_new_cflags" ; then
2285
2286         CFLAGS="$CFLAGS $cf_new_cflags"
2287 fi
2288
2289 if test -n "$cf_new_cppflags" ; then
2290
2291         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
2292 fi
2293
2294 if test -n "$cf_new_extra_cppflags" ; then
2295
2296         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2297 fi
2298
2299         ;;
2300 *)
2301         echo "$as_me:2301: result: ok" >&5
2302 echo "${ECHO_T}ok" >&6
2303         ;;
2304 esac
2305
2306 echo "$as_me:2306: checking for ${CC:-cc} option to accept ANSI C" >&5
2307 echo $ECHO_N "checking for ${CC:-cc} option to accept ANSI C... $ECHO_C" >&6
2308 if test "${cf_cv_ansi_cc+set}" = set; then
2309   echo $ECHO_N "(cached) $ECHO_C" >&6
2310 else
2311
2312 cf_cv_ansi_cc=no
2313 cf_save_CFLAGS="$CFLAGS"
2314 cf_save_CPPFLAGS="$CPPFLAGS"
2315 # Don't try gcc -ansi; that turns off useful extensions and
2316 # breaks some systems' header files.
2317 # AIX                   -qlanglvl=ansi
2318 # Ultrix and OSF/1      -std1
2319 # HP-UX                 -Aa -D_HPUX_SOURCE
2320 # SVR4                  -Xc
2321 # UnixWare 1.2          (cannot use -Xc, since ANSI/POSIX clashes)
2322 for cf_arg in "-DCC_HAS_PROTOS" \
2323         "" \
2324         -qlanglvl=ansi \
2325         -std1 \
2326         -Ae \
2327         "-Aa -D_HPUX_SOURCE" \
2328         -Xc
2329 do
2330
2331 cf_fix_cppflags=no
2332 cf_new_cflags=
2333 cf_new_cppflags=
2334 cf_new_extra_cppflags=
2335
2336 for cf_add_cflags in $cf_arg
2337 do
2338 case $cf_fix_cppflags in
2339 no)
2340         case $cf_add_cflags in #(vi
2341         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2342                 case $cf_add_cflags in
2343                 -D*)
2344                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2345
2346                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2347                                 && test -z "${cf_tst_cflags}" \
2348                                 && cf_fix_cppflags=yes
2349
2350                         if test $cf_fix_cppflags = yes ; then
2351                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2352                                 continue
2353                         elif test "${cf_tst_cflags}" = "\"'" ; then
2354                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2355                                 continue
2356                         fi
2357                         ;;
2358                 esac
2359                 case "$CPPFLAGS" in
2360                 *$cf_add_cflags) #(vi
2361                         ;;
2362                 *) #(vi
2363                         case $cf_add_cflags in #(vi
2364                         -D*)
2365                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2366
2367 CPPFLAGS=`echo "$CPPFLAGS" | \
2368         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2369                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2370
2371                                 ;;
2372                         esac
2373                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2374                         ;;
2375                 esac
2376                 ;;
2377         *)
2378                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2379                 ;;
2380         esac
2381         ;;
2382 yes)
2383         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2384
2385         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2386
2387         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2388                 && test -z "${cf_tst_cflags}" \
2389                 && cf_fix_cppflags=no
2390         ;;
2391 esac
2392 done
2393
2394 if test -n "$cf_new_cflags" ; then
2395
2396         CFLAGS="$CFLAGS $cf_new_cflags"
2397 fi
2398
2399 if test -n "$cf_new_cppflags" ; then
2400
2401         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
2402 fi
2403
2404 if test -n "$cf_new_extra_cppflags" ; then
2405
2406         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2407 fi
2408
2409         cat >conftest.$ac_ext <<_ACEOF
2410 #line 2410 "configure"
2411 #include "confdefs.h"
2412
2413 #ifndef CC_HAS_PROTOS
2414 #if !defined(__STDC__) || (__STDC__ != 1)
2415 choke me
2416 #endif
2417 #endif
2418
2419 int
2420 main ()
2421 {
2422
2423         int test (int i, double x);
2424         struct s1 {int (*f) (int a);};
2425         struct s2 {int (*f) (double a);};
2426   ;
2427   return 0;
2428 }
2429 _ACEOF
2430 rm -f conftest.$ac_objext
2431 if { (eval echo "$as_me:2431: \"$ac_compile\"") >&5
2432   (eval $ac_compile) 2>&5
2433   ac_status=$?
2434   echo "$as_me:2434: \$? = $ac_status" >&5
2435   (exit $ac_status); } &&
2436          { ac_try='test -s conftest.$ac_objext'
2437   { (eval echo "$as_me:2437: \"$ac_try\"") >&5
2438   (eval $ac_try) 2>&5
2439   ac_status=$?
2440   echo "$as_me:2440: \$? = $ac_status" >&5
2441   (exit $ac_status); }; }; then
2442   cf_cv_ansi_cc="$cf_arg"; break
2443 else
2444   echo "$as_me: failed program was:" >&5
2445 cat conftest.$ac_ext >&5
2446 fi
2447 rm -f conftest.$ac_objext conftest.$ac_ext
2448 done
2449 CFLAGS="$cf_save_CFLAGS"
2450 CPPFLAGS="$cf_save_CPPFLAGS"
2451
2452 fi
2453 echo "$as_me:2453: result: $cf_cv_ansi_cc" >&5
2454 echo "${ECHO_T}$cf_cv_ansi_cc" >&6
2455
2456 if test "$cf_cv_ansi_cc" != "no"; then
2457 if test ".$cf_cv_ansi_cc" != ".-DCC_HAS_PROTOS"; then
2458
2459 cf_fix_cppflags=no
2460 cf_new_cflags=
2461 cf_new_cppflags=
2462 cf_new_extra_cppflags=
2463
2464 for cf_add_cflags in $cf_cv_ansi_cc
2465 do
2466 case $cf_fix_cppflags in
2467 no)
2468         case $cf_add_cflags in #(vi
2469         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2470                 case $cf_add_cflags in
2471                 -D*)
2472                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2473
2474                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2475                                 && test -z "${cf_tst_cflags}" \
2476                                 && cf_fix_cppflags=yes
2477
2478                         if test $cf_fix_cppflags = yes ; then
2479                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2480                                 continue
2481                         elif test "${cf_tst_cflags}" = "\"'" ; then
2482                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2483                                 continue
2484                         fi
2485                         ;;
2486                 esac
2487                 case "$CPPFLAGS" in
2488                 *$cf_add_cflags) #(vi
2489                         ;;
2490                 *) #(vi
2491                         case $cf_add_cflags in #(vi
2492                         -D*)
2493                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2494
2495 CPPFLAGS=`echo "$CPPFLAGS" | \
2496         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2497                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2498
2499                                 ;;
2500                         esac
2501                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2502                         ;;
2503                 esac
2504                 ;;
2505         *)
2506                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2507                 ;;
2508         esac
2509         ;;
2510 yes)
2511         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2512
2513         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2514
2515         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2516                 && test -z "${cf_tst_cflags}" \
2517                 && cf_fix_cppflags=no
2518         ;;
2519 esac
2520 done
2521
2522 if test -n "$cf_new_cflags" ; then
2523
2524         CFLAGS="$CFLAGS $cf_new_cflags"
2525 fi
2526
2527 if test -n "$cf_new_cppflags" ; then
2528
2529         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
2530 fi
2531
2532 if test -n "$cf_new_extra_cppflags" ; then
2533
2534         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2535 fi
2536
2537 else
2538         cat >>confdefs.h <<\EOF
2539 #define CC_HAS_PROTOS 1
2540 EOF
2541
2542 fi
2543 fi
2544
2545 if test "$cf_cv_ansi_cc" = "no"; then
2546         { { echo "$as_me:2546: error: Your compiler does not appear to recognize prototypes.
2547 You have the following choices:
2548         a. adjust your compiler options
2549         b. get an up-to-date compiler
2550         c. use a wrapper such as unproto" >&5
2551 echo "$as_me: error: Your compiler does not appear to recognize prototypes.
2552 You have the following choices:
2553         a. adjust your compiler options
2554         b. get an up-to-date compiler
2555         c. use a wrapper such as unproto" >&2;}
2556    { (exit 1); exit 1; }; }
2557 fi
2558
2559 case $cf_cv_system_name in
2560 os2*)
2561     CFLAGS="$CFLAGS -Zmt"
2562     CPPFLAGS="$CPPFLAGS -D__ST_MT_ERRNO__"
2563     CXXFLAGS="$CXXFLAGS -Zmt"
2564     # autoconf's macro sets -Zexe and suffix both, which conflict:w
2565     LDFLAGS="$LDFLAGS -Zmt -Zcrtdll"
2566     ac_cv_exeext=.exe
2567     ;;
2568 esac
2569
2570 PROG_EXT="$EXEEXT"
2571
2572 test -n "$PROG_EXT" && cat >>confdefs.h <<EOF
2573 #define PROG_EXT "$PROG_EXT"
2574 EOF
2575
2576 test "$program_prefix" != NONE &&
2577   program_transform_name="s,^,$program_prefix,;$program_transform_name"
2578 # Use a double $ so make ignores it.
2579 test "$program_suffix" != NONE &&
2580   program_transform_name="s,\$,$program_suffix,;$program_transform_name"
2581 # Double any \ or $.  echo might interpret backslashes.
2582 # By default was `s,x,x', remove it if useless.
2583 cat <<\_ACEOF >conftest.sed
2584 s/[\\$]/&&/g;s/;s,x,x,$//
2585 _ACEOF
2586 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
2587 rm conftest.sed
2588
2589 for ac_prog in mawk gawk nawk awk
2590 do
2591   # Extract the first word of "$ac_prog", so it can be a program name with args.
2592 set dummy $ac_prog; ac_word=$2
2593 echo "$as_me:2593: checking for $ac_word" >&5
2594 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2595 if test "${ac_cv_prog_AWK+set}" = set; then
2596   echo $ECHO_N "(cached) $ECHO_C" >&6
2597 else
2598   if test -n "$AWK"; then
2599   ac_cv_prog_AWK="$AWK" # Let the user override the test.
2600 else
2601   ac_save_IFS=$IFS; IFS=$ac_path_separator
2602 ac_dummy="$PATH"
2603 for ac_dir in $ac_dummy; do
2604   IFS=$ac_save_IFS
2605   test -z "$ac_dir" && ac_dir=.
2606   $as_executable_p "$ac_dir/$ac_word" || continue
2607 ac_cv_prog_AWK="$ac_prog"
2608 echo "$as_me:2608: found $ac_dir/$ac_word" >&5
2609 break
2610 done
2611
2612 fi
2613 fi
2614 AWK=$ac_cv_prog_AWK
2615 if test -n "$AWK"; then
2616   echo "$as_me:2616: result: $AWK" >&5
2617 echo "${ECHO_T}$AWK" >&6
2618 else
2619   echo "$as_me:2619: result: no" >&5
2620 echo "${ECHO_T}no" >&6
2621 fi
2622
2623   test -n "$AWK" && break
2624 done
2625
2626 test -z "$AWK" && { { echo "$as_me:2626: error: No awk program found" >&5
2627 echo "$as_me: error: No awk program found" >&2;}
2628    { (exit 1); exit 1; }; }
2629
2630 echo "$as_me:2630: checking for egrep" >&5
2631 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
2632 if test "${ac_cv_prog_egrep+set}" = set; then
2633   echo $ECHO_N "(cached) $ECHO_C" >&6
2634 else
2635   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
2636     then ac_cv_prog_egrep='grep -E'
2637     else ac_cv_prog_egrep='egrep'
2638     fi
2639 fi
2640 echo "$as_me:2640: result: $ac_cv_prog_egrep" >&5
2641 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
2642  EGREP=$ac_cv_prog_egrep
2643
2644 test -z "$EGREP" && { { echo "$as_me:2644: error: No egrep program found" >&5
2645 echo "$as_me: error: No egrep program found" >&2;}
2646    { (exit 1); exit 1; }; }
2647
2648 # Find a good install program.  We prefer a C program (faster),
2649 # so one script is as good as another.  But avoid the broken or
2650 # incompatible versions:
2651 # SysV /etc/install, /usr/sbin/install
2652 # SunOS /usr/etc/install
2653 # IRIX /sbin/install
2654 # AIX /bin/install
2655 # AmigaOS /C/install, which installs bootblocks on floppy discs
2656 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2657 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2658 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2659 # ./install, which can be erroneously created by make from ./install.sh.
2660 echo "$as_me:2660: checking for a BSD compatible install" >&5
2661 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
2662 if test -z "$INSTALL"; then
2663 if test "${ac_cv_path_install+set}" = set; then
2664   echo $ECHO_N "(cached) $ECHO_C" >&6
2665 else
2666     ac_save_IFS=$IFS; IFS=$ac_path_separator
2667   for ac_dir in $PATH; do
2668     IFS=$ac_save_IFS
2669     # Account for people who put trailing slashes in PATH elements.
2670     case $ac_dir/ in
2671     / | ./ | .// | /cC/* \
2672     | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
2673     | /usr/ucb/* ) ;;
2674     *)
2675       # OSF1 and SCO ODT 3.0 have their own names for install.
2676       # Don't use installbsd from OSF since it installs stuff as root
2677       # by default.
2678       for ac_prog in ginstall scoinst install; do
2679         if $as_executable_p "$ac_dir/$ac_prog"; then
2680           if test $ac_prog = install &&
2681             grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2682             # AIX install.  It has an incompatible calling convention.
2683             :
2684           elif test $ac_prog = install &&
2685             grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2686             # program-specific install script used by HP pwplus--don't use.
2687             :
2688           else
2689             ac_cv_path_install="$ac_dir/$ac_prog -c"
2690             break 2
2691           fi
2692         fi
2693       done
2694       ;;
2695     esac
2696   done
2697
2698 fi
2699   if test "${ac_cv_path_install+set}" = set; then
2700     INSTALL=$ac_cv_path_install
2701   else
2702     # As a last resort, use the slow shell script.  We don't cache a
2703     # path for INSTALL within a source directory, because that will
2704     # break other packages using the cache if that directory is
2705     # removed, or if the path is relative.
2706     INSTALL=$ac_install_sh
2707   fi
2708 fi
2709 echo "$as_me:2709: result: $INSTALL" >&5
2710 echo "${ECHO_T}$INSTALL" >&6
2711
2712 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2713 # It thinks the first close brace ends the variable substitution.
2714 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2715
2716 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
2717
2718 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2719
2720 echo "$as_me:2720: checking whether ln -s works" >&5
2721 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
2722 LN_S=$as_ln_s
2723 if test "$LN_S" = "ln -s"; then
2724   echo "$as_me:2724: result: yes" >&5
2725 echo "${ECHO_T}yes" >&6
2726 else
2727   echo "$as_me:2727: result: no, using $LN_S" >&5
2728 echo "${ECHO_T}no, using $LN_S" >&6
2729 fi
2730
2731 echo "$as_me:2731: checking if $LN_S -f options work" >&5
2732 echo $ECHO_N "checking if $LN_S -f options work... $ECHO_C" >&6
2733
2734 rm -f conf$$.src conf$$dst
2735 echo >conf$$.dst
2736 echo first >conf$$.src
2737 if $LN_S -f conf$$.src conf$$.dst 2>/dev/null; then
2738         cf_prog_ln_sf=yes
2739 else
2740         cf_prog_ln_sf=no
2741 fi
2742 rm -f conf$$.dst conf$$src
2743 echo "$as_me:2743: result: $cf_prog_ln_sf" >&5
2744 echo "${ECHO_T}$cf_prog_ln_sf" >&6
2745
2746 test "$cf_prog_ln_sf" = yes && LN_S="$LN_S -f"
2747
2748 echo "$as_me:2748: checking for long file names" >&5
2749 echo $ECHO_N "checking for long file names... $ECHO_C" >&6
2750 if test "${ac_cv_sys_long_file_names+set}" = set; then
2751   echo $ECHO_N "(cached) $ECHO_C" >&6
2752 else
2753   ac_cv_sys_long_file_names=yes
2754 # Test for long file names in all the places we know might matter:
2755 #      .                the current directory, where building will happen
2756 #      $prefix/lib      where we will be installing things
2757 #      $exec_prefix/lib likewise
2758 # eval it to expand exec_prefix.
2759 #      $TMPDIR          if set, where it might want to write temporary files
2760 # if $TMPDIR is not set:
2761 #      /tmp             where it might want to write temporary files
2762 #      /var/tmp         likewise
2763 #      /usr/tmp         likewise
2764 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
2765   ac_tmpdirs=$TMPDIR
2766 else
2767   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
2768 fi
2769 for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
2770   test -d $ac_dir || continue
2771   test -w $ac_dir || continue # It is less confusing to not echo anything here.
2772   ac_xdir=$ac_dir/cf$$
2773   (umask 077 && mkdir $ac_xdir 2>/dev/null) || continue
2774   ac_tf1=$ac_xdir/conftest9012345
2775   ac_tf2=$ac_xdir/conftest9012346
2776   (echo 1 >$ac_tf1) 2>/dev/null
2777   (echo 2 >$ac_tf2) 2>/dev/null
2778   ac_val=`cat $ac_tf1 2>/dev/null`
2779   if test ! -f $ac_tf1 || test "$ac_val" != 1; then
2780     ac_cv_sys_long_file_names=no
2781     rm -rf $ac_xdir 2>/dev/null
2782     break
2783   fi
2784   rm -rf $ac_xdir 2>/dev/null
2785 done
2786 fi
2787 echo "$as_me:2787: result: $ac_cv_sys_long_file_names" >&5
2788 echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
2789 if test $ac_cv_sys_long_file_names = yes; then
2790
2791 cat >>confdefs.h <<\EOF
2792 #define HAVE_LONG_FILE_NAMES 1
2793 EOF
2794
2795 fi
2796
2797 # if we find pkg-config, check if we should install the ".pc" files.
2798
2799 echo "$as_me:2799: checking if you want to use pkg-config" >&5
2800 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
2801
2802 # Check whether --with-pkg-config or --without-pkg-config was given.
2803 if test "${with_pkg_config+set}" = set; then
2804   withval="$with_pkg_config"
2805   cf_pkg_config=$withval
2806 else
2807   cf_pkg_config=yes
2808 fi;
2809 echo "$as_me:2809: result: $cf_pkg_config" >&5
2810 echo "${ECHO_T}$cf_pkg_config" >&6
2811
2812 case $cf_pkg_config in #(vi
2813 no) #(vi
2814         PKG_CONFIG=none
2815         ;;
2816 yes) #(vi
2817
2818 if test -n "$ac_tool_prefix"; then
2819   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
2820 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
2821 echo "$as_me:2821: checking for $ac_word" >&5
2822 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2823 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
2824   echo $ECHO_N "(cached) $ECHO_C" >&6
2825 else
2826   case $PKG_CONFIG in
2827   [\\/]* | ?:[\\/]*)
2828   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
2829   ;;
2830   *)
2831   ac_save_IFS=$IFS; IFS=$ac_path_separator
2832 ac_dummy="$PATH"
2833 for ac_dir in $ac_dummy; do
2834   IFS=$ac_save_IFS
2835   test -z "$ac_dir" && ac_dir=.
2836   if $as_executable_p "$ac_dir/$ac_word"; then
2837    ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
2838    echo "$as_me:2838: found $ac_dir/$ac_word" >&5
2839    break
2840 fi
2841 done
2842
2843   ;;
2844 esac
2845 fi
2846 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
2847
2848 if test -n "$PKG_CONFIG"; then
2849   echo "$as_me:2849: result: $PKG_CONFIG" >&5
2850 echo "${ECHO_T}$PKG_CONFIG" >&6
2851 else
2852   echo "$as_me:2852: result: no" >&5
2853 echo "${ECHO_T}no" >&6
2854 fi
2855
2856 fi
2857 if test -z "$ac_cv_path_PKG_CONFIG"; then
2858   ac_pt_PKG_CONFIG=$PKG_CONFIG
2859   # Extract the first word of "pkg-config", so it can be a program name with args.
2860 set dummy pkg-config; ac_word=$2
2861 echo "$as_me:2861: checking for $ac_word" >&5
2862 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2863 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
2864   echo $ECHO_N "(cached) $ECHO_C" >&6
2865 else
2866   case $ac_pt_PKG_CONFIG in
2867   [\\/]* | ?:[\\/]*)
2868   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
2869   ;;
2870   *)
2871   ac_save_IFS=$IFS; IFS=$ac_path_separator
2872 ac_dummy="$PATH"
2873 for ac_dir in $ac_dummy; do
2874   IFS=$ac_save_IFS
2875   test -z "$ac_dir" && ac_dir=.
2876   if $as_executable_p "$ac_dir/$ac_word"; then
2877    ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
2878    echo "$as_me:2878: found $ac_dir/$ac_word" >&5
2879    break
2880 fi
2881 done
2882
2883   test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
2884   ;;
2885 esac
2886 fi
2887 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
2888
2889 if test -n "$ac_pt_PKG_CONFIG"; then
2890   echo "$as_me:2890: result: $ac_pt_PKG_CONFIG" >&5
2891 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
2892 else
2893   echo "$as_me:2893: result: no" >&5
2894 echo "${ECHO_T}no" >&6
2895 fi
2896
2897   PKG_CONFIG=$ac_pt_PKG_CONFIG
2898 else
2899   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
2900 fi
2901
2902         ;;
2903 *)
2904         PKG_CONFIG=$withval
2905         ;;
2906 esac
2907
2908 test -z "$PKG_CONFIG" && PKG_CONFIG=none
2909 if test "$PKG_CONFIG" != none ; then
2910
2911 if test "x$prefix" != xNONE; then
2912   cf_path_syntax="$prefix"
2913 else
2914   cf_path_syntax="$ac_default_prefix"
2915 fi
2916
2917 case ".$PKG_CONFIG" in #(vi
2918 .\$\(*\)*|.\'*\'*) #(vi
2919   ;;
2920 ..|./*|.\\*) #(vi
2921   ;;
2922 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
2923   ;;
2924 .\${*prefix}*) #(vi
2925   eval PKG_CONFIG="$PKG_CONFIG"
2926   case ".$PKG_CONFIG" in #(vi
2927   .NONE/*)
2928     PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
2929     ;;
2930   esac
2931   ;; #(vi
2932 .no|.NONE/*)
2933   PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
2934   ;;
2935 *)
2936   { { echo "$as_me:2936: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
2937 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
2938    { (exit 1); exit 1; }; }
2939   ;;
2940 esac
2941
2942 fi
2943
2944 if test "$PKG_CONFIG" != none ; then
2945         echo "$as_me:2945: checking for $PKG_CONFIG library directory" >&5
2946 echo $ECHO_N "checking for $PKG_CONFIG library directory... $ECHO_C" >&6
2947
2948 # Check whether --with-pkg-config-libdir or --without-pkg-config-libdir was given.
2949 if test "${with_pkg_config_libdir+set}" = set; then
2950   withval="$with_pkg_config_libdir"
2951   PKG_CONFIG_LIBDIR=$withval
2952 else
2953   PKG_CONFIG_LIBDIR=yes
2954 fi;
2955
2956         case x$PKG_CONFIG_LIBDIR in #(vi
2957         x/*) #(vi
2958                 ;;
2959         xyes) #(vi
2960                 # look for the library directory using the same prefix as the executable
2961                 cf_path=`echo "$PKG_CONFIG" | sed -e 's,/[^/]*/[^/]*$,,'`
2962                 case x`(arch) 2>/dev/null` in #(vi
2963                 *64) #(vi
2964                         for cf_config in $cf_path/share $cf_path/lib64 $cf_path/lib32 $cf_path/lib
2965                         do
2966                                 if test -d $cf_config/pkgconfig
2967                                 then
2968                                         PKG_CONFIG_LIBDIR=$cf_config/pkgconfig
2969                                         break
2970                                 fi
2971                         done
2972                         ;;
2973                 *)
2974                         PKG_CONFIG_LIBDIR=$cf_path/lib/pkgconfig
2975                         ;;
2976                 esac
2977                 ;;
2978         *)
2979                 ;;
2980         esac
2981
2982         echo "$as_me:2982: result: $PKG_CONFIG_LIBDIR" >&5
2983 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
2984 fi
2985
2986 if test "$PKG_CONFIG" != none ; then
2987         if test -n "$PKG_CONFIG_LIBDIR" && test -d "$PKG_CONFIG_LIBDIR" ; then
2988                 echo "$as_me:2988: checking if we should install .pc files for $PKG_CONFIG" >&5
2989 echo $ECHO_N "checking if we should install .pc files for $PKG_CONFIG... $ECHO_C" >&6
2990
2991 # Check whether --enable-pc-files or --disable-pc-files was given.
2992 if test "${enable_pc_files+set}" = set; then
2993   enableval="$enable_pc_files"
2994   enable_pc_files=$enableval
2995 else
2996   enable_pc_files=no
2997 fi;
2998                 echo "$as_me:2998: result: $enable_pc_files" >&5
2999 echo "${ECHO_T}$enable_pc_files" >&6
3000         elif test -z "$PKG_CONFIG_LIBDIR" || test "$PKG_CONFIG_LIBDIR" != no; then
3001                 enable_pc_files=no
3002                 { echo "$as_me:3002: WARNING: did not find $PKG_CONFIG library" >&5
3003 echo "$as_me: WARNING: did not find $PKG_CONFIG library" >&2;}
3004         fi
3005 else
3006         enable_pc_files=no
3007 fi
3008
3009 echo "$as_me:3009: checking if you want to build test-programs" >&5
3010 echo $ECHO_N "checking if you want to build test-programs... $ECHO_C" >&6
3011
3012 # Check whether --with-tests or --without-tests was given.
3013 if test "${with_tests+set}" = set; then
3014   withval="$with_tests"
3015   cf_with_tests=$withval
3016 else
3017   cf_with_tests=yes
3018 fi;
3019 echo "$as_me:3019: result: $cf_with_tests" >&5
3020 echo "${ECHO_T}$cf_with_tests" >&6
3021
3022 echo "$as_me:3022: checking if we should assume mixed-case filenames" >&5
3023 echo $ECHO_N "checking if we should assume mixed-case filenames... $ECHO_C" >&6
3024
3025 # Check whether --enable-mixed-case or --disable-mixed-case was given.
3026 if test "${enable_mixed_case+set}" = set; then
3027   enableval="$enable_mixed_case"
3028   enable_mixedcase=$enableval
3029 else
3030   enable_mixedcase=auto
3031 fi;
3032 echo "$as_me:3032: result: $enable_mixedcase" >&5
3033 echo "${ECHO_T}$enable_mixedcase" >&6
3034 if test "$enable_mixedcase" = "auto" ; then
3035
3036 echo "$as_me:3036: checking if filesystem supports mixed-case filenames" >&5
3037 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
3038 if test "${cf_cv_mixedcase+set}" = set; then
3039   echo $ECHO_N "(cached) $ECHO_C" >&6
3040 else
3041
3042 if test "$cross_compiling" = yes ; then
3043         case $target_alias in #(vi
3044         *-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-mingw32*|*-uwin*) #(vi
3045                 cf_cv_mixedcase=no
3046                 ;;
3047         *)
3048                 cf_cv_mixedcase=yes
3049                 ;;
3050         esac
3051 else
3052         rm -f conftest CONFTEST
3053         echo test >conftest
3054         if test -f CONFTEST ; then
3055                 cf_cv_mixedcase=no
3056         else
3057                 cf_cv_mixedcase=yes
3058         fi
3059         rm -f conftest CONFTEST
3060 fi
3061
3062 fi
3063 echo "$as_me:3063: result: $cf_cv_mixedcase" >&5
3064 echo "${ECHO_T}$cf_cv_mixedcase" >&6
3065 test "$cf_cv_mixedcase" = yes && cat >>confdefs.h <<\EOF
3066 #define MIXEDCASE_FILENAMES 1
3067 EOF
3068
3069 else
3070     cf_cv_mixedcase=$enable_mixedcase
3071     if test "$enable_mixedcase" = "yes" ; then
3072         cat >>confdefs.h <<\EOF
3073 #define MIXEDCASE_FILENAMES 1
3074 EOF
3075
3076     fi
3077 fi
3078
3079 # do this after mixed-case option (tags/TAGS is not as important as tic).
3080 echo "$as_me:3080: checking whether ${MAKE-make} sets \${MAKE}" >&5
3081 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
3082 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
3083 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
3084   echo $ECHO_N "(cached) $ECHO_C" >&6
3085 else
3086   cat >conftest.make <<\EOF
3087 all:
3088         @echo 'ac_maketemp="${MAKE}"'
3089 EOF
3090 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3091 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
3092 if test -n "$ac_maketemp"; then
3093   eval ac_cv_prog_make_${ac_make}_set=yes
3094 else
3095   eval ac_cv_prog_make_${ac_make}_set=no
3096 fi
3097 rm -f conftest.make
3098 fi
3099 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
3100   echo "$as_me:3100: result: yes" >&5
3101 echo "${ECHO_T}yes" >&6
3102   SET_MAKE=
3103 else
3104   echo "$as_me:3104: result: no" >&5
3105 echo "${ECHO_T}no" >&6
3106   SET_MAKE="MAKE=${MAKE-make}"
3107 fi
3108
3109 for ac_prog in exctags ctags
3110 do
3111   # Extract the first word of "$ac_prog", so it can be a program name with args.
3112 set dummy $ac_prog; ac_word=$2
3113 echo "$as_me:3113: checking for $ac_word" >&5
3114 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3115 if test "${ac_cv_prog_CTAGS+set}" = set; then
3116   echo $ECHO_N "(cached) $ECHO_C" >&6
3117 else
3118   if test -n "$CTAGS"; then
3119   ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
3120 else
3121   ac_save_IFS=$IFS; IFS=$ac_path_separator
3122 ac_dummy="$PATH"
3123 for ac_dir in $ac_dummy; do
3124   IFS=$ac_save_IFS
3125   test -z "$ac_dir" && ac_dir=.
3126   $as_executable_p "$ac_dir/$ac_word" || continue
3127 ac_cv_prog_CTAGS="$ac_prog"
3128 echo "$as_me:3128: found $ac_dir/$ac_word" >&5
3129 break
3130 done
3131
3132 fi
3133 fi
3134 CTAGS=$ac_cv_prog_CTAGS
3135 if test -n "$CTAGS"; then
3136   echo "$as_me:3136: result: $CTAGS" >&5
3137 echo "${ECHO_T}$CTAGS" >&6
3138 else
3139   echo "$as_me:3139: result: no" >&5
3140 echo "${ECHO_T}no" >&6
3141 fi
3142
3143   test -n "$CTAGS" && break
3144 done
3145
3146 for ac_prog in exetags etags
3147 do
3148   # Extract the first word of "$ac_prog", so it can be a program name with args.
3149 set dummy $ac_prog; ac_word=$2
3150 echo "$as_me:3150: checking for $ac_word" >&5
3151 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3152 if test "${ac_cv_prog_ETAGS+set}" = set; then
3153   echo $ECHO_N "(cached) $ECHO_C" >&6
3154 else
3155   if test -n "$ETAGS"; then
3156   ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
3157 else
3158   ac_save_IFS=$IFS; IFS=$ac_path_separator
3159 ac_dummy="$PATH"
3160 for ac_dir in $ac_dummy; do
3161   IFS=$ac_save_IFS
3162   test -z "$ac_dir" && ac_dir=.
3163   $as_executable_p "$ac_dir/$ac_word" || continue
3164 ac_cv_prog_ETAGS="$ac_prog"
3165 echo "$as_me:3165: found $ac_dir/$ac_word" >&5
3166 break
3167 done
3168
3169 fi
3170 fi
3171 ETAGS=$ac_cv_prog_ETAGS
3172 if test -n "$ETAGS"; then
3173   echo "$as_me:3173: result: $ETAGS" >&5
3174 echo "${ECHO_T}$ETAGS" >&6
3175 else
3176   echo "$as_me:3176: result: no" >&5
3177 echo "${ECHO_T}no" >&6
3178 fi
3179
3180   test -n "$ETAGS" && break
3181 done
3182
3183 # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
3184 set dummy ${CTAGS:-ctags}; ac_word=$2
3185 echo "$as_me:3185: checking for $ac_word" >&5
3186 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3187 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
3188   echo $ECHO_N "(cached) $ECHO_C" >&6
3189 else
3190   if test -n "$MAKE_LOWER_TAGS"; then
3191   ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
3192 else
3193   ac_save_IFS=$IFS; IFS=$ac_path_separator
3194 ac_dummy="$PATH"
3195 for ac_dir in $ac_dummy; do
3196   IFS=$ac_save_IFS
3197   test -z "$ac_dir" && ac_dir=.
3198   $as_executable_p "$ac_dir/$ac_word" || continue
3199 ac_cv_prog_MAKE_LOWER_TAGS="yes"
3200 echo "$as_me:3200: found $ac_dir/$ac_word" >&5
3201 break
3202 done
3203
3204   test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
3205 fi
3206 fi
3207 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
3208 if test -n "$MAKE_LOWER_TAGS"; then
3209   echo "$as_me:3209: result: $MAKE_LOWER_TAGS" >&5
3210 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
3211 else
3212   echo "$as_me:3212: result: no" >&5
3213 echo "${ECHO_T}no" >&6
3214 fi
3215
3216 if test "$cf_cv_mixedcase" = yes ; then
3217         # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
3218 set dummy ${ETAGS:-etags}; ac_word=$2
3219 echo "$as_me:3219: checking for $ac_word" >&5
3220 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3221 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
3222   echo $ECHO_N "(cached) $ECHO_C" >&6
3223 else
3224   if test -n "$MAKE_UPPER_TAGS"; then
3225   ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
3226 else
3227   ac_save_IFS=$IFS; IFS=$ac_path_separator
3228 ac_dummy="$PATH"
3229 for ac_dir in $ac_dummy; do
3230   IFS=$ac_save_IFS
3231   test -z "$ac_dir" && ac_dir=.
3232   $as_executable_p "$ac_dir/$ac_word" || continue
3233 ac_cv_prog_MAKE_UPPER_TAGS="yes"
3234 echo "$as_me:3234: found $ac_dir/$ac_word" >&5
3235 break
3236 done
3237
3238   test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
3239 fi
3240 fi
3241 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
3242 if test -n "$MAKE_UPPER_TAGS"; then
3243   echo "$as_me:3243: result: $MAKE_UPPER_TAGS" >&5
3244 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
3245 else
3246   echo "$as_me:3246: result: no" >&5
3247 echo "${ECHO_T}no" >&6
3248 fi
3249
3250 else
3251         MAKE_UPPER_TAGS=no
3252 fi
3253
3254 if test "$MAKE_UPPER_TAGS" = yes ; then
3255         MAKE_UPPER_TAGS=
3256 else
3257         MAKE_UPPER_TAGS="#"
3258 fi
3259
3260 if test "$MAKE_LOWER_TAGS" = yes ; then
3261         MAKE_LOWER_TAGS=
3262 else
3263         MAKE_LOWER_TAGS="#"
3264 fi
3265
3266 echo "$as_me:3266: checking for makeflags variable" >&5
3267 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
3268 if test "${cf_cv_makeflags+set}" = set; then
3269   echo $ECHO_N "(cached) $ECHO_C" >&6
3270 else
3271
3272         cf_cv_makeflags=''
3273         for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
3274         do
3275                 cat >cf_makeflags.tmp <<CF_EOF
3276 SHELL = /bin/sh
3277 all :
3278         @ echo '.$cf_option'
3279 CF_EOF
3280                 cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp 2>/dev/null | fgrep -v "ing directory" | sed -e 's,[    ]*$,,'`
3281                 case "$cf_result" in
3282                 .*k)
3283                         cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`
3284                         case "$cf_result" in
3285                         .*CC=*) cf_cv_makeflags=
3286                                 ;;
3287                         *)      cf_cv_makeflags=$cf_option
3288                                 ;;
3289                         esac
3290                         break
3291                         ;;
3292                 .-)     ;;
3293                 *)      echo "given option \"$cf_option\", no match \"$cf_result\""
3294                         ;;
3295                 esac
3296         done
3297         rm -f cf_makeflags.tmp
3298
3299 fi
3300 echo "$as_me:3300: result: $cf_cv_makeflags" >&5
3301 echo "${ECHO_T}$cf_cv_makeflags" >&6
3302
3303 if test -n "$ac_tool_prefix"; then
3304   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3305 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3306 echo "$as_me:3306: checking for $ac_word" >&5
3307 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3308 if test "${ac_cv_prog_RANLIB+set}" = set; then
3309   echo $ECHO_N "(cached) $ECHO_C" >&6
3310 else
3311   if test -n "$RANLIB"; then
3312   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3313 else
3314   ac_save_IFS=$IFS; IFS=$ac_path_separator
3315 ac_dummy="$PATH"
3316 for ac_dir in $ac_dummy; do
3317   IFS=$ac_save_IFS
3318   test -z "$ac_dir" && ac_dir=.
3319   $as_executable_p "$ac_dir/$ac_word" || continue
3320 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3321 echo "$as_me:3321: found $ac_dir/$ac_word" >&5
3322 break
3323 done
3324
3325 fi
3326 fi
3327 RANLIB=$ac_cv_prog_RANLIB
3328 if test -n "$RANLIB"; then
3329   echo "$as_me:3329: result: $RANLIB" >&5
3330 echo "${ECHO_T}$RANLIB" >&6
3331 else
3332   echo "$as_me:3332: result: no" >&5
3333 echo "${ECHO_T}no" >&6
3334 fi
3335
3336 fi
3337 if test -z "$ac_cv_prog_RANLIB"; then
3338   ac_ct_RANLIB=$RANLIB
3339   # Extract the first word of "ranlib", so it can be a program name with args.
3340 set dummy ranlib; ac_word=$2
3341 echo "$as_me:3341: checking for $ac_word" >&5
3342 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3343 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
3344   echo $ECHO_N "(cached) $ECHO_C" >&6
3345 else
3346   if test -n "$ac_ct_RANLIB"; then
3347   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
3348 else
3349   ac_save_IFS=$IFS; IFS=$ac_path_separator
3350 ac_dummy="$PATH"
3351 for ac_dir in $ac_dummy; do
3352   IFS=$ac_save_IFS
3353   test -z "$ac_dir" && ac_dir=.
3354   $as_executable_p "$ac_dir/$ac_word" || continue
3355 ac_cv_prog_ac_ct_RANLIB="ranlib"
3356 echo "$as_me:3356: found $ac_dir/$ac_word" >&5
3357 break
3358 done
3359
3360   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
3361 fi
3362 fi
3363 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3364 if test -n "$ac_ct_RANLIB"; then
3365   echo "$as_me:3365: result: $ac_ct_RANLIB" >&5
3366 echo "${ECHO_T}$ac_ct_RANLIB" >&6
3367 else
3368   echo "$as_me:3368: result: no" >&5
3369 echo "${ECHO_T}no" >&6
3370 fi
3371
3372   RANLIB=$ac_ct_RANLIB
3373 else
3374   RANLIB="$ac_cv_prog_RANLIB"
3375 fi
3376
3377 if test -n "$ac_tool_prefix"; then
3378   # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
3379 set dummy ${ac_tool_prefix}ld; ac_word=$2
3380 echo "$as_me:3380: checking for $ac_word" >&5
3381 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3382 if test "${ac_cv_prog_LD+set}" = set; then
3383   echo $ECHO_N "(cached) $ECHO_C" >&6
3384 else
3385   if test -n "$LD"; then
3386   ac_cv_prog_LD="$LD" # Let the user override the test.
3387 else
3388   ac_save_IFS=$IFS; IFS=$ac_path_separator
3389 ac_dummy="$PATH"
3390 for ac_dir in $ac_dummy; do
3391   IFS=$ac_save_IFS
3392   test -z "$ac_dir" && ac_dir=.
3393   $as_executable_p "$ac_dir/$ac_word" || continue
3394 ac_cv_prog_LD="${ac_tool_prefix}ld"
3395 echo "$as_me:3395: found $ac_dir/$ac_word" >&5
3396 break
3397 done
3398
3399 fi
3400 fi
3401 LD=$ac_cv_prog_LD
3402 if test -n "$LD"; then
3403   echo "$as_me:3403: result: $LD" >&5
3404 echo "${ECHO_T}$LD" >&6
3405 else
3406   echo "$as_me:3406: result: no" >&5
3407 echo "${ECHO_T}no" >&6
3408 fi
3409
3410 fi
3411 if test -z "$ac_cv_prog_LD"; then
3412   ac_ct_LD=$LD
3413   # Extract the first word of "ld", so it can be a program name with args.
3414 set dummy ld; ac_word=$2
3415 echo "$as_me:3415: checking for $ac_word" >&5
3416 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3417 if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
3418   echo $ECHO_N "(cached) $ECHO_C" >&6
3419 else
3420   if test -n "$ac_ct_LD"; then
3421   ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
3422 else
3423   ac_save_IFS=$IFS; IFS=$ac_path_separator
3424 ac_dummy="$PATH"
3425 for ac_dir in $ac_dummy; do
3426   IFS=$ac_save_IFS
3427   test -z "$ac_dir" && ac_dir=.
3428   $as_executable_p "$ac_dir/$ac_word" || continue
3429 ac_cv_prog_ac_ct_LD="ld"
3430 echo "$as_me:3430: found $ac_dir/$ac_word" >&5
3431 break
3432 done
3433
3434   test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
3435 fi
3436 fi
3437 ac_ct_LD=$ac_cv_prog_ac_ct_LD
3438 if test -n "$ac_ct_LD"; then
3439   echo "$as_me:3439: result: $ac_ct_LD" >&5
3440 echo "${ECHO_T}$ac_ct_LD" >&6
3441 else
3442   echo "$as_me:3442: result: no" >&5
3443 echo "${ECHO_T}no" >&6
3444 fi
3445
3446   LD=$ac_ct_LD
3447 else
3448   LD="$ac_cv_prog_LD"
3449 fi
3450
3451 if test -n "$ac_tool_prefix"; then
3452   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
3453 set dummy ${ac_tool_prefix}ar; ac_word=$2
3454 echo "$as_me:3454: checking for $ac_word" >&5
3455 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3456 if test "${ac_cv_prog_AR+set}" = set; then
3457   echo $ECHO_N "(cached) $ECHO_C" >&6
3458 else
3459   if test -n "$AR"; then
3460   ac_cv_prog_AR="$AR" # Let the user override the test.
3461 else
3462   ac_save_IFS=$IFS; IFS=$ac_path_separator
3463 ac_dummy="$PATH"
3464 for ac_dir in $ac_dummy; do
3465   IFS=$ac_save_IFS
3466   test -z "$ac_dir" && ac_dir=.
3467   $as_executable_p "$ac_dir/$ac_word" || continue
3468 ac_cv_prog_AR="${ac_tool_prefix}ar"
3469 echo "$as_me:3469: found $ac_dir/$ac_word" >&5
3470 break
3471 done
3472
3473 fi
3474 fi
3475 AR=$ac_cv_prog_AR
3476 if test -n "$AR"; then
3477   echo "$as_me:3477: result: $AR" >&5
3478 echo "${ECHO_T}$AR" >&6
3479 else
3480   echo "$as_me:3480: result: no" >&5
3481 echo "${ECHO_T}no" >&6
3482 fi
3483
3484 fi
3485 if test -z "$ac_cv_prog_AR"; then
3486   ac_ct_AR=$AR
3487   # Extract the first word of "ar", so it can be a program name with args.
3488 set dummy ar; ac_word=$2
3489 echo "$as_me:3489: checking for $ac_word" >&5
3490 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3491 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
3492   echo $ECHO_N "(cached) $ECHO_C" >&6
3493 else
3494   if test -n "$ac_ct_AR"; then
3495   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
3496 else
3497   ac_save_IFS=$IFS; IFS=$ac_path_separator
3498 ac_dummy="$PATH"
3499 for ac_dir in $ac_dummy; do
3500   IFS=$ac_save_IFS
3501   test -z "$ac_dir" && ac_dir=.
3502   $as_executable_p "$ac_dir/$ac_word" || continue
3503 ac_cv_prog_ac_ct_AR="ar"
3504 echo "$as_me:3504: found $ac_dir/$ac_word" >&5
3505 break
3506 done
3507
3508   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
3509 fi
3510 fi
3511 ac_ct_AR=$ac_cv_prog_ac_ct_AR
3512 if test -n "$ac_ct_AR"; then
3513   echo "$as_me:3513: result: $ac_ct_AR" >&5
3514 echo "${ECHO_T}$ac_ct_AR" >&6
3515 else
3516   echo "$as_me:3516: result: no" >&5
3517 echo "${ECHO_T}no" >&6
3518 fi
3519
3520   AR=$ac_ct_AR
3521 else
3522   AR="$ac_cv_prog_AR"
3523 fi
3524
3525 if test -n "$ac_tool_prefix"; then
3526   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
3527 set dummy ${ac_tool_prefix}ar; ac_word=$2
3528 echo "$as_me:3528: checking for $ac_word" >&5
3529 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3530 if test "${ac_cv_prog_AR+set}" = set; then
3531   echo $ECHO_N "(cached) $ECHO_C" >&6
3532 else
3533   if test -n "$AR"; then
3534   ac_cv_prog_AR="$AR" # Let the user override the test.
3535 else
3536   ac_save_IFS=$IFS; IFS=$ac_path_separator
3537 ac_dummy="$PATH"
3538 for ac_dir in $ac_dummy; do
3539   IFS=$ac_save_IFS
3540   test -z "$ac_dir" && ac_dir=.
3541   $as_executable_p "$ac_dir/$ac_word" || continue
3542 ac_cv_prog_AR="${ac_tool_prefix}ar"
3543 echo "$as_me:3543: found $ac_dir/$ac_word" >&5
3544 break
3545 done
3546
3547 fi
3548 fi
3549 AR=$ac_cv_prog_AR
3550 if test -n "$AR"; then
3551   echo "$as_me:3551: result: $AR" >&5
3552 echo "${ECHO_T}$AR" >&6
3553 else
3554   echo "$as_me:3554: result: no" >&5
3555 echo "${ECHO_T}no" >&6
3556 fi
3557
3558 fi
3559 if test -z "$ac_cv_prog_AR"; then
3560   ac_ct_AR=$AR
3561   # Extract the first word of "ar", so it can be a program name with args.
3562 set dummy ar; ac_word=$2
3563 echo "$as_me:3563: checking for $ac_word" >&5
3564 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3565 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
3566   echo $ECHO_N "(cached) $ECHO_C" >&6
3567 else
3568   if test -n "$ac_ct_AR"; then
3569   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
3570 else
3571   ac_save_IFS=$IFS; IFS=$ac_path_separator
3572 ac_dummy="$PATH"
3573 for ac_dir in $ac_dummy; do
3574   IFS=$ac_save_IFS
3575   test -z "$ac_dir" && ac_dir=.
3576   $as_executable_p "$ac_dir/$ac_word" || continue
3577 ac_cv_prog_ac_ct_AR="ar"
3578 echo "$as_me:3578: found $ac_dir/$ac_word" >&5
3579 break
3580 done
3581
3582   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
3583 fi
3584 fi
3585 ac_ct_AR=$ac_cv_prog_ac_ct_AR
3586 if test -n "$ac_ct_AR"; then
3587   echo "$as_me:3587: result: $ac_ct_AR" >&5
3588 echo "${ECHO_T}$ac_ct_AR" >&6
3589 else
3590   echo "$as_me:3590: result: no" >&5
3591 echo "${ECHO_T}no" >&6
3592 fi
3593
3594   AR=$ac_ct_AR
3595 else
3596   AR="$ac_cv_prog_AR"
3597 fi
3598
3599 echo "$as_me:3599: checking for options to update archives" >&5
3600 echo $ECHO_N "checking for options to update archives... $ECHO_C" >&6
3601 if test "${cf_cv_ar_flags+set}" = set; then
3602   echo $ECHO_N "(cached) $ECHO_C" >&6
3603 else
3604
3605         cf_cv_ar_flags=unknown
3606         for cf_ar_flags in -curv curv -crv crv -cqv cqv -rv rv
3607         do
3608
3609                 # check if $ARFLAGS already contains this choice
3610                 if test "x$ARFLAGS" != "x" ; then
3611                         cf_check_ar_flags=`echo "x$ARFLAGS" | sed -e "s/$cf_ar_flags\$//" -e "s/$cf_ar_flags / /"`
3612                         if test "x$ARFLAGS" != "$cf_check_ar_flags" ; then
3613                                 cf_cv_ar_flags=
3614                                 break
3615                         fi
3616                 fi
3617
3618                 rm -f conftest.$ac_cv_objext
3619                 rm -f conftest.a
3620
3621                 cat >conftest.$ac_ext <<EOF
3622 #line 3622 "configure"
3623 int     testdata[3] = { 123, 456, 789 };
3624 EOF
3625                 if { (eval echo "$as_me:3625: \"$ac_compile\"") >&5
3626   (eval $ac_compile) 2>&5
3627   ac_status=$?
3628   echo "$as_me:3628: \$? = $ac_status" >&5
3629   (exit $ac_status); } ; then
3630                         echo "$AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext" >&5
3631                         $AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext 2>&5 1>/dev/null
3632                         if test -f conftest.a ; then
3633                                 cf_cv_ar_flags=$cf_ar_flags
3634                                 break
3635                         fi
3636                 else
3637                         test -n "$verbose" && echo "    cannot compile test-program" 1>&6
3638
3639 echo "${as_me:-configure}:3639: testing cannot compile test-program ..." 1>&5
3640
3641                         break
3642                 fi
3643         done
3644         rm -f conftest.a conftest.$ac_ext conftest.$ac_cv_objext
3645
3646 fi
3647 echo "$as_me:3647: result: $cf_cv_ar_flags" >&5
3648 echo "${ECHO_T}$cf_cv_ar_flags" >&6
3649
3650 if test -n "$ARFLAGS" ; then
3651         if test -n "$cf_cv_ar_flags" ; then
3652                 ARFLAGS="$ARFLAGS $cf_cv_ar_flags"
3653         fi
3654 else
3655         ARFLAGS=$cf_cv_ar_flags
3656 fi
3657
3658 echo "$as_me:3658: checking if you have specified an install-prefix" >&5
3659 echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
3660
3661 # Check whether --with-install-prefix or --without-install-prefix was given.
3662 if test "${with_install_prefix+set}" = set; then
3663   withval="$with_install_prefix"
3664   case "$withval" in #(vi
3665         yes|no) #(vi
3666                 ;;
3667         *)      DESTDIR="$withval"
3668                 ;;
3669         esac
3670 fi;
3671 echo "$as_me:3671: result: $DESTDIR" >&5
3672 echo "${ECHO_T}$DESTDIR" >&6
3673
3674 ###############################################################################
3675
3676 # If we're cross-compiling, allow the user to override the tools and their
3677 # options.  The configure script is oriented toward identifying the host
3678 # compiler, etc., but we need a build compiler to generate parts of the source.
3679
3680 if test "$cross_compiling" = yes ; then
3681
3682         # defaults that we might want to override
3683         : ${BUILD_CFLAGS:=''}
3684         : ${BUILD_CPPFLAGS:=''}
3685         : ${BUILD_LDFLAGS:=''}
3686         : ${BUILD_LIBS:=''}
3687         : ${BUILD_EXEEXT:='$x'}
3688         : ${BUILD_OBJEXT:='o'}
3689
3690 # Check whether --with-build-cc or --without-build-cc was given.
3691 if test "${with_build_cc+set}" = set; then
3692   withval="$with_build_cc"
3693   BUILD_CC="$withval"
3694 else
3695   for ac_prog in gcc cc cl
3696 do
3697   # Extract the first word of "$ac_prog", so it can be a program name with args.
3698 set dummy $ac_prog; ac_word=$2
3699 echo "$as_me:3699: checking for $ac_word" >&5
3700 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3701 if test "${ac_cv_prog_BUILD_CC+set}" = set; then
3702   echo $ECHO_N "(cached) $ECHO_C" >&6
3703 else
3704   if test -n "$BUILD_CC"; then
3705   ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
3706 else
3707   ac_save_IFS=$IFS; IFS=$ac_path_separator
3708 ac_dummy="$PATH"
3709 for ac_dir in $ac_dummy; do
3710   IFS=$ac_save_IFS
3711   test -z "$ac_dir" && ac_dir=.
3712   $as_executable_p "$ac_dir/$ac_word" || continue
3713 ac_cv_prog_BUILD_CC="$ac_prog"
3714 echo "$as_me:3714: found $ac_dir/$ac_word" >&5
3715 break
3716 done
3717
3718 fi
3719 fi
3720 BUILD_CC=$ac_cv_prog_BUILD_CC
3721 if test -n "$BUILD_CC"; then
3722   echo "$as_me:3722: result: $BUILD_CC" >&5
3723 echo "${ECHO_T}$BUILD_CC" >&6
3724 else
3725   echo "$as_me:3725: result: no" >&5
3726 echo "${ECHO_T}no" >&6
3727 fi
3728
3729   test -n "$BUILD_CC" && break
3730 done
3731
3732 fi;
3733         echo "$as_me:3733: checking for native build C compiler" >&5
3734 echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
3735         echo "$as_me:3735: result: $BUILD_CC" >&5
3736 echo "${ECHO_T}$BUILD_CC" >&6
3737
3738         echo "$as_me:3738: checking for native build C preprocessor" >&5
3739 echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
3740
3741 # Check whether --with-build-cpp or --without-build-cpp was given.
3742 if test "${with_build_cpp+set}" = set; then
3743   withval="$with_build_cpp"
3744   BUILD_CPP="$withval"
3745 else
3746   BUILD_CPP='${BUILD_CC} -E'
3747 fi;
3748         echo "$as_me:3748: result: $BUILD_CPP" >&5
3749 echo "${ECHO_T}$BUILD_CPP" >&6
3750
3751         echo "$as_me:3751: checking for native build C flags" >&5
3752 echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
3753
3754 # Check whether --with-build-cflags or --without-build-cflags was given.
3755 if test "${with_build_cflags+set}" = set; then
3756   withval="$with_build_cflags"
3757   BUILD_CFLAGS="$withval"
3758 fi;
3759         echo "$as_me:3759: result: $BUILD_CFLAGS" >&5
3760 echo "${ECHO_T}$BUILD_CFLAGS" >&6
3761
3762         echo "$as_me:3762: checking for native build C preprocessor-flags" >&5
3763 echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
3764
3765 # Check whether --with-build-cppflags or --without-build-cppflags was given.
3766 if test "${with_build_cppflags+set}" = set; then
3767   withval="$with_build_cppflags"
3768   BUILD_CPPFLAGS="$withval"
3769 fi;
3770         echo "$as_me:3770: result: $BUILD_CPPFLAGS" >&5
3771 echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
3772
3773         echo "$as_me:3773: checking for native build linker-flags" >&5
3774 echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
3775
3776 # Check whether --with-build-ldflags or --without-build-ldflags was given.
3777 if test "${with_build_ldflags+set}" = set; then
3778   withval="$with_build_ldflags"
3779   BUILD_LDFLAGS="$withval"
3780 fi;
3781         echo "$as_me:3781: result: $BUILD_LDFLAGS" >&5
3782 echo "${ECHO_T}$BUILD_LDFLAGS" >&6
3783
3784         echo "$as_me:3784: checking for native build linker-libraries" >&5
3785 echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
3786
3787 # Check whether --with-build-libs or --without-build-libs was given.
3788 if test "${with_build_libs+set}" = set; then
3789   withval="$with_build_libs"
3790   BUILD_LIBS="$withval"
3791 fi;
3792         echo "$as_me:3792: result: $BUILD_LIBS" >&5
3793 echo "${ECHO_T}$BUILD_LIBS" >&6
3794
3795         # this assumes we're on Unix.
3796         BUILD_EXEEXT=
3797         BUILD_OBJEXT=o
3798
3799         : ${BUILD_CC:='${CC}'}
3800
3801         if ( test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '${CC}' ) ; then
3802                 { { echo "$as_me:3802: error: Cross-build requires two compilers.
3803 Use --with-build-cc to specify the native compiler." >&5
3804 echo "$as_me: error: Cross-build requires two compilers.
3805 Use --with-build-cc to specify the native compiler." >&2;}
3806    { (exit 1); exit 1; }; }
3807         fi
3808
3809 else
3810         : ${BUILD_CC:='${CC}'}
3811         : ${BUILD_CPP:='${CPP}'}
3812         : ${BUILD_CFLAGS:='${CFLAGS}'}
3813         : ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
3814         : ${BUILD_LDFLAGS:='${LDFLAGS}'}
3815         : ${BUILD_LIBS:='${LIBS}'}
3816         : ${BUILD_EXEEXT:='$x'}
3817         : ${BUILD_OBJEXT:='o'}
3818 fi
3819
3820 ###############################################################################
3821
3822 ### Options to allow the user to specify the set of libraries which are used.
3823 ### Use "--without-normal --with-shared" to allow the default model to be
3824 ### shared, for example.
3825 cf_list_models=""
3826
3827 echo "$as_me:3827: checking if you want to build shared C-objects" >&5
3828 echo $ECHO_N "checking if you want to build shared C-objects... $ECHO_C" >&6
3829
3830 # Check whether --with-shared or --without-shared was given.
3831 if test "${with_shared+set}" = set; then
3832   withval="$with_shared"
3833   with_shared=$withval
3834 else
3835   with_shared=no
3836 fi;
3837 echo "$as_me:3837: result: $with_shared" >&5
3838 echo "${ECHO_T}$with_shared" >&6
3839 test "$with_shared" = "yes" && cf_list_models="$cf_list_models shared"
3840
3841 echo "$as_me:3841: checking for specified models" >&5
3842 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
3843 test -z "$cf_list_models" && cf_list_models=normal
3844 echo "$as_me:3844: result: $cf_list_models" >&5
3845 echo "${ECHO_T}$cf_list_models" >&6
3846
3847 ### Use the first model as the default, and save its suffix for use in building
3848 ### up test-applications.
3849 echo "$as_me:3849: checking for default model" >&5
3850 echo $ECHO_N "checking for default model... $ECHO_C" >&6
3851 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
3852 echo "$as_me:3852: result: $DFT_LWR_MODEL" >&5
3853 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
3854
3855 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
3856
3857 echo "$as_me:3857: checking for specific curses-directory" >&5
3858 echo $ECHO_N "checking for specific curses-directory... $ECHO_C" >&6
3859
3860 # Check whether --with-curses-dir or --without-curses-dir was given.
3861 if test "${with_curses_dir+set}" = set; then
3862   withval="$with_curses_dir"
3863   cf_cv_curses_dir=$withval
3864 else
3865   cf_cv_curses_dir=no
3866 fi;
3867 echo "$as_me:3867: result: $cf_cv_curses_dir" >&5
3868 echo "${ECHO_T}$cf_cv_curses_dir" >&6
3869
3870 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
3871 then
3872
3873 if test "x$prefix" != xNONE; then
3874   cf_path_syntax="$prefix"
3875 else
3876   cf_path_syntax="$ac_default_prefix"
3877 fi
3878
3879 case ".$withval" in #(vi
3880 .\$\(*\)*|.\'*\'*) #(vi
3881   ;;
3882 ..|./*|.\\*) #(vi
3883   ;;
3884 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
3885   ;;
3886 .\${*prefix}*) #(vi
3887   eval withval="$withval"
3888   case ".$withval" in #(vi
3889   .NONE/*)
3890     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
3891     ;;
3892   esac
3893   ;; #(vi
3894 .no|.NONE/*)
3895   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
3896   ;;
3897 *)
3898   { { echo "$as_me:3898: error: expected a pathname, not \"$withval\"" >&5
3899 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
3900    { (exit 1); exit 1; }; }
3901   ;;
3902 esac
3903
3904         if test -d "$cf_cv_curses_dir"
3905         then
3906
3907 if test -n "$cf_cv_curses_dir/include" ; then
3908   for cf_add_incdir in $cf_cv_curses_dir/include
3909   do
3910         while test $cf_add_incdir != /usr/include
3911         do
3912           if test -d $cf_add_incdir
3913           then
3914                 cf_have_incdir=no
3915                 if test -n "$CFLAGS$CPPFLAGS" ; then
3916                   # a loop is needed to ensure we can add subdirs of existing dirs
3917                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
3918                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
3919                           cf_have_incdir=yes; break
3920                         fi
3921                   done
3922                 fi
3923
3924                 if test "$cf_have_incdir" = no ; then
3925                   if test "$cf_add_incdir" = /usr/local/include ; then
3926                         if test "$GCC" = yes
3927                         then
3928                           cf_save_CPPFLAGS=$CPPFLAGS
3929                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
3930                           cat >conftest.$ac_ext <<_ACEOF
3931 #line 3931 "configure"
3932 #include "confdefs.h"
3933 #include <stdio.h>
3934 int
3935 main ()
3936 {
3937 printf("Hello")
3938   ;
3939   return 0;
3940 }
3941 _ACEOF
3942 rm -f conftest.$ac_objext
3943 if { (eval echo "$as_me:3943: \"$ac_compile\"") >&5
3944   (eval $ac_compile) 2>&5
3945   ac_status=$?
3946   echo "$as_me:3946: \$? = $ac_status" >&5
3947   (exit $ac_status); } &&
3948          { ac_try='test -s conftest.$ac_objext'
3949   { (eval echo "$as_me:3949: \"$ac_try\"") >&5
3950   (eval $ac_try) 2>&5
3951   ac_status=$?
3952   echo "$as_me:3952: \$? = $ac_status" >&5
3953   (exit $ac_status); }; }; then
3954   :
3955 else
3956   echo "$as_me: failed program was:" >&5
3957 cat conftest.$ac_ext >&5
3958 cf_have_incdir=yes
3959 fi
3960 rm -f conftest.$ac_objext conftest.$ac_ext
3961                           CPPFLAGS=$cf_save_CPPFLAGS
3962                         fi
3963                   fi
3964                 fi
3965
3966                 if test "$cf_have_incdir" = no ; then
3967                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
3968
3969 echo "${as_me:-configure}:3969: testing adding $cf_add_incdir to include-path ..." 1>&5
3970
3971                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
3972
3973                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
3974                   test "$cf_top_incdir" = "$cf_add_incdir" && break
3975                   cf_add_incdir="$cf_top_incdir"
3976                 else
3977                   break
3978                 fi
3979           fi
3980         done
3981   done
3982 fi
3983
3984 if test -n "$cf_cv_curses_dir/lib" ; then
3985   for cf_add_libdir in $cf_cv_curses_dir/lib
3986   do
3987     if test $cf_add_libdir = /usr/lib ; then
3988       :
3989     elif test -d $cf_add_libdir
3990     then
3991       cf_have_libdir=no
3992       if test -n "$LDFLAGS$LIBS" ; then
3993         # a loop is needed to ensure we can add subdirs of existing dirs
3994         for cf_test_libdir in $LDFLAGS $LIBS ; do
3995           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
3996             cf_have_libdir=yes; break
3997           fi
3998         done
3999       fi
4000       if test "$cf_have_libdir" = no ; then
4001         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
4002
4003 echo "${as_me:-configure}:4003: testing adding $cf_add_libdir to library-path ..." 1>&5
4004
4005         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
4006       fi
4007     fi
4008   done
4009 fi
4010
4011         fi
4012 fi
4013
4014 echo "$as_me:4014: checking if you want wide-character code" >&5
4015 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
4016
4017 # Check whether --enable-widec or --disable-widec was given.
4018 if test "${enable_widec+set}" = set; then
4019   enableval="$enable_widec"
4020   with_widec=$enableval
4021 else
4022   with_widec=no
4023 fi;
4024 echo "$as_me:4024: result: $with_widec" >&5
4025 echo "${ECHO_T}$with_widec" >&6
4026 if test "$with_widec" = yes ; then
4027
4028 echo "$as_me:4028: checking for multibyte character support" >&5
4029 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
4030 if test "${cf_cv_utf8_lib+set}" = set; then
4031   echo $ECHO_N "(cached) $ECHO_C" >&6
4032 else
4033
4034         cf_save_LIBS="$LIBS"
4035         cat >conftest.$ac_ext <<_ACEOF
4036 #line 4036 "configure"
4037 #include "confdefs.h"
4038
4039 #include <stdlib.h>
4040 int
4041 main ()
4042 {
4043 putwc(0,0);
4044   ;
4045   return 0;
4046 }
4047 _ACEOF
4048 rm -f conftest.$ac_objext conftest$ac_exeext
4049 if { (eval echo "$as_me:4049: \"$ac_link\"") >&5
4050   (eval $ac_link) 2>&5
4051   ac_status=$?
4052   echo "$as_me:4052: \$? = $ac_status" >&5
4053   (exit $ac_status); } &&
4054          { ac_try='test -s conftest$ac_exeext'
4055   { (eval echo "$as_me:4055: \"$ac_try\"") >&5
4056   (eval $ac_try) 2>&5
4057   ac_status=$?
4058   echo "$as_me:4058: \$? = $ac_status" >&5
4059   (exit $ac_status); }; }; then
4060   cf_cv_utf8_lib=yes
4061 else
4062   echo "$as_me: failed program was:" >&5
4063 cat conftest.$ac_ext >&5
4064
4065 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
4066 # will be set on completion of the AC_TRY_LINK below.
4067 cf_cv_header_path_utf8=
4068 cf_cv_library_path_utf8=
4069
4070 echo "${as_me:-configure}:4070: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
4071
4072 cf_save_LIBS="$LIBS"
4073
4074 cat >conftest.$ac_ext <<_ACEOF
4075 #line 4075 "configure"
4076 #include "confdefs.h"
4077
4078 #include <libutf8.h>
4079 int
4080 main ()
4081 {
4082 putwc(0,0);
4083   ;
4084   return 0;
4085 }
4086 _ACEOF
4087 rm -f conftest.$ac_objext conftest$ac_exeext
4088 if { (eval echo "$as_me:4088: \"$ac_link\"") >&5
4089   (eval $ac_link) 2>&5
4090   ac_status=$?
4091   echo "$as_me:4091: \$? = $ac_status" >&5
4092   (exit $ac_status); } &&
4093          { ac_try='test -s conftest$ac_exeext'
4094   { (eval echo "$as_me:4094: \"$ac_try\"") >&5
4095   (eval $ac_try) 2>&5
4096   ac_status=$?
4097   echo "$as_me:4097: \$? = $ac_status" >&5
4098   (exit $ac_status); }; }; then
4099
4100         cf_cv_find_linkage_utf8=yes
4101         cf_cv_header_path_utf8=/usr/include
4102         cf_cv_library_path_utf8=/usr/lib
4103
4104 else
4105   echo "$as_me: failed program was:" >&5
4106 cat conftest.$ac_ext >&5
4107
4108 LIBS="-lutf8  $cf_save_LIBS"
4109
4110 cat >conftest.$ac_ext <<_ACEOF
4111 #line 4111 "configure"
4112 #include "confdefs.h"
4113
4114 #include <libutf8.h>
4115 int
4116 main ()
4117 {
4118 putwc(0,0);
4119   ;
4120   return 0;
4121 }
4122 _ACEOF
4123 rm -f conftest.$ac_objext conftest$ac_exeext
4124 if { (eval echo "$as_me:4124: \"$ac_link\"") >&5
4125   (eval $ac_link) 2>&5
4126   ac_status=$?
4127   echo "$as_me:4127: \$? = $ac_status" >&5
4128   (exit $ac_status); } &&
4129          { ac_try='test -s conftest$ac_exeext'
4130   { (eval echo "$as_me:4130: \"$ac_try\"") >&5
4131   (eval $ac_try) 2>&5
4132   ac_status=$?
4133   echo "$as_me:4133: \$? = $ac_status" >&5
4134   (exit $ac_status); }; }; then
4135
4136         cf_cv_find_linkage_utf8=yes
4137         cf_cv_header_path_utf8=/usr/include
4138         cf_cv_library_path_utf8=/usr/lib
4139         cf_cv_library_file_utf8="-lutf8"
4140
4141 else
4142   echo "$as_me: failed program was:" >&5
4143 cat conftest.$ac_ext >&5
4144
4145         cf_cv_find_linkage_utf8=no
4146         LIBS="$cf_save_LIBS"
4147
4148     test -n "$verbose" && echo "        find linkage for utf8 library" 1>&6
4149
4150 echo "${as_me:-configure}:4150: testing find linkage for utf8 library ..." 1>&5
4151
4152 echo "${as_me:-configure}:4152: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
4153
4154     cf_save_CPPFLAGS="$CPPFLAGS"
4155     cf_test_CPPFLAGS="$CPPFLAGS"
4156
4157 cf_search=
4158
4159 # collect the current set of include-directories from compiler flags
4160 cf_header_path_list=""
4161 if test -n "${CFLAGS}${CPPFLAGS}" ; then
4162         for cf_header_path in $CPPFLAGS $CFLAGS
4163         do
4164                 case $cf_header_path in #(vi
4165                 -I*)
4166                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
4167
4168 test "$cf_header_path" != "NONE" && \
4169 test -d "$cf_header_path" && \
4170  {
4171         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
4172         test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
4173         test -d $cf_header_path/include/utf8 &&       cf_search="$cf_search $cf_header_path/include/utf8"
4174         test -d $cf_header_path/include/utf8/include &&    cf_search="$cf_search $cf_header_path/include/utf8/include"
4175         test -d $cf_header_path/utf8/include &&       cf_search="$cf_search $cf_header_path/utf8/include"
4176         test -d $cf_header_path/utf8/include/utf8 &&    cf_search="$cf_search $cf_header_path/utf8/include/utf8"
4177 }
4178
4179                         cf_header_path_list="$cf_header_path_list $cf_search"
4180                         ;;
4181                 esac
4182         done
4183 fi
4184
4185 # add the variations for the package we are looking for
4186
4187 cf_search=
4188
4189 test "/usr" != "$prefix" && \
4190 test -d "/usr" && \
4191 (test $prefix = NONE || test "/usr" != "$prefix") && {
4192         test -n "$verbose" && echo "    ... testing for include-directories under /usr"
4193         test -d /usr/include &&          cf_search="$cf_search /usr/include"
4194         test -d /usr/include/utf8 &&       cf_search="$cf_search /usr/include/utf8"
4195         test -d /usr/include/utf8/include &&    cf_search="$cf_search /usr/include/utf8/include"
4196         test -d /usr/utf8/include &&       cf_search="$cf_search /usr/utf8/include"
4197         test -d /usr/utf8/include/utf8 &&    cf_search="$cf_search /usr/utf8/include/utf8"
4198 }
4199
4200 test "$prefix" != "NONE" && \
4201 test -d "$prefix" && \
4202  {
4203         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
4204         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
4205         test -d $prefix/include/utf8 &&       cf_search="$cf_search $prefix/include/utf8"
4206         test -d $prefix/include/utf8/include &&    cf_search="$cf_search $prefix/include/utf8/include"
4207         test -d $prefix/utf8/include &&       cf_search="$cf_search $prefix/utf8/include"
4208         test -d $prefix/utf8/include/utf8 &&    cf_search="$cf_search $prefix/utf8/include/utf8"
4209 }
4210
4211 test "/usr/local" != "$prefix" && \
4212 test -d "/usr/local" && \
4213 (test $prefix = NONE || test "/usr/local" != "$prefix") && {
4214         test -n "$verbose" && echo "    ... testing for include-directories under /usr/local"
4215         test -d /usr/local/include &&          cf_search="$cf_search /usr/local/include"
4216         test -d /usr/local/include/utf8 &&       cf_search="$cf_search /usr/local/include/utf8"
4217         test -d /usr/local/include/utf8/include &&    cf_search="$cf_search /usr/local/include/utf8/include"
4218         test -d /usr/local/utf8/include &&       cf_search="$cf_search /usr/local/utf8/include"
4219         test -d /usr/local/utf8/include/utf8 &&    cf_search="$cf_search /usr/local/utf8/include/utf8"
4220 }
4221
4222 test "/opt" != "$prefix" && \
4223 test -d "/opt" && \
4224 (test $prefix = NONE || test "/opt" != "$prefix") && {
4225         test -n "$verbose" && echo "    ... testing for include-directories under /opt"
4226         test -d /opt/include &&          cf_search="$cf_search /opt/include"
4227         test -d /opt/include/utf8 &&       cf_search="$cf_search /opt/include/utf8"
4228         test -d /opt/include/utf8/include &&    cf_search="$cf_search /opt/include/utf8/include"
4229         test -d /opt/utf8/include &&       cf_search="$cf_search /opt/utf8/include"
4230         test -d /opt/utf8/include/utf8 &&    cf_search="$cf_search /opt/utf8/include/utf8"
4231 }
4232
4233 test "$HOME" != "$prefix" && \
4234 test -d "$HOME" && \
4235 (test $prefix = NONE || test "$HOME" != "$prefix") && {
4236         test -n "$verbose" && echo "    ... testing for include-directories under $HOME"
4237         test -d $HOME/include &&          cf_search="$cf_search $HOME/include"
4238         test -d $HOME/include/utf8 &&       cf_search="$cf_search $HOME/include/utf8"
4239         test -d $HOME/include/utf8/include &&    cf_search="$cf_search $HOME/include/utf8/include"
4240         test -d $HOME/utf8/include &&       cf_search="$cf_search $HOME/utf8/include"
4241         test -d $HOME/utf8/include/utf8 &&    cf_search="$cf_search $HOME/utf8/include/utf8"
4242 }
4243
4244 test "$includedir" != NONE && \
4245 test "$includedir" != "/usr/include" && \
4246 test -d "$includedir" && {
4247         test -d $includedir &&    cf_search="$cf_search $includedir"
4248         test -d $includedir/utf8 && cf_search="$cf_search $includedir/utf8"
4249 }
4250
4251 test "$oldincludedir" != NONE && \
4252 test "$oldincludedir" != "/usr/include" && \
4253 test -d "$oldincludedir" && {
4254         test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
4255         test -d $oldincludedir/utf8 && cf_search="$cf_search $oldincludedir/utf8"
4256 }
4257
4258 cf_search="$cf_search $cf_header_path_list"
4259
4260     for cf_cv_header_path_utf8 in $cf_search
4261     do
4262       if test -d $cf_cv_header_path_utf8 ; then
4263         test -n "$verbose" && echo "    ... testing $cf_cv_header_path_utf8" 1>&6
4264
4265 echo "${as_me:-configure}:4265: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
4266
4267         CPPFLAGS="$cf_save_CPPFLAGS -I$cf_cv_header_path_utf8"
4268         cat >conftest.$ac_ext <<_ACEOF
4269 #line 4269 "configure"
4270 #include "confdefs.h"
4271
4272 #include <libutf8.h>
4273 int
4274 main ()
4275 {
4276 putwc(0,0);
4277   ;
4278   return 0;
4279 }
4280 _ACEOF
4281 rm -f conftest.$ac_objext
4282 if { (eval echo "$as_me:4282: \"$ac_compile\"") >&5
4283   (eval $ac_compile) 2>&5
4284   ac_status=$?
4285   echo "$as_me:4285: \$? = $ac_status" >&5
4286   (exit $ac_status); } &&
4287          { ac_try='test -s conftest.$ac_objext'
4288   { (eval echo "$as_me:4288: \"$ac_try\"") >&5
4289   (eval $ac_try) 2>&5
4290   ac_status=$?
4291   echo "$as_me:4291: \$? = $ac_status" >&5
4292   (exit $ac_status); }; }; then
4293
4294             test -n "$verbose" && echo "        ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
4295
4296 echo "${as_me:-configure}:4296: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
4297
4298             cf_cv_find_linkage_utf8=maybe
4299             cf_test_CPPFLAGS="$CPPFLAGS"
4300             break
4301 else
4302   echo "$as_me: failed program was:" >&5
4303 cat conftest.$ac_ext >&5
4304
4305             CPPFLAGS="$cf_save_CPPFLAGS"
4306
4307 fi
4308 rm -f conftest.$ac_objext conftest.$ac_ext
4309       fi
4310     done
4311
4312     if test "$cf_cv_find_linkage_utf8" = maybe ; then
4313
4314 echo "${as_me:-configure}:4314: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
4315
4316       cf_save_LIBS="$LIBS"
4317       cf_save_LDFLAGS="$LDFLAGS"
4318
4319       if test "$cf_cv_find_linkage_utf8" != yes ; then
4320
4321 cf_search=
4322 cf_library_path_list=""
4323 if test -n "${LDFLAGS}${LIBS}" ; then
4324         for cf_library_path in $LDFLAGS $LIBS
4325         do
4326                 case $cf_library_path in #(vi
4327                 -L*)
4328                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
4329
4330 test "$cf_library_path" != "NONE" && \
4331 test -d "$cf_library_path" && \
4332  {
4333         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
4334         test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
4335         test -d $cf_library_path/lib/utf8 &&       cf_search="$cf_search $cf_library_path/lib/utf8"
4336         test -d $cf_library_path/lib/utf8/lib &&    cf_search="$cf_search $cf_library_path/lib/utf8/lib"
4337         test -d $cf_library_path/utf8/lib &&       cf_search="$cf_search $cf_library_path/utf8/lib"
4338         test -d $cf_library_path/utf8/lib/utf8 &&    cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
4339 }
4340
4341                         cf_library_path_list="$cf_library_path_list $cf_search"
4342                         ;;
4343                 esac
4344         done
4345 fi
4346
4347 cf_search=
4348
4349 test "/usr" != "$prefix" && \
4350 test -d "/usr" && \
4351 (test $prefix = NONE || test "/usr" != "$prefix") && {
4352         test -n "$verbose" && echo "    ... testing for lib-directories under /usr"
4353         test -d /usr/lib &&          cf_search="$cf_search /usr/lib"
4354         test -d /usr/lib/utf8 &&       cf_search="$cf_search /usr/lib/utf8"
4355         test -d /usr/lib/utf8/lib &&    cf_search="$cf_search /usr/lib/utf8/lib"
4356         test -d /usr/utf8/lib &&       cf_search="$cf_search /usr/utf8/lib"
4357         test -d /usr/utf8/lib/utf8 &&    cf_search="$cf_search /usr/utf8/lib/utf8"
4358 }
4359
4360 test "$prefix" != "NONE" && \
4361 test -d "$prefix" && \
4362  {
4363         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
4364         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
4365         test -d $prefix/lib/utf8 &&       cf_search="$cf_search $prefix/lib/utf8"
4366         test -d $prefix/lib/utf8/lib &&    cf_search="$cf_search $prefix/lib/utf8/lib"
4367         test -d $prefix/utf8/lib &&       cf_search="$cf_search $prefix/utf8/lib"
4368         test -d $prefix/utf8/lib/utf8 &&    cf_search="$cf_search $prefix/utf8/lib/utf8"
4369 }
4370
4371 test "/usr/local" != "$prefix" && \
4372 test -d "/usr/local" && \
4373 (test $prefix = NONE || test "/usr/local" != "$prefix") && {
4374         test -n "$verbose" && echo "    ... testing for lib-directories under /usr/local"
4375         test -d /usr/local/lib &&          cf_search="$cf_search /usr/local/lib"
4376         test -d /usr/local/lib/utf8 &&       cf_search="$cf_search /usr/local/lib/utf8"
4377         test -d /usr/local/lib/utf8/lib &&    cf_search="$cf_search /usr/local/lib/utf8/lib"
4378         test -d /usr/local/utf8/lib &&       cf_search="$cf_search /usr/local/utf8/lib"
4379         test -d /usr/local/utf8/lib/utf8 &&    cf_search="$cf_search /usr/local/utf8/lib/utf8"
4380 }
4381
4382 test "/opt" != "$prefix" && \
4383 test -d "/opt" && \
4384 (test $prefix = NONE || test "/opt" != "$prefix") && {
4385         test -n "$verbose" && echo "    ... testing for lib-directories under /opt"
4386         test -d /opt/lib &&          cf_search="$cf_search /opt/lib"
4387         test -d /opt/lib/utf8 &&       cf_search="$cf_search /opt/lib/utf8"
4388         test -d /opt/lib/utf8/lib &&    cf_search="$cf_search /opt/lib/utf8/lib"
4389         test -d /opt/utf8/lib &&       cf_search="$cf_search /opt/utf8/lib"
4390         test -d /opt/utf8/lib/utf8 &&    cf_search="$cf_search /opt/utf8/lib/utf8"
4391 }
4392
4393 test "$HOME" != "$prefix" && \
4394 test -d "$HOME" && \
4395 (test $prefix = NONE || test "$HOME" != "$prefix") && {
4396         test -n "$verbose" && echo "    ... testing for lib-directories under $HOME"
4397         test -d $HOME/lib &&          cf_search="$cf_search $HOME/lib"
4398         test -d $HOME/lib/utf8 &&       cf_search="$cf_search $HOME/lib/utf8"
4399         test -d $HOME/lib/utf8/lib &&    cf_search="$cf_search $HOME/lib/utf8/lib"
4400         test -d $HOME/utf8/lib &&       cf_search="$cf_search $HOME/utf8/lib"
4401         test -d $HOME/utf8/lib/utf8 &&    cf_search="$cf_search $HOME/utf8/lib/utf8"
4402 }
4403
4404 cf_search="$cf_library_path_list $cf_search"
4405
4406         for cf_cv_library_path_utf8 in $cf_search
4407         do
4408           if test -d $cf_cv_library_path_utf8 ; then
4409             test -n "$verbose" && echo "        ... testing $cf_cv_library_path_utf8" 1>&6
4410
4411 echo "${as_me:-configure}:4411: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
4412
4413             CPPFLAGS="$cf_test_CPPFLAGS"
4414             LIBS="-lutf8  $cf_save_LIBS"
4415             LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
4416             cat >conftest.$ac_ext <<_ACEOF
4417 #line 4417 "configure"
4418 #include "confdefs.h"
4419
4420 #include <libutf8.h>
4421 int
4422 main ()
4423 {
4424 putwc(0,0);
4425   ;
4426   return 0;
4427 }
4428 _ACEOF
4429 rm -f conftest.$ac_objext conftest$ac_exeext
4430 if { (eval echo "$as_me:4430: \"$ac_link\"") >&5
4431   (eval $ac_link) 2>&5
4432   ac_status=$?
4433   echo "$as_me:4433: \$? = $ac_status" >&5
4434   (exit $ac_status); } &&
4435          { ac_try='test -s conftest$ac_exeext'
4436   { (eval echo "$as_me:4436: \"$ac_try\"") >&5
4437   (eval $ac_try) 2>&5
4438   ac_status=$?
4439   echo "$as_me:4439: \$? = $ac_status" >&5
4440   (exit $ac_status); }; }; then
4441
4442                 test -n "$verbose" && echo "    ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
4443
4444 echo "${as_me:-configure}:4444: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
4445
4446                 cf_cv_find_linkage_utf8=yes
4447                 cf_cv_library_file_utf8="-lutf8"
4448                 break
4449 else
4450   echo "$as_me: failed program was:" >&5
4451 cat conftest.$ac_ext >&5
4452
4453                 CPPFLAGS="$cf_save_CPPFLAGS"
4454                 LIBS="$cf_save_LIBS"
4455                 LDFLAGS="$cf_save_LDFLAGS"
4456
4457 fi
4458 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4459           fi
4460         done
4461         CPPFLAGS="$cf_save_CPPFLAGS"
4462         LDFLAGS="$cf_save_LDFLAGS"
4463       fi
4464
4465     else
4466       cf_cv_find_linkage_utf8=no
4467     fi
4468
4469 fi
4470 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4471
4472 fi
4473 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4474
4475 LIBS="$cf_save_LIBS"
4476
4477 if test "$cf_cv_find_linkage_utf8" = yes ; then
4478 cf_cv_utf8_lib=add-on
4479 else
4480 cf_cv_utf8_lib=no
4481 fi
4482
4483 fi
4484 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4485 fi
4486 echo "$as_me:4486: result: $cf_cv_utf8_lib" >&5
4487 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
4488
4489 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
4490 # ncurses/ncursesw:
4491 if test "$cf_cv_utf8_lib" = "add-on" ; then
4492         cat >>confdefs.h <<\EOF
4493 #define HAVE_LIBUTF8_H 1
4494 EOF
4495
4496 if test -n "$cf_cv_header_path_utf8" ; then
4497   for cf_add_incdir in $cf_cv_header_path_utf8
4498   do
4499         while test $cf_add_incdir != /usr/include
4500         do
4501           if test -d $cf_add_incdir
4502           then
4503                 cf_have_incdir=no
4504                 if test -n "$CFLAGS$CPPFLAGS" ; then
4505                   # a loop is needed to ensure we can add subdirs of existing dirs
4506                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
4507                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
4508                           cf_have_incdir=yes; break
4509                         fi
4510                   done
4511                 fi
4512
4513                 if test "$cf_have_incdir" = no ; then
4514                   if test "$cf_add_incdir" = /usr/local/include ; then
4515                         if test "$GCC" = yes
4516                         then
4517                           cf_save_CPPFLAGS=$CPPFLAGS
4518                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4519                           cat >conftest.$ac_ext <<_ACEOF
4520 #line 4520 "configure"
4521 #include "confdefs.h"
4522 #include <stdio.h>
4523 int
4524 main ()
4525 {
4526 printf("Hello")
4527   ;
4528   return 0;
4529 }
4530 _ACEOF
4531 rm -f conftest.$ac_objext
4532 if { (eval echo "$as_me:4532: \"$ac_compile\"") >&5
4533   (eval $ac_compile) 2>&5
4534   ac_status=$?
4535   echo "$as_me:4535: \$? = $ac_status" >&5
4536   (exit $ac_status); } &&
4537          { ac_try='test -s conftest.$ac_objext'
4538   { (eval echo "$as_me:4538: \"$ac_try\"") >&5
4539   (eval $ac_try) 2>&5
4540   ac_status=$?
4541   echo "$as_me:4541: \$? = $ac_status" >&5
4542   (exit $ac_status); }; }; then
4543   :
4544 else
4545   echo "$as_me: failed program was:" >&5
4546 cat conftest.$ac_ext >&5
4547 cf_have_incdir=yes
4548 fi
4549 rm -f conftest.$ac_objext conftest.$ac_ext
4550                           CPPFLAGS=$cf_save_CPPFLAGS
4551                         fi
4552                   fi
4553                 fi
4554
4555                 if test "$cf_have_incdir" = no ; then
4556                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
4557
4558 echo "${as_me:-configure}:4558: testing adding $cf_add_incdir to include-path ..." 1>&5
4559
4560                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4561
4562                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
4563                   test "$cf_top_incdir" = "$cf_add_incdir" && break
4564                   cf_add_incdir="$cf_top_incdir"
4565                 else
4566                   break
4567                 fi
4568           fi
4569         done
4570   done
4571 fi
4572
4573 if test -n "$cf_cv_library_path_utf8" ; then
4574   for cf_add_libdir in $cf_cv_library_path_utf8
4575   do
4576     if test $cf_add_libdir = /usr/lib ; then
4577       :
4578     elif test -d $cf_add_libdir
4579     then
4580       cf_have_libdir=no
4581       if test -n "$LDFLAGS$LIBS" ; then
4582         # a loop is needed to ensure we can add subdirs of existing dirs
4583         for cf_test_libdir in $LDFLAGS $LIBS ; do
4584           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
4585             cf_have_libdir=yes; break
4586           fi
4587         done
4588       fi
4589       if test "$cf_have_libdir" = no ; then
4590         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
4591
4592 echo "${as_me:-configure}:4592: testing adding $cf_add_libdir to library-path ..." 1>&5
4593
4594         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
4595       fi
4596     fi
4597   done
4598 fi
4599
4600         LIBS="$cf_cv_library_file_utf8 $LIBS"
4601 fi
4602
4603 cf_ncuconfig_root=ncursesw
4604
4605 echo "Looking for ${cf_ncuconfig_root}-config"
4606
4607 if test -n "$ac_tool_prefix"; then
4608   for ac_prog in ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
4609   do
4610     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4611 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4612 echo "$as_me:4612: checking for $ac_word" >&5
4613 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4614 if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
4615   echo $ECHO_N "(cached) $ECHO_C" >&6
4616 else
4617   if test -n "$NCURSES_CONFIG"; then
4618   ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
4619 else
4620   ac_save_IFS=$IFS; IFS=$ac_path_separator
4621 ac_dummy="$PATH"
4622 for ac_dir in $ac_dummy; do
4623   IFS=$ac_save_IFS
4624   test -z "$ac_dir" && ac_dir=.
4625   $as_executable_p "$ac_dir/$ac_word" || continue
4626 ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
4627 echo "$as_me:4627: found $ac_dir/$ac_word" >&5
4628 break
4629 done
4630
4631 fi
4632 fi
4633 NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
4634 if test -n "$NCURSES_CONFIG"; then
4635   echo "$as_me:4635: result: $NCURSES_CONFIG" >&5
4636 echo "${ECHO_T}$NCURSES_CONFIG" >&6
4637 else
4638   echo "$as_me:4638: result: no" >&5
4639 echo "${ECHO_T}no" >&6
4640 fi
4641
4642     test -n "$NCURSES_CONFIG" && break
4643   done
4644 fi
4645 if test -z "$NCURSES_CONFIG"; then
4646   ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
4647   for ac_prog in ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
4648 do
4649   # Extract the first word of "$ac_prog", so it can be a program name with args.
4650 set dummy $ac_prog; ac_word=$2
4651 echo "$as_me:4651: checking for $ac_word" >&5
4652 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4653 if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
4654   echo $ECHO_N "(cached) $ECHO_C" >&6
4655 else
4656   if test -n "$ac_ct_NCURSES_CONFIG"; then
4657   ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
4658 else
4659   ac_save_IFS=$IFS; IFS=$ac_path_separator
4660 ac_dummy="$PATH"
4661 for ac_dir in $ac_dummy; do
4662   IFS=$ac_save_IFS
4663   test -z "$ac_dir" && ac_dir=.
4664   $as_executable_p "$ac_dir/$ac_word" || continue
4665 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
4666 echo "$as_me:4666: found $ac_dir/$ac_word" >&5
4667 break
4668 done
4669
4670 fi
4671 fi
4672 ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
4673 if test -n "$ac_ct_NCURSES_CONFIG"; then
4674   echo "$as_me:4674: result: $ac_ct_NCURSES_CONFIG" >&5
4675 echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
4676 else
4677   echo "$as_me:4677: result: no" >&5
4678 echo "${ECHO_T}no" >&6
4679 fi
4680
4681   test -n "$ac_ct_NCURSES_CONFIG" && break
4682 done
4683 test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
4684
4685   NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
4686 fi
4687
4688 if test "$NCURSES_CONFIG" != none ; then
4689
4690 CPPFLAGS="$CPPFLAGS `$NCURSES_CONFIG --cflags`"
4691 LIBS="`$NCURSES_CONFIG --libs` $LIBS"
4692
4693 # even with config script, some packages use no-override for curses.h
4694
4695 echo "$as_me:4695: checking if we have identified curses headers" >&5
4696 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
4697 if test "${cf_cv_ncurses_header+set}" = set; then
4698   echo $ECHO_N "(cached) $ECHO_C" >&6
4699 else
4700
4701 cf_cv_ncurses_header=none
4702 for cf_header in  \
4703     ncursesw/ncurses.h \
4704         ncursesw/curses.h \
4705         ncurses.h \
4706         curses.h
4707 do
4708 cat >conftest.$ac_ext <<_ACEOF
4709 #line 4709 "configure"
4710 #include "confdefs.h"
4711 #include <${cf_header}>
4712 int
4713 main ()
4714 {
4715 initscr(); tgoto("?", 0,0)
4716   ;
4717   return 0;
4718 }
4719 _ACEOF
4720 rm -f conftest.$ac_objext
4721 if { (eval echo "$as_me:4721: \"$ac_compile\"") >&5
4722   (eval $ac_compile) 2>&5
4723   ac_status=$?
4724   echo "$as_me:4724: \$? = $ac_status" >&5
4725   (exit $ac_status); } &&
4726          { ac_try='test -s conftest.$ac_objext'
4727   { (eval echo "$as_me:4727: \"$ac_try\"") >&5
4728   (eval $ac_try) 2>&5
4729   ac_status=$?
4730   echo "$as_me:4730: \$? = $ac_status" >&5
4731   (exit $ac_status); }; }; then
4732   cf_cv_ncurses_header=$cf_header; break
4733 else
4734   echo "$as_me: failed program was:" >&5
4735 cat conftest.$ac_ext >&5
4736 fi
4737 rm -f conftest.$ac_objext conftest.$ac_ext
4738 done
4739
4740 fi
4741 echo "$as_me:4741: result: $cf_cv_ncurses_header" >&5
4742 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
4743
4744 if test "$cf_cv_ncurses_header" = none ; then
4745         { { echo "$as_me:4745: error: No curses header-files found" >&5
4746 echo "$as_me: error: No curses header-files found" >&2;}
4747    { (exit 1); exit 1; }; }
4748 fi
4749
4750 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
4751
4752 for ac_header in $cf_cv_ncurses_header
4753 do
4754 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4755 echo "$as_me:4755: checking for $ac_header" >&5
4756 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4757 if eval "test \"\${$as_ac_Header+set}\" = set"; then
4758   echo $ECHO_N "(cached) $ECHO_C" >&6
4759 else
4760   cat >conftest.$ac_ext <<_ACEOF
4761 #line 4761 "configure"
4762 #include "confdefs.h"
4763 #include <$ac_header>
4764 _ACEOF
4765 if { (eval echo "$as_me:4765: \"$ac_cpp conftest.$ac_ext\"") >&5
4766   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4767   ac_status=$?
4768   egrep -v '^ *\+' conftest.er1 >conftest.err
4769   rm -f conftest.er1
4770   cat conftest.err >&5
4771   echo "$as_me:4771: \$? = $ac_status" >&5
4772   (exit $ac_status); } >/dev/null; then
4773   if test -s conftest.err; then
4774     ac_cpp_err=$ac_c_preproc_warn_flag
4775   else
4776     ac_cpp_err=
4777   fi
4778 else
4779   ac_cpp_err=yes
4780 fi
4781 if test -z "$ac_cpp_err"; then
4782   eval "$as_ac_Header=yes"
4783 else
4784   echo "$as_me: failed program was:" >&5
4785   cat conftest.$ac_ext >&5
4786   eval "$as_ac_Header=no"
4787 fi
4788 rm -f conftest.err conftest.$ac_ext
4789 fi
4790 echo "$as_me:4790: result: `eval echo '${'$as_ac_Header'}'`" >&5
4791 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4792 if test `eval echo '${'$as_ac_Header'}'` = yes; then
4793   cat >>confdefs.h <<EOF
4794 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4795 EOF
4796
4797 fi
4798 done
4799
4800 cat >>confdefs.h <<\EOF
4801 #define NCURSES 1
4802 EOF
4803
4804 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
4805
4806 cat >>confdefs.h <<EOF
4807 #define $cf_nculib_ROOT 1
4808 EOF
4809
4810 cf_cv_ncurses_version=`$NCURSES_CONFIG --version`
4811
4812 else
4813
4814 cf_ncuhdr_root=ncursesw
4815
4816 test -n "$cf_cv_curses_dir" && \
4817 test "$cf_cv_curses_dir" != "no" && { \
4818
4819 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
4820   for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
4821   do
4822         while test $cf_add_incdir != /usr/include
4823         do
4824           if test -d $cf_add_incdir
4825           then
4826                 cf_have_incdir=no
4827                 if test -n "$CFLAGS$CPPFLAGS" ; then
4828                   # a loop is needed to ensure we can add subdirs of existing dirs
4829                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
4830                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
4831                           cf_have_incdir=yes; break
4832                         fi
4833                   done
4834                 fi
4835
4836                 if test "$cf_have_incdir" = no ; then
4837                   if test "$cf_add_incdir" = /usr/local/include ; then
4838                         if test "$GCC" = yes
4839                         then
4840                           cf_save_CPPFLAGS=$CPPFLAGS
4841                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4842                           cat >conftest.$ac_ext <<_ACEOF
4843 #line 4843 "configure"
4844 #include "confdefs.h"
4845 #include <stdio.h>
4846 int
4847 main ()
4848 {
4849 printf("Hello")
4850   ;
4851   return 0;
4852 }
4853 _ACEOF
4854 rm -f conftest.$ac_objext
4855 if { (eval echo "$as_me:4855: \"$ac_compile\"") >&5
4856   (eval $ac_compile) 2>&5
4857   ac_status=$?
4858   echo "$as_me:4858: \$? = $ac_status" >&5
4859   (exit $ac_status); } &&
4860          { ac_try='test -s conftest.$ac_objext'
4861   { (eval echo "$as_me:4861: \"$ac_try\"") >&5
4862   (eval $ac_try) 2>&5
4863   ac_status=$?
4864   echo "$as_me:4864: \$? = $ac_status" >&5
4865   (exit $ac_status); }; }; then
4866   :
4867 else
4868   echo "$as_me: failed program was:" >&5
4869 cat conftest.$ac_ext >&5
4870 cf_have_incdir=yes
4871 fi
4872 rm -f conftest.$ac_objext conftest.$ac_ext
4873                           CPPFLAGS=$cf_save_CPPFLAGS
4874                         fi
4875                   fi
4876                 fi
4877
4878                 if test "$cf_have_incdir" = no ; then
4879                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
4880
4881 echo "${as_me:-configure}:4881: testing adding $cf_add_incdir to include-path ..." 1>&5
4882
4883                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4884
4885                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
4886                   test "$cf_top_incdir" = "$cf_add_incdir" && break
4887                   cf_add_incdir="$cf_top_incdir"
4888                 else
4889                   break
4890                 fi
4891           fi
4892         done
4893   done
4894 fi
4895
4896 }
4897
4898 echo "$as_me:4898: checking for $cf_ncuhdr_root header in include-path" >&5
4899 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
4900 if test "${cf_cv_ncurses_h+set}" = set; then
4901   echo $ECHO_N "(cached) $ECHO_C" >&6
4902 else
4903
4904         cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
4905         ( test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw ) && cf_header_list="$cf_header_list curses.h ncurses.h"
4906         for cf_header in $cf_header_list
4907         do
4908
4909         cat >conftest.$ac_ext <<_ACEOF
4910 #line 4910 "configure"
4911 #include "confdefs.h"
4912
4913 #define _XOPEN_SOURCE_EXTENDED
4914 #undef  HAVE_LIBUTF8_H  /* in case we used CF_UTF8_LIB */
4915 #define HAVE_LIBUTF8_H  /* to force ncurses' header file to use cchar_t */
4916
4917 #include <$cf_header>
4918 int
4919 main ()
4920 {
4921
4922 #ifdef NCURSES_VERSION
4923
4924 #ifndef WACS_BSSB
4925         make an error
4926 #endif
4927
4928 printf("%s\n", NCURSES_VERSION);
4929 #else
4930 #ifdef __NCURSES_H
4931 printf("old\n");
4932 #else
4933         make an error
4934 #endif
4935 #endif
4936
4937   ;
4938   return 0;
4939 }
4940 _ACEOF
4941 rm -f conftest.$ac_objext
4942 if { (eval echo "$as_me:4942: \"$ac_compile\"") >&5
4943   (eval $ac_compile) 2>&5
4944   ac_status=$?
4945   echo "$as_me:4945: \$? = $ac_status" >&5
4946   (exit $ac_status); } &&
4947          { ac_try='test -s conftest.$ac_objext'
4948   { (eval echo "$as_me:4948: \"$ac_try\"") >&5
4949   (eval $ac_try) 2>&5
4950   ac_status=$?
4951   echo "$as_me:4951: \$? = $ac_status" >&5
4952   (exit $ac_status); }; }; then
4953   cf_cv_ncurses_h=$cf_header
4954
4955 else
4956   echo "$as_me: failed program was:" >&5
4957 cat conftest.$ac_ext >&5
4958 cf_cv_ncurses_h=no
4959 fi
4960 rm -f conftest.$ac_objext conftest.$ac_ext
4961
4962                 test "$cf_cv_ncurses_h" != no && break
4963         done
4964
4965 fi
4966 echo "$as_me:4966: result: $cf_cv_ncurses_h" >&5
4967 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
4968
4969 if test "$cf_cv_ncurses_h" != no ; then
4970         cf_cv_ncurses_header=$cf_cv_ncurses_h
4971 else
4972
4973 echo "$as_me:4973: checking for $cf_ncuhdr_root include-path" >&5
4974 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
4975 if test "${cf_cv_ncurses_h2+set}" = set; then
4976   echo $ECHO_N "(cached) $ECHO_C" >&6
4977 else
4978
4979         test -n "$verbose" && echo
4980
4981 cf_search=
4982
4983 # collect the current set of include-directories from compiler flags
4984 cf_header_path_list=""
4985 if test -n "${CFLAGS}${CPPFLAGS}" ; then
4986         for cf_header_path in $CPPFLAGS $CFLAGS
4987         do
4988                 case $cf_header_path in #(vi
4989                 -I*)
4990                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
4991
4992 test "$cf_header_path" != "NONE" && \
4993 test -d "$cf_header_path" && \
4994  {
4995         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
4996         test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
4997         test -d $cf_header_path/include/$cf_ncuhdr_root &&       cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
4998         test -d $cf_header_path/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
4999         test -d $cf_header_path/$cf_ncuhdr_root/include &&       cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
5000         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"
5001 }
5002
5003                         cf_header_path_list="$cf_header_path_list $cf_search"
5004                         ;;
5005                 esac
5006         done
5007 fi
5008
5009 # add the variations for the package we are looking for
5010
5011 cf_search=
5012
5013 test "/usr" != "$prefix" && \
5014 test -d "/usr" && \
5015 (test $prefix = NONE || test "/usr" != "$prefix") && {
5016         test -n "$verbose" && echo "    ... testing for include-directories under /usr"
5017         test -d /usr/include &&          cf_search="$cf_search /usr/include"
5018         test -d /usr/include/$cf_ncuhdr_root &&       cf_search="$cf_search /usr/include/$cf_ncuhdr_root"
5019         test -d /usr/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search /usr/include/$cf_ncuhdr_root/include"
5020         test -d /usr/$cf_ncuhdr_root/include &&       cf_search="$cf_search /usr/$cf_ncuhdr_root/include"
5021         test -d /usr/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search /usr/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
5022 }
5023
5024 test "$prefix" != "NONE" && \
5025 test -d "$prefix" && \
5026  {
5027         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
5028         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
5029         test -d $prefix/include/$cf_ncuhdr_root &&       cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
5030         test -d $prefix/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
5031         test -d $prefix/$cf_ncuhdr_root/include &&       cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
5032         test -d $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
5033 }
5034
5035 test "/usr/local" != "$prefix" && \
5036 test -d "/usr/local" && \
5037 (test $prefix = NONE || test "/usr/local" != "$prefix") && {
5038         test -n "$verbose" && echo "    ... testing for include-directories under /usr/local"
5039         test -d /usr/local/include &&          cf_search="$cf_search /usr/local/include"
5040         test -d /usr/local/include/$cf_ncuhdr_root &&       cf_search="$cf_search /usr/local/include/$cf_ncuhdr_root"
5041         test -d /usr/local/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search /usr/local/include/$cf_ncuhdr_root/include"
5042         test -d /usr/local/$cf_ncuhdr_root/include &&       cf_search="$cf_search /usr/local/$cf_ncuhdr_root/include"
5043         test -d /usr/local/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search /usr/local/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
5044 }
5045
5046 test "/opt" != "$prefix" && \
5047 test -d "/opt" && \
5048 (test $prefix = NONE || test "/opt" != "$prefix") && {
5049         test -n "$verbose" && echo "    ... testing for include-directories under /opt"
5050         test -d /opt/include &&          cf_search="$cf_search /opt/include"
5051         test -d /opt/include/$cf_ncuhdr_root &&       cf_search="$cf_search /opt/include/$cf_ncuhdr_root"
5052         test -d /opt/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search /opt/include/$cf_ncuhdr_root/include"
5053         test -d /opt/$cf_ncuhdr_root/include &&       cf_search="$cf_search /opt/$cf_ncuhdr_root/include"
5054         test -d /opt/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search /opt/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
5055 }
5056
5057 test "$HOME" != "$prefix" && \
5058 test -d "$HOME" && \
5059 (test $prefix = NONE || test "$HOME" != "$prefix") && {
5060         test -n "$verbose" && echo "    ... testing for include-directories under $HOME"
5061         test -d $HOME/include &&          cf_search="$cf_search $HOME/include"
5062         test -d $HOME/include/$cf_ncuhdr_root &&       cf_search="$cf_search $HOME/include/$cf_ncuhdr_root"
5063         test -d $HOME/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search $HOME/include/$cf_ncuhdr_root/include"
5064         test -d $HOME/$cf_ncuhdr_root/include &&       cf_search="$cf_search $HOME/$cf_ncuhdr_root/include"
5065         test -d $HOME/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search $HOME/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
5066 }
5067
5068 test "$includedir" != NONE && \
5069 test "$includedir" != "/usr/include" && \
5070 test -d "$includedir" && {
5071         test -d $includedir &&    cf_search="$cf_search $includedir"
5072         test -d $includedir/$cf_ncuhdr_root && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
5073 }
5074
5075 test "$oldincludedir" != NONE && \
5076 test "$oldincludedir" != "/usr/include" && \
5077 test -d "$oldincludedir" && {
5078         test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
5079         test -d $oldincludedir/$cf_ncuhdr_root && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
5080 }
5081
5082 cf_search="$cf_search $cf_header_path_list"
5083
5084         test -n "$verbose" && echo search path $cf_search
5085         cf_save2_CPPFLAGS="$CPPFLAGS"
5086         for cf_incdir in $cf_search
5087         do
5088
5089 if test -n "$cf_incdir" ; then
5090   for cf_add_incdir in $cf_incdir
5091   do
5092         while test $cf_add_incdir != /usr/include
5093         do
5094           if test -d $cf_add_incdir
5095           then
5096                 cf_have_incdir=no
5097                 if test -n "$CFLAGS$CPPFLAGS" ; then
5098                   # a loop is needed to ensure we can add subdirs of existing dirs
5099                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
5100                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
5101                           cf_have_incdir=yes; break
5102                         fi
5103                   done
5104                 fi
5105
5106                 if test "$cf_have_incdir" = no ; then
5107                   if test "$cf_add_incdir" = /usr/local/include ; then
5108                         if test "$GCC" = yes
5109                         then
5110                           cf_save_CPPFLAGS=$CPPFLAGS
5111                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
5112                           cat >conftest.$ac_ext <<_ACEOF
5113 #line 5113 "configure"
5114 #include "confdefs.h"
5115 #include <stdio.h>
5116 int
5117 main ()
5118 {
5119 printf("Hello")
5120   ;
5121   return 0;
5122 }
5123 _ACEOF
5124 rm -f conftest.$ac_objext
5125 if { (eval echo "$as_me:5125: \"$ac_compile\"") >&5
5126   (eval $ac_compile) 2>&5
5127   ac_status=$?
5128   echo "$as_me:5128: \$? = $ac_status" >&5
5129   (exit $ac_status); } &&
5130          { ac_try='test -s conftest.$ac_objext'
5131   { (eval echo "$as_me:5131: \"$ac_try\"") >&5
5132   (eval $ac_try) 2>&5
5133   ac_status=$?
5134   echo "$as_me:5134: \$? = $ac_status" >&5
5135   (exit $ac_status); }; }; then
5136   :
5137 else
5138   echo "$as_me: failed program was:" >&5
5139 cat conftest.$ac_ext >&5
5140 cf_have_incdir=yes
5141 fi
5142 rm -f conftest.$ac_objext conftest.$ac_ext
5143                           CPPFLAGS=$cf_save_CPPFLAGS
5144                         fi
5145                   fi
5146                 fi
5147
5148                 if test "$cf_have_incdir" = no ; then
5149                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
5150
5151 echo "${as_me:-configure}:5151: testing adding $cf_add_incdir to include-path ..." 1>&5
5152
5153                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
5154
5155                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
5156                   test "$cf_top_incdir" = "$cf_add_incdir" && break
5157                   cf_add_incdir="$cf_top_incdir"
5158                 else
5159                   break
5160                 fi
5161           fi
5162         done
5163   done
5164 fi
5165
5166                 for cf_header in \
5167                         ncurses.h \
5168                         curses.h
5169                 do
5170
5171         cat >conftest.$ac_ext <<_ACEOF
5172 #line 5172 "configure"
5173 #include "confdefs.h"
5174
5175 #include <$cf_header>
5176 int
5177 main ()
5178 {
5179
5180 #ifdef NCURSES_VERSION
5181
5182 printf("%s\n", NCURSES_VERSION);
5183 #else
5184 #ifdef __NCURSES_H
5185 printf("old\n");
5186 #else
5187         make an error
5188 #endif
5189 #endif
5190
5191   ;
5192   return 0;
5193 }
5194 _ACEOF
5195 rm -f conftest.$ac_objext
5196 if { (eval echo "$as_me:5196: \"$ac_compile\"") >&5
5197   (eval $ac_compile) 2>&5
5198   ac_status=$?
5199   echo "$as_me:5199: \$? = $ac_status" >&5
5200   (exit $ac_status); } &&
5201          { ac_try='test -s conftest.$ac_objext'
5202   { (eval echo "$as_me:5202: \"$ac_try\"") >&5
5203   (eval $ac_try) 2>&5
5204   ac_status=$?
5205   echo "$as_me:5205: \$? = $ac_status" >&5
5206   (exit $ac_status); }; }; then
5207   cf_cv_ncurses_h2=$cf_header
5208
5209 else
5210   echo "$as_me: failed program was:" >&5
5211 cat conftest.$ac_ext >&5
5212 cf_cv_ncurses_h2=no
5213 fi
5214 rm -f conftest.$ac_objext conftest.$ac_ext
5215
5216                         if test "$cf_cv_ncurses_h2" != no ; then
5217                                 cf_cv_ncurses_h2=$cf_incdir/$cf_header
5218                                 test -n "$verbose" && echo $ac_n "      ... found $ac_c" 1>&6
5219                                 break
5220                         fi
5221                         test -n "$verbose" && echo "    ... tested $cf_incdir/$cf_header" 1>&6
5222                 done
5223                 CPPFLAGS="$cf_save2_CPPFLAGS"
5224                 test "$cf_cv_ncurses_h2" != no && break
5225         done
5226         test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:5226: error: not found" >&5
5227 echo "$as_me: error: not found" >&2;}
5228    { (exit 1); exit 1; }; }
5229
5230 fi
5231 echo "$as_me:5231: result: $cf_cv_ncurses_h2" >&5
5232 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
5233
5234         cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's%/[^/]*$%%'`
5235         cf_cv_ncurses_header=`basename $cf_cv_ncurses_h2`
5236         if test `basename $cf_1st_incdir` = $cf_ncuhdr_root ; then
5237                 cf_cv_ncurses_header=$cf_ncuhdr_root/$cf_cv_ncurses_header
5238         fi
5239
5240 if test -n "$cf_1st_incdir" ; then
5241   for cf_add_incdir in $cf_1st_incdir
5242   do
5243         while test $cf_add_incdir != /usr/include
5244         do
5245           if test -d $cf_add_incdir
5246           then
5247                 cf_have_incdir=no
5248                 if test -n "$CFLAGS$CPPFLAGS" ; then
5249                   # a loop is needed to ensure we can add subdirs of existing dirs
5250                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
5251                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
5252                           cf_have_incdir=yes; break
5253                         fi
5254                   done
5255                 fi
5256
5257                 if test "$cf_have_incdir" = no ; then
5258                   if test "$cf_add_incdir" = /usr/local/include ; then
5259                         if test "$GCC" = yes
5260                         then
5261                           cf_save_CPPFLAGS=$CPPFLAGS
5262                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
5263                           cat >conftest.$ac_ext <<_ACEOF
5264 #line 5264 "configure"
5265 #include "confdefs.h"
5266 #include <stdio.h>
5267 int
5268 main ()
5269 {
5270 printf("Hello")
5271   ;
5272   return 0;
5273 }
5274 _ACEOF
5275 rm -f conftest.$ac_objext
5276 if { (eval echo "$as_me:5276: \"$ac_compile\"") >&5
5277   (eval $ac_compile) 2>&5
5278   ac_status=$?
5279   echo "$as_me:5279: \$? = $ac_status" >&5
5280   (exit $ac_status); } &&
5281          { ac_try='test -s conftest.$ac_objext'
5282   { (eval echo "$as_me:5282: \"$ac_try\"") >&5
5283   (eval $ac_try) 2>&5
5284   ac_status=$?
5285   echo "$as_me:5285: \$? = $ac_status" >&5
5286   (exit $ac_status); }; }; then
5287   :
5288 else
5289   echo "$as_me: failed program was:" >&5
5290 cat conftest.$ac_ext >&5
5291 cf_have_incdir=yes
5292 fi
5293 rm -f conftest.$ac_objext conftest.$ac_ext
5294                           CPPFLAGS=$cf_save_CPPFLAGS
5295                         fi
5296                   fi
5297                 fi
5298
5299                 if test "$cf_have_incdir" = no ; then
5300                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
5301
5302 echo "${as_me:-configure}:5302: testing adding $cf_add_incdir to include-path ..." 1>&5
5303
5304                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
5305
5306                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
5307                   test "$cf_top_incdir" = "$cf_add_incdir" && break
5308                   cf_add_incdir="$cf_top_incdir"
5309                 else
5310                   break
5311                 fi
5312           fi
5313         done
5314   done
5315 fi
5316
5317 fi
5318
5319 # Set definitions to allow ifdef'ing for ncurses.h
5320
5321 case $cf_cv_ncurses_header in # (vi
5322 *ncurses.h)
5323         cat >>confdefs.h <<\EOF
5324 #define HAVE_NCURSES_H 1
5325 EOF
5326
5327         ;;
5328 esac
5329
5330 case $cf_cv_ncurses_header in # (vi
5331 ncurses/curses.h|ncurses/ncurses.h)
5332         cat >>confdefs.h <<\EOF
5333 #define HAVE_NCURSES_NCURSES_H 1
5334 EOF
5335
5336         ;;
5337 ncursesw/curses.h|ncursesw/ncurses.h)
5338         cat >>confdefs.h <<\EOF
5339 #define HAVE_NCURSESW_NCURSES_H 1
5340 EOF
5341
5342         ;;
5343 esac
5344
5345 echo "$as_me:5345: checking for terminfo header" >&5
5346 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
5347 if test "${cf_cv_term_header+set}" = set; then
5348   echo $ECHO_N "(cached) $ECHO_C" >&6
5349 else
5350
5351 case ${cf_cv_ncurses_header} in #(vi
5352 */ncurses.h|*/ncursesw.h) #(vi
5353         cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
5354         ;;
5355 *)
5356         cf_term_header=term.h
5357         ;;
5358 esac
5359
5360 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
5361 do
5362 cat >conftest.$ac_ext <<_ACEOF
5363 #line 5363 "configure"
5364 #include "confdefs.h"
5365 #include <stdio.h>
5366 #include <${cf_cv_ncurses_header:-curses.h}>
5367 #include <$cf_test>
5368
5369 int
5370 main ()
5371 {
5372 int x = auto_left_margin
5373   ;
5374   return 0;
5375 }
5376 _ACEOF
5377 rm -f conftest.$ac_objext
5378 if { (eval echo "$as_me:5378: \"$ac_compile\"") >&5
5379   (eval $ac_compile) 2>&5
5380   ac_status=$?
5381   echo "$as_me:5381: \$? = $ac_status" >&5
5382   (exit $ac_status); } &&
5383          { ac_try='test -s conftest.$ac_objext'
5384   { (eval echo "$as_me:5384: \"$ac_try\"") >&5
5385   (eval $ac_try) 2>&5
5386   ac_status=$?
5387   echo "$as_me:5387: \$? = $ac_status" >&5
5388   (exit $ac_status); }; }; then
5389
5390         cf_cv_term_header="$cf_test"
5391 else
5392   echo "$as_me: failed program was:" >&5
5393 cat conftest.$ac_ext >&5
5394
5395         cf_cv_term_header=unknown
5396
5397 fi
5398 rm -f conftest.$ac_objext conftest.$ac_ext
5399         test "$cf_cv_term_header" != unknown && break
5400 done
5401
5402 fi
5403 echo "$as_me:5403: result: $cf_cv_term_header" >&5
5404 echo "${ECHO_T}$cf_cv_term_header" >&6
5405
5406 # Set definitions to allow ifdef'ing to accommodate subdirectories
5407
5408 case $cf_cv_term_header in # (vi
5409 *term.h)
5410         cat >>confdefs.h <<\EOF
5411 #define HAVE_TERM_H 1
5412 EOF
5413
5414         ;;
5415 esac
5416
5417 case $cf_cv_term_header in # (vi
5418 ncurses/term.h) #(vi
5419         cat >>confdefs.h <<\EOF
5420 #define HAVE_NCURSES_TERM_H 1
5421 EOF
5422
5423         ;;
5424 ncursesw/term.h)
5425         cat >>confdefs.h <<\EOF
5426 #define HAVE_NCURSESW_TERM_H 1
5427 EOF
5428
5429         ;;
5430 esac
5431
5432 # some applications need this, but should check for NCURSES_VERSION
5433 cat >>confdefs.h <<\EOF
5434 #define NCURSES 1
5435 EOF
5436
5437 echo "$as_me:5437: checking for ncurses version" >&5
5438 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
5439 if test "${cf_cv_ncurses_version+set}" = set; then
5440   echo $ECHO_N "(cached) $ECHO_C" >&6
5441 else
5442
5443         cf_cv_ncurses_version=no
5444         cf_tempfile=out$$
5445         rm -f $cf_tempfile
5446         if test "$cross_compiling" = yes; then
5447
5448         # This will not work if the preprocessor splits the line after the
5449         # Autoconf token.  The 'unproto' program does that.
5450         cat > conftest.$ac_ext <<EOF
5451 #include <${cf_cv_ncurses_header:-curses.h}>
5452 #undef Autoconf
5453 #ifdef NCURSES_VERSION
5454 Autoconf NCURSES_VERSION
5455 #else
5456 #ifdef __NCURSES_H
5457 Autoconf "old"
5458 #endif
5459 ;
5460 #endif
5461 EOF
5462         cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
5463         { (eval echo "$as_me:5463: \"$cf_try\"") >&5
5464   (eval $cf_try) 2>&5
5465   ac_status=$?
5466   echo "$as_me:5466: \$? = $ac_status" >&5
5467   (exit $ac_status); }
5468         if test -f conftest.out ; then
5469                 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
5470                 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
5471                 rm -f conftest.out
5472         fi
5473
5474 else
5475   cat >conftest.$ac_ext <<_ACEOF
5476 #line 5476 "configure"
5477 #include "confdefs.h"
5478
5479 #include <${cf_cv_ncurses_header:-curses.h}>
5480 #include <stdio.h>
5481 int main()
5482 {
5483         FILE *fp = fopen("$cf_tempfile", "w");
5484 #ifdef NCURSES_VERSION
5485 # ifdef NCURSES_VERSION_PATCH
5486         fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
5487 # else
5488         fprintf(fp, "%s\n", NCURSES_VERSION);
5489 # endif
5490 #else
5491 # ifdef __NCURSES_H
5492         fprintf(fp, "old\n");
5493 # else
5494         make an error
5495 # endif
5496 #endif
5497         ${cf_cv_main_return:-return}(0);
5498 }
5499 _ACEOF
5500 rm -f conftest$ac_exeext
5501 if { (eval echo "$as_me:5501: \"$ac_link\"") >&5
5502   (eval $ac_link) 2>&5
5503   ac_status=$?
5504   echo "$as_me:5504: \$? = $ac_status" >&5
5505   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5506   { (eval echo "$as_me:5506: \"$ac_try\"") >&5
5507   (eval $ac_try) 2>&5
5508   ac_status=$?
5509   echo "$as_me:5509: \$? = $ac_status" >&5
5510   (exit $ac_status); }; }; then
5511
5512         cf_cv_ncurses_version=`cat $cf_tempfile`
5513 else
5514   echo "$as_me: program exited with status $ac_status" >&5
5515 echo "$as_me: failed program was:" >&5
5516 cat conftest.$ac_ext >&5
5517 fi
5518 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5519 fi
5520         rm -f $cf_tempfile
5521
5522 fi
5523 echo "$as_me:5523: result: $cf_cv_ncurses_version" >&5
5524 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
5525 test "$cf_cv_ncurses_version" = no || cat >>confdefs.h <<\EOF
5526 #define NCURSES 1
5527 EOF
5528
5529 cf_nculib_root=ncursesw
5530         # This works, except for the special case where we find gpm, but
5531         # ncurses is in a nonstandard location via $LIBS, and we really want
5532         # to link gpm.
5533 cf_ncurses_LIBS=""
5534 cf_ncurses_SAVE="$LIBS"
5535 echo "$as_me:5535: checking for Gpm_Open in -lgpm" >&5
5536 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
5537 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
5538   echo $ECHO_N "(cached) $ECHO_C" >&6
5539 else
5540   ac_check_lib_save_LIBS=$LIBS
5541 LIBS="-lgpm  $LIBS"
5542 cat >conftest.$ac_ext <<_ACEOF
5543 #line 5543 "configure"
5544 #include "confdefs.h"
5545
5546 /* Override any gcc2 internal prototype to avoid an error.  */
5547 #ifdef __cplusplus
5548 extern "C"
5549 #endif
5550 /* We use char because int might match the return type of a gcc2
5551    builtin and then its argument prototype would still apply.  */
5552 char Gpm_Open ();
5553 int
5554 main ()
5555 {
5556 Gpm_Open ();
5557   ;
5558   return 0;
5559 }
5560 _ACEOF
5561 rm -f conftest.$ac_objext conftest$ac_exeext
5562 if { (eval echo "$as_me:5562: \"$ac_link\"") >&5
5563   (eval $ac_link) 2>&5
5564   ac_status=$?
5565   echo "$as_me:5565: \$? = $ac_status" >&5
5566   (exit $ac_status); } &&
5567          { ac_try='test -s conftest$ac_exeext'
5568   { (eval echo "$as_me:5568: \"$ac_try\"") >&5
5569   (eval $ac_try) 2>&5
5570   ac_status=$?
5571   echo "$as_me:5571: \$? = $ac_status" >&5
5572   (exit $ac_status); }; }; then
5573   ac_cv_lib_gpm_Gpm_Open=yes
5574 else
5575   echo "$as_me: failed program was:" >&5
5576 cat conftest.$ac_ext >&5
5577 ac_cv_lib_gpm_Gpm_Open=no
5578 fi
5579 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5580 LIBS=$ac_check_lib_save_LIBS
5581 fi
5582 echo "$as_me:5582: result: $ac_cv_lib_gpm_Gpm_Open" >&5
5583 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
5584 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
5585   echo "$as_me:5585: checking for initscr in -lgpm" >&5
5586 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
5587 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
5588   echo $ECHO_N "(cached) $ECHO_C" >&6
5589 else
5590   ac_check_lib_save_LIBS=$LIBS
5591 LIBS="-lgpm  $LIBS"
5592 cat >conftest.$ac_ext <<_ACEOF
5593 #line 5593 "configure"
5594 #include "confdefs.h"
5595
5596 /* Override any gcc2 internal prototype to avoid an error.  */
5597 #ifdef __cplusplus
5598 extern "C"
5599 #endif
5600 /* We use char because int might match the return type of a gcc2
5601    builtin and then its argument prototype would still apply.  */
5602 char initscr ();
5603 int
5604 main ()
5605 {
5606 initscr ();
5607   ;
5608   return 0;
5609 }
5610 _ACEOF
5611 rm -f conftest.$ac_objext conftest$ac_exeext
5612 if { (eval echo "$as_me:5612: \"$ac_link\"") >&5
5613   (eval $ac_link) 2>&5
5614   ac_status=$?
5615   echo "$as_me:5615: \$? = $ac_status" >&5
5616   (exit $ac_status); } &&
5617          { ac_try='test -s conftest$ac_exeext'
5618   { (eval echo "$as_me:5618: \"$ac_try\"") >&5
5619   (eval $ac_try) 2>&5
5620   ac_status=$?
5621   echo "$as_me:5621: \$? = $ac_status" >&5
5622   (exit $ac_status); }; }; then
5623   ac_cv_lib_gpm_initscr=yes
5624 else
5625   echo "$as_me: failed program was:" >&5
5626 cat conftest.$ac_ext >&5
5627 ac_cv_lib_gpm_initscr=no
5628 fi
5629 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5630 LIBS=$ac_check_lib_save_LIBS
5631 fi
5632 echo "$as_me:5632: result: $ac_cv_lib_gpm_initscr" >&5
5633 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
5634 if test $ac_cv_lib_gpm_initscr = yes; then
5635   LIBS="$cf_ncurses_SAVE"
5636 else
5637   cf_ncurses_LIBS="-lgpm"
5638 fi
5639
5640 fi
5641
5642 case $host_os in #(vi
5643 freebsd*)
5644         # This is only necessary if you are linking against an obsolete
5645         # version of ncurses (but it should do no harm, since it's static).
5646         if test "$cf_nculib_root" = ncurses ; then
5647                 echo "$as_me:5647: checking for tgoto in -lmytinfo" >&5
5648 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
5649 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
5650   echo $ECHO_N "(cached) $ECHO_C" >&6
5651 else
5652   ac_check_lib_save_LIBS=$LIBS
5653 LIBS="-lmytinfo  $LIBS"
5654 cat >conftest.$ac_ext <<_ACEOF
5655 #line 5655 "configure"
5656 #include "confdefs.h"
5657
5658 /* Override any gcc2 internal prototype to avoid an error.  */
5659 #ifdef __cplusplus
5660 extern "C"
5661 #endif
5662 /* We use char because int might match the return type of a gcc2
5663    builtin and then its argument prototype would still apply.  */
5664 char tgoto ();
5665 int
5666 main ()
5667 {
5668 tgoto ();
5669   ;
5670   return 0;
5671 }
5672 _ACEOF
5673 rm -f conftest.$ac_objext conftest$ac_exeext
5674 if { (eval echo "$as_me:5674: \"$ac_link\"") >&5
5675   (eval $ac_link) 2>&5
5676   ac_status=$?
5677   echo "$as_me:5677: \$? = $ac_status" >&5
5678   (exit $ac_status); } &&
5679          { ac_try='test -s conftest$ac_exeext'
5680   { (eval echo "$as_me:5680: \"$ac_try\"") >&5
5681   (eval $ac_try) 2>&5
5682   ac_status=$?
5683   echo "$as_me:5683: \$? = $ac_status" >&5
5684   (exit $ac_status); }; }; then
5685   ac_cv_lib_mytinfo_tgoto=yes
5686 else
5687   echo "$as_me: failed program was:" >&5
5688 cat conftest.$ac_ext >&5
5689 ac_cv_lib_mytinfo_tgoto=no
5690 fi
5691 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5692 LIBS=$ac_check_lib_save_LIBS
5693 fi
5694 echo "$as_me:5694: result: $ac_cv_lib_mytinfo_tgoto" >&5
5695 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
5696 if test $ac_cv_lib_mytinfo_tgoto = yes; then
5697   cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
5698 fi
5699
5700         fi
5701         ;;
5702 esac
5703
5704 LIBS="$cf_ncurses_LIBS $LIBS"
5705
5706 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
5707 then
5708         LIBS="-l$cf_nculib_root $LIBS"
5709 else
5710
5711         eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
5712         cf_libdir=""
5713         echo "$as_me:5713: checking for initscr" >&5
5714 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
5715 if test "${ac_cv_func_initscr+set}" = set; then
5716   echo $ECHO_N "(cached) $ECHO_C" >&6
5717 else
5718   cat >conftest.$ac_ext <<_ACEOF
5719 #line 5719 "configure"
5720 #include "confdefs.h"
5721 /* System header to define __stub macros and hopefully few prototypes,
5722     which can conflict with char initscr (); below.  */
5723 #include <assert.h>
5724 /* Override any gcc2 internal prototype to avoid an error.  */
5725 #ifdef __cplusplus
5726 extern "C"
5727 #endif
5728 /* We use char because int might match the return type of a gcc2
5729    builtin and then its argument prototype would still apply.  */
5730 char initscr ();
5731 char (*f) ();
5732
5733 int
5734 main ()
5735 {
5736 /* The GNU C library defines this for functions which it implements
5737     to always fail with ENOSYS.  Some functions are actually named
5738     something starting with __ and the normal name is an alias.  */
5739 #if defined (__stub_initscr) || defined (__stub___initscr)
5740 choke me
5741 #else
5742 f = initscr;
5743 #endif
5744
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   ac_cv_func_initscr=yes
5762 else
5763   echo "$as_me: failed program was:" >&5
5764 cat conftest.$ac_ext >&5
5765 ac_cv_func_initscr=no
5766 fi
5767 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5768 fi
5769 echo "$as_me:5769: result: $ac_cv_func_initscr" >&5
5770 echo "${ECHO_T}$ac_cv_func_initscr" >&6
5771 if test $ac_cv_func_initscr = yes; then
5772   eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
5773 else
5774
5775                 cf_save_LIBS="$LIBS"
5776                 echo "$as_me:5776: checking for initscr in -l$cf_nculib_root" >&5
5777 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
5778                 LIBS="-l$cf_nculib_root $LIBS"
5779                 cat >conftest.$ac_ext <<_ACEOF
5780 #line 5780 "configure"
5781 #include "confdefs.h"
5782 #include <${cf_cv_ncurses_header:-curses.h}>
5783 int
5784 main ()
5785 {
5786 initscr()
5787   ;
5788   return 0;
5789 }
5790 _ACEOF
5791 rm -f conftest.$ac_objext conftest$ac_exeext
5792 if { (eval echo "$as_me:5792: \"$ac_link\"") >&5
5793   (eval $ac_link) 2>&5
5794   ac_status=$?
5795   echo "$as_me:5795: \$? = $ac_status" >&5
5796   (exit $ac_status); } &&
5797          { ac_try='test -s conftest$ac_exeext'
5798   { (eval echo "$as_me:5798: \"$ac_try\"") >&5
5799   (eval $ac_try) 2>&5
5800   ac_status=$?
5801   echo "$as_me:5801: \$? = $ac_status" >&5
5802   (exit $ac_status); }; }; then
5803   echo "$as_me:5803: result: yes" >&5
5804 echo "${ECHO_T}yes" >&6
5805                          eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
5806
5807 else
5808   echo "$as_me: failed program was:" >&5
5809 cat conftest.$ac_ext >&5
5810 echo "$as_me:5810: result: no" >&5
5811 echo "${ECHO_T}no" >&6
5812
5813 cf_search=
5814 cf_library_path_list=""
5815 if test -n "${LDFLAGS}${LIBS}" ; then
5816         for cf_library_path in $LDFLAGS $LIBS
5817         do
5818                 case $cf_library_path in #(vi
5819                 -L*)
5820                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
5821
5822 test "$cf_library_path" != "NONE" && \
5823 test -d "$cf_library_path" && \
5824  {
5825         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
5826         test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
5827         test -d $cf_library_path/lib/$cf_nculib_root &&       cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
5828         test -d $cf_library_path/lib/$cf_nculib_root/lib &&    cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
5829         test -d $cf_library_path/$cf_nculib_root/lib &&       cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
5830         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"
5831 }
5832
5833                         cf_library_path_list="$cf_library_path_list $cf_search"
5834                         ;;
5835                 esac
5836         done
5837 fi
5838
5839 cf_search=
5840
5841 test "/usr" != "$prefix" && \
5842 test -d "/usr" && \
5843 (test $prefix = NONE || test "/usr" != "$prefix") && {
5844         test -n "$verbose" && echo "    ... testing for lib-directories under /usr"
5845         test -d /usr/lib &&          cf_search="$cf_search /usr/lib"
5846         test -d /usr/lib/$cf_nculib_root &&       cf_search="$cf_search /usr/lib/$cf_nculib_root"
5847         test -d /usr/lib/$cf_nculib_root/lib &&    cf_search="$cf_search /usr/lib/$cf_nculib_root/lib"
5848         test -d /usr/$cf_nculib_root/lib &&       cf_search="$cf_search /usr/$cf_nculib_root/lib"
5849         test -d /usr/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search /usr/$cf_nculib_root/lib/$cf_nculib_root"
5850 }
5851
5852 test "$prefix" != "NONE" && \
5853 test -d "$prefix" && \
5854  {
5855         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
5856         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
5857         test -d $prefix/lib/$cf_nculib_root &&       cf_search="$cf_search $prefix/lib/$cf_nculib_root"
5858         test -d $prefix/lib/$cf_nculib_root/lib &&    cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
5859         test -d $prefix/$cf_nculib_root/lib &&       cf_search="$cf_search $prefix/$cf_nculib_root/lib"
5860         test -d $prefix/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
5861 }
5862
5863 test "/usr/local" != "$prefix" && \
5864 test -d "/usr/local" && \
5865 (test $prefix = NONE || test "/usr/local" != "$prefix") && {
5866         test -n "$verbose" && echo "    ... testing for lib-directories under /usr/local"
5867         test -d /usr/local/lib &&          cf_search="$cf_search /usr/local/lib"
5868         test -d /usr/local/lib/$cf_nculib_root &&       cf_search="$cf_search /usr/local/lib/$cf_nculib_root"
5869         test -d /usr/local/lib/$cf_nculib_root/lib &&    cf_search="$cf_search /usr/local/lib/$cf_nculib_root/lib"
5870         test -d /usr/local/$cf_nculib_root/lib &&       cf_search="$cf_search /usr/local/$cf_nculib_root/lib"
5871         test -d /usr/local/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search /usr/local/$cf_nculib_root/lib/$cf_nculib_root"
5872 }
5873
5874 test "/opt" != "$prefix" && \
5875 test -d "/opt" && \
5876 (test $prefix = NONE || test "/opt" != "$prefix") && {
5877         test -n "$verbose" && echo "    ... testing for lib-directories under /opt"
5878         test -d /opt/lib &&          cf_search="$cf_search /opt/lib"
5879         test -d /opt/lib/$cf_nculib_root &&       cf_search="$cf_search /opt/lib/$cf_nculib_root"
5880         test -d /opt/lib/$cf_nculib_root/lib &&    cf_search="$cf_search /opt/lib/$cf_nculib_root/lib"
5881         test -d /opt/$cf_nculib_root/lib &&       cf_search="$cf_search /opt/$cf_nculib_root/lib"
5882         test -d /opt/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search /opt/$cf_nculib_root/lib/$cf_nculib_root"
5883 }
5884
5885 test "$HOME" != "$prefix" && \
5886 test -d "$HOME" && \
5887 (test $prefix = NONE || test "$HOME" != "$prefix") && {
5888         test -n "$verbose" && echo "    ... testing for lib-directories under $HOME"
5889         test -d $HOME/lib &&          cf_search="$cf_search $HOME/lib"
5890         test -d $HOME/lib/$cf_nculib_root &&       cf_search="$cf_search $HOME/lib/$cf_nculib_root"
5891         test -d $HOME/lib/$cf_nculib_root/lib &&    cf_search="$cf_search $HOME/lib/$cf_nculib_root/lib"
5892         test -d $HOME/$cf_nculib_root/lib &&       cf_search="$cf_search $HOME/$cf_nculib_root/lib"
5893         test -d $HOME/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search $HOME/$cf_nculib_root/lib/$cf_nculib_root"
5894 }
5895
5896 cf_search="$cf_library_path_list $cf_search"
5897
5898                         for cf_libdir in $cf_search
5899                         do
5900                                 echo "$as_me:5900: checking for -l$cf_nculib_root in $cf_libdir" >&5
5901 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
5902                                 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
5903                                 cat >conftest.$ac_ext <<_ACEOF
5904 #line 5904 "configure"
5905 #include "confdefs.h"
5906 #include <${cf_cv_ncurses_header:-curses.h}>
5907 int
5908 main ()
5909 {
5910 initscr()
5911   ;
5912   return 0;
5913 }
5914 _ACEOF
5915 rm -f conftest.$ac_objext conftest$ac_exeext
5916 if { (eval echo "$as_me:5916: \"$ac_link\"") >&5
5917   (eval $ac_link) 2>&5
5918   ac_status=$?
5919   echo "$as_me:5919: \$? = $ac_status" >&5
5920   (exit $ac_status); } &&
5921          { ac_try='test -s conftest$ac_exeext'
5922   { (eval echo "$as_me:5922: \"$ac_try\"") >&5
5923   (eval $ac_try) 2>&5
5924   ac_status=$?
5925   echo "$as_me:5925: \$? = $ac_status" >&5
5926   (exit $ac_status); }; }; then
5927   echo "$as_me:5927: result: yes" >&5
5928 echo "${ECHO_T}yes" >&6
5929                                          eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
5930                                          break
5931 else
5932   echo "$as_me: failed program was:" >&5
5933 cat conftest.$ac_ext >&5
5934 echo "$as_me:5934: result: no" >&5
5935 echo "${ECHO_T}no" >&6
5936                                          LIBS="$cf_save_LIBS"
5937 fi
5938 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5939                         done
5940
5941 fi
5942 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5943
5944 fi
5945
5946 eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root
5947
5948 if test $cf_found_library = no ; then
5949         { { echo "$as_me:5949: error: Cannot link $cf_nculib_root library" >&5
5950 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
5951    { (exit 1); exit 1; }; }
5952 fi
5953
5954 fi
5955
5956 if test -n "$cf_ncurses_LIBS" ; then
5957         echo "$as_me:5957: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
5958 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
5959         cf_ncurses_SAVE="$LIBS"
5960         for p in $cf_ncurses_LIBS ; do
5961                 q=`echo $LIBS | sed -e "s%$p %%" -e "s%$p$%%"`
5962                 if test "$q" != "$LIBS" ; then
5963                         LIBS="$q"
5964                 fi
5965         done
5966         cat >conftest.$ac_ext <<_ACEOF
5967 #line 5967 "configure"
5968 #include "confdefs.h"
5969 #include <${cf_cv_ncurses_header:-curses.h}>
5970 int
5971 main ()
5972 {
5973 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
5974   ;
5975   return 0;
5976 }
5977 _ACEOF
5978 rm -f conftest.$ac_objext conftest$ac_exeext
5979 if { (eval echo "$as_me:5979: \"$ac_link\"") >&5
5980   (eval $ac_link) 2>&5
5981   ac_status=$?
5982   echo "$as_me:5982: \$? = $ac_status" >&5
5983   (exit $ac_status); } &&
5984          { ac_try='test -s conftest$ac_exeext'
5985   { (eval echo "$as_me:5985: \"$ac_try\"") >&5
5986   (eval $ac_try) 2>&5
5987   ac_status=$?
5988   echo "$as_me:5988: \$? = $ac_status" >&5
5989   (exit $ac_status); }; }; then
5990   echo "$as_me:5990: result: yes" >&5
5991 echo "${ECHO_T}yes" >&6
5992 else
5993   echo "$as_me: failed program was:" >&5
5994 cat conftest.$ac_ext >&5
5995 echo "$as_me:5995: result: no" >&5
5996 echo "${ECHO_T}no" >&6
5997                  LIBS="$cf_ncurses_SAVE"
5998 fi
5999 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6000 fi
6001
6002 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
6003
6004 cat >>confdefs.h <<EOF
6005 #define $cf_nculib_ROOT 1
6006 EOF
6007
6008 fi
6009
6010 else
6011
6012 cf_ncuconfig_root=ncurses
6013
6014 echo "Looking for ${cf_ncuconfig_root}-config"
6015
6016 if test -n "$ac_tool_prefix"; then
6017   for ac_prog in ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
6018   do
6019     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6020 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
6021 echo "$as_me:6021: checking for $ac_word" >&5
6022 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6023 if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
6024   echo $ECHO_N "(cached) $ECHO_C" >&6
6025 else
6026   if test -n "$NCURSES_CONFIG"; then
6027   ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
6028 else
6029   ac_save_IFS=$IFS; IFS=$ac_path_separator
6030 ac_dummy="$PATH"
6031 for ac_dir in $ac_dummy; do
6032   IFS=$ac_save_IFS
6033   test -z "$ac_dir" && ac_dir=.
6034   $as_executable_p "$ac_dir/$ac_word" || continue
6035 ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
6036 echo "$as_me:6036: found $ac_dir/$ac_word" >&5
6037 break
6038 done
6039
6040 fi
6041 fi
6042 NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
6043 if test -n "$NCURSES_CONFIG"; then
6044   echo "$as_me:6044: result: $NCURSES_CONFIG" >&5
6045 echo "${ECHO_T}$NCURSES_CONFIG" >&6
6046 else
6047   echo "$as_me:6047: result: no" >&5
6048 echo "${ECHO_T}no" >&6
6049 fi
6050
6051     test -n "$NCURSES_CONFIG" && break
6052   done
6053 fi
6054 if test -z "$NCURSES_CONFIG"; then
6055   ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
6056   for ac_prog in ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
6057 do
6058   # Extract the first word of "$ac_prog", so it can be a program name with args.
6059 set dummy $ac_prog; ac_word=$2
6060 echo "$as_me:6060: checking for $ac_word" >&5
6061 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6062 if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
6063   echo $ECHO_N "(cached) $ECHO_C" >&6
6064 else
6065   if test -n "$ac_ct_NCURSES_CONFIG"; then
6066   ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
6067 else
6068   ac_save_IFS=$IFS; IFS=$ac_path_separator
6069 ac_dummy="$PATH"
6070 for ac_dir in $ac_dummy; do
6071   IFS=$ac_save_IFS
6072   test -z "$ac_dir" && ac_dir=.
6073   $as_executable_p "$ac_dir/$ac_word" || continue
6074 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
6075 echo "$as_me:6075: found $ac_dir/$ac_word" >&5
6076 break
6077 done
6078
6079 fi
6080 fi
6081 ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
6082 if test -n "$ac_ct_NCURSES_CONFIG"; then
6083   echo "$as_me:6083: result: $ac_ct_NCURSES_CONFIG" >&5
6084 echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
6085 else
6086   echo "$as_me:6086: result: no" >&5
6087 echo "${ECHO_T}no" >&6
6088 fi
6089
6090   test -n "$ac_ct_NCURSES_CONFIG" && break
6091 done
6092 test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
6093
6094   NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
6095 fi
6096
6097 if test "$NCURSES_CONFIG" != none ; then
6098
6099 CPPFLAGS="$CPPFLAGS `$NCURSES_CONFIG --cflags`"
6100 LIBS="`$NCURSES_CONFIG --libs` $LIBS"
6101
6102 # even with config script, some packages use no-override for curses.h
6103
6104 echo "$as_me:6104: checking if we have identified curses headers" >&5
6105 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
6106 if test "${cf_cv_ncurses_header+set}" = set; then
6107   echo $ECHO_N "(cached) $ECHO_C" >&6
6108 else
6109
6110 cf_cv_ncurses_header=none
6111 for cf_header in  \
6112     ncurses/ncurses.h \
6113         ncurses/curses.h \
6114         ncurses.h \
6115         curses.h
6116 do
6117 cat >conftest.$ac_ext <<_ACEOF
6118 #line 6118 "configure"
6119 #include "confdefs.h"
6120 #include <${cf_header}>
6121 int
6122 main ()
6123 {
6124 initscr(); tgoto("?", 0,0)
6125   ;
6126   return 0;
6127 }
6128 _ACEOF
6129 rm -f conftest.$ac_objext
6130 if { (eval echo "$as_me:6130: \"$ac_compile\"") >&5
6131   (eval $ac_compile) 2>&5
6132   ac_status=$?
6133   echo "$as_me:6133: \$? = $ac_status" >&5
6134   (exit $ac_status); } &&
6135          { ac_try='test -s conftest.$ac_objext'
6136   { (eval echo "$as_me:6136: \"$ac_try\"") >&5
6137   (eval $ac_try) 2>&5
6138   ac_status=$?
6139   echo "$as_me:6139: \$? = $ac_status" >&5
6140   (exit $ac_status); }; }; then
6141   cf_cv_ncurses_header=$cf_header; break
6142 else
6143   echo "$as_me: failed program was:" >&5
6144 cat conftest.$ac_ext >&5
6145 fi
6146 rm -f conftest.$ac_objext conftest.$ac_ext
6147 done
6148
6149 fi
6150 echo "$as_me:6150: result: $cf_cv_ncurses_header" >&5
6151 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
6152
6153 if test "$cf_cv_ncurses_header" = none ; then
6154         { { echo "$as_me:6154: error: No curses header-files found" >&5
6155 echo "$as_me: error: No curses header-files found" >&2;}
6156    { (exit 1); exit 1; }; }
6157 fi
6158
6159 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
6160
6161 for ac_header in $cf_cv_ncurses_header
6162 do
6163 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6164 echo "$as_me:6164: checking for $ac_header" >&5
6165 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6166 if eval "test \"\${$as_ac_Header+set}\" = set"; then
6167   echo $ECHO_N "(cached) $ECHO_C" >&6
6168 else
6169   cat >conftest.$ac_ext <<_ACEOF
6170 #line 6170 "configure"
6171 #include "confdefs.h"
6172 #include <$ac_header>
6173 _ACEOF
6174 if { (eval echo "$as_me:6174: \"$ac_cpp conftest.$ac_ext\"") >&5
6175   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6176   ac_status=$?
6177   egrep -v '^ *\+' conftest.er1 >conftest.err
6178   rm -f conftest.er1
6179   cat conftest.err >&5
6180   echo "$as_me:6180: \$? = $ac_status" >&5
6181   (exit $ac_status); } >/dev/null; then
6182   if test -s conftest.err; then
6183     ac_cpp_err=$ac_c_preproc_warn_flag
6184   else
6185     ac_cpp_err=
6186   fi
6187 else
6188   ac_cpp_err=yes
6189 fi
6190 if test -z "$ac_cpp_err"; then
6191   eval "$as_ac_Header=yes"
6192 else
6193   echo "$as_me: failed program was:" >&5
6194   cat conftest.$ac_ext >&5
6195   eval "$as_ac_Header=no"
6196 fi
6197 rm -f conftest.err conftest.$ac_ext
6198 fi
6199 echo "$as_me:6199: result: `eval echo '${'$as_ac_Header'}'`" >&5
6200 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
6201 if test `eval echo '${'$as_ac_Header'}'` = yes; then
6202   cat >>confdefs.h <<EOF
6203 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6204 EOF
6205
6206 fi
6207 done
6208
6209 cat >>confdefs.h <<\EOF
6210 #define NCURSES 1
6211 EOF
6212
6213 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
6214
6215 cat >>confdefs.h <<EOF
6216 #define $cf_nculib_ROOT 1
6217 EOF
6218
6219 cf_cv_ncurses_version=`$NCURSES_CONFIG --version`
6220
6221 else
6222
6223 cf_ncuhdr_root=ncurses
6224
6225 test -n "$cf_cv_curses_dir" && \
6226 test "$cf_cv_curses_dir" != "no" && { \
6227
6228 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
6229   for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
6230   do
6231         while test $cf_add_incdir != /usr/include
6232         do
6233           if test -d $cf_add_incdir
6234           then
6235                 cf_have_incdir=no
6236                 if test -n "$CFLAGS$CPPFLAGS" ; then
6237                   # a loop is needed to ensure we can add subdirs of existing dirs
6238                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
6239                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
6240                           cf_have_incdir=yes; break
6241                         fi
6242                   done
6243                 fi
6244
6245                 if test "$cf_have_incdir" = no ; then
6246                   if test "$cf_add_incdir" = /usr/local/include ; then
6247                         if test "$GCC" = yes
6248                         then
6249                           cf_save_CPPFLAGS=$CPPFLAGS
6250                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6251                           cat >conftest.$ac_ext <<_ACEOF
6252 #line 6252 "configure"
6253 #include "confdefs.h"
6254 #include <stdio.h>
6255 int
6256 main ()
6257 {
6258 printf("Hello")
6259   ;
6260   return 0;
6261 }
6262 _ACEOF
6263 rm -f conftest.$ac_objext
6264 if { (eval echo "$as_me:6264: \"$ac_compile\"") >&5
6265   (eval $ac_compile) 2>&5
6266   ac_status=$?
6267   echo "$as_me:6267: \$? = $ac_status" >&5
6268   (exit $ac_status); } &&
6269          { ac_try='test -s conftest.$ac_objext'
6270   { (eval echo "$as_me:6270: \"$ac_try\"") >&5
6271   (eval $ac_try) 2>&5
6272   ac_status=$?
6273   echo "$as_me:6273: \$? = $ac_status" >&5
6274   (exit $ac_status); }; }; then
6275   :
6276 else
6277   echo "$as_me: failed program was:" >&5
6278 cat conftest.$ac_ext >&5
6279 cf_have_incdir=yes
6280 fi
6281 rm -f conftest.$ac_objext conftest.$ac_ext
6282                           CPPFLAGS=$cf_save_CPPFLAGS
6283                         fi
6284                   fi
6285                 fi
6286
6287                 if test "$cf_have_incdir" = no ; then
6288                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
6289
6290 echo "${as_me:-configure}:6290: testing adding $cf_add_incdir to include-path ..." 1>&5
6291
6292                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6293
6294                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
6295                   test "$cf_top_incdir" = "$cf_add_incdir" && break
6296                   cf_add_incdir="$cf_top_incdir"
6297                 else
6298                   break
6299                 fi
6300           fi
6301         done
6302   done
6303 fi
6304
6305 }
6306
6307 echo "$as_me:6307: checking for $cf_ncuhdr_root header in include-path" >&5
6308 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
6309 if test "${cf_cv_ncurses_h+set}" = set; then
6310   echo $ECHO_N "(cached) $ECHO_C" >&6
6311 else
6312
6313         cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
6314         ( test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw ) && cf_header_list="$cf_header_list curses.h ncurses.h"
6315         for cf_header in $cf_header_list
6316         do
6317
6318         cat >conftest.$ac_ext <<_ACEOF
6319 #line 6319 "configure"
6320 #include "confdefs.h"
6321
6322 #include <$cf_header>
6323 int
6324 main ()
6325 {
6326
6327 #ifdef NCURSES_VERSION
6328
6329 printf("%s\n", NCURSES_VERSION);
6330 #else
6331 #ifdef __NCURSES_H
6332 printf("old\n");
6333 #else
6334         make an error
6335 #endif
6336 #endif
6337
6338   ;
6339   return 0;
6340 }
6341 _ACEOF
6342 rm -f conftest.$ac_objext
6343 if { (eval echo "$as_me:6343: \"$ac_compile\"") >&5
6344   (eval $ac_compile) 2>&5
6345   ac_status=$?
6346   echo "$as_me:6346: \$? = $ac_status" >&5
6347   (exit $ac_status); } &&
6348          { ac_try='test -s conftest.$ac_objext'
6349   { (eval echo "$as_me:6349: \"$ac_try\"") >&5
6350   (eval $ac_try) 2>&5
6351   ac_status=$?
6352   echo "$as_me:6352: \$? = $ac_status" >&5
6353   (exit $ac_status); }; }; then
6354   cf_cv_ncurses_h=$cf_header
6355
6356 else
6357   echo "$as_me: failed program was:" >&5
6358 cat conftest.$ac_ext >&5
6359 cf_cv_ncurses_h=no
6360 fi
6361 rm -f conftest.$ac_objext conftest.$ac_ext
6362
6363                 test "$cf_cv_ncurses_h" != no && break
6364         done
6365
6366 fi
6367 echo "$as_me:6367: result: $cf_cv_ncurses_h" >&5
6368 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
6369
6370 if test "$cf_cv_ncurses_h" != no ; then
6371         cf_cv_ncurses_header=$cf_cv_ncurses_h
6372 else
6373
6374 echo "$as_me:6374: checking for $cf_ncuhdr_root include-path" >&5
6375 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
6376 if test "${cf_cv_ncurses_h2+set}" = set; then
6377   echo $ECHO_N "(cached) $ECHO_C" >&6
6378 else
6379
6380         test -n "$verbose" && echo
6381
6382 cf_search=
6383
6384 # collect the current set of include-directories from compiler flags
6385 cf_header_path_list=""
6386 if test -n "${CFLAGS}${CPPFLAGS}" ; then
6387         for cf_header_path in $CPPFLAGS $CFLAGS
6388         do
6389                 case $cf_header_path in #(vi
6390                 -I*)
6391                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
6392
6393 test "$cf_header_path" != "NONE" && \
6394 test -d "$cf_header_path" && \
6395  {
6396         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
6397         test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
6398         test -d $cf_header_path/include/$cf_ncuhdr_root &&       cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
6399         test -d $cf_header_path/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
6400         test -d $cf_header_path/$cf_ncuhdr_root/include &&       cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
6401         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"
6402 }
6403
6404                         cf_header_path_list="$cf_header_path_list $cf_search"
6405                         ;;
6406                 esac
6407         done
6408 fi
6409
6410 # add the variations for the package we are looking for
6411
6412 cf_search=
6413
6414 test "/usr" != "$prefix" && \
6415 test -d "/usr" && \
6416 (test $prefix = NONE || test "/usr" != "$prefix") && {
6417         test -n "$verbose" && echo "    ... testing for include-directories under /usr"
6418         test -d /usr/include &&          cf_search="$cf_search /usr/include"
6419         test -d /usr/include/$cf_ncuhdr_root &&       cf_search="$cf_search /usr/include/$cf_ncuhdr_root"
6420         test -d /usr/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search /usr/include/$cf_ncuhdr_root/include"
6421         test -d /usr/$cf_ncuhdr_root/include &&       cf_search="$cf_search /usr/$cf_ncuhdr_root/include"
6422         test -d /usr/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search /usr/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
6423 }
6424
6425 test "$prefix" != "NONE" && \
6426 test -d "$prefix" && \
6427  {
6428         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
6429         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
6430         test -d $prefix/include/$cf_ncuhdr_root &&       cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
6431         test -d $prefix/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
6432         test -d $prefix/$cf_ncuhdr_root/include &&       cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
6433         test -d $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
6434 }
6435
6436 test "/usr/local" != "$prefix" && \
6437 test -d "/usr/local" && \
6438 (test $prefix = NONE || test "/usr/local" != "$prefix") && {
6439         test -n "$verbose" && echo "    ... testing for include-directories under /usr/local"
6440         test -d /usr/local/include &&          cf_search="$cf_search /usr/local/include"
6441         test -d /usr/local/include/$cf_ncuhdr_root &&       cf_search="$cf_search /usr/local/include/$cf_ncuhdr_root"
6442         test -d /usr/local/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search /usr/local/include/$cf_ncuhdr_root/include"
6443         test -d /usr/local/$cf_ncuhdr_root/include &&       cf_search="$cf_search /usr/local/$cf_ncuhdr_root/include"
6444         test -d /usr/local/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search /usr/local/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
6445 }
6446
6447 test "/opt" != "$prefix" && \
6448 test -d "/opt" && \
6449 (test $prefix = NONE || test "/opt" != "$prefix") && {
6450         test -n "$verbose" && echo "    ... testing for include-directories under /opt"
6451         test -d /opt/include &&          cf_search="$cf_search /opt/include"
6452         test -d /opt/include/$cf_ncuhdr_root &&       cf_search="$cf_search /opt/include/$cf_ncuhdr_root"
6453         test -d /opt/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search /opt/include/$cf_ncuhdr_root/include"
6454         test -d /opt/$cf_ncuhdr_root/include &&       cf_search="$cf_search /opt/$cf_ncuhdr_root/include"
6455         test -d /opt/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search /opt/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
6456 }
6457
6458 test "$HOME" != "$prefix" && \
6459 test -d "$HOME" && \
6460 (test $prefix = NONE || test "$HOME" != "$prefix") && {
6461         test -n "$verbose" && echo "    ... testing for include-directories under $HOME"
6462         test -d $HOME/include &&          cf_search="$cf_search $HOME/include"
6463         test -d $HOME/include/$cf_ncuhdr_root &&       cf_search="$cf_search $HOME/include/$cf_ncuhdr_root"
6464         test -d $HOME/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search $HOME/include/$cf_ncuhdr_root/include"
6465         test -d $HOME/$cf_ncuhdr_root/include &&       cf_search="$cf_search $HOME/$cf_ncuhdr_root/include"
6466         test -d $HOME/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search $HOME/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
6467 }
6468
6469 test "$includedir" != NONE && \
6470 test "$includedir" != "/usr/include" && \
6471 test -d "$includedir" && {
6472         test -d $includedir &&    cf_search="$cf_search $includedir"
6473         test -d $includedir/$cf_ncuhdr_root && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
6474 }
6475
6476 test "$oldincludedir" != NONE && \
6477 test "$oldincludedir" != "/usr/include" && \
6478 test -d "$oldincludedir" && {
6479         test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
6480         test -d $oldincludedir/$cf_ncuhdr_root && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
6481 }
6482
6483 cf_search="$cf_search $cf_header_path_list"
6484
6485         test -n "$verbose" && echo search path $cf_search
6486         cf_save2_CPPFLAGS="$CPPFLAGS"
6487         for cf_incdir in $cf_search
6488         do
6489
6490 if test -n "$cf_incdir" ; then
6491   for cf_add_incdir in $cf_incdir
6492   do
6493         while test $cf_add_incdir != /usr/include
6494         do
6495           if test -d $cf_add_incdir
6496           then
6497                 cf_have_incdir=no
6498                 if test -n "$CFLAGS$CPPFLAGS" ; then
6499                   # a loop is needed to ensure we can add subdirs of existing dirs
6500                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
6501                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
6502                           cf_have_incdir=yes; break
6503                         fi
6504                   done
6505                 fi
6506
6507                 if test "$cf_have_incdir" = no ; then
6508                   if test "$cf_add_incdir" = /usr/local/include ; then
6509                         if test "$GCC" = yes
6510                         then
6511                           cf_save_CPPFLAGS=$CPPFLAGS
6512                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6513                           cat >conftest.$ac_ext <<_ACEOF
6514 #line 6514 "configure"
6515 #include "confdefs.h"
6516 #include <stdio.h>
6517 int
6518 main ()
6519 {
6520 printf("Hello")
6521   ;
6522   return 0;
6523 }
6524 _ACEOF
6525 rm -f conftest.$ac_objext
6526 if { (eval echo "$as_me:6526: \"$ac_compile\"") >&5
6527   (eval $ac_compile) 2>&5
6528   ac_status=$?
6529   echo "$as_me:6529: \$? = $ac_status" >&5
6530   (exit $ac_status); } &&
6531          { ac_try='test -s conftest.$ac_objext'
6532   { (eval echo "$as_me:6532: \"$ac_try\"") >&5
6533   (eval $ac_try) 2>&5
6534   ac_status=$?
6535   echo "$as_me:6535: \$? = $ac_status" >&5
6536   (exit $ac_status); }; }; then
6537   :
6538 else
6539   echo "$as_me: failed program was:" >&5
6540 cat conftest.$ac_ext >&5
6541 cf_have_incdir=yes
6542 fi
6543 rm -f conftest.$ac_objext conftest.$ac_ext
6544                           CPPFLAGS=$cf_save_CPPFLAGS
6545                         fi
6546                   fi
6547                 fi
6548
6549                 if test "$cf_have_incdir" = no ; then
6550                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
6551
6552 echo "${as_me:-configure}:6552: testing adding $cf_add_incdir to include-path ..." 1>&5
6553
6554                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6555
6556                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
6557                   test "$cf_top_incdir" = "$cf_add_incdir" && break
6558                   cf_add_incdir="$cf_top_incdir"
6559                 else
6560                   break
6561                 fi
6562           fi
6563         done
6564   done
6565 fi
6566
6567                 for cf_header in \
6568                         ncurses.h \
6569                         curses.h
6570                 do
6571
6572         cat >conftest.$ac_ext <<_ACEOF
6573 #line 6573 "configure"
6574 #include "confdefs.h"
6575
6576 #include <$cf_header>
6577 int
6578 main ()
6579 {
6580
6581 #ifdef NCURSES_VERSION
6582
6583 printf("%s\n", NCURSES_VERSION);
6584 #else
6585 #ifdef __NCURSES_H
6586 printf("old\n");
6587 #else
6588         make an error
6589 #endif
6590 #endif
6591
6592   ;
6593   return 0;
6594 }
6595 _ACEOF
6596 rm -f conftest.$ac_objext
6597 if { (eval echo "$as_me:6597: \"$ac_compile\"") >&5
6598   (eval $ac_compile) 2>&5
6599   ac_status=$?
6600   echo "$as_me:6600: \$? = $ac_status" >&5
6601   (exit $ac_status); } &&
6602          { ac_try='test -s conftest.$ac_objext'
6603   { (eval echo "$as_me:6603: \"$ac_try\"") >&5
6604   (eval $ac_try) 2>&5
6605   ac_status=$?
6606   echo "$as_me:6606: \$? = $ac_status" >&5
6607   (exit $ac_status); }; }; then
6608   cf_cv_ncurses_h2=$cf_header
6609
6610 else
6611   echo "$as_me: failed program was:" >&5
6612 cat conftest.$ac_ext >&5
6613 cf_cv_ncurses_h2=no
6614 fi
6615 rm -f conftest.$ac_objext conftest.$ac_ext
6616
6617                         if test "$cf_cv_ncurses_h2" != no ; then
6618                                 cf_cv_ncurses_h2=$cf_incdir/$cf_header
6619                                 test -n "$verbose" && echo $ac_n "      ... found $ac_c" 1>&6
6620                                 break
6621                         fi
6622                         test -n "$verbose" && echo "    ... tested $cf_incdir/$cf_header" 1>&6
6623                 done
6624                 CPPFLAGS="$cf_save2_CPPFLAGS"
6625                 test "$cf_cv_ncurses_h2" != no && break
6626         done
6627         test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:6627: error: not found" >&5
6628 echo "$as_me: error: not found" >&2;}
6629    { (exit 1); exit 1; }; }
6630
6631 fi
6632 echo "$as_me:6632: result: $cf_cv_ncurses_h2" >&5
6633 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
6634
6635         cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's%/[^/]*$%%'`
6636         cf_cv_ncurses_header=`basename $cf_cv_ncurses_h2`
6637         if test `basename $cf_1st_incdir` = $cf_ncuhdr_root ; then
6638                 cf_cv_ncurses_header=$cf_ncuhdr_root/$cf_cv_ncurses_header
6639         fi
6640
6641 if test -n "$cf_1st_incdir" ; then
6642   for cf_add_incdir in $cf_1st_incdir
6643   do
6644         while test $cf_add_incdir != /usr/include
6645         do
6646           if test -d $cf_add_incdir
6647           then
6648                 cf_have_incdir=no
6649                 if test -n "$CFLAGS$CPPFLAGS" ; then
6650                   # a loop is needed to ensure we can add subdirs of existing dirs
6651                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
6652                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
6653                           cf_have_incdir=yes; break
6654                         fi
6655                   done
6656                 fi
6657
6658                 if test "$cf_have_incdir" = no ; then
6659                   if test "$cf_add_incdir" = /usr/local/include ; then
6660                         if test "$GCC" = yes
6661                         then
6662                           cf_save_CPPFLAGS=$CPPFLAGS
6663                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6664                           cat >conftest.$ac_ext <<_ACEOF
6665 #line 6665 "configure"
6666 #include "confdefs.h"
6667 #include <stdio.h>
6668 int
6669 main ()
6670 {
6671 printf("Hello")
6672   ;
6673   return 0;
6674 }
6675 _ACEOF
6676 rm -f conftest.$ac_objext
6677 if { (eval echo "$as_me:6677: \"$ac_compile\"") >&5
6678   (eval $ac_compile) 2>&5
6679   ac_status=$?
6680   echo "$as_me:6680: \$? = $ac_status" >&5
6681   (exit $ac_status); } &&
6682          { ac_try='test -s conftest.$ac_objext'
6683   { (eval echo "$as_me:6683: \"$ac_try\"") >&5
6684   (eval $ac_try) 2>&5
6685   ac_status=$?
6686   echo "$as_me:6686: \$? = $ac_status" >&5
6687   (exit $ac_status); }; }; then
6688   :
6689 else
6690   echo "$as_me: failed program was:" >&5
6691 cat conftest.$ac_ext >&5
6692 cf_have_incdir=yes
6693 fi
6694 rm -f conftest.$ac_objext conftest.$ac_ext
6695                           CPPFLAGS=$cf_save_CPPFLAGS
6696                         fi
6697                   fi
6698                 fi
6699
6700                 if test "$cf_have_incdir" = no ; then
6701                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
6702
6703 echo "${as_me:-configure}:6703: testing adding $cf_add_incdir to include-path ..." 1>&5
6704
6705                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6706
6707                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
6708                   test "$cf_top_incdir" = "$cf_add_incdir" && break
6709                   cf_add_incdir="$cf_top_incdir"
6710                 else
6711                   break
6712                 fi
6713           fi
6714         done
6715   done
6716 fi
6717
6718 fi
6719
6720 # Set definitions to allow ifdef'ing for ncurses.h
6721
6722 case $cf_cv_ncurses_header in # (vi
6723 *ncurses.h)
6724         cat >>confdefs.h <<\EOF
6725 #define HAVE_NCURSES_H 1
6726 EOF
6727
6728         ;;
6729 esac
6730
6731 case $cf_cv_ncurses_header in # (vi
6732 ncurses/curses.h|ncurses/ncurses.h)
6733         cat >>confdefs.h <<\EOF
6734 #define HAVE_NCURSES_NCURSES_H 1
6735 EOF
6736
6737         ;;
6738 ncursesw/curses.h|ncursesw/ncurses.h)
6739         cat >>confdefs.h <<\EOF
6740 #define HAVE_NCURSESW_NCURSES_H 1
6741 EOF
6742
6743         ;;
6744 esac
6745
6746 echo "$as_me:6746: checking for terminfo header" >&5
6747 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
6748 if test "${cf_cv_term_header+set}" = set; then
6749   echo $ECHO_N "(cached) $ECHO_C" >&6
6750 else
6751
6752 case ${cf_cv_ncurses_header} in #(vi
6753 */ncurses.h|*/ncursesw.h) #(vi
6754         cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
6755         ;;
6756 *)
6757         cf_term_header=term.h
6758         ;;
6759 esac
6760
6761 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
6762 do
6763 cat >conftest.$ac_ext <<_ACEOF
6764 #line 6764 "configure"
6765 #include "confdefs.h"
6766 #include <stdio.h>
6767 #include <${cf_cv_ncurses_header:-curses.h}>
6768 #include <$cf_test>
6769
6770 int
6771 main ()
6772 {
6773 int x = auto_left_margin
6774   ;
6775   return 0;
6776 }
6777 _ACEOF
6778 rm -f conftest.$ac_objext
6779 if { (eval echo "$as_me:6779: \"$ac_compile\"") >&5
6780   (eval $ac_compile) 2>&5
6781   ac_status=$?
6782   echo "$as_me:6782: \$? = $ac_status" >&5
6783   (exit $ac_status); } &&
6784          { ac_try='test -s conftest.$ac_objext'
6785   { (eval echo "$as_me:6785: \"$ac_try\"") >&5
6786   (eval $ac_try) 2>&5
6787   ac_status=$?
6788   echo "$as_me:6788: \$? = $ac_status" >&5
6789   (exit $ac_status); }; }; then
6790
6791         cf_cv_term_header="$cf_test"
6792 else
6793   echo "$as_me: failed program was:" >&5
6794 cat conftest.$ac_ext >&5
6795
6796         cf_cv_term_header=unknown
6797
6798 fi
6799 rm -f conftest.$ac_objext conftest.$ac_ext
6800         test "$cf_cv_term_header" != unknown && break
6801 done
6802
6803 fi
6804 echo "$as_me:6804: result: $cf_cv_term_header" >&5
6805 echo "${ECHO_T}$cf_cv_term_header" >&6
6806
6807 # Set definitions to allow ifdef'ing to accommodate subdirectories
6808
6809 case $cf_cv_term_header in # (vi
6810 *term.h)
6811         cat >>confdefs.h <<\EOF
6812 #define HAVE_TERM_H 1
6813 EOF
6814
6815         ;;
6816 esac
6817
6818 case $cf_cv_term_header in # (vi
6819 ncurses/term.h) #(vi
6820         cat >>confdefs.h <<\EOF
6821 #define HAVE_NCURSES_TERM_H 1
6822 EOF
6823
6824         ;;
6825 ncursesw/term.h)
6826         cat >>confdefs.h <<\EOF
6827 #define HAVE_NCURSESW_TERM_H 1
6828 EOF
6829
6830         ;;
6831 esac
6832
6833 # some applications need this, but should check for NCURSES_VERSION
6834 cat >>confdefs.h <<\EOF
6835 #define NCURSES 1
6836 EOF
6837
6838 echo "$as_me:6838: checking for ncurses version" >&5
6839 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
6840 if test "${cf_cv_ncurses_version+set}" = set; then
6841   echo $ECHO_N "(cached) $ECHO_C" >&6
6842 else
6843
6844         cf_cv_ncurses_version=no
6845         cf_tempfile=out$$
6846         rm -f $cf_tempfile
6847         if test "$cross_compiling" = yes; then
6848
6849         # This will not work if the preprocessor splits the line after the
6850         # Autoconf token.  The 'unproto' program does that.
6851         cat > conftest.$ac_ext <<EOF
6852 #include <${cf_cv_ncurses_header:-curses.h}>
6853 #undef Autoconf
6854 #ifdef NCURSES_VERSION
6855 Autoconf NCURSES_VERSION
6856 #else
6857 #ifdef __NCURSES_H
6858 Autoconf "old"
6859 #endif
6860 ;
6861 #endif
6862 EOF
6863         cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
6864         { (eval echo "$as_me:6864: \"$cf_try\"") >&5
6865   (eval $cf_try) 2>&5
6866   ac_status=$?
6867   echo "$as_me:6867: \$? = $ac_status" >&5
6868   (exit $ac_status); }
6869         if test -f conftest.out ; then
6870                 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
6871                 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
6872                 rm -f conftest.out
6873         fi
6874
6875 else
6876   cat >conftest.$ac_ext <<_ACEOF
6877 #line 6877 "configure"
6878 #include "confdefs.h"
6879
6880 #include <${cf_cv_ncurses_header:-curses.h}>
6881 #include <stdio.h>
6882 int main()
6883 {
6884         FILE *fp = fopen("$cf_tempfile", "w");
6885 #ifdef NCURSES_VERSION
6886 # ifdef NCURSES_VERSION_PATCH
6887         fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
6888 # else
6889         fprintf(fp, "%s\n", NCURSES_VERSION);
6890 # endif
6891 #else
6892 # ifdef __NCURSES_H
6893         fprintf(fp, "old\n");
6894 # else
6895         make an error
6896 # endif
6897 #endif
6898         ${cf_cv_main_return:-return}(0);
6899 }
6900 _ACEOF
6901 rm -f conftest$ac_exeext
6902 if { (eval echo "$as_me:6902: \"$ac_link\"") >&5
6903   (eval $ac_link) 2>&5
6904   ac_status=$?
6905   echo "$as_me:6905: \$? = $ac_status" >&5
6906   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6907   { (eval echo "$as_me:6907: \"$ac_try\"") >&5
6908   (eval $ac_try) 2>&5
6909   ac_status=$?
6910   echo "$as_me:6910: \$? = $ac_status" >&5
6911   (exit $ac_status); }; }; then
6912
6913         cf_cv_ncurses_version=`cat $cf_tempfile`
6914 else
6915   echo "$as_me: program exited with status $ac_status" >&5
6916 echo "$as_me: failed program was:" >&5
6917 cat conftest.$ac_ext >&5
6918 fi
6919 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6920 fi
6921         rm -f $cf_tempfile
6922
6923 fi
6924 echo "$as_me:6924: result: $cf_cv_ncurses_version" >&5
6925 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
6926 test "$cf_cv_ncurses_version" = no || cat >>confdefs.h <<\EOF
6927 #define NCURSES 1
6928 EOF
6929
6930 cf_nculib_root=ncurses
6931         # This works, except for the special case where we find gpm, but
6932         # ncurses is in a nonstandard location via $LIBS, and we really want
6933         # to link gpm.
6934 cf_ncurses_LIBS=""
6935 cf_ncurses_SAVE="$LIBS"
6936 echo "$as_me:6936: checking for Gpm_Open in -lgpm" >&5
6937 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
6938 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
6939   echo $ECHO_N "(cached) $ECHO_C" >&6
6940 else
6941   ac_check_lib_save_LIBS=$LIBS
6942 LIBS="-lgpm  $LIBS"
6943 cat >conftest.$ac_ext <<_ACEOF
6944 #line 6944 "configure"
6945 #include "confdefs.h"
6946
6947 /* Override any gcc2 internal prototype to avoid an error.  */
6948 #ifdef __cplusplus
6949 extern "C"
6950 #endif
6951 /* We use char because int might match the return type of a gcc2
6952    builtin and then its argument prototype would still apply.  */
6953 char Gpm_Open ();
6954 int
6955 main ()
6956 {
6957 Gpm_Open ();
6958   ;
6959   return 0;
6960 }
6961 _ACEOF
6962 rm -f conftest.$ac_objext conftest$ac_exeext
6963 if { (eval echo "$as_me:6963: \"$ac_link\"") >&5
6964   (eval $ac_link) 2>&5
6965   ac_status=$?
6966   echo "$as_me:6966: \$? = $ac_status" >&5
6967   (exit $ac_status); } &&
6968          { ac_try='test -s conftest$ac_exeext'
6969   { (eval echo "$as_me:6969: \"$ac_try\"") >&5
6970   (eval $ac_try) 2>&5
6971   ac_status=$?
6972   echo "$as_me:6972: \$? = $ac_status" >&5
6973   (exit $ac_status); }; }; then
6974   ac_cv_lib_gpm_Gpm_Open=yes
6975 else
6976   echo "$as_me: failed program was:" >&5
6977 cat conftest.$ac_ext >&5
6978 ac_cv_lib_gpm_Gpm_Open=no
6979 fi
6980 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6981 LIBS=$ac_check_lib_save_LIBS
6982 fi
6983 echo "$as_me:6983: result: $ac_cv_lib_gpm_Gpm_Open" >&5
6984 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
6985 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
6986   echo "$as_me:6986: checking for initscr in -lgpm" >&5
6987 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
6988 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
6989   echo $ECHO_N "(cached) $ECHO_C" >&6
6990 else
6991   ac_check_lib_save_LIBS=$LIBS
6992 LIBS="-lgpm  $LIBS"
6993 cat >conftest.$ac_ext <<_ACEOF
6994 #line 6994 "configure"
6995 #include "confdefs.h"
6996
6997 /* Override any gcc2 internal prototype to avoid an error.  */
6998 #ifdef __cplusplus
6999 extern "C"
7000 #endif
7001 /* We use char because int might match the return type of a gcc2
7002    builtin and then its argument prototype would still apply.  */
7003 char initscr ();
7004 int
7005 main ()
7006 {
7007 initscr ();
7008   ;
7009   return 0;
7010 }
7011 _ACEOF
7012 rm -f conftest.$ac_objext conftest$ac_exeext
7013 if { (eval echo "$as_me:7013: \"$ac_link\"") >&5
7014   (eval $ac_link) 2>&5
7015   ac_status=$?
7016   echo "$as_me:7016: \$? = $ac_status" >&5
7017   (exit $ac_status); } &&
7018          { ac_try='test -s conftest$ac_exeext'
7019   { (eval echo "$as_me:7019: \"$ac_try\"") >&5
7020   (eval $ac_try) 2>&5
7021   ac_status=$?
7022   echo "$as_me:7022: \$? = $ac_status" >&5
7023   (exit $ac_status); }; }; then
7024   ac_cv_lib_gpm_initscr=yes
7025 else
7026   echo "$as_me: failed program was:" >&5
7027 cat conftest.$ac_ext >&5
7028 ac_cv_lib_gpm_initscr=no
7029 fi
7030 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7031 LIBS=$ac_check_lib_save_LIBS
7032 fi
7033 echo "$as_me:7033: result: $ac_cv_lib_gpm_initscr" >&5
7034 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
7035 if test $ac_cv_lib_gpm_initscr = yes; then
7036   LIBS="$cf_ncurses_SAVE"
7037 else
7038   cf_ncurses_LIBS="-lgpm"
7039 fi
7040
7041 fi
7042
7043 case $host_os in #(vi
7044 freebsd*)
7045         # This is only necessary if you are linking against an obsolete
7046         # version of ncurses (but it should do no harm, since it's static).
7047         if test "$cf_nculib_root" = ncurses ; then
7048                 echo "$as_me:7048: checking for tgoto in -lmytinfo" >&5
7049 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
7050 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
7051   echo $ECHO_N "(cached) $ECHO_C" >&6
7052 else
7053   ac_check_lib_save_LIBS=$LIBS
7054 LIBS="-lmytinfo  $LIBS"
7055 cat >conftest.$ac_ext <<_ACEOF
7056 #line 7056 "configure"
7057 #include "confdefs.h"
7058
7059 /* Override any gcc2 internal prototype to avoid an error.  */
7060 #ifdef __cplusplus
7061 extern "C"
7062 #endif
7063 /* We use char because int might match the return type of a gcc2
7064    builtin and then its argument prototype would still apply.  */
7065 char tgoto ();
7066 int
7067 main ()
7068 {
7069 tgoto ();
7070   ;
7071   return 0;
7072 }
7073 _ACEOF
7074 rm -f conftest.$ac_objext conftest$ac_exeext
7075 if { (eval echo "$as_me:7075: \"$ac_link\"") >&5
7076   (eval $ac_link) 2>&5
7077   ac_status=$?
7078   echo "$as_me:7078: \$? = $ac_status" >&5
7079   (exit $ac_status); } &&
7080          { ac_try='test -s conftest$ac_exeext'
7081   { (eval echo "$as_me:7081: \"$ac_try\"") >&5
7082   (eval $ac_try) 2>&5
7083   ac_status=$?
7084   echo "$as_me:7084: \$? = $ac_status" >&5
7085   (exit $ac_status); }; }; then
7086   ac_cv_lib_mytinfo_tgoto=yes
7087 else
7088   echo "$as_me: failed program was:" >&5
7089 cat conftest.$ac_ext >&5
7090 ac_cv_lib_mytinfo_tgoto=no
7091 fi
7092 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7093 LIBS=$ac_check_lib_save_LIBS
7094 fi
7095 echo "$as_me:7095: result: $ac_cv_lib_mytinfo_tgoto" >&5
7096 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
7097 if test $ac_cv_lib_mytinfo_tgoto = yes; then
7098   cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
7099 fi
7100
7101         fi
7102         ;;
7103 esac
7104
7105 LIBS="$cf_ncurses_LIBS $LIBS"
7106
7107 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
7108 then
7109         LIBS="-l$cf_nculib_root $LIBS"
7110 else
7111
7112         eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
7113         cf_libdir=""
7114         echo "$as_me:7114: checking for initscr" >&5
7115 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
7116 if test "${ac_cv_func_initscr+set}" = set; then
7117   echo $ECHO_N "(cached) $ECHO_C" >&6
7118 else
7119   cat >conftest.$ac_ext <<_ACEOF
7120 #line 7120 "configure"
7121 #include "confdefs.h"
7122 /* System header to define __stub macros and hopefully few prototypes,
7123     which can conflict with char initscr (); below.  */
7124 #include <assert.h>
7125 /* Override any gcc2 internal prototype to avoid an error.  */
7126 #ifdef __cplusplus
7127 extern "C"
7128 #endif
7129 /* We use char because int might match the return type of a gcc2
7130    builtin and then its argument prototype would still apply.  */
7131 char initscr ();
7132 char (*f) ();
7133
7134 int
7135 main ()
7136 {
7137 /* The GNU C library defines this for functions which it implements
7138     to always fail with ENOSYS.  Some functions are actually named
7139     something starting with __ and the normal name is an alias.  */
7140 #if defined (__stub_initscr) || defined (__stub___initscr)
7141 choke me
7142 #else
7143 f = initscr;
7144 #endif
7145
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   ac_cv_func_initscr=yes
7163 else
7164   echo "$as_me: failed program was:" >&5
7165 cat conftest.$ac_ext >&5
7166 ac_cv_func_initscr=no
7167 fi
7168 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7169 fi
7170 echo "$as_me:7170: result: $ac_cv_func_initscr" >&5
7171 echo "${ECHO_T}$ac_cv_func_initscr" >&6
7172 if test $ac_cv_func_initscr = yes; then
7173   eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
7174 else
7175
7176                 cf_save_LIBS="$LIBS"
7177                 echo "$as_me:7177: checking for initscr in -l$cf_nculib_root" >&5
7178 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
7179                 LIBS="-l$cf_nculib_root $LIBS"
7180                 cat >conftest.$ac_ext <<_ACEOF
7181 #line 7181 "configure"
7182 #include "confdefs.h"
7183 #include <${cf_cv_ncurses_header:-curses.h}>
7184 int
7185 main ()
7186 {
7187 initscr()
7188   ;
7189   return 0;
7190 }
7191 _ACEOF
7192 rm -f conftest.$ac_objext conftest$ac_exeext
7193 if { (eval echo "$as_me:7193: \"$ac_link\"") >&5
7194   (eval $ac_link) 2>&5
7195   ac_status=$?
7196   echo "$as_me:7196: \$? = $ac_status" >&5
7197   (exit $ac_status); } &&
7198          { ac_try='test -s conftest$ac_exeext'
7199   { (eval echo "$as_me:7199: \"$ac_try\"") >&5
7200   (eval $ac_try) 2>&5
7201   ac_status=$?
7202   echo "$as_me:7202: \$? = $ac_status" >&5
7203   (exit $ac_status); }; }; then
7204   echo "$as_me:7204: result: yes" >&5
7205 echo "${ECHO_T}yes" >&6
7206                          eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
7207
7208 else
7209   echo "$as_me: failed program was:" >&5
7210 cat conftest.$ac_ext >&5
7211 echo "$as_me:7211: result: no" >&5
7212 echo "${ECHO_T}no" >&6
7213
7214 cf_search=
7215 cf_library_path_list=""
7216 if test -n "${LDFLAGS}${LIBS}" ; then
7217         for cf_library_path in $LDFLAGS $LIBS
7218         do
7219                 case $cf_library_path in #(vi
7220                 -L*)
7221                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
7222
7223 test "$cf_library_path" != "NONE" && \
7224 test -d "$cf_library_path" && \
7225  {
7226         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
7227         test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
7228         test -d $cf_library_path/lib/$cf_nculib_root &&       cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
7229         test -d $cf_library_path/lib/$cf_nculib_root/lib &&    cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
7230         test -d $cf_library_path/$cf_nculib_root/lib &&       cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
7231         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"
7232 }
7233
7234                         cf_library_path_list="$cf_library_path_list $cf_search"
7235                         ;;
7236                 esac
7237         done
7238 fi
7239
7240 cf_search=
7241
7242 test "/usr" != "$prefix" && \
7243 test -d "/usr" && \
7244 (test $prefix = NONE || test "/usr" != "$prefix") && {
7245         test -n "$verbose" && echo "    ... testing for lib-directories under /usr"
7246         test -d /usr/lib &&          cf_search="$cf_search /usr/lib"
7247         test -d /usr/lib/$cf_nculib_root &&       cf_search="$cf_search /usr/lib/$cf_nculib_root"
7248         test -d /usr/lib/$cf_nculib_root/lib &&    cf_search="$cf_search /usr/lib/$cf_nculib_root/lib"
7249         test -d /usr/$cf_nculib_root/lib &&       cf_search="$cf_search /usr/$cf_nculib_root/lib"
7250         test -d /usr/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search /usr/$cf_nculib_root/lib/$cf_nculib_root"
7251 }
7252
7253 test "$prefix" != "NONE" && \
7254 test -d "$prefix" && \
7255  {
7256         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
7257         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
7258         test -d $prefix/lib/$cf_nculib_root &&       cf_search="$cf_search $prefix/lib/$cf_nculib_root"
7259         test -d $prefix/lib/$cf_nculib_root/lib &&    cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
7260         test -d $prefix/$cf_nculib_root/lib &&       cf_search="$cf_search $prefix/$cf_nculib_root/lib"
7261         test -d $prefix/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
7262 }
7263
7264 test "/usr/local" != "$prefix" && \
7265 test -d "/usr/local" && \
7266 (test $prefix = NONE || test "/usr/local" != "$prefix") && {
7267         test -n "$verbose" && echo "    ... testing for lib-directories under /usr/local"
7268         test -d /usr/local/lib &&          cf_search="$cf_search /usr/local/lib"
7269         test -d /usr/local/lib/$cf_nculib_root &&       cf_search="$cf_search /usr/local/lib/$cf_nculib_root"
7270         test -d /usr/local/lib/$cf_nculib_root/lib &&    cf_search="$cf_search /usr/local/lib/$cf_nculib_root/lib"
7271         test -d /usr/local/$cf_nculib_root/lib &&       cf_search="$cf_search /usr/local/$cf_nculib_root/lib"
7272         test -d /usr/local/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search /usr/local/$cf_nculib_root/lib/$cf_nculib_root"
7273 }
7274
7275 test "/opt" != "$prefix" && \
7276 test -d "/opt" && \
7277 (test $prefix = NONE || test "/opt" != "$prefix") && {
7278         test -n "$verbose" && echo "    ... testing for lib-directories under /opt"
7279         test -d /opt/lib &&          cf_search="$cf_search /opt/lib"
7280         test -d /opt/lib/$cf_nculib_root &&       cf_search="$cf_search /opt/lib/$cf_nculib_root"
7281         test -d /opt/lib/$cf_nculib_root/lib &&    cf_search="$cf_search /opt/lib/$cf_nculib_root/lib"
7282         test -d /opt/$cf_nculib_root/lib &&       cf_search="$cf_search /opt/$cf_nculib_root/lib"
7283         test -d /opt/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search /opt/$cf_nculib_root/lib/$cf_nculib_root"
7284 }
7285
7286 test "$HOME" != "$prefix" && \
7287 test -d "$HOME" && \
7288 (test $prefix = NONE || test "$HOME" != "$prefix") && {
7289         test -n "$verbose" && echo "    ... testing for lib-directories under $HOME"
7290         test -d $HOME/lib &&          cf_search="$cf_search $HOME/lib"
7291         test -d $HOME/lib/$cf_nculib_root &&       cf_search="$cf_search $HOME/lib/$cf_nculib_root"
7292         test -d $HOME/lib/$cf_nculib_root/lib &&    cf_search="$cf_search $HOME/lib/$cf_nculib_root/lib"
7293         test -d $HOME/$cf_nculib_root/lib &&       cf_search="$cf_search $HOME/$cf_nculib_root/lib"
7294         test -d $HOME/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search $HOME/$cf_nculib_root/lib/$cf_nculib_root"
7295 }
7296
7297 cf_search="$cf_library_path_list $cf_search"
7298
7299                         for cf_libdir in $cf_search
7300                         do
7301                                 echo "$as_me:7301: checking for -l$cf_nculib_root in $cf_libdir" >&5
7302 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
7303                                 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
7304                                 cat >conftest.$ac_ext <<_ACEOF
7305 #line 7305 "configure"
7306 #include "confdefs.h"
7307 #include <${cf_cv_ncurses_header:-curses.h}>
7308 int
7309 main ()
7310 {
7311 initscr()
7312   ;
7313   return 0;
7314 }
7315 _ACEOF
7316 rm -f conftest.$ac_objext conftest$ac_exeext
7317 if { (eval echo "$as_me:7317: \"$ac_link\"") >&5
7318   (eval $ac_link) 2>&5
7319   ac_status=$?
7320   echo "$as_me:7320: \$? = $ac_status" >&5
7321   (exit $ac_status); } &&
7322          { ac_try='test -s conftest$ac_exeext'
7323   { (eval echo "$as_me:7323: \"$ac_try\"") >&5
7324   (eval $ac_try) 2>&5
7325   ac_status=$?
7326   echo "$as_me:7326: \$? = $ac_status" >&5
7327   (exit $ac_status); }; }; then
7328   echo "$as_me:7328: result: yes" >&5
7329 echo "${ECHO_T}yes" >&6
7330                                          eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
7331                                          break
7332 else
7333   echo "$as_me: failed program was:" >&5
7334 cat conftest.$ac_ext >&5
7335 echo "$as_me:7335: result: no" >&5
7336 echo "${ECHO_T}no" >&6
7337                                          LIBS="$cf_save_LIBS"
7338 fi
7339 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7340                         done
7341
7342 fi
7343 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7344
7345 fi
7346
7347 eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root
7348
7349 if test $cf_found_library = no ; then
7350         { { echo "$as_me:7350: error: Cannot link $cf_nculib_root library" >&5
7351 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
7352    { (exit 1); exit 1; }; }
7353 fi
7354
7355 fi
7356
7357 if test -n "$cf_ncurses_LIBS" ; then
7358         echo "$as_me:7358: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
7359 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
7360         cf_ncurses_SAVE="$LIBS"
7361         for p in $cf_ncurses_LIBS ; do
7362                 q=`echo $LIBS | sed -e "s%$p %%" -e "s%$p$%%"`
7363                 if test "$q" != "$LIBS" ; then
7364                         LIBS="$q"
7365                 fi
7366         done
7367         cat >conftest.$ac_ext <<_ACEOF
7368 #line 7368 "configure"
7369 #include "confdefs.h"
7370 #include <${cf_cv_ncurses_header:-curses.h}>
7371 int
7372 main ()
7373 {
7374 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
7375   ;
7376   return 0;
7377 }
7378 _ACEOF
7379 rm -f conftest.$ac_objext conftest$ac_exeext
7380 if { (eval echo "$as_me:7380: \"$ac_link\"") >&5
7381   (eval $ac_link) 2>&5
7382   ac_status=$?
7383   echo "$as_me:7383: \$? = $ac_status" >&5
7384   (exit $ac_status); } &&
7385          { ac_try='test -s conftest$ac_exeext'
7386   { (eval echo "$as_me:7386: \"$ac_try\"") >&5
7387   (eval $ac_try) 2>&5
7388   ac_status=$?
7389   echo "$as_me:7389: \$? = $ac_status" >&5
7390   (exit $ac_status); }; }; then
7391   echo "$as_me:7391: result: yes" >&5
7392 echo "${ECHO_T}yes" >&6
7393 else
7394   echo "$as_me: failed program was:" >&5
7395 cat conftest.$ac_ext >&5
7396 echo "$as_me:7396: result: no" >&5
7397 echo "${ECHO_T}no" >&6
7398                  LIBS="$cf_ncurses_SAVE"
7399 fi
7400 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7401 fi
7402
7403 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
7404
7405 cat >>confdefs.h <<EOF
7406 #define $cf_nculib_ROOT 1
7407 EOF
7408
7409 fi
7410
7411 fi
7412
7413 if test "$NCURSES_CONFIG" != none ; then
7414
7415 cf_version=`$NCURSES_CONFIG --version`
7416
7417 NCURSES_MAJOR=`echo "$cf_version" | sed -e 's/\..*//'`
7418 NCURSES_MINOR=`echo "$cf_version" | sed -e 's/^[0-9][0-9]*\.//' -e 's/\..*//'`
7419 NCURSES_PATCH=`echo "$cf_version" | sed -e 's/^[0-9][0-9]*\.[0-9][0-9]*\.//'`
7420
7421 # ABI version is not available from headers
7422 cf_cv_abi_version=`$NCURSES_CONFIG --abi-version`
7423
7424 else
7425
7426 for cf_name in MAJOR MINOR PATCH
7427 do
7428 cat >conftest.$ac_ext <<CF_EOF
7429 #include <${cf_cv_ncurses_header:-curses.h}>
7430 AUTOCONF_$cf_name NCURSES_VERSION_$cf_name
7431 CF_EOF
7432         cf_try="$ac_cpp conftest.$ac_ext 2>&5 | fgrep AUTOCONF_$cf_name >conftest.out"
7433         { (eval echo "$as_me:7433: \"$cf_try\"") >&5
7434   (eval $cf_try) 2>&5
7435   ac_status=$?
7436   echo "$as_me:7436: \$? = $ac_status" >&5
7437   (exit $ac_status); }
7438         if test -f conftest.out ; then
7439                 cf_result=`cat conftest.out | sed -e "s/^.*AUTOCONF_$cf_name[   ][      ]*//"`
7440                 eval NCURSES_$cf_name=\"$cf_result\"
7441                 # cat conftest.$ac_ext
7442                 # cat conftest.out
7443         fi
7444 done
7445
7446 cf_cv_abi_version=${NCURSES_MAJOR}
7447
7448 fi
7449
7450 cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
7451
7452 cf_cv_timestamp=`date`
7453
7454 echo "$as_me:7454: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&5
7455 echo "${ECHO_T}Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&6
7456
7457 echo "$as_me:7457: checking if you want to have a library-prefix" >&5
7458 echo $ECHO_N "checking if you want to have a library-prefix... $ECHO_C" >&6
7459
7460 # Check whether --with-lib-prefix or --without-lib-prefix was given.
7461 if test "${with_lib_prefix+set}" = set; then
7462   withval="$with_lib_prefix"
7463   with_lib_prefix=$withval
7464 else
7465   with_lib_prefix=auto
7466 fi;
7467 echo "$as_me:7467: result: $with_lib_prefix" >&5
7468 echo "${ECHO_T}$with_lib_prefix" >&6
7469
7470 if test $with_lib_prefix = auto
7471 then
7472
7473         case $cf_cv_system_name in #(vi
7474         OS/2*|os2*) #(vi
7475         LIB_PREFIX=''
7476         ;;
7477         *)      LIB_PREFIX='lib'
7478         ;;
7479         esac
7480 cf_prefix=$LIB_PREFIX
7481
7482 elif test $with_lib_prefix = no
7483 then
7484         LIB_PREFIX=
7485 else
7486         LIB_PREFIX=$with_lib_prefix
7487 fi
7488
7489 LIB_SUFFIX=
7490
7491 ###############################################################################
7492
7493 if test X"$CC_G_OPT" = X"" ; then
7494         CC_G_OPT='-g'
7495         test -n "$GCC" && test "${ac_cv_prog_cc_g}" != yes && CC_G_OPT=''
7496 fi
7497
7498 echo "$as_me:7498: checking for default loader flags" >&5
7499 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
7500 case $DFT_LWR_MODEL in
7501 normal)  LD_MODEL=''   ;;
7502 debug)   LD_MODEL=$CC_G_OPT ;;
7503 profile) LD_MODEL='-pg';;
7504 shared)  LD_MODEL=''   ;;
7505 esac
7506 echo "$as_me:7506: result: $LD_MODEL" >&5
7507 echo "${ECHO_T}$LD_MODEL" >&6
7508
7509 LD_RPATH_OPT=
7510 echo "$as_me:7510: checking for an rpath option" >&5
7511 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
7512 case $cf_cv_system_name in #(vi
7513 irix*) #(vi
7514         if test "$GCC" = yes; then
7515                 LD_RPATH_OPT="-Wl,-rpath,"
7516         else
7517                 LD_RPATH_OPT="-rpath "
7518         fi
7519         ;;
7520 linux*|gnu*|k*bsd*-gnu) #(vi
7521         LD_RPATH_OPT="-Wl,-rpath,"
7522         ;;
7523 openbsd[2-9].*|mirbsd*) #(vi
7524         LD_RPATH_OPT="-Wl,-rpath,"
7525         ;;
7526 dragonfly*|freebsd*) #(vi
7527         LD_RPATH_OPT="-rpath "
7528         ;;
7529 netbsd*) #(vi
7530         LD_RPATH_OPT="-Wl,-rpath,"
7531         ;;
7532 osf*|mls+*) #(vi
7533         LD_RPATH_OPT="-rpath "
7534         ;;
7535 solaris2*) #(vi
7536         LD_RPATH_OPT="-R"
7537         ;;
7538 *)
7539         ;;
7540 esac
7541 echo "$as_me:7541: result: $LD_RPATH_OPT" >&5
7542 echo "${ECHO_T}$LD_RPATH_OPT" >&6
7543
7544 case "x$LD_RPATH_OPT" in #(vi
7545 x-R*)
7546         echo "$as_me:7546: checking if we need a space after rpath option" >&5
7547 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
7548         cf_save_LIBS="$LIBS"
7549         LIBS="${LD_RPATH_OPT}$libdir $LIBS"
7550         cat >conftest.$ac_ext <<_ACEOF
7551 #line 7551 "configure"
7552 #include "confdefs.h"
7553
7554 int
7555 main ()
7556 {
7557
7558   ;
7559   return 0;
7560 }
7561 _ACEOF
7562 rm -f conftest.$ac_objext conftest$ac_exeext
7563 if { (eval echo "$as_me:7563: \"$ac_link\"") >&5
7564   (eval $ac_link) 2>&5
7565   ac_status=$?
7566   echo "$as_me:7566: \$? = $ac_status" >&5
7567   (exit $ac_status); } &&
7568          { ac_try='test -s conftest$ac_exeext'
7569   { (eval echo "$as_me:7569: \"$ac_try\"") >&5
7570   (eval $ac_try) 2>&5
7571   ac_status=$?
7572   echo "$as_me:7572: \$? = $ac_status" >&5
7573   (exit $ac_status); }; }; then
7574   cf_rpath_space=no
7575 else
7576   echo "$as_me: failed program was:" >&5
7577 cat conftest.$ac_ext >&5
7578 cf_rpath_space=yes
7579 fi
7580 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7581         LIBS="$cf_save_LIBS"
7582         echo "$as_me:7582: result: $cf_rpath_space" >&5
7583 echo "${ECHO_T}$cf_rpath_space" >&6
7584         test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
7585         ;;
7586 esac
7587
7588         LOCAL_LDFLAGS=
7589         LOCAL_LDFLAGS2=
7590         LD_SHARED_OPTS=
7591         INSTALL_LIB="-m 644"
7592
7593         cf_cv_do_symlinks=no
7594         cf_ld_rpath_opt=
7595         test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT"
7596
7597         echo "$as_me:7597: checking if release/abi version should be used for shared libs" >&5
7598 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
7599
7600 # Check whether --with-shlib-version or --without-shlib-version was given.
7601 if test "${with_shlib_version+set}" = set; then
7602   withval="$with_shlib_version"
7603   test -z "$withval" && withval=auto
7604         case $withval in #(vi
7605         yes) #(vi
7606                 cf_cv_shlib_version=auto
7607                 ;;
7608         rel|abi|auto|no) #(vi
7609                 cf_cv_shlib_version=$withval
7610                 ;;
7611         *)
7612                 { { echo "$as_me:7612: error: option value must be one of: rel, abi, auto or no" >&5
7613 echo "$as_me: error: option value must be one of: rel, abi, auto or no" >&2;}
7614    { (exit 1); exit 1; }; }
7615                 ;;
7616         esac
7617
7618 else
7619   cf_cv_shlib_version=auto
7620 fi;
7621         echo "$as_me:7621: result: $cf_cv_shlib_version" >&5
7622 echo "${ECHO_T}$cf_cv_shlib_version" >&6
7623
7624         cf_cv_rm_so_locs=no
7625
7626         # Some less-capable ports of gcc support only -fpic
7627         CC_SHARED_OPTS=
7628         if test "$GCC" = yes
7629         then
7630                 echo "$as_me:7630: checking which $CC option to use" >&5
7631 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
7632                 cf_save_CFLAGS="$CFLAGS"
7633                 for CC_SHARED_OPTS in -fPIC -fpic ''
7634                 do
7635                         CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
7636                         cat >conftest.$ac_ext <<_ACEOF
7637 #line 7637 "configure"
7638 #include "confdefs.h"
7639 #include <stdio.h>
7640 int
7641 main ()
7642 {
7643 int x = 1
7644   ;
7645   return 0;
7646 }
7647 _ACEOF
7648 rm -f conftest.$ac_objext
7649 if { (eval echo "$as_me:7649: \"$ac_compile\"") >&5
7650   (eval $ac_compile) 2>&5
7651   ac_status=$?
7652   echo "$as_me:7652: \$? = $ac_status" >&5
7653   (exit $ac_status); } &&
7654          { ac_try='test -s conftest.$ac_objext'
7655   { (eval echo "$as_me:7655: \"$ac_try\"") >&5
7656   (eval $ac_try) 2>&5
7657   ac_status=$?
7658   echo "$as_me:7658: \$? = $ac_status" >&5
7659   (exit $ac_status); }; }; then
7660   break
7661 else
7662   echo "$as_me: failed program was:" >&5
7663 cat conftest.$ac_ext >&5
7664 fi
7665 rm -f conftest.$ac_objext conftest.$ac_ext
7666                 done
7667                 echo "$as_me:7667: result: $CC_SHARED_OPTS" >&5
7668 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
7669                 CFLAGS="$cf_save_CFLAGS"
7670         fi
7671
7672         cf_cv_shlib_version_infix=no
7673
7674         case $cf_cv_system_name in #(vi
7675         aix4.3-9*|aix[5-7]*) #(vi
7676                 if test "$GCC" = yes; then
7677                         CC_SHARED_OPTS=
7678                         MK_SHARED_LIB='${CC} -shared -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
7679                 else
7680                         # CC_SHARED_OPTS='-qpic=large -G'
7681                         # perhaps "-bM:SRE -bnoentry -bexpall"
7682                         MK_SHARED_LIB='${CC} -G -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
7683                 fi
7684                 ;;
7685         beos*) #(vi
7686                 MK_SHARED_LIB='${CC} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
7687                 ;;
7688         cygwin*) #(vi
7689                 CC_SHARED_OPTS=
7690                 MK_SHARED_LIB='sh ../mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
7691                 cf_cv_shlib_version=cygdll
7692                 cf_cv_shlib_version_infix=cygdll
7693                 cat >mk_shared_lib.sh <<-CF_EOF
7694                 #!/bin/sh
7695                 SHARED_LIB=\$1
7696                 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
7697                 shift
7698                 cat <<-EOF
7699                 Linking shared library
7700                 ** SHARED_LIB \$SHARED_LIB
7701                 ** IMPORT_LIB \$IMPORT_LIB
7702 EOF
7703                 exec \$* -shared -Wl,--out-implib=../lib/\${IMPORT_LIB} -Wl,--export-all-symbols -o ../lib/\${SHARED_LIB}
7704 CF_EOF
7705                 chmod +x mk_shared_lib.sh
7706                 ;;
7707         darwin*) #(vi
7708                 EXTRA_CFLAGS="-no-cpp-precomp"
7709                 CC_SHARED_OPTS="-dynamic"
7710                 MK_SHARED_LIB='${CC} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
7711                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
7712                 cf_cv_shlib_version_infix=yes
7713                 echo "$as_me:7713: checking if ld -search_paths_first works" >&5
7714 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
7715 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
7716   echo $ECHO_N "(cached) $ECHO_C" >&6
7717 else
7718
7719                         cf_save_LDFLAGS=$LDFLAGS
7720                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
7721                         cat >conftest.$ac_ext <<_ACEOF
7722 #line 7722 "configure"
7723 #include "confdefs.h"
7724
7725 int
7726 main ()
7727 {
7728 int i;
7729   ;
7730   return 0;
7731 }
7732 _ACEOF
7733 rm -f conftest.$ac_objext conftest$ac_exeext
7734 if { (eval echo "$as_me:7734: \"$ac_link\"") >&5
7735   (eval $ac_link) 2>&5
7736   ac_status=$?
7737   echo "$as_me:7737: \$? = $ac_status" >&5
7738   (exit $ac_status); } &&
7739          { ac_try='test -s conftest$ac_exeext'
7740   { (eval echo "$as_me:7740: \"$ac_try\"") >&5
7741   (eval $ac_try) 2>&5
7742   ac_status=$?
7743   echo "$as_me:7743: \$? = $ac_status" >&5
7744   (exit $ac_status); }; }; then
7745   cf_cv_ldflags_search_paths_first=yes
7746 else
7747   echo "$as_me: failed program was:" >&5
7748 cat conftest.$ac_ext >&5
7749 cf_cv_ldflags_search_paths_first=no
7750 fi
7751 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7752                                 LDFLAGS=$cf_save_LDFLAGS
7753 fi
7754 echo "$as_me:7754: result: $cf_cv_ldflags_search_paths_first" >&5
7755 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
7756                 if test $cf_cv_ldflags_search_paths_first = yes; then
7757                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
7758                 fi
7759                 ;;
7760         hpux*) #(vi
7761                 # (tested with gcc 2.7.2 -- I don't have c89)
7762                 if test "$GCC" = yes; then
7763                         LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
7764                 else
7765                         CC_SHARED_OPTS='+Z'
7766                         LD_SHARED_OPTS='-Wl,+b,${libdir}'
7767                 fi
7768                 MK_SHARED_LIB='${LD} +b ${libdir} -b -o $@'
7769                 # HP-UX shared libraries must be executable, and should be
7770                 # readonly to exploit a quirk in the memory manager.
7771                 INSTALL_LIB="-m 555"
7772                 ;;
7773         interix*)
7774                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
7775                 if test "$cf_cv_shlib_version" = rel; then
7776                         cf_shared_soname='`basename  .${REL_VERSION}`.${ABI_VERSION}'
7777                 else
7778                         cf_shared_soname='`basename `'
7779                 fi
7780                 CC_SHARED_OPTS=
7781                 MK_SHARED_LIB='${CC} -shared -Wl,-rpath,${RPATH_LIST} -Wl,-h,'$cf_shared_soname' -o '
7782                 ;;
7783         irix*) #(vi
7784                 if test "$cf_cv_enable_rpath" = yes ; then
7785                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
7786                 fi
7787                 # tested with IRIX 5.2 and 'cc'.
7788                 if test "$GCC" != yes; then
7789                         CC_SHARED_OPTS='-KPIC'
7790                         MK_SHARED_LIB='${CC} -shared -rdata_shared -soname `basename $@` -o $@'
7791                 else
7792                         MK_SHARED_LIB='${CC} -shared -Wl,-soname,`basename $@` -o $@'
7793                 fi
7794                 cf_cv_rm_so_locs=yes
7795                 ;;
7796         linux*|gnu*|k*bsd*-gnu) #(vi
7797                 if test "$DFT_LWR_MODEL" = "shared" ; then
7798                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
7799                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
7800                 fi
7801                 if test "$cf_cv_enable_rpath" = yes ; then
7802                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
7803                 fi
7804
7805         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
7806         if test "$cf_cv_shlib_version" = rel; then
7807                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
7808         else
7809                 cf_cv_shared_soname='`basename $@`'
7810         fi
7811
7812                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
7813                 ;;
7814         mingw*) #(vi
7815                 cf_cv_shlib_version=mingw
7816                 cf_cv_shlib_version_infix=mingw
7817                 CC_SHARED_OPTS=
7818                 MK_SHARED_LIB='sh ../mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
7819                 #MK_SHARED_LIB='${CC} ${CFLAGS} -mdll -Wl,-soname,'$cf_cv_shared_soname',-stats -o $[@]'
7820                 #MK_SHARED_LIB='${DLLTOOL} --export-all-symbols --output-exp --output-lib $[@]'
7821                 cat >mk_shared_lib.sh <<-CF_EOF
7822                 #!/bin/sh
7823                 SHARED_LIB=\$1
7824                 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.a/'\`
7825                 shift
7826                 cat <<-EOF
7827                 Linking shared library
7828                 ** SHARED_LIB \$SHARED_LIB
7829                 ** IMPORT_LIB \$IMPORT_LIB
7830 EOF
7831                 exec \$* -shared -Wl,--out-implib=../lib/\${IMPORT_LIB} -Wl,--export-all-symbols -o ../lib/\${SHARED_LIB}
7832 CF_EOF
7833                 chmod +x mk_shared_lib.sh
7834                 ;;
7835         openbsd[2-9].*|mirbsd*) #(vi
7836                 if test "$DFT_LWR_MODEL" = "shared" ; then
7837                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
7838                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
7839                 fi
7840                 if test "$cf_cv_enable_rpath" = yes ; then
7841                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
7842                 fi
7843                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
7844
7845         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
7846         if test "$cf_cv_shlib_version" = rel; then
7847                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
7848         else
7849                 cf_cv_shared_soname='`basename $@`'
7850         fi
7851
7852                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
7853                 ;;
7854         nto-qnx*|openbsd*|freebsd[12].*) #(vi
7855                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
7856                 MK_SHARED_LIB='${LD} -Bshareable -o $@'
7857                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
7858                 ;;
7859         dragonfly*|freebsd*) #(vi
7860                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
7861                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
7862                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
7863                         LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${RPATH_LIST} $LOCAL_LDFLAGS"
7864                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
7865                 fi
7866
7867         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
7868         if test "$cf_cv_shlib_version" = rel; then
7869                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
7870         else
7871                 cf_cv_shared_soname='`basename $@`'
7872         fi
7873
7874                 MK_SHARED_LIB='${LD} -shared -Bshareable -soname=`basename $@` -o $@'
7875                 ;;
7876         netbsd*) #(vi
7877                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
7878                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
7879                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
7880                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
7881                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
7882                         if test "$cf_cv_shlib_version" = auto; then
7883                         if test -f /usr/libexec/ld.elf_so; then
7884                                 cf_cv_shlib_version=abi
7885                         else
7886                                 cf_cv_shlib_version=rel
7887                         fi
7888                         fi
7889
7890         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
7891         if test "$cf_cv_shlib_version" = rel; then
7892                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
7893         else
7894                 cf_cv_shared_soname='`basename $@`'
7895         fi
7896
7897                         MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
7898                 else
7899                         MK_SHARED_LIB='${LD} -shared -Bshareable -o $@'
7900                 fi
7901                 ;;
7902         osf*|mls+*) #(vi
7903                 # tested with OSF/1 V3.2 and 'cc'
7904                 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
7905                 # link with shared libs).
7906                 MK_SHARED_LIB='${LD} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
7907                 case $host_os in #(vi
7908                 osf4*)
7909                         MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
7910                         ;;
7911                 esac
7912                 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
7913                 if test "$DFT_LWR_MODEL" = "shared" ; then
7914                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
7915                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
7916                 fi
7917                 cf_cv_rm_so_locs=yes
7918                 ;;
7919         sco3.2v5*)  # (also uw2* and UW7: hops 13-Apr-98
7920                 # tested with osr5.0.5
7921                 if test "$GCC" != yes; then
7922                         CC_SHARED_OPTS='-belf -KPIC'
7923                 fi
7924                 MK_SHARED_LIB='${LD} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
7925                 if test "$cf_cv_enable_rpath" = yes ; then
7926                         # only way is to set LD_RUN_PATH but no switch for it
7927                         RUN_PATH=$libdir
7928                 fi
7929                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
7930                 LINK_PROGS='LD_RUN_PATH=${libdir}'
7931                 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
7932                 ;;
7933         sunos4*) #(vi
7934                 # tested with SunOS 4.1.1 and gcc 2.7.0
7935                 if test "$GCC" != yes; then
7936                         CC_SHARED_OPTS='-KPIC'
7937                 fi
7938                 MK_SHARED_LIB='${LD} -assert pure-text -o $@'
7939                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
7940                 ;;
7941         solaris2*) #(vi
7942                 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
7943                 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
7944                 if test "$DFT_LWR_MODEL" = "shared" ; then
7945                         LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
7946                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
7947                 fi
7948                 if test "$cf_cv_enable_rpath" = yes ; then
7949                         EXTRA_LDFLAGS="-R \${libdir} $EXTRA_LDFLAGS"
7950                 fi
7951
7952         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
7953         if test "$cf_cv_shlib_version" = rel; then
7954                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
7955         else
7956                 cf_cv_shared_soname='`basename $@`'
7957         fi
7958
7959                 if test "$GCC" != yes; then
7960                         cf_save_CFLAGS="$CFLAGS"
7961                         for cf_shared_opts in -xcode=pic32 -xcode=pic13 -KPIC -Kpic -O
7962                         do
7963                                 CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
7964                                 cat >conftest.$ac_ext <<_ACEOF
7965 #line 7965 "configure"
7966 #include "confdefs.h"
7967 #include <stdio.h>
7968 int
7969 main ()
7970 {
7971 printf("Hello\n");
7972   ;
7973   return 0;
7974 }
7975 _ACEOF
7976 rm -f conftest.$ac_objext
7977 if { (eval echo "$as_me:7977: \"$ac_compile\"") >&5
7978   (eval $ac_compile) 2>&5
7979   ac_status=$?
7980   echo "$as_me:7980: \$? = $ac_status" >&5
7981   (exit $ac_status); } &&
7982          { ac_try='test -s conftest.$ac_objext'
7983   { (eval echo "$as_me:7983: \"$ac_try\"") >&5
7984   (eval $ac_try) 2>&5
7985   ac_status=$?
7986   echo "$as_me:7986: \$? = $ac_status" >&5
7987   (exit $ac_status); }; }; then
7988   break
7989 else
7990   echo "$as_me: failed program was:" >&5
7991 cat conftest.$ac_ext >&5
7992 fi
7993 rm -f conftest.$ac_objext conftest.$ac_ext
7994                         done
7995                         CFLAGS="$cf_save_CFLAGS"
7996                         CC_SHARED_OPTS=$cf_shared_opts
7997                         MK_SHARED_LIB='${CC} -dy -G -h '$cf_cv_shared_soname' -o $@'
7998                 else
7999                         MK_SHARED_LIB='${CC} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
8000                 fi
8001                 ;;
8002         sysv5uw7*|unix_sv*) #(vi
8003                 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
8004                 if test "$GCC" != yes; then
8005                         CC_SHARED_OPTS='-KPIC'
8006                 fi
8007                 MK_SHARED_LIB='${LD} -d y -G -o $@'
8008                 ;;
8009         *)
8010                 CC_SHARED_OPTS='unknown'
8011                 MK_SHARED_LIB='echo unknown'
8012                 ;;
8013         esac
8014
8015         # This works if the last tokens in $MK_SHARED_LIB are the -o target.
8016         case "$cf_cv_shlib_version" in #(vi
8017         rel|abi)
8018                 case "$MK_SHARED_LIB" in #(vi
8019                 *'-o $@') #(vi
8020                         test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
8021                         ;;
8022                 *)
8023                         { echo "$as_me:8023: WARNING: ignored --with-shlib-version" >&5
8024 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
8025                         ;;
8026                 esac
8027                 ;;
8028         esac
8029
8030         # RPATH_LIST is a colon-separated list of directories
8031         test -n "$cf_ld_rpath_opt" && MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${RPATH_LIST}"
8032         test -z "$RPATH_LIST" && RPATH_LIST="\${libdir}"
8033
8034         test -n "$verbose" && echo "    CC_SHARED_OPTS: $CC_SHARED_OPTS" 1>&6
8035
8036 echo "${as_me:-configure}:8036: testing CC_SHARED_OPTS: $CC_SHARED_OPTS ..." 1>&5
8037
8038         test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
8039
8040 echo "${as_me:-configure}:8040: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
8041
8042 # The test/sample programs in the original tree link using rpath option.
8043 # Make it optional for packagers.
8044 if test -n "$LOCAL_LDFLAGS"
8045 then
8046         echo "$as_me:8046: checking if you want to link sample programs with rpath option" >&5
8047 echo $ECHO_N "checking if you want to link sample programs with rpath option... $ECHO_C" >&6
8048
8049 # Check whether --enable-rpath-link or --disable-rpath-link was given.
8050 if test "${enable_rpath_link+set}" = set; then
8051   enableval="$enable_rpath_link"
8052   with_rpath_link=$enableval
8053 else
8054   with_rpath_link=yes
8055 fi;
8056         echo "$as_me:8056: result: $with_rpath_link" >&5
8057 echo "${ECHO_T}$with_rpath_link" >&6
8058         if test "$with_rpath_link" = no
8059         then
8060                 LOCAL_LDFLAGS=
8061                 LOCAL_LDFLAGS2=
8062         fi
8063 fi
8064
8065 ###############################################################################
8066
8067 ###   use option --enable-broken-linker to force on use of broken-linker support
8068 echo "$as_me:8068: checking if you want broken-linker support code" >&5
8069 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
8070
8071 # Check whether --enable-broken_linker or --disable-broken_linker was given.
8072 if test "${enable_broken_linker+set}" = set; then
8073   enableval="$enable_broken_linker"
8074   with_broken_linker=$enableval
8075 else
8076   with_broken_linker=${BROKEN_LINKER:-no}
8077 fi;
8078 echo "$as_me:8078: result: $with_broken_linker" >&5
8079 echo "${ECHO_T}$with_broken_linker" >&6
8080
8081 BROKEN_LINKER=0
8082 if test "$with_broken_linker" = yes ; then
8083         cat >>confdefs.h <<\EOF
8084 #define BROKEN_LINKER 1
8085 EOF
8086
8087         BROKEN_LINKER=1
8088 elif test "$DFT_LWR_MODEL" = shared ; then
8089         case $cf_cv_system_name in #(vi
8090         cygwin*)
8091                 cat >>confdefs.h <<\EOF
8092 #define BROKEN_LINKER 1
8093 EOF
8094
8095                 BROKEN_LINKER=1
8096                 test -n "$verbose" && echo "    cygwin linker is broken anyway" 1>&6
8097
8098 echo "${as_me:-configure}:8098: testing cygwin linker is broken anyway ..." 1>&5
8099
8100                 ;;
8101         esac
8102 fi
8103
8104 # Check to define _XOPEN_SOURCE "automatically"
8105
8106 cf_XOPEN_SOURCE=500
8107 cf_POSIX_C_SOURCE=199506L
8108 cf_xopen_source=
8109
8110 case $host_os in #(vi
8111 aix[4-7]*) #(vi
8112         cf_xopen_source="-D_ALL_SOURCE"
8113         ;;
8114 cygwin) #(vi
8115         cf_XOPEN_SOURCE=600
8116         ;;
8117 darwin[0-8].*) #(vi
8118         cf_xopen_source="-D_APPLE_C_SOURCE"
8119         ;;
8120 darwin*) #(vi
8121         cf_xopen_source="-D_DARWIN_C_SOURCE"
8122         cf_XOPEN_SOURCE=
8123         ;;
8124 freebsd*|dragonfly*) #(vi
8125         # 5.x headers associate
8126         #       _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
8127         #       _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
8128         cf_POSIX_C_SOURCE=200112L
8129         cf_XOPEN_SOURCE=600
8130         cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
8131         ;;
8132 hpux11*) #(vi
8133         cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
8134         ;;
8135 hpux*) #(vi
8136         cf_xopen_source="-D_HPUX_SOURCE"
8137         ;;
8138 irix[56].*) #(vi
8139         cf_xopen_source="-D_SGI_SOURCE"
8140         cf_XOPEN_SOURCE=
8141         ;;
8142 linux*|gnu*|mint*|k*bsd*-gnu) #(vi
8143
8144 echo "$as_me:8144: checking if we must define _GNU_SOURCE" >&5
8145 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
8146 if test "${cf_cv_gnu_source+set}" = set; then
8147   echo $ECHO_N "(cached) $ECHO_C" >&6
8148 else
8149
8150 cat >conftest.$ac_ext <<_ACEOF
8151 #line 8151 "configure"
8152 #include "confdefs.h"
8153 #include <sys/types.h>
8154 int
8155 main ()
8156 {
8157
8158 #ifndef _XOPEN_SOURCE
8159 make an error
8160 #endif
8161   ;
8162   return 0;
8163 }
8164 _ACEOF
8165 rm -f conftest.$ac_objext
8166 if { (eval echo "$as_me:8166: \"$ac_compile\"") >&5
8167   (eval $ac_compile) 2>&5
8168   ac_status=$?
8169   echo "$as_me:8169: \$? = $ac_status" >&5
8170   (exit $ac_status); } &&
8171          { ac_try='test -s conftest.$ac_objext'
8172   { (eval echo "$as_me:8172: \"$ac_try\"") >&5
8173   (eval $ac_try) 2>&5
8174   ac_status=$?
8175   echo "$as_me:8175: \$? = $ac_status" >&5
8176   (exit $ac_status); }; }; then
8177   cf_cv_gnu_source=no
8178 else
8179   echo "$as_me: failed program was:" >&5
8180 cat conftest.$ac_ext >&5
8181 cf_save="$CPPFLAGS"
8182          CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
8183          cat >conftest.$ac_ext <<_ACEOF
8184 #line 8184 "configure"
8185 #include "confdefs.h"
8186 #include <sys/types.h>
8187 int
8188 main ()
8189 {
8190
8191 #ifdef _XOPEN_SOURCE
8192 make an error
8193 #endif
8194   ;
8195   return 0;
8196 }
8197 _ACEOF
8198 rm -f conftest.$ac_objext
8199 if { (eval echo "$as_me:8199: \"$ac_compile\"") >&5
8200   (eval $ac_compile) 2>&5
8201   ac_status=$?
8202   echo "$as_me:8202: \$? = $ac_status" >&5
8203   (exit $ac_status); } &&
8204          { ac_try='test -s conftest.$ac_objext'
8205   { (eval echo "$as_me:8205: \"$ac_try\"") >&5
8206   (eval $ac_try) 2>&5
8207   ac_status=$?
8208   echo "$as_me:8208: \$? = $ac_status" >&5
8209   (exit $ac_status); }; }; then
8210   cf_cv_gnu_source=no
8211 else
8212   echo "$as_me: failed program was:" >&5
8213 cat conftest.$ac_ext >&5
8214 cf_cv_gnu_source=yes
8215 fi
8216 rm -f conftest.$ac_objext conftest.$ac_ext
8217         CPPFLAGS="$cf_save"
8218
8219 fi
8220 rm -f conftest.$ac_objext conftest.$ac_ext
8221
8222 fi
8223 echo "$as_me:8223: result: $cf_cv_gnu_source" >&5
8224 echo "${ECHO_T}$cf_cv_gnu_source" >&6
8225 test "$cf_cv_gnu_source" = yes && CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
8226
8227         ;;
8228 mirbsd*) #(vi
8229         # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
8230         cf_XOPEN_SOURCE=
8231
8232 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
8233
8234 cf_save_CFLAGS="$CFLAGS"
8235 cf_save_CPPFLAGS="$CPPFLAGS"
8236
8237 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
8238         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
8239                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
8240
8241 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
8242         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
8243                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
8244
8245 echo "$as_me:8245: checking if we should define _POSIX_C_SOURCE" >&5
8246 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
8247 if test "${cf_cv_posix_c_source+set}" = set; then
8248   echo $ECHO_N "(cached) $ECHO_C" >&6
8249 else
8250
8251 echo "${as_me:-configure}:8251: testing if the symbol is already defined go no further ..." 1>&5
8252
8253         cat >conftest.$ac_ext <<_ACEOF
8254 #line 8254 "configure"
8255 #include "confdefs.h"
8256 #include <sys/types.h>
8257 int
8258 main ()
8259 {
8260
8261 #ifndef _POSIX_C_SOURCE
8262 make an error
8263 #endif
8264   ;
8265   return 0;
8266 }
8267 _ACEOF
8268 rm -f conftest.$ac_objext
8269 if { (eval echo "$as_me:8269: \"$ac_compile\"") >&5
8270   (eval $ac_compile) 2>&5
8271   ac_status=$?
8272   echo "$as_me:8272: \$? = $ac_status" >&5
8273   (exit $ac_status); } &&
8274          { ac_try='test -s conftest.$ac_objext'
8275   { (eval echo "$as_me:8275: \"$ac_try\"") >&5
8276   (eval $ac_try) 2>&5
8277   ac_status=$?
8278   echo "$as_me:8278: \$? = $ac_status" >&5
8279   (exit $ac_status); }; }; then
8280   cf_cv_posix_c_source=no
8281 else
8282   echo "$as_me: failed program was:" >&5
8283 cat conftest.$ac_ext >&5
8284 cf_want_posix_source=no
8285          case .$cf_POSIX_C_SOURCE in #(vi
8286          .[12]??*) #(vi
8287                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
8288                 ;;
8289          .2) #(vi
8290                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
8291                 cf_want_posix_source=yes
8292                 ;;
8293          .*)
8294                 cf_want_posix_source=yes
8295                 ;;
8296          esac
8297          if test "$cf_want_posix_source" = yes ; then
8298                 cat >conftest.$ac_ext <<_ACEOF
8299 #line 8299 "configure"
8300 #include "confdefs.h"
8301 #include <sys/types.h>
8302 int
8303 main ()
8304 {
8305
8306 #ifdef _POSIX_SOURCE
8307 make an error
8308 #endif
8309   ;
8310   return 0;
8311 }
8312 _ACEOF
8313 rm -f conftest.$ac_objext
8314 if { (eval echo "$as_me:8314: \"$ac_compile\"") >&5
8315   (eval $ac_compile) 2>&5
8316   ac_status=$?
8317   echo "$as_me:8317: \$? = $ac_status" >&5
8318   (exit $ac_status); } &&
8319          { ac_try='test -s conftest.$ac_objext'
8320   { (eval echo "$as_me:8320: \"$ac_try\"") >&5
8321   (eval $ac_try) 2>&5
8322   ac_status=$?
8323   echo "$as_me:8323: \$? = $ac_status" >&5
8324   (exit $ac_status); }; }; then
8325   :
8326 else
8327   echo "$as_me: failed program was:" >&5
8328 cat conftest.$ac_ext >&5
8329 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
8330 fi
8331 rm -f conftest.$ac_objext conftest.$ac_ext
8332          fi
8333
8334 echo "${as_me:-configure}:8334: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
8335
8336          CFLAGS="$cf_trim_CFLAGS"
8337          CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
8338
8339 echo "${as_me:-configure}:8339: testing if the second compile does not leave our definition intact error ..." 1>&5
8340
8341          cat >conftest.$ac_ext <<_ACEOF
8342 #line 8342 "configure"
8343 #include "confdefs.h"
8344 #include <sys/types.h>
8345 int
8346 main ()
8347 {
8348
8349 #ifndef _POSIX_C_SOURCE
8350 make an error
8351 #endif
8352   ;
8353   return 0;
8354 }
8355 _ACEOF
8356 rm -f conftest.$ac_objext
8357 if { (eval echo "$as_me:8357: \"$ac_compile\"") >&5
8358   (eval $ac_compile) 2>&5
8359   ac_status=$?
8360   echo "$as_me:8360: \$? = $ac_status" >&5
8361   (exit $ac_status); } &&
8362          { ac_try='test -s conftest.$ac_objext'
8363   { (eval echo "$as_me:8363: \"$ac_try\"") >&5
8364   (eval $ac_try) 2>&5
8365   ac_status=$?
8366   echo "$as_me:8366: \$? = $ac_status" >&5
8367   (exit $ac_status); }; }; then
8368   :
8369 else
8370   echo "$as_me: failed program was:" >&5
8371 cat conftest.$ac_ext >&5
8372 cf_cv_posix_c_source=no
8373 fi
8374 rm -f conftest.$ac_objext conftest.$ac_ext
8375          CFLAGS="$cf_save_CFLAGS"
8376          CPPFLAGS="$cf_save_CPPFLAGS"
8377
8378 fi
8379 rm -f conftest.$ac_objext conftest.$ac_ext
8380
8381 fi
8382 echo "$as_me:8382: result: $cf_cv_posix_c_source" >&5
8383 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
8384
8385 if test "$cf_cv_posix_c_source" != no ; then
8386         CFLAGS="$cf_trim_CFLAGS"
8387         CPPFLAGS="$cf_trim_CPPFLAGS"
8388
8389 cf_fix_cppflags=no
8390 cf_new_cflags=
8391 cf_new_cppflags=
8392 cf_new_extra_cppflags=
8393
8394 for cf_add_cflags in $cf_cv_posix_c_source
8395 do
8396 case $cf_fix_cppflags in
8397 no)
8398         case $cf_add_cflags in #(vi
8399         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
8400                 case $cf_add_cflags in
8401                 -D*)
8402                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8403
8404                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
8405                                 && test -z "${cf_tst_cflags}" \
8406                                 && cf_fix_cppflags=yes
8407
8408                         if test $cf_fix_cppflags = yes ; then
8409                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8410                                 continue
8411                         elif test "${cf_tst_cflags}" = "\"'" ; then
8412                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8413                                 continue
8414                         fi
8415                         ;;
8416                 esac
8417                 case "$CPPFLAGS" in
8418                 *$cf_add_cflags) #(vi
8419                         ;;
8420                 *) #(vi
8421                         case $cf_add_cflags in #(vi
8422                         -D*)
8423                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8424
8425 CPPFLAGS=`echo "$CPPFLAGS" | \
8426         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8427                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8428
8429                                 ;;
8430                         esac
8431                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8432                         ;;
8433                 esac
8434                 ;;
8435         *)
8436                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8437                 ;;
8438         esac
8439         ;;
8440 yes)
8441         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8442
8443         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8444
8445         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
8446                 && test -z "${cf_tst_cflags}" \
8447                 && cf_fix_cppflags=no
8448         ;;
8449 esac
8450 done
8451
8452 if test -n "$cf_new_cflags" ; then
8453
8454         CFLAGS="$CFLAGS $cf_new_cflags"
8455 fi
8456
8457 if test -n "$cf_new_cppflags" ; then
8458
8459         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8460 fi
8461
8462 if test -n "$cf_new_extra_cppflags" ; then
8463
8464         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8465 fi
8466
8467 fi
8468
8469         ;;
8470 netbsd*) #(vi
8471         cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
8472         ;;
8473 openbsd[4-9]*) #(vi
8474         # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
8475         cf_xopen_source="-D_BSD_SOURCE"
8476         cf_XOPEN_SOURCE=600
8477         ;;
8478 openbsd*) #(vi
8479         # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
8480         ;;
8481 osf[45]*) #(vi
8482         cf_xopen_source="-D_OSF_SOURCE"
8483         ;;
8484 nto-qnx*) #(vi
8485         cf_xopen_source="-D_QNX_SOURCE"
8486         ;;
8487 sco*) #(vi
8488         # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
8489         ;;
8490 solaris2.*) #(vi
8491         cf_xopen_source="-D__EXTENSIONS__"
8492         ;;
8493 *)
8494
8495 echo "$as_me:8495: checking if we should define _XOPEN_SOURCE" >&5
8496 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
8497 if test "${cf_cv_xopen_source+set}" = set; then
8498   echo $ECHO_N "(cached) $ECHO_C" >&6
8499 else
8500
8501         cat >conftest.$ac_ext <<_ACEOF
8502 #line 8502 "configure"
8503 #include "confdefs.h"
8504
8505 #include <stdlib.h>
8506 #include <string.h>
8507 #include <sys/types.h>
8508
8509 int
8510 main ()
8511 {
8512
8513 #ifndef _XOPEN_SOURCE
8514 make an error
8515 #endif
8516   ;
8517   return 0;
8518 }
8519 _ACEOF
8520 rm -f conftest.$ac_objext
8521 if { (eval echo "$as_me:8521: \"$ac_compile\"") >&5
8522   (eval $ac_compile) 2>&5
8523   ac_status=$?
8524   echo "$as_me:8524: \$? = $ac_status" >&5
8525   (exit $ac_status); } &&
8526          { ac_try='test -s conftest.$ac_objext'
8527   { (eval echo "$as_me:8527: \"$ac_try\"") >&5
8528   (eval $ac_try) 2>&5
8529   ac_status=$?
8530   echo "$as_me:8530: \$? = $ac_status" >&5
8531   (exit $ac_status); }; }; then
8532   cf_cv_xopen_source=no
8533 else
8534   echo "$as_me: failed program was:" >&5
8535 cat conftest.$ac_ext >&5
8536 cf_save="$CPPFLAGS"
8537          CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
8538          cat >conftest.$ac_ext <<_ACEOF
8539 #line 8539 "configure"
8540 #include "confdefs.h"
8541
8542 #include <stdlib.h>
8543 #include <string.h>
8544 #include <sys/types.h>
8545
8546 int
8547 main ()
8548 {
8549
8550 #ifdef _XOPEN_SOURCE
8551 make an error
8552 #endif
8553   ;
8554   return 0;
8555 }
8556 _ACEOF
8557 rm -f conftest.$ac_objext
8558 if { (eval echo "$as_me:8558: \"$ac_compile\"") >&5
8559   (eval $ac_compile) 2>&5
8560   ac_status=$?
8561   echo "$as_me:8561: \$? = $ac_status" >&5
8562   (exit $ac_status); } &&
8563          { ac_try='test -s conftest.$ac_objext'
8564   { (eval echo "$as_me:8564: \"$ac_try\"") >&5
8565   (eval $ac_try) 2>&5
8566   ac_status=$?
8567   echo "$as_me:8567: \$? = $ac_status" >&5
8568   (exit $ac_status); }; }; then
8569   cf_cv_xopen_source=no
8570 else
8571   echo "$as_me: failed program was:" >&5
8572 cat conftest.$ac_ext >&5
8573 cf_cv_xopen_source=$cf_XOPEN_SOURCE
8574 fi
8575 rm -f conftest.$ac_objext conftest.$ac_ext
8576         CPPFLAGS="$cf_save"
8577
8578 fi
8579 rm -f conftest.$ac_objext conftest.$ac_ext
8580
8581 fi
8582 echo "$as_me:8582: result: $cf_cv_xopen_source" >&5
8583 echo "${ECHO_T}$cf_cv_xopen_source" >&6
8584
8585 if test "$cf_cv_xopen_source" != no ; then
8586
8587 CFLAGS=`echo "$CFLAGS" | \
8588         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
8589                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
8590
8591 CPPFLAGS=`echo "$CPPFLAGS" | \
8592         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
8593                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
8594
8595         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
8596
8597 cf_fix_cppflags=no
8598 cf_new_cflags=
8599 cf_new_cppflags=
8600 cf_new_extra_cppflags=
8601
8602 for cf_add_cflags in $cf_temp_xopen_source
8603 do
8604 case $cf_fix_cppflags in
8605 no)
8606         case $cf_add_cflags in #(vi
8607         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
8608                 case $cf_add_cflags in
8609                 -D*)
8610                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8611
8612                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
8613                                 && test -z "${cf_tst_cflags}" \
8614                                 && cf_fix_cppflags=yes
8615
8616                         if test $cf_fix_cppflags = yes ; then
8617                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8618                                 continue
8619                         elif test "${cf_tst_cflags}" = "\"'" ; then
8620                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8621                                 continue
8622                         fi
8623                         ;;
8624                 esac
8625                 case "$CPPFLAGS" in
8626                 *$cf_add_cflags) #(vi
8627                         ;;
8628                 *) #(vi
8629                         case $cf_add_cflags in #(vi
8630                         -D*)
8631                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8632
8633 CPPFLAGS=`echo "$CPPFLAGS" | \
8634         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8635                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8636
8637                                 ;;
8638                         esac
8639                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8640                         ;;
8641                 esac
8642                 ;;
8643         *)
8644                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8645                 ;;
8646         esac
8647         ;;
8648 yes)
8649         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8650
8651         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8652
8653         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
8654                 && test -z "${cf_tst_cflags}" \
8655                 && cf_fix_cppflags=no
8656         ;;
8657 esac
8658 done
8659
8660 if test -n "$cf_new_cflags" ; then
8661
8662         CFLAGS="$CFLAGS $cf_new_cflags"
8663 fi
8664
8665 if test -n "$cf_new_cppflags" ; then
8666
8667         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8668 fi
8669
8670 if test -n "$cf_new_extra_cppflags" ; then
8671
8672         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8673 fi
8674
8675 fi
8676
8677 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
8678
8679 cf_save_CFLAGS="$CFLAGS"
8680 cf_save_CPPFLAGS="$CPPFLAGS"
8681
8682 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
8683         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
8684                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
8685
8686 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
8687         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
8688                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
8689
8690 echo "$as_me:8690: checking if we should define _POSIX_C_SOURCE" >&5
8691 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
8692 if test "${cf_cv_posix_c_source+set}" = set; then
8693   echo $ECHO_N "(cached) $ECHO_C" >&6
8694 else
8695
8696 echo "${as_me:-configure}:8696: testing if the symbol is already defined go no further ..." 1>&5
8697
8698         cat >conftest.$ac_ext <<_ACEOF
8699 #line 8699 "configure"
8700 #include "confdefs.h"
8701 #include <sys/types.h>
8702 int
8703 main ()
8704 {
8705
8706 #ifndef _POSIX_C_SOURCE
8707 make an error
8708 #endif
8709   ;
8710   return 0;
8711 }
8712 _ACEOF
8713 rm -f conftest.$ac_objext
8714 if { (eval echo "$as_me:8714: \"$ac_compile\"") >&5
8715   (eval $ac_compile) 2>&5
8716   ac_status=$?
8717   echo "$as_me:8717: \$? = $ac_status" >&5
8718   (exit $ac_status); } &&
8719          { ac_try='test -s conftest.$ac_objext'
8720   { (eval echo "$as_me:8720: \"$ac_try\"") >&5
8721   (eval $ac_try) 2>&5
8722   ac_status=$?
8723   echo "$as_me:8723: \$? = $ac_status" >&5
8724   (exit $ac_status); }; }; then
8725   cf_cv_posix_c_source=no
8726 else
8727   echo "$as_me: failed program was:" >&5
8728 cat conftest.$ac_ext >&5
8729 cf_want_posix_source=no
8730          case .$cf_POSIX_C_SOURCE in #(vi
8731          .[12]??*) #(vi
8732                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
8733                 ;;
8734          .2) #(vi
8735                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
8736                 cf_want_posix_source=yes
8737                 ;;
8738          .*)
8739                 cf_want_posix_source=yes
8740                 ;;
8741          esac
8742          if test "$cf_want_posix_source" = yes ; then
8743                 cat >conftest.$ac_ext <<_ACEOF
8744 #line 8744 "configure"
8745 #include "confdefs.h"
8746 #include <sys/types.h>
8747 int
8748 main ()
8749 {
8750
8751 #ifdef _POSIX_SOURCE
8752 make an error
8753 #endif
8754   ;
8755   return 0;
8756 }
8757 _ACEOF
8758 rm -f conftest.$ac_objext
8759 if { (eval echo "$as_me:8759: \"$ac_compile\"") >&5
8760   (eval $ac_compile) 2>&5
8761   ac_status=$?
8762   echo "$as_me:8762: \$? = $ac_status" >&5
8763   (exit $ac_status); } &&
8764          { ac_try='test -s conftest.$ac_objext'
8765   { (eval echo "$as_me:8765: \"$ac_try\"") >&5
8766   (eval $ac_try) 2>&5
8767   ac_status=$?
8768   echo "$as_me:8768: \$? = $ac_status" >&5
8769   (exit $ac_status); }; }; then
8770   :
8771 else
8772   echo "$as_me: failed program was:" >&5
8773 cat conftest.$ac_ext >&5
8774 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
8775 fi
8776 rm -f conftest.$ac_objext conftest.$ac_ext
8777          fi
8778
8779 echo "${as_me:-configure}:8779: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
8780
8781          CFLAGS="$cf_trim_CFLAGS"
8782          CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
8783
8784 echo "${as_me:-configure}:8784: testing if the second compile does not leave our definition intact error ..." 1>&5
8785
8786          cat >conftest.$ac_ext <<_ACEOF
8787 #line 8787 "configure"
8788 #include "confdefs.h"
8789 #include <sys/types.h>
8790 int
8791 main ()
8792 {
8793
8794 #ifndef _POSIX_C_SOURCE
8795 make an error
8796 #endif
8797   ;
8798   return 0;
8799 }
8800 _ACEOF
8801 rm -f conftest.$ac_objext
8802 if { (eval echo "$as_me:8802: \"$ac_compile\"") >&5
8803   (eval $ac_compile) 2>&5
8804   ac_status=$?
8805   echo "$as_me:8805: \$? = $ac_status" >&5
8806   (exit $ac_status); } &&
8807          { ac_try='test -s conftest.$ac_objext'
8808   { (eval echo "$as_me:8808: \"$ac_try\"") >&5
8809   (eval $ac_try) 2>&5
8810   ac_status=$?
8811   echo "$as_me:8811: \$? = $ac_status" >&5
8812   (exit $ac_status); }; }; then
8813   :
8814 else
8815   echo "$as_me: failed program was:" >&5
8816 cat conftest.$ac_ext >&5
8817 cf_cv_posix_c_source=no
8818 fi
8819 rm -f conftest.$ac_objext conftest.$ac_ext
8820          CFLAGS="$cf_save_CFLAGS"
8821          CPPFLAGS="$cf_save_CPPFLAGS"
8822
8823 fi
8824 rm -f conftest.$ac_objext conftest.$ac_ext
8825
8826 fi
8827 echo "$as_me:8827: result: $cf_cv_posix_c_source" >&5
8828 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
8829
8830 if test "$cf_cv_posix_c_source" != no ; then
8831         CFLAGS="$cf_trim_CFLAGS"
8832         CPPFLAGS="$cf_trim_CPPFLAGS"
8833
8834 cf_fix_cppflags=no
8835 cf_new_cflags=
8836 cf_new_cppflags=
8837 cf_new_extra_cppflags=
8838
8839 for cf_add_cflags in $cf_cv_posix_c_source
8840 do
8841 case $cf_fix_cppflags in
8842 no)
8843         case $cf_add_cflags in #(vi
8844         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
8845                 case $cf_add_cflags in
8846                 -D*)
8847                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8848
8849                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
8850                                 && test -z "${cf_tst_cflags}" \
8851                                 && cf_fix_cppflags=yes
8852
8853                         if test $cf_fix_cppflags = yes ; then
8854                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8855                                 continue
8856                         elif test "${cf_tst_cflags}" = "\"'" ; then
8857                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8858                                 continue
8859                         fi
8860                         ;;
8861                 esac
8862                 case "$CPPFLAGS" in
8863                 *$cf_add_cflags) #(vi
8864                         ;;
8865                 *) #(vi
8866                         case $cf_add_cflags in #(vi
8867                         -D*)
8868                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8869
8870 CPPFLAGS=`echo "$CPPFLAGS" | \
8871         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8872                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8873
8874                                 ;;
8875                         esac
8876                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8877                         ;;
8878                 esac
8879                 ;;
8880         *)
8881                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8882                 ;;
8883         esac
8884         ;;
8885 yes)
8886         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8887
8888         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8889
8890         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
8891                 && test -z "${cf_tst_cflags}" \
8892                 && cf_fix_cppflags=no
8893         ;;
8894 esac
8895 done
8896
8897 if test -n "$cf_new_cflags" ; then
8898
8899         CFLAGS="$CFLAGS $cf_new_cflags"
8900 fi
8901
8902 if test -n "$cf_new_cppflags" ; then
8903
8904         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8905 fi
8906
8907 if test -n "$cf_new_extra_cppflags" ; then
8908
8909         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8910 fi
8911
8912 fi
8913
8914         ;;
8915 esac
8916
8917 if test -n "$cf_xopen_source" ; then
8918
8919 cf_fix_cppflags=no
8920 cf_new_cflags=
8921 cf_new_cppflags=
8922 cf_new_extra_cppflags=
8923
8924 for cf_add_cflags in $cf_xopen_source
8925 do
8926 case $cf_fix_cppflags in
8927 no)
8928         case $cf_add_cflags in #(vi
8929         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
8930                 case $cf_add_cflags in
8931                 -D*)
8932                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8933
8934                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
8935                                 && test -z "${cf_tst_cflags}" \
8936                                 && cf_fix_cppflags=yes
8937
8938                         if test $cf_fix_cppflags = yes ; then
8939                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8940                                 continue
8941                         elif test "${cf_tst_cflags}" = "\"'" ; then
8942                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8943                                 continue
8944                         fi
8945                         ;;
8946                 esac
8947                 case "$CPPFLAGS" in
8948                 *$cf_add_cflags) #(vi
8949                         ;;
8950                 *) #(vi
8951                         case $cf_add_cflags in #(vi
8952                         -D*)
8953                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8954
8955 CPPFLAGS=`echo "$CPPFLAGS" | \
8956         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8957                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8958
8959                                 ;;
8960                         esac
8961                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8962                         ;;
8963                 esac
8964                 ;;
8965         *)
8966                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8967                 ;;
8968         esac
8969         ;;
8970 yes)
8971         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8972
8973         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8974
8975         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
8976                 && test -z "${cf_tst_cflags}" \
8977                 && cf_fix_cppflags=no
8978         ;;
8979 esac
8980 done
8981
8982 if test -n "$cf_new_cflags" ; then
8983
8984         CFLAGS="$CFLAGS $cf_new_cflags"
8985 fi
8986
8987 if test -n "$cf_new_cppflags" ; then
8988
8989         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8990 fi
8991
8992 if test -n "$cf_new_extra_cppflags" ; then
8993
8994         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8995 fi
8996
8997 fi
8998
8999 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
9000         echo "$as_me:9000: checking if _XOPEN_SOURCE really is set" >&5
9001 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
9002         cat >conftest.$ac_ext <<_ACEOF
9003 #line 9003 "configure"
9004 #include "confdefs.h"
9005 #include <stdlib.h>
9006 int
9007 main ()
9008 {
9009
9010 #ifndef _XOPEN_SOURCE
9011 make an error
9012 #endif
9013   ;
9014   return 0;
9015 }
9016 _ACEOF
9017 rm -f conftest.$ac_objext
9018 if { (eval echo "$as_me:9018: \"$ac_compile\"") >&5
9019   (eval $ac_compile) 2>&5
9020   ac_status=$?
9021   echo "$as_me:9021: \$? = $ac_status" >&5
9022   (exit $ac_status); } &&
9023          { ac_try='test -s conftest.$ac_objext'
9024   { (eval echo "$as_me:9024: \"$ac_try\"") >&5
9025   (eval $ac_try) 2>&5
9026   ac_status=$?
9027   echo "$as_me:9027: \$? = $ac_status" >&5
9028   (exit $ac_status); }; }; then
9029   cf_XOPEN_SOURCE_set=yes
9030 else
9031   echo "$as_me: failed program was:" >&5
9032 cat conftest.$ac_ext >&5
9033 cf_XOPEN_SOURCE_set=no
9034 fi
9035 rm -f conftest.$ac_objext conftest.$ac_ext
9036         echo "$as_me:9036: result: $cf_XOPEN_SOURCE_set" >&5
9037 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
9038         if test $cf_XOPEN_SOURCE_set = yes
9039         then
9040                 cat >conftest.$ac_ext <<_ACEOF
9041 #line 9041 "configure"
9042 #include "confdefs.h"
9043 #include <stdlib.h>
9044 int
9045 main ()
9046 {
9047
9048 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
9049 make an error
9050 #endif
9051   ;
9052   return 0;
9053 }
9054 _ACEOF
9055 rm -f conftest.$ac_objext
9056 if { (eval echo "$as_me:9056: \"$ac_compile\"") >&5
9057   (eval $ac_compile) 2>&5
9058   ac_status=$?
9059   echo "$as_me:9059: \$? = $ac_status" >&5
9060   (exit $ac_status); } &&
9061          { ac_try='test -s conftest.$ac_objext'
9062   { (eval echo "$as_me:9062: \"$ac_try\"") >&5
9063   (eval $ac_try) 2>&5
9064   ac_status=$?
9065   echo "$as_me:9065: \$? = $ac_status" >&5
9066   (exit $ac_status); }; }; then
9067   cf_XOPEN_SOURCE_set_ok=yes
9068 else
9069   echo "$as_me: failed program was:" >&5
9070 cat conftest.$ac_ext >&5
9071 cf_XOPEN_SOURCE_set_ok=no
9072 fi
9073 rm -f conftest.$ac_objext conftest.$ac_ext
9074                 if test $cf_XOPEN_SOURCE_set_ok = no
9075                 then
9076                         { echo "$as_me:9076: WARNING: _XOPEN_SOURCE is lower than requested" >&5
9077 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
9078                 fi
9079         else
9080
9081 echo "$as_me:9081: checking if we should define _XOPEN_SOURCE" >&5
9082 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
9083 if test "${cf_cv_xopen_source+set}" = set; then
9084   echo $ECHO_N "(cached) $ECHO_C" >&6
9085 else
9086
9087         cat >conftest.$ac_ext <<_ACEOF
9088 #line 9088 "configure"
9089 #include "confdefs.h"
9090
9091 #include <stdlib.h>
9092 #include <string.h>
9093 #include <sys/types.h>
9094
9095 int
9096 main ()
9097 {
9098
9099 #ifndef _XOPEN_SOURCE
9100 make an error
9101 #endif
9102   ;
9103   return 0;
9104 }
9105 _ACEOF
9106 rm -f conftest.$ac_objext
9107 if { (eval echo "$as_me:9107: \"$ac_compile\"") >&5
9108   (eval $ac_compile) 2>&5
9109   ac_status=$?
9110   echo "$as_me:9110: \$? = $ac_status" >&5
9111   (exit $ac_status); } &&
9112          { ac_try='test -s conftest.$ac_objext'
9113   { (eval echo "$as_me:9113: \"$ac_try\"") >&5
9114   (eval $ac_try) 2>&5
9115   ac_status=$?
9116   echo "$as_me:9116: \$? = $ac_status" >&5
9117   (exit $ac_status); }; }; then
9118   cf_cv_xopen_source=no
9119 else
9120   echo "$as_me: failed program was:" >&5
9121 cat conftest.$ac_ext >&5
9122 cf_save="$CPPFLAGS"
9123          CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
9124          cat >conftest.$ac_ext <<_ACEOF
9125 #line 9125 "configure"
9126 #include "confdefs.h"
9127
9128 #include <stdlib.h>
9129 #include <string.h>
9130 #include <sys/types.h>
9131
9132 int
9133 main ()
9134 {
9135
9136 #ifdef _XOPEN_SOURCE
9137 make an error
9138 #endif
9139   ;
9140   return 0;
9141 }
9142 _ACEOF
9143 rm -f conftest.$ac_objext
9144 if { (eval echo "$as_me:9144: \"$ac_compile\"") >&5
9145   (eval $ac_compile) 2>&5
9146   ac_status=$?
9147   echo "$as_me:9147: \$? = $ac_status" >&5
9148   (exit $ac_status); } &&
9149          { ac_try='test -s conftest.$ac_objext'
9150   { (eval echo "$as_me:9150: \"$ac_try\"") >&5
9151   (eval $ac_try) 2>&5
9152   ac_status=$?
9153   echo "$as_me:9153: \$? = $ac_status" >&5
9154   (exit $ac_status); }; }; then
9155   cf_cv_xopen_source=no
9156 else
9157   echo "$as_me: failed program was:" >&5
9158 cat conftest.$ac_ext >&5
9159 cf_cv_xopen_source=$cf_XOPEN_SOURCE
9160 fi
9161 rm -f conftest.$ac_objext conftest.$ac_ext
9162         CPPFLAGS="$cf_save"
9163
9164 fi
9165 rm -f conftest.$ac_objext conftest.$ac_ext
9166
9167 fi
9168 echo "$as_me:9168: result: $cf_cv_xopen_source" >&5
9169 echo "${ECHO_T}$cf_cv_xopen_source" >&6
9170
9171 if test "$cf_cv_xopen_source" != no ; then
9172
9173 CFLAGS=`echo "$CFLAGS" | \
9174         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
9175                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
9176
9177 CPPFLAGS=`echo "$CPPFLAGS" | \
9178         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
9179                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
9180
9181         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
9182
9183 cf_fix_cppflags=no
9184 cf_new_cflags=
9185 cf_new_cppflags=
9186 cf_new_extra_cppflags=
9187
9188 for cf_add_cflags in $cf_temp_xopen_source
9189 do
9190 case $cf_fix_cppflags in
9191 no)
9192         case $cf_add_cflags in #(vi
9193         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
9194                 case $cf_add_cflags in
9195                 -D*)
9196                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9197
9198                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
9199                                 && test -z "${cf_tst_cflags}" \
9200                                 && cf_fix_cppflags=yes
9201
9202                         if test $cf_fix_cppflags = yes ; then
9203                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9204                                 continue
9205                         elif test "${cf_tst_cflags}" = "\"'" ; then
9206                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9207                                 continue
9208                         fi
9209                         ;;
9210                 esac
9211                 case "$CPPFLAGS" in
9212                 *$cf_add_cflags) #(vi
9213                         ;;
9214                 *) #(vi
9215                         case $cf_add_cflags in #(vi
9216                         -D*)
9217                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9218
9219 CPPFLAGS=`echo "$CPPFLAGS" | \
9220         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
9221                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
9222
9223                                 ;;
9224                         esac
9225                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
9226                         ;;
9227                 esac
9228                 ;;
9229         *)
9230                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
9231                 ;;
9232         esac
9233         ;;
9234 yes)
9235         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9236
9237         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
9238
9239         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
9240                 && test -z "${cf_tst_cflags}" \
9241                 && cf_fix_cppflags=no
9242         ;;
9243 esac
9244 done
9245
9246 if test -n "$cf_new_cflags" ; then
9247
9248         CFLAGS="$CFLAGS $cf_new_cflags"
9249 fi
9250
9251 if test -n "$cf_new_cppflags" ; then
9252
9253         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
9254 fi
9255
9256 if test -n "$cf_new_extra_cppflags" ; then
9257
9258         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
9259 fi
9260
9261 fi
9262
9263         fi
9264 fi
9265
9266 # Check whether --enable-largefile or --disable-largefile was given.
9267 if test "${enable_largefile+set}" = set; then
9268   enableval="$enable_largefile"
9269
9270 fi;
9271 if test "$enable_largefile" != no; then
9272
9273   echo "$as_me:9273: checking for special C compiler options needed for large files" >&5
9274 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
9275 if test "${ac_cv_sys_largefile_CC+set}" = set; then
9276   echo $ECHO_N "(cached) $ECHO_C" >&6
9277 else
9278   ac_cv_sys_largefile_CC=no
9279      if test "$GCC" != yes; then
9280        ac_save_CC=$CC
9281        while :; do
9282          # IRIX 6.2 and later do not support large files by default,
9283          # so use the C compiler's -n32 option if that helps.
9284          cat >conftest.$ac_ext <<_ACEOF
9285 #line 9285 "configure"
9286 #include "confdefs.h"
9287 #include <sys/types.h>
9288  /* Check that off_t can represent 2**63 - 1 correctly.
9289     We can't simply define LARGE_OFF_T to be 9223372036854775807,
9290     since some C++ compilers masquerading as C compilers
9291     incorrectly reject 9223372036854775807.  */
9292 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9293   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9294                        && LARGE_OFF_T % 2147483647 == 1)
9295                       ? 1 : -1];
9296 int
9297 main ()
9298 {
9299
9300   ;
9301   return 0;
9302 }
9303 _ACEOF
9304          rm -f conftest.$ac_objext
9305 if { (eval echo "$as_me:9305: \"$ac_compile\"") >&5
9306   (eval $ac_compile) 2>&5
9307   ac_status=$?
9308   echo "$as_me:9308: \$? = $ac_status" >&5
9309   (exit $ac_status); } &&
9310          { ac_try='test -s conftest.$ac_objext'
9311   { (eval echo "$as_me:9311: \"$ac_try\"") >&5
9312   (eval $ac_try) 2>&5
9313   ac_status=$?
9314   echo "$as_me:9314: \$? = $ac_status" >&5
9315   (exit $ac_status); }; }; then
9316   break
9317 else
9318   echo "$as_me: failed program was:" >&5
9319 cat conftest.$ac_ext >&5
9320 fi
9321 rm -f conftest.$ac_objext
9322          CC="$CC -n32"
9323          rm -f conftest.$ac_objext
9324 if { (eval echo "$as_me:9324: \"$ac_compile\"") >&5
9325   (eval $ac_compile) 2>&5
9326   ac_status=$?
9327   echo "$as_me:9327: \$? = $ac_status" >&5
9328   (exit $ac_status); } &&
9329          { ac_try='test -s conftest.$ac_objext'
9330   { (eval echo "$as_me:9330: \"$ac_try\"") >&5
9331   (eval $ac_try) 2>&5
9332   ac_status=$?
9333   echo "$as_me:9333: \$? = $ac_status" >&5
9334   (exit $ac_status); }; }; then
9335   ac_cv_sys_largefile_CC=' -n32'; break
9336 else
9337   echo "$as_me: failed program was:" >&5
9338 cat conftest.$ac_ext >&5
9339 fi
9340 rm -f conftest.$ac_objext
9341          break
9342        done
9343        CC=$ac_save_CC
9344        rm -f conftest.$ac_ext
9345     fi
9346 fi
9347 echo "$as_me:9347: result: $ac_cv_sys_largefile_CC" >&5
9348 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
9349   if test "$ac_cv_sys_largefile_CC" != no; then
9350     CC=$CC$ac_cv_sys_largefile_CC
9351   fi
9352
9353   echo "$as_me:9353: checking for _FILE_OFFSET_BITS value needed for large files" >&5
9354 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
9355 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
9356   echo $ECHO_N "(cached) $ECHO_C" >&6
9357 else
9358   while :; do
9359   ac_cv_sys_file_offset_bits=no
9360   cat >conftest.$ac_ext <<_ACEOF
9361 #line 9361 "configure"
9362 #include "confdefs.h"
9363 #include <sys/types.h>
9364  /* Check that off_t can represent 2**63 - 1 correctly.
9365     We can't simply define LARGE_OFF_T to be 9223372036854775807,
9366     since some C++ compilers masquerading as C compilers
9367     incorrectly reject 9223372036854775807.  */
9368 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9369   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9370                        && LARGE_OFF_T % 2147483647 == 1)
9371                       ? 1 : -1];
9372 int
9373 main ()
9374 {
9375
9376   ;
9377   return 0;
9378 }
9379 _ACEOF
9380 rm -f conftest.$ac_objext
9381 if { (eval echo "$as_me:9381: \"$ac_compile\"") >&5
9382   (eval $ac_compile) 2>&5
9383   ac_status=$?
9384   echo "$as_me:9384: \$? = $ac_status" >&5
9385   (exit $ac_status); } &&
9386          { ac_try='test -s conftest.$ac_objext'
9387   { (eval echo "$as_me:9387: \"$ac_try\"") >&5
9388   (eval $ac_try) 2>&5
9389   ac_status=$?
9390   echo "$as_me:9390: \$? = $ac_status" >&5
9391   (exit $ac_status); }; }; then
9392   break
9393 else
9394   echo "$as_me: failed program was:" >&5
9395 cat conftest.$ac_ext >&5
9396 fi
9397 rm -f conftest.$ac_objext conftest.$ac_ext
9398   cat >conftest.$ac_ext <<_ACEOF
9399 #line 9399 "configure"
9400 #include "confdefs.h"
9401 #define _FILE_OFFSET_BITS 64
9402 #include <sys/types.h>
9403  /* Check that off_t can represent 2**63 - 1 correctly.
9404     We can't simply define LARGE_OFF_T to be 9223372036854775807,
9405     since some C++ compilers masquerading as C compilers
9406     incorrectly reject 9223372036854775807.  */
9407 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9408   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9409                        && LARGE_OFF_T % 2147483647 == 1)
9410                       ? 1 : -1];
9411 int
9412 main ()
9413 {
9414
9415   ;
9416   return 0;
9417 }
9418 _ACEOF
9419 rm -f conftest.$ac_objext
9420 if { (eval echo "$as_me:9420: \"$ac_compile\"") >&5
9421   (eval $ac_compile) 2>&5
9422   ac_status=$?
9423   echo "$as_me:9423: \$? = $ac_status" >&5
9424   (exit $ac_status); } &&
9425          { ac_try='test -s conftest.$ac_objext'
9426   { (eval echo "$as_me:9426: \"$ac_try\"") >&5
9427   (eval $ac_try) 2>&5
9428   ac_status=$?
9429   echo "$as_me:9429: \$? = $ac_status" >&5
9430   (exit $ac_status); }; }; then
9431   ac_cv_sys_file_offset_bits=64; break
9432 else
9433   echo "$as_me: failed program was:" >&5
9434 cat conftest.$ac_ext >&5
9435 fi
9436 rm -f conftest.$ac_objext conftest.$ac_ext
9437   break
9438 done
9439 fi
9440 echo "$as_me:9440: result: $ac_cv_sys_file_offset_bits" >&5
9441 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
9442 if test "$ac_cv_sys_file_offset_bits" != no; then
9443
9444 cat >>confdefs.h <<EOF
9445 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
9446 EOF
9447
9448 fi
9449 rm -rf conftest*
9450   echo "$as_me:9450: checking for _LARGE_FILES value needed for large files" >&5
9451 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
9452 if test "${ac_cv_sys_large_files+set}" = set; then
9453   echo $ECHO_N "(cached) $ECHO_C" >&6
9454 else
9455   while :; do
9456   ac_cv_sys_large_files=no
9457   cat >conftest.$ac_ext <<_ACEOF
9458 #line 9458 "configure"
9459 #include "confdefs.h"
9460 #include <sys/types.h>
9461  /* Check that off_t can represent 2**63 - 1 correctly.
9462     We can't simply define LARGE_OFF_T to be 9223372036854775807,
9463     since some C++ compilers masquerading as C compilers
9464     incorrectly reject 9223372036854775807.  */
9465 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9466   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9467                        && LARGE_OFF_T % 2147483647 == 1)
9468                       ? 1 : -1];
9469 int
9470 main ()
9471 {
9472
9473   ;
9474   return 0;
9475 }
9476 _ACEOF
9477 rm -f conftest.$ac_objext
9478 if { (eval echo "$as_me:9478: \"$ac_compile\"") >&5
9479   (eval $ac_compile) 2>&5
9480   ac_status=$?
9481   echo "$as_me:9481: \$? = $ac_status" >&5
9482   (exit $ac_status); } &&
9483          { ac_try='test -s conftest.$ac_objext'
9484   { (eval echo "$as_me:9484: \"$ac_try\"") >&5
9485   (eval $ac_try) 2>&5
9486   ac_status=$?
9487   echo "$as_me:9487: \$? = $ac_status" >&5
9488   (exit $ac_status); }; }; then
9489   break
9490 else
9491   echo "$as_me: failed program was:" >&5
9492 cat conftest.$ac_ext >&5
9493 fi
9494 rm -f conftest.$ac_objext conftest.$ac_ext
9495   cat >conftest.$ac_ext <<_ACEOF
9496 #line 9496 "configure"
9497 #include "confdefs.h"
9498 #define _LARGE_FILES 1
9499 #include <sys/types.h>
9500  /* Check that off_t can represent 2**63 - 1 correctly.
9501     We can't simply define LARGE_OFF_T to be 9223372036854775807,
9502     since some C++ compilers masquerading as C compilers
9503     incorrectly reject 9223372036854775807.  */
9504 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9505   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9506                        && LARGE_OFF_T % 2147483647 == 1)
9507                       ? 1 : -1];
9508 int
9509 main ()
9510 {
9511
9512   ;
9513   return 0;
9514 }
9515 _ACEOF
9516 rm -f conftest.$ac_objext
9517 if { (eval echo "$as_me:9517: \"$ac_compile\"") >&5
9518   (eval $ac_compile) 2>&5
9519   ac_status=$?
9520   echo "$as_me:9520: \$? = $ac_status" >&5
9521   (exit $ac_status); } &&
9522          { ac_try='test -s conftest.$ac_objext'
9523   { (eval echo "$as_me:9523: \"$ac_try\"") >&5
9524   (eval $ac_try) 2>&5
9525   ac_status=$?
9526   echo "$as_me:9526: \$? = $ac_status" >&5
9527   (exit $ac_status); }; }; then
9528   ac_cv_sys_large_files=1; break
9529 else
9530   echo "$as_me: failed program was:" >&5
9531 cat conftest.$ac_ext >&5
9532 fi
9533 rm -f conftest.$ac_objext conftest.$ac_ext
9534   break
9535 done
9536 fi
9537 echo "$as_me:9537: result: $ac_cv_sys_large_files" >&5
9538 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
9539 if test "$ac_cv_sys_large_files" != no; then
9540
9541 cat >>confdefs.h <<EOF
9542 #define _LARGE_FILES $ac_cv_sys_large_files
9543 EOF
9544
9545 fi
9546 rm -rf conftest*
9547 fi
9548
9549     if test "$enable_largefile" != no ; then
9550         echo "$as_me:9550: checking for _LARGEFILE_SOURCE value needed for large files" >&5
9551 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
9552 if test "${ac_cv_sys_largefile_source+set}" = set; then
9553   echo $ECHO_N "(cached) $ECHO_C" >&6
9554 else
9555   while :; do
9556   ac_cv_sys_largefile_source=no
9557   cat >conftest.$ac_ext <<_ACEOF
9558 #line 9558 "configure"
9559 #include "confdefs.h"
9560 #include <stdio.h>
9561 int
9562 main ()
9563 {
9564 return !fseeko;
9565   ;
9566   return 0;
9567 }
9568 _ACEOF
9569 rm -f conftest.$ac_objext
9570 if { (eval echo "$as_me:9570: \"$ac_compile\"") >&5
9571   (eval $ac_compile) 2>&5
9572   ac_status=$?
9573   echo "$as_me:9573: \$? = $ac_status" >&5
9574   (exit $ac_status); } &&
9575          { ac_try='test -s conftest.$ac_objext'
9576   { (eval echo "$as_me:9576: \"$ac_try\"") >&5
9577   (eval $ac_try) 2>&5
9578   ac_status=$?
9579   echo "$as_me:9579: \$? = $ac_status" >&5
9580   (exit $ac_status); }; }; then
9581   break
9582 else
9583   echo "$as_me: failed program was:" >&5
9584 cat conftest.$ac_ext >&5
9585 fi
9586 rm -f conftest.$ac_objext conftest.$ac_ext
9587   cat >conftest.$ac_ext <<_ACEOF
9588 #line 9588 "configure"
9589 #include "confdefs.h"
9590 #define _LARGEFILE_SOURCE 1
9591 #include <stdio.h>
9592 int
9593 main ()
9594 {
9595 return !fseeko;
9596   ;
9597   return 0;
9598 }
9599 _ACEOF
9600 rm -f conftest.$ac_objext
9601 if { (eval echo "$as_me:9601: \"$ac_compile\"") >&5
9602   (eval $ac_compile) 2>&5
9603   ac_status=$?
9604   echo "$as_me:9604: \$? = $ac_status" >&5
9605   (exit $ac_status); } &&
9606          { ac_try='test -s conftest.$ac_objext'
9607   { (eval echo "$as_me:9607: \"$ac_try\"") >&5
9608   (eval $ac_try) 2>&5
9609   ac_status=$?
9610   echo "$as_me:9610: \$? = $ac_status" >&5
9611   (exit $ac_status); }; }; then
9612   ac_cv_sys_largefile_source=1; break
9613 else
9614   echo "$as_me: failed program was:" >&5
9615 cat conftest.$ac_ext >&5
9616 fi
9617 rm -f conftest.$ac_objext conftest.$ac_ext
9618   break
9619 done
9620 fi
9621 echo "$as_me:9621: result: $ac_cv_sys_largefile_source" >&5
9622 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
9623 if test "$ac_cv_sys_largefile_source" != no; then
9624
9625 cat >>confdefs.h <<EOF
9626 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
9627 EOF
9628
9629 fi
9630 rm -rf conftest*
9631
9632 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
9633 # in glibc 2.1.3, but that breaks too many other things.
9634 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
9635 echo "$as_me:9635: checking for fseeko" >&5
9636 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
9637 if test "${ac_cv_func_fseeko+set}" = set; then
9638   echo $ECHO_N "(cached) $ECHO_C" >&6
9639 else
9640   cat >conftest.$ac_ext <<_ACEOF
9641 #line 9641 "configure"
9642 #include "confdefs.h"
9643 #include <stdio.h>
9644 int
9645 main ()
9646 {
9647 return fseeko && fseeko (stdin, 0, 0);
9648   ;
9649   return 0;
9650 }
9651 _ACEOF
9652 rm -f conftest.$ac_objext conftest$ac_exeext
9653 if { (eval echo "$as_me:9653: \"$ac_link\"") >&5
9654   (eval $ac_link) 2>&5
9655   ac_status=$?
9656   echo "$as_me:9656: \$? = $ac_status" >&5
9657   (exit $ac_status); } &&
9658          { ac_try='test -s conftest$ac_exeext'
9659   { (eval echo "$as_me:9659: \"$ac_try\"") >&5
9660   (eval $ac_try) 2>&5
9661   ac_status=$?
9662   echo "$as_me:9662: \$? = $ac_status" >&5
9663   (exit $ac_status); }; }; then
9664   ac_cv_func_fseeko=yes
9665 else
9666   echo "$as_me: failed program was:" >&5
9667 cat conftest.$ac_ext >&5
9668 ac_cv_func_fseeko=no
9669 fi
9670 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9671 fi
9672 echo "$as_me:9672: result: $ac_cv_func_fseeko" >&5
9673 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
9674 if test $ac_cv_func_fseeko = yes; then
9675
9676 cat >>confdefs.h <<\EOF
9677 #define HAVE_FSEEKO 1
9678 EOF
9679
9680 fi
9681
9682         # Normally we would collect these definitions in the config.h,
9683         # but (like _XOPEN_SOURCE), some environments rely on having these
9684         # defined before any of the system headers are included.  Another
9685         # case comes up with C++, e.g., on AIX the compiler compiles the
9686         # header files by themselves before looking at the body files it is
9687         # told to compile.  For ncurses, those header files do not include
9688         # the config.h
9689         test "$ac_cv_sys_large_files"      != no && CPPFLAGS="$CPPFLAGS -D_LARGE_FILES "
9690         test "$ac_cv_sys_largefile_source" != no && CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE "
9691         test "$ac_cv_sys_file_offset_bits" != no && CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits "
9692
9693         echo "$as_me:9693: checking whether to use struct dirent64" >&5
9694 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
9695 if test "${cf_cv_struct_dirent64+set}" = set; then
9696   echo $ECHO_N "(cached) $ECHO_C" >&6
9697 else
9698
9699                 cat >conftest.$ac_ext <<_ACEOF
9700 #line 9700 "configure"
9701 #include "confdefs.h"
9702
9703 #include <sys/types.h>
9704 #include <dirent.h>
9705
9706 int
9707 main ()
9708 {
9709
9710                 /* if transitional largefile support is setup, this is true */
9711                 extern struct dirent64 * readdir(DIR *);
9712                 struct dirent64 *x = readdir((DIR *)0);
9713                 struct dirent *y = readdir((DIR *)0);
9714                 int z = x - y;
9715
9716   ;
9717   return 0;
9718 }
9719 _ACEOF
9720 rm -f conftest.$ac_objext
9721 if { (eval echo "$as_me:9721: \"$ac_compile\"") >&5
9722   (eval $ac_compile) 2>&5
9723   ac_status=$?
9724   echo "$as_me:9724: \$? = $ac_status" >&5
9725   (exit $ac_status); } &&
9726          { ac_try='test -s conftest.$ac_objext'
9727   { (eval echo "$as_me:9727: \"$ac_try\"") >&5
9728   (eval $ac_try) 2>&5
9729   ac_status=$?
9730   echo "$as_me:9730: \$? = $ac_status" >&5
9731   (exit $ac_status); }; }; then
9732   cf_cv_struct_dirent64=yes
9733 else
9734   echo "$as_me: failed program was:" >&5
9735 cat conftest.$ac_ext >&5
9736 cf_cv_struct_dirent64=no
9737 fi
9738 rm -f conftest.$ac_objext conftest.$ac_ext
9739
9740 fi
9741 echo "$as_me:9741: result: $cf_cv_struct_dirent64" >&5
9742 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
9743         test "$cf_cv_struct_dirent64" = yes && cat >>confdefs.h <<\EOF
9744 #define HAVE_STRUCT_DIRENT64 1
9745 EOF
9746
9747     fi
9748
9749 ### Enable compiling-in rcs id's
9750 echo "$as_me:9750: checking if RCS identifiers should be compiled-in" >&5
9751 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
9752
9753 # Check whether --with-rcs-ids or --without-rcs-ids was given.
9754 if test "${with_rcs_ids+set}" = set; then
9755   withval="$with_rcs_ids"
9756   with_rcs_ids=$withval
9757 else
9758   with_rcs_ids=no
9759 fi;
9760 echo "$as_me:9760: result: $with_rcs_ids" >&5
9761 echo "${ECHO_T}$with_rcs_ids" >&6
9762 test "$with_rcs_ids" = yes && cat >>confdefs.h <<\EOF
9763 #define USE_RCS_IDS 1
9764 EOF
9765
9766 ###############################################################################
9767
9768 ### Note that some functions (such as const) are normally disabled anyway.
9769 echo "$as_me:9769: checking if you want to build with function extensions" >&5
9770 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
9771
9772 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
9773 if test "${enable_ext_funcs+set}" = set; then
9774   enableval="$enable_ext_funcs"
9775   with_ext_funcs=$enableval
9776 else
9777   with_ext_funcs=yes
9778 fi;
9779 echo "$as_me:9779: result: $with_ext_funcs" >&5
9780 echo "${ECHO_T}$with_ext_funcs" >&6
9781 if test "$with_ext_funcs" = yes ; then
9782         NCURSES_EXT_FUNCS=1
9783         cat >>confdefs.h <<\EOF
9784 #define HAVE_USE_DEFAULT_COLORS 1
9785 EOF
9786
9787         cat >>confdefs.h <<\EOF
9788 #define NCURSES_EXT_FUNCS 1
9789 EOF
9790
9791 else
9792         NCURSES_EXT_FUNCS=0
9793 fi
9794
9795 ###   use option --enable-const to turn on use of const beyond that in XSI.
9796 echo "$as_me:9796: checking for extended use of const keyword" >&5
9797 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
9798
9799 # Check whether --enable-const or --disable-const was given.
9800 if test "${enable_const+set}" = set; then
9801   enableval="$enable_const"
9802   with_ext_const=$enableval
9803 else
9804   with_ext_const=no
9805 fi;
9806 echo "$as_me:9806: result: $with_ext_const" >&5
9807 echo "${ECHO_T}$with_ext_const" >&6
9808 NCURSES_CONST='/*nothing*/'
9809 if test "$with_ext_const" = yes ; then
9810         NCURSES_CONST=const
9811 fi
9812
9813 ###############################################################################
9814 # These options are relatively safe to experiment with.
9815
9816 echo "$as_me:9816: checking if you want all development code" >&5
9817 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
9818
9819 # Check whether --with-develop or --without-develop was given.
9820 if test "${with_develop+set}" = set; then
9821   withval="$with_develop"
9822   with_develop=$withval
9823 else
9824   with_develop=no
9825 fi;
9826 echo "$as_me:9826: result: $with_develop" >&5
9827 echo "${ECHO_T}$with_develop" >&6
9828
9829 ###############################################################################
9830 # These are just experimental, probably should not be in a package:
9831
9832 # This is still experimental (20080329), but should ultimately be moved to
9833 # the script-block --with-normal, etc.
9834
9835 echo "$as_me:9835: checking if you want to link with the pthread library" >&5
9836 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
9837
9838 # Check whether --with-pthread or --without-pthread was given.
9839 if test "${with_pthread+set}" = set; then
9840   withval="$with_pthread"
9841   with_pthread=$withval
9842 else
9843   with_pthread=no
9844 fi;
9845 echo "$as_me:9845: result: $with_pthread" >&5
9846 echo "${ECHO_T}$with_pthread" >&6
9847
9848 if test "$with_pthread" != no ; then
9849     echo "$as_me:9849: checking for pthread.h" >&5
9850 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
9851 if test "${ac_cv_header_pthread_h+set}" = set; then
9852   echo $ECHO_N "(cached) $ECHO_C" >&6
9853 else
9854   cat >conftest.$ac_ext <<_ACEOF
9855 #line 9855 "configure"
9856 #include "confdefs.h"
9857 #include <pthread.h>
9858 _ACEOF
9859 if { (eval echo "$as_me:9859: \"$ac_cpp conftest.$ac_ext\"") >&5
9860   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9861   ac_status=$?
9862   egrep -v '^ *\+' conftest.er1 >conftest.err
9863   rm -f conftest.er1
9864   cat conftest.err >&5
9865   echo "$as_me:9865: \$? = $ac_status" >&5
9866   (exit $ac_status); } >/dev/null; then
9867   if test -s conftest.err; then
9868     ac_cpp_err=$ac_c_preproc_warn_flag
9869   else
9870     ac_cpp_err=
9871   fi
9872 else
9873   ac_cpp_err=yes
9874 fi
9875 if test -z "$ac_cpp_err"; then
9876   ac_cv_header_pthread_h=yes
9877 else
9878   echo "$as_me: failed program was:" >&5
9879   cat conftest.$ac_ext >&5
9880   ac_cv_header_pthread_h=no
9881 fi
9882 rm -f conftest.err conftest.$ac_ext
9883 fi
9884 echo "$as_me:9884: result: $ac_cv_header_pthread_h" >&5
9885 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
9886 if test $ac_cv_header_pthread_h = yes; then
9887
9888         cat >>confdefs.h <<\EOF
9889 #define HAVE_PTHREADS_H 1
9890 EOF
9891
9892         for cf_lib_pthread in pthread c_r
9893         do
9894             echo "$as_me:9894: checking if we can link with the $cf_lib_pthread library" >&5
9895 echo $ECHO_N "checking if we can link with the $cf_lib_pthread library... $ECHO_C" >&6
9896             cf_save_LIBS="$LIBS"
9897             LIBS="-l$cf_lib_pthread $LIBS"
9898             cat >conftest.$ac_ext <<_ACEOF
9899 #line 9899 "configure"
9900 #include "confdefs.h"
9901
9902 #include <pthread.h>
9903
9904 int
9905 main ()
9906 {
9907
9908                 int rc = pthread_create(0,0,0,0);
9909                 int r2 = pthread_mutexattr_settype(0, 0);
9910
9911   ;
9912   return 0;
9913 }
9914 _ACEOF
9915 rm -f conftest.$ac_objext conftest$ac_exeext
9916 if { (eval echo "$as_me:9916: \"$ac_link\"") >&5
9917   (eval $ac_link) 2>&5
9918   ac_status=$?
9919   echo "$as_me:9919: \$? = $ac_status" >&5
9920   (exit $ac_status); } &&
9921          { ac_try='test -s conftest$ac_exeext'
9922   { (eval echo "$as_me:9922: \"$ac_try\"") >&5
9923   (eval $ac_try) 2>&5
9924   ac_status=$?
9925   echo "$as_me:9925: \$? = $ac_status" >&5
9926   (exit $ac_status); }; }; then
9927   with_pthread=yes
9928 else
9929   echo "$as_me: failed program was:" >&5
9930 cat conftest.$ac_ext >&5
9931 with_pthread=no
9932 fi
9933 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9934             LIBS="$cf_save_LIBS"
9935             echo "$as_me:9935: result: $with_pthread" >&5
9936 echo "${ECHO_T}$with_pthread" >&6
9937             test "$with_pthread" = yes && break
9938         done
9939
9940         if test "$with_pthread" = yes ; then
9941             LIBS="-l$cf_lib_pthread $LIBS"
9942             cat >>confdefs.h <<\EOF
9943 #define HAVE_LIBPTHREADS 1
9944 EOF
9945
9946         else
9947             { { echo "$as_me:9947: error: Cannot link with pthread library" >&5
9948 echo "$as_me: error: Cannot link with pthread library" >&2;}
9949    { (exit 1); exit 1; }; }
9950         fi
9951
9952 fi
9953
9954 fi
9955
9956 echo "$as_me:9956: checking if you want to use weak-symbols for pthreads" >&5
9957 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
9958
9959 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
9960 if test "${enable_weak_symbols+set}" = set; then
9961   enableval="$enable_weak_symbols"
9962   use_weak_symbols=$withval
9963 else
9964   use_weak_symbols=no
9965 fi;
9966 echo "$as_me:9966: result: $use_weak_symbols" >&5
9967 echo "${ECHO_T}$use_weak_symbols" >&6
9968 if test "$use_weak_symbols" = yes ; then
9969
9970 echo "$as_me:9970: checking if $CC supports weak symbols" >&5
9971 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
9972 if test "${cf_cv_weak_symbols+set}" = set; then
9973   echo $ECHO_N "(cached) $ECHO_C" >&6
9974 else
9975
9976 cat >conftest.$ac_ext <<_ACEOF
9977 #line 9977 "configure"
9978 #include "confdefs.h"
9979
9980 #include <stdio.h>
9981 int
9982 main ()
9983 {
9984
9985 #if defined(__GNUC__)
9986 #  if defined __USE_ISOC99
9987 #    define _cat_pragma(exp)    _Pragma(#exp)
9988 #    define _weak_pragma(exp)   _cat_pragma(weak name)
9989 #  else
9990 #    define _weak_pragma(exp)
9991 #  endif
9992 #  define _declare(name)        __extension__ extern __typeof__(name) name
9993 #  define weak_symbol(name)     _weak_pragma(name) _declare(name) __attribute__((weak))
9994 #endif
9995
9996 weak_symbol(fopen);
9997
9998   ;
9999   return 0;
10000 }
10001 _ACEOF
10002 rm -f conftest.$ac_objext
10003 if { (eval echo "$as_me:10003: \"$ac_compile\"") >&5
10004   (eval $ac_compile) 2>&5
10005   ac_status=$?
10006   echo "$as_me:10006: \$? = $ac_status" >&5
10007   (exit $ac_status); } &&
10008          { ac_try='test -s conftest.$ac_objext'
10009   { (eval echo "$as_me:10009: \"$ac_try\"") >&5
10010   (eval $ac_try) 2>&5
10011   ac_status=$?
10012   echo "$as_me:10012: \$? = $ac_status" >&5
10013   (exit $ac_status); }; }; then
10014   cf_cv_weak_symbols=yes
10015 else
10016   echo "$as_me: failed program was:" >&5
10017 cat conftest.$ac_ext >&5
10018 cf_cv_weak_symbols=no
10019 fi
10020 rm -f conftest.$ac_objext conftest.$ac_ext
10021
10022 fi
10023 echo "$as_me:10023: result: $cf_cv_weak_symbols" >&5
10024 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
10025
10026 else
10027     cf_cv_weak_symbols=no
10028 fi
10029
10030 if test $cf_cv_weak_symbols = yes ; then
10031     cat >>confdefs.h <<\EOF
10032 #define USE_WEAK_SYMBOLS 1
10033 EOF
10034
10035 fi
10036
10037 PTHREAD=
10038 if test "$with_pthread" = "yes" ; then
10039     cat >>confdefs.h <<\EOF
10040 #define USE_PTHREADS 1
10041 EOF
10042
10043     enable_reentrant=yes
10044     if test $cf_cv_weak_symbols = yes ; then
10045         PTHREAD=-lpthread
10046     fi
10047 fi
10048
10049 # OpenSUSE is installing ncurses6, using reentrant option.
10050 echo "$as_me:10050: checking for _nc_TABSIZE" >&5
10051 echo $ECHO_N "checking for _nc_TABSIZE... $ECHO_C" >&6
10052 if test "${ac_cv_func__nc_TABSIZE+set}" = set; then
10053   echo $ECHO_N "(cached) $ECHO_C" >&6
10054 else
10055   cat >conftest.$ac_ext <<_ACEOF
10056 #line 10056 "configure"
10057 #include "confdefs.h"
10058 /* System header to define __stub macros and hopefully few prototypes,
10059     which can conflict with char _nc_TABSIZE (); below.  */
10060 #include <assert.h>
10061 /* Override any gcc2 internal prototype to avoid an error.  */
10062 #ifdef __cplusplus
10063 extern "C"
10064 #endif
10065 /* We use char because int might match the return type of a gcc2
10066    builtin and then its argument prototype would still apply.  */
10067 char _nc_TABSIZE ();
10068 char (*f) ();
10069
10070 int
10071 main ()
10072 {
10073 /* The GNU C library defines this for functions which it implements
10074     to always fail with ENOSYS.  Some functions are actually named
10075     something starting with __ and the normal name is an alias.  */
10076 #if defined (__stub__nc_TABSIZE) || defined (__stub____nc_TABSIZE)
10077 choke me
10078 #else
10079 f = _nc_TABSIZE;
10080 #endif
10081
10082   ;
10083   return 0;
10084 }
10085 _ACEOF
10086 rm -f conftest.$ac_objext conftest$ac_exeext
10087 if { (eval echo "$as_me:10087: \"$ac_link\"") >&5
10088   (eval $ac_link) 2>&5
10089   ac_status=$?
10090   echo "$as_me:10090: \$? = $ac_status" >&5
10091   (exit $ac_status); } &&
10092          { ac_try='test -s conftest$ac_exeext'
10093   { (eval echo "$as_me:10093: \"$ac_try\"") >&5
10094   (eval $ac_try) 2>&5
10095   ac_status=$?
10096   echo "$as_me:10096: \$? = $ac_status" >&5
10097   (exit $ac_status); }; }; then
10098   ac_cv_func__nc_TABSIZE=yes
10099 else
10100   echo "$as_me: failed program was:" >&5
10101 cat conftest.$ac_ext >&5
10102 ac_cv_func__nc_TABSIZE=no
10103 fi
10104 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10105 fi
10106 echo "$as_me:10106: result: $ac_cv_func__nc_TABSIZE" >&5
10107 echo "${ECHO_T}$ac_cv_func__nc_TABSIZE" >&6
10108 if test $ac_cv_func__nc_TABSIZE = yes; then
10109   assume_reentrant=yes
10110 else
10111   assume_reentrant=no
10112 fi
10113
10114 # Reentrant code has to be opaque; there's little advantage to making ncurses
10115 # opaque outside of that, so there is no --enable-opaque option.  We can use
10116 # this option without --with-pthreads, but this will be always set for
10117 # pthreads.
10118 echo "$as_me:10118: checking if you want experimental reentrant code" >&5
10119 echo $ECHO_N "checking if you want experimental reentrant code... $ECHO_C" >&6
10120
10121 # Check whether --enable-reentrant or --disable-reentrant was given.
10122 if test "${enable_reentrant+set}" = set; then
10123   enableval="$enable_reentrant"
10124   with_reentrant=$enableval
10125 else
10126   with_reentrant=$assume_reentrant
10127 fi;
10128 echo "$as_me:10128: result: $with_reentrant" >&5
10129 echo "${ECHO_T}$with_reentrant" >&6
10130 if test "$with_reentrant" = yes ; then
10131         cf_cv_enable_reentrant=1
10132         if test $cf_cv_weak_symbols = yes ; then
10133
10134 # remove pthread library from $LIBS
10135 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[       ]//g' -e 's/-lpthread$//'`
10136
10137         elif test "$assume_reentrant" = no ; then
10138                 LIB_SUFFIX="t${LIB_SUFFIX}"
10139         fi
10140         cat >>confdefs.h <<\EOF
10141 #define USE_REENTRANT 1
10142 EOF
10143
10144 else
10145         cf_cv_enable_reentrant=0
10146 fi
10147
10148 ### Allow using a different wrap-prefix
10149 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
10150         echo "$as_me:10150: checking for prefix used to wrap public variables" >&5
10151 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
10152
10153 # Check whether --with-wrap-prefix or --without-wrap-prefix was given.
10154 if test "${with_wrap_prefix+set}" = set; then
10155   withval="$with_wrap_prefix"
10156   NCURSES_WRAP_PREFIX=$withval
10157 else
10158   NCURSES_WRAP_PREFIX=_nc_
10159 fi;
10160         echo "$as_me:10160: result: $NCURSES_WRAP_PREFIX" >&5
10161 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
10162 else
10163         NCURSES_WRAP_PREFIX=_nc_
10164 fi
10165
10166 cat >>confdefs.h <<EOF
10167 #define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
10168 EOF
10169
10170 ###############################################################################
10171
10172 ###     use option --disable-echo to suppress full display compiling commands
10173 echo "$as_me:10173: checking if you want to display full commands during build" >&5
10174 echo $ECHO_N "checking if you want to display full commands during build... $ECHO_C" >&6
10175
10176 # Check whether --enable-echo or --disable-echo was given.
10177 if test "${enable_echo+set}" = set; then
10178   enableval="$enable_echo"
10179   with_echo=$enableval
10180 else
10181   with_echo=yes
10182 fi;
10183 if test "$with_echo" = yes; then
10184         ECHO_LINK=
10185 else
10186         ECHO_LINK='@ echo linking $@ ... ;'
10187 fi
10188 echo "$as_me:10188: result: $with_echo" >&5
10189 echo "${ECHO_T}$with_echo" >&6
10190
10191 ###     use option --enable-warnings to turn on all gcc warnings
10192 echo "$as_me:10192: checking if you want to see compiler warnings" >&5
10193 echo $ECHO_N "checking if you want to see compiler warnings... $ECHO_C" >&6
10194
10195 # Check whether --enable-warnings or --disable-warnings was given.
10196 if test "${enable_warnings+set}" = set; then
10197   enableval="$enable_warnings"
10198   with_warnings=$enableval
10199 fi;
10200 echo "$as_me:10200: result: $with_warnings" >&5
10201 echo "${ECHO_T}$with_warnings" >&6
10202
10203 if test "x$with_warnings" = "xyes"; then
10204
10205         ADAFLAGS="$ADAFLAGS -gnatg"
10206
10207 INTEL_COMPILER=no
10208
10209 if test "$GCC" = yes ; then
10210         case $host_os in
10211         linux*|gnu*)
10212                 echo "$as_me:10212: checking if this is really Intel C compiler" >&5
10213 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
10214                 cf_save_CFLAGS="$CFLAGS"
10215                 CFLAGS="$CFLAGS -no-gcc"
10216                 cat >conftest.$ac_ext <<_ACEOF
10217 #line 10217 "configure"
10218 #include "confdefs.h"
10219
10220 int
10221 main ()
10222 {
10223
10224 #ifdef __INTEL_COMPILER
10225 #else
10226 make an error
10227 #endif
10228
10229   ;
10230   return 0;
10231 }
10232 _ACEOF
10233 rm -f conftest.$ac_objext
10234 if { (eval echo "$as_me:10234: \"$ac_compile\"") >&5
10235   (eval $ac_compile) 2>&5
10236   ac_status=$?
10237   echo "$as_me:10237: \$? = $ac_status" >&5
10238   (exit $ac_status); } &&
10239          { ac_try='test -s conftest.$ac_objext'
10240   { (eval echo "$as_me:10240: \"$ac_try\"") >&5
10241   (eval $ac_try) 2>&5
10242   ac_status=$?
10243   echo "$as_me:10243: \$? = $ac_status" >&5
10244   (exit $ac_status); }; }; then
10245   INTEL_COMPILER=yes
10246 cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
10247
10248 else
10249   echo "$as_me: failed program was:" >&5
10250 cat conftest.$ac_ext >&5
10251 fi
10252 rm -f conftest.$ac_objext conftest.$ac_ext
10253                 CFLAGS="$cf_save_CFLAGS"
10254                 echo "$as_me:10254: result: $INTEL_COMPILER" >&5
10255 echo "${ECHO_T}$INTEL_COMPILER" >&6
10256                 ;;
10257         esac
10258 fi
10259
10260 cat > conftest.$ac_ext <<EOF
10261 #line 10261 "${as_me:-configure}"
10262 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
10263 EOF
10264
10265 if test "$INTEL_COMPILER" = yes
10266 then
10267 # The "-wdXXX" options suppress warnings:
10268 # remark #1419: external declaration in primary source file
10269 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
10270 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
10271 # remark #193: zero used for undefined preprocessing identifier
10272 # remark #593: variable "curs_sb_left_arrow" was set but never used
10273 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
10274 # remark #869: parameter "tw" was never referenced
10275 # remark #981: operands are evaluated in unspecified order
10276 # warning #279: controlling expression is constant
10277
10278         { echo "$as_me:10278: checking for $CC warning options..." >&5
10279 echo "$as_me: checking for $CC warning options..." >&6;}
10280         cf_save_CFLAGS="$CFLAGS"
10281         EXTRA_CFLAGS="-Wall"
10282         for cf_opt in \
10283                 wd1419 \
10284                 wd1683 \
10285                 wd1684 \
10286                 wd193 \
10287                 wd593 \
10288                 wd279 \
10289                 wd810 \
10290                 wd869 \
10291                 wd981
10292         do
10293                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
10294                 if { (eval echo "$as_me:10294: \"$ac_compile\"") >&5
10295   (eval $ac_compile) 2>&5
10296   ac_status=$?
10297   echo "$as_me:10297: \$? = $ac_status" >&5
10298   (exit $ac_status); }; then
10299                         test -n "$verbose" && echo "$as_me:10299: result: ... -$cf_opt" >&5
10300 echo "${ECHO_T}... -$cf_opt" >&6
10301                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
10302                 fi
10303         done
10304         CFLAGS="$cf_save_CFLAGS"
10305
10306 elif test "$GCC" = yes
10307 then
10308         { echo "$as_me:10308: checking for $CC warning options..." >&5
10309 echo "$as_me: checking for $CC warning options..." >&6;}
10310         cf_save_CFLAGS="$CFLAGS"
10311         EXTRA_CFLAGS=
10312         cf_warn_CONST=""
10313         test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
10314         for cf_opt in W Wall \
10315                 Wbad-function-cast \
10316                 Wcast-align \
10317                 Wcast-qual \
10318                 Winline \
10319                 Wmissing-declarations \
10320                 Wmissing-prototypes \
10321                 Wnested-externs \
10322                 Wpointer-arith \
10323                 Wshadow \
10324                 Wstrict-prototypes \
10325                 Wundef $cf_warn_CONST Wdeclaration-after-statement Wextra Wno-unknown-pragmas Wswitch-enum
10326         do
10327                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
10328                 if { (eval echo "$as_me:10328: \"$ac_compile\"") >&5
10329   (eval $ac_compile) 2>&5
10330   ac_status=$?
10331   echo "$as_me:10331: \$? = $ac_status" >&5
10332   (exit $ac_status); }; then
10333                         test -n "$verbose" && echo "$as_me:10333: result: ... -$cf_opt" >&5
10334 echo "${ECHO_T}... -$cf_opt" >&6
10335                         case $cf_opt in #(vi
10336                         Wcast-qual) #(vi
10337                                 CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
10338                                 ;;
10339                         Winline) #(vi
10340                                 case $GCC_VERSION in
10341                                 [34].*)
10342                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
10343
10344 echo "${as_me:-configure}:10344: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
10345
10346                                         continue;;
10347                                 esac
10348                                 ;;
10349                         esac
10350                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
10351                 fi
10352         done
10353         CFLAGS="$cf_save_CFLAGS"
10354 fi
10355 rm -rf conftest*
10356
10357 fi
10358
10359 if test "$GCC" = yes
10360 then
10361 cat > conftest.i <<EOF
10362 #ifndef GCC_PRINTF
10363 #define GCC_PRINTF 0
10364 #endif
10365 #ifndef GCC_SCANF
10366 #define GCC_SCANF 0
10367 #endif
10368 #ifndef GCC_NORETURN
10369 #define GCC_NORETURN /* nothing */
10370 #endif
10371 #ifndef GCC_UNUSED
10372 #define GCC_UNUSED /* nothing */
10373 #endif
10374 EOF
10375 if test "$GCC" = yes
10376 then
10377         { echo "$as_me:10377: checking for $CC __attribute__ directives..." >&5
10378 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
10379 cat > conftest.$ac_ext <<EOF
10380 #line 10380 "${as_me:-configure}"
10381 #include "confdefs.h"
10382 #include "conftest.h"
10383 #include "conftest.i"
10384 #if     GCC_PRINTF
10385 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
10386 #else
10387 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
10388 #endif
10389 #if     GCC_SCANF
10390 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
10391 #else
10392 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
10393 #endif
10394 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
10395 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
10396 extern void foo(void) GCC_NORETURN;
10397 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
10398 EOF
10399         cf_printf_attribute=no
10400         cf_scanf_attribute=no
10401         for cf_attribute in scanf printf unused noreturn
10402         do
10403
10404 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
10405
10406                 cf_directive="__attribute__(($cf_attribute))"
10407                 echo "checking for $CC $cf_directive" 1>&5
10408
10409                 case $cf_attribute in #(vi
10410                 printf) #(vi
10411                         cf_printf_attribute=yes
10412                         cat >conftest.h <<EOF
10413 #define GCC_$cf_ATTRIBUTE 1
10414 EOF
10415                         ;;
10416                 scanf) #(vi
10417                         cf_scanf_attribute=yes
10418                         cat >conftest.h <<EOF
10419 #define GCC_$cf_ATTRIBUTE 1
10420 EOF
10421                         ;;
10422                 *) #(vi
10423                         cat >conftest.h <<EOF
10424 #define GCC_$cf_ATTRIBUTE $cf_directive
10425 EOF
10426                         ;;
10427                 esac
10428
10429                 if { (eval echo "$as_me:10429: \"$ac_compile\"") >&5
10430   (eval $ac_compile) 2>&5
10431   ac_status=$?
10432   echo "$as_me:10432: \$? = $ac_status" >&5
10433   (exit $ac_status); }; then
10434                         test -n "$verbose" && echo "$as_me:10434: result: ... $cf_attribute" >&5
10435 echo "${ECHO_T}... $cf_attribute" >&6
10436                         cat conftest.h >>confdefs.h
10437                         case $cf_attribute in #(vi
10438                         printf) #(vi
10439                                 if test "$cf_printf_attribute" = no ; then
10440                                         cat >>confdefs.h <<EOF
10441 #define GCC_PRINTFLIKE(fmt,var) /* nothing */
10442 EOF
10443                                 else
10444                                         cat >>confdefs.h <<EOF
10445 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
10446 EOF
10447                                 fi
10448                                 ;;
10449                         scanf) #(vi
10450                                 if test "$cf_scanf_attribute" = no ; then
10451                                         cat >>confdefs.h <<EOF
10452 #define GCC_SCANFLIKE(fmt,var) /* nothing */
10453 EOF
10454                                 else
10455                                         cat >>confdefs.h <<EOF
10456 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
10457 EOF
10458                                 fi
10459                                 ;;
10460                         esac
10461                 fi
10462         done
10463 else
10464         fgrep define conftest.i >>confdefs.h
10465 fi
10466 rm -rf conftest*
10467 fi
10468
10469 ###     use option --enable-assertions to turn on generation of assertion code
10470 echo "$as_me:10470: checking if you want to enable runtime assertions" >&5
10471 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
10472
10473 # Check whether --enable-assertions or --disable-assertions was given.
10474 if test "${enable_assertions+set}" = set; then
10475   enableval="$enable_assertions"
10476   with_assertions=$enableval
10477 else
10478   with_assertions=no
10479 fi;
10480 echo "$as_me:10480: result: $with_assertions" >&5
10481 echo "${ECHO_T}$with_assertions" >&6
10482 if test -n "$GCC"
10483 then
10484         if test "$with_assertions" = no
10485         then
10486                 cat >>confdefs.h <<\EOF
10487 #define NDEBUG 1
10488 EOF
10489
10490                 CPPFLAGS="$CPPFLAGS -DNDEBUG"
10491         else
10492
10493         ADAFLAGS="$ADAFLAGS -gnata"
10494
10495         fi
10496 fi
10497
10498 ###     use option --disable-leaks to suppress "permanent" leaks, for testing
10499 cat >>confdefs.h <<\EOF
10500 #define HAVE_NC_ALLOC_H 1
10501 EOF
10502
10503 ###     use option --enable-expanded to generate certain macros as functions
10504
10505 # Check whether --enable-expanded or --disable-expanded was given.
10506 if test "${enable_expanded+set}" = set; then
10507   enableval="$enable_expanded"
10508   test "$enableval" = yes && cat >>confdefs.h <<\EOF
10509 #define NCURSES_EXPANDED 1
10510 EOF
10511
10512 fi;
10513
10514 ###     use option --disable-macros to suppress macros in favor of functions
10515
10516 # Check whether --enable-macros or --disable-macros was given.
10517 if test "${enable_macros+set}" = set; then
10518   enableval="$enable_macros"
10519   test "$enableval" = no && cat >>confdefs.h <<\EOF
10520 #define NCURSES_NOMACROS 1
10521 EOF
10522
10523 fi;
10524
10525 # Normally we only add trace() to the debug-library.  Allow this to be
10526 # extended to all models of the ncurses library:
10527 cf_all_traces=no
10528 case "$CFLAGS $CPPFLAGS" in
10529 *-DTRACE*)
10530         cf_all_traces=yes
10531         ;;
10532 esac
10533
10534 echo "$as_me:10534: checking whether to add trace feature to all models" >&5
10535 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
10536
10537 # Check whether --with-trace or --without-trace was given.
10538 if test "${with_trace+set}" = set; then
10539   withval="$with_trace"
10540   cf_with_trace=$withval
10541 else
10542   cf_with_trace=$cf_all_traces
10543 fi;
10544 echo "$as_me:10544: result: $cf_with_trace" >&5
10545 echo "${ECHO_T}$cf_with_trace" >&6
10546
10547 if test "$cf_with_trace" = yes ; then
10548         ADA_TRACE=TRUE
10549
10550 cf_fix_cppflags=no
10551 cf_new_cflags=
10552 cf_new_cppflags=
10553 cf_new_extra_cppflags=
10554
10555 for cf_add_cflags in -DTRACE
10556 do
10557 case $cf_fix_cppflags in
10558 no)
10559         case $cf_add_cflags in #(vi
10560         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
10561                 case $cf_add_cflags in
10562                 -D*)
10563                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10564
10565                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10566                                 && test -z "${cf_tst_cflags}" \
10567                                 && cf_fix_cppflags=yes
10568
10569                         if test $cf_fix_cppflags = yes ; then
10570                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10571                                 continue
10572                         elif test "${cf_tst_cflags}" = "\"'" ; then
10573                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10574                                 continue
10575                         fi
10576                         ;;
10577                 esac
10578                 case "$CPPFLAGS" in
10579                 *$cf_add_cflags) #(vi
10580                         ;;
10581                 *) #(vi
10582                         case $cf_add_cflags in #(vi
10583                         -D*)
10584                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10585
10586 CPPFLAGS=`echo "$CPPFLAGS" | \
10587         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10588                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10589
10590                                 ;;
10591                         esac
10592                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
10593                         ;;
10594                 esac
10595                 ;;
10596         *)
10597                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
10598                 ;;
10599         esac
10600         ;;
10601 yes)
10602         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10603
10604         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10605
10606         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10607                 && test -z "${cf_tst_cflags}" \
10608                 && cf_fix_cppflags=no
10609         ;;
10610 esac
10611 done
10612
10613 if test -n "$cf_new_cflags" ; then
10614
10615         CFLAGS="$CFLAGS $cf_new_cflags"
10616 fi
10617
10618 if test -n "$cf_new_cppflags" ; then
10619
10620         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
10621 fi
10622
10623 if test -n "$cf_new_extra_cppflags" ; then
10624
10625         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
10626 fi
10627
10628 else
10629         ADA_TRACE=FALSE
10630 fi
10631
10632 ###     Checks for libraries.
10633 case $cf_cv_system_name in #(vi
10634 *mingw32*) #(vi
10635         ;;
10636 *)
10637 echo "$as_me:10637: checking for gettimeofday" >&5
10638 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
10639 if test "${ac_cv_func_gettimeofday+set}" = set; then
10640   echo $ECHO_N "(cached) $ECHO_C" >&6
10641 else
10642   cat >conftest.$ac_ext <<_ACEOF
10643 #line 10643 "configure"
10644 #include "confdefs.h"
10645 /* System header to define __stub macros and hopefully few prototypes,
10646     which can conflict with char gettimeofday (); below.  */
10647 #include <assert.h>
10648 /* Override any gcc2 internal prototype to avoid an error.  */
10649 #ifdef __cplusplus
10650 extern "C"
10651 #endif
10652 /* We use char because int might match the return type of a gcc2
10653    builtin and then its argument prototype would still apply.  */
10654 char gettimeofday ();
10655 char (*f) ();
10656
10657 int
10658 main ()
10659 {
10660 /* The GNU C library defines this for functions which it implements
10661     to always fail with ENOSYS.  Some functions are actually named
10662     something starting with __ and the normal name is an alias.  */
10663 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
10664 choke me
10665 #else
10666 f = gettimeofday;
10667 #endif
10668
10669   ;
10670   return 0;
10671 }
10672 _ACEOF
10673 rm -f conftest.$ac_objext conftest$ac_exeext
10674 if { (eval echo "$as_me:10674: \"$ac_link\"") >&5
10675   (eval $ac_link) 2>&5
10676   ac_status=$?
10677   echo "$as_me:10677: \$? = $ac_status" >&5
10678   (exit $ac_status); } &&
10679          { ac_try='test -s conftest$ac_exeext'
10680   { (eval echo "$as_me:10680: \"$ac_try\"") >&5
10681   (eval $ac_try) 2>&5
10682   ac_status=$?
10683   echo "$as_me:10683: \$? = $ac_status" >&5
10684   (exit $ac_status); }; }; then
10685   ac_cv_func_gettimeofday=yes
10686 else
10687   echo "$as_me: failed program was:" >&5
10688 cat conftest.$ac_ext >&5
10689 ac_cv_func_gettimeofday=no
10690 fi
10691 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10692 fi
10693 echo "$as_me:10693: result: $ac_cv_func_gettimeofday" >&5
10694 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
10695 if test $ac_cv_func_gettimeofday = yes; then
10696   cat >>confdefs.h <<\EOF
10697 #define HAVE_GETTIMEOFDAY 1
10698 EOF
10699
10700 else
10701
10702 echo "$as_me:10702: checking for gettimeofday in -lbsd" >&5
10703 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
10704 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
10705   echo $ECHO_N "(cached) $ECHO_C" >&6
10706 else
10707   ac_check_lib_save_LIBS=$LIBS
10708 LIBS="-lbsd  $LIBS"
10709 cat >conftest.$ac_ext <<_ACEOF
10710 #line 10710 "configure"
10711 #include "confdefs.h"
10712
10713 /* Override any gcc2 internal prototype to avoid an error.  */
10714 #ifdef __cplusplus
10715 extern "C"
10716 #endif
10717 /* We use char because int might match the return type of a gcc2
10718    builtin and then its argument prototype would still apply.  */
10719 char gettimeofday ();
10720 int
10721 main ()
10722 {
10723 gettimeofday ();
10724   ;
10725   return 0;
10726 }
10727 _ACEOF
10728 rm -f conftest.$ac_objext conftest$ac_exeext
10729 if { (eval echo "$as_me:10729: \"$ac_link\"") >&5
10730   (eval $ac_link) 2>&5
10731   ac_status=$?
10732   echo "$as_me:10732: \$? = $ac_status" >&5
10733   (exit $ac_status); } &&
10734          { ac_try='test -s conftest$ac_exeext'
10735   { (eval echo "$as_me:10735: \"$ac_try\"") >&5
10736   (eval $ac_try) 2>&5
10737   ac_status=$?
10738   echo "$as_me:10738: \$? = $ac_status" >&5
10739   (exit $ac_status); }; }; then
10740   ac_cv_lib_bsd_gettimeofday=yes
10741 else
10742   echo "$as_me: failed program was:" >&5
10743 cat conftest.$ac_ext >&5
10744 ac_cv_lib_bsd_gettimeofday=no
10745 fi
10746 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10747 LIBS=$ac_check_lib_save_LIBS
10748 fi
10749 echo "$as_me:10749: result: $ac_cv_lib_bsd_gettimeofday" >&5
10750 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
10751 if test $ac_cv_lib_bsd_gettimeofday = yes; then
10752   cat >>confdefs.h <<\EOF
10753 #define HAVE_GETTIMEOFDAY 1
10754 EOF
10755
10756         LIBS="$LIBS -lbsd"
10757 fi
10758
10759 fi
10760         ;;
10761 esac
10762
10763 ###     Checks for header files.
10764 echo "$as_me:10764: checking for ANSI C header files" >&5
10765 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
10766 if test "${ac_cv_header_stdc+set}" = set; then
10767   echo $ECHO_N "(cached) $ECHO_C" >&6
10768 else
10769   cat >conftest.$ac_ext <<_ACEOF
10770 #line 10770 "configure"
10771 #include "confdefs.h"
10772 #include <stdlib.h>
10773 #include <stdarg.h>
10774 #include <string.h>
10775 #include <float.h>
10776
10777 _ACEOF
10778 if { (eval echo "$as_me:10778: \"$ac_cpp conftest.$ac_ext\"") >&5
10779   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10780   ac_status=$?
10781   egrep -v '^ *\+' conftest.er1 >conftest.err
10782   rm -f conftest.er1
10783   cat conftest.err >&5
10784   echo "$as_me:10784: \$? = $ac_status" >&5
10785   (exit $ac_status); } >/dev/null; then
10786   if test -s conftest.err; then
10787     ac_cpp_err=$ac_c_preproc_warn_flag
10788   else
10789     ac_cpp_err=
10790   fi
10791 else
10792   ac_cpp_err=yes
10793 fi
10794 if test -z "$ac_cpp_err"; then
10795   ac_cv_header_stdc=yes
10796 else
10797   echo "$as_me: failed program was:" >&5
10798   cat conftest.$ac_ext >&5
10799   ac_cv_header_stdc=no
10800 fi
10801 rm -f conftest.err conftest.$ac_ext
10802
10803 if test $ac_cv_header_stdc = yes; then
10804   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
10805   cat >conftest.$ac_ext <<_ACEOF
10806 #line 10806 "configure"
10807 #include "confdefs.h"
10808 #include <string.h>
10809
10810 _ACEOF
10811 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10812   egrep "memchr" >/dev/null 2>&1; then
10813   :
10814 else
10815   ac_cv_header_stdc=no
10816 fi
10817 rm -rf conftest*
10818
10819 fi
10820
10821 if test $ac_cv_header_stdc = yes; then
10822   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
10823   cat >conftest.$ac_ext <<_ACEOF
10824 #line 10824 "configure"
10825 #include "confdefs.h"
10826 #include <stdlib.h>
10827
10828 _ACEOF
10829 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10830   egrep "free" >/dev/null 2>&1; then
10831   :
10832 else
10833   ac_cv_header_stdc=no
10834 fi
10835 rm -rf conftest*
10836
10837 fi
10838
10839 if test $ac_cv_header_stdc = yes; then
10840   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
10841   if test "$cross_compiling" = yes; then
10842   :
10843 else
10844   cat >conftest.$ac_ext <<_ACEOF
10845 #line 10845 "configure"
10846 #include "confdefs.h"
10847 #include <ctype.h>
10848 #if ((' ' & 0x0FF) == 0x020)
10849 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
10850 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
10851 #else
10852 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
10853                      || ('j' <= (c) && (c) <= 'r') \
10854                      || ('s' <= (c) && (c) <= 'z'))
10855 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
10856 #endif
10857
10858 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
10859 int
10860 main ()
10861 {
10862   int i;
10863   for (i = 0; i < 256; i++)
10864     if (XOR (islower (i), ISLOWER (i))
10865         || toupper (i) != TOUPPER (i))
10866       $ac_main_return(2);
10867   $ac_main_return (0);
10868 }
10869 _ACEOF
10870 rm -f conftest$ac_exeext
10871 if { (eval echo "$as_me:10871: \"$ac_link\"") >&5
10872   (eval $ac_link) 2>&5
10873   ac_status=$?
10874   echo "$as_me:10874: \$? = $ac_status" >&5
10875   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10876   { (eval echo "$as_me:10876: \"$ac_try\"") >&5
10877   (eval $ac_try) 2>&5
10878   ac_status=$?
10879   echo "$as_me:10879: \$? = $ac_status" >&5
10880   (exit $ac_status); }; }; then
10881   :
10882 else
10883   echo "$as_me: program exited with status $ac_status" >&5
10884 echo "$as_me: failed program was:" >&5
10885 cat conftest.$ac_ext >&5
10886 ac_cv_header_stdc=no
10887 fi
10888 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
10889 fi
10890 fi
10891 fi
10892 echo "$as_me:10892: result: $ac_cv_header_stdc" >&5
10893 echo "${ECHO_T}$ac_cv_header_stdc" >&6
10894 if test $ac_cv_header_stdc = yes; then
10895
10896 cat >>confdefs.h <<\EOF
10897 #define STDC_HEADERS 1
10898 EOF
10899
10900 fi
10901
10902 ac_header_dirent=no
10903 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
10904   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
10905 echo "$as_me:10905: checking for $ac_hdr that defines DIR" >&5
10906 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
10907 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10908   echo $ECHO_N "(cached) $ECHO_C" >&6
10909 else
10910   cat >conftest.$ac_ext <<_ACEOF
10911 #line 10911 "configure"
10912 #include "confdefs.h"
10913 #include <sys/types.h>
10914 #include <$ac_hdr>
10915
10916 int
10917 main ()
10918 {
10919 if ((DIR *) 0)
10920 return 0;
10921   ;
10922   return 0;
10923 }
10924 _ACEOF
10925 rm -f conftest.$ac_objext
10926 if { (eval echo "$as_me:10926: \"$ac_compile\"") >&5
10927   (eval $ac_compile) 2>&5
10928   ac_status=$?
10929   echo "$as_me:10929: \$? = $ac_status" >&5
10930   (exit $ac_status); } &&
10931          { ac_try='test -s conftest.$ac_objext'
10932   { (eval echo "$as_me:10932: \"$ac_try\"") >&5
10933   (eval $ac_try) 2>&5
10934   ac_status=$?
10935   echo "$as_me:10935: \$? = $ac_status" >&5
10936   (exit $ac_status); }; }; then
10937   eval "$as_ac_Header=yes"
10938 else
10939   echo "$as_me: failed program was:" >&5
10940 cat conftest.$ac_ext >&5
10941 eval "$as_ac_Header=no"
10942 fi
10943 rm -f conftest.$ac_objext conftest.$ac_ext
10944 fi
10945 echo "$as_me:10945: result: `eval echo '${'$as_ac_Header'}'`" >&5
10946 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10947 if test `eval echo '${'$as_ac_Header'}'` = yes; then
10948   cat >>confdefs.h <<EOF
10949 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
10950 EOF
10951
10952 ac_header_dirent=$ac_hdr; break
10953 fi
10954
10955 done
10956 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
10957 if test $ac_header_dirent = dirent.h; then
10958   echo "$as_me:10958: checking for opendir in -ldir" >&5
10959 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
10960 if test "${ac_cv_lib_dir_opendir+set}" = set; then
10961   echo $ECHO_N "(cached) $ECHO_C" >&6
10962 else
10963   ac_check_lib_save_LIBS=$LIBS
10964 LIBS="-ldir  $LIBS"
10965 cat >conftest.$ac_ext <<_ACEOF
10966 #line 10966 "configure"
10967 #include "confdefs.h"
10968
10969 /* Override any gcc2 internal prototype to avoid an error.  */
10970 #ifdef __cplusplus
10971 extern "C"
10972 #endif
10973 /* We use char because int might match the return type of a gcc2
10974    builtin and then its argument prototype would still apply.  */
10975 char opendir ();
10976 int
10977 main ()
10978 {
10979 opendir ();
10980   ;
10981   return 0;
10982 }
10983 _ACEOF
10984 rm -f conftest.$ac_objext conftest$ac_exeext
10985 if { (eval echo "$as_me:10985: \"$ac_link\"") >&5
10986   (eval $ac_link) 2>&5
10987   ac_status=$?
10988   echo "$as_me:10988: \$? = $ac_status" >&5
10989   (exit $ac_status); } &&
10990          { ac_try='test -s conftest$ac_exeext'
10991   { (eval echo "$as_me:10991: \"$ac_try\"") >&5
10992   (eval $ac_try) 2>&5
10993   ac_status=$?
10994   echo "$as_me:10994: \$? = $ac_status" >&5
10995   (exit $ac_status); }; }; then
10996   ac_cv_lib_dir_opendir=yes
10997 else
10998   echo "$as_me: failed program was:" >&5
10999 cat conftest.$ac_ext >&5
11000 ac_cv_lib_dir_opendir=no
11001 fi
11002 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11003 LIBS=$ac_check_lib_save_LIBS
11004 fi
11005 echo "$as_me:11005: result: $ac_cv_lib_dir_opendir" >&5
11006 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
11007 if test $ac_cv_lib_dir_opendir = yes; then
11008   LIBS="$LIBS -ldir"
11009 fi
11010
11011 else
11012   echo "$as_me:11012: checking for opendir in -lx" >&5
11013 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
11014 if test "${ac_cv_lib_x_opendir+set}" = set; then
11015   echo $ECHO_N "(cached) $ECHO_C" >&6
11016 else
11017   ac_check_lib_save_LIBS=$LIBS
11018 LIBS="-lx  $LIBS"
11019 cat >conftest.$ac_ext <<_ACEOF
11020 #line 11020 "configure"
11021 #include "confdefs.h"
11022
11023 /* Override any gcc2 internal prototype to avoid an error.  */
11024 #ifdef __cplusplus
11025 extern "C"
11026 #endif
11027 /* We use char because int might match the return type of a gcc2
11028    builtin and then its argument prototype would still apply.  */
11029 char opendir ();
11030 int
11031 main ()
11032 {
11033 opendir ();
11034   ;
11035   return 0;
11036 }
11037 _ACEOF
11038 rm -f conftest.$ac_objext conftest$ac_exeext
11039 if { (eval echo "$as_me:11039: \"$ac_link\"") >&5
11040   (eval $ac_link) 2>&5
11041   ac_status=$?
11042   echo "$as_me:11042: \$? = $ac_status" >&5
11043   (exit $ac_status); } &&
11044          { ac_try='test -s conftest$ac_exeext'
11045   { (eval echo "$as_me:11045: \"$ac_try\"") >&5
11046   (eval $ac_try) 2>&5
11047   ac_status=$?
11048   echo "$as_me:11048: \$? = $ac_status" >&5
11049   (exit $ac_status); }; }; then
11050   ac_cv_lib_x_opendir=yes
11051 else
11052   echo "$as_me: failed program was:" >&5
11053 cat conftest.$ac_ext >&5
11054 ac_cv_lib_x_opendir=no
11055 fi
11056 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11057 LIBS=$ac_check_lib_save_LIBS
11058 fi
11059 echo "$as_me:11059: result: $ac_cv_lib_x_opendir" >&5
11060 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
11061 if test $ac_cv_lib_x_opendir = yes; then
11062   LIBS="$LIBS -lx"
11063 fi
11064
11065 fi
11066
11067 echo "$as_me:11067: checking whether time.h and sys/time.h may both be included" >&5
11068 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
11069 if test "${ac_cv_header_time+set}" = set; then
11070   echo $ECHO_N "(cached) $ECHO_C" >&6
11071 else
11072   cat >conftest.$ac_ext <<_ACEOF
11073 #line 11073 "configure"
11074 #include "confdefs.h"
11075 #include <sys/types.h>
11076 #include <sys/time.h>
11077 #include <time.h>
11078
11079 int
11080 main ()
11081 {
11082 if ((struct tm *) 0)
11083 return 0;
11084   ;
11085   return 0;
11086 }
11087 _ACEOF
11088 rm -f conftest.$ac_objext
11089 if { (eval echo "$as_me:11089: \"$ac_compile\"") >&5
11090   (eval $ac_compile) 2>&5
11091   ac_status=$?
11092   echo "$as_me:11092: \$? = $ac_status" >&5
11093   (exit $ac_status); } &&
11094          { ac_try='test -s conftest.$ac_objext'
11095   { (eval echo "$as_me:11095: \"$ac_try\"") >&5
11096   (eval $ac_try) 2>&5
11097   ac_status=$?
11098   echo "$as_me:11098: \$? = $ac_status" >&5
11099   (exit $ac_status); }; }; then
11100   ac_cv_header_time=yes
11101 else
11102   echo "$as_me: failed program was:" >&5
11103 cat conftest.$ac_ext >&5
11104 ac_cv_header_time=no
11105 fi
11106 rm -f conftest.$ac_objext conftest.$ac_ext
11107 fi
11108 echo "$as_me:11108: result: $ac_cv_header_time" >&5
11109 echo "${ECHO_T}$ac_cv_header_time" >&6
11110 if test $ac_cv_header_time = yes; then
11111
11112 cat >>confdefs.h <<\EOF
11113 #define TIME_WITH_SYS_TIME 1
11114 EOF
11115
11116 fi
11117
11118 ###     checks for compiler characteristics
11119 ac_ext=c
11120 ac_cpp='$CPP $CPPFLAGS'
11121 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
11122 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
11123 ac_compiler_gnu=$ac_cv_c_compiler_gnu
11124 ac_main_return=return
11125
11126 echo "$as_me:11126: checking for $CC option to accept ANSI C" >&5
11127 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
11128 if test "${ac_cv_prog_cc_stdc+set}" = set; then
11129   echo $ECHO_N "(cached) $ECHO_C" >&6
11130 else
11131   ac_cv_prog_cc_stdc=no
11132 ac_save_CC=$CC
11133 cat >conftest.$ac_ext <<_ACEOF
11134 #line 11134 "configure"
11135 #include "confdefs.h"
11136 #include <stdarg.h>
11137 #include <stdio.h>
11138 #include <sys/types.h>
11139 #include <sys/stat.h>
11140 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
11141 struct buf { int x; };
11142 FILE * (*rcsopen) (struct buf *, struct stat *, int);
11143 static char *e (p, i)
11144      char **p;
11145      int i;
11146 {
11147   return p[i];
11148 }
11149 static char *f (char * (*g) (char **, int), char **p, ...)
11150 {
11151   char *s;
11152   va_list v;
11153   va_start (v,p);
11154   s = g (p, va_arg (v,int));
11155   va_end (v);
11156   return s;
11157 }
11158 int test (int i, double x);
11159 struct s1 {int (*f) (int a);};
11160 struct s2 {int (*f) (double a);};
11161 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
11162 int argc;
11163 char **argv;
11164 int
11165 main ()
11166 {
11167 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
11168   ;
11169   return 0;
11170 }
11171 _ACEOF
11172 # Don't try gcc -ansi; that turns off useful extensions and
11173 # breaks some systems' header files.
11174 # AIX                   -qlanglvl=ansi
11175 # Ultrix and OSF/1      -std1
11176 # HP-UX 10.20 and later -Ae
11177 # HP-UX older versions  -Aa -D_HPUX_SOURCE
11178 # SVR4                  -Xc -D__EXTENSIONS__
11179 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
11180 do
11181   CC="$ac_save_CC $ac_arg"
11182   rm -f conftest.$ac_objext
11183 if { (eval echo "$as_me:11183: \"$ac_compile\"") >&5
11184   (eval $ac_compile) 2>&5
11185   ac_status=$?
11186   echo "$as_me:11186: \$? = $ac_status" >&5
11187   (exit $ac_status); } &&
11188          { ac_try='test -s conftest.$ac_objext'
11189   { (eval echo "$as_me:11189: \"$ac_try\"") >&5
11190   (eval $ac_try) 2>&5
11191   ac_status=$?
11192   echo "$as_me:11192: \$? = $ac_status" >&5
11193   (exit $ac_status); }; }; then
11194   ac_cv_prog_cc_stdc=$ac_arg
11195 break
11196 else
11197   echo "$as_me: failed program was:" >&5
11198 cat conftest.$ac_ext >&5
11199 fi
11200 rm -f conftest.$ac_objext
11201 done
11202 rm -f conftest.$ac_ext conftest.$ac_objext
11203 CC=$ac_save_CC
11204
11205 fi
11206
11207 case "x$ac_cv_prog_cc_stdc" in
11208   x|xno)
11209     echo "$as_me:11209: result: none needed" >&5
11210 echo "${ECHO_T}none needed" >&6 ;;
11211   *)
11212     echo "$as_me:11212: result: $ac_cv_prog_cc_stdc" >&5
11213 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
11214     CC="$CC $ac_cv_prog_cc_stdc" ;;
11215 esac
11216
11217 echo "$as_me:11217: checking for an ANSI C-conforming const" >&5
11218 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
11219 if test "${ac_cv_c_const+set}" = set; then
11220   echo $ECHO_N "(cached) $ECHO_C" >&6
11221 else
11222   cat >conftest.$ac_ext <<_ACEOF
11223 #line 11223 "configure"
11224 #include "confdefs.h"
11225
11226 int
11227 main ()
11228 {
11229 /* FIXME: Include the comments suggested by Paul. */
11230 #ifndef __cplusplus
11231   /* Ultrix mips cc rejects this.  */
11232   typedef int charset[2];
11233   const charset x;
11234   /* SunOS 4.1.1 cc rejects this.  */
11235   char const *const *ccp;
11236   char **p;
11237   /* NEC SVR4.0.2 mips cc rejects this.  */
11238   struct point {int x, y;};
11239   static struct point const zero = {0,0};
11240   /* AIX XL C 1.02.0.0 rejects this.
11241      It does not let you subtract one const X* pointer from another in
11242      an arm of an if-expression whose if-part is not a constant
11243      expression */
11244   const char *g = "string";
11245   ccp = &g + (g ? g-g : 0);
11246   /* HPUX 7.0 cc rejects these. */
11247   ++ccp;
11248   p = (char**) ccp;
11249   ccp = (char const *const *) p;
11250   { /* SCO 3.2v4 cc rejects this.  */
11251     char *t;
11252     char const *s = 0 ? (char *) 0 : (char const *) 0;
11253
11254     *t++ = 0;
11255   }
11256   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
11257     int x[] = {25, 17};
11258     const int *foo = &x[0];
11259     ++foo;
11260   }
11261   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
11262     typedef const int *iptr;
11263     iptr p = 0;
11264     ++p;
11265   }
11266   { /* AIX XL C 1.02.0.0 rejects this saying
11267        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
11268     struct s { int j; const int *ap[3]; };
11269     struct s *b; b->j = 5;
11270   }
11271   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
11272     const int foo = 10;
11273   }
11274 #endif
11275
11276   ;
11277   return 0;
11278 }
11279 _ACEOF
11280 rm -f conftest.$ac_objext
11281 if { (eval echo "$as_me:11281: \"$ac_compile\"") >&5
11282   (eval $ac_compile) 2>&5
11283   ac_status=$?
11284   echo "$as_me:11284: \$? = $ac_status" >&5
11285   (exit $ac_status); } &&
11286          { ac_try='test -s conftest.$ac_objext'
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   ac_cv_c_const=yes
11293 else
11294   echo "$as_me: failed program was:" >&5
11295 cat conftest.$ac_ext >&5
11296 ac_cv_c_const=no
11297 fi
11298 rm -f conftest.$ac_objext conftest.$ac_ext
11299 fi
11300 echo "$as_me:11300: result: $ac_cv_c_const" >&5
11301 echo "${ECHO_T}$ac_cv_c_const" >&6
11302 if test $ac_cv_c_const = no; then
11303
11304 cat >>confdefs.h <<\EOF
11305 #define const
11306 EOF
11307
11308 fi
11309
11310 ###     Checks for external-data
11311
11312 echo "$as_me:11312: checking if data-only library module links" >&5
11313 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
11314 if test "${cf_cv_link_dataonly+set}" = set; then
11315   echo $ECHO_N "(cached) $ECHO_C" >&6
11316 else
11317
11318         rm -f conftest.a
11319         cat >conftest.$ac_ext <<EOF
11320 #line 11320 "configure"
11321 int     testdata[3] = { 123, 456, 789 };
11322 EOF
11323         if { (eval echo "$as_me:11323: \"$ac_compile\"") >&5
11324   (eval $ac_compile) 2>&5
11325   ac_status=$?
11326   echo "$as_me:11326: \$? = $ac_status" >&5
11327   (exit $ac_status); } ; then
11328                 mv conftest.o data.o && \
11329                 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
11330         fi
11331         rm -f conftest.$ac_ext data.o
11332         cat >conftest.$ac_ext <<EOF
11333 #line 11333 "configure"
11334 int     testfunc()
11335 {
11336 #if defined(NeXT)
11337         ${cf_cv_main_return:-return}(1);        /* I'm told this linker is broken */
11338 #else
11339         extern int testdata[3];
11340         return testdata[0] == 123
11341            &&  testdata[1] == 456
11342            &&  testdata[2] == 789;
11343 #endif
11344 }
11345 EOF
11346         if { (eval echo "$as_me:11346: \"$ac_compile\"") >&5
11347   (eval $ac_compile) 2>&5
11348   ac_status=$?
11349   echo "$as_me:11349: \$? = $ac_status" >&5
11350   (exit $ac_status); }; then
11351                 mv conftest.o func.o && \
11352                 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
11353         fi
11354         rm -f conftest.$ac_ext func.o
11355         ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
11356         cf_saveLIBS="$LIBS"
11357         LIBS="conftest.a $LIBS"
11358         if test "$cross_compiling" = yes; then
11359   cf_cv_link_dataonly=unknown
11360 else
11361   cat >conftest.$ac_ext <<_ACEOF
11362 #line 11362 "configure"
11363 #include "confdefs.h"
11364
11365         int main()
11366         {
11367                 extern int testfunc();
11368                 ${cf_cv_main_return:-return} (!testfunc());
11369         }
11370
11371 _ACEOF
11372 rm -f conftest$ac_exeext
11373 if { (eval echo "$as_me:11373: \"$ac_link\"") >&5
11374   (eval $ac_link) 2>&5
11375   ac_status=$?
11376   echo "$as_me:11376: \$? = $ac_status" >&5
11377   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11378   { (eval echo "$as_me:11378: \"$ac_try\"") >&5
11379   (eval $ac_try) 2>&5
11380   ac_status=$?
11381   echo "$as_me:11381: \$? = $ac_status" >&5
11382   (exit $ac_status); }; }; then
11383   cf_cv_link_dataonly=yes
11384 else
11385   echo "$as_me: program exited with status $ac_status" >&5
11386 echo "$as_me: failed program was:" >&5
11387 cat conftest.$ac_ext >&5
11388 cf_cv_link_dataonly=no
11389 fi
11390 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11391 fi
11392         LIBS="$cf_saveLIBS"
11393
11394 fi
11395
11396 echo "$as_me:11396: result: $cf_cv_link_dataonly" >&5
11397 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
11398
11399 if test "$cf_cv_link_dataonly" = no ; then
11400         cat >>confdefs.h <<\EOF
11401 #define BROKEN_LINKER 1
11402 EOF
11403
11404         BROKEN_LINKER=1
11405 fi
11406
11407 ###     Checks for library functions.
11408
11409 echo "$as_me:11409: checking for working mkstemp" >&5
11410 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
11411 if test "${cf_cv_func_mkstemp+set}" = set; then
11412   echo $ECHO_N "(cached) $ECHO_C" >&6
11413 else
11414
11415 rm -rf conftest*
11416 if test "$cross_compiling" = yes; then
11417   cf_cv_func_mkstemp=maybe
11418 else
11419   cat >conftest.$ac_ext <<_ACEOF
11420 #line 11420 "configure"
11421 #include "confdefs.h"
11422
11423 #include <sys/types.h>
11424 #include <stdlib.h>
11425 #include <stdio.h>
11426 #include <string.h>
11427 #include <sys/stat.h>
11428 int main()
11429 {
11430         char *tmpl = "conftestXXXXXX";
11431         char name[2][80];
11432         int n;
11433         int result = 0;
11434         int fd;
11435         struct stat sb;
11436
11437         umask(077);
11438         for (n = 0; n < 2; ++n) {
11439                 strcpy(name[n], tmpl);
11440                 if ((fd = mkstemp(name[n])) >= 0) {
11441                         if (!strcmp(name[n], tmpl)
11442                          || stat(name[n], &sb) != 0
11443                          || (sb.st_mode & S_IFMT) != S_IFREG
11444                          || (sb.st_mode & 077) != 0) {
11445                                 result = 1;
11446                         }
11447                         close(fd);
11448                 }
11449         }
11450         if (result == 0
11451          && !strcmp(name[0], name[1]))
11452                 result = 1;
11453         ${cf_cv_main_return:-return}(result);
11454 }
11455
11456 _ACEOF
11457 rm -f conftest$ac_exeext
11458 if { (eval echo "$as_me:11458: \"$ac_link\"") >&5
11459   (eval $ac_link) 2>&5
11460   ac_status=$?
11461   echo "$as_me:11461: \$? = $ac_status" >&5
11462   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11463   { (eval echo "$as_me:11463: \"$ac_try\"") >&5
11464   (eval $ac_try) 2>&5
11465   ac_status=$?
11466   echo "$as_me:11466: \$? = $ac_status" >&5
11467   (exit $ac_status); }; }; then
11468   cf_cv_func_mkstemp=yes
11469
11470 else
11471   echo "$as_me: program exited with status $ac_status" >&5
11472 echo "$as_me: failed program was:" >&5
11473 cat conftest.$ac_ext >&5
11474 cf_cv_func_mkstemp=no
11475
11476 fi
11477 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11478 fi
11479
11480 fi
11481 echo "$as_me:11481: result: $cf_cv_func_mkstemp" >&5
11482 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
11483 if test "x$cf_cv_func_mkstemp" = xmaybe ; then
11484         echo "$as_me:11484: checking for mkstemp" >&5
11485 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
11486 if test "${ac_cv_func_mkstemp+set}" = set; then
11487   echo $ECHO_N "(cached) $ECHO_C" >&6
11488 else
11489   cat >conftest.$ac_ext <<_ACEOF
11490 #line 11490 "configure"
11491 #include "confdefs.h"
11492 /* System header to define __stub macros and hopefully few prototypes,
11493     which can conflict with char mkstemp (); below.  */
11494 #include <assert.h>
11495 /* Override any gcc2 internal prototype to avoid an error.  */
11496 #ifdef __cplusplus
11497 extern "C"
11498 #endif
11499 /* We use char because int might match the return type of a gcc2
11500    builtin and then its argument prototype would still apply.  */
11501 char mkstemp ();
11502 char (*f) ();
11503
11504 int
11505 main ()
11506 {
11507 /* The GNU C library defines this for functions which it implements
11508     to always fail with ENOSYS.  Some functions are actually named
11509     something starting with __ and the normal name is an alias.  */
11510 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
11511 choke me
11512 #else
11513 f = mkstemp;
11514 #endif
11515
11516   ;
11517   return 0;
11518 }
11519 _ACEOF
11520 rm -f conftest.$ac_objext conftest$ac_exeext
11521 if { (eval echo "$as_me:11521: \"$ac_link\"") >&5
11522   (eval $ac_link) 2>&5
11523   ac_status=$?
11524   echo "$as_me:11524: \$? = $ac_status" >&5
11525   (exit $ac_status); } &&
11526          { ac_try='test -s conftest$ac_exeext'
11527   { (eval echo "$as_me:11527: \"$ac_try\"") >&5
11528   (eval $ac_try) 2>&5
11529   ac_status=$?
11530   echo "$as_me:11530: \$? = $ac_status" >&5
11531   (exit $ac_status); }; }; then
11532   ac_cv_func_mkstemp=yes
11533 else
11534   echo "$as_me: failed program was:" >&5
11535 cat conftest.$ac_ext >&5
11536 ac_cv_func_mkstemp=no
11537 fi
11538 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11539 fi
11540 echo "$as_me:11540: result: $ac_cv_func_mkstemp" >&5
11541 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
11542
11543 fi
11544 if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
11545         cat >>confdefs.h <<\EOF
11546 #define HAVE_MKSTEMP 1
11547 EOF
11548
11549 fi
11550
11551 echo "$as_me:11551: checking return type of signal handlers" >&5
11552 echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
11553 if test "${ac_cv_type_signal+set}" = set; then
11554   echo $ECHO_N "(cached) $ECHO_C" >&6
11555 else
11556   cat >conftest.$ac_ext <<_ACEOF
11557 #line 11557 "configure"
11558 #include "confdefs.h"
11559 #include <sys/types.h>
11560 #include <signal.h>
11561 #ifdef signal
11562 # undef signal
11563 #endif
11564 #ifdef __cplusplus
11565 extern "C" void (*signal (int, void (*)(int)))(int);
11566 #else
11567 void (*signal ()) ();
11568 #endif
11569
11570 int
11571 main ()
11572 {
11573 int i;
11574   ;
11575   return 0;
11576 }
11577 _ACEOF
11578 rm -f conftest.$ac_objext
11579 if { (eval echo "$as_me:11579: \"$ac_compile\"") >&5
11580   (eval $ac_compile) 2>&5
11581   ac_status=$?
11582   echo "$as_me:11582: \$? = $ac_status" >&5
11583   (exit $ac_status); } &&
11584          { ac_try='test -s conftest.$ac_objext'
11585   { (eval echo "$as_me:11585: \"$ac_try\"") >&5
11586   (eval $ac_try) 2>&5
11587   ac_status=$?
11588   echo "$as_me:11588: \$? = $ac_status" >&5
11589   (exit $ac_status); }; }; then
11590   ac_cv_type_signal=void
11591 else
11592   echo "$as_me: failed program was:" >&5
11593 cat conftest.$ac_ext >&5
11594 ac_cv_type_signal=int
11595 fi
11596 rm -f conftest.$ac_objext conftest.$ac_ext
11597 fi
11598 echo "$as_me:11598: result: $ac_cv_type_signal" >&5
11599 echo "${ECHO_T}$ac_cv_type_signal" >&6
11600
11601 cat >>confdefs.h <<EOF
11602 #define RETSIGTYPE $ac_cv_type_signal
11603 EOF
11604
11605 if test -z "$cf_user_CFLAGS" && test "$with_no_leaks" = no ; then
11606         CFLAGS=`echo ${CFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
11607         CXXFLAGS=`echo ${CXXFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
11608 fi
11609
11610 cf_with_ada=yes
11611 if test "$cf_with_ada" != "no" ; then
11612
11613 cf_ada_make=gnatmake
11614 # Extract the first word of "$cf_ada_make", so it can be a program name with args.
11615 set dummy $cf_ada_make; ac_word=$2
11616 echo "$as_me:11616: checking for $ac_word" >&5
11617 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
11618 if test "${ac_cv_prog_gnat_exists+set}" = set; then
11619   echo $ECHO_N "(cached) $ECHO_C" >&6
11620 else
11621   if test -n "$gnat_exists"; then
11622   ac_cv_prog_gnat_exists="$gnat_exists" # Let the user override the test.
11623 else
11624   ac_save_IFS=$IFS; IFS=$ac_path_separator
11625 ac_dummy="$PATH"
11626 for ac_dir in $ac_dummy; do
11627   IFS=$ac_save_IFS
11628   test -z "$ac_dir" && ac_dir=.
11629   $as_executable_p "$ac_dir/$ac_word" || continue
11630 ac_cv_prog_gnat_exists="yes"
11631 echo "$as_me:11631: found $ac_dir/$ac_word" >&5
11632 break
11633 done
11634
11635   test -z "$ac_cv_prog_gnat_exists" && ac_cv_prog_gnat_exists="no"
11636 fi
11637 fi
11638 gnat_exists=$ac_cv_prog_gnat_exists
11639 if test -n "$gnat_exists"; then
11640   echo "$as_me:11640: result: $gnat_exists" >&5
11641 echo "${ECHO_T}$gnat_exists" >&6
11642 else
11643   echo "$as_me:11643: result: no" >&5
11644 echo "${ECHO_T}no" >&6
11645 fi
11646
11647 if test "$ac_cv_prog_gnat_exists" = no; then
11648    cf_ada_make=
11649    cf_cv_prog_gnat_correct=no
11650 else
11651
11652 echo "$as_me:11652: checking for gnat version" >&5
11653 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
11654 cf_gnat_version=`${cf_ada_make:-gnatmake} -v 2>&1 | \
11655         grep '[0-9].[0-9][0-9]*' |\
11656     sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
11657 echo "$as_me:11657: result: $cf_gnat_version" >&5
11658 echo "${ECHO_T}$cf_gnat_version" >&6
11659
11660 case $cf_gnat_version in #(vi
11661 3.1[1-9]*|3.[2-9]*|[4-9].*|20[0-9][0-9]) #(vi
11662         cf_cv_prog_gnat_correct=yes
11663         ;;
11664 *)
11665         { echo "$as_me:11665: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5
11666 echo "$as_me: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&2;}
11667         cf_cv_prog_gnat_correct=no
11668         ;;
11669 esac
11670
11671    # Extract the first word of "m4", so it can be a program name with args.
11672 set dummy m4; ac_word=$2
11673 echo "$as_me:11673: checking for $ac_word" >&5
11674 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
11675 if test "${ac_cv_prog_M4_exists+set}" = set; then
11676   echo $ECHO_N "(cached) $ECHO_C" >&6
11677 else
11678   if test -n "$M4_exists"; then
11679   ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
11680 else
11681   ac_save_IFS=$IFS; IFS=$ac_path_separator
11682 ac_dummy="$PATH"
11683 for ac_dir in $ac_dummy; do
11684   IFS=$ac_save_IFS
11685   test -z "$ac_dir" && ac_dir=.
11686   $as_executable_p "$ac_dir/$ac_word" || continue
11687 ac_cv_prog_M4_exists="yes"
11688 echo "$as_me:11688: found $ac_dir/$ac_word" >&5
11689 break
11690 done
11691
11692   test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
11693 fi
11694 fi
11695 M4_exists=$ac_cv_prog_M4_exists
11696 if test -n "$M4_exists"; then
11697   echo "$as_me:11697: result: $M4_exists" >&5
11698 echo "${ECHO_T}$M4_exists" >&6
11699 else
11700   echo "$as_me:11700: result: no" >&5
11701 echo "${ECHO_T}no" >&6
11702 fi
11703
11704    if test "$ac_cv_prog_M4_exists" = no; then
11705       cf_cv_prog_gnat_correct=no
11706       echo Ada95 binding required program m4 not found. Ada95 binding disabled.
11707    fi
11708    if test "$cf_cv_prog_gnat_correct" = yes; then
11709       echo "$as_me:11709: checking if GNAT works" >&5
11710 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
11711
11712 rm -rf conftest* *~conftest*
11713 cat >>conftest.ads <<CF_EOF
11714 procedure conftest;
11715 CF_EOF
11716 cat >>conftest.adb <<CF_EOF
11717 with Text_IO;
11718 with GNAT.OS_Lib;
11719 procedure conftest is
11720 begin
11721    Text_IO.Put ("Hello World");
11722    Text_IO.New_Line;
11723    GNAT.OS_Lib.OS_Exit (0);
11724 end conftest;
11725 CF_EOF
11726 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
11727    if ( ./conftest 1>&5 2>&1 ) ; then
11728       cf_cv_prog_gnat_correct=yes
11729    else
11730       cf_cv_prog_gnat_correct=no
11731    fi
11732 else
11733    cf_cv_prog_gnat_correct=no
11734 fi
11735 rm -rf conftest* *~conftest*
11736
11737       echo "$as_me:11737: result: $cf_cv_prog_gnat_correct" >&5
11738 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
11739    fi
11740 fi
11741
11742         if test "$cf_cv_prog_gnat_correct" = yes; then
11743
11744                 # make ADAFLAGS consistent with CFLAGS
11745                 case "$CFLAGS" in
11746                 *-g*)
11747
11748         ADAFLAGS="$ADAFLAGS -g"
11749
11750                         ;;
11751                 esac
11752                 case "$CFLAGS" in
11753                 *-O*)
11754
11755         ADAFLAGS="$ADAFLAGS -O3"
11756
11757                         ;;
11758                 esac
11759
11760 echo "$as_me:11760: checking if GNAT supports generics" >&5
11761 echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6
11762 case $cf_gnat_version in #(vi
11763 3.[1-9]*|[4-9].*) #(vi
11764         cf_gnat_generics=yes
11765         ;;
11766 *)
11767         cf_gnat_generics=no
11768         ;;
11769 esac
11770 echo "$as_me:11770: result: $cf_gnat_generics" >&5
11771 echo "${ECHO_T}$cf_gnat_generics" >&6
11772
11773 if test "$cf_gnat_generics" = yes
11774 then
11775         cf_compile_generics=generics
11776         cf_generic_objects="\${GENOBJS}"
11777 else
11778         cf_compile_generics=
11779         cf_generic_objects=
11780 fi
11781
11782 echo "$as_me:11782: checking if GNAT supports SIGINT" >&5
11783 echo $ECHO_N "checking if GNAT supports SIGINT... $ECHO_C" >&6
11784 if test "${cf_cv_gnat_sigint+set}" = set; then
11785   echo $ECHO_N "(cached) $ECHO_C" >&6
11786 else
11787
11788 rm -rf conftest* *~conftest*
11789 cat >>conftest.ads <<CF_EOF
11790 with Ada.Interrupts.Names;
11791
11792 package ConfTest is
11793
11794    pragma Warnings (Off);  --  the next pragma exists since 3.11p
11795    pragma Unreserve_All_Interrupts;
11796    pragma Warnings (On);
11797
11798    protected Process is
11799       procedure Stop;
11800       function Continue return Boolean;
11801       pragma Attach_Handler (Stop, Ada.Interrupts.Names.SIGINT);
11802    private
11803       Done : Boolean := False;
11804    end Process;
11805
11806 end ConfTest;
11807 CF_EOF
11808 cat >>conftest.adb <<CF_EOF
11809 package body ConfTest is
11810    protected body Process is
11811       procedure Stop is
11812       begin
11813          Done := True;
11814       end Stop;
11815       function Continue return Boolean is
11816       begin
11817          return not Done;
11818       end Continue;
11819    end Process;
11820 end ConfTest;
11821 CF_EOF
11822 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
11823       cf_cv_gnat_sigint=yes
11824 else
11825    cf_cv_gnat_sigint=no
11826 fi
11827 rm -rf conftest* *~conftest*
11828
11829 fi
11830 echo "$as_me:11830: result: $cf_cv_gnat_sigint" >&5
11831 echo "${ECHO_T}$cf_cv_gnat_sigint" >&6
11832
11833 if test $cf_cv_gnat_sigint = yes ; then
11834         USE_GNAT_SIGINT=""
11835 else
11836         USE_GNAT_SIGINT="#"
11837 fi
11838
11839 echo "$as_me:11839: checking if GNAT pragma Unreferenced works" >&5
11840 echo $ECHO_N "checking if GNAT pragma Unreferenced works... $ECHO_C" >&6
11841 if test "${cf_cv_pragma_unreferenced+set}" = set; then
11842   echo $ECHO_N "(cached) $ECHO_C" >&6
11843 else
11844
11845 rm -rf conftest* *~conftest*
11846 cat >>conftest.ads <<CF_EOF
11847 procedure conftest;
11848 CF_EOF
11849 cat >>conftest.adb <<CF_EOF
11850 with Text_IO;
11851 with GNAT.OS_Lib;
11852 procedure conftest is
11853    test : Integer;
11854    pragma Unreferenced (test);
11855 begin
11856    test := 1;
11857    Text_IO.Put ("Hello World");
11858    Text_IO.New_Line;
11859    GNAT.OS_Lib.OS_Exit (0);
11860 end conftest;
11861 CF_EOF
11862 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
11863       cf_cv_pragma_unreferenced=yes
11864 else
11865    cf_cv_pragma_unreferenced=no
11866 fi
11867 rm -rf conftest* *~conftest*
11868
11869 fi
11870 echo "$as_me:11870: result: $cf_cv_pragma_unreferenced" >&5
11871 echo "${ECHO_T}$cf_cv_pragma_unreferenced" >&6
11872
11873 # if the pragma is supported, use it (needed in the Trace code).
11874 if test $cf_cv_pragma_unreferenced = yes ; then
11875         PRAGMA_UNREF=TRUE
11876 else
11877         PRAGMA_UNREF=FALSE
11878 fi
11879
11880 cf_gnat_libraries=no
11881 cf_gnat_projects=no
11882
11883 echo "$as_me:11883: checking if GNAT supports project files" >&5
11884 echo $ECHO_N "checking if GNAT supports project files... $ECHO_C" >&6
11885 case $cf_gnat_version in #(vi
11886 3.[0-9]*) #(vi
11887         ;;
11888 *)
11889         case $cf_cv_system_name in #(vi
11890         cygwin*) #(vi
11891                 ;;
11892         *)
11893                 mkdir conftest.src conftest.bin conftest.lib
11894                 cd conftest.src
11895                 rm -rf conftest* *~conftest*
11896                 cat >>library.gpr <<CF_EOF
11897 project Library is
11898   Kind := External ("LIB_KIND");
11899   for Library_Name use "ConfTest";
11900   for Object_Dir use ".";
11901   for Library_ALI_Dir use External("LIBRARY_DIR");
11902   for Library_Version use External ("SONAME");
11903   for Library_Kind use Kind;
11904   for Library_Dir use External("BUILD_DIR");
11905   Source_Dir := External ("SOURCE_DIR");
11906   for Source_Dirs use (Source_Dir);
11907   package Compiler is
11908      for Default_Switches ("Ada") use
11909        ("-g",
11910         "-O2",
11911         "-gnatafno",
11912         "-gnatVa",   -- All validity checks
11913         "-gnatwa");  -- Activate all optional errors
11914   end Compiler;
11915 end Library;
11916 CF_EOF
11917                 cat >>confpackage.ads <<CF_EOF
11918 package ConfPackage is
11919    procedure conftest;
11920 end ConfPackage;
11921 CF_EOF
11922                 cat >>confpackage.adb <<CF_EOF
11923 with Text_IO;
11924 package body ConfPackage is
11925    procedure conftest is
11926    begin
11927       Text_IO.Put ("Hello World");
11928       Text_IO.New_Line;
11929    end conftest;
11930 end ConfPackage;
11931 CF_EOF
11932                 if ( $cf_ada_make $ADAFLAGS \
11933                                 -Plibrary.gpr \
11934                                 -XBUILD_DIR=`cd ../conftest.bin;pwd` \
11935                                 -XLIBRARY_DIR=`cd ../conftest.lib;pwd` \
11936                                 -XSOURCE_DIR=`pwd` \
11937                                 -XSONAME=libConfTest.so.1 \
11938                                 -XLIB_KIND=static 1>&5 2>&1 ) ; then
11939                         cf_gnat_projects=yes
11940                 fi
11941                 cd ..
11942                 if test -f conftest.lib/confpackage.ali
11943                 then
11944                         cf_gnat_libraries=yes
11945                 fi
11946                 rm -rf conftest* *~conftest*
11947                 ;;
11948         esac
11949         ;;
11950 esac
11951 echo "$as_me:11951: result: $cf_gnat_projects" >&5
11952 echo "${ECHO_T}$cf_gnat_projects" >&6
11953
11954 if test $cf_gnat_projects = yes
11955 then
11956         echo "$as_me:11956: checking if GNAT supports libraries" >&5
11957 echo $ECHO_N "checking if GNAT supports libraries... $ECHO_C" >&6
11958         echo "$as_me:11958: result: $cf_gnat_libraries" >&5
11959 echo "${ECHO_T}$cf_gnat_libraries" >&6
11960 fi
11961
11962 if test "$cf_gnat_projects" = yes
11963 then
11964         USE_OLD_MAKERULES="#"
11965         USE_GNAT_PROJECTS=""
11966 else
11967         USE_OLD_MAKERULES=""
11968         USE_GNAT_PROJECTS="#"
11969 fi
11970
11971 if test "$cf_gnat_libraries" = yes
11972 then
11973         USE_GNAT_LIBRARIES=""
11974 else
11975         USE_GNAT_LIBRARIES="#"
11976 fi
11977
11978 echo "$as_me:11978: checking for ada-compiler" >&5
11979 echo $ECHO_N "checking for ada-compiler... $ECHO_C" >&6
11980
11981 # Check whether --with-ada-compiler or --without-ada-compiler was given.
11982 if test "${with_ada_compiler+set}" = set; then
11983   withval="$with_ada_compiler"
11984   cf_ada_compiler=$withval
11985 else
11986   cf_ada_compiler=gnatmake
11987 fi;
11988
11989 echo "$as_me:11989: result: $cf_ada_compiler" >&5
11990 echo "${ECHO_T}$cf_ada_compiler" >&6
11991
11992                 cf_ada_package=terminal_interface
11993
11994 echo "$as_me:11994: checking for ada-include" >&5
11995 echo $ECHO_N "checking for ada-include... $ECHO_C" >&6
11996
11997 # Check whether --with-ada-include or --without-ada-include was given.
11998 if test "${with_ada_include+set}" = set; then
11999   withval="$with_ada_include"
12000
12001 else
12002   withval="${ADA_INCLUDE:-$prefix/share/ada/adainclude}"
12003 fi; if test -n "$prefix/share/ada/adainclude" ; then
12004
12005 if test "x$prefix" != xNONE; then
12006   cf_path_syntax="$prefix"
12007 else
12008   cf_path_syntax="$ac_default_prefix"
12009 fi
12010
12011 case ".$withval" in #(vi
12012 .\$\(*\)*|.\'*\'*) #(vi
12013   ;;
12014 ..|./*|.\\*) #(vi
12015   ;;
12016 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
12017   ;;
12018 .\${*prefix}*) #(vi
12019   eval withval="$withval"
12020   case ".$withval" in #(vi
12021   .NONE/*)
12022     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
12023     ;;
12024   esac
12025   ;; #(vi
12026 .no|.NONE/*)
12027   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
12028   ;;
12029 *)
12030   { { echo "$as_me:12030: error: expected a pathname, not \"$withval\"" >&5
12031 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
12032    { (exit 1); exit 1; }; }
12033   ;;
12034 esac
12035
12036 fi
12037 ADA_INCLUDE="$withval"
12038
12039 echo "$as_me:12039: result: $ADA_INCLUDE" >&5
12040 echo "${ECHO_T}$ADA_INCLUDE" >&6
12041
12042 echo "$as_me:12042: checking for ada-objects" >&5
12043 echo $ECHO_N "checking for ada-objects... $ECHO_C" >&6
12044
12045 # Check whether --with-ada-objects or --without-ada-objects was given.
12046 if test "${with_ada_objects+set}" = set; then
12047   withval="$with_ada_objects"
12048
12049 else
12050   withval="${ADA_OBJECTS:-$prefix/lib/ada/adalib}"
12051 fi; if test -n "$prefix/lib/ada/adalib" ; then
12052
12053 if test "x$prefix" != xNONE; then
12054   cf_path_syntax="$prefix"
12055 else
12056   cf_path_syntax="$ac_default_prefix"
12057 fi
12058
12059 case ".$withval" in #(vi
12060 .\$\(*\)*|.\'*\'*) #(vi
12061   ;;
12062 ..|./*|.\\*) #(vi
12063   ;;
12064 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
12065   ;;
12066 .\${*prefix}*) #(vi
12067   eval withval="$withval"
12068   case ".$withval" in #(vi
12069   .NONE/*)
12070     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
12071     ;;
12072   esac
12073   ;; #(vi
12074 .no|.NONE/*)
12075   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
12076   ;;
12077 *)
12078   { { echo "$as_me:12078: error: expected a pathname, not \"$withval\"" >&5
12079 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
12080    { (exit 1); exit 1; }; }
12081   ;;
12082 esac
12083
12084 fi
12085 ADA_OBJECTS="$withval"
12086
12087 echo "$as_me:12087: result: $ADA_OBJECTS" >&5
12088 echo "${ECHO_T}$ADA_OBJECTS" >&6
12089
12090 echo "$as_me:12090: checking if an Ada95 shared-library should be built" >&5
12091 echo $ECHO_N "checking if an Ada95 shared-library should be built... $ECHO_C" >&6
12092
12093 # Check whether --with-ada-sharedlib or --without-ada-sharedlib was given.
12094 if test "${with_ada_sharedlib+set}" = set; then
12095   withval="$with_ada_sharedlib"
12096   with_ada_sharedlib=$withval
12097 else
12098   with_ada_sharedlib=no
12099 fi;
12100 echo "$as_me:12100: result: $with_ada_sharedlib" >&5
12101 echo "${ECHO_T}$with_ada_sharedlib" >&6
12102
12103 ADA_SHAREDLIB='lib$(LIB_NAME).so.1'
12104 MAKE_ADA_SHAREDLIB="#"
12105
12106 if test "x$with_ada_sharedlib" != xno
12107 then
12108         MAKE_ADA_SHAREDLIB=
12109         if test "x$with_ada_sharedlib" != xyes
12110         then
12111                 ADA_SHAREDLIB="$with_ada_sharedlib"
12112         fi
12113 fi
12114
12115         else
12116                 { { echo "$as_me:12116: error: No usable Ada compiler found" >&5
12117 echo "$as_me: error: No usable Ada compiler found" >&2;}
12118    { (exit 1); exit 1; }; }
12119         fi
12120 else
12121         { { echo "$as_me:12121: error: The Ada compiler is needed for this package" >&5
12122 echo "$as_me: error: The Ada compiler is needed for this package" >&2;}
12123    { (exit 1); exit 1; }; }
12124 fi
12125
12126 ################################################################################
12127
12128 # not needed
12129 TINFO_LDFLAGS2=
12130
12131 TINFO_LIBS=
12132
12133 ### Construct the list of include-directories to be generated
12134
12135 CPPFLAGS="$CPPFLAGS -I. -I../include"
12136 if test "$srcdir" != "."; then
12137         CPPFLAGS="$CPPFLAGS -I\${srcdir}/../include"
12138 fi
12139 if test "$GCC" != yes; then
12140         CPPFLAGS="$CPPFLAGS -I\${includedir}"
12141 elif test "$includedir" != "/usr/include"; then
12142         if test "$includedir" = '${prefix}/include' ; then
12143                 if test $prefix != /usr ; then
12144                         CPPFLAGS="$CPPFLAGS -I\${includedir}"
12145                 fi
12146         else
12147                 CPPFLAGS="$CPPFLAGS -I\${includedir}"
12148         fi
12149 fi
12150
12151 ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
12152 if test "$srcdir" != "."; then
12153         ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
12154 fi
12155 if test "$GCC" != yes; then
12156         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
12157 elif test "$includedir" != "/usr/include"; then
12158         if test "$includedir" = '${prefix}/include' ; then
12159                 if test $prefix != /usr ; then
12160                         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
12161                 fi
12162         else
12163                 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
12164         fi
12165 fi
12166
12167 ### Build up pieces for makefile rules
12168 echo "$as_me:12168: checking default library suffix" >&5
12169 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
12170
12171         case $DFT_LWR_MODEL in
12172         libtool) DFT_ARG_SUFFIX=''   ;;
12173         normal)  DFT_ARG_SUFFIX=''   ;;
12174         debug)   DFT_ARG_SUFFIX='_g' ;;
12175         profile) DFT_ARG_SUFFIX='_p' ;;
12176         shared)  DFT_ARG_SUFFIX=''   ;;
12177         esac
12178         test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
12179 echo "$as_me:12179: result: $DFT_ARG_SUFFIX" >&5
12180 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
12181
12182 echo "$as_me:12182: checking default library-dependency suffix" >&5
12183 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
12184
12185         case $DFT_LWR_MODEL in #(vi
12186         libtool) #(vi
12187                 DFT_LIB_SUFFIX='.la'
12188                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
12189                 ;;
12190         normal) #(vi
12191                 DFT_LIB_SUFFIX='.a'
12192                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
12193                 ;;
12194         debug) #(vi
12195                 DFT_LIB_SUFFIX='_g.a'
12196                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
12197                 ;;
12198         profile) #(vi
12199                 DFT_LIB_SUFFIX='_p.a'
12200                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
12201                 ;;
12202         shared) #(vi
12203                 case $cf_cv_system_name in
12204                 aix[5-7]*) #(vi
12205                         DFT_LIB_SUFFIX='.a'
12206                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
12207                         ;;
12208                 cygwin*|mingw*) #(vi
12209                         DFT_LIB_SUFFIX='.dll'
12210                         DFT_DEP_SUFFIX='.dll.a'
12211                         ;;
12212                 darwin*) #(vi
12213                         DFT_LIB_SUFFIX='.dylib'
12214                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
12215                         ;;
12216                 hpux*) #(vi
12217                         case $target in
12218                         ia64*) #(vi
12219                                 DFT_LIB_SUFFIX='.so'
12220                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
12221                                 ;;
12222                         *) #(vi
12223                                 DFT_LIB_SUFFIX='.sl'
12224                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
12225                                 ;;
12226                         esac
12227                         ;;
12228                 *)      DFT_LIB_SUFFIX='.so'
12229                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
12230                         ;;
12231                 esac
12232         esac
12233         test -n "$LIB_SUFFIX" && DFT_LIB_SUFFIX="${LIB_SUFFIX}${DFT_LIB_SUFFIX}"
12234         test -n "$LIB_SUFFIX" && DFT_DEP_SUFFIX="${LIB_SUFFIX}${DFT_DEP_SUFFIX}"
12235 echo "$as_me:12235: result: $DFT_DEP_SUFFIX" >&5
12236 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
12237
12238 echo "$as_me:12238: checking default object directory" >&5
12239 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
12240
12241         case $DFT_LWR_MODEL in
12242         libtool) DFT_OBJ_SUBDIR='obj_lo'  ;;
12243         normal)  DFT_OBJ_SUBDIR='objects' ;;
12244         debug)   DFT_OBJ_SUBDIR='obj_g' ;;
12245         profile) DFT_OBJ_SUBDIR='obj_p' ;;
12246         shared)
12247                 case $cf_cv_system_name in #(vi
12248                 cygwin) #(vi
12249                         DFT_OBJ_SUBDIR='objects' ;;
12250                 *)
12251                         DFT_OBJ_SUBDIR='obj_s' ;;
12252                 esac
12253         esac
12254 echo "$as_me:12254: result: $DFT_OBJ_SUBDIR" >&5
12255 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
12256
12257 ### Set up low-level terminfo dependencies for makefiles.
12258
12259 if test "$DFT_LWR_MODEL" = shared ; then
12260         case $cf_cv_system_name in #(vi
12261         cygwin*)
12262                 # "lib" files have ".dll.a" suffix, "cyg" files have ".dll"
12263                 ;;
12264         esac
12265 fi
12266
12267 ### Construct the list of subdirectories for which we'll customize makefiles
12268 ### with the appropriate compile-rules.
12269
12270 SUB_MAKEFILES="gen/adacurses${DFT_ARG_SUFFIX}-config:gen/adacurses-config.in"
12271
12272 cat >>confdefs.h <<EOF
12273 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
12274 EOF
12275
12276 ### Now that we're done running tests, add the compiler-warnings, if any
12277
12278 cf_fix_cppflags=no
12279 cf_new_cflags=
12280 cf_new_cppflags=
12281 cf_new_extra_cppflags=
12282
12283 for cf_add_cflags in $EXTRA_CFLAGS
12284 do
12285 case $cf_fix_cppflags in
12286 no)
12287         case $cf_add_cflags in #(vi
12288         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
12289                 case $cf_add_cflags in
12290                 -D*)
12291                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12292
12293                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12294                                 && test -z "${cf_tst_cflags}" \
12295                                 && cf_fix_cppflags=yes
12296
12297                         if test $cf_fix_cppflags = yes ; then
12298                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12299                                 continue
12300                         elif test "${cf_tst_cflags}" = "\"'" ; then
12301                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12302                                 continue
12303                         fi
12304                         ;;
12305                 esac
12306                 case "$CPPFLAGS" in
12307                 *$cf_add_cflags) #(vi
12308                         ;;
12309                 *) #(vi
12310                         case $cf_add_cflags in #(vi
12311                         -D*)
12312                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12313
12314 CPPFLAGS=`echo "$CPPFLAGS" | \
12315         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
12316                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
12317
12318                                 ;;
12319                         esac
12320                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
12321                         ;;
12322                 esac
12323                 ;;
12324         *)
12325                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
12326                 ;;
12327         esac
12328         ;;
12329 yes)
12330         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12331
12332         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12333
12334         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12335                 && test -z "${cf_tst_cflags}" \
12336                 && cf_fix_cppflags=no
12337         ;;
12338 esac
12339 done
12340
12341 if test -n "$cf_new_cflags" ; then
12342
12343         CFLAGS="$CFLAGS $cf_new_cflags"
12344 fi
12345
12346 if test -n "$cf_new_cppflags" ; then
12347
12348         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
12349 fi
12350
12351 if test -n "$cf_new_extra_cppflags" ; then
12352
12353         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
12354 fi
12355
12356 ################################################################################
12357
12358 if test x"$enable_pc_files" = xyes ; then \
12359 SUB_MAKEFILES="$SUB_MAKEFILES misc/gen-pkgconfig:misc/gen-pkgconfig.in"
12360 MAKE_PC_FILES=
12361 else
12362 MAKE_PC_FILES="#"
12363 fi
12364
12365 ################################################################################
12366
12367 TEST_ARG2=
12368
12369 TEST_LIBS2=
12370
12371 NCURSES_SHLIB2="sh -c"
12372
12373 ADA_SUBDIRS="include gen src doc"
12374 if test "x$cf_with_tests" != "xno" ; then
12375         ADA_SUBDIRS="$ADA_SUBDIRS samples"
12376 fi
12377 for cf_dir in $ADA_SUBDIRS
12378 do
12379         SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
12380 done
12381
12382 NCURSES_TREE="#"
12383
12384 EXTERNAL_TREE=
12385
12386 # match layout used by make-tar.sh
12387 ADAHTML_DIR=../doc/ada
12388
12389 ac_config_files="$ac_config_files $SUB_MAKEFILES doc/adacurses${DFT_ARG_SUFFIX}-config.1:doc/MKada_config.in Makefile"
12390 ac_config_commands="$ac_config_commands default"
12391 cat >confcache <<\_ACEOF
12392 # This file is a shell script that caches the results of configure
12393 # tests run on this system so they can be shared between configure
12394 # scripts and configure runs, see configure's option --config-cache.
12395 # It is not useful on other systems.  If it contains results you don't
12396 # want to keep, you may remove or edit it.
12397 #
12398 # config.status only pays attention to the cache file if you give it
12399 # the --recheck option to rerun configure.
12400 #
12401 # `ac_cv_env_foo' variables (set or unset) will be overriden when
12402 # loading this file, other *unset* `ac_cv_foo' will be assigned the
12403 # following values.
12404
12405 _ACEOF
12406
12407 # The following way of writing the cache mishandles newlines in values,
12408 # but we know of no workaround that is simple, portable, and efficient.
12409 # So, don't put newlines in cache variables' values.
12410 # Ultrix sh set writes to stderr and can't be redirected directly,
12411 # and sets the high bit in the cache file unless we assign to the vars.
12412 {
12413   (set) 2>&1 |
12414     case `(ac_space=' '; set | grep ac_space) 2>&1` in
12415     *ac_space=\ *)
12416       # `set' does not quote correctly, so add quotes (double-quote
12417       # substitution turns \\\\ into \\, and sed turns \\ into \).
12418       sed -n \
12419         "s/'/'\\\\''/g;
12420           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
12421       ;;
12422     *)
12423       # `set' quotes correctly as required by POSIX, so do not add quotes.
12424       sed -n \
12425         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
12426       ;;
12427     esac;
12428 } |
12429   sed '
12430      t clear
12431      : clear
12432      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
12433      t end
12434      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
12435      : end' >>confcache
12436 if cmp -s $cache_file confcache; then :; else
12437   if test -w $cache_file; then
12438     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
12439     cat confcache >$cache_file
12440   else
12441     echo "not updating unwritable cache $cache_file"
12442   fi
12443 fi
12444 rm -f confcache
12445
12446 test "x$prefix" = xNONE && prefix=$ac_default_prefix
12447 # Let make expand exec_prefix.
12448 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
12449
12450 # VPATH may cause trouble with some makes, so we remove $(srcdir),
12451 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
12452 # trailing colons and then remove the whole line if VPATH becomes empty
12453 # (actually we leave an empty line to preserve line numbers).
12454 if test "x$srcdir" = x.; then
12455   ac_vpsub='/^[         ]*VPATH[        ]*=/{
12456 s/:*\$(srcdir):*/:/;
12457 s/:*\${srcdir}:*/:/;
12458 s/:*@srcdir@:*/:/;
12459 s/^\([^=]*=[    ]*\):*/\1/;
12460 s/:*$//;
12461 s/^[^=]*=[      ]*$//;
12462 }'
12463 fi
12464
12465 DEFS=-DHAVE_CONFIG_H
12466
12467 : ${CONFIG_STATUS=./config.status}
12468 ac_clean_files_save=$ac_clean_files
12469 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
12470 { echo "$as_me:12470: creating $CONFIG_STATUS" >&5
12471 echo "$as_me: creating $CONFIG_STATUS" >&6;}
12472 cat >$CONFIG_STATUS <<_ACEOF
12473 #! $SHELL
12474 # Generated automatically by configure.
12475 # Run this file to recreate the current configuration.
12476 # Compiler output produced by configure, useful for debugging
12477 # configure, is in config.log if it exists.
12478
12479 debug=false
12480 SHELL=\${CONFIG_SHELL-$SHELL}
12481 ac_cs_invocation="\$0 \$@"
12482
12483 _ACEOF
12484
12485 cat >>$CONFIG_STATUS <<\_ACEOF
12486 # Be Bourne compatible
12487 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
12488   emulate sh
12489   NULLCMD=:
12490 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
12491   set -o posix
12492 fi
12493
12494 # Name of the executable.
12495 as_me=`echo "$0" |sed 's,.*[\\/],,'`
12496
12497 if expr a : '\(a\)' >/dev/null 2>&1; then
12498   as_expr=expr
12499 else
12500   as_expr=false
12501 fi
12502
12503 rm -f conf$$ conf$$.exe conf$$.file
12504 echo >conf$$.file
12505 if ln -s conf$$.file conf$$ 2>/dev/null; then
12506   # We could just check for DJGPP; but this test a) works b) is more generic
12507   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
12508   if test -f conf$$.exe; then
12509     # Don't use ln at all; we don't have any links
12510     as_ln_s='cp -p'
12511   else
12512     as_ln_s='ln -s'
12513   fi
12514 elif ln conf$$.file conf$$ 2>/dev/null; then
12515   as_ln_s=ln
12516 else
12517   as_ln_s='cp -p'
12518 fi
12519 rm -f conf$$ conf$$.exe conf$$.file
12520
12521 as_executable_p="test -f"
12522
12523 # Support unset when possible.
12524 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
12525   as_unset=unset
12526 else
12527   as_unset=false
12528 fi
12529
12530 # NLS nuisances.
12531 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
12532 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
12533 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
12534 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
12535 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
12536 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
12537 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
12538 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
12539
12540 # IFS
12541 # We need space, tab and new line, in precisely that order.
12542 as_nl='
12543 '
12544 IFS="   $as_nl"
12545
12546 # CDPATH.
12547 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
12548
12549 exec 6>&1
12550
12551 _ACEOF
12552
12553 # Files that config.status was made for.
12554 if test -n "$ac_config_files"; then
12555   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
12556 fi
12557
12558 if test -n "$ac_config_headers"; then
12559   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
12560 fi
12561
12562 if test -n "$ac_config_links"; then
12563   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
12564 fi
12565
12566 if test -n "$ac_config_commands"; then
12567   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
12568 fi
12569
12570 cat >>$CONFIG_STATUS <<\EOF
12571
12572 ac_cs_usage="\
12573 \`$as_me' instantiates files from templates according to the
12574 current configuration.
12575
12576 Usage: $0 [OPTIONS] [FILE]...
12577
12578   -h, --help       print this help, then exit
12579   -V, --version    print version number, then exit
12580   -d, --debug      don't remove temporary files
12581       --recheck    update $as_me by reconfiguring in the same conditions
12582   --file=FILE[:TEMPLATE]
12583                    instantiate the configuration file FILE
12584   --header=FILE[:TEMPLATE]
12585                    instantiate the configuration header FILE
12586
12587 Configuration files:
12588 $config_files
12589
12590 Configuration headers:
12591 $config_headers
12592
12593 Configuration commands:
12594 $config_commands
12595
12596 Report bugs to <dickey@invisible-island.net>."
12597 EOF
12598
12599 cat >>$CONFIG_STATUS <<EOF
12600 ac_cs_version="\\
12601 config.status
12602 configured by $0, generated by GNU Autoconf 2.52.20101002,
12603   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
12604
12605 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
12606 Free Software Foundation, Inc.
12607 This config.status script is free software; the Free Software Foundation
12608 gives unlimited permission to copy, distribute and modify it."
12609 srcdir=$srcdir
12610 INSTALL="$INSTALL"
12611 EOF
12612
12613 cat >>$CONFIG_STATUS <<\EOF
12614 # If no file are specified by the user, then we need to provide default
12615 # value.  By we need to know if files were specified by the user.
12616 ac_need_defaults=:
12617 while test $# != 0
12618 do
12619   case $1 in
12620   --*=*)
12621     ac_option=`expr "x$1" : 'x\([^=]*\)='`
12622     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
12623     shift
12624     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
12625     shift
12626     ;;
12627   -*);;
12628   *) # This is not an option, so the user has probably given explicit
12629      # arguments.
12630      ac_need_defaults=false;;
12631   esac
12632
12633   case $1 in
12634   # Handling of the options.
12635 EOF
12636 cat >>$CONFIG_STATUS <<EOF
12637   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
12638     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
12639     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
12640 EOF
12641 cat >>$CONFIG_STATUS <<\EOF
12642   --version | --vers* | -V )
12643     echo "$ac_cs_version"; exit 0 ;;
12644   --he | --h)
12645     # Conflict between --help and --header
12646     { { echo "$as_me:12646: error: ambiguous option: $1
12647 Try \`$0 --help' for more information." >&5
12648 echo "$as_me: error: ambiguous option: $1
12649 Try \`$0 --help' for more information." >&2;}
12650    { (exit 1); exit 1; }; };;
12651   --help | --hel | -h )
12652     echo "$ac_cs_usage"; exit 0 ;;
12653   --debug | --d* | -d )
12654     debug=: ;;
12655   --file | --fil | --fi | --f )
12656     shift
12657     CONFIG_FILES="$CONFIG_FILES $1"
12658     ac_need_defaults=false;;
12659   --header | --heade | --head | --hea )
12660     shift
12661     CONFIG_HEADERS="$CONFIG_HEADERS $1"
12662     ac_need_defaults=false;;
12663
12664   # This is an error.
12665   -*) { { echo "$as_me:12665: error: unrecognized option: $1
12666 Try \`$0 --help' for more information." >&5
12667 echo "$as_me: error: unrecognized option: $1
12668 Try \`$0 --help' for more information." >&2;}
12669    { (exit 1); exit 1; }; } ;;
12670
12671   *) ac_config_targets="$ac_config_targets $1" ;;
12672
12673   esac
12674   shift
12675 done
12676
12677 exec 5>>config.log
12678 cat >&5 << _ACEOF
12679
12680 ## ----------------------- ##
12681 ## Running config.status.  ##
12682 ## ----------------------- ##
12683
12684 This file was extended by $as_me 2.52.20101002, executed with
12685   CONFIG_FILES    = $CONFIG_FILES
12686   CONFIG_HEADERS  = $CONFIG_HEADERS
12687   CONFIG_LINKS    = $CONFIG_LINKS
12688   CONFIG_COMMANDS = $CONFIG_COMMANDS
12689   > $ac_cs_invocation
12690 on `(hostname || uname -n) 2>/dev/null | sed 1q`
12691
12692 _ACEOF
12693 EOF
12694
12695 cat >>$CONFIG_STATUS <<EOF
12696 #
12697 # INIT-COMMANDS section.
12698 #
12699
12700 ### Special initialization commands, used to pass information from the
12701 ### configuration-run into config.status
12702
12703 AWK="$AWK"
12704 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
12705 DFT_LWR_MODEL="$DFT_LWR_MODEL"
12706 ECHO_LINK="$ECHO_LINK"
12707 LIB_NAME="$LIB_NAME"
12708 LIB_PREFIX="$LIB_PREFIX"
12709 LIB_SUFFIX="$LIB_SUFFIX"
12710 LN_S="$LN_S"
12711 NCURSES_MAJOR="$NCURSES_MAJOR"
12712 NCURSES_MINOR="$NCURSES_MINOR"
12713 NCURSES_PATCH="$NCURSES_PATCH"
12714 USE_OLD_MAKERULES="$USE_OLD_MAKERULES"
12715 cf_cv_abi_version="$cf_cv_abi_version"
12716 cf_cv_rel_version="$cf_cv_rel_version"
12717 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
12718 cf_cv_shared_soname='$cf_cv_shared_soname'
12719 cf_cv_shlib_version="$cf_cv_shlib_version"
12720 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
12721 cf_cv_system_name="$cf_cv_system_name"
12722 host="$host"
12723 target="$target"
12724
12725 EOF
12726
12727 cat >>$CONFIG_STATUS <<\EOF
12728 for ac_config_target in $ac_config_targets
12729 do
12730   case "$ac_config_target" in
12731   # Handling of arguments.
12732   "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
12733   "doc/adacurses${DFT_ARG_SUFFIX}-config.1" ) CONFIG_FILES="$CONFIG_FILES doc/adacurses${DFT_ARG_SUFFIX}-config.1:doc/MKada_config.in" ;;
12734   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
12735   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
12736   "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
12737   *) { { echo "$as_me:12737: error: invalid argument: $ac_config_target" >&5
12738 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
12739    { (exit 1); exit 1; }; };;
12740   esac
12741 done
12742
12743 # If the user did not use the arguments to specify the items to instantiate,
12744 # then the envvar interface is used.  Set only those that are not.
12745 # We use the long form for the default assignment because of an extremely
12746 # bizarre bug on SunOS 4.1.3.
12747 if $ac_need_defaults; then
12748   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
12749   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
12750   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
12751 fi
12752
12753 # Create a temporary directory, and hook for its removal unless debugging.
12754 $debug ||
12755 {
12756   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
12757   trap '{ (exit 1); exit 1; }' 1 2 13 15
12758 }
12759
12760 # Create a (secure) tmp directory for tmp files.
12761 : ${TMPDIR=/tmp}
12762 {
12763   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
12764   test -n "$tmp" && test -d "$tmp"
12765 }  ||
12766 {
12767   tmp=$TMPDIR/cs$$-$RANDOM
12768   (umask 077 && mkdir $tmp)
12769 } ||
12770 {
12771    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
12772    { (exit 1); exit 1; }
12773 }
12774
12775 EOF
12776
12777 cat >>$CONFIG_STATUS <<EOF
12778
12779 #
12780 # CONFIG_FILES section.
12781 #
12782
12783 # No need to generate the scripts if there are no CONFIG_FILES.
12784 # This happens for instance when ./config.status config.h
12785 if test -n "\$CONFIG_FILES"; then
12786   # Protect against being on the right side of a sed subst in config.status.
12787   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
12788    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
12789 s,@SHELL@,$SHELL,;t t
12790 s,@exec_prefix@,$exec_prefix,;t t
12791 s,@prefix@,$prefix,;t t
12792 s,@program_transform_name@,$program_transform_name,;t t
12793 s,@bindir@,$bindir,;t t
12794 s,@sbindir@,$sbindir,;t t
12795 s,@libexecdir@,$libexecdir,;t t
12796 s,@datadir@,$datadir,;t t
12797 s,@sysconfdir@,$sysconfdir,;t t
12798 s,@sharedstatedir@,$sharedstatedir,;t t
12799 s,@localstatedir@,$localstatedir,;t t
12800 s,@libdir@,$libdir,;t t
12801 s,@includedir@,$includedir,;t t
12802 s,@oldincludedir@,$oldincludedir,;t t
12803 s,@infodir@,$infodir,;t t
12804 s,@mandir@,$mandir,;t t
12805 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
12806 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
12807 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
12808 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
12809 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
12810 s,@build_alias@,$build_alias,;t t
12811 s,@host_alias@,$host_alias,;t t
12812 s,@target_alias@,$target_alias,;t t
12813 s,@ECHO_C@,$ECHO_C,;t t
12814 s,@ECHO_N@,$ECHO_N,;t t
12815 s,@ECHO_T@,$ECHO_T,;t t
12816 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
12817 s,@DEFS@,$DEFS,;t t
12818 s,@LIBS@,$LIBS,;t t
12819 s,@top_builddir@,$top_builddir,;t t
12820 s,@build@,$build,;t t
12821 s,@build_cpu@,$build_cpu,;t t
12822 s,@build_vendor@,$build_vendor,;t t
12823 s,@build_os@,$build_os,;t t
12824 s,@host@,$host,;t t
12825 s,@host_cpu@,$host_cpu,;t t
12826 s,@host_vendor@,$host_vendor,;t t
12827 s,@host_os@,$host_os,;t t
12828 s,@target@,$target,;t t
12829 s,@target_cpu@,$target_cpu,;t t
12830 s,@target_vendor@,$target_vendor,;t t
12831 s,@target_os@,$target_os,;t t
12832 s,@CC@,$CC,;t t
12833 s,@CFLAGS@,$CFLAGS,;t t
12834 s,@LDFLAGS@,$LDFLAGS,;t t
12835 s,@CPPFLAGS@,$CPPFLAGS,;t t
12836 s,@ac_ct_CC@,$ac_ct_CC,;t t
12837 s,@EXEEXT@,$EXEEXT,;t t
12838 s,@OBJEXT@,$OBJEXT,;t t
12839 s,@CPP@,$CPP,;t t
12840 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
12841 s,@PROG_EXT@,$PROG_EXT,;t t
12842 s,@AWK@,$AWK,;t t
12843 s,@EGREP@,$EGREP,;t t
12844 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
12845 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
12846 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
12847 s,@LN_S@,$LN_S,;t t
12848 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
12849 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
12850 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
12851 s,@SET_MAKE@,$SET_MAKE,;t t
12852 s,@CTAGS@,$CTAGS,;t t
12853 s,@ETAGS@,$ETAGS,;t t
12854 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
12855 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
12856 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
12857 s,@RANLIB@,$RANLIB,;t t
12858 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
12859 s,@LD@,$LD,;t t
12860 s,@ac_ct_LD@,$ac_ct_LD,;t t
12861 s,@AR@,$AR,;t t
12862 s,@ac_ct_AR@,$ac_ct_AR,;t t
12863 s,@ARFLAGS@,$ARFLAGS,;t t
12864 s,@DESTDIR@,$DESTDIR,;t t
12865 s,@BUILD_CC@,$BUILD_CC,;t t
12866 s,@BUILD_CPP@,$BUILD_CPP,;t t
12867 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
12868 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
12869 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
12870 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
12871 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
12872 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
12873 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
12874 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
12875 s,@NCURSES_CONFIG@,$NCURSES_CONFIG,;t t
12876 s,@ac_ct_NCURSES_CONFIG@,$ac_ct_NCURSES_CONFIG,;t t
12877 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
12878 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
12879 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
12880 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
12881 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
12882 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
12883 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
12884 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
12885 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
12886 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
12887 s,@CC_G_OPT@,$CC_G_OPT,;t t
12888 s,@LD_MODEL@,$LD_MODEL,;t t
12889 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
12890 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
12891 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
12892 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
12893 s,@LINK_PROGS@,$LINK_PROGS,;t t
12894 s,@LINK_TESTS@,$LINK_TESTS,;t t
12895 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
12896 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
12897 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
12898 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
12899 s,@RPATH_LIST@,$RPATH_LIST,;t t
12900 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
12901 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
12902 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
12903 s,@PTHREAD@,$PTHREAD,;t t
12904 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
12905 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
12906 s,@ECHO_LINK@,$ECHO_LINK,;t t
12907 s,@ADAFLAGS@,$ADAFLAGS,;t t
12908 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
12909 s,@ADA_TRACE@,$ADA_TRACE,;t t
12910 s,@gnat_exists@,$gnat_exists,;t t
12911 s,@M4_exists@,$M4_exists,;t t
12912 s,@cf_ada_make@,$cf_ada_make,;t t
12913 s,@cf_compile_generics@,$cf_compile_generics,;t t
12914 s,@cf_generic_objects@,$cf_generic_objects,;t t
12915 s,@USE_GNAT_SIGINT@,$USE_GNAT_SIGINT,;t t
12916 s,@PRAGMA_UNREF@,$PRAGMA_UNREF,;t t
12917 s,@USE_OLD_MAKERULES@,$USE_OLD_MAKERULES,;t t
12918 s,@USE_GNAT_PROJECTS@,$USE_GNAT_PROJECTS,;t t
12919 s,@USE_GNAT_LIBRARIES@,$USE_GNAT_LIBRARIES,;t t
12920 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
12921 s,@cf_ada_package@,$cf_ada_package,;t t
12922 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
12923 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
12924 s,@ADA_SHAREDLIB@,$ADA_SHAREDLIB,;t t
12925 s,@MAKE_ADA_SHAREDLIB@,$MAKE_ADA_SHAREDLIB,;t t
12926 s,@TINFO_LDFLAGS2@,$TINFO_LDFLAGS2,;t t
12927 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
12928 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
12929 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
12930 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
12931 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
12932 s,@MAKE_PC_FILES@,$MAKE_PC_FILES,;t t
12933 s,@cross_compiling@,$cross_compiling,;t t
12934 s,@TEST_ARG2@,$TEST_ARG2,;t t
12935 s,@TEST_LIBS2@,$TEST_LIBS2,;t t
12936 s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
12937 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
12938 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
12939 s,@EXTERNAL_TREE@,$EXTERNAL_TREE,;t t
12940 s,@ADAHTML_DIR@,$ADAHTML_DIR,;t t
12941 CEOF
12942
12943 EOF
12944
12945   cat >>$CONFIG_STATUS <<\EOF
12946   # Split the substitutions into bite-sized pieces for seds with
12947   # small command number limits, like on Digital OSF/1 and HP-UX.
12948   ac_max_sed_lines=48
12949   ac_sed_frag=1 # Number of current file.
12950   ac_beg=1 # First line for current file.
12951   ac_end=$ac_max_sed_lines # Line after last line for current file.
12952   ac_more_lines=:
12953   ac_sed_cmds=
12954   while $ac_more_lines; do
12955     if test $ac_beg -gt 1; then
12956       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
12957     else
12958       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
12959     fi
12960     if test ! -s $tmp/subs.frag; then
12961       ac_more_lines=false
12962     else
12963       # The purpose of the label and of the branching condition is to
12964       # speed up the sed processing (if there are no `@' at all, there
12965       # is no need to browse any of the substitutions).
12966       # These are the two extra sed commands mentioned above.
12967       (echo ':t
12968   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
12969       if test -z "$ac_sed_cmds"; then
12970         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
12971       else
12972         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
12973       fi
12974       ac_sed_frag=`expr $ac_sed_frag + 1`
12975       ac_beg=$ac_end
12976       ac_end=`expr $ac_end + $ac_max_sed_lines`
12977     fi
12978   done
12979   if test -z "$ac_sed_cmds"; then
12980     ac_sed_cmds=cat
12981   fi
12982 fi # test -n "$CONFIG_FILES"
12983
12984 EOF
12985 cat >>$CONFIG_STATUS <<\EOF
12986 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
12987   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
12988   case $ac_file in
12989   - | *:- | *:-:* ) # input from stdin
12990         cat >$tmp/stdin
12991         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
12992         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
12993   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
12994         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
12995   * )   ac_file_in=$ac_file.in ;;
12996   esac
12997
12998   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
12999   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
13000          X"$ac_file" : 'X\(//\)[^/]' \| \
13001          X"$ac_file" : 'X\(//\)$' \| \
13002          X"$ac_file" : 'X\(/\)' \| \
13003          .     : '\(.\)' 2>/dev/null ||
13004 echo X"$ac_file" |
13005     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
13006           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
13007           /^X\(\/\/\)$/{ s//\1/; q; }
13008           /^X\(\/\).*/{ s//\1/; q; }
13009           s/.*/./; q'`
13010   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
13011     { case "$ac_dir" in
13012   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
13013   *)                      as_incr_dir=.;;
13014 esac
13015 as_dummy="$ac_dir"
13016 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
13017   case $as_mkdir_dir in
13018     # Skip DOS drivespec
13019     ?:) as_incr_dir=$as_mkdir_dir ;;
13020     *)
13021       as_incr_dir=$as_incr_dir/$as_mkdir_dir
13022       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
13023     ;;
13024   esac
13025 done; }
13026
13027     ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
13028     # A "../" for each directory in $ac_dir_suffix.
13029     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
13030   else
13031     ac_dir_suffix= ac_dots=
13032   fi
13033
13034   case $srcdir in
13035   .)  ac_srcdir=.
13036       if test -z "$ac_dots"; then
13037          ac_top_srcdir=.
13038       else
13039          ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
13040       fi ;;
13041   [\\/]* | ?:[\\/]* )
13042       ac_srcdir=$srcdir$ac_dir_suffix;
13043       ac_top_srcdir=$srcdir ;;
13044   *) # Relative path.
13045     ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
13046     ac_top_srcdir=$ac_dots$srcdir ;;
13047   esac
13048
13049   case $INSTALL in
13050   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
13051   *) ac_INSTALL=$ac_dots$INSTALL ;;
13052   esac
13053
13054   if test x"$ac_file" != x-; then
13055     { echo "$as_me:13055: creating $ac_file" >&5
13056 echo "$as_me: creating $ac_file" >&6;}
13057     rm -f "$ac_file"
13058   fi
13059   # Let's still pretend it is `configure' which instantiates (i.e., don't
13060   # use $as_me), people would be surprised to read:
13061   #    /* config.h.  Generated automatically by config.status.  */
13062   configure_input="Generated automatically from `echo $ac_file_in |
13063                                                  sed 's,.*/,,'` by configure."
13064
13065   # First look for the input files in the build tree, otherwise in the
13066   # src tree.
13067   ac_file_inputs=`IFS=:
13068     for f in $ac_file_in; do
13069       case $f in
13070       -) echo $tmp/stdin ;;
13071       [\\/$]*)
13072          # Absolute (can't be DOS-style, as IFS=:)
13073          test -f "$f" || { { echo "$as_me:13073: error: cannot find input file: $f" >&5
13074 echo "$as_me: error: cannot find input file: $f" >&2;}
13075    { (exit 1); exit 1; }; }
13076          echo $f;;
13077       *) # Relative
13078          if test -f "$f"; then
13079            # Build tree
13080            echo $f
13081          elif test -f "$srcdir/$f"; then
13082            # Source tree
13083            echo $srcdir/$f
13084          else
13085            # /dev/null tree
13086            { { echo "$as_me:13086: error: cannot find input file: $f" >&5
13087 echo "$as_me: error: cannot find input file: $f" >&2;}
13088    { (exit 1); exit 1; }; }
13089          fi;;
13090       esac
13091     done` || { (exit 1); exit 1; }
13092 EOF
13093 cat >>$CONFIG_STATUS <<EOF
13094   sed "$ac_vpsub
13095 $extrasub
13096 EOF
13097 cat >>$CONFIG_STATUS <<\EOF
13098 :t
13099 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
13100 s,@configure_input@,$configure_input,;t t
13101 s,@srcdir@,$ac_srcdir,;t t
13102 s,@top_srcdir@,$ac_top_srcdir,;t t
13103 s,@INSTALL@,$ac_INSTALL,;t t
13104 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
13105   rm -f $tmp/stdin
13106   if test x"$ac_file" != x-; then
13107     mv $tmp/out $ac_file
13108   else
13109     cat $tmp/out
13110     rm -f $tmp/out
13111   fi
13112
13113 done
13114 EOF
13115 cat >>$CONFIG_STATUS <<\EOF
13116
13117 #
13118 # CONFIG_HEADER section.
13119 #
13120
13121 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
13122 # NAME is the cpp macro being defined and VALUE is the value it is being given.
13123 #
13124 # ac_d sets the value in "#define NAME VALUE" lines.
13125 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
13126 ac_dB='[        ].*$,\1#\2'
13127 ac_dC=' '
13128 ac_dD=',;t'
13129 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
13130 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
13131 ac_iB='\([      ]\),\1#\2define\3'
13132 ac_iC=' '
13133 ac_iD='\4,;t'
13134 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
13135 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
13136 ac_uB='$,\1#\2define\3'
13137 ac_uC=' '
13138 ac_uD=',;t'
13139
13140 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
13141   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
13142   case $ac_file in
13143   - | *:- | *:-:* ) # input from stdin
13144         cat >$tmp/stdin
13145         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
13146         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
13147   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
13148         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
13149   * )   ac_file_in=$ac_file.in ;;
13150   esac
13151
13152   test x"$ac_file" != x- && { echo "$as_me:13152: creating $ac_file" >&5
13153 echo "$as_me: creating $ac_file" >&6;}
13154
13155   # First look for the input files in the build tree, otherwise in the
13156   # src tree.
13157   ac_file_inputs=`IFS=:
13158     for f in $ac_file_in; do
13159       case $f in
13160       -) echo $tmp/stdin ;;
13161       [\\/$]*)
13162          # Absolute (can't be DOS-style, as IFS=:)
13163          test -f "$f" || { { echo "$as_me:13163: error: cannot find input file: $f" >&5
13164 echo "$as_me: error: cannot find input file: $f" >&2;}
13165    { (exit 1); exit 1; }; }
13166          echo $f;;
13167       *) # Relative
13168          if test -f "$f"; then
13169            # Build tree
13170            echo $f
13171          elif test -f "$srcdir/$f"; then
13172            # Source tree
13173            echo $srcdir/$f
13174          else
13175            # /dev/null tree
13176            { { echo "$as_me:13176: error: cannot find input file: $f" >&5
13177 echo "$as_me: error: cannot find input file: $f" >&2;}
13178    { (exit 1); exit 1; }; }
13179          fi;;
13180       esac
13181     done` || { (exit 1); exit 1; }
13182   # Remove the trailing spaces.
13183   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
13184
13185 EOF
13186
13187 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
13188 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
13189 # be either 'cat' or 'sort'.
13190 cat confdefs.h | uniq >conftest.vals
13191
13192 # Break up conftest.vals because some shells have a limit on
13193 # the size of here documents, and old seds have small limits too.
13194
13195 rm -f conftest.tail
13196 echo '  rm -f conftest.frag' >> $CONFIG_STATUS
13197 while grep . conftest.vals >/dev/null
13198 do
13199   # Write chunks of a limited-size here document to conftest.frag.
13200   echo '  cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
13201   sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
13202   echo 'CEOF' >> $CONFIG_STATUS
13203   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
13204   rm -f conftest.vals
13205   mv conftest.tail conftest.vals
13206 done
13207 rm -f conftest.vals
13208
13209 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
13210 # marker @DEFS@.
13211 echo '  cat >> conftest.edit <<CEOF
13212 /@DEFS@/r conftest.frag
13213 /@DEFS@/d
13214 CEOF
13215 sed -f conftest.edit $tmp/in > $tmp/out
13216 rm -f $tmp/in
13217 mv $tmp/out $tmp/in
13218 rm -f conftest.edit conftest.frag
13219 ' >> $CONFIG_STATUS
13220
13221 cat >>$CONFIG_STATUS <<\EOF
13222   # Let's still pretend it is `configure' which instantiates (i.e., don't
13223   # use $as_me), people would be surprised to read:
13224   #    /* config.h.  Generated automatically by config.status.  */
13225   if test x"$ac_file" = x-; then
13226     echo "/* Generated automatically by configure.  */" >$tmp/config.h
13227   else
13228     echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
13229   fi
13230   cat $tmp/in >>$tmp/config.h
13231   rm -f $tmp/in
13232   if test x"$ac_file" != x-; then
13233     if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
13234       { echo "$as_me:13234: $ac_file is unchanged" >&5
13235 echo "$as_me: $ac_file is unchanged" >&6;}
13236     else
13237       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
13238          X"$ac_file" : 'X\(//\)[^/]' \| \
13239          X"$ac_file" : 'X\(//\)$' \| \
13240          X"$ac_file" : 'X\(/\)' \| \
13241          .     : '\(.\)' 2>/dev/null ||
13242 echo X"$ac_file" |
13243     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
13244           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
13245           /^X\(\/\/\)$/{ s//\1/; q; }
13246           /^X\(\/\).*/{ s//\1/; q; }
13247           s/.*/./; q'`
13248       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
13249         { case "$ac_dir" in
13250   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
13251   *)                      as_incr_dir=.;;
13252 esac
13253 as_dummy="$ac_dir"
13254 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
13255   case $as_mkdir_dir in
13256     # Skip DOS drivespec
13257     ?:) as_incr_dir=$as_mkdir_dir ;;
13258     *)
13259       as_incr_dir=$as_incr_dir/$as_mkdir_dir
13260       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
13261     ;;
13262   esac
13263 done; }
13264
13265       fi
13266       rm -f $ac_file
13267       mv $tmp/config.h $ac_file
13268     fi
13269   else
13270     cat $tmp/config.h
13271     rm -f $tmp/config.h
13272   fi
13273 done
13274 EOF
13275 cat >>$CONFIG_STATUS <<\EOF
13276 #
13277 # CONFIG_COMMANDS section.
13278 #
13279 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
13280   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
13281   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
13282
13283   case $ac_dest in
13284     default )
13285 if test -z "$USE_OLD_MAKERULES" ; then
13286         $AWK -f $srcdir/mk-1st.awk <$srcdir/src/modules >>src/Makefile
13287 fi
13288  ;;
13289   esac
13290 done
13291 EOF
13292
13293 cat >>$CONFIG_STATUS <<\EOF
13294
13295 { (exit 0); exit 0; }
13296 EOF
13297 chmod +x $CONFIG_STATUS
13298 ac_clean_files=$ac_clean_files_save
13299
13300 # configure is writing to config.log, and then calls config.status.
13301 # config.status does its own redirection, appending to config.log.
13302 # Unfortunately, on DOS this fails, as config.log is still kept open
13303 # by configure, so config.status won't be able to write to it; its
13304 # output is simply discarded.  So we exec the FD to /dev/null,
13305 # effectively closing config.log, so it can be properly (re)opened and
13306 # appended to by config.status.  When coming back to configure, we
13307 # need to make the FD available again.
13308 if test "$no_create" != yes; then
13309   ac_cs_success=:
13310   exec 5>/dev/null
13311   $SHELL $CONFIG_STATUS || ac_cs_success=false
13312   exec 5>>config.log
13313   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
13314   # would make configure fail if this is the last instruction.
13315   $ac_cs_success || { (exit 1); exit 1; }
13316 fi
13317 ${MAKE:-make} preinstall