]> ncurses.scripts.mit.edu Git - ncurses.git/blob - Ada95/configure
a9977661633649f0513f98c6eee3f5bf33067db2
[ncurses.git] / Ada95 / configure
1 #! /bin/sh
2 # From configure.in Revision: 1.30 .
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated by Autoconf 2.52.20101002.
5 #
6 # Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
7 # Free Software Foundation, Inc.
8 # This configure script is free software; the Free Software Foundation
9 # gives unlimited permission to copy, distribute and modify it.
10
11 # Avoid depending upon Character Ranges.
12 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
13 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
14 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
15 as_cr_digits='0123456789'
16 as_cr_alnum=$as_cr_Letters$as_cr_digits
17
18 # Sed expression to map a string onto a valid variable name.
19 as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
20
21 # Sed expression to map a string onto a valid CPP name.
22 as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
23
24 # Be Bourne compatible
25 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
26   emulate sh
27   NULLCMD=:
28 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
29   set -o posix
30 fi
31
32 # Name of the executable.
33 as_me=`echo "$0" |sed 's,.*[\\/],,'`
34
35 if expr a : '\(a\)' >/dev/null 2>&1; then
36   as_expr=expr
37 else
38   as_expr=false
39 fi
40
41 rm -f conf$$ conf$$.exe conf$$.file
42 echo >conf$$.file
43 if ln -s conf$$.file conf$$ 2>/dev/null; then
44   # We could just check for DJGPP; but this test a) works b) is more generic
45   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
46   if test -f conf$$.exe; then
47     # Don't use ln at all; we don't have any links
48     as_ln_s='cp -p'
49   else
50     as_ln_s='ln -s'
51   fi
52 elif ln conf$$.file conf$$ 2>/dev/null; then
53   as_ln_s=ln
54 else
55   as_ln_s='cp -p'
56 fi
57 rm -f conf$$ conf$$.exe conf$$.file
58
59 as_executable_p="test -f"
60
61 # Support unset when possible.
62 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
63   as_unset=unset
64 else
65   as_unset=false
66 fi
67
68 # NLS nuisances.
69 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
70 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
71 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
72 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
73 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
74 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
75 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
76 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
77
78 # IFS
79 # We need space, tab and new line, in precisely that order.
80 as_nl='
81 '
82 IFS="   $as_nl"
83
84 # CDPATH.
85 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
86
87 # Name of the host.
88 # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
89 # so uname gets run too.
90 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
91
92 exec 6>&1
93
94 #
95 # Initializations.
96 #
97 ac_default_prefix=/usr/local
98 cross_compiling=no
99 subdirs=
100 MFLAGS= MAKEFLAGS=
101 SHELL=${CONFIG_SHELL-/bin/sh}
102
103 # Maximum number of lines to put in a shell here document.
104 # This variable seems obsolete.  It should probably be removed, and
105 # only ac_max_sed_lines should be used.
106 : ${ac_max_here_lines=38}
107
108 ac_unique_file="gen/gen.c"
109
110 # Initialize some variables set by options.
111 ac_init_help=
112 ac_init_version=false
113 # The variables have the same names as the options, with
114 # dashes changed to underlines.
115 cache_file=/dev/null
116 exec_prefix=NONE
117 no_create=
118 no_recursion=
119 prefix=NONE
120 program_prefix=NONE
121 program_suffix=NONE
122 program_transform_name=s,x,x,
123 silent=
124 site=
125 srcdir=
126 verbose=
127 x_includes=NONE
128 x_libraries=NONE
129
130 # Installation directory options.
131 # These are left unexpanded so users can "make install exec_prefix=/foo"
132 # and all the variables that are supposed to be based on exec_prefix
133 # by default will actually change.
134 # Use braces instead of parens because sh, perl, etc. also accept them.
135 bindir='${exec_prefix}/bin'
136 sbindir='${exec_prefix}/sbin'
137 libexecdir='${exec_prefix}/libexec'
138 datadir='${prefix}/share'
139 sysconfdir='${prefix}/etc'
140 sharedstatedir='${prefix}/com'
141 localstatedir='${prefix}/var'
142 libdir='${exec_prefix}/lib'
143 includedir='${prefix}/include'
144 oldincludedir='/usr/include'
145 infodir='${prefix}/info'
146 mandir='${prefix}/man'
147
148 # Identity of this package.
149 PACKAGE_NAME=
150 PACKAGE_TARNAME=
151 PACKAGE_VERSION=
152 PACKAGE_STRING=
153 PACKAGE_BUGREPORT=
154
155 ac_prev=
156 for ac_option
157 do
158   # If the previous option needs an argument, assign it.
159   if test -n "$ac_prev"; then
160     eval "$ac_prev=\$ac_option"
161     ac_prev=
162     continue
163   fi
164
165   ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
166
167   # Accept the important Cygnus configure options, so we can diagnose typos.
168
169   case $ac_option in
170
171   -bindir | --bindir | --bindi | --bind | --bin | --bi)
172     ac_prev=bindir ;;
173   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
174     bindir=$ac_optarg ;;
175
176   -build | --build | --buil | --bui | --bu)
177     ac_prev=build_alias ;;
178   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
179     build_alias=$ac_optarg ;;
180
181   -cache-file | --cache-file | --cache-fil | --cache-fi \
182   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
183     ac_prev=cache_file ;;
184   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
185   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
186     cache_file=$ac_optarg ;;
187
188   --config-cache | -C)
189     cache_file=config.cache ;;
190
191   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
192     ac_prev=datadir ;;
193   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
194   | --da=*)
195     datadir=$ac_optarg ;;
196
197   -disable-* | --disable-*)
198     ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
199     # Reject names that are not valid shell variable names.
200     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
201       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
202    { (exit 1); exit 1; }; }
203     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
204     eval "enable_$ac_feature=no" ;;
205
206   -enable-* | --enable-*)
207     ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
208     # Reject names that are not valid shell variable names.
209     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
210       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
211    { (exit 1); exit 1; }; }
212     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
213     case $ac_option in
214       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
215       *) ac_optarg=yes ;;
216     esac
217     eval "enable_$ac_feature='$ac_optarg'" ;;
218
219   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
220   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
221   | --exec | --exe | --ex)
222     ac_prev=exec_prefix ;;
223   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
224   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
225   | --exec=* | --exe=* | --ex=*)
226     exec_prefix=$ac_optarg ;;
227
228   -gas | --gas | --ga | --g)
229     # Obsolete; use --with-gas.
230     with_gas=yes ;;
231
232   -help | --help | --hel | --he | -h)
233     ac_init_help=long ;;
234   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
235     ac_init_help=recursive ;;
236   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
237     ac_init_help=short ;;
238
239   -host | --host | --hos | --ho)
240     ac_prev=host_alias ;;
241   -host=* | --host=* | --hos=* | --ho=*)
242     host_alias=$ac_optarg ;;
243
244   -includedir | --includedir | --includedi | --included | --include \
245   | --includ | --inclu | --incl | --inc)
246     ac_prev=includedir ;;
247   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
248   | --includ=* | --inclu=* | --incl=* | --inc=*)
249     includedir=$ac_optarg ;;
250
251   -infodir | --infodir | --infodi | --infod | --info | --inf)
252     ac_prev=infodir ;;
253   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
254     infodir=$ac_optarg ;;
255
256   -libdir | --libdir | --libdi | --libd)
257     ac_prev=libdir ;;
258   -libdir=* | --libdir=* | --libdi=* | --libd=*)
259     libdir=$ac_optarg ;;
260
261   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
262   | --libexe | --libex | --libe)
263     ac_prev=libexecdir ;;
264   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
265   | --libexe=* | --libex=* | --libe=*)
266     libexecdir=$ac_optarg ;;
267
268   -localstatedir | --localstatedir | --localstatedi | --localstated \
269   | --localstate | --localstat | --localsta | --localst \
270   | --locals | --local | --loca | --loc | --lo)
271     ac_prev=localstatedir ;;
272   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
273   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
274   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
275     localstatedir=$ac_optarg ;;
276
277   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
278     ac_prev=mandir ;;
279   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
280     mandir=$ac_optarg ;;
281
282   -nfp | --nfp | --nf)
283     # Obsolete; use --without-fp.
284     with_fp=no ;;
285
286   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
287   | --no-cr | --no-c)
288     no_create=yes ;;
289
290   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
291   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
292     no_recursion=yes ;;
293
294   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
295   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
296   | --oldin | --oldi | --old | --ol | --o)
297     ac_prev=oldincludedir ;;
298   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
299   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
300   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
301     oldincludedir=$ac_optarg ;;
302
303   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
304     ac_prev=prefix ;;
305   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
306     prefix=$ac_optarg ;;
307
308   -program-prefix | --program-prefix | --program-prefi | --program-pref \
309   | --program-pre | --program-pr | --program-p)
310     ac_prev=program_prefix ;;
311   -program-prefix=* | --program-prefix=* | --program-prefi=* \
312   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
313     program_prefix=$ac_optarg ;;
314
315   -program-suffix | --program-suffix | --program-suffi | --program-suff \
316   | --program-suf | --program-su | --program-s)
317     ac_prev=program_suffix ;;
318   -program-suffix=* | --program-suffix=* | --program-suffi=* \
319   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
320     program_suffix=$ac_optarg ;;
321
322   -program-transform-name | --program-transform-name \
323   | --program-transform-nam | --program-transform-na \
324   | --program-transform-n | --program-transform- \
325   | --program-transform | --program-transfor \
326   | --program-transfo | --program-transf \
327   | --program-trans | --program-tran \
328   | --progr-tra | --program-tr | --program-t)
329     ac_prev=program_transform_name ;;
330   -program-transform-name=* | --program-transform-name=* \
331   | --program-transform-nam=* | --program-transform-na=* \
332   | --program-transform-n=* | --program-transform-=* \
333   | --program-transform=* | --program-transfor=* \
334   | --program-transfo=* | --program-transf=* \
335   | --program-trans=* | --program-tran=* \
336   | --progr-tra=* | --program-tr=* | --program-t=*)
337     program_transform_name=$ac_optarg ;;
338
339   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
340   | -silent | --silent | --silen | --sile | --sil)
341     silent=yes ;;
342
343   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
344     ac_prev=sbindir ;;
345   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
346   | --sbi=* | --sb=*)
347     sbindir=$ac_optarg ;;
348
349   -sharedstatedir | --sharedstatedir | --sharedstatedi \
350   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
351   | --sharedst | --shareds | --shared | --share | --shar \
352   | --sha | --sh)
353     ac_prev=sharedstatedir ;;
354   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
355   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
356   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
357   | --sha=* | --sh=*)
358     sharedstatedir=$ac_optarg ;;
359
360   -site | --site | --sit)
361     ac_prev=site ;;
362   -site=* | --site=* | --sit=*)
363     site=$ac_optarg ;;
364
365   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
366     ac_prev=srcdir ;;
367   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
368     srcdir=$ac_optarg ;;
369
370   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
371   | --syscon | --sysco | --sysc | --sys | --sy)
372     ac_prev=sysconfdir ;;
373   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
374   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
375     sysconfdir=$ac_optarg ;;
376
377   -target | --target | --targe | --targ | --tar | --ta | --t)
378     ac_prev=target_alias ;;
379   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
380     target_alias=$ac_optarg ;;
381
382   -v | -verbose | --verbose | --verbos | --verbo | --verb)
383     verbose=yes ;;
384
385   -version | --version | --versio | --versi | --vers | -V)
386     ac_init_version=: ;;
387
388   -with-* | --with-*)
389     ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
390     # Reject names that are not valid shell variable names.
391     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
392       { echo "$as_me: error: invalid package name: $ac_package" >&2
393    { (exit 1); exit 1; }; }
394     ac_package=`echo $ac_package| sed 's/-/_/g'`
395     case $ac_option in
396       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
397       *) ac_optarg=yes ;;
398     esac
399     eval "with_$ac_package='$ac_optarg'" ;;
400
401   -without-* | --without-*)
402     ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
403     # Reject names that are not valid shell variable names.
404     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
405       { echo "$as_me: error: invalid package name: $ac_package" >&2
406    { (exit 1); exit 1; }; }
407     ac_package=`echo $ac_package | sed 's/-/_/g'`
408     eval "with_$ac_package=no" ;;
409
410   --x)
411     # Obsolete; use --with-x.
412     with_x=yes ;;
413
414   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
415   | --x-incl | --x-inc | --x-in | --x-i)
416     ac_prev=x_includes ;;
417   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
418   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
419     x_includes=$ac_optarg ;;
420
421   -x-libraries | --x-libraries | --x-librarie | --x-librari \
422   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
423     ac_prev=x_libraries ;;
424   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
425   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
426     x_libraries=$ac_optarg ;;
427
428   -*) { echo "$as_me: error: unrecognized option: $ac_option
429 Try \`$0 --help' for more information." >&2
430    { (exit 1); exit 1; }; }
431     ;;
432
433   *=*)
434     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
435     # Reject names that are not valid shell variable names.
436     expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
437       { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
438    { (exit 1); exit 1; }; }
439     ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
440     eval "$ac_envvar='$ac_optarg'"
441     export $ac_envvar ;;
442
443   *)
444     # FIXME: should be removed in autoconf 3.0.
445     echo "$as_me: WARNING: you should use --build, --host, --target" >&2
446     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
447       echo "$as_me: WARNING: invalid host type: $ac_option" >&2
448     : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
449     ;;
450
451   esac
452 done
453
454 if test -n "$ac_prev"; then
455   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
456   { echo "$as_me: error: missing argument to $ac_option" >&2
457    { (exit 1); exit 1; }; }
458 fi
459
460 # Be sure to have absolute paths.
461 for ac_var in exec_prefix prefix
462 do
463   eval ac_val=$`echo $ac_var`
464   case $ac_val in
465     [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
466     *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
467    { (exit 1); exit 1; }; };;
468   esac
469 done
470
471 # Be sure to have absolute paths.
472 for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
473               localstatedir libdir includedir oldincludedir infodir mandir
474 do
475   eval ac_val=$`echo $ac_var`
476   case $ac_val in
477     [\\/$]* | ?:[\\/]* ) ;;
478     *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
479    { (exit 1); exit 1; }; };;
480   esac
481 done
482
483 # There might be people who depend on the old broken behavior: `$host'
484 # used to hold the argument of --host etc.
485 build=$build_alias
486 host=$host_alias
487 target=$target_alias
488
489 # FIXME: should be removed in autoconf 3.0.
490 if test "x$host_alias" != x; then
491   if test "x$build_alias" = x; then
492     cross_compiling=maybe
493     echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
494     If a cross compiler is detected then cross compile mode will be used." >&2
495   elif test "x$build_alias" != "x$host_alias"; then
496     cross_compiling=yes
497   fi
498 fi
499
500 ac_tool_prefix=
501 test -n "$host_alias" && ac_tool_prefix=$host_alias-
502
503 test "$silent" = yes && exec 6>/dev/null
504
505 # Find the source files, if location was not specified.
506 if test -z "$srcdir"; then
507   ac_srcdir_defaulted=yes
508   # Try the directory containing this script, then its parent.
509   ac_prog=$0
510   ac_confdir=`echo "$ac_prog" | sed 's%[\\/][^\\/][^\\/]*$%%'`
511   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
512   srcdir=$ac_confdir
513   if test ! -r $srcdir/$ac_unique_file; then
514     srcdir=..
515   fi
516 else
517   ac_srcdir_defaulted=no
518 fi
519 if test ! -r $srcdir/$ac_unique_file; then
520   if test "$ac_srcdir_defaulted" = yes; then
521     { echo "$as_me: error: cannot find sources in $ac_confdir or .." >&2
522    { (exit 1); exit 1; }; }
523   else
524     { echo "$as_me: error: cannot find sources in $srcdir" >&2
525    { (exit 1); exit 1; }; }
526   fi
527 fi
528 srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
529 ac_env_build_alias_set=${build_alias+set}
530 ac_env_build_alias_value=$build_alias
531 ac_cv_env_build_alias_set=${build_alias+set}
532 ac_cv_env_build_alias_value=$build_alias
533 ac_env_host_alias_set=${host_alias+set}
534 ac_env_host_alias_value=$host_alias
535 ac_cv_env_host_alias_set=${host_alias+set}
536 ac_cv_env_host_alias_value=$host_alias
537 ac_env_target_alias_set=${target_alias+set}
538 ac_env_target_alias_value=$target_alias
539 ac_cv_env_target_alias_set=${target_alias+set}
540 ac_cv_env_target_alias_value=$target_alias
541 ac_env_CC_set=${CC+set}
542 ac_env_CC_value=$CC
543 ac_cv_env_CC_set=${CC+set}
544 ac_cv_env_CC_value=$CC
545 ac_env_CFLAGS_set=${CFLAGS+set}
546 ac_env_CFLAGS_value=$CFLAGS
547 ac_cv_env_CFLAGS_set=${CFLAGS+set}
548 ac_cv_env_CFLAGS_value=$CFLAGS
549 ac_env_LDFLAGS_set=${LDFLAGS+set}
550 ac_env_LDFLAGS_value=$LDFLAGS
551 ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
552 ac_cv_env_LDFLAGS_value=$LDFLAGS
553 ac_env_CPPFLAGS_set=${CPPFLAGS+set}
554 ac_env_CPPFLAGS_value=$CPPFLAGS
555 ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
556 ac_cv_env_CPPFLAGS_value=$CPPFLAGS
557 ac_env_CPP_set=${CPP+set}
558 ac_env_CPP_value=$CPP
559 ac_cv_env_CPP_set=${CPP+set}
560 ac_cv_env_CPP_value=$CPP
561
562 #
563 # Report the --help message.
564 #
565 if test "$ac_init_help" = "long"; then
566   # Omit some internal or obsolete options to make the list less imposing.
567   # This message is too long to be a string in the A/UX 3.1 sh.
568   cat <<EOF
569 \`configure' configures this package to adapt to many kinds of systems.
570
571 Usage: $0 [OPTION]... [VAR=VALUE]...
572
573 To assign environment variables (e.g., CC, CFLAGS...), specify them as
574 VAR=VALUE.  See below for descriptions of some of the useful variables.
575
576 Defaults for the options are specified in brackets.
577
578 Configuration:
579   -h, --help              display this help and exit
580       --help=short        display options specific to this package
581       --help=recursive    display the short help of all the included packages
582   -V, --version           display version information and exit
583   -q, --quiet, --silent   do not print \`checking...' messages
584       --cache-file=FILE   cache test results in FILE [disabled]
585   -C, --config-cache      alias for \`--cache-file=config.cache'
586   -n, --no-create         do not create output files
587       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
588
589 EOF
590
591   cat <<EOF
592 Installation directories:
593   --prefix=PREFIX         install architecture-independent files in PREFIX
594                           [$ac_default_prefix]
595   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
596                           [PREFIX]
597
598 By default, \`make install' will install all the files in
599 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
600 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
601 for instance \`--prefix=\$HOME'.
602
603 For better control, use the options below.
604
605 Fine tuning of the installation directories:
606   --bindir=DIR            user executables [EPREFIX/bin]
607   --sbindir=DIR           system admin executables [EPREFIX/sbin]
608   --libexecdir=DIR        program executables [EPREFIX/libexec]
609   --datadir=DIR           read-only architecture-independent data [PREFIX/share]
610   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
611   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
612   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
613   --libdir=DIR            object code libraries [EPREFIX/lib]
614   --includedir=DIR        C header files [PREFIX/include]
615   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
616   --infodir=DIR           info documentation [PREFIX/info]
617   --mandir=DIR            man documentation [PREFIX/man]
618 EOF
619
620   cat <<\EOF
621
622 Program names:
623   --program-prefix=PREFIX            prepend PREFIX to installed program names
624   --program-suffix=SUFFIX            append SUFFIX to installed program names
625   --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
626
627 System types:
628   --build=BUILD           configure for building on BUILD [guessed]
629   --host=HOST       build programs to run on HOST [BUILD]
630   --target=TARGET   configure for building compilers for TARGET [HOST]
631 EOF
632 fi
633
634 if test -n "$ac_init_help"; then
635
636   cat <<\EOF
637
638 Optional Packages:
639   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
640   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
641
642 Optional Features:
643   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
644   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
645
646   --with-system-type=XXX  test: override derived host system-type
647   --with-pkg-config{=path} enable/disable use of pkg-config
648   --enable-pc-files       generate and install .pc files for pkg-config
649   --without-tests         suppress build with test-programs
650   --enable-mixed-case     tic should assume mixed-case filenames
651   --with-install-prefix   prefixes actual install-location ($DESTDIR)
652 Build-Tools Needed to Compile Temporary Applications for Cross-compiling:
653   --with-build-cc=XXX     the build C compiler ($BUILD_CC)
654   --with-build-cpp=XXX    the build C preprocessor ($BUILD_CPP)
655   --with-build-cflags=XXX the build C compiler-flags ($BUILD_CFLAGS)
656   --with-build-cppflags=XXX the build C preprocessor-flags ($BUILD_CPPFLAGS)
657   --with-build-ldflags=XXX the build linker-flags ($BUILD_LDFLAGS)
658   --with-build-libs=XXX   the build libraries (${BUILD_LIBS})
659 Options to Specify the Libraries Built/Used:
660   --with-shared           generate shared C-objects (needed for --with-ada-sharedlib)
661   --enable-widec          compile with wide-char/UTF-8 code
662   --with-curses-dir=DIR   directory in which (n)curses is installed
663   --with-shlib-version=X  Specify rel or abi version for shared libs
664   --enable-rpath-link     link sample programs with rpath option
665 Fine-Tuning Your Configuration:
666   --enable-broken_linker  compile with broken-linker support code
667   --disable-largefile     omit support for large files
668   --with-rcs-ids          compile-in RCS identifiers
669 Extensions:
670   --disable-ext-funcs     disable function-extensions
671   --enable-const          compile with extra/non-standard const
672 Development Code:
673   --without-develop       disable development options
674 Experimental Code:
675   --with-pthread          use POSIX thread library
676   --enable-weak-symbols   enable weak-symbols for pthreads
677   --enable-reentrant      compile with experimental reentrant code
678   --with-wrap-prefix=XXX  override prefix used for public variables
679 Testing/development Options:
680   --enable-echo           build: display "compiling" commands (default)
681   --enable-warnings       build: turn on GCC compiler warnings
682   --enable-assertions     test: turn on generation of assertion code
683   --enable-expanded       test: generate functions for certain macros
684   --disable-macros        test: use functions rather than macros
685   --with-trace            test: add trace() function to all models of ncurses
686 Ada95 Binding Options:
687   --with-ada-compiler=CMD specify Ada95 compiler command (default gnatmake)
688   --with-ada-include=DIR  Ada includes are in DIR (default: PREFIX/share/ada/adainclude)
689   --with-ada-objects=DIR  Ada objects are in DIR (default: PREFIX/lib/ada/adalib)
690   --with-ada-sharedlib=XX build Ada95 shared-library
691
692 Some influential environment variables:
693   CC          C compiler command
694   CFLAGS      C compiler flags
695   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
696               nonstandard directory <lib dir>
697   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
698               headers in a nonstandard directory <include dir>
699   CPP         C preprocessor
700
701 Use these variables to override the choices made by `configure' or to help
702 it to find libraries and programs with nonstandard names/locations.
703
704 EOF
705 fi
706
707 if test "$ac_init_help" = "recursive"; then
708   # If there are subdirs, report their specific --help.
709   ac_popdir=`pwd`
710   for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
711     cd $ac_subdir
712     # A "../" for each directory in /$ac_subdir.
713     ac_dots=`echo $ac_subdir |
714              sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
715
716     case $srcdir in
717     .) # No --srcdir option.  We are building in place.
718       ac_sub_srcdir=$srcdir ;;
719     [\\/]* | ?:[\\/]* ) # Absolute path.
720       ac_sub_srcdir=$srcdir/$ac_subdir ;;
721     *) # Relative path.
722       ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;;
723     esac
724
725     # Check for guested configure; otherwise get Cygnus style configure.
726     if test -f $ac_sub_srcdir/configure.gnu; then
727       echo
728       $SHELL $ac_sub_srcdir/configure.gnu  --help=recursive
729     elif test -f $ac_sub_srcdir/configure; then
730       echo
731       $SHELL $ac_sub_srcdir/configure  --help=recursive
732     elif test -f $ac_sub_srcdir/configure.ac ||
733            test -f $ac_sub_srcdir/configure.in; then
734       echo
735       $ac_configure --help
736     else
737       echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
738     fi
739     cd $ac_popdir
740   done
741 fi
742
743 test -n "$ac_init_help" && exit 0
744 if $ac_init_version; then
745   cat <<\EOF
746
747 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
748 Free Software Foundation, Inc.
749 This configure script is free software; the Free Software Foundation
750 gives unlimited permission to copy, distribute and modify it.
751 EOF
752   exit 0
753 fi
754 exec 5>config.log
755 cat >&5 <<EOF
756 This file contains any messages produced by compilers while
757 running configure, to aid debugging if configure makes a mistake.
758
759 It was created by $as_me, which was
760 generated by GNU Autoconf 2.52.20101002.  Invocation command line was
761
762   $ $0 $@
763
764 EOF
765 {
766 cat <<_ASUNAME
767 ## ---------- ##
768 ## Platform.  ##
769 ## ---------- ##
770
771 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
772 uname -m = `(uname -m) 2>/dev/null || echo unknown`
773 uname -r = `(uname -r) 2>/dev/null || echo unknown`
774 uname -s = `(uname -s) 2>/dev/null || echo unknown`
775 uname -v = `(uname -v) 2>/dev/null || echo unknown`
776
777 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
778 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
779
780 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
781 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
782 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
783 hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
784 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
785 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
786 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
787
788 PATH = $PATH
789
790 _ASUNAME
791 } >&5
792
793 cat >&5 <<EOF
794 ## ------------ ##
795 ## Core tests.  ##
796 ## ------------ ##
797
798 EOF
799
800 # Keep a trace of the command line.
801 # Strip out --no-create and --no-recursion so they do not pile up.
802 # Also quote any args containing shell meta-characters.
803 ac_configure_args=
804 ac_sep=
805 for ac_arg
806 do
807   case $ac_arg in
808   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
809   | --no-cr | --no-c) ;;
810   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
811   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
812   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
813     ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
814     ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
815     ac_sep=" " ;;
816   *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
817      ac_sep=" " ;;
818   esac
819   # Get rid of the leading space.
820 done
821
822 # When interrupted or exit'd, cleanup temporary files, and complete
823 # config.log.  We remove comments because anyway the quotes in there
824 # would cause problems or look ugly.
825 trap 'exit_status=$?
826   # Save into config.log some information that might help in debugging.
827   echo >&5
828   echo "## ----------------- ##" >&5
829   echo "## Cache variables.  ##" >&5
830   echo "## ----------------- ##" >&5
831   echo >&5
832   # The following way of writing the cache mishandles newlines in values,
833 {
834   (set) 2>&1 |
835     case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
836     *ac_space=\ *)
837       sed -n \
838         "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
839           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
840       ;;
841     *)
842       sed -n \
843         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
844       ;;
845     esac;
846 } >&5
847   sed "/^$/d" confdefs.h >conftest.log
848   if test -s conftest.log; then
849     echo >&5
850     echo "## ------------ ##" >&5
851     echo "## confdefs.h.  ##" >&5
852     echo "## ------------ ##" >&5
853     echo >&5
854     cat conftest.log >&5
855   fi
856   (echo; echo) >&5
857   test "$ac_signal" != 0 &&
858     echo "$as_me: caught signal $ac_signal" >&5
859   echo "$as_me: exit $exit_status" >&5
860   rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
861     exit $exit_status
862      ' 0
863 for ac_signal in 1 2 13 15; do
864   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
865 done
866 ac_signal=0
867
868 # confdefs.h avoids OS command line length limits that DEFS can exceed.
869 rm -rf conftest* confdefs.h
870 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
871 echo >confdefs.h
872
873 # Let the site file select an alternate cache file if it wants to.
874 # Prefer explicitly selected file to automatically selected ones.
875 if test -z "$CONFIG_SITE"; then
876   if test "x$prefix" != xNONE; then
877     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
878   else
879     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
880   fi
881 fi
882 for ac_site_file in $CONFIG_SITE; do
883   if test -r "$ac_site_file"; then
884     { echo "$as_me:884: loading site script $ac_site_file" >&5
885 echo "$as_me: loading site script $ac_site_file" >&6;}
886     cat "$ac_site_file" >&5
887     . "$ac_site_file"
888   fi
889 done
890
891 if test -r "$cache_file"; then
892   # Some versions of bash will fail to source /dev/null (special
893   # files actually), so we avoid doing that.
894   if test -f "$cache_file"; then
895     { echo "$as_me:895: loading cache $cache_file" >&5
896 echo "$as_me: loading cache $cache_file" >&6;}
897     case $cache_file in
898       [\\/]* | ?:[\\/]* ) . $cache_file;;
899       *)                      . ./$cache_file;;
900     esac
901   fi
902 else
903   { echo "$as_me:903: creating cache $cache_file" >&5
904 echo "$as_me: creating cache $cache_file" >&6;}
905   >$cache_file
906 fi
907
908 # Check that the precious variables saved in the cache have kept the same
909 # value.
910 ac_cache_corrupted=false
911 for ac_var in `(set) 2>&1 |
912                sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
913   eval ac_old_set=\$ac_cv_env_${ac_var}_set
914   eval ac_new_set=\$ac_env_${ac_var}_set
915   eval ac_old_val="\$ac_cv_env_${ac_var}_value"
916   eval ac_new_val="\$ac_env_${ac_var}_value"
917   case $ac_old_set,$ac_new_set in
918     set,)
919       { echo "$as_me:919: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
920 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
921       ac_cache_corrupted=: ;;
922     ,set)
923       { echo "$as_me:923: error: \`$ac_var' was not set in the previous run" >&5
924 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
925       ac_cache_corrupted=: ;;
926     ,);;
927     *)
928       if test "x$ac_old_val" != "x$ac_new_val"; then
929         { echo "$as_me:929: error: \`$ac_var' has changed since the previous run:" >&5
930 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
931         { echo "$as_me:931:   former value:  $ac_old_val" >&5
932 echo "$as_me:   former value:  $ac_old_val" >&2;}
933         { echo "$as_me:933:   current value: $ac_new_val" >&5
934 echo "$as_me:   current value: $ac_new_val" >&2;}
935         ac_cache_corrupted=:
936       fi;;
937   esac
938   # Pass precious variables to config.status.  It doesn't matter if
939   # we pass some twice (in addition to the command line arguments).
940   if test "$ac_new_set" = set; then
941     case $ac_new_val in
942     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
943       ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
944       ac_configure_args="$ac_configure_args '$ac_arg'"
945       ;;
946     *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
947        ;;
948     esac
949   fi
950 done
951 if $ac_cache_corrupted; then
952   { echo "$as_me:952: error: changes in the environment can compromise the build" >&5
953 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
954   { { echo "$as_me:954: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
955 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
956    { (exit 1); exit 1; }; }
957 fi
958
959 ac_ext=c
960 ac_cpp='$CPP $CPPFLAGS'
961 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
962 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
963 ac_compiler_gnu=$ac_cv_c_compiler_gnu
964 ac_main_return=return
965
966 case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
967   *c*,-n*) ECHO_N= ECHO_C='
968 ' ECHO_T='      ' ;;
969   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
970   *)      ECHO_N= ECHO_C='\c' ECHO_T= ;;
971 esac
972 echo "#! $SHELL" >conftest.sh
973 echo  "exit 0"   >>conftest.sh
974 chmod +x conftest.sh
975 if { (echo "$as_me:975: PATH=\".;.\"; conftest.sh") >&5
976   (PATH=".;."; conftest.sh) 2>&5
977   ac_status=$?
978   echo "$as_me:978: \$? = $ac_status" >&5
979   (exit $ac_status); }; then
980   ac_path_separator=';'
981 else
982   ac_path_separator=:
983 fi
984 PATH_SEPARATOR="$ac_path_separator"
985 rm -f conftest.sh
986
987 ac_config_headers="$ac_config_headers include/ncurses_cfg.h:include/ncurses_cfg.hin"
988
989 top_builddir=`pwd`
990
991 ac_aux_dir=
992 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
993   if test -f $ac_dir/install-sh; then
994     ac_aux_dir=$ac_dir
995     ac_install_sh="$ac_aux_dir/install-sh -c"
996     break
997   elif test -f $ac_dir/install.sh; then
998     ac_aux_dir=$ac_dir
999     ac_install_sh="$ac_aux_dir/install.sh -c"
1000     break
1001   elif test -f $ac_dir/shtool; then
1002     ac_aux_dir=$ac_dir
1003     ac_install_sh="$ac_aux_dir/shtool install -c"
1004     break
1005   fi
1006 done
1007 if test -z "$ac_aux_dir"; then
1008   { { echo "$as_me:1008: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1009 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1010    { (exit 1); exit 1; }; }
1011 fi
1012 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1013 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1014 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1015
1016 # Make sure we can run config.sub.
1017 $ac_config_sub sun4 >/dev/null 2>&1 ||
1018   { { echo "$as_me:1018: error: cannot run $ac_config_sub" >&5
1019 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1020    { (exit 1); exit 1; }; }
1021
1022 echo "$as_me:1022: checking build system type" >&5
1023 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1024 if test "${ac_cv_build+set}" = set; then
1025   echo $ECHO_N "(cached) $ECHO_C" >&6
1026 else
1027   ac_cv_build_alias=$build_alias
1028 test -z "$ac_cv_build_alias" &&
1029   ac_cv_build_alias=`$ac_config_guess`
1030 test -z "$ac_cv_build_alias" &&
1031   { { echo "$as_me:1031: error: cannot guess build type; you must specify one" >&5
1032 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1033    { (exit 1); exit 1; }; }
1034 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1035   { { echo "$as_me:1035: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1036 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1037    { (exit 1); exit 1; }; }
1038
1039 fi
1040 echo "$as_me:1040: result: $ac_cv_build" >&5
1041 echo "${ECHO_T}$ac_cv_build" >&6
1042 build=$ac_cv_build
1043 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1044 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1045 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1046
1047 echo "$as_me:1047: checking host system type" >&5
1048 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1049 if test "${ac_cv_host+set}" = set; then
1050   echo $ECHO_N "(cached) $ECHO_C" >&6
1051 else
1052   ac_cv_host_alias=$host_alias
1053 test -z "$ac_cv_host_alias" &&
1054   ac_cv_host_alias=$ac_cv_build_alias
1055 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1056   { { echo "$as_me:1056: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1057 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1058    { (exit 1); exit 1; }; }
1059
1060 fi
1061 echo "$as_me:1061: result: $ac_cv_host" >&5
1062 echo "${ECHO_T}$ac_cv_host" >&6
1063 host=$ac_cv_host
1064 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1065 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1066 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1067
1068 if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then
1069         echo "$as_me:1069: checking target system type" >&5
1070 echo $ECHO_N "checking target system type... $ECHO_C" >&6
1071 if test "${ac_cv_target+set}" = set; then
1072   echo $ECHO_N "(cached) $ECHO_C" >&6
1073 else
1074   ac_cv_target_alias=$target_alias
1075 test "x$ac_cv_target_alias" = "x" &&
1076   ac_cv_target_alias=$ac_cv_host_alias
1077 ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
1078   { { echo "$as_me:1078: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1079 echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1080    { (exit 1); exit 1; }; }
1081
1082 fi
1083 echo "$as_me:1083: result: $ac_cv_target" >&5
1084 echo "${ECHO_T}$ac_cv_target" >&6
1085 target=$ac_cv_target
1086 target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1087 target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1088 target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1089
1090 # The aliases save the names the user supplied, while $host etc.
1091 # will get canonicalized.
1092 test -n "$target_alias" &&
1093   test "$program_prefix$program_suffix$program_transform_name" = \
1094     NONENONEs,x,x, &&
1095   program_prefix=${target_alias}-
1096         system_name="$host_os"
1097 else
1098         system_name="`(uname -s -r) 2>/dev/null`"
1099         if test -z "$system_name" ; then
1100                 system_name="`(hostname) 2>/dev/null`"
1101         fi
1102 fi
1103 test -n "$system_name" && cat >>confdefs.h <<EOF
1104 #define SYSTEM_NAME "$system_name"
1105 EOF
1106
1107 if test "${cf_cv_system_name+set}" = set; then
1108   echo $ECHO_N "(cached) $ECHO_C" >&6
1109 else
1110   cf_cv_system_name="$system_name"
1111 fi
1112
1113 test -z "$system_name" && system_name="$cf_cv_system_name"
1114 test -n "$cf_cv_system_name" && echo "$as_me:1114: result: Configuring for $cf_cv_system_name" >&5
1115 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1116
1117 if test ".$system_name" != ".$cf_cv_system_name" ; then
1118         echo "$as_me:1118: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1119 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1120         { { echo "$as_me:1120: error: \"Please remove config.cache and try again.\"" >&5
1121 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1122    { (exit 1); exit 1; }; }
1123 fi
1124
1125 # Check whether --with-system-type or --without-system-type was given.
1126 if test "${with_system_type+set}" = set; then
1127   withval="$with_system_type"
1128   { echo "$as_me:1128: WARNING: overriding system type to $withval" >&5
1129 echo "$as_me: WARNING: overriding system type to $withval" >&2;}
1130  cf_cv_system_name=$withval
1131 fi;
1132
1133 ###     Save the given $CFLAGS to allow user-override.
1134 cf_user_CFLAGS="$CFLAGS"
1135
1136 ###     Default install-location
1137
1138 echo "$as_me:1138: checking for prefix" >&5
1139 echo $ECHO_N "checking for prefix... $ECHO_C" >&6
1140 if test "x$prefix" = "xNONE" ; then
1141         case "$cf_cv_system_name" in
1142                 # non-vendor systems don't have a conflict
1143         openbsd*|freebsd*|mirbsd*|linux*|cygwin*|k*bsd*-gnu)
1144                 prefix=/usr
1145                 ;;
1146         *)      prefix=$ac_default_prefix
1147                 ;;
1148         esac
1149 fi
1150 echo "$as_me:1150: result: $prefix" >&5
1151 echo "${ECHO_T}$prefix" >&6
1152
1153 if test "x$prefix" = "xNONE" ; then
1154 echo "$as_me:1154: checking for default include-directory" >&5
1155 echo $ECHO_N "checking for default include-directory... $ECHO_C" >&6
1156 test -n "$verbose" && echo 1>&6
1157 for cf_symbol in \
1158         $includedir \
1159         $includedir/ncurses \
1160         $prefix/include \
1161         $prefix/include/ncurses \
1162         /usr/local/include \
1163         /usr/local/include/ncurses \
1164         /usr/include \
1165         /usr/include/ncurses
1166 do
1167         cf_dir=`eval echo $cf_symbol`
1168         if test -f $cf_dir/curses.h ; then
1169         if ( fgrep NCURSES_VERSION $cf_dir/curses.h 2>&1 >/dev/null ) ; then
1170                 includedir="$cf_symbol"
1171                 test -n "$verbose"  && echo $ac_n "     found " 1>&6
1172                 break
1173         fi
1174         fi
1175         test -n "$verbose"  && echo "   tested $cf_dir" 1>&6
1176 done
1177 echo "$as_me:1177: result: $includedir" >&5
1178 echo "${ECHO_T}$includedir" >&6
1179 fi
1180
1181 ###     Checks for programs.
1182 ac_ext=c
1183 ac_cpp='$CPP $CPPFLAGS'
1184 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1185 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1186 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1187 ac_main_return=return
1188 if test -n "$ac_tool_prefix"; then
1189   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1190 set dummy ${ac_tool_prefix}gcc; ac_word=$2
1191 echo "$as_me:1191: checking for $ac_word" >&5
1192 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1193 if test "${ac_cv_prog_CC+set}" = set; then
1194   echo $ECHO_N "(cached) $ECHO_C" >&6
1195 else
1196   if test -n "$CC"; then
1197   ac_cv_prog_CC="$CC" # Let the user override the test.
1198 else
1199   ac_save_IFS=$IFS; IFS=$ac_path_separator
1200 ac_dummy="$PATH"
1201 for ac_dir in $ac_dummy; do
1202   IFS=$ac_save_IFS
1203   test -z "$ac_dir" && ac_dir=.
1204   $as_executable_p "$ac_dir/$ac_word" || continue
1205 ac_cv_prog_CC="${ac_tool_prefix}gcc"
1206 echo "$as_me:1206: found $ac_dir/$ac_word" >&5
1207 break
1208 done
1209
1210 fi
1211 fi
1212 CC=$ac_cv_prog_CC
1213 if test -n "$CC"; then
1214   echo "$as_me:1214: result: $CC" >&5
1215 echo "${ECHO_T}$CC" >&6
1216 else
1217   echo "$as_me:1217: result: no" >&5
1218 echo "${ECHO_T}no" >&6
1219 fi
1220
1221 fi
1222 if test -z "$ac_cv_prog_CC"; then
1223   ac_ct_CC=$CC
1224   # Extract the first word of "gcc", so it can be a program name with args.
1225 set dummy gcc; ac_word=$2
1226 echo "$as_me:1226: checking for $ac_word" >&5
1227 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1228 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1229   echo $ECHO_N "(cached) $ECHO_C" >&6
1230 else
1231   if test -n "$ac_ct_CC"; then
1232   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1233 else
1234   ac_save_IFS=$IFS; IFS=$ac_path_separator
1235 ac_dummy="$PATH"
1236 for ac_dir in $ac_dummy; do
1237   IFS=$ac_save_IFS
1238   test -z "$ac_dir" && ac_dir=.
1239   $as_executable_p "$ac_dir/$ac_word" || continue
1240 ac_cv_prog_ac_ct_CC="gcc"
1241 echo "$as_me:1241: found $ac_dir/$ac_word" >&5
1242 break
1243 done
1244
1245 fi
1246 fi
1247 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1248 if test -n "$ac_ct_CC"; then
1249   echo "$as_me:1249: result: $ac_ct_CC" >&5
1250 echo "${ECHO_T}$ac_ct_CC" >&6
1251 else
1252   echo "$as_me:1252: result: no" >&5
1253 echo "${ECHO_T}no" >&6
1254 fi
1255
1256   CC=$ac_ct_CC
1257 else
1258   CC="$ac_cv_prog_CC"
1259 fi
1260
1261 if test -z "$CC"; then
1262   if test -n "$ac_tool_prefix"; then
1263   # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1264 set dummy ${ac_tool_prefix}cc; ac_word=$2
1265 echo "$as_me:1265: checking for $ac_word" >&5
1266 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1267 if test "${ac_cv_prog_CC+set}" = set; then
1268   echo $ECHO_N "(cached) $ECHO_C" >&6
1269 else
1270   if test -n "$CC"; then
1271   ac_cv_prog_CC="$CC" # Let the user override the test.
1272 else
1273   ac_save_IFS=$IFS; IFS=$ac_path_separator
1274 ac_dummy="$PATH"
1275 for ac_dir in $ac_dummy; do
1276   IFS=$ac_save_IFS
1277   test -z "$ac_dir" && ac_dir=.
1278   $as_executable_p "$ac_dir/$ac_word" || continue
1279 ac_cv_prog_CC="${ac_tool_prefix}cc"
1280 echo "$as_me:1280: found $ac_dir/$ac_word" >&5
1281 break
1282 done
1283
1284 fi
1285 fi
1286 CC=$ac_cv_prog_CC
1287 if test -n "$CC"; then
1288   echo "$as_me:1288: result: $CC" >&5
1289 echo "${ECHO_T}$CC" >&6
1290 else
1291   echo "$as_me:1291: result: no" >&5
1292 echo "${ECHO_T}no" >&6
1293 fi
1294
1295 fi
1296 if test -z "$ac_cv_prog_CC"; then
1297   ac_ct_CC=$CC
1298   # Extract the first word of "cc", so it can be a program name with args.
1299 set dummy cc; ac_word=$2
1300 echo "$as_me:1300: checking for $ac_word" >&5
1301 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1302 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1303   echo $ECHO_N "(cached) $ECHO_C" >&6
1304 else
1305   if test -n "$ac_ct_CC"; then
1306   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1307 else
1308   ac_save_IFS=$IFS; IFS=$ac_path_separator
1309 ac_dummy="$PATH"
1310 for ac_dir in $ac_dummy; do
1311   IFS=$ac_save_IFS
1312   test -z "$ac_dir" && ac_dir=.
1313   $as_executable_p "$ac_dir/$ac_word" || continue
1314 ac_cv_prog_ac_ct_CC="cc"
1315 echo "$as_me:1315: found $ac_dir/$ac_word" >&5
1316 break
1317 done
1318
1319 fi
1320 fi
1321 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1322 if test -n "$ac_ct_CC"; then
1323   echo "$as_me:1323: result: $ac_ct_CC" >&5
1324 echo "${ECHO_T}$ac_ct_CC" >&6
1325 else
1326   echo "$as_me:1326: result: no" >&5
1327 echo "${ECHO_T}no" >&6
1328 fi
1329
1330   CC=$ac_ct_CC
1331 else
1332   CC="$ac_cv_prog_CC"
1333 fi
1334
1335 fi
1336 if test -z "$CC"; then
1337   # Extract the first word of "cc", so it can be a program name with args.
1338 set dummy cc; ac_word=$2
1339 echo "$as_me:1339: checking for $ac_word" >&5
1340 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1341 if test "${ac_cv_prog_CC+set}" = set; then
1342   echo $ECHO_N "(cached) $ECHO_C" >&6
1343 else
1344   if test -n "$CC"; then
1345   ac_cv_prog_CC="$CC" # Let the user override the test.
1346 else
1347   ac_prog_rejected=no
1348   ac_save_IFS=$IFS; IFS=$ac_path_separator
1349 ac_dummy="$PATH"
1350 for ac_dir in $ac_dummy; do
1351   IFS=$ac_save_IFS
1352   test -z "$ac_dir" && ac_dir=.
1353   $as_executable_p "$ac_dir/$ac_word" || continue
1354 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1355   ac_prog_rejected=yes
1356   continue
1357 fi
1358 ac_cv_prog_CC="cc"
1359 echo "$as_me:1359: found $ac_dir/$ac_word" >&5
1360 break
1361 done
1362
1363 if test $ac_prog_rejected = yes; then
1364   # We found a bogon in the path, so make sure we never use it.
1365   set dummy $ac_cv_prog_CC
1366   shift
1367   if test $# != 0; then
1368     # We chose a different compiler from the bogus one.
1369     # However, it has the same basename, so the bogon will be chosen
1370     # first if we set CC to just the basename; use the full file name.
1371     shift
1372     set dummy "$ac_dir/$ac_word" ${1+"$@"}
1373     shift
1374     ac_cv_prog_CC="$@"
1375   fi
1376 fi
1377 fi
1378 fi
1379 CC=$ac_cv_prog_CC
1380 if test -n "$CC"; then
1381   echo "$as_me:1381: result: $CC" >&5
1382 echo "${ECHO_T}$CC" >&6
1383 else
1384   echo "$as_me:1384: result: no" >&5
1385 echo "${ECHO_T}no" >&6
1386 fi
1387
1388 fi
1389 if test -z "$CC"; then
1390   if test -n "$ac_tool_prefix"; then
1391   for ac_prog in cl
1392   do
1393     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1394 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1395 echo "$as_me:1395: checking for $ac_word" >&5
1396 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1397 if test "${ac_cv_prog_CC+set}" = set; then
1398   echo $ECHO_N "(cached) $ECHO_C" >&6
1399 else
1400   if test -n "$CC"; then
1401   ac_cv_prog_CC="$CC" # Let the user override the test.
1402 else
1403   ac_save_IFS=$IFS; IFS=$ac_path_separator
1404 ac_dummy="$PATH"
1405 for ac_dir in $ac_dummy; do
1406   IFS=$ac_save_IFS
1407   test -z "$ac_dir" && ac_dir=.
1408   $as_executable_p "$ac_dir/$ac_word" || continue
1409 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1410 echo "$as_me:1410: found $ac_dir/$ac_word" >&5
1411 break
1412 done
1413
1414 fi
1415 fi
1416 CC=$ac_cv_prog_CC
1417 if test -n "$CC"; then
1418   echo "$as_me:1418: result: $CC" >&5
1419 echo "${ECHO_T}$CC" >&6
1420 else
1421   echo "$as_me:1421: result: no" >&5
1422 echo "${ECHO_T}no" >&6
1423 fi
1424
1425     test -n "$CC" && break
1426   done
1427 fi
1428 if test -z "$CC"; then
1429   ac_ct_CC=$CC
1430   for ac_prog in cl
1431 do
1432   # Extract the first word of "$ac_prog", so it can be a program name with args.
1433 set dummy $ac_prog; ac_word=$2
1434 echo "$as_me:1434: checking for $ac_word" >&5
1435 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1436 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1437   echo $ECHO_N "(cached) $ECHO_C" >&6
1438 else
1439   if test -n "$ac_ct_CC"; then
1440   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1441 else
1442   ac_save_IFS=$IFS; IFS=$ac_path_separator
1443 ac_dummy="$PATH"
1444 for ac_dir in $ac_dummy; do
1445   IFS=$ac_save_IFS
1446   test -z "$ac_dir" && ac_dir=.
1447   $as_executable_p "$ac_dir/$ac_word" || continue
1448 ac_cv_prog_ac_ct_CC="$ac_prog"
1449 echo "$as_me:1449: found $ac_dir/$ac_word" >&5
1450 break
1451 done
1452
1453 fi
1454 fi
1455 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1456 if test -n "$ac_ct_CC"; then
1457   echo "$as_me:1457: result: $ac_ct_CC" >&5
1458 echo "${ECHO_T}$ac_ct_CC" >&6
1459 else
1460   echo "$as_me:1460: result: no" >&5
1461 echo "${ECHO_T}no" >&6
1462 fi
1463
1464   test -n "$ac_ct_CC" && break
1465 done
1466
1467   CC=$ac_ct_CC
1468 fi
1469
1470 fi
1471
1472 test -z "$CC" && { { echo "$as_me:1472: error: no acceptable cc found in \$PATH" >&5
1473 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1474    { (exit 1); exit 1; }; }
1475
1476 # Provide some information about the compiler.
1477 echo "$as_me:1477:" \
1478      "checking for C compiler version" >&5
1479 ac_compiler=`set X $ac_compile; echo $2`
1480 { (eval echo "$as_me:1480: \"$ac_compiler --version </dev/null >&5\"") >&5
1481   (eval $ac_compiler --version </dev/null >&5) 2>&5
1482   ac_status=$?
1483   echo "$as_me:1483: \$? = $ac_status" >&5
1484   (exit $ac_status); }
1485 { (eval echo "$as_me:1485: \"$ac_compiler -v </dev/null >&5\"") >&5
1486   (eval $ac_compiler -v </dev/null >&5) 2>&5
1487   ac_status=$?
1488   echo "$as_me:1488: \$? = $ac_status" >&5
1489   (exit $ac_status); }
1490 { (eval echo "$as_me:1490: \"$ac_compiler -V </dev/null >&5\"") >&5
1491   (eval $ac_compiler -V </dev/null >&5) 2>&5
1492   ac_status=$?
1493   echo "$as_me:1493: \$? = $ac_status" >&5
1494   (exit $ac_status); }
1495
1496 cat >conftest.$ac_ext <<_ACEOF
1497 #line 1497 "configure"
1498 #include "confdefs.h"
1499
1500 int
1501 main ()
1502 {
1503
1504   ;
1505   return 0;
1506 }
1507 _ACEOF
1508 ac_clean_files_save=$ac_clean_files
1509 ac_clean_files="$ac_clean_files a.out a.exe"
1510 # Try to create an executable without -o first, disregard a.out.
1511 # It will help us diagnose broken compilers, and finding out an intuition
1512 # of exeext.
1513 echo "$as_me:1513: checking for C compiler default output" >&5
1514 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1515 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1516 if { (eval echo "$as_me:1516: \"$ac_link_default\"") >&5
1517   (eval $ac_link_default) 2>&5
1518   ac_status=$?
1519   echo "$as_me:1519: \$? = $ac_status" >&5
1520   (exit $ac_status); }; then
1521   # Find the output, starting from the most likely.  This scheme is
1522 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1523 # resort.
1524 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1525                 ls a.out conftest 2>/dev/null;
1526                 ls a.* conftest.* 2>/dev/null`; do
1527   case $ac_file in
1528     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1529     a.out ) # We found the default executable, but exeext='' is most
1530             # certainly right.
1531             break;;
1532     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1533           # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1534           export ac_cv_exeext
1535           break;;
1536     * ) break;;
1537   esac
1538 done
1539 else
1540   echo "$as_me: failed program was:" >&5
1541 cat conftest.$ac_ext >&5
1542 { { echo "$as_me:1542: error: C compiler cannot create executables" >&5
1543 echo "$as_me: error: C compiler cannot create executables" >&2;}
1544    { (exit 77); exit 77; }; }
1545 fi
1546
1547 ac_exeext=$ac_cv_exeext
1548 echo "$as_me:1548: result: $ac_file" >&5
1549 echo "${ECHO_T}$ac_file" >&6
1550
1551 # Check the compiler produces executables we can run.  If not, either
1552 # the compiler is broken, or we cross compile.
1553 echo "$as_me:1553: checking whether the C compiler works" >&5
1554 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1555 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1556 # If not cross compiling, check that we can run a simple program.
1557 if test "$cross_compiling" != yes; then
1558   if { ac_try='./$ac_file'
1559   { (eval echo "$as_me:1559: \"$ac_try\"") >&5
1560   (eval $ac_try) 2>&5
1561   ac_status=$?
1562   echo "$as_me:1562: \$? = $ac_status" >&5
1563   (exit $ac_status); }; }; then
1564     cross_compiling=no
1565   else
1566     if test "$cross_compiling" = maybe; then
1567         cross_compiling=yes
1568     else
1569         { { echo "$as_me:1569: error: cannot run C compiled programs.
1570 If you meant to cross compile, use \`--host'." >&5
1571 echo "$as_me: error: cannot run C compiled programs.
1572 If you meant to cross compile, use \`--host'." >&2;}
1573    { (exit 1); exit 1; }; }
1574     fi
1575   fi
1576 fi
1577 echo "$as_me:1577: result: yes" >&5
1578 echo "${ECHO_T}yes" >&6
1579
1580 rm -f a.out a.exe conftest$ac_cv_exeext
1581 ac_clean_files=$ac_clean_files_save
1582 # Check the compiler produces executables we can run.  If not, either
1583 # the compiler is broken, or we cross compile.
1584 echo "$as_me:1584: checking whether we are cross compiling" >&5
1585 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1586 echo "$as_me:1586: result: $cross_compiling" >&5
1587 echo "${ECHO_T}$cross_compiling" >&6
1588
1589 echo "$as_me:1589: checking for executable suffix" >&5
1590 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1591 if { (eval echo "$as_me:1591: \"$ac_link\"") >&5
1592   (eval $ac_link) 2>&5
1593   ac_status=$?
1594   echo "$as_me:1594: \$? = $ac_status" >&5
1595   (exit $ac_status); }; then
1596   # If both `conftest.exe' and `conftest' are `present' (well, observable)
1597 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
1598 # work properly (i.e., refer to `conftest.exe'), while it won't with
1599 # `rm'.
1600 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1601   case $ac_file in
1602     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1603     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1604           export ac_cv_exeext
1605           break;;
1606     * ) break;;
1607   esac
1608 done
1609 else
1610   { { echo "$as_me:1610: error: cannot compute EXEEXT: cannot compile and link" >&5
1611 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1612    { (exit 1); exit 1; }; }
1613 fi
1614
1615 rm -f conftest$ac_cv_exeext
1616 echo "$as_me:1616: result: $ac_cv_exeext" >&5
1617 echo "${ECHO_T}$ac_cv_exeext" >&6
1618
1619 rm -f conftest.$ac_ext
1620 EXEEXT=$ac_cv_exeext
1621 ac_exeext=$EXEEXT
1622 echo "$as_me:1622: checking for object suffix" >&5
1623 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1624 if test "${ac_cv_objext+set}" = set; then
1625   echo $ECHO_N "(cached) $ECHO_C" >&6
1626 else
1627   cat >conftest.$ac_ext <<_ACEOF
1628 #line 1628 "configure"
1629 #include "confdefs.h"
1630
1631 int
1632 main ()
1633 {
1634
1635   ;
1636   return 0;
1637 }
1638 _ACEOF
1639 rm -f conftest.o conftest.obj
1640 if { (eval echo "$as_me:1640: \"$ac_compile\"") >&5
1641   (eval $ac_compile) 2>&5
1642   ac_status=$?
1643   echo "$as_me:1643: \$? = $ac_status" >&5
1644   (exit $ac_status); }; then
1645   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1646   case $ac_file in
1647     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
1648     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1649        break;;
1650   esac
1651 done
1652 else
1653   echo "$as_me: failed program was:" >&5
1654 cat conftest.$ac_ext >&5
1655 { { echo "$as_me:1655: error: cannot compute OBJEXT: cannot compile" >&5
1656 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1657    { (exit 1); exit 1; }; }
1658 fi
1659
1660 rm -f conftest.$ac_cv_objext conftest.$ac_ext
1661 fi
1662 echo "$as_me:1662: result: $ac_cv_objext" >&5
1663 echo "${ECHO_T}$ac_cv_objext" >&6
1664 OBJEXT=$ac_cv_objext
1665 ac_objext=$OBJEXT
1666 echo "$as_me:1666: checking whether we are using the GNU C compiler" >&5
1667 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1668 if test "${ac_cv_c_compiler_gnu+set}" = set; then
1669   echo $ECHO_N "(cached) $ECHO_C" >&6
1670 else
1671   cat >conftest.$ac_ext <<_ACEOF
1672 #line 1672 "configure"
1673 #include "confdefs.h"
1674
1675 int
1676 main ()
1677 {
1678 #ifndef __GNUC__
1679        choke me
1680 #endif
1681
1682   ;
1683   return 0;
1684 }
1685 _ACEOF
1686 rm -f conftest.$ac_objext
1687 if { (eval echo "$as_me:1687: \"$ac_compile\"") >&5
1688   (eval $ac_compile) 2>&5
1689   ac_status=$?
1690   echo "$as_me:1690: \$? = $ac_status" >&5
1691   (exit $ac_status); } &&
1692          { ac_try='test -s conftest.$ac_objext'
1693   { (eval echo "$as_me:1693: \"$ac_try\"") >&5
1694   (eval $ac_try) 2>&5
1695   ac_status=$?
1696   echo "$as_me:1696: \$? = $ac_status" >&5
1697   (exit $ac_status); }; }; then
1698   ac_compiler_gnu=yes
1699 else
1700   echo "$as_me: failed program was:" >&5
1701 cat conftest.$ac_ext >&5
1702 ac_compiler_gnu=no
1703 fi
1704 rm -f conftest.$ac_objext conftest.$ac_ext
1705 ac_cv_c_compiler_gnu=$ac_compiler_gnu
1706
1707 fi
1708 echo "$as_me:1708: result: $ac_cv_c_compiler_gnu" >&5
1709 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1710 GCC=`test $ac_compiler_gnu = yes && echo yes`
1711 ac_test_CFLAGS=${CFLAGS+set}
1712 ac_save_CFLAGS=$CFLAGS
1713 CFLAGS="-g"
1714 echo "$as_me:1714: checking whether $CC accepts -g" >&5
1715 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1716 if test "${ac_cv_prog_cc_g+set}" = set; then
1717   echo $ECHO_N "(cached) $ECHO_C" >&6
1718 else
1719   cat >conftest.$ac_ext <<_ACEOF
1720 #line 1720 "configure"
1721 #include "confdefs.h"
1722
1723 int
1724 main ()
1725 {
1726
1727   ;
1728   return 0;
1729 }
1730 _ACEOF
1731 rm -f conftest.$ac_objext
1732 if { (eval echo "$as_me:1732: \"$ac_compile\"") >&5
1733   (eval $ac_compile) 2>&5
1734   ac_status=$?
1735   echo "$as_me:1735: \$? = $ac_status" >&5
1736   (exit $ac_status); } &&
1737          { ac_try='test -s conftest.$ac_objext'
1738   { (eval echo "$as_me:1738: \"$ac_try\"") >&5
1739   (eval $ac_try) 2>&5
1740   ac_status=$?
1741   echo "$as_me:1741: \$? = $ac_status" >&5
1742   (exit $ac_status); }; }; then
1743   ac_cv_prog_cc_g=yes
1744 else
1745   echo "$as_me: failed program was:" >&5
1746 cat conftest.$ac_ext >&5
1747 ac_cv_prog_cc_g=no
1748 fi
1749 rm -f conftest.$ac_objext conftest.$ac_ext
1750 fi
1751 echo "$as_me:1751: result: $ac_cv_prog_cc_g" >&5
1752 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1753 if test "$ac_test_CFLAGS" = set; then
1754   CFLAGS=$ac_save_CFLAGS
1755 elif test $ac_cv_prog_cc_g = yes; then
1756   if test "$GCC" = yes; then
1757     CFLAGS="-g -O2"
1758   else
1759     CFLAGS="-g"
1760   fi
1761 else
1762   if test "$GCC" = yes; then
1763     CFLAGS="-O2"
1764   else
1765     CFLAGS=
1766   fi
1767 fi
1768 # Some people use a C++ compiler to compile C.  Since we use `exit',
1769 # in C++ we need to declare it.  In case someone uses the same compiler
1770 # for both compiling C and C++ we need to have the C++ compiler decide
1771 # the declaration of exit, since it's the most demanding environment.
1772 cat >conftest.$ac_ext <<_ACEOF
1773 #ifndef __cplusplus
1774   choke me
1775 #endif
1776 _ACEOF
1777 rm -f conftest.$ac_objext
1778 if { (eval echo "$as_me:1778: \"$ac_compile\"") >&5
1779   (eval $ac_compile) 2>&5
1780   ac_status=$?
1781   echo "$as_me:1781: \$? = $ac_status" >&5
1782   (exit $ac_status); } &&
1783          { ac_try='test -s conftest.$ac_objext'
1784   { (eval echo "$as_me:1784: \"$ac_try\"") >&5
1785   (eval $ac_try) 2>&5
1786   ac_status=$?
1787   echo "$as_me:1787: \$? = $ac_status" >&5
1788   (exit $ac_status); }; }; then
1789   for ac_declaration in \
1790    ''\
1791    '#include <stdlib.h>' \
1792    'extern "C" void std::exit (int) throw (); using std::exit;' \
1793    'extern "C" void std::exit (int); using std::exit;' \
1794    'extern "C" void exit (int) throw ();' \
1795    'extern "C" void exit (int);' \
1796    'void exit (int);'
1797 do
1798   cat >conftest.$ac_ext <<_ACEOF
1799 #line 1799 "configure"
1800 #include "confdefs.h"
1801 #include <stdlib.h>
1802 $ac_declaration
1803 int
1804 main ()
1805 {
1806 exit (42);
1807   ;
1808   return 0;
1809 }
1810 _ACEOF
1811 rm -f conftest.$ac_objext
1812 if { (eval echo "$as_me:1812: \"$ac_compile\"") >&5
1813   (eval $ac_compile) 2>&5
1814   ac_status=$?
1815   echo "$as_me:1815: \$? = $ac_status" >&5
1816   (exit $ac_status); } &&
1817          { ac_try='test -s conftest.$ac_objext'
1818   { (eval echo "$as_me:1818: \"$ac_try\"") >&5
1819   (eval $ac_try) 2>&5
1820   ac_status=$?
1821   echo "$as_me:1821: \$? = $ac_status" >&5
1822   (exit $ac_status); }; }; then
1823   :
1824 else
1825   echo "$as_me: failed program was:" >&5
1826 cat conftest.$ac_ext >&5
1827 continue
1828 fi
1829 rm -f conftest.$ac_objext conftest.$ac_ext
1830   cat >conftest.$ac_ext <<_ACEOF
1831 #line 1831 "configure"
1832 #include "confdefs.h"
1833 $ac_declaration
1834 int
1835 main ()
1836 {
1837 exit (42);
1838   ;
1839   return 0;
1840 }
1841 _ACEOF
1842 rm -f conftest.$ac_objext
1843 if { (eval echo "$as_me:1843: \"$ac_compile\"") >&5
1844   (eval $ac_compile) 2>&5
1845   ac_status=$?
1846   echo "$as_me:1846: \$? = $ac_status" >&5
1847   (exit $ac_status); } &&
1848          { ac_try='test -s conftest.$ac_objext'
1849   { (eval echo "$as_me:1849: \"$ac_try\"") >&5
1850   (eval $ac_try) 2>&5
1851   ac_status=$?
1852   echo "$as_me:1852: \$? = $ac_status" >&5
1853   (exit $ac_status); }; }; then
1854   break
1855 else
1856   echo "$as_me: failed program was:" >&5
1857 cat conftest.$ac_ext >&5
1858 fi
1859 rm -f conftest.$ac_objext conftest.$ac_ext
1860 done
1861 rm -rf conftest*
1862 if test -n "$ac_declaration"; then
1863   echo '#ifdef __cplusplus' >>confdefs.h
1864   echo $ac_declaration      >>confdefs.h
1865   echo '#endif'             >>confdefs.h
1866 fi
1867
1868 else
1869   echo "$as_me: failed program was:" >&5
1870 cat conftest.$ac_ext >&5
1871 fi
1872 rm -f conftest.$ac_objext conftest.$ac_ext
1873 ac_ext=c
1874 ac_cpp='$CPP $CPPFLAGS'
1875 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1876 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1877 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1878 ac_main_return=return
1879
1880 GCC_VERSION=none
1881 if test "$GCC" = yes ; then
1882         echo "$as_me:1882: checking version of $CC" >&5
1883 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
1884         GCC_VERSION="`${CC} --version 2>/dev/null | sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
1885         test -z "$GCC_VERSION" && GCC_VERSION=unknown
1886         echo "$as_me:1886: result: $GCC_VERSION" >&5
1887 echo "${ECHO_T}$GCC_VERSION" >&6
1888 fi
1889
1890 ac_ext=c
1891 ac_cpp='$CPP $CPPFLAGS'
1892 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1893 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1894 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1895 ac_main_return=return
1896 echo "$as_me:1896: checking how to run the C preprocessor" >&5
1897 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
1898 # On Suns, sometimes $CPP names a directory.
1899 if test -n "$CPP" && test -d "$CPP"; then
1900   CPP=
1901 fi
1902 if test -z "$CPP"; then
1903   if test "${ac_cv_prog_CPP+set}" = set; then
1904   echo $ECHO_N "(cached) $ECHO_C" >&6
1905 else
1906       # Double quotes because CPP needs to be expanded
1907     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
1908     do
1909       ac_preproc_ok=false
1910 for ac_c_preproc_warn_flag in '' yes
1911 do
1912   # Use a header file that comes with gcc, so configuring glibc
1913   # with a fresh cross-compiler works.
1914   # On the NeXT, cc -E runs the code through the compiler's parser,
1915   # not just through cpp. "Syntax error" is here to catch this case.
1916   cat >conftest.$ac_ext <<_ACEOF
1917 #line 1917 "configure"
1918 #include "confdefs.h"
1919 #include <assert.h>
1920                      Syntax error
1921 _ACEOF
1922 if { (eval echo "$as_me:1922: \"$ac_cpp conftest.$ac_ext\"") >&5
1923   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
1924   ac_status=$?
1925   egrep -v '^ *\+' conftest.er1 >conftest.err
1926   rm -f conftest.er1
1927   cat conftest.err >&5
1928   echo "$as_me:1928: \$? = $ac_status" >&5
1929   (exit $ac_status); } >/dev/null; then
1930   if test -s conftest.err; then
1931     ac_cpp_err=$ac_c_preproc_warn_flag
1932   else
1933     ac_cpp_err=
1934   fi
1935 else
1936   ac_cpp_err=yes
1937 fi
1938 if test -z "$ac_cpp_err"; then
1939   :
1940 else
1941   echo "$as_me: failed program was:" >&5
1942   cat conftest.$ac_ext >&5
1943   # Broken: fails on valid input.
1944 continue
1945 fi
1946 rm -f conftest.err conftest.$ac_ext
1947
1948   # OK, works on sane cases.  Now check whether non-existent headers
1949   # can be detected and how.
1950   cat >conftest.$ac_ext <<_ACEOF
1951 #line 1951 "configure"
1952 #include "confdefs.h"
1953 #include <ac_nonexistent.h>
1954 _ACEOF
1955 if { (eval echo "$as_me:1955: \"$ac_cpp conftest.$ac_ext\"") >&5
1956   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
1957   ac_status=$?
1958   egrep -v '^ *\+' conftest.er1 >conftest.err
1959   rm -f conftest.er1
1960   cat conftest.err >&5
1961   echo "$as_me:1961: \$? = $ac_status" >&5
1962   (exit $ac_status); } >/dev/null; then
1963   if test -s conftest.err; then
1964     ac_cpp_err=$ac_c_preproc_warn_flag
1965   else
1966     ac_cpp_err=
1967   fi
1968 else
1969   ac_cpp_err=yes
1970 fi
1971 if test -z "$ac_cpp_err"; then
1972   # Broken: success on invalid input.
1973 continue
1974 else
1975   echo "$as_me: failed program was:" >&5
1976   cat conftest.$ac_ext >&5
1977   # Passes both tests.
1978 ac_preproc_ok=:
1979 break
1980 fi
1981 rm -f conftest.err conftest.$ac_ext
1982
1983 done
1984 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
1985 rm -f conftest.err conftest.$ac_ext
1986 if $ac_preproc_ok; then
1987   break
1988 fi
1989
1990     done
1991     ac_cv_prog_CPP=$CPP
1992
1993 fi
1994   CPP=$ac_cv_prog_CPP
1995 else
1996   ac_cv_prog_CPP=$CPP
1997 fi
1998 echo "$as_me:1998: result: $CPP" >&5
1999 echo "${ECHO_T}$CPP" >&6
2000 ac_preproc_ok=false
2001 for ac_c_preproc_warn_flag in '' yes
2002 do
2003   # Use a header file that comes with gcc, so configuring glibc
2004   # with a fresh cross-compiler works.
2005   # On the NeXT, cc -E runs the code through the compiler's parser,
2006   # not just through cpp. "Syntax error" is here to catch this case.
2007   cat >conftest.$ac_ext <<_ACEOF
2008 #line 2008 "configure"
2009 #include "confdefs.h"
2010 #include <assert.h>
2011                      Syntax error
2012 _ACEOF
2013 if { (eval echo "$as_me:2013: \"$ac_cpp conftest.$ac_ext\"") >&5
2014   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2015   ac_status=$?
2016   egrep -v '^ *\+' conftest.er1 >conftest.err
2017   rm -f conftest.er1
2018   cat conftest.err >&5
2019   echo "$as_me:2019: \$? = $ac_status" >&5
2020   (exit $ac_status); } >/dev/null; then
2021   if test -s conftest.err; then
2022     ac_cpp_err=$ac_c_preproc_warn_flag
2023   else
2024     ac_cpp_err=
2025   fi
2026 else
2027   ac_cpp_err=yes
2028 fi
2029 if test -z "$ac_cpp_err"; then
2030   :
2031 else
2032   echo "$as_me: failed program was:" >&5
2033   cat conftest.$ac_ext >&5
2034   # Broken: fails on valid input.
2035 continue
2036 fi
2037 rm -f conftest.err conftest.$ac_ext
2038
2039   # OK, works on sane cases.  Now check whether non-existent headers
2040   # can be detected and how.
2041   cat >conftest.$ac_ext <<_ACEOF
2042 #line 2042 "configure"
2043 #include "confdefs.h"
2044 #include <ac_nonexistent.h>
2045 _ACEOF
2046 if { (eval echo "$as_me:2046: \"$ac_cpp conftest.$ac_ext\"") >&5
2047   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2048   ac_status=$?
2049   egrep -v '^ *\+' conftest.er1 >conftest.err
2050   rm -f conftest.er1
2051   cat conftest.err >&5
2052   echo "$as_me:2052: \$? = $ac_status" >&5
2053   (exit $ac_status); } >/dev/null; then
2054   if test -s conftest.err; then
2055     ac_cpp_err=$ac_c_preproc_warn_flag
2056   else
2057     ac_cpp_err=
2058   fi
2059 else
2060   ac_cpp_err=yes
2061 fi
2062 if test -z "$ac_cpp_err"; then
2063   # Broken: success on invalid input.
2064 continue
2065 else
2066   echo "$as_me: failed program was:" >&5
2067   cat conftest.$ac_ext >&5
2068   # Passes both tests.
2069 ac_preproc_ok=:
2070 break
2071 fi
2072 rm -f conftest.err conftest.$ac_ext
2073
2074 done
2075 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2076 rm -f conftest.err conftest.$ac_ext
2077 if $ac_preproc_ok; then
2078   :
2079 else
2080   { { echo "$as_me:2080: error: C preprocessor \"$CPP\" fails sanity check" >&5
2081 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2082    { (exit 1); exit 1; }; }
2083 fi
2084
2085 ac_ext=c
2086 ac_cpp='$CPP $CPPFLAGS'
2087 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2088 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2089 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2090 ac_main_return=return
2091
2092 if test $ac_cv_c_compiler_gnu = yes; then
2093     echo "$as_me:2093: checking whether $CC needs -traditional" >&5
2094 echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
2095 if test "${ac_cv_prog_gcc_traditional+set}" = set; then
2096   echo $ECHO_N "(cached) $ECHO_C" >&6
2097 else
2098     ac_pattern="Autoconf.*'x'"
2099   cat >conftest.$ac_ext <<_ACEOF
2100 #line 2100 "configure"
2101 #include "confdefs.h"
2102 #include <sgtty.h>
2103 int Autoconf = TIOCGETP;
2104 _ACEOF
2105 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2106   egrep "$ac_pattern" >/dev/null 2>&1; then
2107   ac_cv_prog_gcc_traditional=yes
2108 else
2109   ac_cv_prog_gcc_traditional=no
2110 fi
2111 rm -rf conftest*
2112
2113   if test $ac_cv_prog_gcc_traditional = no; then
2114     cat >conftest.$ac_ext <<_ACEOF
2115 #line 2115 "configure"
2116 #include "confdefs.h"
2117 #include <termio.h>
2118 int Autoconf = TCGETA;
2119 _ACEOF
2120 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2121   egrep "$ac_pattern" >/dev/null 2>&1; then
2122   ac_cv_prog_gcc_traditional=yes
2123 fi
2124 rm -rf conftest*
2125
2126   fi
2127 fi
2128 echo "$as_me:2128: result: $ac_cv_prog_gcc_traditional" >&5
2129 echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
2130   if test $ac_cv_prog_gcc_traditional = yes; then
2131     CC="$CC -traditional"
2132   fi
2133 fi
2134
2135 echo "$as_me:2135: checking whether $CC understands -c and -o together" >&5
2136 echo $ECHO_N "checking whether $CC understands -c and -o together... $ECHO_C" >&6
2137 if test "${cf_cv_prog_CC_c_o+set}" = set; then
2138   echo $ECHO_N "(cached) $ECHO_C" >&6
2139 else
2140
2141 cat > conftest.$ac_ext <<CF_EOF
2142 #include <stdio.h>
2143 int main()
2144 {
2145         ${cf_cv_main_return:-return}(0);
2146 }
2147 CF_EOF
2148 # We do the test twice because some compilers refuse to overwrite an
2149 # existing .o file with -o, though they will create one.
2150 ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
2151 if { (eval echo "$as_me:2151: \"$ac_try\"") >&5
2152   (eval $ac_try) 2>&5
2153   ac_status=$?
2154   echo "$as_me:2154: \$? = $ac_status" >&5
2155   (exit $ac_status); } &&
2156   test -f conftest2.$ac_objext && { (eval echo "$as_me:2156: \"$ac_try\"") >&5
2157   (eval $ac_try) 2>&5
2158   ac_status=$?
2159   echo "$as_me:2159: \$? = $ac_status" >&5
2160   (exit $ac_status); };
2161 then
2162   eval cf_cv_prog_CC_c_o=yes
2163 else
2164   eval cf_cv_prog_CC_c_o=no
2165 fi
2166 rm -rf conftest*
2167
2168 fi
2169 if test $cf_cv_prog_CC_c_o = yes; then
2170   echo "$as_me:2170: result: yes" >&5
2171 echo "${ECHO_T}yes" >&6
2172 else
2173   echo "$as_me:2173: result: no" >&5
2174 echo "${ECHO_T}no" >&6
2175 fi
2176
2177 echo "$as_me:2177: checking for POSIXized ISC" >&5
2178 echo $ECHO_N "checking for POSIXized ISC... $ECHO_C" >&6
2179 if test -d /etc/conf/kconfig.d &&
2180    grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
2181 then
2182   echo "$as_me:2182: result: yes" >&5
2183 echo "${ECHO_T}yes" >&6
2184   ISC=yes # If later tests want to check for ISC.
2185
2186 cat >>confdefs.h <<\EOF
2187 #define _POSIX_SOURCE 1
2188 EOF
2189
2190   if test "$GCC" = yes; then
2191     CC="$CC -posix"
2192   else
2193     CC="$CC -Xp"
2194   fi
2195 else
2196   echo "$as_me:2196: result: no" >&5
2197 echo "${ECHO_T}no" >&6
2198   ISC=
2199 fi
2200
2201 # This should have been defined by AC_PROG_CC
2202 : ${CC:=cc}
2203
2204 # Check for user's environment-breakage by stuffing CFLAGS/CPPFLAGS content
2205 # into CC.  This will not help with broken scripts that wrap the compiler with
2206 # options, but eliminates a more common category of user confusion.
2207 echo "$as_me:2207: checking \$CC variable" >&5
2208 echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
2209 case "$CC" in #(vi
2210 *[\ \   ]-[IUD]*)
2211         echo "$as_me:2211: result: broken" >&5
2212 echo "${ECHO_T}broken" >&6
2213         { echo "$as_me:2213: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
2214 echo "$as_me: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
2215         # humor him...
2216         cf_flags=`echo "$CC" | sed -e 's/^[^    ]*[     ]//'`
2217         CC=`echo "$CC" | sed -e 's/[    ].*//'`
2218
2219 cf_fix_cppflags=no
2220 cf_new_cflags=
2221 cf_new_cppflags=
2222 cf_new_extra_cppflags=
2223
2224 for cf_add_cflags in $cf_flags
2225 do
2226 case $cf_fix_cppflags in
2227 no)
2228         case $cf_add_cflags in #(vi
2229         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2230                 case $cf_add_cflags in
2231                 -D*)
2232                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2233
2234                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2235                                 && test -z "${cf_tst_cflags}" \
2236                                 && cf_fix_cppflags=yes
2237
2238                         if test $cf_fix_cppflags = yes ; then
2239                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2240                                 continue
2241                         elif test "${cf_tst_cflags}" = "\"'" ; then
2242                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2243                                 continue
2244                         fi
2245                         ;;
2246                 esac
2247                 case "$CPPFLAGS" in
2248                 *$cf_add_cflags) #(vi
2249                         ;;
2250                 *) #(vi
2251                         case $cf_add_cflags in #(vi
2252                         -D*)
2253                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2254
2255 CPPFLAGS=`echo "$CPPFLAGS" | \
2256         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2257                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2258
2259                                 ;;
2260                         esac
2261                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2262                         ;;
2263                 esac
2264                 ;;
2265         *)
2266                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2267                 ;;
2268         esac
2269         ;;
2270 yes)
2271         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2272
2273         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2274
2275         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2276                 && test -z "${cf_tst_cflags}" \
2277                 && cf_fix_cppflags=no
2278         ;;
2279 esac
2280 done
2281
2282 if test -n "$cf_new_cflags" ; then
2283
2284         CFLAGS="$CFLAGS $cf_new_cflags"
2285 fi
2286
2287 if test -n "$cf_new_cppflags" ; then
2288
2289         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
2290 fi
2291
2292 if test -n "$cf_new_extra_cppflags" ; then
2293
2294         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2295 fi
2296
2297         ;;
2298 *)
2299         echo "$as_me:2299: result: ok" >&5
2300 echo "${ECHO_T}ok" >&6
2301         ;;
2302 esac
2303
2304 echo "$as_me:2304: checking for ${CC:-cc} option to accept ANSI C" >&5
2305 echo $ECHO_N "checking for ${CC:-cc} option to accept ANSI C... $ECHO_C" >&6
2306 if test "${cf_cv_ansi_cc+set}" = set; then
2307   echo $ECHO_N "(cached) $ECHO_C" >&6
2308 else
2309
2310 cf_cv_ansi_cc=no
2311 cf_save_CFLAGS="$CFLAGS"
2312 cf_save_CPPFLAGS="$CPPFLAGS"
2313 # Don't try gcc -ansi; that turns off useful extensions and
2314 # breaks some systems' header files.
2315 # AIX                   -qlanglvl=ansi
2316 # Ultrix and OSF/1      -std1
2317 # HP-UX                 -Aa -D_HPUX_SOURCE
2318 # SVR4                  -Xc
2319 # UnixWare 1.2          (cannot use -Xc, since ANSI/POSIX clashes)
2320 for cf_arg in "-DCC_HAS_PROTOS" \
2321         "" \
2322         -qlanglvl=ansi \
2323         -std1 \
2324         -Ae \
2325         "-Aa -D_HPUX_SOURCE" \
2326         -Xc
2327 do
2328
2329 cf_fix_cppflags=no
2330 cf_new_cflags=
2331 cf_new_cppflags=
2332 cf_new_extra_cppflags=
2333
2334 for cf_add_cflags in $cf_arg
2335 do
2336 case $cf_fix_cppflags in
2337 no)
2338         case $cf_add_cflags in #(vi
2339         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2340                 case $cf_add_cflags in
2341                 -D*)
2342                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2343
2344                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2345                                 && test -z "${cf_tst_cflags}" \
2346                                 && cf_fix_cppflags=yes
2347
2348                         if test $cf_fix_cppflags = yes ; then
2349                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2350                                 continue
2351                         elif test "${cf_tst_cflags}" = "\"'" ; then
2352                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2353                                 continue
2354                         fi
2355                         ;;
2356                 esac
2357                 case "$CPPFLAGS" in
2358                 *$cf_add_cflags) #(vi
2359                         ;;
2360                 *) #(vi
2361                         case $cf_add_cflags in #(vi
2362                         -D*)
2363                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2364
2365 CPPFLAGS=`echo "$CPPFLAGS" | \
2366         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2367                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2368
2369                                 ;;
2370                         esac
2371                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2372                         ;;
2373                 esac
2374                 ;;
2375         *)
2376                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2377                 ;;
2378         esac
2379         ;;
2380 yes)
2381         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2382
2383         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2384
2385         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2386                 && test -z "${cf_tst_cflags}" \
2387                 && cf_fix_cppflags=no
2388         ;;
2389 esac
2390 done
2391
2392 if test -n "$cf_new_cflags" ; then
2393
2394         CFLAGS="$CFLAGS $cf_new_cflags"
2395 fi
2396
2397 if test -n "$cf_new_cppflags" ; then
2398
2399         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
2400 fi
2401
2402 if test -n "$cf_new_extra_cppflags" ; then
2403
2404         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2405 fi
2406
2407         cat >conftest.$ac_ext <<_ACEOF
2408 #line 2408 "configure"
2409 #include "confdefs.h"
2410
2411 #ifndef CC_HAS_PROTOS
2412 #if !defined(__STDC__) || (__STDC__ != 1)
2413 choke me
2414 #endif
2415 #endif
2416
2417 int
2418 main ()
2419 {
2420
2421         int test (int i, double x);
2422         struct s1 {int (*f) (int a);};
2423         struct s2 {int (*f) (double a);};
2424   ;
2425   return 0;
2426 }
2427 _ACEOF
2428 rm -f conftest.$ac_objext
2429 if { (eval echo "$as_me:2429: \"$ac_compile\"") >&5
2430   (eval $ac_compile) 2>&5
2431   ac_status=$?
2432   echo "$as_me:2432: \$? = $ac_status" >&5
2433   (exit $ac_status); } &&
2434          { ac_try='test -s conftest.$ac_objext'
2435   { (eval echo "$as_me:2435: \"$ac_try\"") >&5
2436   (eval $ac_try) 2>&5
2437   ac_status=$?
2438   echo "$as_me:2438: \$? = $ac_status" >&5
2439   (exit $ac_status); }; }; then
2440   cf_cv_ansi_cc="$cf_arg"; break
2441 else
2442   echo "$as_me: failed program was:" >&5
2443 cat conftest.$ac_ext >&5
2444 fi
2445 rm -f conftest.$ac_objext conftest.$ac_ext
2446 done
2447 CFLAGS="$cf_save_CFLAGS"
2448 CPPFLAGS="$cf_save_CPPFLAGS"
2449
2450 fi
2451 echo "$as_me:2451: result: $cf_cv_ansi_cc" >&5
2452 echo "${ECHO_T}$cf_cv_ansi_cc" >&6
2453
2454 if test "$cf_cv_ansi_cc" != "no"; then
2455 if test ".$cf_cv_ansi_cc" != ".-DCC_HAS_PROTOS"; then
2456
2457 cf_fix_cppflags=no
2458 cf_new_cflags=
2459 cf_new_cppflags=
2460 cf_new_extra_cppflags=
2461
2462 for cf_add_cflags in $cf_cv_ansi_cc
2463 do
2464 case $cf_fix_cppflags in
2465 no)
2466         case $cf_add_cflags in #(vi
2467         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2468                 case $cf_add_cflags in
2469                 -D*)
2470                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2471
2472                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2473                                 && test -z "${cf_tst_cflags}" \
2474                                 && cf_fix_cppflags=yes
2475
2476                         if test $cf_fix_cppflags = yes ; then
2477                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2478                                 continue
2479                         elif test "${cf_tst_cflags}" = "\"'" ; then
2480                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2481                                 continue
2482                         fi
2483                         ;;
2484                 esac
2485                 case "$CPPFLAGS" in
2486                 *$cf_add_cflags) #(vi
2487                         ;;
2488                 *) #(vi
2489                         case $cf_add_cflags in #(vi
2490                         -D*)
2491                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2492
2493 CPPFLAGS=`echo "$CPPFLAGS" | \
2494         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2495                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2496
2497                                 ;;
2498                         esac
2499                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2500                         ;;
2501                 esac
2502                 ;;
2503         *)
2504                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2505                 ;;
2506         esac
2507         ;;
2508 yes)
2509         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2510
2511         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2512
2513         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2514                 && test -z "${cf_tst_cflags}" \
2515                 && cf_fix_cppflags=no
2516         ;;
2517 esac
2518 done
2519
2520 if test -n "$cf_new_cflags" ; then
2521
2522         CFLAGS="$CFLAGS $cf_new_cflags"
2523 fi
2524
2525 if test -n "$cf_new_cppflags" ; then
2526
2527         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
2528 fi
2529
2530 if test -n "$cf_new_extra_cppflags" ; then
2531
2532         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2533 fi
2534
2535 else
2536         cat >>confdefs.h <<\EOF
2537 #define CC_HAS_PROTOS 1
2538 EOF
2539
2540 fi
2541 fi
2542
2543 if test "$cf_cv_ansi_cc" = "no"; then
2544         { { echo "$as_me:2544: error: Your compiler does not appear to recognize prototypes.
2545 You have the following choices:
2546         a. adjust your compiler options
2547         b. get an up-to-date compiler
2548         c. use a wrapper such as unproto" >&5
2549 echo "$as_me: error: Your compiler does not appear to recognize prototypes.
2550 You have the following choices:
2551         a. adjust your compiler options
2552         b. get an up-to-date compiler
2553         c. use a wrapper such as unproto" >&2;}
2554    { (exit 1); exit 1; }; }
2555 fi
2556
2557 case $cf_cv_system_name in
2558 os2*)
2559     CFLAGS="$CFLAGS -Zmt"
2560     CPPFLAGS="$CPPFLAGS -D__ST_MT_ERRNO__"
2561     CXXFLAGS="$CXXFLAGS -Zmt"
2562     # autoconf's macro sets -Zexe and suffix both, which conflict:w
2563     LDFLAGS="$LDFLAGS -Zmt -Zcrtdll"
2564     ac_cv_exeext=.exe
2565     ;;
2566 esac
2567
2568 PROG_EXT="$EXEEXT"
2569
2570 test -n "$PROG_EXT" && cat >>confdefs.h <<EOF
2571 #define PROG_EXT "$PROG_EXT"
2572 EOF
2573
2574 test "$program_prefix" != NONE &&
2575   program_transform_name="s,^,$program_prefix,;$program_transform_name"
2576 # Use a double $ so make ignores it.
2577 test "$program_suffix" != NONE &&
2578   program_transform_name="s,\$,$program_suffix,;$program_transform_name"
2579 # Double any \ or $.  echo might interpret backslashes.
2580 # By default was `s,x,x', remove it if useless.
2581 cat <<\_ACEOF >conftest.sed
2582 s/[\\$]/&&/g;s/;s,x,x,$//
2583 _ACEOF
2584 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
2585 rm conftest.sed
2586
2587 for ac_prog in mawk gawk nawk awk
2588 do
2589   # Extract the first word of "$ac_prog", so it can be a program name with args.
2590 set dummy $ac_prog; ac_word=$2
2591 echo "$as_me:2591: checking for $ac_word" >&5
2592 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2593 if test "${ac_cv_prog_AWK+set}" = set; then
2594   echo $ECHO_N "(cached) $ECHO_C" >&6
2595 else
2596   if test -n "$AWK"; then
2597   ac_cv_prog_AWK="$AWK" # Let the user override the test.
2598 else
2599   ac_save_IFS=$IFS; IFS=$ac_path_separator
2600 ac_dummy="$PATH"
2601 for ac_dir in $ac_dummy; do
2602   IFS=$ac_save_IFS
2603   test -z "$ac_dir" && ac_dir=.
2604   $as_executable_p "$ac_dir/$ac_word" || continue
2605 ac_cv_prog_AWK="$ac_prog"
2606 echo "$as_me:2606: found $ac_dir/$ac_word" >&5
2607 break
2608 done
2609
2610 fi
2611 fi
2612 AWK=$ac_cv_prog_AWK
2613 if test -n "$AWK"; then
2614   echo "$as_me:2614: result: $AWK" >&5
2615 echo "${ECHO_T}$AWK" >&6
2616 else
2617   echo "$as_me:2617: result: no" >&5
2618 echo "${ECHO_T}no" >&6
2619 fi
2620
2621   test -n "$AWK" && break
2622 done
2623
2624 test -z "$AWK" && { { echo "$as_me:2624: error: No awk program found" >&5
2625 echo "$as_me: error: No awk program found" >&2;}
2626    { (exit 1); exit 1; }; }
2627
2628 echo "$as_me:2628: checking for egrep" >&5
2629 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
2630 if test "${ac_cv_prog_egrep+set}" = set; then
2631   echo $ECHO_N "(cached) $ECHO_C" >&6
2632 else
2633   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
2634     then ac_cv_prog_egrep='grep -E'
2635     else ac_cv_prog_egrep='egrep'
2636     fi
2637 fi
2638 echo "$as_me:2638: result: $ac_cv_prog_egrep" >&5
2639 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
2640  EGREP=$ac_cv_prog_egrep
2641
2642 test -z "$EGREP" && { { echo "$as_me:2642: error: No egrep program found" >&5
2643 echo "$as_me: error: No egrep program found" >&2;}
2644    { (exit 1); exit 1; }; }
2645
2646 # Find a good install program.  We prefer a C program (faster),
2647 # so one script is as good as another.  But avoid the broken or
2648 # incompatible versions:
2649 # SysV /etc/install, /usr/sbin/install
2650 # SunOS /usr/etc/install
2651 # IRIX /sbin/install
2652 # AIX /bin/install
2653 # AmigaOS /C/install, which installs bootblocks on floppy discs
2654 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2655 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2656 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2657 # ./install, which can be erroneously created by make from ./install.sh.
2658 echo "$as_me:2658: checking for a BSD compatible install" >&5
2659 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
2660 if test -z "$INSTALL"; then
2661 if test "${ac_cv_path_install+set}" = set; then
2662   echo $ECHO_N "(cached) $ECHO_C" >&6
2663 else
2664     ac_save_IFS=$IFS; IFS=$ac_path_separator
2665   for ac_dir in $PATH; do
2666     IFS=$ac_save_IFS
2667     # Account for people who put trailing slashes in PATH elements.
2668     case $ac_dir/ in
2669     / | ./ | .// | /cC/* \
2670     | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
2671     | /usr/ucb/* ) ;;
2672     *)
2673       # OSF1 and SCO ODT 3.0 have their own names for install.
2674       # Don't use installbsd from OSF since it installs stuff as root
2675       # by default.
2676       for ac_prog in ginstall scoinst install; do
2677         if $as_executable_p "$ac_dir/$ac_prog"; then
2678           if test $ac_prog = install &&
2679             grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2680             # AIX install.  It has an incompatible calling convention.
2681             :
2682           elif test $ac_prog = install &&
2683             grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2684             # program-specific install script used by HP pwplus--don't use.
2685             :
2686           else
2687             ac_cv_path_install="$ac_dir/$ac_prog -c"
2688             break 2
2689           fi
2690         fi
2691       done
2692       ;;
2693     esac
2694   done
2695
2696 fi
2697   if test "${ac_cv_path_install+set}" = set; then
2698     INSTALL=$ac_cv_path_install
2699   else
2700     # As a last resort, use the slow shell script.  We don't cache a
2701     # path for INSTALL within a source directory, because that will
2702     # break other packages using the cache if that directory is
2703     # removed, or if the path is relative.
2704     INSTALL=$ac_install_sh
2705   fi
2706 fi
2707 echo "$as_me:2707: result: $INSTALL" >&5
2708 echo "${ECHO_T}$INSTALL" >&6
2709
2710 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2711 # It thinks the first close brace ends the variable substitution.
2712 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2713
2714 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
2715
2716 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2717
2718 echo "$as_me:2718: checking whether ln -s works" >&5
2719 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
2720 LN_S=$as_ln_s
2721 if test "$LN_S" = "ln -s"; then
2722   echo "$as_me:2722: result: yes" >&5
2723 echo "${ECHO_T}yes" >&6
2724 else
2725   echo "$as_me:2725: result: no, using $LN_S" >&5
2726 echo "${ECHO_T}no, using $LN_S" >&6
2727 fi
2728
2729 echo "$as_me:2729: checking if $LN_S -f options work" >&5
2730 echo $ECHO_N "checking if $LN_S -f options work... $ECHO_C" >&6
2731
2732 rm -f conf$$.src conf$$dst
2733 echo >conf$$.dst
2734 echo first >conf$$.src
2735 if $LN_S -f conf$$.src conf$$.dst 2>/dev/null; then
2736         cf_prog_ln_sf=yes
2737 else
2738         cf_prog_ln_sf=no
2739 fi
2740 rm -f conf$$.dst conf$$src
2741 echo "$as_me:2741: result: $cf_prog_ln_sf" >&5
2742 echo "${ECHO_T}$cf_prog_ln_sf" >&6
2743
2744 test "$cf_prog_ln_sf" = yes && LN_S="$LN_S -f"
2745
2746 echo "$as_me:2746: checking for long file names" >&5
2747 echo $ECHO_N "checking for long file names... $ECHO_C" >&6
2748 if test "${ac_cv_sys_long_file_names+set}" = set; then
2749   echo $ECHO_N "(cached) $ECHO_C" >&6
2750 else
2751   ac_cv_sys_long_file_names=yes
2752 # Test for long file names in all the places we know might matter:
2753 #      .                the current directory, where building will happen
2754 #      $prefix/lib      where we will be installing things
2755 #      $exec_prefix/lib likewise
2756 # eval it to expand exec_prefix.
2757 #      $TMPDIR          if set, where it might want to write temporary files
2758 # if $TMPDIR is not set:
2759 #      /tmp             where it might want to write temporary files
2760 #      /var/tmp         likewise
2761 #      /usr/tmp         likewise
2762 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
2763   ac_tmpdirs=$TMPDIR
2764 else
2765   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
2766 fi
2767 for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
2768   test -d $ac_dir || continue
2769   test -w $ac_dir || continue # It is less confusing to not echo anything here.
2770   ac_xdir=$ac_dir/cf$$
2771   (umask 077 && mkdir $ac_xdir 2>/dev/null) || continue
2772   ac_tf1=$ac_xdir/conftest9012345
2773   ac_tf2=$ac_xdir/conftest9012346
2774   (echo 1 >$ac_tf1) 2>/dev/null
2775   (echo 2 >$ac_tf2) 2>/dev/null
2776   ac_val=`cat $ac_tf1 2>/dev/null`
2777   if test ! -f $ac_tf1 || test "$ac_val" != 1; then
2778     ac_cv_sys_long_file_names=no
2779     rm -rf $ac_xdir 2>/dev/null
2780     break
2781   fi
2782   rm -rf $ac_xdir 2>/dev/null
2783 done
2784 fi
2785 echo "$as_me:2785: result: $ac_cv_sys_long_file_names" >&5
2786 echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
2787 if test $ac_cv_sys_long_file_names = yes; then
2788
2789 cat >>confdefs.h <<\EOF
2790 #define HAVE_LONG_FILE_NAMES 1
2791 EOF
2792
2793 fi
2794
2795 # if we find pkg-config, check if we should install the ".pc" files.
2796
2797 echo "$as_me:2797: checking if you want to use pkg-config" >&5
2798 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
2799
2800 # Check whether --with-pkg-config or --without-pkg-config was given.
2801 if test "${with_pkg_config+set}" = set; then
2802   withval="$with_pkg_config"
2803   cf_pkg_config=$withval
2804 else
2805   cf_pkg_config=yes
2806 fi;
2807 echo "$as_me:2807: result: $cf_pkg_config" >&5
2808 echo "${ECHO_T}$cf_pkg_config" >&6
2809
2810 case $cf_pkg_config in #(vi
2811 no) #(vi
2812         PKG_CONFIG=none
2813         ;;
2814 yes) #(vi
2815
2816 if test -n "$ac_tool_prefix"; then
2817   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
2818 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
2819 echo "$as_me:2819: checking for $ac_word" >&5
2820 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2821 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
2822   echo $ECHO_N "(cached) $ECHO_C" >&6
2823 else
2824   case $PKG_CONFIG in
2825   [\\/]* | ?:[\\/]*)
2826   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
2827   ;;
2828   *)
2829   ac_save_IFS=$IFS; IFS=$ac_path_separator
2830 ac_dummy="$PATH"
2831 for ac_dir in $ac_dummy; do
2832   IFS=$ac_save_IFS
2833   test -z "$ac_dir" && ac_dir=.
2834   if $as_executable_p "$ac_dir/$ac_word"; then
2835    ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
2836    echo "$as_me:2836: found $ac_dir/$ac_word" >&5
2837    break
2838 fi
2839 done
2840
2841   ;;
2842 esac
2843 fi
2844 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
2845
2846 if test -n "$PKG_CONFIG"; then
2847   echo "$as_me:2847: result: $PKG_CONFIG" >&5
2848 echo "${ECHO_T}$PKG_CONFIG" >&6
2849 else
2850   echo "$as_me:2850: result: no" >&5
2851 echo "${ECHO_T}no" >&6
2852 fi
2853
2854 fi
2855 if test -z "$ac_cv_path_PKG_CONFIG"; then
2856   ac_pt_PKG_CONFIG=$PKG_CONFIG
2857   # Extract the first word of "pkg-config", so it can be a program name with args.
2858 set dummy pkg-config; ac_word=$2
2859 echo "$as_me:2859: checking for $ac_word" >&5
2860 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2861 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
2862   echo $ECHO_N "(cached) $ECHO_C" >&6
2863 else
2864   case $ac_pt_PKG_CONFIG in
2865   [\\/]* | ?:[\\/]*)
2866   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
2867   ;;
2868   *)
2869   ac_save_IFS=$IFS; IFS=$ac_path_separator
2870 ac_dummy="$PATH"
2871 for ac_dir in $ac_dummy; do
2872   IFS=$ac_save_IFS
2873   test -z "$ac_dir" && ac_dir=.
2874   if $as_executable_p "$ac_dir/$ac_word"; then
2875    ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
2876    echo "$as_me:2876: found $ac_dir/$ac_word" >&5
2877    break
2878 fi
2879 done
2880
2881   test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
2882   ;;
2883 esac
2884 fi
2885 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
2886
2887 if test -n "$ac_pt_PKG_CONFIG"; then
2888   echo "$as_me:2888: result: $ac_pt_PKG_CONFIG" >&5
2889 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
2890 else
2891   echo "$as_me:2891: result: no" >&5
2892 echo "${ECHO_T}no" >&6
2893 fi
2894
2895   PKG_CONFIG=$ac_pt_PKG_CONFIG
2896 else
2897   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
2898 fi
2899
2900         ;;
2901 *)
2902         PKG_CONFIG=$withval
2903         ;;
2904 esac
2905
2906 test -z "$PKG_CONFIG" && PKG_CONFIG=none
2907 if test "$PKG_CONFIG" != none ; then
2908
2909 if test "x$prefix" != xNONE; then
2910   cf_path_syntax="$prefix"
2911 else
2912   cf_path_syntax="$ac_default_prefix"
2913 fi
2914
2915 case ".$PKG_CONFIG" in #(vi
2916 .\$\(*\)*|.\'*\'*) #(vi
2917   ;;
2918 ..|./*|.\\*) #(vi
2919   ;;
2920 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
2921   ;;
2922 .\${*prefix}*) #(vi
2923   eval PKG_CONFIG="$PKG_CONFIG"
2924   case ".$PKG_CONFIG" in #(vi
2925   .NONE/*)
2926     PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
2927     ;;
2928   esac
2929   ;; #(vi
2930 .no|.NONE/*)
2931   PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
2932   ;;
2933 *)
2934   { { echo "$as_me:2934: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
2935 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
2936    { (exit 1); exit 1; }; }
2937   ;;
2938 esac
2939
2940 fi
2941
2942 if test "$PKG_CONFIG" != none ; then
2943         echo "$as_me:2943: checking if we should install .pc files for $PKG_CONFIG" >&5
2944 echo $ECHO_N "checking if we should install .pc files for $PKG_CONFIG... $ECHO_C" >&6
2945
2946         # Leave this as something that can be overridden in the environment.
2947         if test -z "$PKG_CONFIG_LIBDIR" ; then
2948                 PKG_CONFIG_LIBDIR=`echo "$PKG_CONFIG" | sed -e 's,/[^/]*/[^/]*$,,'`/lib/pkgconfig
2949         fi
2950         PKG_CONFIG_LIBDIR=`echo "$PKG_CONFIG_LIBDIR" | sed -e 's/^://' -e 's/:.*//'`
2951         if test -n "$PKG_CONFIG_LIBDIR" && test -d "$PKG_CONFIG_LIBDIR" ; then
2952
2953 # Check whether --enable-pc-files or --disable-pc-files was given.
2954 if test "${enable_pc_files+set}" = set; then
2955   enableval="$enable_pc_files"
2956   enable_pc_files=$enableval
2957 else
2958   enable_pc_files=no
2959 fi;
2960                 echo "$as_me:2960: result: $enable_pc_files" >&5
2961 echo "${ECHO_T}$enable_pc_files" >&6
2962         else
2963                 echo "$as_me:2963: result: no" >&5
2964 echo "${ECHO_T}no" >&6
2965                 { echo "$as_me:2965: WARNING: did not find library $PKG_CONFIG_LIBDIR" >&5
2966 echo "$as_me: WARNING: did not find library $PKG_CONFIG_LIBDIR" >&2;}
2967                 enable_pc_files=no
2968         fi
2969 fi
2970
2971 echo "$as_me:2971: checking if you want to build test-programs" >&5
2972 echo $ECHO_N "checking if you want to build test-programs... $ECHO_C" >&6
2973
2974 # Check whether --with-tests or --without-tests was given.
2975 if test "${with_tests+set}" = set; then
2976   withval="$with_tests"
2977   cf_with_tests=$withval
2978 else
2979   cf_with_tests=yes
2980 fi;
2981 echo "$as_me:2981: result: $cf_with_tests" >&5
2982 echo "${ECHO_T}$cf_with_tests" >&6
2983
2984 echo "$as_me:2984: checking if we should assume mixed-case filenames" >&5
2985 echo $ECHO_N "checking if we should assume mixed-case filenames... $ECHO_C" >&6
2986
2987 # Check whether --enable-mixed-case or --disable-mixed-case was given.
2988 if test "${enable_mixed_case+set}" = set; then
2989   enableval="$enable_mixed_case"
2990   enable_mixedcase=$enableval
2991 else
2992   enable_mixedcase=auto
2993 fi;
2994 echo "$as_me:2994: result: $enable_mixedcase" >&5
2995 echo "${ECHO_T}$enable_mixedcase" >&6
2996 if test "$enable_mixedcase" = "auto" ; then
2997
2998 echo "$as_me:2998: checking if filesystem supports mixed-case filenames" >&5
2999 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
3000 if test "${cf_cv_mixedcase+set}" = set; then
3001   echo $ECHO_N "(cached) $ECHO_C" >&6
3002 else
3003
3004 if test "$cross_compiling" = yes ; then
3005         case $target_alias in #(vi
3006         *-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-mingw32*|*-uwin*) #(vi
3007                 cf_cv_mixedcase=no
3008                 ;;
3009         *)
3010                 cf_cv_mixedcase=yes
3011                 ;;
3012         esac
3013 else
3014         rm -f conftest CONFTEST
3015         echo test >conftest
3016         if test -f CONFTEST ; then
3017                 cf_cv_mixedcase=no
3018         else
3019                 cf_cv_mixedcase=yes
3020         fi
3021         rm -f conftest CONFTEST
3022 fi
3023
3024 fi
3025 echo "$as_me:3025: result: $cf_cv_mixedcase" >&5
3026 echo "${ECHO_T}$cf_cv_mixedcase" >&6
3027 test "$cf_cv_mixedcase" = yes && cat >>confdefs.h <<\EOF
3028 #define MIXEDCASE_FILENAMES 1
3029 EOF
3030
3031 else
3032     cf_cv_mixedcase=$enable_mixedcase
3033     if test "$enable_mixedcase" = "yes" ; then
3034         cat >>confdefs.h <<\EOF
3035 #define MIXEDCASE_FILENAMES 1
3036 EOF
3037
3038     fi
3039 fi
3040
3041 # do this after mixed-case option (tags/TAGS is not as important as tic).
3042 echo "$as_me:3042: checking whether ${MAKE-make} sets \${MAKE}" >&5
3043 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
3044 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
3045 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
3046   echo $ECHO_N "(cached) $ECHO_C" >&6
3047 else
3048   cat >conftest.make <<\EOF
3049 all:
3050         @echo 'ac_maketemp="${MAKE}"'
3051 EOF
3052 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3053 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
3054 if test -n "$ac_maketemp"; then
3055   eval ac_cv_prog_make_${ac_make}_set=yes
3056 else
3057   eval ac_cv_prog_make_${ac_make}_set=no
3058 fi
3059 rm -f conftest.make
3060 fi
3061 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
3062   echo "$as_me:3062: result: yes" >&5
3063 echo "${ECHO_T}yes" >&6
3064   SET_MAKE=
3065 else
3066   echo "$as_me:3066: result: no" >&5
3067 echo "${ECHO_T}no" >&6
3068   SET_MAKE="MAKE=${MAKE-make}"
3069 fi
3070
3071 for ac_prog in exctags ctags
3072 do
3073   # Extract the first word of "$ac_prog", so it can be a program name with args.
3074 set dummy $ac_prog; ac_word=$2
3075 echo "$as_me:3075: checking for $ac_word" >&5
3076 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3077 if test "${ac_cv_prog_CTAGS+set}" = set; then
3078   echo $ECHO_N "(cached) $ECHO_C" >&6
3079 else
3080   if test -n "$CTAGS"; then
3081   ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
3082 else
3083   ac_save_IFS=$IFS; IFS=$ac_path_separator
3084 ac_dummy="$PATH"
3085 for ac_dir in $ac_dummy; do
3086   IFS=$ac_save_IFS
3087   test -z "$ac_dir" && ac_dir=.
3088   $as_executable_p "$ac_dir/$ac_word" || continue
3089 ac_cv_prog_CTAGS="$ac_prog"
3090 echo "$as_me:3090: found $ac_dir/$ac_word" >&5
3091 break
3092 done
3093
3094 fi
3095 fi
3096 CTAGS=$ac_cv_prog_CTAGS
3097 if test -n "$CTAGS"; then
3098   echo "$as_me:3098: result: $CTAGS" >&5
3099 echo "${ECHO_T}$CTAGS" >&6
3100 else
3101   echo "$as_me:3101: result: no" >&5
3102 echo "${ECHO_T}no" >&6
3103 fi
3104
3105   test -n "$CTAGS" && break
3106 done
3107
3108 for ac_prog in exetags etags
3109 do
3110   # Extract the first word of "$ac_prog", so it can be a program name with args.
3111 set dummy $ac_prog; ac_word=$2
3112 echo "$as_me:3112: checking for $ac_word" >&5
3113 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3114 if test "${ac_cv_prog_ETAGS+set}" = set; then
3115   echo $ECHO_N "(cached) $ECHO_C" >&6
3116 else
3117   if test -n "$ETAGS"; then
3118   ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
3119 else
3120   ac_save_IFS=$IFS; IFS=$ac_path_separator
3121 ac_dummy="$PATH"
3122 for ac_dir in $ac_dummy; do
3123   IFS=$ac_save_IFS
3124   test -z "$ac_dir" && ac_dir=.
3125   $as_executable_p "$ac_dir/$ac_word" || continue
3126 ac_cv_prog_ETAGS="$ac_prog"
3127 echo "$as_me:3127: found $ac_dir/$ac_word" >&5
3128 break
3129 done
3130
3131 fi
3132 fi
3133 ETAGS=$ac_cv_prog_ETAGS
3134 if test -n "$ETAGS"; then
3135   echo "$as_me:3135: result: $ETAGS" >&5
3136 echo "${ECHO_T}$ETAGS" >&6
3137 else
3138   echo "$as_me:3138: result: no" >&5
3139 echo "${ECHO_T}no" >&6
3140 fi
3141
3142   test -n "$ETAGS" && break
3143 done
3144
3145 # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
3146 set dummy ${CTAGS:-ctags}; ac_word=$2
3147 echo "$as_me:3147: checking for $ac_word" >&5
3148 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3149 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
3150   echo $ECHO_N "(cached) $ECHO_C" >&6
3151 else
3152   if test -n "$MAKE_LOWER_TAGS"; then
3153   ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
3154 else
3155   ac_save_IFS=$IFS; IFS=$ac_path_separator
3156 ac_dummy="$PATH"
3157 for ac_dir in $ac_dummy; do
3158   IFS=$ac_save_IFS
3159   test -z "$ac_dir" && ac_dir=.
3160   $as_executable_p "$ac_dir/$ac_word" || continue
3161 ac_cv_prog_MAKE_LOWER_TAGS="yes"
3162 echo "$as_me:3162: found $ac_dir/$ac_word" >&5
3163 break
3164 done
3165
3166   test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
3167 fi
3168 fi
3169 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
3170 if test -n "$MAKE_LOWER_TAGS"; then
3171   echo "$as_me:3171: result: $MAKE_LOWER_TAGS" >&5
3172 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
3173 else
3174   echo "$as_me:3174: result: no" >&5
3175 echo "${ECHO_T}no" >&6
3176 fi
3177
3178 if test "$cf_cv_mixedcase" = yes ; then
3179         # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
3180 set dummy ${ETAGS:-etags}; ac_word=$2
3181 echo "$as_me:3181: checking for $ac_word" >&5
3182 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3183 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
3184   echo $ECHO_N "(cached) $ECHO_C" >&6
3185 else
3186   if test -n "$MAKE_UPPER_TAGS"; then
3187   ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
3188 else
3189   ac_save_IFS=$IFS; IFS=$ac_path_separator
3190 ac_dummy="$PATH"
3191 for ac_dir in $ac_dummy; do
3192   IFS=$ac_save_IFS
3193   test -z "$ac_dir" && ac_dir=.
3194   $as_executable_p "$ac_dir/$ac_word" || continue
3195 ac_cv_prog_MAKE_UPPER_TAGS="yes"
3196 echo "$as_me:3196: found $ac_dir/$ac_word" >&5
3197 break
3198 done
3199
3200   test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
3201 fi
3202 fi
3203 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
3204 if test -n "$MAKE_UPPER_TAGS"; then
3205   echo "$as_me:3205: result: $MAKE_UPPER_TAGS" >&5
3206 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
3207 else
3208   echo "$as_me:3208: result: no" >&5
3209 echo "${ECHO_T}no" >&6
3210 fi
3211
3212 else
3213         MAKE_UPPER_TAGS=no
3214 fi
3215
3216 if test "$MAKE_UPPER_TAGS" = yes ; then
3217         MAKE_UPPER_TAGS=
3218 else
3219         MAKE_UPPER_TAGS="#"
3220 fi
3221
3222 if test "$MAKE_LOWER_TAGS" = yes ; then
3223         MAKE_LOWER_TAGS=
3224 else
3225         MAKE_LOWER_TAGS="#"
3226 fi
3227
3228 echo "$as_me:3228: checking for makeflags variable" >&5
3229 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
3230 if test "${cf_cv_makeflags+set}" = set; then
3231   echo $ECHO_N "(cached) $ECHO_C" >&6
3232 else
3233
3234         cf_cv_makeflags=''
3235         for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
3236         do
3237                 cat >cf_makeflags.tmp <<CF_EOF
3238 SHELL = /bin/sh
3239 all :
3240         @ echo '.$cf_option'
3241 CF_EOF
3242                 cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp 2>/dev/null | fgrep -v "ing directory" | sed -e 's,[    ]*$,,'`
3243                 case "$cf_result" in
3244                 .*k)
3245                         cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`
3246                         case "$cf_result" in
3247                         .*CC=*) cf_cv_makeflags=
3248                                 ;;
3249                         *)      cf_cv_makeflags=$cf_option
3250                                 ;;
3251                         esac
3252                         break
3253                         ;;
3254                 .-)     ;;
3255                 *)      echo "given option \"$cf_option\", no match \"$cf_result\""
3256                         ;;
3257                 esac
3258         done
3259         rm -f cf_makeflags.tmp
3260
3261 fi
3262 echo "$as_me:3262: result: $cf_cv_makeflags" >&5
3263 echo "${ECHO_T}$cf_cv_makeflags" >&6
3264
3265 if test -n "$ac_tool_prefix"; then
3266   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3267 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3268 echo "$as_me:3268: checking for $ac_word" >&5
3269 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3270 if test "${ac_cv_prog_RANLIB+set}" = set; then
3271   echo $ECHO_N "(cached) $ECHO_C" >&6
3272 else
3273   if test -n "$RANLIB"; then
3274   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3275 else
3276   ac_save_IFS=$IFS; IFS=$ac_path_separator
3277 ac_dummy="$PATH"
3278 for ac_dir in $ac_dummy; do
3279   IFS=$ac_save_IFS
3280   test -z "$ac_dir" && ac_dir=.
3281   $as_executable_p "$ac_dir/$ac_word" || continue
3282 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3283 echo "$as_me:3283: found $ac_dir/$ac_word" >&5
3284 break
3285 done
3286
3287 fi
3288 fi
3289 RANLIB=$ac_cv_prog_RANLIB
3290 if test -n "$RANLIB"; then
3291   echo "$as_me:3291: result: $RANLIB" >&5
3292 echo "${ECHO_T}$RANLIB" >&6
3293 else
3294   echo "$as_me:3294: result: no" >&5
3295 echo "${ECHO_T}no" >&6
3296 fi
3297
3298 fi
3299 if test -z "$ac_cv_prog_RANLIB"; then
3300   ac_ct_RANLIB=$RANLIB
3301   # Extract the first word of "ranlib", so it can be a program name with args.
3302 set dummy ranlib; ac_word=$2
3303 echo "$as_me:3303: checking for $ac_word" >&5
3304 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3305 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
3306   echo $ECHO_N "(cached) $ECHO_C" >&6
3307 else
3308   if test -n "$ac_ct_RANLIB"; then
3309   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
3310 else
3311   ac_save_IFS=$IFS; IFS=$ac_path_separator
3312 ac_dummy="$PATH"
3313 for ac_dir in $ac_dummy; do
3314   IFS=$ac_save_IFS
3315   test -z "$ac_dir" && ac_dir=.
3316   $as_executable_p "$ac_dir/$ac_word" || continue
3317 ac_cv_prog_ac_ct_RANLIB="ranlib"
3318 echo "$as_me:3318: found $ac_dir/$ac_word" >&5
3319 break
3320 done
3321
3322   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
3323 fi
3324 fi
3325 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3326 if test -n "$ac_ct_RANLIB"; then
3327   echo "$as_me:3327: result: $ac_ct_RANLIB" >&5
3328 echo "${ECHO_T}$ac_ct_RANLIB" >&6
3329 else
3330   echo "$as_me:3330: result: no" >&5
3331 echo "${ECHO_T}no" >&6
3332 fi
3333
3334   RANLIB=$ac_ct_RANLIB
3335 else
3336   RANLIB="$ac_cv_prog_RANLIB"
3337 fi
3338
3339 if test -n "$ac_tool_prefix"; then
3340   # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
3341 set dummy ${ac_tool_prefix}ld; ac_word=$2
3342 echo "$as_me:3342: checking for $ac_word" >&5
3343 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3344 if test "${ac_cv_prog_LD+set}" = set; then
3345   echo $ECHO_N "(cached) $ECHO_C" >&6
3346 else
3347   if test -n "$LD"; then
3348   ac_cv_prog_LD="$LD" # Let the user override the test.
3349 else
3350   ac_save_IFS=$IFS; IFS=$ac_path_separator
3351 ac_dummy="$PATH"
3352 for ac_dir in $ac_dummy; do
3353   IFS=$ac_save_IFS
3354   test -z "$ac_dir" && ac_dir=.
3355   $as_executable_p "$ac_dir/$ac_word" || continue
3356 ac_cv_prog_LD="${ac_tool_prefix}ld"
3357 echo "$as_me:3357: found $ac_dir/$ac_word" >&5
3358 break
3359 done
3360
3361 fi
3362 fi
3363 LD=$ac_cv_prog_LD
3364 if test -n "$LD"; then
3365   echo "$as_me:3365: result: $LD" >&5
3366 echo "${ECHO_T}$LD" >&6
3367 else
3368   echo "$as_me:3368: result: no" >&5
3369 echo "${ECHO_T}no" >&6
3370 fi
3371
3372 fi
3373 if test -z "$ac_cv_prog_LD"; then
3374   ac_ct_LD=$LD
3375   # Extract the first word of "ld", so it can be a program name with args.
3376 set dummy ld; ac_word=$2
3377 echo "$as_me:3377: checking for $ac_word" >&5
3378 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3379 if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
3380   echo $ECHO_N "(cached) $ECHO_C" >&6
3381 else
3382   if test -n "$ac_ct_LD"; then
3383   ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
3384 else
3385   ac_save_IFS=$IFS; IFS=$ac_path_separator
3386 ac_dummy="$PATH"
3387 for ac_dir in $ac_dummy; do
3388   IFS=$ac_save_IFS
3389   test -z "$ac_dir" && ac_dir=.
3390   $as_executable_p "$ac_dir/$ac_word" || continue
3391 ac_cv_prog_ac_ct_LD="ld"
3392 echo "$as_me:3392: found $ac_dir/$ac_word" >&5
3393 break
3394 done
3395
3396   test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
3397 fi
3398 fi
3399 ac_ct_LD=$ac_cv_prog_ac_ct_LD
3400 if test -n "$ac_ct_LD"; then
3401   echo "$as_me:3401: result: $ac_ct_LD" >&5
3402 echo "${ECHO_T}$ac_ct_LD" >&6
3403 else
3404   echo "$as_me:3404: result: no" >&5
3405 echo "${ECHO_T}no" >&6
3406 fi
3407
3408   LD=$ac_ct_LD
3409 else
3410   LD="$ac_cv_prog_LD"
3411 fi
3412
3413 if test -n "$ac_tool_prefix"; then
3414   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
3415 set dummy ${ac_tool_prefix}ar; ac_word=$2
3416 echo "$as_me:3416: checking for $ac_word" >&5
3417 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3418 if test "${ac_cv_prog_AR+set}" = set; then
3419   echo $ECHO_N "(cached) $ECHO_C" >&6
3420 else
3421   if test -n "$AR"; then
3422   ac_cv_prog_AR="$AR" # Let the user override the test.
3423 else
3424   ac_save_IFS=$IFS; IFS=$ac_path_separator
3425 ac_dummy="$PATH"
3426 for ac_dir in $ac_dummy; do
3427   IFS=$ac_save_IFS
3428   test -z "$ac_dir" && ac_dir=.
3429   $as_executable_p "$ac_dir/$ac_word" || continue
3430 ac_cv_prog_AR="${ac_tool_prefix}ar"
3431 echo "$as_me:3431: found $ac_dir/$ac_word" >&5
3432 break
3433 done
3434
3435 fi
3436 fi
3437 AR=$ac_cv_prog_AR
3438 if test -n "$AR"; then
3439   echo "$as_me:3439: result: $AR" >&5
3440 echo "${ECHO_T}$AR" >&6
3441 else
3442   echo "$as_me:3442: result: no" >&5
3443 echo "${ECHO_T}no" >&6
3444 fi
3445
3446 fi
3447 if test -z "$ac_cv_prog_AR"; then
3448   ac_ct_AR=$AR
3449   # Extract the first word of "ar", so it can be a program name with args.
3450 set dummy ar; ac_word=$2
3451 echo "$as_me:3451: checking for $ac_word" >&5
3452 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3453 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
3454   echo $ECHO_N "(cached) $ECHO_C" >&6
3455 else
3456   if test -n "$ac_ct_AR"; then
3457   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
3458 else
3459   ac_save_IFS=$IFS; IFS=$ac_path_separator
3460 ac_dummy="$PATH"
3461 for ac_dir in $ac_dummy; do
3462   IFS=$ac_save_IFS
3463   test -z "$ac_dir" && ac_dir=.
3464   $as_executable_p "$ac_dir/$ac_word" || continue
3465 ac_cv_prog_ac_ct_AR="ar"
3466 echo "$as_me:3466: found $ac_dir/$ac_word" >&5
3467 break
3468 done
3469
3470   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
3471 fi
3472 fi
3473 ac_ct_AR=$ac_cv_prog_ac_ct_AR
3474 if test -n "$ac_ct_AR"; then
3475   echo "$as_me:3475: result: $ac_ct_AR" >&5
3476 echo "${ECHO_T}$ac_ct_AR" >&6
3477 else
3478   echo "$as_me:3478: result: no" >&5
3479 echo "${ECHO_T}no" >&6
3480 fi
3481
3482   AR=$ac_ct_AR
3483 else
3484   AR="$ac_cv_prog_AR"
3485 fi
3486
3487 if test -n "$ac_tool_prefix"; then
3488   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
3489 set dummy ${ac_tool_prefix}ar; ac_word=$2
3490 echo "$as_me:3490: checking for $ac_word" >&5
3491 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3492 if test "${ac_cv_prog_AR+set}" = set; then
3493   echo $ECHO_N "(cached) $ECHO_C" >&6
3494 else
3495   if test -n "$AR"; then
3496   ac_cv_prog_AR="$AR" # Let the user override the test.
3497 else
3498   ac_save_IFS=$IFS; IFS=$ac_path_separator
3499 ac_dummy="$PATH"
3500 for ac_dir in $ac_dummy; do
3501   IFS=$ac_save_IFS
3502   test -z "$ac_dir" && ac_dir=.
3503   $as_executable_p "$ac_dir/$ac_word" || continue
3504 ac_cv_prog_AR="${ac_tool_prefix}ar"
3505 echo "$as_me:3505: found $ac_dir/$ac_word" >&5
3506 break
3507 done
3508
3509 fi
3510 fi
3511 AR=$ac_cv_prog_AR
3512 if test -n "$AR"; then
3513   echo "$as_me:3513: result: $AR" >&5
3514 echo "${ECHO_T}$AR" >&6
3515 else
3516   echo "$as_me:3516: result: no" >&5
3517 echo "${ECHO_T}no" >&6
3518 fi
3519
3520 fi
3521 if test -z "$ac_cv_prog_AR"; then
3522   ac_ct_AR=$AR
3523   # Extract the first word of "ar", so it can be a program name with args.
3524 set dummy ar; ac_word=$2
3525 echo "$as_me:3525: checking for $ac_word" >&5
3526 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3527 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
3528   echo $ECHO_N "(cached) $ECHO_C" >&6
3529 else
3530   if test -n "$ac_ct_AR"; then
3531   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
3532 else
3533   ac_save_IFS=$IFS; IFS=$ac_path_separator
3534 ac_dummy="$PATH"
3535 for ac_dir in $ac_dummy; do
3536   IFS=$ac_save_IFS
3537   test -z "$ac_dir" && ac_dir=.
3538   $as_executable_p "$ac_dir/$ac_word" || continue
3539 ac_cv_prog_ac_ct_AR="ar"
3540 echo "$as_me:3540: found $ac_dir/$ac_word" >&5
3541 break
3542 done
3543
3544   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
3545 fi
3546 fi
3547 ac_ct_AR=$ac_cv_prog_ac_ct_AR
3548 if test -n "$ac_ct_AR"; then
3549   echo "$as_me:3549: result: $ac_ct_AR" >&5
3550 echo "${ECHO_T}$ac_ct_AR" >&6
3551 else
3552   echo "$as_me:3552: result: no" >&5
3553 echo "${ECHO_T}no" >&6
3554 fi
3555
3556   AR=$ac_ct_AR
3557 else
3558   AR="$ac_cv_prog_AR"
3559 fi
3560
3561 echo "$as_me:3561: checking for options to update archives" >&5
3562 echo $ECHO_N "checking for options to update archives... $ECHO_C" >&6
3563 if test "${cf_cv_ar_flags+set}" = set; then
3564   echo $ECHO_N "(cached) $ECHO_C" >&6
3565 else
3566
3567         cf_cv_ar_flags=unknown
3568         for cf_ar_flags in -curv curv -crv crv -cqv cqv -rv rv
3569         do
3570
3571                 # check if $ARFLAGS already contains this choice
3572                 if test "x$ARFLAGS" != "x" ; then
3573                         cf_check_ar_flags=`echo "x$ARFLAGS" | sed -e "s/$cf_ar_flags\$//" -e "s/$cf_ar_flags / /"`
3574                         if test "x$ARFLAGS" != "$cf_check_ar_flags" ; then
3575                                 cf_cv_ar_flags=
3576                                 break
3577                         fi
3578                 fi
3579
3580                 rm -f conftest.$ac_cv_objext
3581                 rm -f conftest.a
3582
3583                 cat >conftest.$ac_ext <<EOF
3584 #line 3584 "configure"
3585 int     testdata[3] = { 123, 456, 789 };
3586 EOF
3587                 if { (eval echo "$as_me:3587: \"$ac_compile\"") >&5
3588   (eval $ac_compile) 2>&5
3589   ac_status=$?
3590   echo "$as_me:3590: \$? = $ac_status" >&5
3591   (exit $ac_status); } ; then
3592                         echo "$AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext" >&5
3593                         $AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext 2>&5 1>/dev/null
3594                         if test -f conftest.a ; then
3595                                 cf_cv_ar_flags=$cf_ar_flags
3596                                 break
3597                         fi
3598                 else
3599                         test -n "$verbose" && echo "    cannot compile test-program" 1>&6
3600
3601 echo "${as_me:-configure}:3601: testing cannot compile test-program ..." 1>&5
3602
3603                         break
3604                 fi
3605         done
3606         rm -f conftest.a conftest.$ac_ext conftest.$ac_cv_objext
3607
3608 fi
3609 echo "$as_me:3609: result: $cf_cv_ar_flags" >&5
3610 echo "${ECHO_T}$cf_cv_ar_flags" >&6
3611
3612 if test -n "$ARFLAGS" ; then
3613         if test -n "$cf_cv_ar_flags" ; then
3614                 ARFLAGS="$ARFLAGS $cf_cv_ar_flags"
3615         fi
3616 else
3617         ARFLAGS=$cf_cv_ar_flags
3618 fi
3619
3620 echo "$as_me:3620: checking if you have specified an install-prefix" >&5
3621 echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
3622
3623 # Check whether --with-install-prefix or --without-install-prefix was given.
3624 if test "${with_install_prefix+set}" = set; then
3625   withval="$with_install_prefix"
3626   case "$withval" in #(vi
3627         yes|no) #(vi
3628                 ;;
3629         *)      DESTDIR="$withval"
3630                 ;;
3631         esac
3632 fi;
3633 echo "$as_me:3633: result: $DESTDIR" >&5
3634 echo "${ECHO_T}$DESTDIR" >&6
3635
3636 ###############################################################################
3637
3638 # If we're cross-compiling, allow the user to override the tools and their
3639 # options.  The configure script is oriented toward identifying the host
3640 # compiler, etc., but we need a build compiler to generate parts of the source.
3641
3642 if test "$cross_compiling" = yes ; then
3643
3644         # defaults that we might want to override
3645         : ${BUILD_CFLAGS:=''}
3646         : ${BUILD_CPPFLAGS:=''}
3647         : ${BUILD_LDFLAGS:=''}
3648         : ${BUILD_LIBS:=''}
3649         : ${BUILD_EXEEXT:='$x'}
3650         : ${BUILD_OBJEXT:='o'}
3651
3652 # Check whether --with-build-cc or --without-build-cc was given.
3653 if test "${with_build_cc+set}" = set; then
3654   withval="$with_build_cc"
3655   BUILD_CC="$withval"
3656 else
3657   for ac_prog in gcc cc cl
3658 do
3659   # Extract the first word of "$ac_prog", so it can be a program name with args.
3660 set dummy $ac_prog; ac_word=$2
3661 echo "$as_me:3661: checking for $ac_word" >&5
3662 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3663 if test "${ac_cv_prog_BUILD_CC+set}" = set; then
3664   echo $ECHO_N "(cached) $ECHO_C" >&6
3665 else
3666   if test -n "$BUILD_CC"; then
3667   ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
3668 else
3669   ac_save_IFS=$IFS; IFS=$ac_path_separator
3670 ac_dummy="$PATH"
3671 for ac_dir in $ac_dummy; do
3672   IFS=$ac_save_IFS
3673   test -z "$ac_dir" && ac_dir=.
3674   $as_executable_p "$ac_dir/$ac_word" || continue
3675 ac_cv_prog_BUILD_CC="$ac_prog"
3676 echo "$as_me:3676: found $ac_dir/$ac_word" >&5
3677 break
3678 done
3679
3680 fi
3681 fi
3682 BUILD_CC=$ac_cv_prog_BUILD_CC
3683 if test -n "$BUILD_CC"; then
3684   echo "$as_me:3684: result: $BUILD_CC" >&5
3685 echo "${ECHO_T}$BUILD_CC" >&6
3686 else
3687   echo "$as_me:3687: result: no" >&5
3688 echo "${ECHO_T}no" >&6
3689 fi
3690
3691   test -n "$BUILD_CC" && break
3692 done
3693
3694 fi;
3695         echo "$as_me:3695: checking for native build C compiler" >&5
3696 echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
3697         echo "$as_me:3697: result: $BUILD_CC" >&5
3698 echo "${ECHO_T}$BUILD_CC" >&6
3699
3700         echo "$as_me:3700: checking for native build C preprocessor" >&5
3701 echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
3702
3703 # Check whether --with-build-cpp or --without-build-cpp was given.
3704 if test "${with_build_cpp+set}" = set; then
3705   withval="$with_build_cpp"
3706   BUILD_CPP="$withval"
3707 else
3708   BUILD_CPP='${BUILD_CC} -E'
3709 fi;
3710         echo "$as_me:3710: result: $BUILD_CPP" >&5
3711 echo "${ECHO_T}$BUILD_CPP" >&6
3712
3713         echo "$as_me:3713: checking for native build C flags" >&5
3714 echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
3715
3716 # Check whether --with-build-cflags or --without-build-cflags was given.
3717 if test "${with_build_cflags+set}" = set; then
3718   withval="$with_build_cflags"
3719   BUILD_CFLAGS="$withval"
3720 fi;
3721         echo "$as_me:3721: result: $BUILD_CFLAGS" >&5
3722 echo "${ECHO_T}$BUILD_CFLAGS" >&6
3723
3724         echo "$as_me:3724: checking for native build C preprocessor-flags" >&5
3725 echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
3726
3727 # Check whether --with-build-cppflags or --without-build-cppflags was given.
3728 if test "${with_build_cppflags+set}" = set; then
3729   withval="$with_build_cppflags"
3730   BUILD_CPPFLAGS="$withval"
3731 fi;
3732         echo "$as_me:3732: result: $BUILD_CPPFLAGS" >&5
3733 echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
3734
3735         echo "$as_me:3735: checking for native build linker-flags" >&5
3736 echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
3737
3738 # Check whether --with-build-ldflags or --without-build-ldflags was given.
3739 if test "${with_build_ldflags+set}" = set; then
3740   withval="$with_build_ldflags"
3741   BUILD_LDFLAGS="$withval"
3742 fi;
3743         echo "$as_me:3743: result: $BUILD_LDFLAGS" >&5
3744 echo "${ECHO_T}$BUILD_LDFLAGS" >&6
3745
3746         echo "$as_me:3746: checking for native build linker-libraries" >&5
3747 echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
3748
3749 # Check whether --with-build-libs or --without-build-libs was given.
3750 if test "${with_build_libs+set}" = set; then
3751   withval="$with_build_libs"
3752   BUILD_LIBS="$withval"
3753 fi;
3754         echo "$as_me:3754: result: $BUILD_LIBS" >&5
3755 echo "${ECHO_T}$BUILD_LIBS" >&6
3756
3757         # this assumes we're on Unix.
3758         BUILD_EXEEXT=
3759         BUILD_OBJEXT=o
3760
3761         : ${BUILD_CC:='${CC}'}
3762
3763         if ( test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '${CC}' ) ; then
3764                 { { echo "$as_me:3764: error: Cross-build requires two compilers.
3765 Use --with-build-cc to specify the native compiler." >&5
3766 echo "$as_me: error: Cross-build requires two compilers.
3767 Use --with-build-cc to specify the native compiler." >&2;}
3768    { (exit 1); exit 1; }; }
3769         fi
3770
3771 else
3772         : ${BUILD_CC:='${CC}'}
3773         : ${BUILD_CPP:='${CPP}'}
3774         : ${BUILD_CFLAGS:='${CFLAGS}'}
3775         : ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
3776         : ${BUILD_LDFLAGS:='${LDFLAGS}'}
3777         : ${BUILD_LIBS:='${LIBS}'}
3778         : ${BUILD_EXEEXT:='$x'}
3779         : ${BUILD_OBJEXT:='o'}
3780 fi
3781
3782 ###############################################################################
3783
3784 ### Options to allow the user to specify the set of libraries which are used.
3785 ### Use "--without-normal --with-shared" to allow the default model to be
3786 ### shared, for example.
3787 cf_list_models=""
3788
3789 echo "$as_me:3789: checking if you want to build shared C-objects" >&5
3790 echo $ECHO_N "checking if you want to build shared C-objects... $ECHO_C" >&6
3791
3792 # Check whether --with-shared or --without-shared was given.
3793 if test "${with_shared+set}" = set; then
3794   withval="$with_shared"
3795   with_shared=$withval
3796 else
3797   with_shared=no
3798 fi;
3799 echo "$as_me:3799: result: $with_shared" >&5
3800 echo "${ECHO_T}$with_shared" >&6
3801 test "$with_shared" = "yes" && cf_list_models="$cf_list_models shared"
3802
3803 echo "$as_me:3803: checking for specified models" >&5
3804 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
3805 test -z "$cf_list_models" && cf_list_models=normal
3806 echo "$as_me:3806: result: $cf_list_models" >&5
3807 echo "${ECHO_T}$cf_list_models" >&6
3808
3809 ### Use the first model as the default, and save its suffix for use in building
3810 ### up test-applications.
3811 echo "$as_me:3811: checking for default model" >&5
3812 echo $ECHO_N "checking for default model... $ECHO_C" >&6
3813 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
3814 echo "$as_me:3814: result: $DFT_LWR_MODEL" >&5
3815 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
3816
3817 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
3818
3819 echo "$as_me:3819: checking for specific curses-directory" >&5
3820 echo $ECHO_N "checking for specific curses-directory... $ECHO_C" >&6
3821
3822 # Check whether --with-curses-dir or --without-curses-dir was given.
3823 if test "${with_curses_dir+set}" = set; then
3824   withval="$with_curses_dir"
3825   cf_cv_curses_dir=$withval
3826 else
3827   cf_cv_curses_dir=no
3828 fi;
3829 echo "$as_me:3829: result: $cf_cv_curses_dir" >&5
3830 echo "${ECHO_T}$cf_cv_curses_dir" >&6
3831
3832 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
3833 then
3834
3835 if test "x$prefix" != xNONE; then
3836   cf_path_syntax="$prefix"
3837 else
3838   cf_path_syntax="$ac_default_prefix"
3839 fi
3840
3841 case ".$withval" in #(vi
3842 .\$\(*\)*|.\'*\'*) #(vi
3843   ;;
3844 ..|./*|.\\*) #(vi
3845   ;;
3846 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
3847   ;;
3848 .\${*prefix}*) #(vi
3849   eval withval="$withval"
3850   case ".$withval" in #(vi
3851   .NONE/*)
3852     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
3853     ;;
3854   esac
3855   ;; #(vi
3856 .no|.NONE/*)
3857   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
3858   ;;
3859 *)
3860   { { echo "$as_me:3860: error: expected a pathname, not \"$withval\"" >&5
3861 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
3862    { (exit 1); exit 1; }; }
3863   ;;
3864 esac
3865
3866         if test -d "$cf_cv_curses_dir"
3867         then
3868
3869 if test -n "$cf_cv_curses_dir/include" ; then
3870   for cf_add_incdir in $cf_cv_curses_dir/include
3871   do
3872         while test $cf_add_incdir != /usr/include
3873         do
3874           if test -d $cf_add_incdir
3875           then
3876                 cf_have_incdir=no
3877                 if test -n "$CFLAGS$CPPFLAGS" ; then
3878                   # a loop is needed to ensure we can add subdirs of existing dirs
3879                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
3880                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
3881                           cf_have_incdir=yes; break
3882                         fi
3883                   done
3884                 fi
3885
3886                 if test "$cf_have_incdir" = no ; then
3887                   if test "$cf_add_incdir" = /usr/local/include ; then
3888                         if test "$GCC" = yes
3889                         then
3890                           cf_save_CPPFLAGS=$CPPFLAGS
3891                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
3892                           cat >conftest.$ac_ext <<_ACEOF
3893 #line 3893 "configure"
3894 #include "confdefs.h"
3895 #include <stdio.h>
3896 int
3897 main ()
3898 {
3899 printf("Hello")
3900   ;
3901   return 0;
3902 }
3903 _ACEOF
3904 rm -f conftest.$ac_objext
3905 if { (eval echo "$as_me:3905: \"$ac_compile\"") >&5
3906   (eval $ac_compile) 2>&5
3907   ac_status=$?
3908   echo "$as_me:3908: \$? = $ac_status" >&5
3909   (exit $ac_status); } &&
3910          { ac_try='test -s conftest.$ac_objext'
3911   { (eval echo "$as_me:3911: \"$ac_try\"") >&5
3912   (eval $ac_try) 2>&5
3913   ac_status=$?
3914   echo "$as_me:3914: \$? = $ac_status" >&5
3915   (exit $ac_status); }; }; then
3916   :
3917 else
3918   echo "$as_me: failed program was:" >&5
3919 cat conftest.$ac_ext >&5
3920 cf_have_incdir=yes
3921 fi
3922 rm -f conftest.$ac_objext conftest.$ac_ext
3923                           CPPFLAGS=$cf_save_CPPFLAGS
3924                         fi
3925                   fi
3926                 fi
3927
3928                 if test "$cf_have_incdir" = no ; then
3929                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
3930
3931 echo "${as_me:-configure}:3931: testing adding $cf_add_incdir to include-path ..." 1>&5
3932
3933                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
3934
3935                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
3936                   test "$cf_top_incdir" = "$cf_add_incdir" && break
3937                   cf_add_incdir="$cf_top_incdir"
3938                 else
3939                   break
3940                 fi
3941           fi
3942         done
3943   done
3944 fi
3945
3946 if test -n "$cf_cv_curses_dir/lib" ; then
3947   for cf_add_libdir in $cf_cv_curses_dir/lib
3948   do
3949     if test $cf_add_libdir = /usr/lib ; then
3950       :
3951     elif test -d $cf_add_libdir
3952     then
3953       cf_have_libdir=no
3954       if test -n "$LDFLAGS$LIBS" ; then
3955         # a loop is needed to ensure we can add subdirs of existing dirs
3956         for cf_test_libdir in $LDFLAGS $LIBS ; do
3957           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
3958             cf_have_libdir=yes; break
3959           fi
3960         done
3961       fi
3962       if test "$cf_have_libdir" = no ; then
3963         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
3964
3965 echo "${as_me:-configure}:3965: testing adding $cf_add_libdir to library-path ..." 1>&5
3966
3967         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
3968       fi
3969     fi
3970   done
3971 fi
3972
3973         fi
3974 fi
3975
3976 echo "$as_me:3976: checking if you want wide-character code" >&5
3977 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
3978
3979 # Check whether --enable-widec or --disable-widec was given.
3980 if test "${enable_widec+set}" = set; then
3981   enableval="$enable_widec"
3982   with_widec=$enableval
3983 else
3984   with_widec=no
3985 fi;
3986 echo "$as_me:3986: result: $with_widec" >&5
3987 echo "${ECHO_T}$with_widec" >&6
3988 if test "$with_widec" = yes ; then
3989
3990 echo "$as_me:3990: checking for multibyte character support" >&5
3991 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
3992 if test "${cf_cv_utf8_lib+set}" = set; then
3993   echo $ECHO_N "(cached) $ECHO_C" >&6
3994 else
3995
3996         cf_save_LIBS="$LIBS"
3997         cat >conftest.$ac_ext <<_ACEOF
3998 #line 3998 "configure"
3999 #include "confdefs.h"
4000
4001 #include <stdlib.h>
4002 int
4003 main ()
4004 {
4005 putwc(0,0);
4006   ;
4007   return 0;
4008 }
4009 _ACEOF
4010 rm -f conftest.$ac_objext conftest$ac_exeext
4011 if { (eval echo "$as_me:4011: \"$ac_link\"") >&5
4012   (eval $ac_link) 2>&5
4013   ac_status=$?
4014   echo "$as_me:4014: \$? = $ac_status" >&5
4015   (exit $ac_status); } &&
4016          { ac_try='test -s conftest$ac_exeext'
4017   { (eval echo "$as_me:4017: \"$ac_try\"") >&5
4018   (eval $ac_try) 2>&5
4019   ac_status=$?
4020   echo "$as_me:4020: \$? = $ac_status" >&5
4021   (exit $ac_status); }; }; then
4022   cf_cv_utf8_lib=yes
4023 else
4024   echo "$as_me: failed program was:" >&5
4025 cat conftest.$ac_ext >&5
4026
4027 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
4028 # will be set on completion of the AC_TRY_LINK below.
4029 cf_cv_header_path_utf8=
4030 cf_cv_library_path_utf8=
4031
4032 echo "${as_me:-configure}:4032: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
4033
4034 cf_save_LIBS="$LIBS"
4035
4036 cat >conftest.$ac_ext <<_ACEOF
4037 #line 4037 "configure"
4038 #include "confdefs.h"
4039
4040 #include <libutf8.h>
4041 int
4042 main ()
4043 {
4044 putwc(0,0);
4045   ;
4046   return 0;
4047 }
4048 _ACEOF
4049 rm -f conftest.$ac_objext conftest$ac_exeext
4050 if { (eval echo "$as_me:4050: \"$ac_link\"") >&5
4051   (eval $ac_link) 2>&5
4052   ac_status=$?
4053   echo "$as_me:4053: \$? = $ac_status" >&5
4054   (exit $ac_status); } &&
4055          { ac_try='test -s conftest$ac_exeext'
4056   { (eval echo "$as_me:4056: \"$ac_try\"") >&5
4057   (eval $ac_try) 2>&5
4058   ac_status=$?
4059   echo "$as_me:4059: \$? = $ac_status" >&5
4060   (exit $ac_status); }; }; then
4061
4062         cf_cv_find_linkage_utf8=yes
4063         cf_cv_header_path_utf8=/usr/include
4064         cf_cv_library_path_utf8=/usr/lib
4065
4066 else
4067   echo "$as_me: failed program was:" >&5
4068 cat conftest.$ac_ext >&5
4069
4070 LIBS="-lutf8  $cf_save_LIBS"
4071
4072 cat >conftest.$ac_ext <<_ACEOF
4073 #line 4073 "configure"
4074 #include "confdefs.h"
4075
4076 #include <libutf8.h>
4077 int
4078 main ()
4079 {
4080 putwc(0,0);
4081   ;
4082   return 0;
4083 }
4084 _ACEOF
4085 rm -f conftest.$ac_objext conftest$ac_exeext
4086 if { (eval echo "$as_me:4086: \"$ac_link\"") >&5
4087   (eval $ac_link) 2>&5
4088   ac_status=$?
4089   echo "$as_me:4089: \$? = $ac_status" >&5
4090   (exit $ac_status); } &&
4091          { ac_try='test -s conftest$ac_exeext'
4092   { (eval echo "$as_me:4092: \"$ac_try\"") >&5
4093   (eval $ac_try) 2>&5
4094   ac_status=$?
4095   echo "$as_me:4095: \$? = $ac_status" >&5
4096   (exit $ac_status); }; }; then
4097
4098         cf_cv_find_linkage_utf8=yes
4099         cf_cv_header_path_utf8=/usr/include
4100         cf_cv_library_path_utf8=/usr/lib
4101         cf_cv_library_file_utf8="-lutf8"
4102
4103 else
4104   echo "$as_me: failed program was:" >&5
4105 cat conftest.$ac_ext >&5
4106
4107         cf_cv_find_linkage_utf8=no
4108         LIBS="$cf_save_LIBS"
4109
4110     test -n "$verbose" && echo "        find linkage for utf8 library" 1>&6
4111
4112 echo "${as_me:-configure}:4112: testing find linkage for utf8 library ..." 1>&5
4113
4114 echo "${as_me:-configure}:4114: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
4115
4116     cf_save_CPPFLAGS="$CPPFLAGS"
4117     cf_test_CPPFLAGS="$CPPFLAGS"
4118
4119 cf_search=
4120
4121 # collect the current set of include-directories from compiler flags
4122 cf_header_path_list=""
4123 if test -n "${CFLAGS}${CPPFLAGS}" ; then
4124         for cf_header_path in $CPPFLAGS $CFLAGS
4125         do
4126                 case $cf_header_path in #(vi
4127                 -I*)
4128                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
4129
4130 test "$cf_header_path" != "NONE" && \
4131 test -d "$cf_header_path" && \
4132  {
4133         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
4134         test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
4135         test -d $cf_header_path/include/utf8 &&       cf_search="$cf_search $cf_header_path/include/utf8"
4136         test -d $cf_header_path/include/utf8/include &&    cf_search="$cf_search $cf_header_path/include/utf8/include"
4137         test -d $cf_header_path/utf8/include &&       cf_search="$cf_search $cf_header_path/utf8/include"
4138         test -d $cf_header_path/utf8/include/utf8 &&    cf_search="$cf_search $cf_header_path/utf8/include/utf8"
4139 }
4140
4141                         cf_header_path_list="$cf_header_path_list $cf_search"
4142                         ;;
4143                 esac
4144         done
4145 fi
4146
4147 # add the variations for the package we are looking for
4148
4149 cf_search=
4150
4151 test "/usr" != "$prefix" && \
4152 test -d "/usr" && \
4153 (test $prefix = NONE || test "/usr" != "$prefix") && {
4154         test -n "$verbose" && echo "    ... testing for include-directories under /usr"
4155         test -d /usr/include &&          cf_search="$cf_search /usr/include"
4156         test -d /usr/include/utf8 &&       cf_search="$cf_search /usr/include/utf8"
4157         test -d /usr/include/utf8/include &&    cf_search="$cf_search /usr/include/utf8/include"
4158         test -d /usr/utf8/include &&       cf_search="$cf_search /usr/utf8/include"
4159         test -d /usr/utf8/include/utf8 &&    cf_search="$cf_search /usr/utf8/include/utf8"
4160 }
4161
4162 test "$prefix" != "NONE" && \
4163 test -d "$prefix" && \
4164  {
4165         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
4166         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
4167         test -d $prefix/include/utf8 &&       cf_search="$cf_search $prefix/include/utf8"
4168         test -d $prefix/include/utf8/include &&    cf_search="$cf_search $prefix/include/utf8/include"
4169         test -d $prefix/utf8/include &&       cf_search="$cf_search $prefix/utf8/include"
4170         test -d $prefix/utf8/include/utf8 &&    cf_search="$cf_search $prefix/utf8/include/utf8"
4171 }
4172
4173 test "/usr/local" != "$prefix" && \
4174 test -d "/usr/local" && \
4175 (test $prefix = NONE || test "/usr/local" != "$prefix") && {
4176         test -n "$verbose" && echo "    ... testing for include-directories under /usr/local"
4177         test -d /usr/local/include &&          cf_search="$cf_search /usr/local/include"
4178         test -d /usr/local/include/utf8 &&       cf_search="$cf_search /usr/local/include/utf8"
4179         test -d /usr/local/include/utf8/include &&    cf_search="$cf_search /usr/local/include/utf8/include"
4180         test -d /usr/local/utf8/include &&       cf_search="$cf_search /usr/local/utf8/include"
4181         test -d /usr/local/utf8/include/utf8 &&    cf_search="$cf_search /usr/local/utf8/include/utf8"
4182 }
4183
4184 test "/opt" != "$prefix" && \
4185 test -d "/opt" && \
4186 (test $prefix = NONE || test "/opt" != "$prefix") && {
4187         test -n "$verbose" && echo "    ... testing for include-directories under /opt"
4188         test -d /opt/include &&          cf_search="$cf_search /opt/include"
4189         test -d /opt/include/utf8 &&       cf_search="$cf_search /opt/include/utf8"
4190         test -d /opt/include/utf8/include &&    cf_search="$cf_search /opt/include/utf8/include"
4191         test -d /opt/utf8/include &&       cf_search="$cf_search /opt/utf8/include"
4192         test -d /opt/utf8/include/utf8 &&    cf_search="$cf_search /opt/utf8/include/utf8"
4193 }
4194
4195 test "$HOME" != "$prefix" && \
4196 test -d "$HOME" && \
4197 (test $prefix = NONE || test "$HOME" != "$prefix") && {
4198         test -n "$verbose" && echo "    ... testing for include-directories under $HOME"
4199         test -d $HOME/include &&          cf_search="$cf_search $HOME/include"
4200         test -d $HOME/include/utf8 &&       cf_search="$cf_search $HOME/include/utf8"
4201         test -d $HOME/include/utf8/include &&    cf_search="$cf_search $HOME/include/utf8/include"
4202         test -d $HOME/utf8/include &&       cf_search="$cf_search $HOME/utf8/include"
4203         test -d $HOME/utf8/include/utf8 &&    cf_search="$cf_search $HOME/utf8/include/utf8"
4204 }
4205
4206 test "$includedir" != NONE && \
4207 test "$includedir" != "/usr/include" && \
4208 test -d "$includedir" && {
4209         test -d $includedir &&    cf_search="$cf_search $includedir"
4210         test -d $includedir/utf8 && cf_search="$cf_search $includedir/utf8"
4211 }
4212
4213 test "$oldincludedir" != NONE && \
4214 test "$oldincludedir" != "/usr/include" && \
4215 test -d "$oldincludedir" && {
4216         test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
4217         test -d $oldincludedir/utf8 && cf_search="$cf_search $oldincludedir/utf8"
4218 }
4219
4220 cf_search="$cf_search $cf_header_path_list"
4221
4222     for cf_cv_header_path_utf8 in $cf_search
4223     do
4224       if test -d $cf_cv_header_path_utf8 ; then
4225         test -n "$verbose" && echo "    ... testing $cf_cv_header_path_utf8" 1>&6
4226
4227 echo "${as_me:-configure}:4227: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
4228
4229         CPPFLAGS="$cf_save_CPPFLAGS -I$cf_cv_header_path_utf8"
4230         cat >conftest.$ac_ext <<_ACEOF
4231 #line 4231 "configure"
4232 #include "confdefs.h"
4233
4234 #include <libutf8.h>
4235 int
4236 main ()
4237 {
4238 putwc(0,0);
4239   ;
4240   return 0;
4241 }
4242 _ACEOF
4243 rm -f conftest.$ac_objext
4244 if { (eval echo "$as_me:4244: \"$ac_compile\"") >&5
4245   (eval $ac_compile) 2>&5
4246   ac_status=$?
4247   echo "$as_me:4247: \$? = $ac_status" >&5
4248   (exit $ac_status); } &&
4249          { ac_try='test -s conftest.$ac_objext'
4250   { (eval echo "$as_me:4250: \"$ac_try\"") >&5
4251   (eval $ac_try) 2>&5
4252   ac_status=$?
4253   echo "$as_me:4253: \$? = $ac_status" >&5
4254   (exit $ac_status); }; }; then
4255
4256             test -n "$verbose" && echo "        ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
4257
4258 echo "${as_me:-configure}:4258: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
4259
4260             cf_cv_find_linkage_utf8=maybe
4261             cf_test_CPPFLAGS="$CPPFLAGS"
4262             break
4263 else
4264   echo "$as_me: failed program was:" >&5
4265 cat conftest.$ac_ext >&5
4266
4267             CPPFLAGS="$cf_save_CPPFLAGS"
4268
4269 fi
4270 rm -f conftest.$ac_objext conftest.$ac_ext
4271       fi
4272     done
4273
4274     if test "$cf_cv_find_linkage_utf8" = maybe ; then
4275
4276 echo "${as_me:-configure}:4276: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
4277
4278       cf_save_LIBS="$LIBS"
4279       cf_save_LDFLAGS="$LDFLAGS"
4280
4281       if test "$cf_cv_find_linkage_utf8" != yes ; then
4282
4283 cf_search=
4284 cf_library_path_list=""
4285 if test -n "${LDFLAGS}${LIBS}" ; then
4286         for cf_library_path in $LDFLAGS $LIBS
4287         do
4288                 case $cf_library_path in #(vi
4289                 -L*)
4290                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
4291
4292 test "$cf_library_path" != "NONE" && \
4293 test -d "$cf_library_path" && \
4294  {
4295         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
4296         test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
4297         test -d $cf_library_path/lib/utf8 &&       cf_search="$cf_search $cf_library_path/lib/utf8"
4298         test -d $cf_library_path/lib/utf8/lib &&    cf_search="$cf_search $cf_library_path/lib/utf8/lib"
4299         test -d $cf_library_path/utf8/lib &&       cf_search="$cf_search $cf_library_path/utf8/lib"
4300         test -d $cf_library_path/utf8/lib/utf8 &&    cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
4301 }
4302
4303                         cf_library_path_list="$cf_library_path_list $cf_search"
4304                         ;;
4305                 esac
4306         done
4307 fi
4308
4309 cf_search=
4310
4311 test "/usr" != "$prefix" && \
4312 test -d "/usr" && \
4313 (test $prefix = NONE || test "/usr" != "$prefix") && {
4314         test -n "$verbose" && echo "    ... testing for lib-directories under /usr"
4315         test -d /usr/lib &&          cf_search="$cf_search /usr/lib"
4316         test -d /usr/lib/utf8 &&       cf_search="$cf_search /usr/lib/utf8"
4317         test -d /usr/lib/utf8/lib &&    cf_search="$cf_search /usr/lib/utf8/lib"
4318         test -d /usr/utf8/lib &&       cf_search="$cf_search /usr/utf8/lib"
4319         test -d /usr/utf8/lib/utf8 &&    cf_search="$cf_search /usr/utf8/lib/utf8"
4320 }
4321
4322 test "$prefix" != "NONE" && \
4323 test -d "$prefix" && \
4324  {
4325         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
4326         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
4327         test -d $prefix/lib/utf8 &&       cf_search="$cf_search $prefix/lib/utf8"
4328         test -d $prefix/lib/utf8/lib &&    cf_search="$cf_search $prefix/lib/utf8/lib"
4329         test -d $prefix/utf8/lib &&       cf_search="$cf_search $prefix/utf8/lib"
4330         test -d $prefix/utf8/lib/utf8 &&    cf_search="$cf_search $prefix/utf8/lib/utf8"
4331 }
4332
4333 test "/usr/local" != "$prefix" && \
4334 test -d "/usr/local" && \
4335 (test $prefix = NONE || test "/usr/local" != "$prefix") && {
4336         test -n "$verbose" && echo "    ... testing for lib-directories under /usr/local"
4337         test -d /usr/local/lib &&          cf_search="$cf_search /usr/local/lib"
4338         test -d /usr/local/lib/utf8 &&       cf_search="$cf_search /usr/local/lib/utf8"
4339         test -d /usr/local/lib/utf8/lib &&    cf_search="$cf_search /usr/local/lib/utf8/lib"
4340         test -d /usr/local/utf8/lib &&       cf_search="$cf_search /usr/local/utf8/lib"
4341         test -d /usr/local/utf8/lib/utf8 &&    cf_search="$cf_search /usr/local/utf8/lib/utf8"
4342 }
4343
4344 test "/opt" != "$prefix" && \
4345 test -d "/opt" && \
4346 (test $prefix = NONE || test "/opt" != "$prefix") && {
4347         test -n "$verbose" && echo "    ... testing for lib-directories under /opt"
4348         test -d /opt/lib &&          cf_search="$cf_search /opt/lib"
4349         test -d /opt/lib/utf8 &&       cf_search="$cf_search /opt/lib/utf8"
4350         test -d /opt/lib/utf8/lib &&    cf_search="$cf_search /opt/lib/utf8/lib"
4351         test -d /opt/utf8/lib &&       cf_search="$cf_search /opt/utf8/lib"
4352         test -d /opt/utf8/lib/utf8 &&    cf_search="$cf_search /opt/utf8/lib/utf8"
4353 }
4354
4355 test "$HOME" != "$prefix" && \
4356 test -d "$HOME" && \
4357 (test $prefix = NONE || test "$HOME" != "$prefix") && {
4358         test -n "$verbose" && echo "    ... testing for lib-directories under $HOME"
4359         test -d $HOME/lib &&          cf_search="$cf_search $HOME/lib"
4360         test -d $HOME/lib/utf8 &&       cf_search="$cf_search $HOME/lib/utf8"
4361         test -d $HOME/lib/utf8/lib &&    cf_search="$cf_search $HOME/lib/utf8/lib"
4362         test -d $HOME/utf8/lib &&       cf_search="$cf_search $HOME/utf8/lib"
4363         test -d $HOME/utf8/lib/utf8 &&    cf_search="$cf_search $HOME/utf8/lib/utf8"
4364 }
4365
4366 cf_search="$cf_library_path_list $cf_search"
4367
4368         for cf_cv_library_path_utf8 in $cf_search
4369         do
4370           if test -d $cf_cv_library_path_utf8 ; then
4371             test -n "$verbose" && echo "        ... testing $cf_cv_library_path_utf8" 1>&6
4372
4373 echo "${as_me:-configure}:4373: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
4374
4375             CPPFLAGS="$cf_test_CPPFLAGS"
4376             LIBS="-lutf8  $cf_save_LIBS"
4377             LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
4378             cat >conftest.$ac_ext <<_ACEOF
4379 #line 4379 "configure"
4380 #include "confdefs.h"
4381
4382 #include <libutf8.h>
4383 int
4384 main ()
4385 {
4386 putwc(0,0);
4387   ;
4388   return 0;
4389 }
4390 _ACEOF
4391 rm -f conftest.$ac_objext conftest$ac_exeext
4392 if { (eval echo "$as_me:4392: \"$ac_link\"") >&5
4393   (eval $ac_link) 2>&5
4394   ac_status=$?
4395   echo "$as_me:4395: \$? = $ac_status" >&5
4396   (exit $ac_status); } &&
4397          { ac_try='test -s conftest$ac_exeext'
4398   { (eval echo "$as_me:4398: \"$ac_try\"") >&5
4399   (eval $ac_try) 2>&5
4400   ac_status=$?
4401   echo "$as_me:4401: \$? = $ac_status" >&5
4402   (exit $ac_status); }; }; then
4403
4404                 test -n "$verbose" && echo "    ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
4405
4406 echo "${as_me:-configure}:4406: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
4407
4408                 cf_cv_find_linkage_utf8=yes
4409                 cf_cv_library_file_utf8="-lutf8"
4410                 break
4411 else
4412   echo "$as_me: failed program was:" >&5
4413 cat conftest.$ac_ext >&5
4414
4415                 CPPFLAGS="$cf_save_CPPFLAGS"
4416                 LIBS="$cf_save_LIBS"
4417                 LDFLAGS="$cf_save_LDFLAGS"
4418
4419 fi
4420 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4421           fi
4422         done
4423         CPPFLAGS="$cf_save_CPPFLAGS"
4424         LDFLAGS="$cf_save_LDFLAGS"
4425       fi
4426
4427     else
4428       cf_cv_find_linkage_utf8=no
4429     fi
4430
4431 fi
4432 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4433
4434 fi
4435 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4436
4437 LIBS="$cf_save_LIBS"
4438
4439 if test "$cf_cv_find_linkage_utf8" = yes ; then
4440 cf_cv_utf8_lib=add-on
4441 else
4442 cf_cv_utf8_lib=no
4443 fi
4444
4445 fi
4446 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4447 fi
4448 echo "$as_me:4448: result: $cf_cv_utf8_lib" >&5
4449 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
4450
4451 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
4452 # ncurses/ncursesw:
4453 if test "$cf_cv_utf8_lib" = "add-on" ; then
4454         cat >>confdefs.h <<\EOF
4455 #define HAVE_LIBUTF8_H 1
4456 EOF
4457
4458 if test -n "$cf_cv_header_path_utf8" ; then
4459   for cf_add_incdir in $cf_cv_header_path_utf8
4460   do
4461         while test $cf_add_incdir != /usr/include
4462         do
4463           if test -d $cf_add_incdir
4464           then
4465                 cf_have_incdir=no
4466                 if test -n "$CFLAGS$CPPFLAGS" ; then
4467                   # a loop is needed to ensure we can add subdirs of existing dirs
4468                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
4469                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
4470                           cf_have_incdir=yes; break
4471                         fi
4472                   done
4473                 fi
4474
4475                 if test "$cf_have_incdir" = no ; then
4476                   if test "$cf_add_incdir" = /usr/local/include ; then
4477                         if test "$GCC" = yes
4478                         then
4479                           cf_save_CPPFLAGS=$CPPFLAGS
4480                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4481                           cat >conftest.$ac_ext <<_ACEOF
4482 #line 4482 "configure"
4483 #include "confdefs.h"
4484 #include <stdio.h>
4485 int
4486 main ()
4487 {
4488 printf("Hello")
4489   ;
4490   return 0;
4491 }
4492 _ACEOF
4493 rm -f conftest.$ac_objext
4494 if { (eval echo "$as_me:4494: \"$ac_compile\"") >&5
4495   (eval $ac_compile) 2>&5
4496   ac_status=$?
4497   echo "$as_me:4497: \$? = $ac_status" >&5
4498   (exit $ac_status); } &&
4499          { ac_try='test -s conftest.$ac_objext'
4500   { (eval echo "$as_me:4500: \"$ac_try\"") >&5
4501   (eval $ac_try) 2>&5
4502   ac_status=$?
4503   echo "$as_me:4503: \$? = $ac_status" >&5
4504   (exit $ac_status); }; }; then
4505   :
4506 else
4507   echo "$as_me: failed program was:" >&5
4508 cat conftest.$ac_ext >&5
4509 cf_have_incdir=yes
4510 fi
4511 rm -f conftest.$ac_objext conftest.$ac_ext
4512                           CPPFLAGS=$cf_save_CPPFLAGS
4513                         fi
4514                   fi
4515                 fi
4516
4517                 if test "$cf_have_incdir" = no ; then
4518                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
4519
4520 echo "${as_me:-configure}:4520: testing adding $cf_add_incdir to include-path ..." 1>&5
4521
4522                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4523
4524                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
4525                   test "$cf_top_incdir" = "$cf_add_incdir" && break
4526                   cf_add_incdir="$cf_top_incdir"
4527                 else
4528                   break
4529                 fi
4530           fi
4531         done
4532   done
4533 fi
4534
4535 if test -n "$cf_cv_library_path_utf8" ; then
4536   for cf_add_libdir in $cf_cv_library_path_utf8
4537   do
4538     if test $cf_add_libdir = /usr/lib ; then
4539       :
4540     elif test -d $cf_add_libdir
4541     then
4542       cf_have_libdir=no
4543       if test -n "$LDFLAGS$LIBS" ; then
4544         # a loop is needed to ensure we can add subdirs of existing dirs
4545         for cf_test_libdir in $LDFLAGS $LIBS ; do
4546           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
4547             cf_have_libdir=yes; break
4548           fi
4549         done
4550       fi
4551       if test "$cf_have_libdir" = no ; then
4552         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
4553
4554 echo "${as_me:-configure}:4554: testing adding $cf_add_libdir to library-path ..." 1>&5
4555
4556         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
4557       fi
4558     fi
4559   done
4560 fi
4561
4562         LIBS="$cf_cv_library_file_utf8 $LIBS"
4563 fi
4564
4565 cf_ncuconfig_root=ncursesw
4566
4567 echo "Looking for ${cf_ncuconfig_root}-config"
4568 for ac_prog in ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
4569 do
4570   # Extract the first word of "$ac_prog", so it can be a program name with args.
4571 set dummy $ac_prog; ac_word=$2
4572 echo "$as_me:4572: checking for $ac_word" >&5
4573 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4574 if test "${ac_cv_path_NCURSES_CONFIG+set}" = set; then
4575   echo $ECHO_N "(cached) $ECHO_C" >&6
4576 else
4577   case $NCURSES_CONFIG in
4578   [\\/]* | ?:[\\/]*)
4579   ac_cv_path_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test with a path.
4580   ;;
4581   *)
4582   ac_save_IFS=$IFS; IFS=$ac_path_separator
4583 ac_dummy="$PATH"
4584 for ac_dir in $ac_dummy; do
4585   IFS=$ac_save_IFS
4586   test -z "$ac_dir" && ac_dir=.
4587   if $as_executable_p "$ac_dir/$ac_word"; then
4588    ac_cv_path_NCURSES_CONFIG="$ac_dir/$ac_word"
4589    echo "$as_me:4589: found $ac_dir/$ac_word" >&5
4590    break
4591 fi
4592 done
4593
4594   ;;
4595 esac
4596 fi
4597 NCURSES_CONFIG=$ac_cv_path_NCURSES_CONFIG
4598
4599 if test -n "$NCURSES_CONFIG"; then
4600   echo "$as_me:4600: result: $NCURSES_CONFIG" >&5
4601 echo "${ECHO_T}$NCURSES_CONFIG" >&6
4602 else
4603   echo "$as_me:4603: result: no" >&5
4604 echo "${ECHO_T}no" >&6
4605 fi
4606
4607   test -n "$NCURSES_CONFIG" && break
4608 done
4609 test -n "$NCURSES_CONFIG" || NCURSES_CONFIG="none"
4610
4611 if test "$NCURSES_CONFIG" != none ; then
4612
4613 CPPFLAGS="$CPPFLAGS `$NCURSES_CONFIG --cflags`"
4614 LIBS="`$NCURSES_CONFIG --libs` $LIBS"
4615
4616 # even with config script, some packages use no-override for curses.h
4617
4618 echo "$as_me:4618: checking if we have identified curses headers" >&5
4619 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
4620 if test "${cf_cv_ncurses_header+set}" = set; then
4621   echo $ECHO_N "(cached) $ECHO_C" >&6
4622 else
4623
4624 cf_cv_ncurses_header=none
4625 for cf_header in  \
4626     ncursesw/ncurses.h \
4627         ncursesw/curses.h \
4628         ncurses.h \
4629         curses.h
4630 do
4631 cat >conftest.$ac_ext <<_ACEOF
4632 #line 4632 "configure"
4633 #include "confdefs.h"
4634 #include <${cf_header}>
4635 int
4636 main ()
4637 {
4638 initscr(); tgoto("?", 0,0)
4639   ;
4640   return 0;
4641 }
4642 _ACEOF
4643 rm -f conftest.$ac_objext
4644 if { (eval echo "$as_me:4644: \"$ac_compile\"") >&5
4645   (eval $ac_compile) 2>&5
4646   ac_status=$?
4647   echo "$as_me:4647: \$? = $ac_status" >&5
4648   (exit $ac_status); } &&
4649          { ac_try='test -s conftest.$ac_objext'
4650   { (eval echo "$as_me:4650: \"$ac_try\"") >&5
4651   (eval $ac_try) 2>&5
4652   ac_status=$?
4653   echo "$as_me:4653: \$? = $ac_status" >&5
4654   (exit $ac_status); }; }; then
4655   cf_cv_ncurses_header=$cf_header; break
4656 else
4657   echo "$as_me: failed program was:" >&5
4658 cat conftest.$ac_ext >&5
4659 fi
4660 rm -f conftest.$ac_objext conftest.$ac_ext
4661 done
4662
4663 fi
4664 echo "$as_me:4664: result: $cf_cv_ncurses_header" >&5
4665 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
4666
4667 if test "$cf_cv_ncurses_header" = none ; then
4668         { { echo "$as_me:4668: error: No curses header-files found" >&5
4669 echo "$as_me: error: No curses header-files found" >&2;}
4670    { (exit 1); exit 1; }; }
4671 fi
4672
4673 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
4674
4675 for ac_header in $cf_cv_ncurses_header
4676 do
4677 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4678 echo "$as_me:4678: checking for $ac_header" >&5
4679 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4680 if eval "test \"\${$as_ac_Header+set}\" = set"; then
4681   echo $ECHO_N "(cached) $ECHO_C" >&6
4682 else
4683   cat >conftest.$ac_ext <<_ACEOF
4684 #line 4684 "configure"
4685 #include "confdefs.h"
4686 #include <$ac_header>
4687 _ACEOF
4688 if { (eval echo "$as_me:4688: \"$ac_cpp conftest.$ac_ext\"") >&5
4689   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4690   ac_status=$?
4691   egrep -v '^ *\+' conftest.er1 >conftest.err
4692   rm -f conftest.er1
4693   cat conftest.err >&5
4694   echo "$as_me:4694: \$? = $ac_status" >&5
4695   (exit $ac_status); } >/dev/null; then
4696   if test -s conftest.err; then
4697     ac_cpp_err=$ac_c_preproc_warn_flag
4698   else
4699     ac_cpp_err=
4700   fi
4701 else
4702   ac_cpp_err=yes
4703 fi
4704 if test -z "$ac_cpp_err"; then
4705   eval "$as_ac_Header=yes"
4706 else
4707   echo "$as_me: failed program was:" >&5
4708   cat conftest.$ac_ext >&5
4709   eval "$as_ac_Header=no"
4710 fi
4711 rm -f conftest.err conftest.$ac_ext
4712 fi
4713 echo "$as_me:4713: result: `eval echo '${'$as_ac_Header'}'`" >&5
4714 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4715 if test `eval echo '${'$as_ac_Header'}'` = yes; then
4716   cat >>confdefs.h <<EOF
4717 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4718 EOF
4719
4720 fi
4721 done
4722
4723 cat >>confdefs.h <<\EOF
4724 #define NCURSES 1
4725 EOF
4726
4727 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
4728
4729 cat >>confdefs.h <<EOF
4730 #define $cf_nculib_ROOT 1
4731 EOF
4732
4733 cf_cv_ncurses_version=`$NCURSES_CONFIG --version`
4734
4735 else
4736
4737 cf_ncuhdr_root=ncursesw
4738
4739 test -n "$cf_cv_curses_dir" && \
4740 test "$cf_cv_curses_dir" != "no" && { \
4741
4742 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
4743   for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
4744   do
4745         while test $cf_add_incdir != /usr/include
4746         do
4747           if test -d $cf_add_incdir
4748           then
4749                 cf_have_incdir=no
4750                 if test -n "$CFLAGS$CPPFLAGS" ; then
4751                   # a loop is needed to ensure we can add subdirs of existing dirs
4752                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
4753                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
4754                           cf_have_incdir=yes; break
4755                         fi
4756                   done
4757                 fi
4758
4759                 if test "$cf_have_incdir" = no ; then
4760                   if test "$cf_add_incdir" = /usr/local/include ; then
4761                         if test "$GCC" = yes
4762                         then
4763                           cf_save_CPPFLAGS=$CPPFLAGS
4764                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4765                           cat >conftest.$ac_ext <<_ACEOF
4766 #line 4766 "configure"
4767 #include "confdefs.h"
4768 #include <stdio.h>
4769 int
4770 main ()
4771 {
4772 printf("Hello")
4773   ;
4774   return 0;
4775 }
4776 _ACEOF
4777 rm -f conftest.$ac_objext
4778 if { (eval echo "$as_me:4778: \"$ac_compile\"") >&5
4779   (eval $ac_compile) 2>&5
4780   ac_status=$?
4781   echo "$as_me:4781: \$? = $ac_status" >&5
4782   (exit $ac_status); } &&
4783          { ac_try='test -s conftest.$ac_objext'
4784   { (eval echo "$as_me:4784: \"$ac_try\"") >&5
4785   (eval $ac_try) 2>&5
4786   ac_status=$?
4787   echo "$as_me:4787: \$? = $ac_status" >&5
4788   (exit $ac_status); }; }; then
4789   :
4790 else
4791   echo "$as_me: failed program was:" >&5
4792 cat conftest.$ac_ext >&5
4793 cf_have_incdir=yes
4794 fi
4795 rm -f conftest.$ac_objext conftest.$ac_ext
4796                           CPPFLAGS=$cf_save_CPPFLAGS
4797                         fi
4798                   fi
4799                 fi
4800
4801                 if test "$cf_have_incdir" = no ; then
4802                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
4803
4804 echo "${as_me:-configure}:4804: testing adding $cf_add_incdir to include-path ..." 1>&5
4805
4806                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4807
4808                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
4809                   test "$cf_top_incdir" = "$cf_add_incdir" && break
4810                   cf_add_incdir="$cf_top_incdir"
4811                 else
4812                   break
4813                 fi
4814           fi
4815         done
4816   done
4817 fi
4818
4819 }
4820
4821 echo "$as_me:4821: checking for $cf_ncuhdr_root header in include-path" >&5
4822 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
4823 if test "${cf_cv_ncurses_h+set}" = set; then
4824   echo $ECHO_N "(cached) $ECHO_C" >&6
4825 else
4826
4827         cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
4828         ( test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw ) && cf_header_list="$cf_header_list curses.h ncurses.h"
4829         for cf_header in $cf_header_list
4830         do
4831
4832         cat >conftest.$ac_ext <<_ACEOF
4833 #line 4833 "configure"
4834 #include "confdefs.h"
4835
4836 #define _XOPEN_SOURCE_EXTENDED
4837 #undef  HAVE_LIBUTF8_H  /* in case we used CF_UTF8_LIB */
4838 #define HAVE_LIBUTF8_H  /* to force ncurses' header file to use cchar_t */
4839
4840 #include <$cf_header>
4841 int
4842 main ()
4843 {
4844
4845 #ifdef NCURSES_VERSION
4846
4847 #ifndef WACS_BSSB
4848         make an error
4849 #endif
4850
4851 printf("%s\n", NCURSES_VERSION);
4852 #else
4853 #ifdef __NCURSES_H
4854 printf("old\n");
4855 #else
4856         make an error
4857 #endif
4858 #endif
4859
4860   ;
4861   return 0;
4862 }
4863 _ACEOF
4864 rm -f conftest.$ac_objext
4865 if { (eval echo "$as_me:4865: \"$ac_compile\"") >&5
4866   (eval $ac_compile) 2>&5
4867   ac_status=$?
4868   echo "$as_me:4868: \$? = $ac_status" >&5
4869   (exit $ac_status); } &&
4870          { ac_try='test -s conftest.$ac_objext'
4871   { (eval echo "$as_me:4871: \"$ac_try\"") >&5
4872   (eval $ac_try) 2>&5
4873   ac_status=$?
4874   echo "$as_me:4874: \$? = $ac_status" >&5
4875   (exit $ac_status); }; }; then
4876   cf_cv_ncurses_h=$cf_header
4877
4878 else
4879   echo "$as_me: failed program was:" >&5
4880 cat conftest.$ac_ext >&5
4881 cf_cv_ncurses_h=no
4882 fi
4883 rm -f conftest.$ac_objext conftest.$ac_ext
4884
4885                 test "$cf_cv_ncurses_h" != no && break
4886         done
4887
4888 fi
4889 echo "$as_me:4889: result: $cf_cv_ncurses_h" >&5
4890 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
4891
4892 if test "$cf_cv_ncurses_h" != no ; then
4893         cf_cv_ncurses_header=$cf_cv_ncurses_h
4894 else
4895
4896 echo "$as_me:4896: checking for $cf_ncuhdr_root include-path" >&5
4897 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
4898 if test "${cf_cv_ncurses_h2+set}" = set; then
4899   echo $ECHO_N "(cached) $ECHO_C" >&6
4900 else
4901
4902         test -n "$verbose" && echo
4903
4904 cf_search=
4905
4906 # collect the current set of include-directories from compiler flags
4907 cf_header_path_list=""
4908 if test -n "${CFLAGS}${CPPFLAGS}" ; then
4909         for cf_header_path in $CPPFLAGS $CFLAGS
4910         do
4911                 case $cf_header_path in #(vi
4912                 -I*)
4913                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
4914
4915 test "$cf_header_path" != "NONE" && \
4916 test -d "$cf_header_path" && \
4917  {
4918         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
4919         test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
4920         test -d $cf_header_path/include/$cf_ncuhdr_root &&       cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
4921         test -d $cf_header_path/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
4922         test -d $cf_header_path/$cf_ncuhdr_root/include &&       cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
4923         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"
4924 }
4925
4926                         cf_header_path_list="$cf_header_path_list $cf_search"
4927                         ;;
4928                 esac
4929         done
4930 fi
4931
4932 # add the variations for the package we are looking for
4933
4934 cf_search=
4935
4936 test "/usr" != "$prefix" && \
4937 test -d "/usr" && \
4938 (test $prefix = NONE || test "/usr" != "$prefix") && {
4939         test -n "$verbose" && echo "    ... testing for include-directories under /usr"
4940         test -d /usr/include &&          cf_search="$cf_search /usr/include"
4941         test -d /usr/include/$cf_ncuhdr_root &&       cf_search="$cf_search /usr/include/$cf_ncuhdr_root"
4942         test -d /usr/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search /usr/include/$cf_ncuhdr_root/include"
4943         test -d /usr/$cf_ncuhdr_root/include &&       cf_search="$cf_search /usr/$cf_ncuhdr_root/include"
4944         test -d /usr/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search /usr/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
4945 }
4946
4947 test "$prefix" != "NONE" && \
4948 test -d "$prefix" && \
4949  {
4950         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
4951         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
4952         test -d $prefix/include/$cf_ncuhdr_root &&       cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
4953         test -d $prefix/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
4954         test -d $prefix/$cf_ncuhdr_root/include &&       cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
4955         test -d $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
4956 }
4957
4958 test "/usr/local" != "$prefix" && \
4959 test -d "/usr/local" && \
4960 (test $prefix = NONE || test "/usr/local" != "$prefix") && {
4961         test -n "$verbose" && echo "    ... testing for include-directories under /usr/local"
4962         test -d /usr/local/include &&          cf_search="$cf_search /usr/local/include"
4963         test -d /usr/local/include/$cf_ncuhdr_root &&       cf_search="$cf_search /usr/local/include/$cf_ncuhdr_root"
4964         test -d /usr/local/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search /usr/local/include/$cf_ncuhdr_root/include"
4965         test -d /usr/local/$cf_ncuhdr_root/include &&       cf_search="$cf_search /usr/local/$cf_ncuhdr_root/include"
4966         test -d /usr/local/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search /usr/local/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
4967 }
4968
4969 test "/opt" != "$prefix" && \
4970 test -d "/opt" && \
4971 (test $prefix = NONE || test "/opt" != "$prefix") && {
4972         test -n "$verbose" && echo "    ... testing for include-directories under /opt"
4973         test -d /opt/include &&          cf_search="$cf_search /opt/include"
4974         test -d /opt/include/$cf_ncuhdr_root &&       cf_search="$cf_search /opt/include/$cf_ncuhdr_root"
4975         test -d /opt/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search /opt/include/$cf_ncuhdr_root/include"
4976         test -d /opt/$cf_ncuhdr_root/include &&       cf_search="$cf_search /opt/$cf_ncuhdr_root/include"
4977         test -d /opt/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search /opt/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
4978 }
4979
4980 test "$HOME" != "$prefix" && \
4981 test -d "$HOME" && \
4982 (test $prefix = NONE || test "$HOME" != "$prefix") && {
4983         test -n "$verbose" && echo "    ... testing for include-directories under $HOME"
4984         test -d $HOME/include &&          cf_search="$cf_search $HOME/include"
4985         test -d $HOME/include/$cf_ncuhdr_root &&       cf_search="$cf_search $HOME/include/$cf_ncuhdr_root"
4986         test -d $HOME/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search $HOME/include/$cf_ncuhdr_root/include"
4987         test -d $HOME/$cf_ncuhdr_root/include &&       cf_search="$cf_search $HOME/$cf_ncuhdr_root/include"
4988         test -d $HOME/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search $HOME/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
4989 }
4990
4991 test "$includedir" != NONE && \
4992 test "$includedir" != "/usr/include" && \
4993 test -d "$includedir" && {
4994         test -d $includedir &&    cf_search="$cf_search $includedir"
4995         test -d $includedir/$cf_ncuhdr_root && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
4996 }
4997
4998 test "$oldincludedir" != NONE && \
4999 test "$oldincludedir" != "/usr/include" && \
5000 test -d "$oldincludedir" && {
5001         test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
5002         test -d $oldincludedir/$cf_ncuhdr_root && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
5003 }
5004
5005 cf_search="$cf_search $cf_header_path_list"
5006
5007         test -n "$verbose" && echo search path $cf_search
5008         cf_save2_CPPFLAGS="$CPPFLAGS"
5009         for cf_incdir in $cf_search
5010         do
5011
5012 if test -n "$cf_incdir" ; then
5013   for cf_add_incdir in $cf_incdir
5014   do
5015         while test $cf_add_incdir != /usr/include
5016         do
5017           if test -d $cf_add_incdir
5018           then
5019                 cf_have_incdir=no
5020                 if test -n "$CFLAGS$CPPFLAGS" ; then
5021                   # a loop is needed to ensure we can add subdirs of existing dirs
5022                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
5023                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
5024                           cf_have_incdir=yes; break
5025                         fi
5026                   done
5027                 fi
5028
5029                 if test "$cf_have_incdir" = no ; then
5030                   if test "$cf_add_incdir" = /usr/local/include ; then
5031                         if test "$GCC" = yes
5032                         then
5033                           cf_save_CPPFLAGS=$CPPFLAGS
5034                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
5035                           cat >conftest.$ac_ext <<_ACEOF
5036 #line 5036 "configure"
5037 #include "confdefs.h"
5038 #include <stdio.h>
5039 int
5040 main ()
5041 {
5042 printf("Hello")
5043   ;
5044   return 0;
5045 }
5046 _ACEOF
5047 rm -f conftest.$ac_objext
5048 if { (eval echo "$as_me:5048: \"$ac_compile\"") >&5
5049   (eval $ac_compile) 2>&5
5050   ac_status=$?
5051   echo "$as_me:5051: \$? = $ac_status" >&5
5052   (exit $ac_status); } &&
5053          { ac_try='test -s conftest.$ac_objext'
5054   { (eval echo "$as_me:5054: \"$ac_try\"") >&5
5055   (eval $ac_try) 2>&5
5056   ac_status=$?
5057   echo "$as_me:5057: \$? = $ac_status" >&5
5058   (exit $ac_status); }; }; then
5059   :
5060 else
5061   echo "$as_me: failed program was:" >&5
5062 cat conftest.$ac_ext >&5
5063 cf_have_incdir=yes
5064 fi
5065 rm -f conftest.$ac_objext conftest.$ac_ext
5066                           CPPFLAGS=$cf_save_CPPFLAGS
5067                         fi
5068                   fi
5069                 fi
5070
5071                 if test "$cf_have_incdir" = no ; then
5072                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
5073
5074 echo "${as_me:-configure}:5074: testing adding $cf_add_incdir to include-path ..." 1>&5
5075
5076                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
5077
5078                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
5079                   test "$cf_top_incdir" = "$cf_add_incdir" && break
5080                   cf_add_incdir="$cf_top_incdir"
5081                 else
5082                   break
5083                 fi
5084           fi
5085         done
5086   done
5087 fi
5088
5089                 for cf_header in \
5090                         ncurses.h \
5091                         curses.h
5092                 do
5093
5094         cat >conftest.$ac_ext <<_ACEOF
5095 #line 5095 "configure"
5096 #include "confdefs.h"
5097
5098 #include <$cf_header>
5099 int
5100 main ()
5101 {
5102
5103 #ifdef NCURSES_VERSION
5104
5105 printf("%s\n", NCURSES_VERSION);
5106 #else
5107 #ifdef __NCURSES_H
5108 printf("old\n");
5109 #else
5110         make an error
5111 #endif
5112 #endif
5113
5114   ;
5115   return 0;
5116 }
5117 _ACEOF
5118 rm -f conftest.$ac_objext
5119 if { (eval echo "$as_me:5119: \"$ac_compile\"") >&5
5120   (eval $ac_compile) 2>&5
5121   ac_status=$?
5122   echo "$as_me:5122: \$? = $ac_status" >&5
5123   (exit $ac_status); } &&
5124          { ac_try='test -s conftest.$ac_objext'
5125   { (eval echo "$as_me:5125: \"$ac_try\"") >&5
5126   (eval $ac_try) 2>&5
5127   ac_status=$?
5128   echo "$as_me:5128: \$? = $ac_status" >&5
5129   (exit $ac_status); }; }; then
5130   cf_cv_ncurses_h2=$cf_header
5131
5132 else
5133   echo "$as_me: failed program was:" >&5
5134 cat conftest.$ac_ext >&5
5135 cf_cv_ncurses_h2=no
5136 fi
5137 rm -f conftest.$ac_objext conftest.$ac_ext
5138
5139                         if test "$cf_cv_ncurses_h2" != no ; then
5140                                 cf_cv_ncurses_h2=$cf_incdir/$cf_header
5141                                 test -n "$verbose" && echo $ac_n "      ... found $ac_c" 1>&6
5142                                 break
5143                         fi
5144                         test -n "$verbose" && echo "    ... tested $cf_incdir/$cf_header" 1>&6
5145                 done
5146                 CPPFLAGS="$cf_save2_CPPFLAGS"
5147                 test "$cf_cv_ncurses_h2" != no && break
5148         done
5149         test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:5149: error: not found" >&5
5150 echo "$as_me: error: not found" >&2;}
5151    { (exit 1); exit 1; }; }
5152
5153 fi
5154 echo "$as_me:5154: result: $cf_cv_ncurses_h2" >&5
5155 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
5156
5157         cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's%/[^/]*$%%'`
5158         cf_cv_ncurses_header=`basename $cf_cv_ncurses_h2`
5159         if test `basename $cf_1st_incdir` = $cf_ncuhdr_root ; then
5160                 cf_cv_ncurses_header=$cf_ncuhdr_root/$cf_cv_ncurses_header
5161         fi
5162
5163 if test -n "$cf_1st_incdir" ; then
5164   for cf_add_incdir in $cf_1st_incdir
5165   do
5166         while test $cf_add_incdir != /usr/include
5167         do
5168           if test -d $cf_add_incdir
5169           then
5170                 cf_have_incdir=no
5171                 if test -n "$CFLAGS$CPPFLAGS" ; then
5172                   # a loop is needed to ensure we can add subdirs of existing dirs
5173                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
5174                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
5175                           cf_have_incdir=yes; break
5176                         fi
5177                   done
5178                 fi
5179
5180                 if test "$cf_have_incdir" = no ; then
5181                   if test "$cf_add_incdir" = /usr/local/include ; then
5182                         if test "$GCC" = yes
5183                         then
5184                           cf_save_CPPFLAGS=$CPPFLAGS
5185                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
5186                           cat >conftest.$ac_ext <<_ACEOF
5187 #line 5187 "configure"
5188 #include "confdefs.h"
5189 #include <stdio.h>
5190 int
5191 main ()
5192 {
5193 printf("Hello")
5194   ;
5195   return 0;
5196 }
5197 _ACEOF
5198 rm -f conftest.$ac_objext
5199 if { (eval echo "$as_me:5199: \"$ac_compile\"") >&5
5200   (eval $ac_compile) 2>&5
5201   ac_status=$?
5202   echo "$as_me:5202: \$? = $ac_status" >&5
5203   (exit $ac_status); } &&
5204          { ac_try='test -s conftest.$ac_objext'
5205   { (eval echo "$as_me:5205: \"$ac_try\"") >&5
5206   (eval $ac_try) 2>&5
5207   ac_status=$?
5208   echo "$as_me:5208: \$? = $ac_status" >&5
5209   (exit $ac_status); }; }; then
5210   :
5211 else
5212   echo "$as_me: failed program was:" >&5
5213 cat conftest.$ac_ext >&5
5214 cf_have_incdir=yes
5215 fi
5216 rm -f conftest.$ac_objext conftest.$ac_ext
5217                           CPPFLAGS=$cf_save_CPPFLAGS
5218                         fi
5219                   fi
5220                 fi
5221
5222                 if test "$cf_have_incdir" = no ; then
5223                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
5224
5225 echo "${as_me:-configure}:5225: testing adding $cf_add_incdir to include-path ..." 1>&5
5226
5227                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
5228
5229                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
5230                   test "$cf_top_incdir" = "$cf_add_incdir" && break
5231                   cf_add_incdir="$cf_top_incdir"
5232                 else
5233                   break
5234                 fi
5235           fi
5236         done
5237   done
5238 fi
5239
5240 fi
5241
5242 # Set definitions to allow ifdef'ing for ncurses.h
5243
5244 case $cf_cv_ncurses_header in # (vi
5245 *ncurses.h)
5246         cat >>confdefs.h <<\EOF
5247 #define HAVE_NCURSES_H 1
5248 EOF
5249
5250         ;;
5251 esac
5252
5253 case $cf_cv_ncurses_header in # (vi
5254 ncurses/curses.h|ncurses/ncurses.h)
5255         cat >>confdefs.h <<\EOF
5256 #define HAVE_NCURSES_NCURSES_H 1
5257 EOF
5258
5259         ;;
5260 ncursesw/curses.h|ncursesw/ncurses.h)
5261         cat >>confdefs.h <<\EOF
5262 #define HAVE_NCURSESW_NCURSES_H 1
5263 EOF
5264
5265         ;;
5266 esac
5267
5268 echo "$as_me:5268: checking for terminfo header" >&5
5269 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
5270 if test "${cf_cv_term_header+set}" = set; then
5271   echo $ECHO_N "(cached) $ECHO_C" >&6
5272 else
5273
5274 case ${cf_cv_ncurses_header} in #(vi
5275 */ncurses.h|*/ncursesw.h) #(vi
5276         cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
5277         ;;
5278 *)
5279         cf_term_header=term.h
5280         ;;
5281 esac
5282
5283 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
5284 do
5285 cat >conftest.$ac_ext <<_ACEOF
5286 #line 5286 "configure"
5287 #include "confdefs.h"
5288 #include <stdio.h>
5289 #include <${cf_cv_ncurses_header:-curses.h}>
5290 #include <$cf_test>
5291
5292 int
5293 main ()
5294 {
5295 int x = auto_left_margin
5296   ;
5297   return 0;
5298 }
5299 _ACEOF
5300 rm -f conftest.$ac_objext
5301 if { (eval echo "$as_me:5301: \"$ac_compile\"") >&5
5302   (eval $ac_compile) 2>&5
5303   ac_status=$?
5304   echo "$as_me:5304: \$? = $ac_status" >&5
5305   (exit $ac_status); } &&
5306          { ac_try='test -s conftest.$ac_objext'
5307   { (eval echo "$as_me:5307: \"$ac_try\"") >&5
5308   (eval $ac_try) 2>&5
5309   ac_status=$?
5310   echo "$as_me:5310: \$? = $ac_status" >&5
5311   (exit $ac_status); }; }; then
5312
5313         cf_cv_term_header="$cf_test"
5314 else
5315   echo "$as_me: failed program was:" >&5
5316 cat conftest.$ac_ext >&5
5317
5318         cf_cv_term_header=unknown
5319
5320 fi
5321 rm -f conftest.$ac_objext conftest.$ac_ext
5322         test "$cf_cv_term_header" != unknown && break
5323 done
5324
5325 fi
5326 echo "$as_me:5326: result: $cf_cv_term_header" >&5
5327 echo "${ECHO_T}$cf_cv_term_header" >&6
5328
5329 # Set definitions to allow ifdef'ing to accommodate subdirectories
5330
5331 case $cf_cv_term_header in # (vi
5332 *term.h)
5333         cat >>confdefs.h <<\EOF
5334 #define HAVE_TERM_H 1
5335 EOF
5336
5337         ;;
5338 esac
5339
5340 case $cf_cv_term_header in # (vi
5341 ncurses/term.h) #(vi
5342         cat >>confdefs.h <<\EOF
5343 #define HAVE_NCURSES_TERM_H 1
5344 EOF
5345
5346         ;;
5347 ncursesw/term.h)
5348         cat >>confdefs.h <<\EOF
5349 #define HAVE_NCURSESW_TERM_H 1
5350 EOF
5351
5352         ;;
5353 esac
5354
5355 # some applications need this, but should check for NCURSES_VERSION
5356 cat >>confdefs.h <<\EOF
5357 #define NCURSES 1
5358 EOF
5359
5360 echo "$as_me:5360: checking for ncurses version" >&5
5361 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
5362 if test "${cf_cv_ncurses_version+set}" = set; then
5363   echo $ECHO_N "(cached) $ECHO_C" >&6
5364 else
5365
5366         cf_cv_ncurses_version=no
5367         cf_tempfile=out$$
5368         rm -f $cf_tempfile
5369         if test "$cross_compiling" = yes; then
5370
5371         # This will not work if the preprocessor splits the line after the
5372         # Autoconf token.  The 'unproto' program does that.
5373         cat > conftest.$ac_ext <<EOF
5374 #include <${cf_cv_ncurses_header:-curses.h}>
5375 #undef Autoconf
5376 #ifdef NCURSES_VERSION
5377 Autoconf NCURSES_VERSION
5378 #else
5379 #ifdef __NCURSES_H
5380 Autoconf "old"
5381 #endif
5382 ;
5383 #endif
5384 EOF
5385         cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
5386         { (eval echo "$as_me:5386: \"$cf_try\"") >&5
5387   (eval $cf_try) 2>&5
5388   ac_status=$?
5389   echo "$as_me:5389: \$? = $ac_status" >&5
5390   (exit $ac_status); }
5391         if test -f conftest.out ; then
5392                 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
5393                 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
5394                 rm -f conftest.out
5395         fi
5396
5397 else
5398   cat >conftest.$ac_ext <<_ACEOF
5399 #line 5399 "configure"
5400 #include "confdefs.h"
5401
5402 #include <${cf_cv_ncurses_header:-curses.h}>
5403 #include <stdio.h>
5404 int main()
5405 {
5406         FILE *fp = fopen("$cf_tempfile", "w");
5407 #ifdef NCURSES_VERSION
5408 # ifdef NCURSES_VERSION_PATCH
5409         fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
5410 # else
5411         fprintf(fp, "%s\n", NCURSES_VERSION);
5412 # endif
5413 #else
5414 # ifdef __NCURSES_H
5415         fprintf(fp, "old\n");
5416 # else
5417         make an error
5418 # endif
5419 #endif
5420         ${cf_cv_main_return:-return}(0);
5421 }
5422 _ACEOF
5423 rm -f conftest$ac_exeext
5424 if { (eval echo "$as_me:5424: \"$ac_link\"") >&5
5425   (eval $ac_link) 2>&5
5426   ac_status=$?
5427   echo "$as_me:5427: \$? = $ac_status" >&5
5428   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5429   { (eval echo "$as_me:5429: \"$ac_try\"") >&5
5430   (eval $ac_try) 2>&5
5431   ac_status=$?
5432   echo "$as_me:5432: \$? = $ac_status" >&5
5433   (exit $ac_status); }; }; then
5434
5435         cf_cv_ncurses_version=`cat $cf_tempfile`
5436 else
5437   echo "$as_me: program exited with status $ac_status" >&5
5438 echo "$as_me: failed program was:" >&5
5439 cat conftest.$ac_ext >&5
5440 fi
5441 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5442 fi
5443         rm -f $cf_tempfile
5444
5445 fi
5446 echo "$as_me:5446: result: $cf_cv_ncurses_version" >&5
5447 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
5448 test "$cf_cv_ncurses_version" = no || cat >>confdefs.h <<\EOF
5449 #define NCURSES 1
5450 EOF
5451
5452 cf_nculib_root=ncursesw
5453         # This works, except for the special case where we find gpm, but
5454         # ncurses is in a nonstandard location via $LIBS, and we really want
5455         # to link gpm.
5456 cf_ncurses_LIBS=""
5457 cf_ncurses_SAVE="$LIBS"
5458 echo "$as_me:5458: checking for Gpm_Open in -lgpm" >&5
5459 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
5460 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
5461   echo $ECHO_N "(cached) $ECHO_C" >&6
5462 else
5463   ac_check_lib_save_LIBS=$LIBS
5464 LIBS="-lgpm  $LIBS"
5465 cat >conftest.$ac_ext <<_ACEOF
5466 #line 5466 "configure"
5467 #include "confdefs.h"
5468
5469 /* Override any gcc2 internal prototype to avoid an error.  */
5470 #ifdef __cplusplus
5471 extern "C"
5472 #endif
5473 /* We use char because int might match the return type of a gcc2
5474    builtin and then its argument prototype would still apply.  */
5475 char Gpm_Open ();
5476 int
5477 main ()
5478 {
5479 Gpm_Open ();
5480   ;
5481   return 0;
5482 }
5483 _ACEOF
5484 rm -f conftest.$ac_objext conftest$ac_exeext
5485 if { (eval echo "$as_me:5485: \"$ac_link\"") >&5
5486   (eval $ac_link) 2>&5
5487   ac_status=$?
5488   echo "$as_me:5488: \$? = $ac_status" >&5
5489   (exit $ac_status); } &&
5490          { ac_try='test -s conftest$ac_exeext'
5491   { (eval echo "$as_me:5491: \"$ac_try\"") >&5
5492   (eval $ac_try) 2>&5
5493   ac_status=$?
5494   echo "$as_me:5494: \$? = $ac_status" >&5
5495   (exit $ac_status); }; }; then
5496   ac_cv_lib_gpm_Gpm_Open=yes
5497 else
5498   echo "$as_me: failed program was:" >&5
5499 cat conftest.$ac_ext >&5
5500 ac_cv_lib_gpm_Gpm_Open=no
5501 fi
5502 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5503 LIBS=$ac_check_lib_save_LIBS
5504 fi
5505 echo "$as_me:5505: result: $ac_cv_lib_gpm_Gpm_Open" >&5
5506 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
5507 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
5508   echo "$as_me:5508: checking for initscr in -lgpm" >&5
5509 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
5510 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
5511   echo $ECHO_N "(cached) $ECHO_C" >&6
5512 else
5513   ac_check_lib_save_LIBS=$LIBS
5514 LIBS="-lgpm  $LIBS"
5515 cat >conftest.$ac_ext <<_ACEOF
5516 #line 5516 "configure"
5517 #include "confdefs.h"
5518
5519 /* Override any gcc2 internal prototype to avoid an error.  */
5520 #ifdef __cplusplus
5521 extern "C"
5522 #endif
5523 /* We use char because int might match the return type of a gcc2
5524    builtin and then its argument prototype would still apply.  */
5525 char initscr ();
5526 int
5527 main ()
5528 {
5529 initscr ();
5530   ;
5531   return 0;
5532 }
5533 _ACEOF
5534 rm -f conftest.$ac_objext conftest$ac_exeext
5535 if { (eval echo "$as_me:5535: \"$ac_link\"") >&5
5536   (eval $ac_link) 2>&5
5537   ac_status=$?
5538   echo "$as_me:5538: \$? = $ac_status" >&5
5539   (exit $ac_status); } &&
5540          { ac_try='test -s conftest$ac_exeext'
5541   { (eval echo "$as_me:5541: \"$ac_try\"") >&5
5542   (eval $ac_try) 2>&5
5543   ac_status=$?
5544   echo "$as_me:5544: \$? = $ac_status" >&5
5545   (exit $ac_status); }; }; then
5546   ac_cv_lib_gpm_initscr=yes
5547 else
5548   echo "$as_me: failed program was:" >&5
5549 cat conftest.$ac_ext >&5
5550 ac_cv_lib_gpm_initscr=no
5551 fi
5552 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5553 LIBS=$ac_check_lib_save_LIBS
5554 fi
5555 echo "$as_me:5555: result: $ac_cv_lib_gpm_initscr" >&5
5556 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
5557 if test $ac_cv_lib_gpm_initscr = yes; then
5558   LIBS="$cf_ncurses_SAVE"
5559 else
5560   cf_ncurses_LIBS="-lgpm"
5561 fi
5562
5563 fi
5564
5565 case $host_os in #(vi
5566 freebsd*)
5567         # This is only necessary if you are linking against an obsolete
5568         # version of ncurses (but it should do no harm, since it's static).
5569         if test "$cf_nculib_root" = ncurses ; then
5570                 echo "$as_me:5570: checking for tgoto in -lmytinfo" >&5
5571 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
5572 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
5573   echo $ECHO_N "(cached) $ECHO_C" >&6
5574 else
5575   ac_check_lib_save_LIBS=$LIBS
5576 LIBS="-lmytinfo  $LIBS"
5577 cat >conftest.$ac_ext <<_ACEOF
5578 #line 5578 "configure"
5579 #include "confdefs.h"
5580
5581 /* Override any gcc2 internal prototype to avoid an error.  */
5582 #ifdef __cplusplus
5583 extern "C"
5584 #endif
5585 /* We use char because int might match the return type of a gcc2
5586    builtin and then its argument prototype would still apply.  */
5587 char tgoto ();
5588 int
5589 main ()
5590 {
5591 tgoto ();
5592   ;
5593   return 0;
5594 }
5595 _ACEOF
5596 rm -f conftest.$ac_objext conftest$ac_exeext
5597 if { (eval echo "$as_me:5597: \"$ac_link\"") >&5
5598   (eval $ac_link) 2>&5
5599   ac_status=$?
5600   echo "$as_me:5600: \$? = $ac_status" >&5
5601   (exit $ac_status); } &&
5602          { ac_try='test -s conftest$ac_exeext'
5603   { (eval echo "$as_me:5603: \"$ac_try\"") >&5
5604   (eval $ac_try) 2>&5
5605   ac_status=$?
5606   echo "$as_me:5606: \$? = $ac_status" >&5
5607   (exit $ac_status); }; }; then
5608   ac_cv_lib_mytinfo_tgoto=yes
5609 else
5610   echo "$as_me: failed program was:" >&5
5611 cat conftest.$ac_ext >&5
5612 ac_cv_lib_mytinfo_tgoto=no
5613 fi
5614 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5615 LIBS=$ac_check_lib_save_LIBS
5616 fi
5617 echo "$as_me:5617: result: $ac_cv_lib_mytinfo_tgoto" >&5
5618 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
5619 if test $ac_cv_lib_mytinfo_tgoto = yes; then
5620   cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
5621 fi
5622
5623         fi
5624         ;;
5625 esac
5626
5627 LIBS="$cf_ncurses_LIBS $LIBS"
5628
5629 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
5630 then
5631         LIBS="-l$cf_nculib_root $LIBS"
5632 else
5633
5634         eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
5635         cf_libdir=""
5636         echo "$as_me:5636: checking for initscr" >&5
5637 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
5638 if test "${ac_cv_func_initscr+set}" = set; then
5639   echo $ECHO_N "(cached) $ECHO_C" >&6
5640 else
5641   cat >conftest.$ac_ext <<_ACEOF
5642 #line 5642 "configure"
5643 #include "confdefs.h"
5644 /* System header to define __stub macros and hopefully few prototypes,
5645     which can conflict with char initscr (); below.  */
5646 #include <assert.h>
5647 /* Override any gcc2 internal prototype to avoid an error.  */
5648 #ifdef __cplusplus
5649 extern "C"
5650 #endif
5651 /* We use char because int might match the return type of a gcc2
5652    builtin and then its argument prototype would still apply.  */
5653 char initscr ();
5654 char (*f) ();
5655
5656 int
5657 main ()
5658 {
5659 /* The GNU C library defines this for functions which it implements
5660     to always fail with ENOSYS.  Some functions are actually named
5661     something starting with __ and the normal name is an alias.  */
5662 #if defined (__stub_initscr) || defined (__stub___initscr)
5663 choke me
5664 #else
5665 f = initscr;
5666 #endif
5667
5668   ;
5669   return 0;
5670 }
5671 _ACEOF
5672 rm -f conftest.$ac_objext conftest$ac_exeext
5673 if { (eval echo "$as_me:5673: \"$ac_link\"") >&5
5674   (eval $ac_link) 2>&5
5675   ac_status=$?
5676   echo "$as_me:5676: \$? = $ac_status" >&5
5677   (exit $ac_status); } &&
5678          { ac_try='test -s conftest$ac_exeext'
5679   { (eval echo "$as_me:5679: \"$ac_try\"") >&5
5680   (eval $ac_try) 2>&5
5681   ac_status=$?
5682   echo "$as_me:5682: \$? = $ac_status" >&5
5683   (exit $ac_status); }; }; then
5684   ac_cv_func_initscr=yes
5685 else
5686   echo "$as_me: failed program was:" >&5
5687 cat conftest.$ac_ext >&5
5688 ac_cv_func_initscr=no
5689 fi
5690 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5691 fi
5692 echo "$as_me:5692: result: $ac_cv_func_initscr" >&5
5693 echo "${ECHO_T}$ac_cv_func_initscr" >&6
5694 if test $ac_cv_func_initscr = yes; then
5695   eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
5696 else
5697
5698                 cf_save_LIBS="$LIBS"
5699                 echo "$as_me:5699: checking for initscr in -l$cf_nculib_root" >&5
5700 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
5701                 LIBS="-l$cf_nculib_root $LIBS"
5702                 cat >conftest.$ac_ext <<_ACEOF
5703 #line 5703 "configure"
5704 #include "confdefs.h"
5705 #include <${cf_cv_ncurses_header:-curses.h}>
5706 int
5707 main ()
5708 {
5709 initscr()
5710   ;
5711   return 0;
5712 }
5713 _ACEOF
5714 rm -f conftest.$ac_objext conftest$ac_exeext
5715 if { (eval echo "$as_me:5715: \"$ac_link\"") >&5
5716   (eval $ac_link) 2>&5
5717   ac_status=$?
5718   echo "$as_me:5718: \$? = $ac_status" >&5
5719   (exit $ac_status); } &&
5720          { ac_try='test -s conftest$ac_exeext'
5721   { (eval echo "$as_me:5721: \"$ac_try\"") >&5
5722   (eval $ac_try) 2>&5
5723   ac_status=$?
5724   echo "$as_me:5724: \$? = $ac_status" >&5
5725   (exit $ac_status); }; }; then
5726   echo "$as_me:5726: result: yes" >&5
5727 echo "${ECHO_T}yes" >&6
5728                          eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
5729
5730 else
5731   echo "$as_me: failed program was:" >&5
5732 cat conftest.$ac_ext >&5
5733 echo "$as_me:5733: result: no" >&5
5734 echo "${ECHO_T}no" >&6
5735
5736 cf_search=
5737 cf_library_path_list=""
5738 if test -n "${LDFLAGS}${LIBS}" ; then
5739         for cf_library_path in $LDFLAGS $LIBS
5740         do
5741                 case $cf_library_path in #(vi
5742                 -L*)
5743                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
5744
5745 test "$cf_library_path" != "NONE" && \
5746 test -d "$cf_library_path" && \
5747  {
5748         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
5749         test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
5750         test -d $cf_library_path/lib/$cf_nculib_root &&       cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
5751         test -d $cf_library_path/lib/$cf_nculib_root/lib &&    cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
5752         test -d $cf_library_path/$cf_nculib_root/lib &&       cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
5753         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"
5754 }
5755
5756                         cf_library_path_list="$cf_library_path_list $cf_search"
5757                         ;;
5758                 esac
5759         done
5760 fi
5761
5762 cf_search=
5763
5764 test "/usr" != "$prefix" && \
5765 test -d "/usr" && \
5766 (test $prefix = NONE || test "/usr" != "$prefix") && {
5767         test -n "$verbose" && echo "    ... testing for lib-directories under /usr"
5768         test -d /usr/lib &&          cf_search="$cf_search /usr/lib"
5769         test -d /usr/lib/$cf_nculib_root &&       cf_search="$cf_search /usr/lib/$cf_nculib_root"
5770         test -d /usr/lib/$cf_nculib_root/lib &&    cf_search="$cf_search /usr/lib/$cf_nculib_root/lib"
5771         test -d /usr/$cf_nculib_root/lib &&       cf_search="$cf_search /usr/$cf_nculib_root/lib"
5772         test -d /usr/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search /usr/$cf_nculib_root/lib/$cf_nculib_root"
5773 }
5774
5775 test "$prefix" != "NONE" && \
5776 test -d "$prefix" && \
5777  {
5778         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
5779         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
5780         test -d $prefix/lib/$cf_nculib_root &&       cf_search="$cf_search $prefix/lib/$cf_nculib_root"
5781         test -d $prefix/lib/$cf_nculib_root/lib &&    cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
5782         test -d $prefix/$cf_nculib_root/lib &&       cf_search="$cf_search $prefix/$cf_nculib_root/lib"
5783         test -d $prefix/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
5784 }
5785
5786 test "/usr/local" != "$prefix" && \
5787 test -d "/usr/local" && \
5788 (test $prefix = NONE || test "/usr/local" != "$prefix") && {
5789         test -n "$verbose" && echo "    ... testing for lib-directories under /usr/local"
5790         test -d /usr/local/lib &&          cf_search="$cf_search /usr/local/lib"
5791         test -d /usr/local/lib/$cf_nculib_root &&       cf_search="$cf_search /usr/local/lib/$cf_nculib_root"
5792         test -d /usr/local/lib/$cf_nculib_root/lib &&    cf_search="$cf_search /usr/local/lib/$cf_nculib_root/lib"
5793         test -d /usr/local/$cf_nculib_root/lib &&       cf_search="$cf_search /usr/local/$cf_nculib_root/lib"
5794         test -d /usr/local/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search /usr/local/$cf_nculib_root/lib/$cf_nculib_root"
5795 }
5796
5797 test "/opt" != "$prefix" && \
5798 test -d "/opt" && \
5799 (test $prefix = NONE || test "/opt" != "$prefix") && {
5800         test -n "$verbose" && echo "    ... testing for lib-directories under /opt"
5801         test -d /opt/lib &&          cf_search="$cf_search /opt/lib"
5802         test -d /opt/lib/$cf_nculib_root &&       cf_search="$cf_search /opt/lib/$cf_nculib_root"
5803         test -d /opt/lib/$cf_nculib_root/lib &&    cf_search="$cf_search /opt/lib/$cf_nculib_root/lib"
5804         test -d /opt/$cf_nculib_root/lib &&       cf_search="$cf_search /opt/$cf_nculib_root/lib"
5805         test -d /opt/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search /opt/$cf_nculib_root/lib/$cf_nculib_root"
5806 }
5807
5808 test "$HOME" != "$prefix" && \
5809 test -d "$HOME" && \
5810 (test $prefix = NONE || test "$HOME" != "$prefix") && {
5811         test -n "$verbose" && echo "    ... testing for lib-directories under $HOME"
5812         test -d $HOME/lib &&          cf_search="$cf_search $HOME/lib"
5813         test -d $HOME/lib/$cf_nculib_root &&       cf_search="$cf_search $HOME/lib/$cf_nculib_root"
5814         test -d $HOME/lib/$cf_nculib_root/lib &&    cf_search="$cf_search $HOME/lib/$cf_nculib_root/lib"
5815         test -d $HOME/$cf_nculib_root/lib &&       cf_search="$cf_search $HOME/$cf_nculib_root/lib"
5816         test -d $HOME/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search $HOME/$cf_nculib_root/lib/$cf_nculib_root"
5817 }
5818
5819 cf_search="$cf_library_path_list $cf_search"
5820
5821                         for cf_libdir in $cf_search
5822                         do
5823                                 echo "$as_me:5823: checking for -l$cf_nculib_root in $cf_libdir" >&5
5824 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
5825                                 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
5826                                 cat >conftest.$ac_ext <<_ACEOF
5827 #line 5827 "configure"
5828 #include "confdefs.h"
5829 #include <${cf_cv_ncurses_header:-curses.h}>
5830 int
5831 main ()
5832 {
5833 initscr()
5834   ;
5835   return 0;
5836 }
5837 _ACEOF
5838 rm -f conftest.$ac_objext conftest$ac_exeext
5839 if { (eval echo "$as_me:5839: \"$ac_link\"") >&5
5840   (eval $ac_link) 2>&5
5841   ac_status=$?
5842   echo "$as_me:5842: \$? = $ac_status" >&5
5843   (exit $ac_status); } &&
5844          { ac_try='test -s conftest$ac_exeext'
5845   { (eval echo "$as_me:5845: \"$ac_try\"") >&5
5846   (eval $ac_try) 2>&5
5847   ac_status=$?
5848   echo "$as_me:5848: \$? = $ac_status" >&5
5849   (exit $ac_status); }; }; then
5850   echo "$as_me:5850: result: yes" >&5
5851 echo "${ECHO_T}yes" >&6
5852                                          eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
5853                                          break
5854 else
5855   echo "$as_me: failed program was:" >&5
5856 cat conftest.$ac_ext >&5
5857 echo "$as_me:5857: result: no" >&5
5858 echo "${ECHO_T}no" >&6
5859                                          LIBS="$cf_save_LIBS"
5860 fi
5861 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5862                         done
5863
5864 fi
5865 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5866
5867 fi
5868
5869 eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root
5870
5871 if test $cf_found_library = no ; then
5872         { { echo "$as_me:5872: error: Cannot link $cf_nculib_root library" >&5
5873 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
5874    { (exit 1); exit 1; }; }
5875 fi
5876
5877 fi
5878
5879 if test -n "$cf_ncurses_LIBS" ; then
5880         echo "$as_me:5880: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
5881 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
5882         cf_ncurses_SAVE="$LIBS"
5883         for p in $cf_ncurses_LIBS ; do
5884                 q=`echo $LIBS | sed -e "s%$p %%" -e "s%$p$%%"`
5885                 if test "$q" != "$LIBS" ; then
5886                         LIBS="$q"
5887                 fi
5888         done
5889         cat >conftest.$ac_ext <<_ACEOF
5890 #line 5890 "configure"
5891 #include "confdefs.h"
5892 #include <${cf_cv_ncurses_header:-curses.h}>
5893 int
5894 main ()
5895 {
5896 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
5897   ;
5898   return 0;
5899 }
5900 _ACEOF
5901 rm -f conftest.$ac_objext conftest$ac_exeext
5902 if { (eval echo "$as_me:5902: \"$ac_link\"") >&5
5903   (eval $ac_link) 2>&5
5904   ac_status=$?
5905   echo "$as_me:5905: \$? = $ac_status" >&5
5906   (exit $ac_status); } &&
5907          { ac_try='test -s conftest$ac_exeext'
5908   { (eval echo "$as_me:5908: \"$ac_try\"") >&5
5909   (eval $ac_try) 2>&5
5910   ac_status=$?
5911   echo "$as_me:5911: \$? = $ac_status" >&5
5912   (exit $ac_status); }; }; then
5913   echo "$as_me:5913: result: yes" >&5
5914 echo "${ECHO_T}yes" >&6
5915 else
5916   echo "$as_me: failed program was:" >&5
5917 cat conftest.$ac_ext >&5
5918 echo "$as_me:5918: result: no" >&5
5919 echo "${ECHO_T}no" >&6
5920                  LIBS="$cf_ncurses_SAVE"
5921 fi
5922 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5923 fi
5924
5925 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
5926
5927 cat >>confdefs.h <<EOF
5928 #define $cf_nculib_ROOT 1
5929 EOF
5930
5931 fi
5932
5933 else
5934
5935 cf_ncuconfig_root=ncurses
5936
5937 echo "Looking for ${cf_ncuconfig_root}-config"
5938 for ac_prog in ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
5939 do
5940   # Extract the first word of "$ac_prog", so it can be a program name with args.
5941 set dummy $ac_prog; ac_word=$2
5942 echo "$as_me:5942: checking for $ac_word" >&5
5943 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5944 if test "${ac_cv_path_NCURSES_CONFIG+set}" = set; then
5945   echo $ECHO_N "(cached) $ECHO_C" >&6
5946 else
5947   case $NCURSES_CONFIG in
5948   [\\/]* | ?:[\\/]*)
5949   ac_cv_path_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test with a path.
5950   ;;
5951   *)
5952   ac_save_IFS=$IFS; IFS=$ac_path_separator
5953 ac_dummy="$PATH"
5954 for ac_dir in $ac_dummy; do
5955   IFS=$ac_save_IFS
5956   test -z "$ac_dir" && ac_dir=.
5957   if $as_executable_p "$ac_dir/$ac_word"; then
5958    ac_cv_path_NCURSES_CONFIG="$ac_dir/$ac_word"
5959    echo "$as_me:5959: found $ac_dir/$ac_word" >&5
5960    break
5961 fi
5962 done
5963
5964   ;;
5965 esac
5966 fi
5967 NCURSES_CONFIG=$ac_cv_path_NCURSES_CONFIG
5968
5969 if test -n "$NCURSES_CONFIG"; then
5970   echo "$as_me:5970: result: $NCURSES_CONFIG" >&5
5971 echo "${ECHO_T}$NCURSES_CONFIG" >&6
5972 else
5973   echo "$as_me:5973: result: no" >&5
5974 echo "${ECHO_T}no" >&6
5975 fi
5976
5977   test -n "$NCURSES_CONFIG" && break
5978 done
5979 test -n "$NCURSES_CONFIG" || NCURSES_CONFIG="none"
5980
5981 if test "$NCURSES_CONFIG" != none ; then
5982
5983 CPPFLAGS="$CPPFLAGS `$NCURSES_CONFIG --cflags`"
5984 LIBS="`$NCURSES_CONFIG --libs` $LIBS"
5985
5986 # even with config script, some packages use no-override for curses.h
5987
5988 echo "$as_me:5988: checking if we have identified curses headers" >&5
5989 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
5990 if test "${cf_cv_ncurses_header+set}" = set; then
5991   echo $ECHO_N "(cached) $ECHO_C" >&6
5992 else
5993
5994 cf_cv_ncurses_header=none
5995 for cf_header in  \
5996     ncurses/ncurses.h \
5997         ncurses/curses.h \
5998         ncurses.h \
5999         curses.h
6000 do
6001 cat >conftest.$ac_ext <<_ACEOF
6002 #line 6002 "configure"
6003 #include "confdefs.h"
6004 #include <${cf_header}>
6005 int
6006 main ()
6007 {
6008 initscr(); tgoto("?", 0,0)
6009   ;
6010   return 0;
6011 }
6012 _ACEOF
6013 rm -f conftest.$ac_objext
6014 if { (eval echo "$as_me:6014: \"$ac_compile\"") >&5
6015   (eval $ac_compile) 2>&5
6016   ac_status=$?
6017   echo "$as_me:6017: \$? = $ac_status" >&5
6018   (exit $ac_status); } &&
6019          { ac_try='test -s conftest.$ac_objext'
6020   { (eval echo "$as_me:6020: \"$ac_try\"") >&5
6021   (eval $ac_try) 2>&5
6022   ac_status=$?
6023   echo "$as_me:6023: \$? = $ac_status" >&5
6024   (exit $ac_status); }; }; then
6025   cf_cv_ncurses_header=$cf_header; break
6026 else
6027   echo "$as_me: failed program was:" >&5
6028 cat conftest.$ac_ext >&5
6029 fi
6030 rm -f conftest.$ac_objext conftest.$ac_ext
6031 done
6032
6033 fi
6034 echo "$as_me:6034: result: $cf_cv_ncurses_header" >&5
6035 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
6036
6037 if test "$cf_cv_ncurses_header" = none ; then
6038         { { echo "$as_me:6038: error: No curses header-files found" >&5
6039 echo "$as_me: error: No curses header-files found" >&2;}
6040    { (exit 1); exit 1; }; }
6041 fi
6042
6043 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
6044
6045 for ac_header in $cf_cv_ncurses_header
6046 do
6047 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6048 echo "$as_me:6048: checking for $ac_header" >&5
6049 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6050 if eval "test \"\${$as_ac_Header+set}\" = set"; then
6051   echo $ECHO_N "(cached) $ECHO_C" >&6
6052 else
6053   cat >conftest.$ac_ext <<_ACEOF
6054 #line 6054 "configure"
6055 #include "confdefs.h"
6056 #include <$ac_header>
6057 _ACEOF
6058 if { (eval echo "$as_me:6058: \"$ac_cpp conftest.$ac_ext\"") >&5
6059   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6060   ac_status=$?
6061   egrep -v '^ *\+' conftest.er1 >conftest.err
6062   rm -f conftest.er1
6063   cat conftest.err >&5
6064   echo "$as_me:6064: \$? = $ac_status" >&5
6065   (exit $ac_status); } >/dev/null; then
6066   if test -s conftest.err; then
6067     ac_cpp_err=$ac_c_preproc_warn_flag
6068   else
6069     ac_cpp_err=
6070   fi
6071 else
6072   ac_cpp_err=yes
6073 fi
6074 if test -z "$ac_cpp_err"; then
6075   eval "$as_ac_Header=yes"
6076 else
6077   echo "$as_me: failed program was:" >&5
6078   cat conftest.$ac_ext >&5
6079   eval "$as_ac_Header=no"
6080 fi
6081 rm -f conftest.err conftest.$ac_ext
6082 fi
6083 echo "$as_me:6083: result: `eval echo '${'$as_ac_Header'}'`" >&5
6084 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
6085 if test `eval echo '${'$as_ac_Header'}'` = yes; then
6086   cat >>confdefs.h <<EOF
6087 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6088 EOF
6089
6090 fi
6091 done
6092
6093 cat >>confdefs.h <<\EOF
6094 #define NCURSES 1
6095 EOF
6096
6097 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
6098
6099 cat >>confdefs.h <<EOF
6100 #define $cf_nculib_ROOT 1
6101 EOF
6102
6103 cf_cv_ncurses_version=`$NCURSES_CONFIG --version`
6104
6105 else
6106
6107 cf_ncuhdr_root=ncurses
6108
6109 test -n "$cf_cv_curses_dir" && \
6110 test "$cf_cv_curses_dir" != "no" && { \
6111
6112 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
6113   for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
6114   do
6115         while test $cf_add_incdir != /usr/include
6116         do
6117           if test -d $cf_add_incdir
6118           then
6119                 cf_have_incdir=no
6120                 if test -n "$CFLAGS$CPPFLAGS" ; then
6121                   # a loop is needed to ensure we can add subdirs of existing dirs
6122                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
6123                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
6124                           cf_have_incdir=yes; break
6125                         fi
6126                   done
6127                 fi
6128
6129                 if test "$cf_have_incdir" = no ; then
6130                   if test "$cf_add_incdir" = /usr/local/include ; then
6131                         if test "$GCC" = yes
6132                         then
6133                           cf_save_CPPFLAGS=$CPPFLAGS
6134                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6135                           cat >conftest.$ac_ext <<_ACEOF
6136 #line 6136 "configure"
6137 #include "confdefs.h"
6138 #include <stdio.h>
6139 int
6140 main ()
6141 {
6142 printf("Hello")
6143   ;
6144   return 0;
6145 }
6146 _ACEOF
6147 rm -f conftest.$ac_objext
6148 if { (eval echo "$as_me:6148: \"$ac_compile\"") >&5
6149   (eval $ac_compile) 2>&5
6150   ac_status=$?
6151   echo "$as_me:6151: \$? = $ac_status" >&5
6152   (exit $ac_status); } &&
6153          { ac_try='test -s conftest.$ac_objext'
6154   { (eval echo "$as_me:6154: \"$ac_try\"") >&5
6155   (eval $ac_try) 2>&5
6156   ac_status=$?
6157   echo "$as_me:6157: \$? = $ac_status" >&5
6158   (exit $ac_status); }; }; then
6159   :
6160 else
6161   echo "$as_me: failed program was:" >&5
6162 cat conftest.$ac_ext >&5
6163 cf_have_incdir=yes
6164 fi
6165 rm -f conftest.$ac_objext conftest.$ac_ext
6166                           CPPFLAGS=$cf_save_CPPFLAGS
6167                         fi
6168                   fi
6169                 fi
6170
6171                 if test "$cf_have_incdir" = no ; then
6172                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
6173
6174 echo "${as_me:-configure}:6174: testing adding $cf_add_incdir to include-path ..." 1>&5
6175
6176                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6177
6178                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
6179                   test "$cf_top_incdir" = "$cf_add_incdir" && break
6180                   cf_add_incdir="$cf_top_incdir"
6181                 else
6182                   break
6183                 fi
6184           fi
6185         done
6186   done
6187 fi
6188
6189 }
6190
6191 echo "$as_me:6191: checking for $cf_ncuhdr_root header in include-path" >&5
6192 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
6193 if test "${cf_cv_ncurses_h+set}" = set; then
6194   echo $ECHO_N "(cached) $ECHO_C" >&6
6195 else
6196
6197         cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
6198         ( test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw ) && cf_header_list="$cf_header_list curses.h ncurses.h"
6199         for cf_header in $cf_header_list
6200         do
6201
6202         cat >conftest.$ac_ext <<_ACEOF
6203 #line 6203 "configure"
6204 #include "confdefs.h"
6205
6206 #include <$cf_header>
6207 int
6208 main ()
6209 {
6210
6211 #ifdef NCURSES_VERSION
6212
6213 printf("%s\n", NCURSES_VERSION);
6214 #else
6215 #ifdef __NCURSES_H
6216 printf("old\n");
6217 #else
6218         make an error
6219 #endif
6220 #endif
6221
6222   ;
6223   return 0;
6224 }
6225 _ACEOF
6226 rm -f conftest.$ac_objext
6227 if { (eval echo "$as_me:6227: \"$ac_compile\"") >&5
6228   (eval $ac_compile) 2>&5
6229   ac_status=$?
6230   echo "$as_me:6230: \$? = $ac_status" >&5
6231   (exit $ac_status); } &&
6232          { ac_try='test -s conftest.$ac_objext'
6233   { (eval echo "$as_me:6233: \"$ac_try\"") >&5
6234   (eval $ac_try) 2>&5
6235   ac_status=$?
6236   echo "$as_me:6236: \$? = $ac_status" >&5
6237   (exit $ac_status); }; }; then
6238   cf_cv_ncurses_h=$cf_header
6239
6240 else
6241   echo "$as_me: failed program was:" >&5
6242 cat conftest.$ac_ext >&5
6243 cf_cv_ncurses_h=no
6244 fi
6245 rm -f conftest.$ac_objext conftest.$ac_ext
6246
6247                 test "$cf_cv_ncurses_h" != no && break
6248         done
6249
6250 fi
6251 echo "$as_me:6251: result: $cf_cv_ncurses_h" >&5
6252 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
6253
6254 if test "$cf_cv_ncurses_h" != no ; then
6255         cf_cv_ncurses_header=$cf_cv_ncurses_h
6256 else
6257
6258 echo "$as_me:6258: checking for $cf_ncuhdr_root include-path" >&5
6259 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
6260 if test "${cf_cv_ncurses_h2+set}" = set; then
6261   echo $ECHO_N "(cached) $ECHO_C" >&6
6262 else
6263
6264         test -n "$verbose" && echo
6265
6266 cf_search=
6267
6268 # collect the current set of include-directories from compiler flags
6269 cf_header_path_list=""
6270 if test -n "${CFLAGS}${CPPFLAGS}" ; then
6271         for cf_header_path in $CPPFLAGS $CFLAGS
6272         do
6273                 case $cf_header_path in #(vi
6274                 -I*)
6275                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
6276
6277 test "$cf_header_path" != "NONE" && \
6278 test -d "$cf_header_path" && \
6279  {
6280         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
6281         test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
6282         test -d $cf_header_path/include/$cf_ncuhdr_root &&       cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
6283         test -d $cf_header_path/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
6284         test -d $cf_header_path/$cf_ncuhdr_root/include &&       cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
6285         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"
6286 }
6287
6288                         cf_header_path_list="$cf_header_path_list $cf_search"
6289                         ;;
6290                 esac
6291         done
6292 fi
6293
6294 # add the variations for the package we are looking for
6295
6296 cf_search=
6297
6298 test "/usr" != "$prefix" && \
6299 test -d "/usr" && \
6300 (test $prefix = NONE || test "/usr" != "$prefix") && {
6301         test -n "$verbose" && echo "    ... testing for include-directories under /usr"
6302         test -d /usr/include &&          cf_search="$cf_search /usr/include"
6303         test -d /usr/include/$cf_ncuhdr_root &&       cf_search="$cf_search /usr/include/$cf_ncuhdr_root"
6304         test -d /usr/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search /usr/include/$cf_ncuhdr_root/include"
6305         test -d /usr/$cf_ncuhdr_root/include &&       cf_search="$cf_search /usr/$cf_ncuhdr_root/include"
6306         test -d /usr/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search /usr/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
6307 }
6308
6309 test "$prefix" != "NONE" && \
6310 test -d "$prefix" && \
6311  {
6312         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
6313         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
6314         test -d $prefix/include/$cf_ncuhdr_root &&       cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
6315         test -d $prefix/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
6316         test -d $prefix/$cf_ncuhdr_root/include &&       cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
6317         test -d $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
6318 }
6319
6320 test "/usr/local" != "$prefix" && \
6321 test -d "/usr/local" && \
6322 (test $prefix = NONE || test "/usr/local" != "$prefix") && {
6323         test -n "$verbose" && echo "    ... testing for include-directories under /usr/local"
6324         test -d /usr/local/include &&          cf_search="$cf_search /usr/local/include"
6325         test -d /usr/local/include/$cf_ncuhdr_root &&       cf_search="$cf_search /usr/local/include/$cf_ncuhdr_root"
6326         test -d /usr/local/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search /usr/local/include/$cf_ncuhdr_root/include"
6327         test -d /usr/local/$cf_ncuhdr_root/include &&       cf_search="$cf_search /usr/local/$cf_ncuhdr_root/include"
6328         test -d /usr/local/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search /usr/local/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
6329 }
6330
6331 test "/opt" != "$prefix" && \
6332 test -d "/opt" && \
6333 (test $prefix = NONE || test "/opt" != "$prefix") && {
6334         test -n "$verbose" && echo "    ... testing for include-directories under /opt"
6335         test -d /opt/include &&          cf_search="$cf_search /opt/include"
6336         test -d /opt/include/$cf_ncuhdr_root &&       cf_search="$cf_search /opt/include/$cf_ncuhdr_root"
6337         test -d /opt/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search /opt/include/$cf_ncuhdr_root/include"
6338         test -d /opt/$cf_ncuhdr_root/include &&       cf_search="$cf_search /opt/$cf_ncuhdr_root/include"
6339         test -d /opt/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search /opt/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
6340 }
6341
6342 test "$HOME" != "$prefix" && \
6343 test -d "$HOME" && \
6344 (test $prefix = NONE || test "$HOME" != "$prefix") && {
6345         test -n "$verbose" && echo "    ... testing for include-directories under $HOME"
6346         test -d $HOME/include &&          cf_search="$cf_search $HOME/include"
6347         test -d $HOME/include/$cf_ncuhdr_root &&       cf_search="$cf_search $HOME/include/$cf_ncuhdr_root"
6348         test -d $HOME/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search $HOME/include/$cf_ncuhdr_root/include"
6349         test -d $HOME/$cf_ncuhdr_root/include &&       cf_search="$cf_search $HOME/$cf_ncuhdr_root/include"
6350         test -d $HOME/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search $HOME/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
6351 }
6352
6353 test "$includedir" != NONE && \
6354 test "$includedir" != "/usr/include" && \
6355 test -d "$includedir" && {
6356         test -d $includedir &&    cf_search="$cf_search $includedir"
6357         test -d $includedir/$cf_ncuhdr_root && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
6358 }
6359
6360 test "$oldincludedir" != NONE && \
6361 test "$oldincludedir" != "/usr/include" && \
6362 test -d "$oldincludedir" && {
6363         test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
6364         test -d $oldincludedir/$cf_ncuhdr_root && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
6365 }
6366
6367 cf_search="$cf_search $cf_header_path_list"
6368
6369         test -n "$verbose" && echo search path $cf_search
6370         cf_save2_CPPFLAGS="$CPPFLAGS"
6371         for cf_incdir in $cf_search
6372         do
6373
6374 if test -n "$cf_incdir" ; then
6375   for cf_add_incdir in $cf_incdir
6376   do
6377         while test $cf_add_incdir != /usr/include
6378         do
6379           if test -d $cf_add_incdir
6380           then
6381                 cf_have_incdir=no
6382                 if test -n "$CFLAGS$CPPFLAGS" ; then
6383                   # a loop is needed to ensure we can add subdirs of existing dirs
6384                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
6385                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
6386                           cf_have_incdir=yes; break
6387                         fi
6388                   done
6389                 fi
6390
6391                 if test "$cf_have_incdir" = no ; then
6392                   if test "$cf_add_incdir" = /usr/local/include ; then
6393                         if test "$GCC" = yes
6394                         then
6395                           cf_save_CPPFLAGS=$CPPFLAGS
6396                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6397                           cat >conftest.$ac_ext <<_ACEOF
6398 #line 6398 "configure"
6399 #include "confdefs.h"
6400 #include <stdio.h>
6401 int
6402 main ()
6403 {
6404 printf("Hello")
6405   ;
6406   return 0;
6407 }
6408 _ACEOF
6409 rm -f conftest.$ac_objext
6410 if { (eval echo "$as_me:6410: \"$ac_compile\"") >&5
6411   (eval $ac_compile) 2>&5
6412   ac_status=$?
6413   echo "$as_me:6413: \$? = $ac_status" >&5
6414   (exit $ac_status); } &&
6415          { ac_try='test -s conftest.$ac_objext'
6416   { (eval echo "$as_me:6416: \"$ac_try\"") >&5
6417   (eval $ac_try) 2>&5
6418   ac_status=$?
6419   echo "$as_me:6419: \$? = $ac_status" >&5
6420   (exit $ac_status); }; }; then
6421   :
6422 else
6423   echo "$as_me: failed program was:" >&5
6424 cat conftest.$ac_ext >&5
6425 cf_have_incdir=yes
6426 fi
6427 rm -f conftest.$ac_objext conftest.$ac_ext
6428                           CPPFLAGS=$cf_save_CPPFLAGS
6429                         fi
6430                   fi
6431                 fi
6432
6433                 if test "$cf_have_incdir" = no ; then
6434                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
6435
6436 echo "${as_me:-configure}:6436: testing adding $cf_add_incdir to include-path ..." 1>&5
6437
6438                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6439
6440                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
6441                   test "$cf_top_incdir" = "$cf_add_incdir" && break
6442                   cf_add_incdir="$cf_top_incdir"
6443                 else
6444                   break
6445                 fi
6446           fi
6447         done
6448   done
6449 fi
6450
6451                 for cf_header in \
6452                         ncurses.h \
6453                         curses.h
6454                 do
6455
6456         cat >conftest.$ac_ext <<_ACEOF
6457 #line 6457 "configure"
6458 #include "confdefs.h"
6459
6460 #include <$cf_header>
6461 int
6462 main ()
6463 {
6464
6465 #ifdef NCURSES_VERSION
6466
6467 printf("%s\n", NCURSES_VERSION);
6468 #else
6469 #ifdef __NCURSES_H
6470 printf("old\n");
6471 #else
6472         make an error
6473 #endif
6474 #endif
6475
6476   ;
6477   return 0;
6478 }
6479 _ACEOF
6480 rm -f conftest.$ac_objext
6481 if { (eval echo "$as_me:6481: \"$ac_compile\"") >&5
6482   (eval $ac_compile) 2>&5
6483   ac_status=$?
6484   echo "$as_me:6484: \$? = $ac_status" >&5
6485   (exit $ac_status); } &&
6486          { ac_try='test -s conftest.$ac_objext'
6487   { (eval echo "$as_me:6487: \"$ac_try\"") >&5
6488   (eval $ac_try) 2>&5
6489   ac_status=$?
6490   echo "$as_me:6490: \$? = $ac_status" >&5
6491   (exit $ac_status); }; }; then
6492   cf_cv_ncurses_h2=$cf_header
6493
6494 else
6495   echo "$as_me: failed program was:" >&5
6496 cat conftest.$ac_ext >&5
6497 cf_cv_ncurses_h2=no
6498 fi
6499 rm -f conftest.$ac_objext conftest.$ac_ext
6500
6501                         if test "$cf_cv_ncurses_h2" != no ; then
6502                                 cf_cv_ncurses_h2=$cf_incdir/$cf_header
6503                                 test -n "$verbose" && echo $ac_n "      ... found $ac_c" 1>&6
6504                                 break
6505                         fi
6506                         test -n "$verbose" && echo "    ... tested $cf_incdir/$cf_header" 1>&6
6507                 done
6508                 CPPFLAGS="$cf_save2_CPPFLAGS"
6509                 test "$cf_cv_ncurses_h2" != no && break
6510         done
6511         test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:6511: error: not found" >&5
6512 echo "$as_me: error: not found" >&2;}
6513    { (exit 1); exit 1; }; }
6514
6515 fi
6516 echo "$as_me:6516: result: $cf_cv_ncurses_h2" >&5
6517 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
6518
6519         cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's%/[^/]*$%%'`
6520         cf_cv_ncurses_header=`basename $cf_cv_ncurses_h2`
6521         if test `basename $cf_1st_incdir` = $cf_ncuhdr_root ; then
6522                 cf_cv_ncurses_header=$cf_ncuhdr_root/$cf_cv_ncurses_header
6523         fi
6524
6525 if test -n "$cf_1st_incdir" ; then
6526   for cf_add_incdir in $cf_1st_incdir
6527   do
6528         while test $cf_add_incdir != /usr/include
6529         do
6530           if test -d $cf_add_incdir
6531           then
6532                 cf_have_incdir=no
6533                 if test -n "$CFLAGS$CPPFLAGS" ; then
6534                   # a loop is needed to ensure we can add subdirs of existing dirs
6535                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
6536                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
6537                           cf_have_incdir=yes; break
6538                         fi
6539                   done
6540                 fi
6541
6542                 if test "$cf_have_incdir" = no ; then
6543                   if test "$cf_add_incdir" = /usr/local/include ; then
6544                         if test "$GCC" = yes
6545                         then
6546                           cf_save_CPPFLAGS=$CPPFLAGS
6547                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6548                           cat >conftest.$ac_ext <<_ACEOF
6549 #line 6549 "configure"
6550 #include "confdefs.h"
6551 #include <stdio.h>
6552 int
6553 main ()
6554 {
6555 printf("Hello")
6556   ;
6557   return 0;
6558 }
6559 _ACEOF
6560 rm -f conftest.$ac_objext
6561 if { (eval echo "$as_me:6561: \"$ac_compile\"") >&5
6562   (eval $ac_compile) 2>&5
6563   ac_status=$?
6564   echo "$as_me:6564: \$? = $ac_status" >&5
6565   (exit $ac_status); } &&
6566          { ac_try='test -s conftest.$ac_objext'
6567   { (eval echo "$as_me:6567: \"$ac_try\"") >&5
6568   (eval $ac_try) 2>&5
6569   ac_status=$?
6570   echo "$as_me:6570: \$? = $ac_status" >&5
6571   (exit $ac_status); }; }; then
6572   :
6573 else
6574   echo "$as_me: failed program was:" >&5
6575 cat conftest.$ac_ext >&5
6576 cf_have_incdir=yes
6577 fi
6578 rm -f conftest.$ac_objext conftest.$ac_ext
6579                           CPPFLAGS=$cf_save_CPPFLAGS
6580                         fi
6581                   fi
6582                 fi
6583
6584                 if test "$cf_have_incdir" = no ; then
6585                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
6586
6587 echo "${as_me:-configure}:6587: testing adding $cf_add_incdir to include-path ..." 1>&5
6588
6589                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6590
6591                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
6592                   test "$cf_top_incdir" = "$cf_add_incdir" && break
6593                   cf_add_incdir="$cf_top_incdir"
6594                 else
6595                   break
6596                 fi
6597           fi
6598         done
6599   done
6600 fi
6601
6602 fi
6603
6604 # Set definitions to allow ifdef'ing for ncurses.h
6605
6606 case $cf_cv_ncurses_header in # (vi
6607 *ncurses.h)
6608         cat >>confdefs.h <<\EOF
6609 #define HAVE_NCURSES_H 1
6610 EOF
6611
6612         ;;
6613 esac
6614
6615 case $cf_cv_ncurses_header in # (vi
6616 ncurses/curses.h|ncurses/ncurses.h)
6617         cat >>confdefs.h <<\EOF
6618 #define HAVE_NCURSES_NCURSES_H 1
6619 EOF
6620
6621         ;;
6622 ncursesw/curses.h|ncursesw/ncurses.h)
6623         cat >>confdefs.h <<\EOF
6624 #define HAVE_NCURSESW_NCURSES_H 1
6625 EOF
6626
6627         ;;
6628 esac
6629
6630 echo "$as_me:6630: checking for terminfo header" >&5
6631 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
6632 if test "${cf_cv_term_header+set}" = set; then
6633   echo $ECHO_N "(cached) $ECHO_C" >&6
6634 else
6635
6636 case ${cf_cv_ncurses_header} in #(vi
6637 */ncurses.h|*/ncursesw.h) #(vi
6638         cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
6639         ;;
6640 *)
6641         cf_term_header=term.h
6642         ;;
6643 esac
6644
6645 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
6646 do
6647 cat >conftest.$ac_ext <<_ACEOF
6648 #line 6648 "configure"
6649 #include "confdefs.h"
6650 #include <stdio.h>
6651 #include <${cf_cv_ncurses_header:-curses.h}>
6652 #include <$cf_test>
6653
6654 int
6655 main ()
6656 {
6657 int x = auto_left_margin
6658   ;
6659   return 0;
6660 }
6661 _ACEOF
6662 rm -f conftest.$ac_objext
6663 if { (eval echo "$as_me:6663: \"$ac_compile\"") >&5
6664   (eval $ac_compile) 2>&5
6665   ac_status=$?
6666   echo "$as_me:6666: \$? = $ac_status" >&5
6667   (exit $ac_status); } &&
6668          { ac_try='test -s conftest.$ac_objext'
6669   { (eval echo "$as_me:6669: \"$ac_try\"") >&5
6670   (eval $ac_try) 2>&5
6671   ac_status=$?
6672   echo "$as_me:6672: \$? = $ac_status" >&5
6673   (exit $ac_status); }; }; then
6674
6675         cf_cv_term_header="$cf_test"
6676 else
6677   echo "$as_me: failed program was:" >&5
6678 cat conftest.$ac_ext >&5
6679
6680         cf_cv_term_header=unknown
6681
6682 fi
6683 rm -f conftest.$ac_objext conftest.$ac_ext
6684         test "$cf_cv_term_header" != unknown && break
6685 done
6686
6687 fi
6688 echo "$as_me:6688: result: $cf_cv_term_header" >&5
6689 echo "${ECHO_T}$cf_cv_term_header" >&6
6690
6691 # Set definitions to allow ifdef'ing to accommodate subdirectories
6692
6693 case $cf_cv_term_header in # (vi
6694 *term.h)
6695         cat >>confdefs.h <<\EOF
6696 #define HAVE_TERM_H 1
6697 EOF
6698
6699         ;;
6700 esac
6701
6702 case $cf_cv_term_header in # (vi
6703 ncurses/term.h) #(vi
6704         cat >>confdefs.h <<\EOF
6705 #define HAVE_NCURSES_TERM_H 1
6706 EOF
6707
6708         ;;
6709 ncursesw/term.h)
6710         cat >>confdefs.h <<\EOF
6711 #define HAVE_NCURSESW_TERM_H 1
6712 EOF
6713
6714         ;;
6715 esac
6716
6717 # some applications need this, but should check for NCURSES_VERSION
6718 cat >>confdefs.h <<\EOF
6719 #define NCURSES 1
6720 EOF
6721
6722 echo "$as_me:6722: checking for ncurses version" >&5
6723 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
6724 if test "${cf_cv_ncurses_version+set}" = set; then
6725   echo $ECHO_N "(cached) $ECHO_C" >&6
6726 else
6727
6728         cf_cv_ncurses_version=no
6729         cf_tempfile=out$$
6730         rm -f $cf_tempfile
6731         if test "$cross_compiling" = yes; then
6732
6733         # This will not work if the preprocessor splits the line after the
6734         # Autoconf token.  The 'unproto' program does that.
6735         cat > conftest.$ac_ext <<EOF
6736 #include <${cf_cv_ncurses_header:-curses.h}>
6737 #undef Autoconf
6738 #ifdef NCURSES_VERSION
6739 Autoconf NCURSES_VERSION
6740 #else
6741 #ifdef __NCURSES_H
6742 Autoconf "old"
6743 #endif
6744 ;
6745 #endif
6746 EOF
6747         cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
6748         { (eval echo "$as_me:6748: \"$cf_try\"") >&5
6749   (eval $cf_try) 2>&5
6750   ac_status=$?
6751   echo "$as_me:6751: \$? = $ac_status" >&5
6752   (exit $ac_status); }
6753         if test -f conftest.out ; then
6754                 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
6755                 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
6756                 rm -f conftest.out
6757         fi
6758
6759 else
6760   cat >conftest.$ac_ext <<_ACEOF
6761 #line 6761 "configure"
6762 #include "confdefs.h"
6763
6764 #include <${cf_cv_ncurses_header:-curses.h}>
6765 #include <stdio.h>
6766 int main()
6767 {
6768         FILE *fp = fopen("$cf_tempfile", "w");
6769 #ifdef NCURSES_VERSION
6770 # ifdef NCURSES_VERSION_PATCH
6771         fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
6772 # else
6773         fprintf(fp, "%s\n", NCURSES_VERSION);
6774 # endif
6775 #else
6776 # ifdef __NCURSES_H
6777         fprintf(fp, "old\n");
6778 # else
6779         make an error
6780 # endif
6781 #endif
6782         ${cf_cv_main_return:-return}(0);
6783 }
6784 _ACEOF
6785 rm -f conftest$ac_exeext
6786 if { (eval echo "$as_me:6786: \"$ac_link\"") >&5
6787   (eval $ac_link) 2>&5
6788   ac_status=$?
6789   echo "$as_me:6789: \$? = $ac_status" >&5
6790   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6791   { (eval echo "$as_me:6791: \"$ac_try\"") >&5
6792   (eval $ac_try) 2>&5
6793   ac_status=$?
6794   echo "$as_me:6794: \$? = $ac_status" >&5
6795   (exit $ac_status); }; }; then
6796
6797         cf_cv_ncurses_version=`cat $cf_tempfile`
6798 else
6799   echo "$as_me: program exited with status $ac_status" >&5
6800 echo "$as_me: failed program was:" >&5
6801 cat conftest.$ac_ext >&5
6802 fi
6803 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6804 fi
6805         rm -f $cf_tempfile
6806
6807 fi
6808 echo "$as_me:6808: result: $cf_cv_ncurses_version" >&5
6809 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
6810 test "$cf_cv_ncurses_version" = no || cat >>confdefs.h <<\EOF
6811 #define NCURSES 1
6812 EOF
6813
6814 cf_nculib_root=ncurses
6815         # This works, except for the special case where we find gpm, but
6816         # ncurses is in a nonstandard location via $LIBS, and we really want
6817         # to link gpm.
6818 cf_ncurses_LIBS=""
6819 cf_ncurses_SAVE="$LIBS"
6820 echo "$as_me:6820: checking for Gpm_Open in -lgpm" >&5
6821 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
6822 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
6823   echo $ECHO_N "(cached) $ECHO_C" >&6
6824 else
6825   ac_check_lib_save_LIBS=$LIBS
6826 LIBS="-lgpm  $LIBS"
6827 cat >conftest.$ac_ext <<_ACEOF
6828 #line 6828 "configure"
6829 #include "confdefs.h"
6830
6831 /* Override any gcc2 internal prototype to avoid an error.  */
6832 #ifdef __cplusplus
6833 extern "C"
6834 #endif
6835 /* We use char because int might match the return type of a gcc2
6836    builtin and then its argument prototype would still apply.  */
6837 char Gpm_Open ();
6838 int
6839 main ()
6840 {
6841 Gpm_Open ();
6842   ;
6843   return 0;
6844 }
6845 _ACEOF
6846 rm -f conftest.$ac_objext conftest$ac_exeext
6847 if { (eval echo "$as_me:6847: \"$ac_link\"") >&5
6848   (eval $ac_link) 2>&5
6849   ac_status=$?
6850   echo "$as_me:6850: \$? = $ac_status" >&5
6851   (exit $ac_status); } &&
6852          { ac_try='test -s conftest$ac_exeext'
6853   { (eval echo "$as_me:6853: \"$ac_try\"") >&5
6854   (eval $ac_try) 2>&5
6855   ac_status=$?
6856   echo "$as_me:6856: \$? = $ac_status" >&5
6857   (exit $ac_status); }; }; then
6858   ac_cv_lib_gpm_Gpm_Open=yes
6859 else
6860   echo "$as_me: failed program was:" >&5
6861 cat conftest.$ac_ext >&5
6862 ac_cv_lib_gpm_Gpm_Open=no
6863 fi
6864 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6865 LIBS=$ac_check_lib_save_LIBS
6866 fi
6867 echo "$as_me:6867: result: $ac_cv_lib_gpm_Gpm_Open" >&5
6868 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
6869 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
6870   echo "$as_me:6870: checking for initscr in -lgpm" >&5
6871 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
6872 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
6873   echo $ECHO_N "(cached) $ECHO_C" >&6
6874 else
6875   ac_check_lib_save_LIBS=$LIBS
6876 LIBS="-lgpm  $LIBS"
6877 cat >conftest.$ac_ext <<_ACEOF
6878 #line 6878 "configure"
6879 #include "confdefs.h"
6880
6881 /* Override any gcc2 internal prototype to avoid an error.  */
6882 #ifdef __cplusplus
6883 extern "C"
6884 #endif
6885 /* We use char because int might match the return type of a gcc2
6886    builtin and then its argument prototype would still apply.  */
6887 char initscr ();
6888 int
6889 main ()
6890 {
6891 initscr ();
6892   ;
6893   return 0;
6894 }
6895 _ACEOF
6896 rm -f conftest.$ac_objext conftest$ac_exeext
6897 if { (eval echo "$as_me:6897: \"$ac_link\"") >&5
6898   (eval $ac_link) 2>&5
6899   ac_status=$?
6900   echo "$as_me:6900: \$? = $ac_status" >&5
6901   (exit $ac_status); } &&
6902          { ac_try='test -s conftest$ac_exeext'
6903   { (eval echo "$as_me:6903: \"$ac_try\"") >&5
6904   (eval $ac_try) 2>&5
6905   ac_status=$?
6906   echo "$as_me:6906: \$? = $ac_status" >&5
6907   (exit $ac_status); }; }; then
6908   ac_cv_lib_gpm_initscr=yes
6909 else
6910   echo "$as_me: failed program was:" >&5
6911 cat conftest.$ac_ext >&5
6912 ac_cv_lib_gpm_initscr=no
6913 fi
6914 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6915 LIBS=$ac_check_lib_save_LIBS
6916 fi
6917 echo "$as_me:6917: result: $ac_cv_lib_gpm_initscr" >&5
6918 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
6919 if test $ac_cv_lib_gpm_initscr = yes; then
6920   LIBS="$cf_ncurses_SAVE"
6921 else
6922   cf_ncurses_LIBS="-lgpm"
6923 fi
6924
6925 fi
6926
6927 case $host_os in #(vi
6928 freebsd*)
6929         # This is only necessary if you are linking against an obsolete
6930         # version of ncurses (but it should do no harm, since it's static).
6931         if test "$cf_nculib_root" = ncurses ; then
6932                 echo "$as_me:6932: checking for tgoto in -lmytinfo" >&5
6933 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
6934 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
6935   echo $ECHO_N "(cached) $ECHO_C" >&6
6936 else
6937   ac_check_lib_save_LIBS=$LIBS
6938 LIBS="-lmytinfo  $LIBS"
6939 cat >conftest.$ac_ext <<_ACEOF
6940 #line 6940 "configure"
6941 #include "confdefs.h"
6942
6943 /* Override any gcc2 internal prototype to avoid an error.  */
6944 #ifdef __cplusplus
6945 extern "C"
6946 #endif
6947 /* We use char because int might match the return type of a gcc2
6948    builtin and then its argument prototype would still apply.  */
6949 char tgoto ();
6950 int
6951 main ()
6952 {
6953 tgoto ();
6954   ;
6955   return 0;
6956 }
6957 _ACEOF
6958 rm -f conftest.$ac_objext conftest$ac_exeext
6959 if { (eval echo "$as_me:6959: \"$ac_link\"") >&5
6960   (eval $ac_link) 2>&5
6961   ac_status=$?
6962   echo "$as_me:6962: \$? = $ac_status" >&5
6963   (exit $ac_status); } &&
6964          { ac_try='test -s conftest$ac_exeext'
6965   { (eval echo "$as_me:6965: \"$ac_try\"") >&5
6966   (eval $ac_try) 2>&5
6967   ac_status=$?
6968   echo "$as_me:6968: \$? = $ac_status" >&5
6969   (exit $ac_status); }; }; then
6970   ac_cv_lib_mytinfo_tgoto=yes
6971 else
6972   echo "$as_me: failed program was:" >&5
6973 cat conftest.$ac_ext >&5
6974 ac_cv_lib_mytinfo_tgoto=no
6975 fi
6976 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6977 LIBS=$ac_check_lib_save_LIBS
6978 fi
6979 echo "$as_me:6979: result: $ac_cv_lib_mytinfo_tgoto" >&5
6980 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
6981 if test $ac_cv_lib_mytinfo_tgoto = yes; then
6982   cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
6983 fi
6984
6985         fi
6986         ;;
6987 esac
6988
6989 LIBS="$cf_ncurses_LIBS $LIBS"
6990
6991 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
6992 then
6993         LIBS="-l$cf_nculib_root $LIBS"
6994 else
6995
6996         eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
6997         cf_libdir=""
6998         echo "$as_me:6998: checking for initscr" >&5
6999 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
7000 if test "${ac_cv_func_initscr+set}" = set; then
7001   echo $ECHO_N "(cached) $ECHO_C" >&6
7002 else
7003   cat >conftest.$ac_ext <<_ACEOF
7004 #line 7004 "configure"
7005 #include "confdefs.h"
7006 /* System header to define __stub macros and hopefully few prototypes,
7007     which can conflict with char initscr (); below.  */
7008 #include <assert.h>
7009 /* Override any gcc2 internal prototype to avoid an error.  */
7010 #ifdef __cplusplus
7011 extern "C"
7012 #endif
7013 /* We use char because int might match the return type of a gcc2
7014    builtin and then its argument prototype would still apply.  */
7015 char initscr ();
7016 char (*f) ();
7017
7018 int
7019 main ()
7020 {
7021 /* The GNU C library defines this for functions which it implements
7022     to always fail with ENOSYS.  Some functions are actually named
7023     something starting with __ and the normal name is an alias.  */
7024 #if defined (__stub_initscr) || defined (__stub___initscr)
7025 choke me
7026 #else
7027 f = initscr;
7028 #endif
7029
7030   ;
7031   return 0;
7032 }
7033 _ACEOF
7034 rm -f conftest.$ac_objext conftest$ac_exeext
7035 if { (eval echo "$as_me:7035: \"$ac_link\"") >&5
7036   (eval $ac_link) 2>&5
7037   ac_status=$?
7038   echo "$as_me:7038: \$? = $ac_status" >&5
7039   (exit $ac_status); } &&
7040          { ac_try='test -s conftest$ac_exeext'
7041   { (eval echo "$as_me:7041: \"$ac_try\"") >&5
7042   (eval $ac_try) 2>&5
7043   ac_status=$?
7044   echo "$as_me:7044: \$? = $ac_status" >&5
7045   (exit $ac_status); }; }; then
7046   ac_cv_func_initscr=yes
7047 else
7048   echo "$as_me: failed program was:" >&5
7049 cat conftest.$ac_ext >&5
7050 ac_cv_func_initscr=no
7051 fi
7052 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7053 fi
7054 echo "$as_me:7054: result: $ac_cv_func_initscr" >&5
7055 echo "${ECHO_T}$ac_cv_func_initscr" >&6
7056 if test $ac_cv_func_initscr = yes; then
7057   eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
7058 else
7059
7060                 cf_save_LIBS="$LIBS"
7061                 echo "$as_me:7061: checking for initscr in -l$cf_nculib_root" >&5
7062 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
7063                 LIBS="-l$cf_nculib_root $LIBS"
7064                 cat >conftest.$ac_ext <<_ACEOF
7065 #line 7065 "configure"
7066 #include "confdefs.h"
7067 #include <${cf_cv_ncurses_header:-curses.h}>
7068 int
7069 main ()
7070 {
7071 initscr()
7072   ;
7073   return 0;
7074 }
7075 _ACEOF
7076 rm -f conftest.$ac_objext conftest$ac_exeext
7077 if { (eval echo "$as_me:7077: \"$ac_link\"") >&5
7078   (eval $ac_link) 2>&5
7079   ac_status=$?
7080   echo "$as_me:7080: \$? = $ac_status" >&5
7081   (exit $ac_status); } &&
7082          { ac_try='test -s conftest$ac_exeext'
7083   { (eval echo "$as_me:7083: \"$ac_try\"") >&5
7084   (eval $ac_try) 2>&5
7085   ac_status=$?
7086   echo "$as_me:7086: \$? = $ac_status" >&5
7087   (exit $ac_status); }; }; then
7088   echo "$as_me:7088: result: yes" >&5
7089 echo "${ECHO_T}yes" >&6
7090                          eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
7091
7092 else
7093   echo "$as_me: failed program was:" >&5
7094 cat conftest.$ac_ext >&5
7095 echo "$as_me:7095: result: no" >&5
7096 echo "${ECHO_T}no" >&6
7097
7098 cf_search=
7099 cf_library_path_list=""
7100 if test -n "${LDFLAGS}${LIBS}" ; then
7101         for cf_library_path in $LDFLAGS $LIBS
7102         do
7103                 case $cf_library_path in #(vi
7104                 -L*)
7105                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
7106
7107 test "$cf_library_path" != "NONE" && \
7108 test -d "$cf_library_path" && \
7109  {
7110         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
7111         test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
7112         test -d $cf_library_path/lib/$cf_nculib_root &&       cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
7113         test -d $cf_library_path/lib/$cf_nculib_root/lib &&    cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
7114         test -d $cf_library_path/$cf_nculib_root/lib &&       cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
7115         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"
7116 }
7117
7118                         cf_library_path_list="$cf_library_path_list $cf_search"
7119                         ;;
7120                 esac
7121         done
7122 fi
7123
7124 cf_search=
7125
7126 test "/usr" != "$prefix" && \
7127 test -d "/usr" && \
7128 (test $prefix = NONE || test "/usr" != "$prefix") && {
7129         test -n "$verbose" && echo "    ... testing for lib-directories under /usr"
7130         test -d /usr/lib &&          cf_search="$cf_search /usr/lib"
7131         test -d /usr/lib/$cf_nculib_root &&       cf_search="$cf_search /usr/lib/$cf_nculib_root"
7132         test -d /usr/lib/$cf_nculib_root/lib &&    cf_search="$cf_search /usr/lib/$cf_nculib_root/lib"
7133         test -d /usr/$cf_nculib_root/lib &&       cf_search="$cf_search /usr/$cf_nculib_root/lib"
7134         test -d /usr/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search /usr/$cf_nculib_root/lib/$cf_nculib_root"
7135 }
7136
7137 test "$prefix" != "NONE" && \
7138 test -d "$prefix" && \
7139  {
7140         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
7141         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
7142         test -d $prefix/lib/$cf_nculib_root &&       cf_search="$cf_search $prefix/lib/$cf_nculib_root"
7143         test -d $prefix/lib/$cf_nculib_root/lib &&    cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
7144         test -d $prefix/$cf_nculib_root/lib &&       cf_search="$cf_search $prefix/$cf_nculib_root/lib"
7145         test -d $prefix/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
7146 }
7147
7148 test "/usr/local" != "$prefix" && \
7149 test -d "/usr/local" && \
7150 (test $prefix = NONE || test "/usr/local" != "$prefix") && {
7151         test -n "$verbose" && echo "    ... testing for lib-directories under /usr/local"
7152         test -d /usr/local/lib &&          cf_search="$cf_search /usr/local/lib"
7153         test -d /usr/local/lib/$cf_nculib_root &&       cf_search="$cf_search /usr/local/lib/$cf_nculib_root"
7154         test -d /usr/local/lib/$cf_nculib_root/lib &&    cf_search="$cf_search /usr/local/lib/$cf_nculib_root/lib"
7155         test -d /usr/local/$cf_nculib_root/lib &&       cf_search="$cf_search /usr/local/$cf_nculib_root/lib"
7156         test -d /usr/local/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search /usr/local/$cf_nculib_root/lib/$cf_nculib_root"
7157 }
7158
7159 test "/opt" != "$prefix" && \
7160 test -d "/opt" && \
7161 (test $prefix = NONE || test "/opt" != "$prefix") && {
7162         test -n "$verbose" && echo "    ... testing for lib-directories under /opt"
7163         test -d /opt/lib &&          cf_search="$cf_search /opt/lib"
7164         test -d /opt/lib/$cf_nculib_root &&       cf_search="$cf_search /opt/lib/$cf_nculib_root"
7165         test -d /opt/lib/$cf_nculib_root/lib &&    cf_search="$cf_search /opt/lib/$cf_nculib_root/lib"
7166         test -d /opt/$cf_nculib_root/lib &&       cf_search="$cf_search /opt/$cf_nculib_root/lib"
7167         test -d /opt/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search /opt/$cf_nculib_root/lib/$cf_nculib_root"
7168 }
7169
7170 test "$HOME" != "$prefix" && \
7171 test -d "$HOME" && \
7172 (test $prefix = NONE || test "$HOME" != "$prefix") && {
7173         test -n "$verbose" && echo "    ... testing for lib-directories under $HOME"
7174         test -d $HOME/lib &&          cf_search="$cf_search $HOME/lib"
7175         test -d $HOME/lib/$cf_nculib_root &&       cf_search="$cf_search $HOME/lib/$cf_nculib_root"
7176         test -d $HOME/lib/$cf_nculib_root/lib &&    cf_search="$cf_search $HOME/lib/$cf_nculib_root/lib"
7177         test -d $HOME/$cf_nculib_root/lib &&       cf_search="$cf_search $HOME/$cf_nculib_root/lib"
7178         test -d $HOME/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search $HOME/$cf_nculib_root/lib/$cf_nculib_root"
7179 }
7180
7181 cf_search="$cf_library_path_list $cf_search"
7182
7183                         for cf_libdir in $cf_search
7184                         do
7185                                 echo "$as_me:7185: checking for -l$cf_nculib_root in $cf_libdir" >&5
7186 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
7187                                 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
7188                                 cat >conftest.$ac_ext <<_ACEOF
7189 #line 7189 "configure"
7190 #include "confdefs.h"
7191 #include <${cf_cv_ncurses_header:-curses.h}>
7192 int
7193 main ()
7194 {
7195 initscr()
7196   ;
7197   return 0;
7198 }
7199 _ACEOF
7200 rm -f conftest.$ac_objext conftest$ac_exeext
7201 if { (eval echo "$as_me:7201: \"$ac_link\"") >&5
7202   (eval $ac_link) 2>&5
7203   ac_status=$?
7204   echo "$as_me:7204: \$? = $ac_status" >&5
7205   (exit $ac_status); } &&
7206          { ac_try='test -s conftest$ac_exeext'
7207   { (eval echo "$as_me:7207: \"$ac_try\"") >&5
7208   (eval $ac_try) 2>&5
7209   ac_status=$?
7210   echo "$as_me:7210: \$? = $ac_status" >&5
7211   (exit $ac_status); }; }; then
7212   echo "$as_me:7212: result: yes" >&5
7213 echo "${ECHO_T}yes" >&6
7214                                          eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
7215                                          break
7216 else
7217   echo "$as_me: failed program was:" >&5
7218 cat conftest.$ac_ext >&5
7219 echo "$as_me:7219: result: no" >&5
7220 echo "${ECHO_T}no" >&6
7221                                          LIBS="$cf_save_LIBS"
7222 fi
7223 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7224                         done
7225
7226 fi
7227 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7228
7229 fi
7230
7231 eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root
7232
7233 if test $cf_found_library = no ; then
7234         { { echo "$as_me:7234: error: Cannot link $cf_nculib_root library" >&5
7235 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
7236    { (exit 1); exit 1; }; }
7237 fi
7238
7239 fi
7240
7241 if test -n "$cf_ncurses_LIBS" ; then
7242         echo "$as_me:7242: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
7243 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
7244         cf_ncurses_SAVE="$LIBS"
7245         for p in $cf_ncurses_LIBS ; do
7246                 q=`echo $LIBS | sed -e "s%$p %%" -e "s%$p$%%"`
7247                 if test "$q" != "$LIBS" ; then
7248                         LIBS="$q"
7249                 fi
7250         done
7251         cat >conftest.$ac_ext <<_ACEOF
7252 #line 7252 "configure"
7253 #include "confdefs.h"
7254 #include <${cf_cv_ncurses_header:-curses.h}>
7255 int
7256 main ()
7257 {
7258 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
7259   ;
7260   return 0;
7261 }
7262 _ACEOF
7263 rm -f conftest.$ac_objext conftest$ac_exeext
7264 if { (eval echo "$as_me:7264: \"$ac_link\"") >&5
7265   (eval $ac_link) 2>&5
7266   ac_status=$?
7267   echo "$as_me:7267: \$? = $ac_status" >&5
7268   (exit $ac_status); } &&
7269          { ac_try='test -s conftest$ac_exeext'
7270   { (eval echo "$as_me:7270: \"$ac_try\"") >&5
7271   (eval $ac_try) 2>&5
7272   ac_status=$?
7273   echo "$as_me:7273: \$? = $ac_status" >&5
7274   (exit $ac_status); }; }; then
7275   echo "$as_me:7275: result: yes" >&5
7276 echo "${ECHO_T}yes" >&6
7277 else
7278   echo "$as_me: failed program was:" >&5
7279 cat conftest.$ac_ext >&5
7280 echo "$as_me:7280: result: no" >&5
7281 echo "${ECHO_T}no" >&6
7282                  LIBS="$cf_ncurses_SAVE"
7283 fi
7284 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7285 fi
7286
7287 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
7288
7289 cat >>confdefs.h <<EOF
7290 #define $cf_nculib_ROOT 1
7291 EOF
7292
7293 fi
7294
7295 fi
7296
7297 if test "$NCURSES_CONFIG" != none ; then
7298
7299 cf_version=`$NCURSES_CONFIG --version`
7300
7301 NCURSES_MAJOR=`echo "$cf_version" | sed -e 's/\..*//'`
7302 NCURSES_MINOR=`echo "$cf_version" | sed -e 's/^[0-9][0-9]*\.//' -e 's/\..*//'`
7303 NCURSES_PATCH=`echo "$cf_version" | sed -e 's/^[0-9][0-9]*\.[0-9][0-9]*\.//'`
7304
7305 # ABI version is not available from headers
7306 cf_cv_abi_version=`$NCURSES_CONFIG --abi-version`
7307
7308 else
7309
7310 for cf_name in MAJOR MINOR PATCH
7311 do
7312 cat >conftest.$ac_ext <<CF_EOF
7313 #include <${cf_cv_ncurses_header:-curses.h}>
7314 AUTOCONF_$cf_name NCURSES_VERSION_$cf_name
7315 CF_EOF
7316         cf_try="$ac_cpp conftest.$ac_ext 2>&5 | fgrep AUTOCONF_$cf_name >conftest.out"
7317         { (eval echo "$as_me:7317: \"$cf_try\"") >&5
7318   (eval $cf_try) 2>&5
7319   ac_status=$?
7320   echo "$as_me:7320: \$? = $ac_status" >&5
7321   (exit $ac_status); }
7322         if test -f conftest.out ; then
7323                 cf_result=`cat conftest.out | sed -e "s/^.*AUTOCONF_$cf_name[   ][      ]*//"`
7324                 eval NCURSES_$cf_name=\"$cf_result\"
7325                 # cat conftest.$ac_ext
7326                 # cat conftest.out
7327         fi
7328 done
7329
7330 cf_cv_abi_version=${NCURSES_MAJOR}
7331
7332 fi
7333
7334 cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
7335
7336 cf_cv_timestamp=`date`
7337
7338 echo "$as_me:7338: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&5
7339 echo "${ECHO_T}Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&6
7340
7341         case $cf_cv_system_name in #(vi
7342         OS/2*|os2*) #(vi
7343         LIB_PREFIX=''
7344         ;;
7345         *)      LIB_PREFIX='lib'
7346         ;;
7347         esac
7348 cf_prefix=$LIB_PREFIX
7349
7350 LIB_PREFIX=$cf_prefix
7351
7352 LIB_SUFFIX=
7353
7354 ###############################################################################
7355
7356 if test X"$CC_G_OPT" = X"" ; then
7357         CC_G_OPT='-g'
7358         test -n "$GCC" && test "${ac_cv_prog_cc_g}" != yes && CC_G_OPT=''
7359 fi
7360
7361 echo "$as_me:7361: checking for default loader flags" >&5
7362 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
7363 case $DFT_LWR_MODEL in
7364 normal)  LD_MODEL=''   ;;
7365 debug)   LD_MODEL=$CC_G_OPT ;;
7366 profile) LD_MODEL='-pg';;
7367 shared)  LD_MODEL=''   ;;
7368 esac
7369 echo "$as_me:7369: result: $LD_MODEL" >&5
7370 echo "${ECHO_T}$LD_MODEL" >&6
7371
7372 LD_RPATH_OPT=
7373 echo "$as_me:7373: checking for an rpath option" >&5
7374 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
7375 case $cf_cv_system_name in #(vi
7376 irix*) #(vi
7377         if test "$GCC" = yes; then
7378                 LD_RPATH_OPT="-Wl,-rpath,"
7379         else
7380                 LD_RPATH_OPT="-rpath "
7381         fi
7382         ;;
7383 linux*|gnu*|k*bsd*-gnu) #(vi
7384         LD_RPATH_OPT="-Wl,-rpath,"
7385         ;;
7386 openbsd[2-9].*|mirbsd*) #(vi
7387         LD_RPATH_OPT="-Wl,-rpath,"
7388         ;;
7389 freebsd*) #(vi
7390         LD_RPATH_OPT="-rpath "
7391         ;;
7392 netbsd*) #(vi
7393         LD_RPATH_OPT="-Wl,-rpath,"
7394         ;;
7395 osf*|mls+*) #(vi
7396         LD_RPATH_OPT="-rpath "
7397         ;;
7398 solaris2*) #(vi
7399         LD_RPATH_OPT="-R"
7400         ;;
7401 *)
7402         ;;
7403 esac
7404 echo "$as_me:7404: result: $LD_RPATH_OPT" >&5
7405 echo "${ECHO_T}$LD_RPATH_OPT" >&6
7406
7407 case "x$LD_RPATH_OPT" in #(vi
7408 x-R*)
7409         echo "$as_me:7409: checking if we need a space after rpath option" >&5
7410 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
7411         cf_save_LIBS="$LIBS"
7412         LIBS="${LD_RPATH_OPT}$libdir $LIBS"
7413         cat >conftest.$ac_ext <<_ACEOF
7414 #line 7414 "configure"
7415 #include "confdefs.h"
7416
7417 int
7418 main ()
7419 {
7420
7421   ;
7422   return 0;
7423 }
7424 _ACEOF
7425 rm -f conftest.$ac_objext conftest$ac_exeext
7426 if { (eval echo "$as_me:7426: \"$ac_link\"") >&5
7427   (eval $ac_link) 2>&5
7428   ac_status=$?
7429   echo "$as_me:7429: \$? = $ac_status" >&5
7430   (exit $ac_status); } &&
7431          { ac_try='test -s conftest$ac_exeext'
7432   { (eval echo "$as_me:7432: \"$ac_try\"") >&5
7433   (eval $ac_try) 2>&5
7434   ac_status=$?
7435   echo "$as_me:7435: \$? = $ac_status" >&5
7436   (exit $ac_status); }; }; then
7437   cf_rpath_space=no
7438 else
7439   echo "$as_me: failed program was:" >&5
7440 cat conftest.$ac_ext >&5
7441 cf_rpath_space=yes
7442 fi
7443 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7444         LIBS="$cf_save_LIBS"
7445         echo "$as_me:7445: result: $cf_rpath_space" >&5
7446 echo "${ECHO_T}$cf_rpath_space" >&6
7447         test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
7448         ;;
7449 esac
7450
7451         LOCAL_LDFLAGS=
7452         LOCAL_LDFLAGS2=
7453         LD_SHARED_OPTS=
7454         INSTALL_LIB="-m 644"
7455
7456         cf_cv_do_symlinks=no
7457         cf_ld_rpath_opt=
7458         test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT"
7459
7460         echo "$as_me:7460: checking if release/abi version should be used for shared libs" >&5
7461 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
7462
7463 # Check whether --with-shlib-version or --without-shlib-version was given.
7464 if test "${with_shlib_version+set}" = set; then
7465   withval="$with_shlib_version"
7466   test -z "$withval" && withval=auto
7467         case $withval in #(vi
7468         yes) #(vi
7469                 cf_cv_shlib_version=auto
7470                 ;;
7471         rel|abi|auto|no) #(vi
7472                 cf_cv_shlib_version=$withval
7473                 ;;
7474         *)
7475                 { { echo "$as_me:7475: error: option value must be one of: rel, abi, auto or no" >&5
7476 echo "$as_me: error: option value must be one of: rel, abi, auto or no" >&2;}
7477    { (exit 1); exit 1; }; }
7478                 ;;
7479         esac
7480
7481 else
7482   cf_cv_shlib_version=auto
7483 fi;
7484         echo "$as_me:7484: result: $cf_cv_shlib_version" >&5
7485 echo "${ECHO_T}$cf_cv_shlib_version" >&6
7486
7487         cf_cv_rm_so_locs=no
7488
7489         # Some less-capable ports of gcc support only -fpic
7490         CC_SHARED_OPTS=
7491         if test "$GCC" = yes
7492         then
7493                 echo "$as_me:7493: checking which $CC option to use" >&5
7494 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
7495                 cf_save_CFLAGS="$CFLAGS"
7496                 for CC_SHARED_OPTS in -fPIC -fpic ''
7497                 do
7498                         CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
7499                         cat >conftest.$ac_ext <<_ACEOF
7500 #line 7500 "configure"
7501 #include "confdefs.h"
7502 #include <stdio.h>
7503 int
7504 main ()
7505 {
7506 int x = 1
7507   ;
7508   return 0;
7509 }
7510 _ACEOF
7511 rm -f conftest.$ac_objext
7512 if { (eval echo "$as_me:7512: \"$ac_compile\"") >&5
7513   (eval $ac_compile) 2>&5
7514   ac_status=$?
7515   echo "$as_me:7515: \$? = $ac_status" >&5
7516   (exit $ac_status); } &&
7517          { ac_try='test -s conftest.$ac_objext'
7518   { (eval echo "$as_me:7518: \"$ac_try\"") >&5
7519   (eval $ac_try) 2>&5
7520   ac_status=$?
7521   echo "$as_me:7521: \$? = $ac_status" >&5
7522   (exit $ac_status); }; }; then
7523   break
7524 else
7525   echo "$as_me: failed program was:" >&5
7526 cat conftest.$ac_ext >&5
7527 fi
7528 rm -f conftest.$ac_objext conftest.$ac_ext
7529                 done
7530                 echo "$as_me:7530: result: $CC_SHARED_OPTS" >&5
7531 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
7532                 CFLAGS="$cf_save_CFLAGS"
7533         fi
7534
7535         cf_cv_shlib_version_infix=no
7536
7537         case $cf_cv_system_name in #(vi
7538         aix4.3-9*|aix[5-7]*) #(vi
7539                 if test "$GCC" = yes; then
7540                         CC_SHARED_OPTS=
7541                         MK_SHARED_LIB='${CC} -shared -Wl,-brtl -Wl,-blibpath:${libdir}:/usr/lib -o $@'
7542                 else
7543                         # CC_SHARED_OPTS='-qpic=large -G'
7544                         # perhaps "-bM:SRE -bnoentry -bexpall"
7545                         MK_SHARED_LIB='${CC} -G -Wl,-brtl -Wl,-blibpath:${libdir}:/usr/lib -o $@'
7546                 fi
7547                 ;;
7548         beos*) #(vi
7549                 MK_SHARED_LIB='${CC} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
7550                 ;;
7551         cygwin*) #(vi
7552                 CC_SHARED_OPTS=
7553                 MK_SHARED_LIB='sh ../mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
7554                 cf_cv_shlib_version=cygdll
7555                 cf_cv_shlib_version_infix=cygdll
7556                 cat >mk_shared_lib.sh <<-CF_EOF
7557                 #!/bin/sh
7558                 SHARED_LIB=\$1
7559                 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
7560                 shift
7561                 cat <<-EOF
7562                 Linking shared library
7563                 ** SHARED_LIB \$SHARED_LIB
7564                 ** IMPORT_LIB \$IMPORT_LIB
7565 EOF
7566                 exec \$* -shared -Wl,--out-implib=../lib/\${IMPORT_LIB} -Wl,--export-all-symbols -o ../lib/\${SHARED_LIB}
7567 CF_EOF
7568                 chmod +x mk_shared_lib.sh
7569                 ;;
7570         darwin*) #(vi
7571                 EXTRA_CFLAGS="-no-cpp-precomp"
7572                 CC_SHARED_OPTS="-dynamic"
7573                 MK_SHARED_LIB='${CC} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
7574                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
7575                 cf_cv_shlib_version_infix=yes
7576                 echo "$as_me:7576: checking if ld -search_paths_first works" >&5
7577 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
7578 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
7579   echo $ECHO_N "(cached) $ECHO_C" >&6
7580 else
7581
7582                         cf_save_LDFLAGS=$LDFLAGS
7583                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
7584                         cat >conftest.$ac_ext <<_ACEOF
7585 #line 7585 "configure"
7586 #include "confdefs.h"
7587
7588 int
7589 main ()
7590 {
7591 int i;
7592   ;
7593   return 0;
7594 }
7595 _ACEOF
7596 rm -f conftest.$ac_objext conftest$ac_exeext
7597 if { (eval echo "$as_me:7597: \"$ac_link\"") >&5
7598   (eval $ac_link) 2>&5
7599   ac_status=$?
7600   echo "$as_me:7600: \$? = $ac_status" >&5
7601   (exit $ac_status); } &&
7602          { ac_try='test -s conftest$ac_exeext'
7603   { (eval echo "$as_me:7603: \"$ac_try\"") >&5
7604   (eval $ac_try) 2>&5
7605   ac_status=$?
7606   echo "$as_me:7606: \$? = $ac_status" >&5
7607   (exit $ac_status); }; }; then
7608   cf_cv_ldflags_search_paths_first=yes
7609 else
7610   echo "$as_me: failed program was:" >&5
7611 cat conftest.$ac_ext >&5
7612 cf_cv_ldflags_search_paths_first=no
7613 fi
7614 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7615                                 LDFLAGS=$cf_save_LDFLAGS
7616 fi
7617 echo "$as_me:7617: result: $cf_cv_ldflags_search_paths_first" >&5
7618 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
7619                 if test $cf_cv_ldflags_search_paths_first = yes; then
7620                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
7621                 fi
7622                 ;;
7623         hpux*) #(vi
7624                 # (tested with gcc 2.7.2 -- I don't have c89)
7625                 if test "$GCC" = yes; then
7626                         LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
7627                 else
7628                         CC_SHARED_OPTS='+Z'
7629                         LD_SHARED_OPTS='-Wl,+b,${libdir}'
7630                 fi
7631                 MK_SHARED_LIB='${LD} +b ${libdir} -b -o $@'
7632                 # HP-UX shared libraries must be executable, and should be
7633                 # readonly to exploit a quirk in the memory manager.
7634                 INSTALL_LIB="-m 555"
7635                 ;;
7636         interix*)
7637                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
7638                 if test "$cf_cv_shlib_version" = rel; then
7639                         cf_shared_soname='`basename  .${REL_VERSION}`.${ABI_VERSION}'
7640                 else
7641                         cf_shared_soname='`basename `'
7642                 fi
7643                 CC_SHARED_OPTS=
7644                 MK_SHARED_LIB='${CC} -shared -Wl,-rpath,${libdir} -Wl,-h,'$cf_shared_soname' -o '
7645                 ;;
7646         irix*) #(vi
7647                 if test "$cf_cv_enable_rpath" = yes ; then
7648                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${libdir} $EXTRA_LDFLAGS"
7649                 fi
7650                 # tested with IRIX 5.2 and 'cc'.
7651                 if test "$GCC" != yes; then
7652                         CC_SHARED_OPTS='-KPIC'
7653                         MK_SHARED_LIB='${CC} -shared -rdata_shared -soname `basename $@` -o $@'
7654                 else
7655                         MK_SHARED_LIB='${CC} -shared -Wl,-soname,`basename $@` -o $@'
7656                 fi
7657                 cf_cv_rm_so_locs=yes
7658                 ;;
7659         linux*|gnu*|k*bsd*-gnu) #(vi
7660                 if test "$DFT_LWR_MODEL" = "shared" ; then
7661                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
7662                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
7663                 fi
7664                 if test "$cf_cv_enable_rpath" = yes ; then
7665                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${libdir} $EXTRA_LDFLAGS"
7666                 fi
7667
7668         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
7669         if test "$cf_cv_shlib_version" = rel; then
7670                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
7671         else
7672                 cf_cv_shared_soname='`basename $@`'
7673         fi
7674
7675                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
7676                 ;;
7677         openbsd[2-9].*|mirbsd*) #(vi
7678                 if test "$DFT_LWR_MODEL" = "shared" ; then
7679                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
7680                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
7681                 fi
7682                 if test "$cf_cv_enable_rpath" = yes ; then
7683                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${libdir} $EXTRA_LDFLAGS"
7684                 fi
7685                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
7686
7687         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
7688         if test "$cf_cv_shlib_version" = rel; then
7689                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
7690         else
7691                 cf_cv_shared_soname='`basename $@`'
7692         fi
7693
7694                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
7695                 ;;
7696         nto-qnx*|openbsd*|freebsd[12].*) #(vi
7697                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
7698                 MK_SHARED_LIB='${LD} -Bshareable -o $@'
7699                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
7700                 ;;
7701         freebsd*) #(vi
7702                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
7703                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
7704                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
7705                         LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${libdir} $LOCAL_LDFLAGS"
7706                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${libdir} $EXTRA_LDFLAGS"
7707                 fi
7708
7709         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
7710         if test "$cf_cv_shlib_version" = rel; then
7711                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
7712         else
7713                 cf_cv_shared_soname='`basename $@`'
7714         fi
7715
7716                 MK_SHARED_LIB='${LD} -shared -Bshareable -soname=`basename $@` -o $@'
7717                 ;;
7718         netbsd*) #(vi
7719                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
7720                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
7721                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
7722                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
7723                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${libdir} $EXTRA_LDFLAGS"
7724                         if test "$cf_cv_shlib_version" = auto; then
7725                         if test -f /usr/libexec/ld.elf_so; then
7726                                 cf_cv_shlib_version=abi
7727                         else
7728                                 cf_cv_shlib_version=rel
7729                         fi
7730                         fi
7731
7732         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
7733         if test "$cf_cv_shlib_version" = rel; then
7734                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
7735         else
7736                 cf_cv_shared_soname='`basename $@`'
7737         fi
7738
7739                         MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
7740                 else
7741                         MK_SHARED_LIB='${LD} -shared -Bshareable -o $@'
7742                 fi
7743                 ;;
7744         osf*|mls+*) #(vi
7745                 # tested with OSF/1 V3.2 and 'cc'
7746                 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
7747                 # link with shared libs).
7748                 MK_SHARED_LIB='${LD} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
7749                 case $host_os in #(vi
7750                 osf4*)
7751                         MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
7752                         ;;
7753                 esac
7754                 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
7755                 if test "$DFT_LWR_MODEL" = "shared" ; then
7756                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
7757                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
7758                 fi
7759                 cf_cv_rm_so_locs=yes
7760                 ;;
7761         sco3.2v5*)  # (also uw2* and UW7: hops 13-Apr-98
7762                 # tested with osr5.0.5
7763                 if test "$GCC" != yes; then
7764                         CC_SHARED_OPTS='-belf -KPIC'
7765                 fi
7766                 MK_SHARED_LIB='${LD} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
7767                 if test "$cf_cv_enable_rpath" = yes ; then
7768                         # only way is to set LD_RUN_PATH but no switch for it
7769                         RUN_PATH=$libdir
7770                 fi
7771                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
7772                 LINK_PROGS='LD_RUN_PATH=${libdir}'
7773                 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
7774                 ;;
7775         sunos4*) #(vi
7776                 # tested with SunOS 4.1.1 and gcc 2.7.0
7777                 if test "$GCC" != yes; then
7778                         CC_SHARED_OPTS='-KPIC'
7779                 fi
7780                 MK_SHARED_LIB='${LD} -assert pure-text -o $@'
7781                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
7782                 ;;
7783         solaris2*) #(vi
7784                 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
7785                 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
7786                 if test "$DFT_LWR_MODEL" = "shared" ; then
7787                         LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
7788                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
7789                 fi
7790                 if test "$cf_cv_enable_rpath" = yes ; then
7791                         EXTRA_LDFLAGS="-R \${libdir} $EXTRA_LDFLAGS"
7792                 fi
7793
7794         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
7795         if test "$cf_cv_shlib_version" = rel; then
7796                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
7797         else
7798                 cf_cv_shared_soname='`basename $@`'
7799         fi
7800
7801                 if test "$GCC" != yes; then
7802                         cf_save_CFLAGS="$CFLAGS"
7803                         for cf_shared_opts in -xcode=pic32 -xcode=pic13 -KPIC -Kpic -O
7804                         do
7805                                 CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
7806                                 cat >conftest.$ac_ext <<_ACEOF
7807 #line 7807 "configure"
7808 #include "confdefs.h"
7809 #include <stdio.h>
7810 int
7811 main ()
7812 {
7813 printf("Hello\n");
7814   ;
7815   return 0;
7816 }
7817 _ACEOF
7818 rm -f conftest.$ac_objext
7819 if { (eval echo "$as_me:7819: \"$ac_compile\"") >&5
7820   (eval $ac_compile) 2>&5
7821   ac_status=$?
7822   echo "$as_me:7822: \$? = $ac_status" >&5
7823   (exit $ac_status); } &&
7824          { ac_try='test -s conftest.$ac_objext'
7825   { (eval echo "$as_me:7825: \"$ac_try\"") >&5
7826   (eval $ac_try) 2>&5
7827   ac_status=$?
7828   echo "$as_me:7828: \$? = $ac_status" >&5
7829   (exit $ac_status); }; }; then
7830   break
7831 else
7832   echo "$as_me: failed program was:" >&5
7833 cat conftest.$ac_ext >&5
7834 fi
7835 rm -f conftest.$ac_objext conftest.$ac_ext
7836                         done
7837                         CFLAGS="$cf_save_CFLAGS"
7838                         CC_SHARED_OPTS=$cf_shared_opts
7839                         MK_SHARED_LIB='${CC} -dy -G -h '$cf_cv_shared_soname' -o $@'
7840                 else
7841                         MK_SHARED_LIB='${CC} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
7842                 fi
7843                 ;;
7844         sysv5uw7*|unix_sv*) #(vi
7845                 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
7846                 if test "$GCC" != yes; then
7847                         CC_SHARED_OPTS='-KPIC'
7848                 fi
7849                 MK_SHARED_LIB='${LD} -d y -G -o $@'
7850                 ;;
7851         *)
7852                 CC_SHARED_OPTS='unknown'
7853                 MK_SHARED_LIB='echo unknown'
7854                 ;;
7855         esac
7856
7857         # This works if the last tokens in $MK_SHARED_LIB are the -o target.
7858         case "$cf_cv_shlib_version" in #(vi
7859         rel|abi)
7860                 case "$MK_SHARED_LIB" in #(vi
7861                 *'-o $@') #(vi
7862                         test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
7863                         ;;
7864                 *)
7865                         { echo "$as_me:7865: WARNING: ignored --with-shlib-version" >&5
7866 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
7867                         ;;
7868                 esac
7869                 ;;
7870         esac
7871
7872         if test -n "$cf_ld_rpath_opt" ; then
7873                 MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${libdir}"
7874         fi
7875
7876 # The test/sample programs in the original tree link using rpath option.
7877 # Make it optional for packagers.
7878 if test -n "$LOCAL_LDFLAGS"
7879 then
7880         echo "$as_me:7880: checking if you want to link sample programs with rpath option" >&5
7881 echo $ECHO_N "checking if you want to link sample programs with rpath option... $ECHO_C" >&6
7882
7883 # Check whether --enable-rpath-link or --disable-rpath-link was given.
7884 if test "${enable_rpath_link+set}" = set; then
7885   enableval="$enable_rpath_link"
7886   with_rpath_link=$enableval
7887 else
7888   with_rpath_link=yes
7889 fi;
7890         echo "$as_me:7890: result: $with_rpath_link" >&5
7891 echo "${ECHO_T}$with_rpath_link" >&6
7892         if test "$with_rpath_link" = no
7893         then
7894                 LOCAL_LDFLAGS=
7895                 LOCAL_LDFLAGS2=
7896         fi
7897 fi
7898
7899 ###############################################################################
7900
7901         case $cf_cv_system_name in
7902         os2*)   PATH_SEPARATOR=';'  ;;
7903         *)      PATH_SEPARATOR=':'  ;;
7904         esac
7905
7906 ###   use option --enable-broken-linker to force on use of broken-linker support
7907 echo "$as_me:7907: checking if you want broken-linker support code" >&5
7908 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
7909
7910 # Check whether --enable-broken_linker or --disable-broken_linker was given.
7911 if test "${enable_broken_linker+set}" = set; then
7912   enableval="$enable_broken_linker"
7913   with_broken_linker=$enableval
7914 else
7915   with_broken_linker=${BROKEN_LINKER:-no}
7916 fi;
7917 echo "$as_me:7917: result: $with_broken_linker" >&5
7918 echo "${ECHO_T}$with_broken_linker" >&6
7919
7920 BROKEN_LINKER=0
7921 if test "$with_broken_linker" = yes ; then
7922         cat >>confdefs.h <<\EOF
7923 #define BROKEN_LINKER 1
7924 EOF
7925
7926         BROKEN_LINKER=1
7927 elif test "$DFT_LWR_MODEL" = shared ; then
7928         case $cf_cv_system_name in #(vi
7929         cygwin*)
7930                 cat >>confdefs.h <<\EOF
7931 #define BROKEN_LINKER 1
7932 EOF
7933
7934                 BROKEN_LINKER=1
7935                 test -n "$verbose" && echo "    cygwin linker is broken anyway" 1>&6
7936
7937 echo "${as_me:-configure}:7937: testing cygwin linker is broken anyway ..." 1>&5
7938
7939                 ;;
7940         esac
7941 fi
7942
7943 # Check to define _XOPEN_SOURCE "automatically"
7944
7945 cf_XOPEN_SOURCE=500
7946 cf_POSIX_C_SOURCE=199506L
7947 cf_xopen_source=
7948
7949 case $host_os in #(vi
7950 aix[4-7]*) #(vi
7951         cf_xopen_source="-D_ALL_SOURCE"
7952         ;;
7953 cygwin) #(vi
7954         cf_XOPEN_SOURCE=600
7955         ;;
7956 darwin[0-8].*) #(vi
7957         cf_xopen_source="-D_APPLE_C_SOURCE"
7958         ;;
7959 darwin*) #(vi
7960         cf_xopen_source="-D_DARWIN_C_SOURCE"
7961         ;;
7962 freebsd*|dragonfly*) #(vi
7963         # 5.x headers associate
7964         #       _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
7965         #       _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
7966         cf_POSIX_C_SOURCE=200112L
7967         cf_XOPEN_SOURCE=600
7968         cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
7969         ;;
7970 hpux11*) #(vi
7971         cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
7972         ;;
7973 hpux*) #(vi
7974         cf_xopen_source="-D_HPUX_SOURCE"
7975         ;;
7976 irix[56].*) #(vi
7977         cf_xopen_source="-D_SGI_SOURCE"
7978         ;;
7979 linux*|gnu*|mint*|k*bsd*-gnu) #(vi
7980
7981 echo "$as_me:7981: checking if we must define _GNU_SOURCE" >&5
7982 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
7983 if test "${cf_cv_gnu_source+set}" = set; then
7984   echo $ECHO_N "(cached) $ECHO_C" >&6
7985 else
7986
7987 cat >conftest.$ac_ext <<_ACEOF
7988 #line 7988 "configure"
7989 #include "confdefs.h"
7990 #include <sys/types.h>
7991 int
7992 main ()
7993 {
7994
7995 #ifndef _XOPEN_SOURCE
7996 make an error
7997 #endif
7998   ;
7999   return 0;
8000 }
8001 _ACEOF
8002 rm -f conftest.$ac_objext
8003 if { (eval echo "$as_me:8003: \"$ac_compile\"") >&5
8004   (eval $ac_compile) 2>&5
8005   ac_status=$?
8006   echo "$as_me:8006: \$? = $ac_status" >&5
8007   (exit $ac_status); } &&
8008          { ac_try='test -s conftest.$ac_objext'
8009   { (eval echo "$as_me:8009: \"$ac_try\"") >&5
8010   (eval $ac_try) 2>&5
8011   ac_status=$?
8012   echo "$as_me:8012: \$? = $ac_status" >&5
8013   (exit $ac_status); }; }; then
8014   cf_cv_gnu_source=no
8015 else
8016   echo "$as_me: failed program was:" >&5
8017 cat conftest.$ac_ext >&5
8018 cf_save="$CPPFLAGS"
8019          CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
8020          cat >conftest.$ac_ext <<_ACEOF
8021 #line 8021 "configure"
8022 #include "confdefs.h"
8023 #include <sys/types.h>
8024 int
8025 main ()
8026 {
8027
8028 #ifdef _XOPEN_SOURCE
8029 make an error
8030 #endif
8031   ;
8032   return 0;
8033 }
8034 _ACEOF
8035 rm -f conftest.$ac_objext
8036 if { (eval echo "$as_me:8036: \"$ac_compile\"") >&5
8037   (eval $ac_compile) 2>&5
8038   ac_status=$?
8039   echo "$as_me:8039: \$? = $ac_status" >&5
8040   (exit $ac_status); } &&
8041          { ac_try='test -s conftest.$ac_objext'
8042   { (eval echo "$as_me:8042: \"$ac_try\"") >&5
8043   (eval $ac_try) 2>&5
8044   ac_status=$?
8045   echo "$as_me:8045: \$? = $ac_status" >&5
8046   (exit $ac_status); }; }; then
8047   cf_cv_gnu_source=no
8048 else
8049   echo "$as_me: failed program was:" >&5
8050 cat conftest.$ac_ext >&5
8051 cf_cv_gnu_source=yes
8052 fi
8053 rm -f conftest.$ac_objext conftest.$ac_ext
8054         CPPFLAGS="$cf_save"
8055
8056 fi
8057 rm -f conftest.$ac_objext conftest.$ac_ext
8058
8059 fi
8060 echo "$as_me:8060: result: $cf_cv_gnu_source" >&5
8061 echo "${ECHO_T}$cf_cv_gnu_source" >&6
8062 test "$cf_cv_gnu_source" = yes && CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
8063
8064         ;;
8065 mirbsd*) #(vi
8066         # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <arpa/inet.h>
8067         ;;
8068 netbsd*) #(vi
8069         # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
8070         ;;
8071 openbsd*) #(vi
8072         # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
8073         ;;
8074 osf[45]*) #(vi
8075         cf_xopen_source="-D_OSF_SOURCE"
8076         ;;
8077 nto-qnx*) #(vi
8078         cf_xopen_source="-D_QNX_SOURCE"
8079         ;;
8080 sco*) #(vi
8081         # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
8082         ;;
8083 solaris2.1[0-9]) #(vi
8084         cf_xopen_source="-D__EXTENSIONS__ -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
8085         ;;
8086 solaris2.[1-9]) #(vi
8087         cf_xopen_source="-D__EXTENSIONS__"
8088         ;;
8089 *)
8090         echo "$as_me:8090: checking if we should define _XOPEN_SOURCE" >&5
8091 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
8092 if test "${cf_cv_xopen_source+set}" = set; then
8093   echo $ECHO_N "(cached) $ECHO_C" >&6
8094 else
8095
8096         cat >conftest.$ac_ext <<_ACEOF
8097 #line 8097 "configure"
8098 #include "confdefs.h"
8099 #include <sys/types.h>
8100 int
8101 main ()
8102 {
8103
8104 #ifndef _XOPEN_SOURCE
8105 make an error
8106 #endif
8107   ;
8108   return 0;
8109 }
8110 _ACEOF
8111 rm -f conftest.$ac_objext
8112 if { (eval echo "$as_me:8112: \"$ac_compile\"") >&5
8113   (eval $ac_compile) 2>&5
8114   ac_status=$?
8115   echo "$as_me:8115: \$? = $ac_status" >&5
8116   (exit $ac_status); } &&
8117          { ac_try='test -s conftest.$ac_objext'
8118   { (eval echo "$as_me:8118: \"$ac_try\"") >&5
8119   (eval $ac_try) 2>&5
8120   ac_status=$?
8121   echo "$as_me:8121: \$? = $ac_status" >&5
8122   (exit $ac_status); }; }; then
8123   cf_cv_xopen_source=no
8124 else
8125   echo "$as_me: failed program was:" >&5
8126 cat conftest.$ac_ext >&5
8127 cf_save="$CPPFLAGS"
8128          CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
8129          cat >conftest.$ac_ext <<_ACEOF
8130 #line 8130 "configure"
8131 #include "confdefs.h"
8132 #include <sys/types.h>
8133 int
8134 main ()
8135 {
8136
8137 #ifdef _XOPEN_SOURCE
8138 make an error
8139 #endif
8140   ;
8141   return 0;
8142 }
8143 _ACEOF
8144 rm -f conftest.$ac_objext
8145 if { (eval echo "$as_me:8145: \"$ac_compile\"") >&5
8146   (eval $ac_compile) 2>&5
8147   ac_status=$?
8148   echo "$as_me:8148: \$? = $ac_status" >&5
8149   (exit $ac_status); } &&
8150          { ac_try='test -s conftest.$ac_objext'
8151   { (eval echo "$as_me:8151: \"$ac_try\"") >&5
8152   (eval $ac_try) 2>&5
8153   ac_status=$?
8154   echo "$as_me:8154: \$? = $ac_status" >&5
8155   (exit $ac_status); }; }; then
8156   cf_cv_xopen_source=no
8157 else
8158   echo "$as_me: failed program was:" >&5
8159 cat conftest.$ac_ext >&5
8160 cf_cv_xopen_source=$cf_XOPEN_SOURCE
8161 fi
8162 rm -f conftest.$ac_objext conftest.$ac_ext
8163         CPPFLAGS="$cf_save"
8164
8165 fi
8166 rm -f conftest.$ac_objext conftest.$ac_ext
8167
8168 fi
8169 echo "$as_me:8169: result: $cf_cv_xopen_source" >&5
8170 echo "${ECHO_T}$cf_cv_xopen_source" >&6
8171         if test "$cf_cv_xopen_source" != no ; then
8172
8173 CFLAGS=`echo "$CFLAGS" | \
8174         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
8175                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
8176
8177 CPPFLAGS=`echo "$CPPFLAGS" | \
8178         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
8179                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
8180
8181                 cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
8182
8183 cf_fix_cppflags=no
8184 cf_new_cflags=
8185 cf_new_cppflags=
8186 cf_new_extra_cppflags=
8187
8188 for cf_add_cflags in $cf_temp_xopen_source
8189 do
8190 case $cf_fix_cppflags in
8191 no)
8192         case $cf_add_cflags in #(vi
8193         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
8194                 case $cf_add_cflags in
8195                 -D*)
8196                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8197
8198                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
8199                                 && test -z "${cf_tst_cflags}" \
8200                                 && cf_fix_cppflags=yes
8201
8202                         if test $cf_fix_cppflags = yes ; then
8203                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8204                                 continue
8205                         elif test "${cf_tst_cflags}" = "\"'" ; then
8206                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8207                                 continue
8208                         fi
8209                         ;;
8210                 esac
8211                 case "$CPPFLAGS" in
8212                 *$cf_add_cflags) #(vi
8213                         ;;
8214                 *) #(vi
8215                         case $cf_add_cflags in #(vi
8216                         -D*)
8217                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8218
8219 CPPFLAGS=`echo "$CPPFLAGS" | \
8220         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8221                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8222
8223                                 ;;
8224                         esac
8225                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8226                         ;;
8227                 esac
8228                 ;;
8229         *)
8230                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8231                 ;;
8232         esac
8233         ;;
8234 yes)
8235         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8236
8237         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8238
8239         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
8240                 && test -z "${cf_tst_cflags}" \
8241                 && cf_fix_cppflags=no
8242         ;;
8243 esac
8244 done
8245
8246 if test -n "$cf_new_cflags" ; then
8247
8248         CFLAGS="$CFLAGS $cf_new_cflags"
8249 fi
8250
8251 if test -n "$cf_new_cppflags" ; then
8252
8253         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8254 fi
8255
8256 if test -n "$cf_new_extra_cppflags" ; then
8257
8258         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8259 fi
8260
8261         fi
8262
8263 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
8264
8265 cf_save_CFLAGS="$CFLAGS"
8266 cf_save_CPPFLAGS="$CPPFLAGS"
8267
8268 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
8269         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
8270                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
8271
8272 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
8273         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
8274                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
8275
8276 echo "$as_me:8276: checking if we should define _POSIX_C_SOURCE" >&5
8277 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
8278 if test "${cf_cv_posix_c_source+set}" = set; then
8279   echo $ECHO_N "(cached) $ECHO_C" >&6
8280 else
8281
8282 echo "${as_me:-configure}:8282: testing if the symbol is already defined go no further ..." 1>&5
8283
8284         cat >conftest.$ac_ext <<_ACEOF
8285 #line 8285 "configure"
8286 #include "confdefs.h"
8287 #include <sys/types.h>
8288 int
8289 main ()
8290 {
8291
8292 #ifndef _POSIX_C_SOURCE
8293 make an error
8294 #endif
8295   ;
8296   return 0;
8297 }
8298 _ACEOF
8299 rm -f conftest.$ac_objext
8300 if { (eval echo "$as_me:8300: \"$ac_compile\"") >&5
8301   (eval $ac_compile) 2>&5
8302   ac_status=$?
8303   echo "$as_me:8303: \$? = $ac_status" >&5
8304   (exit $ac_status); } &&
8305          { ac_try='test -s conftest.$ac_objext'
8306   { (eval echo "$as_me:8306: \"$ac_try\"") >&5
8307   (eval $ac_try) 2>&5
8308   ac_status=$?
8309   echo "$as_me:8309: \$? = $ac_status" >&5
8310   (exit $ac_status); }; }; then
8311   cf_cv_posix_c_source=no
8312 else
8313   echo "$as_me: failed program was:" >&5
8314 cat conftest.$ac_ext >&5
8315 cf_want_posix_source=no
8316          case .$cf_POSIX_C_SOURCE in #(vi
8317          .[12]??*) #(vi
8318                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
8319                 ;;
8320          .2) #(vi
8321                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
8322                 cf_want_posix_source=yes
8323                 ;;
8324          .*)
8325                 cf_want_posix_source=yes
8326                 ;;
8327          esac
8328          if test "$cf_want_posix_source" = yes ; then
8329                 cat >conftest.$ac_ext <<_ACEOF
8330 #line 8330 "configure"
8331 #include "confdefs.h"
8332 #include <sys/types.h>
8333 int
8334 main ()
8335 {
8336
8337 #ifdef _POSIX_SOURCE
8338 make an error
8339 #endif
8340   ;
8341   return 0;
8342 }
8343 _ACEOF
8344 rm -f conftest.$ac_objext
8345 if { (eval echo "$as_me:8345: \"$ac_compile\"") >&5
8346   (eval $ac_compile) 2>&5
8347   ac_status=$?
8348   echo "$as_me:8348: \$? = $ac_status" >&5
8349   (exit $ac_status); } &&
8350          { ac_try='test -s conftest.$ac_objext'
8351   { (eval echo "$as_me:8351: \"$ac_try\"") >&5
8352   (eval $ac_try) 2>&5
8353   ac_status=$?
8354   echo "$as_me:8354: \$? = $ac_status" >&5
8355   (exit $ac_status); }; }; then
8356   :
8357 else
8358   echo "$as_me: failed program was:" >&5
8359 cat conftest.$ac_ext >&5
8360 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
8361 fi
8362 rm -f conftest.$ac_objext conftest.$ac_ext
8363          fi
8364
8365 echo "${as_me:-configure}:8365: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
8366
8367          CFLAGS="$cf_trim_CFLAGS"
8368          CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
8369
8370 echo "${as_me:-configure}:8370: testing if the second compile does not leave our definition intact error ..." 1>&5
8371
8372          cat >conftest.$ac_ext <<_ACEOF
8373 #line 8373 "configure"
8374 #include "confdefs.h"
8375 #include <sys/types.h>
8376 int
8377 main ()
8378 {
8379
8380 #ifndef _POSIX_C_SOURCE
8381 make an error
8382 #endif
8383   ;
8384   return 0;
8385 }
8386 _ACEOF
8387 rm -f conftest.$ac_objext
8388 if { (eval echo "$as_me:8388: \"$ac_compile\"") >&5
8389   (eval $ac_compile) 2>&5
8390   ac_status=$?
8391   echo "$as_me:8391: \$? = $ac_status" >&5
8392   (exit $ac_status); } &&
8393          { ac_try='test -s conftest.$ac_objext'
8394   { (eval echo "$as_me:8394: \"$ac_try\"") >&5
8395   (eval $ac_try) 2>&5
8396   ac_status=$?
8397   echo "$as_me:8397: \$? = $ac_status" >&5
8398   (exit $ac_status); }; }; then
8399   :
8400 else
8401   echo "$as_me: failed program was:" >&5
8402 cat conftest.$ac_ext >&5
8403 cf_cv_posix_c_source=no
8404 fi
8405 rm -f conftest.$ac_objext conftest.$ac_ext
8406          CFLAGS="$cf_save_CFLAGS"
8407          CPPFLAGS="$cf_save_CPPFLAGS"
8408
8409 fi
8410 rm -f conftest.$ac_objext conftest.$ac_ext
8411
8412 fi
8413 echo "$as_me:8413: result: $cf_cv_posix_c_source" >&5
8414 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
8415
8416 if test "$cf_cv_posix_c_source" != no ; then
8417         CFLAGS="$cf_trim_CFLAGS"
8418         CPPFLAGS="$cf_trim_CPPFLAGS"
8419
8420 cf_fix_cppflags=no
8421 cf_new_cflags=
8422 cf_new_cppflags=
8423 cf_new_extra_cppflags=
8424
8425 for cf_add_cflags in $cf_cv_posix_c_source
8426 do
8427 case $cf_fix_cppflags in
8428 no)
8429         case $cf_add_cflags in #(vi
8430         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
8431                 case $cf_add_cflags in
8432                 -D*)
8433                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8434
8435                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
8436                                 && test -z "${cf_tst_cflags}" \
8437                                 && cf_fix_cppflags=yes
8438
8439                         if test $cf_fix_cppflags = yes ; then
8440                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8441                                 continue
8442                         elif test "${cf_tst_cflags}" = "\"'" ; then
8443                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8444                                 continue
8445                         fi
8446                         ;;
8447                 esac
8448                 case "$CPPFLAGS" in
8449                 *$cf_add_cflags) #(vi
8450                         ;;
8451                 *) #(vi
8452                         case $cf_add_cflags in #(vi
8453                         -D*)
8454                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8455
8456 CPPFLAGS=`echo "$CPPFLAGS" | \
8457         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8458                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8459
8460                                 ;;
8461                         esac
8462                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8463                         ;;
8464                 esac
8465                 ;;
8466         *)
8467                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8468                 ;;
8469         esac
8470         ;;
8471 yes)
8472         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8473
8474         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8475
8476         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
8477                 && test -z "${cf_tst_cflags}" \
8478                 && cf_fix_cppflags=no
8479         ;;
8480 esac
8481 done
8482
8483 if test -n "$cf_new_cflags" ; then
8484
8485         CFLAGS="$CFLAGS $cf_new_cflags"
8486 fi
8487
8488 if test -n "$cf_new_cppflags" ; then
8489
8490         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8491 fi
8492
8493 if test -n "$cf_new_extra_cppflags" ; then
8494
8495         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8496 fi
8497
8498 fi
8499
8500         ;;
8501 esac
8502
8503 if test -n "$cf_xopen_source" ; then
8504
8505 cf_fix_cppflags=no
8506 cf_new_cflags=
8507 cf_new_cppflags=
8508 cf_new_extra_cppflags=
8509
8510 for cf_add_cflags in $cf_xopen_source
8511 do
8512 case $cf_fix_cppflags in
8513 no)
8514         case $cf_add_cflags in #(vi
8515         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
8516                 case $cf_add_cflags in
8517                 -D*)
8518                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8519
8520                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
8521                                 && test -z "${cf_tst_cflags}" \
8522                                 && cf_fix_cppflags=yes
8523
8524                         if test $cf_fix_cppflags = yes ; then
8525                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8526                                 continue
8527                         elif test "${cf_tst_cflags}" = "\"'" ; then
8528                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8529                                 continue
8530                         fi
8531                         ;;
8532                 esac
8533                 case "$CPPFLAGS" in
8534                 *$cf_add_cflags) #(vi
8535                         ;;
8536                 *) #(vi
8537                         case $cf_add_cflags in #(vi
8538                         -D*)
8539                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8540
8541 CPPFLAGS=`echo "$CPPFLAGS" | \
8542         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8543                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8544
8545                                 ;;
8546                         esac
8547                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8548                         ;;
8549                 esac
8550                 ;;
8551         *)
8552                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8553                 ;;
8554         esac
8555         ;;
8556 yes)
8557         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8558
8559         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8560
8561         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
8562                 && test -z "${cf_tst_cflags}" \
8563                 && cf_fix_cppflags=no
8564         ;;
8565 esac
8566 done
8567
8568 if test -n "$cf_new_cflags" ; then
8569
8570         CFLAGS="$CFLAGS $cf_new_cflags"
8571 fi
8572
8573 if test -n "$cf_new_cppflags" ; then
8574
8575         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8576 fi
8577
8578 if test -n "$cf_new_extra_cppflags" ; then
8579
8580         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8581 fi
8582
8583 fi
8584
8585 # Check whether --enable-largefile or --disable-largefile was given.
8586 if test "${enable_largefile+set}" = set; then
8587   enableval="$enable_largefile"
8588
8589 fi;
8590 if test "$enable_largefile" != no; then
8591
8592   echo "$as_me:8592: checking for special C compiler options needed for large files" >&5
8593 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
8594 if test "${ac_cv_sys_largefile_CC+set}" = set; then
8595   echo $ECHO_N "(cached) $ECHO_C" >&6
8596 else
8597   ac_cv_sys_largefile_CC=no
8598      if test "$GCC" != yes; then
8599        ac_save_CC=$CC
8600        while :; do
8601          # IRIX 6.2 and later do not support large files by default,
8602          # so use the C compiler's -n32 option if that helps.
8603          cat >conftest.$ac_ext <<_ACEOF
8604 #line 8604 "configure"
8605 #include "confdefs.h"
8606 #include <sys/types.h>
8607  /* Check that off_t can represent 2**63 - 1 correctly.
8608     We can't simply define LARGE_OFF_T to be 9223372036854775807,
8609     since some C++ compilers masquerading as C compilers
8610     incorrectly reject 9223372036854775807.  */
8611 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
8612   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
8613                        && LARGE_OFF_T % 2147483647 == 1)
8614                       ? 1 : -1];
8615 int
8616 main ()
8617 {
8618
8619   ;
8620   return 0;
8621 }
8622 _ACEOF
8623          rm -f conftest.$ac_objext
8624 if { (eval echo "$as_me:8624: \"$ac_compile\"") >&5
8625   (eval $ac_compile) 2>&5
8626   ac_status=$?
8627   echo "$as_me:8627: \$? = $ac_status" >&5
8628   (exit $ac_status); } &&
8629          { ac_try='test -s conftest.$ac_objext'
8630   { (eval echo "$as_me:8630: \"$ac_try\"") >&5
8631   (eval $ac_try) 2>&5
8632   ac_status=$?
8633   echo "$as_me:8633: \$? = $ac_status" >&5
8634   (exit $ac_status); }; }; then
8635   break
8636 else
8637   echo "$as_me: failed program was:" >&5
8638 cat conftest.$ac_ext >&5
8639 fi
8640 rm -f conftest.$ac_objext
8641          CC="$CC -n32"
8642          rm -f conftest.$ac_objext
8643 if { (eval echo "$as_me:8643: \"$ac_compile\"") >&5
8644   (eval $ac_compile) 2>&5
8645   ac_status=$?
8646   echo "$as_me:8646: \$? = $ac_status" >&5
8647   (exit $ac_status); } &&
8648          { ac_try='test -s conftest.$ac_objext'
8649   { (eval echo "$as_me:8649: \"$ac_try\"") >&5
8650   (eval $ac_try) 2>&5
8651   ac_status=$?
8652   echo "$as_me:8652: \$? = $ac_status" >&5
8653   (exit $ac_status); }; }; then
8654   ac_cv_sys_largefile_CC=' -n32'; break
8655 else
8656   echo "$as_me: failed program was:" >&5
8657 cat conftest.$ac_ext >&5
8658 fi
8659 rm -f conftest.$ac_objext
8660          break
8661        done
8662        CC=$ac_save_CC
8663        rm -f conftest.$ac_ext
8664     fi
8665 fi
8666 echo "$as_me:8666: result: $ac_cv_sys_largefile_CC" >&5
8667 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
8668   if test "$ac_cv_sys_largefile_CC" != no; then
8669     CC=$CC$ac_cv_sys_largefile_CC
8670   fi
8671
8672   echo "$as_me:8672: checking for _FILE_OFFSET_BITS value needed for large files" >&5
8673 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
8674 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
8675   echo $ECHO_N "(cached) $ECHO_C" >&6
8676 else
8677   while :; do
8678   ac_cv_sys_file_offset_bits=no
8679   cat >conftest.$ac_ext <<_ACEOF
8680 #line 8680 "configure"
8681 #include "confdefs.h"
8682 #include <sys/types.h>
8683  /* Check that off_t can represent 2**63 - 1 correctly.
8684     We can't simply define LARGE_OFF_T to be 9223372036854775807,
8685     since some C++ compilers masquerading as C compilers
8686     incorrectly reject 9223372036854775807.  */
8687 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
8688   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
8689                        && LARGE_OFF_T % 2147483647 == 1)
8690                       ? 1 : -1];
8691 int
8692 main ()
8693 {
8694
8695   ;
8696   return 0;
8697 }
8698 _ACEOF
8699 rm -f conftest.$ac_objext
8700 if { (eval echo "$as_me:8700: \"$ac_compile\"") >&5
8701   (eval $ac_compile) 2>&5
8702   ac_status=$?
8703   echo "$as_me:8703: \$? = $ac_status" >&5
8704   (exit $ac_status); } &&
8705          { ac_try='test -s conftest.$ac_objext'
8706   { (eval echo "$as_me:8706: \"$ac_try\"") >&5
8707   (eval $ac_try) 2>&5
8708   ac_status=$?
8709   echo "$as_me:8709: \$? = $ac_status" >&5
8710   (exit $ac_status); }; }; then
8711   break
8712 else
8713   echo "$as_me: failed program was:" >&5
8714 cat conftest.$ac_ext >&5
8715 fi
8716 rm -f conftest.$ac_objext conftest.$ac_ext
8717   cat >conftest.$ac_ext <<_ACEOF
8718 #line 8718 "configure"
8719 #include "confdefs.h"
8720 #define _FILE_OFFSET_BITS 64
8721 #include <sys/types.h>
8722  /* Check that off_t can represent 2**63 - 1 correctly.
8723     We can't simply define LARGE_OFF_T to be 9223372036854775807,
8724     since some C++ compilers masquerading as C compilers
8725     incorrectly reject 9223372036854775807.  */
8726 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
8727   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
8728                        && LARGE_OFF_T % 2147483647 == 1)
8729                       ? 1 : -1];
8730 int
8731 main ()
8732 {
8733
8734   ;
8735   return 0;
8736 }
8737 _ACEOF
8738 rm -f conftest.$ac_objext
8739 if { (eval echo "$as_me:8739: \"$ac_compile\"") >&5
8740   (eval $ac_compile) 2>&5
8741   ac_status=$?
8742   echo "$as_me:8742: \$? = $ac_status" >&5
8743   (exit $ac_status); } &&
8744          { ac_try='test -s conftest.$ac_objext'
8745   { (eval echo "$as_me:8745: \"$ac_try\"") >&5
8746   (eval $ac_try) 2>&5
8747   ac_status=$?
8748   echo "$as_me:8748: \$? = $ac_status" >&5
8749   (exit $ac_status); }; }; then
8750   ac_cv_sys_file_offset_bits=64; break
8751 else
8752   echo "$as_me: failed program was:" >&5
8753 cat conftest.$ac_ext >&5
8754 fi
8755 rm -f conftest.$ac_objext conftest.$ac_ext
8756   break
8757 done
8758 fi
8759 echo "$as_me:8759: result: $ac_cv_sys_file_offset_bits" >&5
8760 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
8761 if test "$ac_cv_sys_file_offset_bits" != no; then
8762
8763 cat >>confdefs.h <<EOF
8764 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
8765 EOF
8766
8767 fi
8768 rm -rf conftest*
8769   echo "$as_me:8769: checking for _LARGE_FILES value needed for large files" >&5
8770 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
8771 if test "${ac_cv_sys_large_files+set}" = set; then
8772   echo $ECHO_N "(cached) $ECHO_C" >&6
8773 else
8774   while :; do
8775   ac_cv_sys_large_files=no
8776   cat >conftest.$ac_ext <<_ACEOF
8777 #line 8777 "configure"
8778 #include "confdefs.h"
8779 #include <sys/types.h>
8780  /* Check that off_t can represent 2**63 - 1 correctly.
8781     We can't simply define LARGE_OFF_T to be 9223372036854775807,
8782     since some C++ compilers masquerading as C compilers
8783     incorrectly reject 9223372036854775807.  */
8784 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
8785   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
8786                        && LARGE_OFF_T % 2147483647 == 1)
8787                       ? 1 : -1];
8788 int
8789 main ()
8790 {
8791
8792   ;
8793   return 0;
8794 }
8795 _ACEOF
8796 rm -f conftest.$ac_objext
8797 if { (eval echo "$as_me:8797: \"$ac_compile\"") >&5
8798   (eval $ac_compile) 2>&5
8799   ac_status=$?
8800   echo "$as_me:8800: \$? = $ac_status" >&5
8801   (exit $ac_status); } &&
8802          { ac_try='test -s conftest.$ac_objext'
8803   { (eval echo "$as_me:8803: \"$ac_try\"") >&5
8804   (eval $ac_try) 2>&5
8805   ac_status=$?
8806   echo "$as_me:8806: \$? = $ac_status" >&5
8807   (exit $ac_status); }; }; then
8808   break
8809 else
8810   echo "$as_me: failed program was:" >&5
8811 cat conftest.$ac_ext >&5
8812 fi
8813 rm -f conftest.$ac_objext conftest.$ac_ext
8814   cat >conftest.$ac_ext <<_ACEOF
8815 #line 8815 "configure"
8816 #include "confdefs.h"
8817 #define _LARGE_FILES 1
8818 #include <sys/types.h>
8819  /* Check that off_t can represent 2**63 - 1 correctly.
8820     We can't simply define LARGE_OFF_T to be 9223372036854775807,
8821     since some C++ compilers masquerading as C compilers
8822     incorrectly reject 9223372036854775807.  */
8823 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
8824   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
8825                        && LARGE_OFF_T % 2147483647 == 1)
8826                       ? 1 : -1];
8827 int
8828 main ()
8829 {
8830
8831   ;
8832   return 0;
8833 }
8834 _ACEOF
8835 rm -f conftest.$ac_objext
8836 if { (eval echo "$as_me:8836: \"$ac_compile\"") >&5
8837   (eval $ac_compile) 2>&5
8838   ac_status=$?
8839   echo "$as_me:8839: \$? = $ac_status" >&5
8840   (exit $ac_status); } &&
8841          { ac_try='test -s conftest.$ac_objext'
8842   { (eval echo "$as_me:8842: \"$ac_try\"") >&5
8843   (eval $ac_try) 2>&5
8844   ac_status=$?
8845   echo "$as_me:8845: \$? = $ac_status" >&5
8846   (exit $ac_status); }; }; then
8847   ac_cv_sys_large_files=1; break
8848 else
8849   echo "$as_me: failed program was:" >&5
8850 cat conftest.$ac_ext >&5
8851 fi
8852 rm -f conftest.$ac_objext conftest.$ac_ext
8853   break
8854 done
8855 fi
8856 echo "$as_me:8856: result: $ac_cv_sys_large_files" >&5
8857 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
8858 if test "$ac_cv_sys_large_files" != no; then
8859
8860 cat >>confdefs.h <<EOF
8861 #define _LARGE_FILES $ac_cv_sys_large_files
8862 EOF
8863
8864 fi
8865 rm -rf conftest*
8866 fi
8867
8868     if test "$enable_largefile" != no ; then
8869         echo "$as_me:8869: checking for _LARGEFILE_SOURCE value needed for large files" >&5
8870 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
8871 if test "${ac_cv_sys_largefile_source+set}" = set; then
8872   echo $ECHO_N "(cached) $ECHO_C" >&6
8873 else
8874   while :; do
8875   ac_cv_sys_largefile_source=no
8876   cat >conftest.$ac_ext <<_ACEOF
8877 #line 8877 "configure"
8878 #include "confdefs.h"
8879 #include <stdio.h>
8880 int
8881 main ()
8882 {
8883 return !fseeko;
8884   ;
8885   return 0;
8886 }
8887 _ACEOF
8888 rm -f conftest.$ac_objext
8889 if { (eval echo "$as_me:8889: \"$ac_compile\"") >&5
8890   (eval $ac_compile) 2>&5
8891   ac_status=$?
8892   echo "$as_me:8892: \$? = $ac_status" >&5
8893   (exit $ac_status); } &&
8894          { ac_try='test -s conftest.$ac_objext'
8895   { (eval echo "$as_me:8895: \"$ac_try\"") >&5
8896   (eval $ac_try) 2>&5
8897   ac_status=$?
8898   echo "$as_me:8898: \$? = $ac_status" >&5
8899   (exit $ac_status); }; }; then
8900   break
8901 else
8902   echo "$as_me: failed program was:" >&5
8903 cat conftest.$ac_ext >&5
8904 fi
8905 rm -f conftest.$ac_objext conftest.$ac_ext
8906   cat >conftest.$ac_ext <<_ACEOF
8907 #line 8907 "configure"
8908 #include "confdefs.h"
8909 #define _LARGEFILE_SOURCE 1
8910 #include <stdio.h>
8911 int
8912 main ()
8913 {
8914 return !fseeko;
8915   ;
8916   return 0;
8917 }
8918 _ACEOF
8919 rm -f conftest.$ac_objext
8920 if { (eval echo "$as_me:8920: \"$ac_compile\"") >&5
8921   (eval $ac_compile) 2>&5
8922   ac_status=$?
8923   echo "$as_me:8923: \$? = $ac_status" >&5
8924   (exit $ac_status); } &&
8925          { ac_try='test -s conftest.$ac_objext'
8926   { (eval echo "$as_me:8926: \"$ac_try\"") >&5
8927   (eval $ac_try) 2>&5
8928   ac_status=$?
8929   echo "$as_me:8929: \$? = $ac_status" >&5
8930   (exit $ac_status); }; }; then
8931   ac_cv_sys_largefile_source=1; break
8932 else
8933   echo "$as_me: failed program was:" >&5
8934 cat conftest.$ac_ext >&5
8935 fi
8936 rm -f conftest.$ac_objext conftest.$ac_ext
8937   break
8938 done
8939 fi
8940 echo "$as_me:8940: result: $ac_cv_sys_largefile_source" >&5
8941 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
8942 if test "$ac_cv_sys_largefile_source" != no; then
8943
8944 cat >>confdefs.h <<EOF
8945 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
8946 EOF
8947
8948 fi
8949 rm -rf conftest*
8950
8951 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
8952 # in glibc 2.1.3, but that breaks too many other things.
8953 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
8954 echo "$as_me:8954: checking for fseeko" >&5
8955 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
8956 if test "${ac_cv_func_fseeko+set}" = set; then
8957   echo $ECHO_N "(cached) $ECHO_C" >&6
8958 else
8959   cat >conftest.$ac_ext <<_ACEOF
8960 #line 8960 "configure"
8961 #include "confdefs.h"
8962 #include <stdio.h>
8963 int
8964 main ()
8965 {
8966 return fseeko && fseeko (stdin, 0, 0);
8967   ;
8968   return 0;
8969 }
8970 _ACEOF
8971 rm -f conftest.$ac_objext conftest$ac_exeext
8972 if { (eval echo "$as_me:8972: \"$ac_link\"") >&5
8973   (eval $ac_link) 2>&5
8974   ac_status=$?
8975   echo "$as_me:8975: \$? = $ac_status" >&5
8976   (exit $ac_status); } &&
8977          { ac_try='test -s conftest$ac_exeext'
8978   { (eval echo "$as_me:8978: \"$ac_try\"") >&5
8979   (eval $ac_try) 2>&5
8980   ac_status=$?
8981   echo "$as_me:8981: \$? = $ac_status" >&5
8982   (exit $ac_status); }; }; then
8983   ac_cv_func_fseeko=yes
8984 else
8985   echo "$as_me: failed program was:" >&5
8986 cat conftest.$ac_ext >&5
8987 ac_cv_func_fseeko=no
8988 fi
8989 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8990 fi
8991 echo "$as_me:8991: result: $ac_cv_func_fseeko" >&5
8992 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
8993 if test $ac_cv_func_fseeko = yes; then
8994
8995 cat >>confdefs.h <<\EOF
8996 #define HAVE_FSEEKO 1
8997 EOF
8998
8999 fi
9000
9001         # Normally we would collect these definitions in the config.h,
9002         # but (like _XOPEN_SOURCE), some environments rely on having these
9003         # defined before any of the system headers are included.  Another
9004         # case comes up with C++, e.g., on AIX the compiler compiles the
9005         # header files by themselves before looking at the body files it is
9006         # told to compile.  For ncurses, those header files do not include
9007         # the config.h
9008         test "$ac_cv_sys_large_files"      != no && CPPFLAGS="$CPPFLAGS -D_LARGE_FILES "
9009         test "$ac_cv_sys_largefile_source" != no && CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE "
9010         test "$ac_cv_sys_file_offset_bits" != no && CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits "
9011
9012         echo "$as_me:9012: checking whether to use struct dirent64" >&5
9013 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
9014 if test "${cf_cv_struct_dirent64+set}" = set; then
9015   echo $ECHO_N "(cached) $ECHO_C" >&6
9016 else
9017
9018                 cat >conftest.$ac_ext <<_ACEOF
9019 #line 9019 "configure"
9020 #include "confdefs.h"
9021
9022 #include <sys/types.h>
9023 #include <dirent.h>
9024
9025 int
9026 main ()
9027 {
9028
9029                 /* if transitional largefile support is setup, this is true */
9030                 extern struct dirent64 * readdir(DIR *);
9031                 struct dirent64 *x = readdir((DIR *)0);
9032                 struct dirent *y = readdir((DIR *)0);
9033                 int z = x - y;
9034
9035   ;
9036   return 0;
9037 }
9038 _ACEOF
9039 rm -f conftest.$ac_objext
9040 if { (eval echo "$as_me:9040: \"$ac_compile\"") >&5
9041   (eval $ac_compile) 2>&5
9042   ac_status=$?
9043   echo "$as_me:9043: \$? = $ac_status" >&5
9044   (exit $ac_status); } &&
9045          { ac_try='test -s conftest.$ac_objext'
9046   { (eval echo "$as_me:9046: \"$ac_try\"") >&5
9047   (eval $ac_try) 2>&5
9048   ac_status=$?
9049   echo "$as_me:9049: \$? = $ac_status" >&5
9050   (exit $ac_status); }; }; then
9051   cf_cv_struct_dirent64=yes
9052 else
9053   echo "$as_me: failed program was:" >&5
9054 cat conftest.$ac_ext >&5
9055 cf_cv_struct_dirent64=no
9056 fi
9057 rm -f conftest.$ac_objext conftest.$ac_ext
9058
9059 fi
9060 echo "$as_me:9060: result: $cf_cv_struct_dirent64" >&5
9061 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
9062         test "$cf_cv_struct_dirent64" = yes && cat >>confdefs.h <<\EOF
9063 #define HAVE_STRUCT_DIRENT64 1
9064 EOF
9065
9066     fi
9067
9068 ### Enable compiling-in rcs id's
9069 echo "$as_me:9069: checking if RCS identifiers should be compiled-in" >&5
9070 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
9071
9072 # Check whether --with-rcs-ids or --without-rcs-ids was given.
9073 if test "${with_rcs_ids+set}" = set; then
9074   withval="$with_rcs_ids"
9075   with_rcs_ids=$withval
9076 else
9077   with_rcs_ids=no
9078 fi;
9079 echo "$as_me:9079: result: $with_rcs_ids" >&5
9080 echo "${ECHO_T}$with_rcs_ids" >&6
9081 test "$with_rcs_ids" = yes && cat >>confdefs.h <<\EOF
9082 #define USE_RCS_IDS 1
9083 EOF
9084
9085 ###############################################################################
9086
9087 ### Note that some functions (such as const) are normally disabled anyway.
9088 echo "$as_me:9088: checking if you want to build with function extensions" >&5
9089 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
9090
9091 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
9092 if test "${enable_ext_funcs+set}" = set; then
9093   enableval="$enable_ext_funcs"
9094   with_ext_funcs=$enableval
9095 else
9096   with_ext_funcs=yes
9097 fi;
9098 echo "$as_me:9098: result: $with_ext_funcs" >&5
9099 echo "${ECHO_T}$with_ext_funcs" >&6
9100 if test "$with_ext_funcs" = yes ; then
9101         NCURSES_EXT_FUNCS=1
9102         cat >>confdefs.h <<\EOF
9103 #define HAVE_USE_DEFAULT_COLORS 1
9104 EOF
9105
9106         cat >>confdefs.h <<\EOF
9107 #define NCURSES_EXT_FUNCS 1
9108 EOF
9109
9110 else
9111         NCURSES_EXT_FUNCS=0
9112 fi
9113
9114 ###   use option --enable-const to turn on use of const beyond that in XSI.
9115 echo "$as_me:9115: checking for extended use of const keyword" >&5
9116 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
9117
9118 # Check whether --enable-const or --disable-const was given.
9119 if test "${enable_const+set}" = set; then
9120   enableval="$enable_const"
9121   with_ext_const=$enableval
9122 else
9123   with_ext_const=no
9124 fi;
9125 echo "$as_me:9125: result: $with_ext_const" >&5
9126 echo "${ECHO_T}$with_ext_const" >&6
9127 NCURSES_CONST='/*nothing*/'
9128 if test "$with_ext_const" = yes ; then
9129         NCURSES_CONST=const
9130 fi
9131
9132 ###############################################################################
9133 # These options are relatively safe to experiment with.
9134
9135 echo "$as_me:9135: checking if you want all development code" >&5
9136 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
9137
9138 # Check whether --with-develop or --without-develop was given.
9139 if test "${with_develop+set}" = set; then
9140   withval="$with_develop"
9141   with_develop=$withval
9142 else
9143   with_develop=no
9144 fi;
9145 echo "$as_me:9145: result: $with_develop" >&5
9146 echo "${ECHO_T}$with_develop" >&6
9147
9148 ###############################################################################
9149 # These are just experimental, probably should not be in a package:
9150
9151 # This is still experimental (20080329), but should ultimately be moved to
9152 # the script-block --with-normal, etc.
9153
9154 echo "$as_me:9154: checking if you want to link with the pthread library" >&5
9155 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
9156
9157 # Check whether --with-pthread or --without-pthread was given.
9158 if test "${with_pthread+set}" = set; then
9159   withval="$with_pthread"
9160   with_pthread=$withval
9161 else
9162   with_pthread=no
9163 fi;
9164 echo "$as_me:9164: result: $with_pthread" >&5
9165 echo "${ECHO_T}$with_pthread" >&6
9166
9167 if test "$with_pthread" != no ; then
9168     echo "$as_me:9168: checking for pthread.h" >&5
9169 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
9170 if test "${ac_cv_header_pthread_h+set}" = set; then
9171   echo $ECHO_N "(cached) $ECHO_C" >&6
9172 else
9173   cat >conftest.$ac_ext <<_ACEOF
9174 #line 9174 "configure"
9175 #include "confdefs.h"
9176 #include <pthread.h>
9177 _ACEOF
9178 if { (eval echo "$as_me:9178: \"$ac_cpp conftest.$ac_ext\"") >&5
9179   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9180   ac_status=$?
9181   egrep -v '^ *\+' conftest.er1 >conftest.err
9182   rm -f conftest.er1
9183   cat conftest.err >&5
9184   echo "$as_me:9184: \$? = $ac_status" >&5
9185   (exit $ac_status); } >/dev/null; then
9186   if test -s conftest.err; then
9187     ac_cpp_err=$ac_c_preproc_warn_flag
9188   else
9189     ac_cpp_err=
9190   fi
9191 else
9192   ac_cpp_err=yes
9193 fi
9194 if test -z "$ac_cpp_err"; then
9195   ac_cv_header_pthread_h=yes
9196 else
9197   echo "$as_me: failed program was:" >&5
9198   cat conftest.$ac_ext >&5
9199   ac_cv_header_pthread_h=no
9200 fi
9201 rm -f conftest.err conftest.$ac_ext
9202 fi
9203 echo "$as_me:9203: result: $ac_cv_header_pthread_h" >&5
9204 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
9205 if test $ac_cv_header_pthread_h = yes; then
9206
9207         cat >>confdefs.h <<\EOF
9208 #define HAVE_PTHREADS_H 1
9209 EOF
9210
9211         echo "$as_me:9211: checking if we can link with the pthread library" >&5
9212 echo $ECHO_N "checking if we can link with the pthread library... $ECHO_C" >&6
9213         cf_save_LIBS="$LIBS"
9214         LIBS="-lpthread $LIBS"
9215         cat >conftest.$ac_ext <<_ACEOF
9216 #line 9216 "configure"
9217 #include "confdefs.h"
9218
9219 #include <pthread.h>
9220
9221 int
9222 main ()
9223 {
9224
9225         int rc = pthread_create(0,0,0,0);
9226
9227   ;
9228   return 0;
9229 }
9230 _ACEOF
9231 rm -f conftest.$ac_objext conftest$ac_exeext
9232 if { (eval echo "$as_me:9232: \"$ac_link\"") >&5
9233   (eval $ac_link) 2>&5
9234   ac_status=$?
9235   echo "$as_me:9235: \$? = $ac_status" >&5
9236   (exit $ac_status); } &&
9237          { ac_try='test -s conftest$ac_exeext'
9238   { (eval echo "$as_me:9238: \"$ac_try\"") >&5
9239   (eval $ac_try) 2>&5
9240   ac_status=$?
9241   echo "$as_me:9241: \$? = $ac_status" >&5
9242   (exit $ac_status); }; }; then
9243   with_pthread=yes
9244 else
9245   echo "$as_me: failed program was:" >&5
9246 cat conftest.$ac_ext >&5
9247 with_pthread=no
9248 fi
9249 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9250         LIBS="$cf_save_LIBS"
9251         echo "$as_me:9251: result: $with_pthread" >&5
9252 echo "${ECHO_T}$with_pthread" >&6
9253
9254         if test "$with_pthread" = yes ; then
9255             LIBS="-lpthread $LIBS"
9256             cat >>confdefs.h <<\EOF
9257 #define HAVE_LIBPTHREADS 1
9258 EOF
9259
9260         else
9261             { { echo "$as_me:9261: error: Cannot link with pthread library" >&5
9262 echo "$as_me: error: Cannot link with pthread library" >&2;}
9263    { (exit 1); exit 1; }; }
9264         fi
9265
9266 fi
9267
9268 fi
9269
9270 echo "$as_me:9270: checking if you want to use weak-symbols for pthreads" >&5
9271 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
9272
9273 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
9274 if test "${enable_weak_symbols+set}" = set; then
9275   enableval="$enable_weak_symbols"
9276   use_weak_symbols=$withval
9277 else
9278   use_weak_symbols=no
9279 fi;
9280 echo "$as_me:9280: result: $use_weak_symbols" >&5
9281 echo "${ECHO_T}$use_weak_symbols" >&6
9282 if test "$use_weak_symbols" = yes ; then
9283
9284 echo "$as_me:9284: checking if $CC supports weak symbols" >&5
9285 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
9286 if test "${cf_cv_weak_symbols+set}" = set; then
9287   echo $ECHO_N "(cached) $ECHO_C" >&6
9288 else
9289
9290 cat >conftest.$ac_ext <<_ACEOF
9291 #line 9291 "configure"
9292 #include "confdefs.h"
9293
9294 #include <stdio.h>
9295 int
9296 main ()
9297 {
9298
9299 #if defined(__GNUC__)
9300 #  if defined __USE_ISOC99
9301 #    define _cat_pragma(exp)    _Pragma(#exp)
9302 #    define _weak_pragma(exp)   _cat_pragma(weak name)
9303 #  else
9304 #    define _weak_pragma(exp)
9305 #  endif
9306 #  define _declare(name)        __extension__ extern __typeof__(name) name
9307 #  define weak_symbol(name)     _weak_pragma(name) _declare(name) __attribute__((weak))
9308 #endif
9309
9310 weak_symbol(fopen);
9311
9312   ;
9313   return 0;
9314 }
9315 _ACEOF
9316 rm -f conftest.$ac_objext
9317 if { (eval echo "$as_me:9317: \"$ac_compile\"") >&5
9318   (eval $ac_compile) 2>&5
9319   ac_status=$?
9320   echo "$as_me:9320: \$? = $ac_status" >&5
9321   (exit $ac_status); } &&
9322          { ac_try='test -s conftest.$ac_objext'
9323   { (eval echo "$as_me:9323: \"$ac_try\"") >&5
9324   (eval $ac_try) 2>&5
9325   ac_status=$?
9326   echo "$as_me:9326: \$? = $ac_status" >&5
9327   (exit $ac_status); }; }; then
9328   cf_cv_weak_symbols=yes
9329 else
9330   echo "$as_me: failed program was:" >&5
9331 cat conftest.$ac_ext >&5
9332 cf_cv_weak_symbols=no
9333 fi
9334 rm -f conftest.$ac_objext conftest.$ac_ext
9335
9336 fi
9337 echo "$as_me:9337: result: $cf_cv_weak_symbols" >&5
9338 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
9339
9340 else
9341     cf_cv_weak_symbols=no
9342 fi
9343
9344 if test $cf_cv_weak_symbols = yes ; then
9345     cat >>confdefs.h <<\EOF
9346 #define USE_WEAK_SYMBOLS 1
9347 EOF
9348
9349 fi
9350
9351 PTHREAD=
9352 if test "$with_pthread" = "yes" ; then
9353     cat >>confdefs.h <<\EOF
9354 #define USE_PTHREADS 1
9355 EOF
9356
9357     enable_reentrant=yes
9358     if test $cf_cv_weak_symbols = yes ; then
9359         PTHREAD=-lpthread
9360     fi
9361 fi
9362
9363 # OpenSUSE is installing ncurses6, using reentrant option.
9364 echo "$as_me:9364: checking for _nc_TABSIZE" >&5
9365 echo $ECHO_N "checking for _nc_TABSIZE... $ECHO_C" >&6
9366 if test "${ac_cv_func__nc_TABSIZE+set}" = set; then
9367   echo $ECHO_N "(cached) $ECHO_C" >&6
9368 else
9369   cat >conftest.$ac_ext <<_ACEOF
9370 #line 9370 "configure"
9371 #include "confdefs.h"
9372 /* System header to define __stub macros and hopefully few prototypes,
9373     which can conflict with char _nc_TABSIZE (); below.  */
9374 #include <assert.h>
9375 /* Override any gcc2 internal prototype to avoid an error.  */
9376 #ifdef __cplusplus
9377 extern "C"
9378 #endif
9379 /* We use char because int might match the return type of a gcc2
9380    builtin and then its argument prototype would still apply.  */
9381 char _nc_TABSIZE ();
9382 char (*f) ();
9383
9384 int
9385 main ()
9386 {
9387 /* The GNU C library defines this for functions which it implements
9388     to always fail with ENOSYS.  Some functions are actually named
9389     something starting with __ and the normal name is an alias.  */
9390 #if defined (__stub__nc_TABSIZE) || defined (__stub____nc_TABSIZE)
9391 choke me
9392 #else
9393 f = _nc_TABSIZE;
9394 #endif
9395
9396   ;
9397   return 0;
9398 }
9399 _ACEOF
9400 rm -f conftest.$ac_objext conftest$ac_exeext
9401 if { (eval echo "$as_me:9401: \"$ac_link\"") >&5
9402   (eval $ac_link) 2>&5
9403   ac_status=$?
9404   echo "$as_me:9404: \$? = $ac_status" >&5
9405   (exit $ac_status); } &&
9406          { ac_try='test -s conftest$ac_exeext'
9407   { (eval echo "$as_me:9407: \"$ac_try\"") >&5
9408   (eval $ac_try) 2>&5
9409   ac_status=$?
9410   echo "$as_me:9410: \$? = $ac_status" >&5
9411   (exit $ac_status); }; }; then
9412   ac_cv_func__nc_TABSIZE=yes
9413 else
9414   echo "$as_me: failed program was:" >&5
9415 cat conftest.$ac_ext >&5
9416 ac_cv_func__nc_TABSIZE=no
9417 fi
9418 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9419 fi
9420 echo "$as_me:9420: result: $ac_cv_func__nc_TABSIZE" >&5
9421 echo "${ECHO_T}$ac_cv_func__nc_TABSIZE" >&6
9422 if test $ac_cv_func__nc_TABSIZE = yes; then
9423   assume_reentrant=yes
9424 else
9425   assume_reentrant=no
9426 fi
9427
9428 # Reentrant code has to be opaque; there's little advantage to making ncurses
9429 # opaque outside of that, so there is no --enable-opaque option.  We can use
9430 # this option without --with-pthreads, but this will be always set for
9431 # pthreads.
9432 echo "$as_me:9432: checking if you want experimental reentrant code" >&5
9433 echo $ECHO_N "checking if you want experimental reentrant code... $ECHO_C" >&6
9434
9435 # Check whether --enable-reentrant or --disable-reentrant was given.
9436 if test "${enable_reentrant+set}" = set; then
9437   enableval="$enable_reentrant"
9438   with_reentrant=$enableval
9439 else
9440   with_reentrant=$assume_reentrant
9441 fi;
9442 echo "$as_me:9442: result: $with_reentrant" >&5
9443 echo "${ECHO_T}$with_reentrant" >&6
9444 if test "$with_reentrant" = yes ; then
9445         cf_cv_enable_reentrant=1
9446         if test $cf_cv_weak_symbols = yes ; then
9447
9448 # remove pthread library from $LIBS
9449 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[       ]//g' -e 's/-lpthread$//'`
9450
9451         elif test "$assume_reentrant" = no ; then
9452                 LIB_SUFFIX="t${LIB_SUFFIX}"
9453         fi
9454         cat >>confdefs.h <<\EOF
9455 #define USE_REENTRANT 1
9456 EOF
9457
9458 else
9459         cf_cv_enable_reentrant=0
9460 fi
9461
9462 ### Allow using a different wrap-prefix
9463 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
9464         echo "$as_me:9464: checking for prefix used to wrap public variables" >&5
9465 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
9466
9467 # Check whether --with-wrap-prefix or --without-wrap-prefix was given.
9468 if test "${with_wrap_prefix+set}" = set; then
9469   withval="$with_wrap_prefix"
9470   NCURSES_WRAP_PREFIX=$withval
9471 else
9472   NCURSES_WRAP_PREFIX=_nc_
9473 fi;
9474         echo "$as_me:9474: result: $NCURSES_WRAP_PREFIX" >&5
9475 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
9476 else
9477         NCURSES_WRAP_PREFIX=_nc_
9478 fi
9479
9480 cat >>confdefs.h <<EOF
9481 #define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
9482 EOF
9483
9484 ###############################################################################
9485
9486 ###     use option --disable-echo to suppress full display compiling commands
9487 echo "$as_me:9487: checking if you want to display full commands during build" >&5
9488 echo $ECHO_N "checking if you want to display full commands during build... $ECHO_C" >&6
9489
9490 # Check whether --enable-echo or --disable-echo was given.
9491 if test "${enable_echo+set}" = set; then
9492   enableval="$enable_echo"
9493   with_echo=$enableval
9494 else
9495   with_echo=yes
9496 fi;
9497 if test "$with_echo" = yes; then
9498         ECHO_LINK=
9499 else
9500         ECHO_LINK='@ echo linking $@ ... ;'
9501 fi
9502 echo "$as_me:9502: result: $with_echo" >&5
9503 echo "${ECHO_T}$with_echo" >&6
9504
9505 ###     use option --enable-warnings to turn on all gcc warnings
9506 echo "$as_me:9506: checking if you want to see compiler warnings" >&5
9507 echo $ECHO_N "checking if you want to see compiler warnings... $ECHO_C" >&6
9508
9509 # Check whether --enable-warnings or --disable-warnings was given.
9510 if test "${enable_warnings+set}" = set; then
9511   enableval="$enable_warnings"
9512   with_warnings=$enableval
9513 fi;
9514 echo "$as_me:9514: result: $with_warnings" >&5
9515 echo "${ECHO_T}$with_warnings" >&6
9516
9517 if test "x$with_warnings" = "xyes"; then
9518
9519         ADAFLAGS="$ADAFLAGS -gnatg"
9520
9521 INTEL_COMPILER=no
9522
9523 if test "$GCC" = yes ; then
9524         case $host_os in
9525         linux*|gnu*)
9526                 echo "$as_me:9526: checking if this is really Intel C compiler" >&5
9527 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
9528                 cf_save_CFLAGS="$CFLAGS"
9529                 CFLAGS="$CFLAGS -no-gcc"
9530                 cat >conftest.$ac_ext <<_ACEOF
9531 #line 9531 "configure"
9532 #include "confdefs.h"
9533
9534 int
9535 main ()
9536 {
9537
9538 #ifdef __INTEL_COMPILER
9539 #else
9540 make an error
9541 #endif
9542
9543   ;
9544   return 0;
9545 }
9546 _ACEOF
9547 rm -f conftest.$ac_objext
9548 if { (eval echo "$as_me:9548: \"$ac_compile\"") >&5
9549   (eval $ac_compile) 2>&5
9550   ac_status=$?
9551   echo "$as_me:9551: \$? = $ac_status" >&5
9552   (exit $ac_status); } &&
9553          { ac_try='test -s conftest.$ac_objext'
9554   { (eval echo "$as_me:9554: \"$ac_try\"") >&5
9555   (eval $ac_try) 2>&5
9556   ac_status=$?
9557   echo "$as_me:9557: \$? = $ac_status" >&5
9558   (exit $ac_status); }; }; then
9559   INTEL_COMPILER=yes
9560 cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
9561
9562 else
9563   echo "$as_me: failed program was:" >&5
9564 cat conftest.$ac_ext >&5
9565 fi
9566 rm -f conftest.$ac_objext conftest.$ac_ext
9567                 CFLAGS="$cf_save_CFLAGS"
9568                 echo "$as_me:9568: result: $INTEL_COMPILER" >&5
9569 echo "${ECHO_T}$INTEL_COMPILER" >&6
9570                 ;;
9571         esac
9572 fi
9573
9574 cat > conftest.$ac_ext <<EOF
9575 #line 9575 "${as_me:-configure}"
9576 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
9577 EOF
9578
9579 if test "$INTEL_COMPILER" = yes
9580 then
9581 # The "-wdXXX" options suppress warnings:
9582 # remark #1419: external declaration in primary source file
9583 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
9584 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
9585 # remark #193: zero used for undefined preprocessing identifier
9586 # remark #593: variable "curs_sb_left_arrow" was set but never used
9587 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
9588 # remark #869: parameter "tw" was never referenced
9589 # remark #981: operands are evaluated in unspecified order
9590 # warning #279: controlling expression is constant
9591
9592         { echo "$as_me:9592: checking for $CC warning options..." >&5
9593 echo "$as_me: checking for $CC warning options..." >&6;}
9594         cf_save_CFLAGS="$CFLAGS"
9595         EXTRA_CFLAGS="-Wall"
9596         for cf_opt in \
9597                 wd1419 \
9598                 wd1683 \
9599                 wd1684 \
9600                 wd193 \
9601                 wd593 \
9602                 wd279 \
9603                 wd810 \
9604                 wd869 \
9605                 wd981
9606         do
9607                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
9608                 if { (eval echo "$as_me:9608: \"$ac_compile\"") >&5
9609   (eval $ac_compile) 2>&5
9610   ac_status=$?
9611   echo "$as_me:9611: \$? = $ac_status" >&5
9612   (exit $ac_status); }; then
9613                         test -n "$verbose" && echo "$as_me:9613: result: ... -$cf_opt" >&5
9614 echo "${ECHO_T}... -$cf_opt" >&6
9615                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
9616                 fi
9617         done
9618         CFLAGS="$cf_save_CFLAGS"
9619
9620 elif test "$GCC" = yes
9621 then
9622         { echo "$as_me:9622: checking for $CC warning options..." >&5
9623 echo "$as_me: checking for $CC warning options..." >&6;}
9624         cf_save_CFLAGS="$CFLAGS"
9625         EXTRA_CFLAGS=
9626         cf_warn_CONST=""
9627         test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
9628         for cf_opt in W Wall \
9629                 Wbad-function-cast \
9630                 Wcast-align \
9631                 Wcast-qual \
9632                 Winline \
9633                 Wmissing-declarations \
9634                 Wmissing-prototypes \
9635                 Wnested-externs \
9636                 Wpointer-arith \
9637                 Wshadow \
9638                 Wstrict-prototypes \
9639                 Wundef $cf_warn_CONST Wdeclaration-after-statement Wextra Wno-unknown-pragmas Wswitch-enum
9640         do
9641                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
9642                 if { (eval echo "$as_me:9642: \"$ac_compile\"") >&5
9643   (eval $ac_compile) 2>&5
9644   ac_status=$?
9645   echo "$as_me:9645: \$? = $ac_status" >&5
9646   (exit $ac_status); }; then
9647                         test -n "$verbose" && echo "$as_me:9647: result: ... -$cf_opt" >&5
9648 echo "${ECHO_T}... -$cf_opt" >&6
9649                         case $cf_opt in #(vi
9650                         Wcast-qual) #(vi
9651                                 CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
9652                                 ;;
9653                         Winline) #(vi
9654                                 case $GCC_VERSION in
9655                                 [34].*)
9656                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
9657
9658 echo "${as_me:-configure}:9658: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
9659
9660                                         continue;;
9661                                 esac
9662                                 ;;
9663                         esac
9664                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
9665                 fi
9666         done
9667         CFLAGS="$cf_save_CFLAGS"
9668 fi
9669 rm -rf conftest*
9670
9671 fi
9672
9673 if test "$GCC" = yes
9674 then
9675 cat > conftest.i <<EOF
9676 #ifndef GCC_PRINTF
9677 #define GCC_PRINTF 0
9678 #endif
9679 #ifndef GCC_SCANF
9680 #define GCC_SCANF 0
9681 #endif
9682 #ifndef GCC_NORETURN
9683 #define GCC_NORETURN /* nothing */
9684 #endif
9685 #ifndef GCC_UNUSED
9686 #define GCC_UNUSED /* nothing */
9687 #endif
9688 EOF
9689 if test "$GCC" = yes
9690 then
9691         { echo "$as_me:9691: checking for $CC __attribute__ directives..." >&5
9692 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
9693 cat > conftest.$ac_ext <<EOF
9694 #line 9694 "${as_me:-configure}"
9695 #include "confdefs.h"
9696 #include "conftest.h"
9697 #include "conftest.i"
9698 #if     GCC_PRINTF
9699 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
9700 #else
9701 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
9702 #endif
9703 #if     GCC_SCANF
9704 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
9705 #else
9706 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
9707 #endif
9708 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
9709 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
9710 extern void foo(void) GCC_NORETURN;
9711 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
9712 EOF
9713         cf_printf_attribute=no
9714         cf_scanf_attribute=no
9715         for cf_attribute in scanf printf unused noreturn
9716         do
9717
9718 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
9719
9720                 cf_directive="__attribute__(($cf_attribute))"
9721                 echo "checking for $CC $cf_directive" 1>&5
9722
9723                 case $cf_attribute in #(vi
9724                 printf) #(vi
9725                         cf_printf_attribute=yes
9726                         cat >conftest.h <<EOF
9727 #define GCC_$cf_ATTRIBUTE 1
9728 EOF
9729                         ;;
9730                 scanf) #(vi
9731                         cf_scanf_attribute=yes
9732                         cat >conftest.h <<EOF
9733 #define GCC_$cf_ATTRIBUTE 1
9734 EOF
9735                         ;;
9736                 *) #(vi
9737                         cat >conftest.h <<EOF
9738 #define GCC_$cf_ATTRIBUTE $cf_directive
9739 EOF
9740                         ;;
9741                 esac
9742
9743                 if { (eval echo "$as_me:9743: \"$ac_compile\"") >&5
9744   (eval $ac_compile) 2>&5
9745   ac_status=$?
9746   echo "$as_me:9746: \$? = $ac_status" >&5
9747   (exit $ac_status); }; then
9748                         test -n "$verbose" && echo "$as_me:9748: result: ... $cf_attribute" >&5
9749 echo "${ECHO_T}... $cf_attribute" >&6
9750                         cat conftest.h >>confdefs.h
9751                         case $cf_attribute in #(vi
9752                         printf) #(vi
9753                                 if test "$cf_printf_attribute" = no ; then
9754                                         cat >>confdefs.h <<EOF
9755 #define GCC_PRINTFLIKE(fmt,var) /* nothing */
9756 EOF
9757                                 else
9758                                         cat >>confdefs.h <<EOF
9759 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
9760 EOF
9761                                 fi
9762                                 ;;
9763                         scanf) #(vi
9764                                 if test "$cf_scanf_attribute" = no ; then
9765                                         cat >>confdefs.h <<EOF
9766 #define GCC_SCANFLIKE(fmt,var) /* nothing */
9767 EOF
9768                                 else
9769                                         cat >>confdefs.h <<EOF
9770 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
9771 EOF
9772                                 fi
9773                                 ;;
9774                         esac
9775                 fi
9776         done
9777 else
9778         fgrep define conftest.i >>confdefs.h
9779 fi
9780 rm -rf conftest*
9781 fi
9782
9783 ###     use option --enable-assertions to turn on generation of assertion code
9784 echo "$as_me:9784: checking if you want to enable runtime assertions" >&5
9785 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
9786
9787 # Check whether --enable-assertions or --disable-assertions was given.
9788 if test "${enable_assertions+set}" = set; then
9789   enableval="$enable_assertions"
9790   with_assertions=$enableval
9791 else
9792   with_assertions=no
9793 fi;
9794 echo "$as_me:9794: result: $with_assertions" >&5
9795 echo "${ECHO_T}$with_assertions" >&6
9796 if test -n "$GCC"
9797 then
9798         if test "$with_assertions" = no
9799         then
9800                 cat >>confdefs.h <<\EOF
9801 #define NDEBUG 1
9802 EOF
9803
9804                 CPPFLAGS="$CPPFLAGS -DNDEBUG"
9805         else
9806
9807         ADAFLAGS="$ADAFLAGS -gnata"
9808
9809         fi
9810 fi
9811
9812 ###     use option --disable-leaks to suppress "permanent" leaks, for testing
9813 cat >>confdefs.h <<\EOF
9814 #define HAVE_NC_ALLOC_H 1
9815 EOF
9816
9817 ###     use option --enable-expanded to generate certain macros as functions
9818
9819 # Check whether --enable-expanded or --disable-expanded was given.
9820 if test "${enable_expanded+set}" = set; then
9821   enableval="$enable_expanded"
9822   test "$enableval" = yes && cat >>confdefs.h <<\EOF
9823 #define NCURSES_EXPANDED 1
9824 EOF
9825
9826 fi;
9827
9828 ###     use option --disable-macros to suppress macros in favor of functions
9829
9830 # Check whether --enable-macros or --disable-macros was given.
9831 if test "${enable_macros+set}" = set; then
9832   enableval="$enable_macros"
9833   test "$enableval" = no && cat >>confdefs.h <<\EOF
9834 #define NCURSES_NOMACROS 1
9835 EOF
9836
9837 fi;
9838
9839 # Normally we only add trace() to the debug-library.  Allow this to be
9840 # extended to all models of the ncurses library:
9841 cf_all_traces=no
9842 case "$CFLAGS $CPPFLAGS" in
9843 *-DTRACE*)
9844         cf_all_traces=yes
9845         ;;
9846 esac
9847
9848 echo "$as_me:9848: checking whether to add trace feature to all models" >&5
9849 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
9850
9851 # Check whether --with-trace or --without-trace was given.
9852 if test "${with_trace+set}" = set; then
9853   withval="$with_trace"
9854   cf_with_trace=$withval
9855 else
9856   cf_with_trace=$cf_all_traces
9857 fi;
9858 echo "$as_me:9858: result: $cf_with_trace" >&5
9859 echo "${ECHO_T}$cf_with_trace" >&6
9860
9861 if test "$cf_with_trace" = yes ; then
9862         ADA_TRACE=TRUE
9863
9864 cf_fix_cppflags=no
9865 cf_new_cflags=
9866 cf_new_cppflags=
9867 cf_new_extra_cppflags=
9868
9869 for cf_add_cflags in -DTRACE
9870 do
9871 case $cf_fix_cppflags in
9872 no)
9873         case $cf_add_cflags in #(vi
9874         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
9875                 case $cf_add_cflags in
9876                 -D*)
9877                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9878
9879                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
9880                                 && test -z "${cf_tst_cflags}" \
9881                                 && cf_fix_cppflags=yes
9882
9883                         if test $cf_fix_cppflags = yes ; then
9884                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9885                                 continue
9886                         elif test "${cf_tst_cflags}" = "\"'" ; then
9887                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9888                                 continue
9889                         fi
9890                         ;;
9891                 esac
9892                 case "$CPPFLAGS" in
9893                 *$cf_add_cflags) #(vi
9894                         ;;
9895                 *) #(vi
9896                         case $cf_add_cflags in #(vi
9897                         -D*)
9898                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9899
9900 CPPFLAGS=`echo "$CPPFLAGS" | \
9901         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
9902                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
9903
9904                                 ;;
9905                         esac
9906                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
9907                         ;;
9908                 esac
9909                 ;;
9910         *)
9911                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
9912                 ;;
9913         esac
9914         ;;
9915 yes)
9916         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9917
9918         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
9919
9920         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
9921                 && test -z "${cf_tst_cflags}" \
9922                 && cf_fix_cppflags=no
9923         ;;
9924 esac
9925 done
9926
9927 if test -n "$cf_new_cflags" ; then
9928
9929         CFLAGS="$CFLAGS $cf_new_cflags"
9930 fi
9931
9932 if test -n "$cf_new_cppflags" ; then
9933
9934         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
9935 fi
9936
9937 if test -n "$cf_new_extra_cppflags" ; then
9938
9939         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
9940 fi
9941
9942 else
9943         ADA_TRACE=FALSE
9944 fi
9945
9946 ###     Checks for libraries.
9947 case $cf_cv_system_name in #(vi
9948 *mingw32*) #(vi
9949         ;;
9950 *)
9951 echo "$as_me:9951: checking for gettimeofday" >&5
9952 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
9953 if test "${ac_cv_func_gettimeofday+set}" = set; then
9954   echo $ECHO_N "(cached) $ECHO_C" >&6
9955 else
9956   cat >conftest.$ac_ext <<_ACEOF
9957 #line 9957 "configure"
9958 #include "confdefs.h"
9959 /* System header to define __stub macros and hopefully few prototypes,
9960     which can conflict with char gettimeofday (); below.  */
9961 #include <assert.h>
9962 /* Override any gcc2 internal prototype to avoid an error.  */
9963 #ifdef __cplusplus
9964 extern "C"
9965 #endif
9966 /* We use char because int might match the return type of a gcc2
9967    builtin and then its argument prototype would still apply.  */
9968 char gettimeofday ();
9969 char (*f) ();
9970
9971 int
9972 main ()
9973 {
9974 /* The GNU C library defines this for functions which it implements
9975     to always fail with ENOSYS.  Some functions are actually named
9976     something starting with __ and the normal name is an alias.  */
9977 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
9978 choke me
9979 #else
9980 f = gettimeofday;
9981 #endif
9982
9983   ;
9984   return 0;
9985 }
9986 _ACEOF
9987 rm -f conftest.$ac_objext conftest$ac_exeext
9988 if { (eval echo "$as_me:9988: \"$ac_link\"") >&5
9989   (eval $ac_link) 2>&5
9990   ac_status=$?
9991   echo "$as_me:9991: \$? = $ac_status" >&5
9992   (exit $ac_status); } &&
9993          { ac_try='test -s conftest$ac_exeext'
9994   { (eval echo "$as_me:9994: \"$ac_try\"") >&5
9995   (eval $ac_try) 2>&5
9996   ac_status=$?
9997   echo "$as_me:9997: \$? = $ac_status" >&5
9998   (exit $ac_status); }; }; then
9999   ac_cv_func_gettimeofday=yes
10000 else
10001   echo "$as_me: failed program was:" >&5
10002 cat conftest.$ac_ext >&5
10003 ac_cv_func_gettimeofday=no
10004 fi
10005 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10006 fi
10007 echo "$as_me:10007: result: $ac_cv_func_gettimeofday" >&5
10008 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
10009 if test $ac_cv_func_gettimeofday = yes; then
10010   cat >>confdefs.h <<\EOF
10011 #define HAVE_GETTIMEOFDAY 1
10012 EOF
10013
10014 else
10015
10016 echo "$as_me:10016: checking for gettimeofday in -lbsd" >&5
10017 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
10018 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
10019   echo $ECHO_N "(cached) $ECHO_C" >&6
10020 else
10021   ac_check_lib_save_LIBS=$LIBS
10022 LIBS="-lbsd  $LIBS"
10023 cat >conftest.$ac_ext <<_ACEOF
10024 #line 10024 "configure"
10025 #include "confdefs.h"
10026
10027 /* Override any gcc2 internal prototype to avoid an error.  */
10028 #ifdef __cplusplus
10029 extern "C"
10030 #endif
10031 /* We use char because int might match the return type of a gcc2
10032    builtin and then its argument prototype would still apply.  */
10033 char gettimeofday ();
10034 int
10035 main ()
10036 {
10037 gettimeofday ();
10038   ;
10039   return 0;
10040 }
10041 _ACEOF
10042 rm -f conftest.$ac_objext conftest$ac_exeext
10043 if { (eval echo "$as_me:10043: \"$ac_link\"") >&5
10044   (eval $ac_link) 2>&5
10045   ac_status=$?
10046   echo "$as_me:10046: \$? = $ac_status" >&5
10047   (exit $ac_status); } &&
10048          { ac_try='test -s conftest$ac_exeext'
10049   { (eval echo "$as_me:10049: \"$ac_try\"") >&5
10050   (eval $ac_try) 2>&5
10051   ac_status=$?
10052   echo "$as_me:10052: \$? = $ac_status" >&5
10053   (exit $ac_status); }; }; then
10054   ac_cv_lib_bsd_gettimeofday=yes
10055 else
10056   echo "$as_me: failed program was:" >&5
10057 cat conftest.$ac_ext >&5
10058 ac_cv_lib_bsd_gettimeofday=no
10059 fi
10060 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10061 LIBS=$ac_check_lib_save_LIBS
10062 fi
10063 echo "$as_me:10063: result: $ac_cv_lib_bsd_gettimeofday" >&5
10064 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
10065 if test $ac_cv_lib_bsd_gettimeofday = yes; then
10066   cat >>confdefs.h <<\EOF
10067 #define HAVE_GETTIMEOFDAY 1
10068 EOF
10069
10070         LIBS="$LIBS -lbsd"
10071 fi
10072
10073 fi
10074         ;;
10075 esac
10076
10077 ###     Checks for header files.
10078 echo "$as_me:10078: checking for ANSI C header files" >&5
10079 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
10080 if test "${ac_cv_header_stdc+set}" = set; then
10081   echo $ECHO_N "(cached) $ECHO_C" >&6
10082 else
10083   cat >conftest.$ac_ext <<_ACEOF
10084 #line 10084 "configure"
10085 #include "confdefs.h"
10086 #include <stdlib.h>
10087 #include <stdarg.h>
10088 #include <string.h>
10089 #include <float.h>
10090
10091 _ACEOF
10092 if { (eval echo "$as_me:10092: \"$ac_cpp conftest.$ac_ext\"") >&5
10093   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10094   ac_status=$?
10095   egrep -v '^ *\+' conftest.er1 >conftest.err
10096   rm -f conftest.er1
10097   cat conftest.err >&5
10098   echo "$as_me:10098: \$? = $ac_status" >&5
10099   (exit $ac_status); } >/dev/null; then
10100   if test -s conftest.err; then
10101     ac_cpp_err=$ac_c_preproc_warn_flag
10102   else
10103     ac_cpp_err=
10104   fi
10105 else
10106   ac_cpp_err=yes
10107 fi
10108 if test -z "$ac_cpp_err"; then
10109   ac_cv_header_stdc=yes
10110 else
10111   echo "$as_me: failed program was:" >&5
10112   cat conftest.$ac_ext >&5
10113   ac_cv_header_stdc=no
10114 fi
10115 rm -f conftest.err conftest.$ac_ext
10116
10117 if test $ac_cv_header_stdc = yes; then
10118   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
10119   cat >conftest.$ac_ext <<_ACEOF
10120 #line 10120 "configure"
10121 #include "confdefs.h"
10122 #include <string.h>
10123
10124 _ACEOF
10125 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10126   egrep "memchr" >/dev/null 2>&1; then
10127   :
10128 else
10129   ac_cv_header_stdc=no
10130 fi
10131 rm -rf conftest*
10132
10133 fi
10134
10135 if test $ac_cv_header_stdc = yes; then
10136   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
10137   cat >conftest.$ac_ext <<_ACEOF
10138 #line 10138 "configure"
10139 #include "confdefs.h"
10140 #include <stdlib.h>
10141
10142 _ACEOF
10143 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10144   egrep "free" >/dev/null 2>&1; then
10145   :
10146 else
10147   ac_cv_header_stdc=no
10148 fi
10149 rm -rf conftest*
10150
10151 fi
10152
10153 if test $ac_cv_header_stdc = yes; then
10154   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
10155   if test "$cross_compiling" = yes; then
10156   :
10157 else
10158   cat >conftest.$ac_ext <<_ACEOF
10159 #line 10159 "configure"
10160 #include "confdefs.h"
10161 #include <ctype.h>
10162 #if ((' ' & 0x0FF) == 0x020)
10163 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
10164 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
10165 #else
10166 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
10167                      || ('j' <= (c) && (c) <= 'r') \
10168                      || ('s' <= (c) && (c) <= 'z'))
10169 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
10170 #endif
10171
10172 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
10173 int
10174 main ()
10175 {
10176   int i;
10177   for (i = 0; i < 256; i++)
10178     if (XOR (islower (i), ISLOWER (i))
10179         || toupper (i) != TOUPPER (i))
10180       $ac_main_return(2);
10181   $ac_main_return (0);
10182 }
10183 _ACEOF
10184 rm -f conftest$ac_exeext
10185 if { (eval echo "$as_me:10185: \"$ac_link\"") >&5
10186   (eval $ac_link) 2>&5
10187   ac_status=$?
10188   echo "$as_me:10188: \$? = $ac_status" >&5
10189   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10190   { (eval echo "$as_me:10190: \"$ac_try\"") >&5
10191   (eval $ac_try) 2>&5
10192   ac_status=$?
10193   echo "$as_me:10193: \$? = $ac_status" >&5
10194   (exit $ac_status); }; }; then
10195   :
10196 else
10197   echo "$as_me: program exited with status $ac_status" >&5
10198 echo "$as_me: failed program was:" >&5
10199 cat conftest.$ac_ext >&5
10200 ac_cv_header_stdc=no
10201 fi
10202 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
10203 fi
10204 fi
10205 fi
10206 echo "$as_me:10206: result: $ac_cv_header_stdc" >&5
10207 echo "${ECHO_T}$ac_cv_header_stdc" >&6
10208 if test $ac_cv_header_stdc = yes; then
10209
10210 cat >>confdefs.h <<\EOF
10211 #define STDC_HEADERS 1
10212 EOF
10213
10214 fi
10215
10216 ac_header_dirent=no
10217 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
10218   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
10219 echo "$as_me:10219: checking for $ac_hdr that defines DIR" >&5
10220 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
10221 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10222   echo $ECHO_N "(cached) $ECHO_C" >&6
10223 else
10224   cat >conftest.$ac_ext <<_ACEOF
10225 #line 10225 "configure"
10226 #include "confdefs.h"
10227 #include <sys/types.h>
10228 #include <$ac_hdr>
10229
10230 int
10231 main ()
10232 {
10233 if ((DIR *) 0)
10234 return 0;
10235   ;
10236   return 0;
10237 }
10238 _ACEOF
10239 rm -f conftest.$ac_objext
10240 if { (eval echo "$as_me:10240: \"$ac_compile\"") >&5
10241   (eval $ac_compile) 2>&5
10242   ac_status=$?
10243   echo "$as_me:10243: \$? = $ac_status" >&5
10244   (exit $ac_status); } &&
10245          { ac_try='test -s conftest.$ac_objext'
10246   { (eval echo "$as_me:10246: \"$ac_try\"") >&5
10247   (eval $ac_try) 2>&5
10248   ac_status=$?
10249   echo "$as_me:10249: \$? = $ac_status" >&5
10250   (exit $ac_status); }; }; then
10251   eval "$as_ac_Header=yes"
10252 else
10253   echo "$as_me: failed program was:" >&5
10254 cat conftest.$ac_ext >&5
10255 eval "$as_ac_Header=no"
10256 fi
10257 rm -f conftest.$ac_objext conftest.$ac_ext
10258 fi
10259 echo "$as_me:10259: result: `eval echo '${'$as_ac_Header'}'`" >&5
10260 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10261 if test `eval echo '${'$as_ac_Header'}'` = yes; then
10262   cat >>confdefs.h <<EOF
10263 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
10264 EOF
10265
10266 ac_header_dirent=$ac_hdr; break
10267 fi
10268
10269 done
10270 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
10271 if test $ac_header_dirent = dirent.h; then
10272   echo "$as_me:10272: checking for opendir in -ldir" >&5
10273 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
10274 if test "${ac_cv_lib_dir_opendir+set}" = set; then
10275   echo $ECHO_N "(cached) $ECHO_C" >&6
10276 else
10277   ac_check_lib_save_LIBS=$LIBS
10278 LIBS="-ldir  $LIBS"
10279 cat >conftest.$ac_ext <<_ACEOF
10280 #line 10280 "configure"
10281 #include "confdefs.h"
10282
10283 /* Override any gcc2 internal prototype to avoid an error.  */
10284 #ifdef __cplusplus
10285 extern "C"
10286 #endif
10287 /* We use char because int might match the return type of a gcc2
10288    builtin and then its argument prototype would still apply.  */
10289 char opendir ();
10290 int
10291 main ()
10292 {
10293 opendir ();
10294   ;
10295   return 0;
10296 }
10297 _ACEOF
10298 rm -f conftest.$ac_objext conftest$ac_exeext
10299 if { (eval echo "$as_me:10299: \"$ac_link\"") >&5
10300   (eval $ac_link) 2>&5
10301   ac_status=$?
10302   echo "$as_me:10302: \$? = $ac_status" >&5
10303   (exit $ac_status); } &&
10304          { ac_try='test -s conftest$ac_exeext'
10305   { (eval echo "$as_me:10305: \"$ac_try\"") >&5
10306   (eval $ac_try) 2>&5
10307   ac_status=$?
10308   echo "$as_me:10308: \$? = $ac_status" >&5
10309   (exit $ac_status); }; }; then
10310   ac_cv_lib_dir_opendir=yes
10311 else
10312   echo "$as_me: failed program was:" >&5
10313 cat conftest.$ac_ext >&5
10314 ac_cv_lib_dir_opendir=no
10315 fi
10316 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10317 LIBS=$ac_check_lib_save_LIBS
10318 fi
10319 echo "$as_me:10319: result: $ac_cv_lib_dir_opendir" >&5
10320 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
10321 if test $ac_cv_lib_dir_opendir = yes; then
10322   LIBS="$LIBS -ldir"
10323 fi
10324
10325 else
10326   echo "$as_me:10326: checking for opendir in -lx" >&5
10327 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
10328 if test "${ac_cv_lib_x_opendir+set}" = set; then
10329   echo $ECHO_N "(cached) $ECHO_C" >&6
10330 else
10331   ac_check_lib_save_LIBS=$LIBS
10332 LIBS="-lx  $LIBS"
10333 cat >conftest.$ac_ext <<_ACEOF
10334 #line 10334 "configure"
10335 #include "confdefs.h"
10336
10337 /* Override any gcc2 internal prototype to avoid an error.  */
10338 #ifdef __cplusplus
10339 extern "C"
10340 #endif
10341 /* We use char because int might match the return type of a gcc2
10342    builtin and then its argument prototype would still apply.  */
10343 char opendir ();
10344 int
10345 main ()
10346 {
10347 opendir ();
10348   ;
10349   return 0;
10350 }
10351 _ACEOF
10352 rm -f conftest.$ac_objext conftest$ac_exeext
10353 if { (eval echo "$as_me:10353: \"$ac_link\"") >&5
10354   (eval $ac_link) 2>&5
10355   ac_status=$?
10356   echo "$as_me:10356: \$? = $ac_status" >&5
10357   (exit $ac_status); } &&
10358          { ac_try='test -s conftest$ac_exeext'
10359   { (eval echo "$as_me:10359: \"$ac_try\"") >&5
10360   (eval $ac_try) 2>&5
10361   ac_status=$?
10362   echo "$as_me:10362: \$? = $ac_status" >&5
10363   (exit $ac_status); }; }; then
10364   ac_cv_lib_x_opendir=yes
10365 else
10366   echo "$as_me: failed program was:" >&5
10367 cat conftest.$ac_ext >&5
10368 ac_cv_lib_x_opendir=no
10369 fi
10370 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10371 LIBS=$ac_check_lib_save_LIBS
10372 fi
10373 echo "$as_me:10373: result: $ac_cv_lib_x_opendir" >&5
10374 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
10375 if test $ac_cv_lib_x_opendir = yes; then
10376   LIBS="$LIBS -lx"
10377 fi
10378
10379 fi
10380
10381 echo "$as_me:10381: checking whether time.h and sys/time.h may both be included" >&5
10382 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
10383 if test "${ac_cv_header_time+set}" = set; then
10384   echo $ECHO_N "(cached) $ECHO_C" >&6
10385 else
10386   cat >conftest.$ac_ext <<_ACEOF
10387 #line 10387 "configure"
10388 #include "confdefs.h"
10389 #include <sys/types.h>
10390 #include <sys/time.h>
10391 #include <time.h>
10392
10393 int
10394 main ()
10395 {
10396 if ((struct tm *) 0)
10397 return 0;
10398   ;
10399   return 0;
10400 }
10401 _ACEOF
10402 rm -f conftest.$ac_objext
10403 if { (eval echo "$as_me:10403: \"$ac_compile\"") >&5
10404   (eval $ac_compile) 2>&5
10405   ac_status=$?
10406   echo "$as_me:10406: \$? = $ac_status" >&5
10407   (exit $ac_status); } &&
10408          { ac_try='test -s conftest.$ac_objext'
10409   { (eval echo "$as_me:10409: \"$ac_try\"") >&5
10410   (eval $ac_try) 2>&5
10411   ac_status=$?
10412   echo "$as_me:10412: \$? = $ac_status" >&5
10413   (exit $ac_status); }; }; then
10414   ac_cv_header_time=yes
10415 else
10416   echo "$as_me: failed program was:" >&5
10417 cat conftest.$ac_ext >&5
10418 ac_cv_header_time=no
10419 fi
10420 rm -f conftest.$ac_objext conftest.$ac_ext
10421 fi
10422 echo "$as_me:10422: result: $ac_cv_header_time" >&5
10423 echo "${ECHO_T}$ac_cv_header_time" >&6
10424 if test $ac_cv_header_time = yes; then
10425
10426 cat >>confdefs.h <<\EOF
10427 #define TIME_WITH_SYS_TIME 1
10428 EOF
10429
10430 fi
10431
10432 ###     checks for compiler characteristics
10433 ac_ext=c
10434 ac_cpp='$CPP $CPPFLAGS'
10435 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
10436 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
10437 ac_compiler_gnu=$ac_cv_c_compiler_gnu
10438 ac_main_return=return
10439
10440 echo "$as_me:10440: checking for $CC option to accept ANSI C" >&5
10441 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
10442 if test "${ac_cv_prog_cc_stdc+set}" = set; then
10443   echo $ECHO_N "(cached) $ECHO_C" >&6
10444 else
10445   ac_cv_prog_cc_stdc=no
10446 ac_save_CC=$CC
10447 cat >conftest.$ac_ext <<_ACEOF
10448 #line 10448 "configure"
10449 #include "confdefs.h"
10450 #include <stdarg.h>
10451 #include <stdio.h>
10452 #include <sys/types.h>
10453 #include <sys/stat.h>
10454 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
10455 struct buf { int x; };
10456 FILE * (*rcsopen) (struct buf *, struct stat *, int);
10457 static char *e (p, i)
10458      char **p;
10459      int i;
10460 {
10461   return p[i];
10462 }
10463 static char *f (char * (*g) (char **, int), char **p, ...)
10464 {
10465   char *s;
10466   va_list v;
10467   va_start (v,p);
10468   s = g (p, va_arg (v,int));
10469   va_end (v);
10470   return s;
10471 }
10472 int test (int i, double x);
10473 struct s1 {int (*f) (int a);};
10474 struct s2 {int (*f) (double a);};
10475 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
10476 int argc;
10477 char **argv;
10478 int
10479 main ()
10480 {
10481 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
10482   ;
10483   return 0;
10484 }
10485 _ACEOF
10486 # Don't try gcc -ansi; that turns off useful extensions and
10487 # breaks some systems' header files.
10488 # AIX                   -qlanglvl=ansi
10489 # Ultrix and OSF/1      -std1
10490 # HP-UX 10.20 and later -Ae
10491 # HP-UX older versions  -Aa -D_HPUX_SOURCE
10492 # SVR4                  -Xc -D__EXTENSIONS__
10493 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
10494 do
10495   CC="$ac_save_CC $ac_arg"
10496   rm -f conftest.$ac_objext
10497 if { (eval echo "$as_me:10497: \"$ac_compile\"") >&5
10498   (eval $ac_compile) 2>&5
10499   ac_status=$?
10500   echo "$as_me:10500: \$? = $ac_status" >&5
10501   (exit $ac_status); } &&
10502          { ac_try='test -s conftest.$ac_objext'
10503   { (eval echo "$as_me:10503: \"$ac_try\"") >&5
10504   (eval $ac_try) 2>&5
10505   ac_status=$?
10506   echo "$as_me:10506: \$? = $ac_status" >&5
10507   (exit $ac_status); }; }; then
10508   ac_cv_prog_cc_stdc=$ac_arg
10509 break
10510 else
10511   echo "$as_me: failed program was:" >&5
10512 cat conftest.$ac_ext >&5
10513 fi
10514 rm -f conftest.$ac_objext
10515 done
10516 rm -f conftest.$ac_ext conftest.$ac_objext
10517 CC=$ac_save_CC
10518
10519 fi
10520
10521 case "x$ac_cv_prog_cc_stdc" in
10522   x|xno)
10523     echo "$as_me:10523: result: none needed" >&5
10524 echo "${ECHO_T}none needed" >&6 ;;
10525   *)
10526     echo "$as_me:10526: result: $ac_cv_prog_cc_stdc" >&5
10527 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
10528     CC="$CC $ac_cv_prog_cc_stdc" ;;
10529 esac
10530
10531 echo "$as_me:10531: checking for an ANSI C-conforming const" >&5
10532 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
10533 if test "${ac_cv_c_const+set}" = set; then
10534   echo $ECHO_N "(cached) $ECHO_C" >&6
10535 else
10536   cat >conftest.$ac_ext <<_ACEOF
10537 #line 10537 "configure"
10538 #include "confdefs.h"
10539
10540 int
10541 main ()
10542 {
10543 /* FIXME: Include the comments suggested by Paul. */
10544 #ifndef __cplusplus
10545   /* Ultrix mips cc rejects this.  */
10546   typedef int charset[2];
10547   const charset x;
10548   /* SunOS 4.1.1 cc rejects this.  */
10549   char const *const *ccp;
10550   char **p;
10551   /* NEC SVR4.0.2 mips cc rejects this.  */
10552   struct point {int x, y;};
10553   static struct point const zero = {0,0};
10554   /* AIX XL C 1.02.0.0 rejects this.
10555      It does not let you subtract one const X* pointer from another in
10556      an arm of an if-expression whose if-part is not a constant
10557      expression */
10558   const char *g = "string";
10559   ccp = &g + (g ? g-g : 0);
10560   /* HPUX 7.0 cc rejects these. */
10561   ++ccp;
10562   p = (char**) ccp;
10563   ccp = (char const *const *) p;
10564   { /* SCO 3.2v4 cc rejects this.  */
10565     char *t;
10566     char const *s = 0 ? (char *) 0 : (char const *) 0;
10567
10568     *t++ = 0;
10569   }
10570   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
10571     int x[] = {25, 17};
10572     const int *foo = &x[0];
10573     ++foo;
10574   }
10575   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
10576     typedef const int *iptr;
10577     iptr p = 0;
10578     ++p;
10579   }
10580   { /* AIX XL C 1.02.0.0 rejects this saying
10581        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
10582     struct s { int j; const int *ap[3]; };
10583     struct s *b; b->j = 5;
10584   }
10585   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
10586     const int foo = 10;
10587   }
10588 #endif
10589
10590   ;
10591   return 0;
10592 }
10593 _ACEOF
10594 rm -f conftest.$ac_objext
10595 if { (eval echo "$as_me:10595: \"$ac_compile\"") >&5
10596   (eval $ac_compile) 2>&5
10597   ac_status=$?
10598   echo "$as_me:10598: \$? = $ac_status" >&5
10599   (exit $ac_status); } &&
10600          { ac_try='test -s conftest.$ac_objext'
10601   { (eval echo "$as_me:10601: \"$ac_try\"") >&5
10602   (eval $ac_try) 2>&5
10603   ac_status=$?
10604   echo "$as_me:10604: \$? = $ac_status" >&5
10605   (exit $ac_status); }; }; then
10606   ac_cv_c_const=yes
10607 else
10608   echo "$as_me: failed program was:" >&5
10609 cat conftest.$ac_ext >&5
10610 ac_cv_c_const=no
10611 fi
10612 rm -f conftest.$ac_objext conftest.$ac_ext
10613 fi
10614 echo "$as_me:10614: result: $ac_cv_c_const" >&5
10615 echo "${ECHO_T}$ac_cv_c_const" >&6
10616 if test $ac_cv_c_const = no; then
10617
10618 cat >>confdefs.h <<\EOF
10619 #define const
10620 EOF
10621
10622 fi
10623
10624 ###     Checks for external-data
10625
10626 echo "$as_me:10626: checking if data-only library module links" >&5
10627 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
10628 if test "${cf_cv_link_dataonly+set}" = set; then
10629   echo $ECHO_N "(cached) $ECHO_C" >&6
10630 else
10631
10632         rm -f conftest.a
10633         cat >conftest.$ac_ext <<EOF
10634 #line 10634 "configure"
10635 int     testdata[3] = { 123, 456, 789 };
10636 EOF
10637         if { (eval echo "$as_me:10637: \"$ac_compile\"") >&5
10638   (eval $ac_compile) 2>&5
10639   ac_status=$?
10640   echo "$as_me:10640: \$? = $ac_status" >&5
10641   (exit $ac_status); } ; then
10642                 mv conftest.o data.o && \
10643                 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
10644         fi
10645         rm -f conftest.$ac_ext data.o
10646         cat >conftest.$ac_ext <<EOF
10647 #line 10647 "configure"
10648 int     testfunc()
10649 {
10650 #if defined(NeXT)
10651         ${cf_cv_main_return:-return}(1);        /* I'm told this linker is broken */
10652 #else
10653         extern int testdata[3];
10654         return testdata[0] == 123
10655            &&  testdata[1] == 456
10656            &&  testdata[2] == 789;
10657 #endif
10658 }
10659 EOF
10660         if { (eval echo "$as_me:10660: \"$ac_compile\"") >&5
10661   (eval $ac_compile) 2>&5
10662   ac_status=$?
10663   echo "$as_me:10663: \$? = $ac_status" >&5
10664   (exit $ac_status); }; then
10665                 mv conftest.o func.o && \
10666                 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
10667         fi
10668         rm -f conftest.$ac_ext func.o
10669         ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
10670         cf_saveLIBS="$LIBS"
10671         LIBS="conftest.a $LIBS"
10672         if test "$cross_compiling" = yes; then
10673   cf_cv_link_dataonly=unknown
10674 else
10675   cat >conftest.$ac_ext <<_ACEOF
10676 #line 10676 "configure"
10677 #include "confdefs.h"
10678
10679         int main()
10680         {
10681                 extern int testfunc();
10682                 ${cf_cv_main_return:-return} (!testfunc());
10683         }
10684
10685 _ACEOF
10686 rm -f conftest$ac_exeext
10687 if { (eval echo "$as_me:10687: \"$ac_link\"") >&5
10688   (eval $ac_link) 2>&5
10689   ac_status=$?
10690   echo "$as_me:10690: \$? = $ac_status" >&5
10691   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10692   { (eval echo "$as_me:10692: \"$ac_try\"") >&5
10693   (eval $ac_try) 2>&5
10694   ac_status=$?
10695   echo "$as_me:10695: \$? = $ac_status" >&5
10696   (exit $ac_status); }; }; then
10697   cf_cv_link_dataonly=yes
10698 else
10699   echo "$as_me: program exited with status $ac_status" >&5
10700 echo "$as_me: failed program was:" >&5
10701 cat conftest.$ac_ext >&5
10702 cf_cv_link_dataonly=no
10703 fi
10704 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
10705 fi
10706         LIBS="$cf_saveLIBS"
10707
10708 fi
10709
10710 echo "$as_me:10710: result: $cf_cv_link_dataonly" >&5
10711 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
10712
10713 if test "$cf_cv_link_dataonly" = no ; then
10714         cat >>confdefs.h <<\EOF
10715 #define BROKEN_LINKER 1
10716 EOF
10717
10718         BROKEN_LINKER=1
10719 fi
10720
10721 ###     Checks for library functions.
10722
10723 echo "$as_me:10723: checking for working mkstemp" >&5
10724 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
10725 if test "${cf_cv_func_mkstemp+set}" = set; then
10726   echo $ECHO_N "(cached) $ECHO_C" >&6
10727 else
10728
10729 rm -rf conftest*
10730 if test "$cross_compiling" = yes; then
10731   echo "$as_me:10731: checking for mkstemp" >&5
10732 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
10733 if test "${ac_cv_func_mkstemp+set}" = set; then
10734   echo $ECHO_N "(cached) $ECHO_C" >&6
10735 else
10736   cat >conftest.$ac_ext <<_ACEOF
10737 #line 10737 "configure"
10738 #include "confdefs.h"
10739 /* System header to define __stub macros and hopefully few prototypes,
10740     which can conflict with char mkstemp (); below.  */
10741 #include <assert.h>
10742 /* Override any gcc2 internal prototype to avoid an error.  */
10743 #ifdef __cplusplus
10744 extern "C"
10745 #endif
10746 /* We use char because int might match the return type of a gcc2
10747    builtin and then its argument prototype would still apply.  */
10748 char mkstemp ();
10749 char (*f) ();
10750
10751 int
10752 main ()
10753 {
10754 /* The GNU C library defines this for functions which it implements
10755     to always fail with ENOSYS.  Some functions are actually named
10756     something starting with __ and the normal name is an alias.  */
10757 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
10758 choke me
10759 #else
10760 f = mkstemp;
10761 #endif
10762
10763   ;
10764   return 0;
10765 }
10766 _ACEOF
10767 rm -f conftest.$ac_objext conftest$ac_exeext
10768 if { (eval echo "$as_me:10768: \"$ac_link\"") >&5
10769   (eval $ac_link) 2>&5
10770   ac_status=$?
10771   echo "$as_me:10771: \$? = $ac_status" >&5
10772   (exit $ac_status); } &&
10773          { ac_try='test -s conftest$ac_exeext'
10774   { (eval echo "$as_me:10774: \"$ac_try\"") >&5
10775   (eval $ac_try) 2>&5
10776   ac_status=$?
10777   echo "$as_me:10777: \$? = $ac_status" >&5
10778   (exit $ac_status); }; }; then
10779   ac_cv_func_mkstemp=yes
10780 else
10781   echo "$as_me: failed program was:" >&5
10782 cat conftest.$ac_ext >&5
10783 ac_cv_func_mkstemp=no
10784 fi
10785 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10786 fi
10787 echo "$as_me:10787: result: $ac_cv_func_mkstemp" >&5
10788 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
10789
10790 else
10791   cat >conftest.$ac_ext <<_ACEOF
10792 #line 10792 "configure"
10793 #include "confdefs.h"
10794
10795 #include <sys/types.h>
10796 #include <stdlib.h>
10797 #include <stdio.h>
10798 #include <string.h>
10799 #include <sys/stat.h>
10800 int main()
10801 {
10802         char *tmpl = "conftestXXXXXX";
10803         char name[2][80];
10804         int n;
10805         int result = 0;
10806         int fd;
10807         struct stat sb;
10808
10809         umask(077);
10810         for (n = 0; n < 2; ++n) {
10811                 strcpy(name[n], tmpl);
10812                 if ((fd = mkstemp(name[n])) >= 0) {
10813                         if (!strcmp(name[n], tmpl)
10814                          || stat(name[n], &sb) != 0
10815                          || (sb.st_mode & S_IFMT) != S_IFREG
10816                          || (sb.st_mode & 077) != 0) {
10817                                 result = 1;
10818                         }
10819                         close(fd);
10820                 }
10821         }
10822         if (result == 0
10823          && !strcmp(name[0], name[1]))
10824                 result = 1;
10825         ${cf_cv_main_return:-return}(result);
10826 }
10827
10828 _ACEOF
10829 rm -f conftest$ac_exeext
10830 if { (eval echo "$as_me:10830: \"$ac_link\"") >&5
10831   (eval $ac_link) 2>&5
10832   ac_status=$?
10833   echo "$as_me:10833: \$? = $ac_status" >&5
10834   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10835   { (eval echo "$as_me:10835: \"$ac_try\"") >&5
10836   (eval $ac_try) 2>&5
10837   ac_status=$?
10838   echo "$as_me:10838: \$? = $ac_status" >&5
10839   (exit $ac_status); }; }; then
10840   cf_cv_func_mkstemp=yes
10841
10842 else
10843   echo "$as_me: program exited with status $ac_status" >&5
10844 echo "$as_me: failed program was:" >&5
10845 cat conftest.$ac_ext >&5
10846 cf_cv_func_mkstemp=no
10847
10848 fi
10849 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
10850 fi
10851
10852 fi
10853 echo "$as_me:10853: result: $cf_cv_func_mkstemp" >&5
10854 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
10855 if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
10856         cat >>confdefs.h <<\EOF
10857 #define HAVE_MKSTEMP 1
10858 EOF
10859
10860 fi
10861
10862 echo "$as_me:10862: checking return type of signal handlers" >&5
10863 echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
10864 if test "${ac_cv_type_signal+set}" = set; then
10865   echo $ECHO_N "(cached) $ECHO_C" >&6
10866 else
10867   cat >conftest.$ac_ext <<_ACEOF
10868 #line 10868 "configure"
10869 #include "confdefs.h"
10870 #include <sys/types.h>
10871 #include <signal.h>
10872 #ifdef signal
10873 # undef signal
10874 #endif
10875 #ifdef __cplusplus
10876 extern "C" void (*signal (int, void (*)(int)))(int);
10877 #else
10878 void (*signal ()) ();
10879 #endif
10880
10881 int
10882 main ()
10883 {
10884 int i;
10885   ;
10886   return 0;
10887 }
10888 _ACEOF
10889 rm -f conftest.$ac_objext
10890 if { (eval echo "$as_me:10890: \"$ac_compile\"") >&5
10891   (eval $ac_compile) 2>&5
10892   ac_status=$?
10893   echo "$as_me:10893: \$? = $ac_status" >&5
10894   (exit $ac_status); } &&
10895          { ac_try='test -s conftest.$ac_objext'
10896   { (eval echo "$as_me:10896: \"$ac_try\"") >&5
10897   (eval $ac_try) 2>&5
10898   ac_status=$?
10899   echo "$as_me:10899: \$? = $ac_status" >&5
10900   (exit $ac_status); }; }; then
10901   ac_cv_type_signal=void
10902 else
10903   echo "$as_me: failed program was:" >&5
10904 cat conftest.$ac_ext >&5
10905 ac_cv_type_signal=int
10906 fi
10907 rm -f conftest.$ac_objext conftest.$ac_ext
10908 fi
10909 echo "$as_me:10909: result: $ac_cv_type_signal" >&5
10910 echo "${ECHO_T}$ac_cv_type_signal" >&6
10911
10912 cat >>confdefs.h <<EOF
10913 #define RETSIGTYPE $ac_cv_type_signal
10914 EOF
10915
10916 if test -z "$cf_user_CFLAGS" && test "$with_no_leaks" = no ; then
10917         CFLAGS=`echo ${CFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
10918         CXXFLAGS=`echo ${CXXFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
10919 fi
10920
10921 if test "$cf_with_ada" != "no" ; then
10922
10923 cf_ada_make=gnatmake
10924 # Extract the first word of "$cf_ada_make", so it can be a program name with args.
10925 set dummy $cf_ada_make; ac_word=$2
10926 echo "$as_me:10926: checking for $ac_word" >&5
10927 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
10928 if test "${ac_cv_prog_gnat_exists+set}" = set; then
10929   echo $ECHO_N "(cached) $ECHO_C" >&6
10930 else
10931   if test -n "$gnat_exists"; then
10932   ac_cv_prog_gnat_exists="$gnat_exists" # Let the user override the test.
10933 else
10934   ac_save_IFS=$IFS; IFS=$ac_path_separator
10935 ac_dummy="$PATH"
10936 for ac_dir in $ac_dummy; do
10937   IFS=$ac_save_IFS
10938   test -z "$ac_dir" && ac_dir=.
10939   $as_executable_p "$ac_dir/$ac_word" || continue
10940 ac_cv_prog_gnat_exists="yes"
10941 echo "$as_me:10941: found $ac_dir/$ac_word" >&5
10942 break
10943 done
10944
10945   test -z "$ac_cv_prog_gnat_exists" && ac_cv_prog_gnat_exists="no"
10946 fi
10947 fi
10948 gnat_exists=$ac_cv_prog_gnat_exists
10949 if test -n "$gnat_exists"; then
10950   echo "$as_me:10950: result: $gnat_exists" >&5
10951 echo "${ECHO_T}$gnat_exists" >&6
10952 else
10953   echo "$as_me:10953: result: no" >&5
10954 echo "${ECHO_T}no" >&6
10955 fi
10956
10957 if test "$ac_cv_prog_gnat_exists" = no; then
10958    cf_ada_make=
10959 else
10960
10961 echo "$as_me:10961: checking for gnat version" >&5
10962 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
10963 cf_gnat_version=`${cf_ada_make:-gnatmake} -v 2>&1 | \
10964         grep '[0-9].[0-9][0-9]*' |\
10965     sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
10966 echo "$as_me:10966: result: $cf_gnat_version" >&5
10967 echo "${ECHO_T}$cf_gnat_version" >&6
10968
10969 case $cf_gnat_version in #(vi
10970 3.1[1-9]*|3.[2-9]*|[4-9].*) #(vi
10971         cf_cv_prog_gnat_correct=yes
10972         ;;
10973 *)
10974         { echo "$as_me:10974: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5
10975 echo "$as_me: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&2;}
10976         cf_cv_prog_gnat_correct=no
10977         ;;
10978 esac
10979
10980    # Extract the first word of "m4", so it can be a program name with args.
10981 set dummy m4; ac_word=$2
10982 echo "$as_me:10982: checking for $ac_word" >&5
10983 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
10984 if test "${ac_cv_prog_M4_exists+set}" = set; then
10985   echo $ECHO_N "(cached) $ECHO_C" >&6
10986 else
10987   if test -n "$M4_exists"; then
10988   ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
10989 else
10990   ac_save_IFS=$IFS; IFS=$ac_path_separator
10991 ac_dummy="$PATH"
10992 for ac_dir in $ac_dummy; do
10993   IFS=$ac_save_IFS
10994   test -z "$ac_dir" && ac_dir=.
10995   $as_executable_p "$ac_dir/$ac_word" || continue
10996 ac_cv_prog_M4_exists="yes"
10997 echo "$as_me:10997: found $ac_dir/$ac_word" >&5
10998 break
10999 done
11000
11001   test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
11002 fi
11003 fi
11004 M4_exists=$ac_cv_prog_M4_exists
11005 if test -n "$M4_exists"; then
11006   echo "$as_me:11006: result: $M4_exists" >&5
11007 echo "${ECHO_T}$M4_exists" >&6
11008 else
11009   echo "$as_me:11009: result: no" >&5
11010 echo "${ECHO_T}no" >&6
11011 fi
11012
11013    if test "$ac_cv_prog_M4_exists" = no; then
11014       cf_cv_prog_gnat_correct=no
11015       echo Ada95 binding required program m4 not found. Ada95 binding disabled.
11016    fi
11017    if test "$cf_cv_prog_gnat_correct" = yes; then
11018       echo "$as_me:11018: checking if GNAT works" >&5
11019 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
11020
11021 rm -rf conftest* *~conftest*
11022 cat >>conftest.ads <<CF_EOF
11023 procedure conftest;
11024 CF_EOF
11025 cat >>conftest.adb <<CF_EOF
11026 with Text_IO;
11027 with GNAT.OS_Lib;
11028 procedure conftest is
11029 begin
11030    Text_IO.Put ("Hello World");
11031    Text_IO.New_Line;
11032    GNAT.OS_Lib.OS_Exit (0);
11033 end conftest;
11034 CF_EOF
11035 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
11036    if ( ./conftest 1>&5 2>&1 ) ; then
11037       cf_cv_prog_gnat_correct=yes
11038    else
11039       cf_cv_prog_gnat_correct=no
11040    fi
11041 else
11042    cf_cv_prog_gnat_correct=no
11043 fi
11044 rm -rf conftest* *~conftest*
11045
11046       echo "$as_me:11046: result: $cf_cv_prog_gnat_correct" >&5
11047 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
11048    fi
11049 fi
11050
11051         if test "$cf_cv_prog_gnat_correct" = yes; then
11052
11053                 # make ADAFLAGS consistent with CFLAGS
11054                 case "$CFLAGS" in
11055                 *-g*)
11056
11057         ADAFLAGS="$ADAFLAGS -g"
11058
11059                         ;;
11060                 esac
11061                 case "$CFLAGS" in
11062                 *-O*)
11063
11064         ADAFLAGS="$ADAFLAGS -O3"
11065
11066                         ;;
11067                 esac
11068
11069 echo "$as_me:11069: checking if GNAT supports generics" >&5
11070 echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6
11071 case $cf_gnat_version in #(vi
11072 3.[1-9]*|[4-9].*) #(vi
11073         cf_gnat_generics=yes
11074         ;;
11075 *)
11076         cf_gnat_generics=no
11077         ;;
11078 esac
11079 echo "$as_me:11079: result: $cf_gnat_generics" >&5
11080 echo "${ECHO_T}$cf_gnat_generics" >&6
11081
11082 if test "$cf_gnat_generics" = yes
11083 then
11084         cf_compile_generics=generics
11085         cf_generic_objects="\${GENOBJS}"
11086 else
11087         cf_compile_generics=
11088         cf_generic_objects=
11089 fi
11090
11091 echo "$as_me:11091: checking if GNAT supports SIGINT" >&5
11092 echo $ECHO_N "checking if GNAT supports SIGINT... $ECHO_C" >&6
11093 if test "${cf_cv_gnat_sigint+set}" = set; then
11094   echo $ECHO_N "(cached) $ECHO_C" >&6
11095 else
11096
11097 rm -rf conftest* *~conftest*
11098 cat >>conftest.ads <<CF_EOF
11099 with Ada.Interrupts.Names;
11100
11101 package ConfTest is
11102
11103    pragma Warnings (Off);  --  the next pragma exists since 3.11p
11104    pragma Unreserve_All_Interrupts;
11105    pragma Warnings (On);
11106
11107    protected Process is
11108       procedure Stop;
11109       function Continue return Boolean;
11110       pragma Attach_Handler (Stop, Ada.Interrupts.Names.SIGINT);
11111    private
11112       Done : Boolean := False;
11113    end Process;
11114
11115 end ConfTest;
11116 CF_EOF
11117 cat >>conftest.adb <<CF_EOF
11118 package body ConfTest is
11119    protected body Process is
11120       procedure Stop is
11121       begin
11122          Done := True;
11123       end Stop;
11124       function Continue return Boolean is
11125       begin
11126          return not Done;
11127       end Continue;
11128    end Process;
11129 end ConfTest;
11130 CF_EOF
11131 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
11132       cf_cv_gnat_sigint=yes
11133 else
11134    cf_cv_gnat_sigint=no
11135 fi
11136 rm -rf conftest* *~conftest*
11137
11138 fi
11139 echo "$as_me:11139: result: $cf_cv_gnat_sigint" >&5
11140 echo "${ECHO_T}$cf_cv_gnat_sigint" >&6
11141
11142 if test $cf_cv_gnat_sigint = yes ; then
11143         USE_GNAT_SIGINT=""
11144 else
11145         USE_GNAT_SIGINT="#"
11146 fi
11147
11148 echo "$as_me:11148: checking if GNAT pragma Unreferenced works" >&5
11149 echo $ECHO_N "checking if GNAT pragma Unreferenced works... $ECHO_C" >&6
11150 if test "${cf_cv_pragma_unreferenced+set}" = set; then
11151   echo $ECHO_N "(cached) $ECHO_C" >&6
11152 else
11153
11154 rm -rf conftest* *~conftest*
11155 cat >>conftest.ads <<CF_EOF
11156 procedure conftest;
11157 CF_EOF
11158 cat >>conftest.adb <<CF_EOF
11159 with Text_IO;
11160 with GNAT.OS_Lib;
11161 procedure conftest is
11162    test : Integer;
11163    pragma Unreferenced (test);
11164 begin
11165    test := 1;
11166    Text_IO.Put ("Hello World");
11167    Text_IO.New_Line;
11168    GNAT.OS_Lib.OS_Exit (0);
11169 end conftest;
11170 CF_EOF
11171 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
11172       cf_cv_pragma_unreferenced=yes
11173 else
11174    cf_cv_pragma_unreferenced=no
11175 fi
11176 rm -rf conftest* *~conftest*
11177
11178 fi
11179 echo "$as_me:11179: result: $cf_cv_pragma_unreferenced" >&5
11180 echo "${ECHO_T}$cf_cv_pragma_unreferenced" >&6
11181
11182 # if the pragma is supported, use it (needed in the Trace code).
11183 if test $cf_cv_pragma_unreferenced = yes ; then
11184         PRAGMA_UNREF=TRUE
11185 else
11186         PRAGMA_UNREF=FALSE
11187 fi
11188
11189 cf_gnat_libraries=no
11190 cf_gnat_projects=no
11191
11192 echo "$as_me:11192: checking if GNAT supports project files" >&5
11193 echo $ECHO_N "checking if GNAT supports project files... $ECHO_C" >&6
11194 case $cf_gnat_version in #(vi
11195 3.[0-9]*) #(vi
11196         ;;
11197 *)
11198         case $cf_cv_system_name in #(vi
11199         cygwin*) #(vi
11200                 ;;
11201         *)
11202                 mkdir conftest.src conftest.bin conftest.lib
11203                 cd conftest.src
11204                 rm -rf conftest* *~conftest*
11205                 cat >>library.gpr <<CF_EOF
11206 project Library is
11207   Kind := External ("LIB_KIND");
11208   for Library_Name use "ConfTest";
11209   for Object_Dir use ".";
11210   for Library_ALI_Dir use External("LIBRARY_DIR");
11211   for Library_Version use External ("SONAME");
11212   for Library_Kind use Kind;
11213   for Library_Dir use External("BUILD_DIR");
11214   Source_Dir := External ("SOURCE_DIR");
11215   for Source_Dirs use (Source_Dir);
11216   package Compiler is
11217      for Default_Switches ("Ada") use
11218        ("-g",
11219         "-O2",
11220         "-gnatafno",
11221         "-gnatVa",   -- All validity checks
11222         "-gnatwa");  -- Activate all optional errors
11223   end Compiler;
11224 end Library;
11225 CF_EOF
11226                 cat >>confpackage.ads <<CF_EOF
11227 package ConfPackage is
11228    procedure conftest;
11229 end ConfPackage;
11230 CF_EOF
11231                 cat >>confpackage.adb <<CF_EOF
11232 with Text_IO;
11233 package body ConfPackage is
11234    procedure conftest is
11235    begin
11236       Text_IO.Put ("Hello World");
11237       Text_IO.New_Line;
11238    end conftest;
11239 end ConfPackage;
11240 CF_EOF
11241                 if ( $cf_ada_make $ADAFLAGS \
11242                                 -Plibrary.gpr \
11243                                 -XBUILD_DIR=`cd ../conftest.bin;pwd` \
11244                                 -XLIBRARY_DIR=`cd ../conftest.lib;pwd` \
11245                                 -XSOURCE_DIR=`pwd` \
11246                                 -XSONAME=libConfTest.so.1 \
11247                                 -XLIB_KIND=static 1>&5 2>&1 ) ; then
11248                         cf_gnat_projects=yes
11249                 fi
11250                 cd ..
11251                 if test -f conftest.lib/confpackage.ali
11252                 then
11253                         cf_gnat_libraries=yes
11254                 fi
11255                 rm -rf conftest* *~conftest*
11256                 ;;
11257         esac
11258         ;;
11259 esac
11260 echo "$as_me:11260: result: $cf_gnat_projects" >&5
11261 echo "${ECHO_T}$cf_gnat_projects" >&6
11262
11263 if test $cf_gnat_projects = yes
11264 then
11265         echo "$as_me:11265: checking if GNAT supports libraries" >&5
11266 echo $ECHO_N "checking if GNAT supports libraries... $ECHO_C" >&6
11267         echo "$as_me:11267: result: $cf_gnat_libraries" >&5
11268 echo "${ECHO_T}$cf_gnat_libraries" >&6
11269 fi
11270
11271 if test "$cf_gnat_projects" = yes
11272 then
11273         USE_OLD_MAKERULES="#"
11274         USE_GNAT_PROJECTS=""
11275 else
11276         USE_OLD_MAKERULES=""
11277         USE_GNAT_PROJECTS="#"
11278 fi
11279
11280 if test "$cf_gnat_libraries" = yes
11281 then
11282         USE_GNAT_LIBRARIES=""
11283 else
11284         USE_GNAT_LIBRARIES="#"
11285 fi
11286
11287 echo "$as_me:11287: checking for ada-compiler" >&5
11288 echo $ECHO_N "checking for ada-compiler... $ECHO_C" >&6
11289
11290 # Check whether --with-ada-compiler or --without-ada-compiler was given.
11291 if test "${with_ada_compiler+set}" = set; then
11292   withval="$with_ada_compiler"
11293   cf_ada_compiler=$withval
11294 else
11295   cf_ada_compiler=gnatmake
11296 fi;
11297
11298 echo "$as_me:11298: result: $cf_ada_compiler" >&5
11299 echo "${ECHO_T}$cf_ada_compiler" >&6
11300
11301                 cf_ada_package=terminal_interface
11302
11303 echo "$as_me:11303: checking for ada-include" >&5
11304 echo $ECHO_N "checking for ada-include... $ECHO_C" >&6
11305
11306 # Check whether --with-ada-include or --without-ada-include was given.
11307 if test "${with_ada_include+set}" = set; then
11308   withval="$with_ada_include"
11309
11310 else
11311   withval="${ADA_INCLUDE:-$prefix/share/ada/adainclude}"
11312 fi; if test -n "$prefix/share/ada/adainclude" ; then
11313
11314 if test "x$prefix" != xNONE; then
11315   cf_path_syntax="$prefix"
11316 else
11317   cf_path_syntax="$ac_default_prefix"
11318 fi
11319
11320 case ".$withval" in #(vi
11321 .\$\(*\)*|.\'*\'*) #(vi
11322   ;;
11323 ..|./*|.\\*) #(vi
11324   ;;
11325 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
11326   ;;
11327 .\${*prefix}*) #(vi
11328   eval withval="$withval"
11329   case ".$withval" in #(vi
11330   .NONE/*)
11331     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
11332     ;;
11333   esac
11334   ;; #(vi
11335 .no|.NONE/*)
11336   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
11337   ;;
11338 *)
11339   { { echo "$as_me:11339: error: expected a pathname, not \"$withval\"" >&5
11340 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
11341    { (exit 1); exit 1; }; }
11342   ;;
11343 esac
11344
11345 fi
11346 ADA_INCLUDE="$withval"
11347
11348 echo "$as_me:11348: result: $ADA_INCLUDE" >&5
11349 echo "${ECHO_T}$ADA_INCLUDE" >&6
11350
11351 echo "$as_me:11351: checking for ada-objects" >&5
11352 echo $ECHO_N "checking for ada-objects... $ECHO_C" >&6
11353
11354 # Check whether --with-ada-objects or --without-ada-objects was given.
11355 if test "${with_ada_objects+set}" = set; then
11356   withval="$with_ada_objects"
11357
11358 else
11359   withval="${ADA_OBJECTS:-$prefix/lib/ada/adalib}"
11360 fi; if test -n "$prefix/lib/ada/adalib" ; then
11361
11362 if test "x$prefix" != xNONE; then
11363   cf_path_syntax="$prefix"
11364 else
11365   cf_path_syntax="$ac_default_prefix"
11366 fi
11367
11368 case ".$withval" in #(vi
11369 .\$\(*\)*|.\'*\'*) #(vi
11370   ;;
11371 ..|./*|.\\*) #(vi
11372   ;;
11373 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
11374   ;;
11375 .\${*prefix}*) #(vi
11376   eval withval="$withval"
11377   case ".$withval" in #(vi
11378   .NONE/*)
11379     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
11380     ;;
11381   esac
11382   ;; #(vi
11383 .no|.NONE/*)
11384   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
11385   ;;
11386 *)
11387   { { echo "$as_me:11387: error: expected a pathname, not \"$withval\"" >&5
11388 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
11389    { (exit 1); exit 1; }; }
11390   ;;
11391 esac
11392
11393 fi
11394 ADA_OBJECTS="$withval"
11395
11396 echo "$as_me:11396: result: $ADA_OBJECTS" >&5
11397 echo "${ECHO_T}$ADA_OBJECTS" >&6
11398
11399 echo "$as_me:11399: checking if an Ada95 shared-library should be built" >&5
11400 echo $ECHO_N "checking if an Ada95 shared-library should be built... $ECHO_C" >&6
11401
11402 # Check whether --with-ada-sharedlib or --without-ada-sharedlib was given.
11403 if test "${with_ada_sharedlib+set}" = set; then
11404   withval="$with_ada_sharedlib"
11405   with_ada_sharedlib=$withval
11406 else
11407   with_ada_sharedlib=no
11408 fi;
11409 echo "$as_me:11409: result: $with_ada_sharedlib" >&5
11410 echo "${ECHO_T}$with_ada_sharedlib" >&6
11411
11412 ADA_SHAREDLIB='lib$(LIB_NAME).so.1'
11413 MAKE_ADA_SHAREDLIB="#"
11414
11415 if test "x$with_ada_sharedlib" != xno
11416 then
11417         MAKE_ADA_SHAREDLIB=
11418         if test "x$with_ada_sharedlib" != xyes
11419         then
11420                 ADA_SHAREDLIB="$with_ada_sharedlib"
11421         fi
11422 fi
11423
11424         else
11425                 { { echo "$as_me:11425: error: No usable Ada compiler found" >&5
11426 echo "$as_me: error: No usable Ada compiler found" >&2;}
11427    { (exit 1); exit 1; }; }
11428         fi
11429 else
11430         { { echo "$as_me:11430: error: The Ada compiler is needed for this package" >&5
11431 echo "$as_me: error: The Ada compiler is needed for this package" >&2;}
11432    { (exit 1); exit 1; }; }
11433 fi
11434
11435 ################################################################################
11436
11437 # not needed
11438 TINFO_ARGS2=
11439
11440 ### Construct the list of include-directories to be generated
11441
11442 CPPFLAGS="$CPPFLAGS -I. -I../include"
11443 if test "$srcdir" != "."; then
11444         CPPFLAGS="$CPPFLAGS -I\${srcdir}/../include"
11445 fi
11446 if test "$GCC" != yes; then
11447         CPPFLAGS="$CPPFLAGS -I\${includedir}"
11448 elif test "$includedir" != "/usr/include"; then
11449         if test "$includedir" = '${prefix}/include' ; then
11450                 if test $prefix != /usr ; then
11451                         CPPFLAGS="$CPPFLAGS -I\${includedir}"
11452                 fi
11453         else
11454                 CPPFLAGS="$CPPFLAGS -I\${includedir}"
11455         fi
11456 fi
11457
11458 ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
11459 if test "$srcdir" != "."; then
11460         ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
11461 fi
11462 if test "$GCC" != yes; then
11463         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
11464 elif test "$includedir" != "/usr/include"; then
11465         if test "$includedir" = '${prefix}/include' ; then
11466                 if test $prefix != /usr ; then
11467                         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
11468                 fi
11469         else
11470                 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
11471         fi
11472 fi
11473
11474 ### Build up pieces for makefile rules
11475 echo "$as_me:11475: checking default library suffix" >&5
11476 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
11477
11478         case $DFT_LWR_MODEL in
11479         libtool) DFT_ARG_SUFFIX=''   ;;
11480         normal)  DFT_ARG_SUFFIX=''   ;;
11481         debug)   DFT_ARG_SUFFIX='_g' ;;
11482         profile) DFT_ARG_SUFFIX='_p' ;;
11483         shared)  DFT_ARG_SUFFIX=''   ;;
11484         esac
11485         test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
11486 echo "$as_me:11486: result: $DFT_ARG_SUFFIX" >&5
11487 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
11488
11489 echo "$as_me:11489: checking default library-dependency suffix" >&5
11490 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
11491
11492         case $DFT_LWR_MODEL in #(vi
11493         libtool) #(vi
11494                 DFT_LIB_SUFFIX='.la'
11495                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
11496                 ;;
11497         normal) #(vi
11498                 DFT_LIB_SUFFIX='.a'
11499                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
11500                 ;;
11501         debug) #(vi
11502                 DFT_LIB_SUFFIX='_g.a'
11503                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
11504                 ;;
11505         profile) #(vi
11506                 DFT_LIB_SUFFIX='_p.a'
11507                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
11508                 ;;
11509         shared) #(vi
11510                 case $cf_cv_system_name in
11511                 aix[5-7]*) #(vi
11512                         DFT_LIB_SUFFIX='.a'
11513                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
11514                         ;;
11515                 cygwin*) #(vi
11516                         DFT_LIB_SUFFIX='.dll'
11517                         DFT_DEP_SUFFIX='.dll.a'
11518                         ;;
11519                 darwin*) #(vi
11520                         DFT_LIB_SUFFIX='.dylib'
11521                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
11522                         ;;
11523                 hpux*) #(vi
11524                         case $target in
11525                         ia64*) #(vi
11526                                 DFT_LIB_SUFFIX='.so'
11527                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
11528                                 ;;
11529                         *) #(vi
11530                                 DFT_LIB_SUFFIX='.sl'
11531                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
11532                                 ;;
11533                         esac
11534                         ;;
11535                 *)      DFT_LIB_SUFFIX='.so'
11536                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
11537                         ;;
11538                 esac
11539         esac
11540         test -n "$LIB_SUFFIX" && DFT_LIB_SUFFIX="${LIB_SUFFIX}${DFT_LIB_SUFFIX}"
11541         test -n "$LIB_SUFFIX" && DFT_DEP_SUFFIX="${LIB_SUFFIX}${DFT_DEP_SUFFIX}"
11542 echo "$as_me:11542: result: $DFT_DEP_SUFFIX" >&5
11543 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
11544
11545 echo "$as_me:11545: checking default object directory" >&5
11546 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
11547
11548         case $DFT_LWR_MODEL in
11549         libtool) DFT_OBJ_SUBDIR='obj_lo'  ;;
11550         normal)  DFT_OBJ_SUBDIR='objects' ;;
11551         debug)   DFT_OBJ_SUBDIR='obj_g' ;;
11552         profile) DFT_OBJ_SUBDIR='obj_p' ;;
11553         shared)
11554                 case $cf_cv_system_name in #(vi
11555                 cygwin) #(vi
11556                         DFT_OBJ_SUBDIR='objects' ;;
11557                 *)
11558                         DFT_OBJ_SUBDIR='obj_s' ;;
11559                 esac
11560         esac
11561 echo "$as_me:11561: result: $DFT_OBJ_SUBDIR" >&5
11562 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
11563
11564 ### Set up low-level terminfo dependencies for makefiles.
11565
11566 if test "$DFT_LWR_MODEL" = shared ; then
11567         case $cf_cv_system_name in #(vi
11568         cygwin*)
11569                 # "lib" files have ".dll.a" suffix, "cyg" files have ".dll"
11570                 ;;
11571         esac
11572 fi
11573
11574 ### Construct the list of subdirectories for which we'll customize makefiles
11575 ### with the appropriate compile-rules.
11576
11577 SUB_MAKEFILES="gen/adacurses${DFT_ARG_SUFFIX}-config:gen/adacurses-config.in"
11578
11579 cat >>confdefs.h <<EOF
11580 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
11581 EOF
11582
11583 ### Now that we're done running tests, add the compiler-warnings, if any
11584
11585 cf_fix_cppflags=no
11586 cf_new_cflags=
11587 cf_new_cppflags=
11588 cf_new_extra_cppflags=
11589
11590 for cf_add_cflags in $EXTRA_CFLAGS
11591 do
11592 case $cf_fix_cppflags in
11593 no)
11594         case $cf_add_cflags in #(vi
11595         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
11596                 case $cf_add_cflags in
11597                 -D*)
11598                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11599
11600                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11601                                 && test -z "${cf_tst_cflags}" \
11602                                 && cf_fix_cppflags=yes
11603
11604                         if test $cf_fix_cppflags = yes ; then
11605                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11606                                 continue
11607                         elif test "${cf_tst_cflags}" = "\"'" ; then
11608                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11609                                 continue
11610                         fi
11611                         ;;
11612                 esac
11613                 case "$CPPFLAGS" in
11614                 *$cf_add_cflags) #(vi
11615                         ;;
11616                 *) #(vi
11617                         case $cf_add_cflags in #(vi
11618                         -D*)
11619                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11620
11621 CPPFLAGS=`echo "$CPPFLAGS" | \
11622         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11623                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11624
11625                                 ;;
11626                         esac
11627                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11628                         ;;
11629                 esac
11630                 ;;
11631         *)
11632                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11633                 ;;
11634         esac
11635         ;;
11636 yes)
11637         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11638
11639         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11640
11641         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11642                 && test -z "${cf_tst_cflags}" \
11643                 && cf_fix_cppflags=no
11644         ;;
11645 esac
11646 done
11647
11648 if test -n "$cf_new_cflags" ; then
11649
11650         CFLAGS="$CFLAGS $cf_new_cflags"
11651 fi
11652
11653 if test -n "$cf_new_cppflags" ; then
11654
11655         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
11656 fi
11657
11658 if test -n "$cf_new_extra_cppflags" ; then
11659
11660         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11661 fi
11662
11663 ################################################################################
11664
11665 if test x"$enable_pc_files" = xyes ; then \
11666 SUB_MAKEFILES="$SUB_MAKEFILES misc/gen-pkgconfig:misc/gen-pkgconfig.in"
11667 MAKE_PC_FILES=
11668 else
11669 MAKE_PC_FILES="#"
11670 fi
11671
11672 ################################################################################
11673
11674 TEST_ARG2=
11675
11676 TEST_LIBS2=
11677
11678 NCURSES_SHLIB2="sh -c"
11679
11680 ADA_SUBDIRS="include gen src doc"
11681 if test "x$cf_with_tests" != "xno" ; then
11682         ADA_SUBDIRS="$ADA_SUBDIRS samples"
11683 fi
11684 for cf_dir in $ADA_SUBDIRS
11685 do
11686         SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
11687 done
11688
11689 NCURSES_TREE="#"
11690
11691 EXTERNAL_TREE=
11692
11693 # match layout used by make-tar.sh
11694 ADAHTML_DIR=../doc/ada
11695
11696 ac_config_files="$ac_config_files $SUB_MAKEFILES doc/adacurses${DFT_ARG_SUFFIX}-config.1:doc/MKada_config.in Makefile"
11697 ac_config_commands="$ac_config_commands default"
11698 cat >confcache <<\_ACEOF
11699 # This file is a shell script that caches the results of configure
11700 # tests run on this system so they can be shared between configure
11701 # scripts and configure runs, see configure's option --config-cache.
11702 # It is not useful on other systems.  If it contains results you don't
11703 # want to keep, you may remove or edit it.
11704 #
11705 # config.status only pays attention to the cache file if you give it
11706 # the --recheck option to rerun configure.
11707 #
11708 # `ac_cv_env_foo' variables (set or unset) will be overriden when
11709 # loading this file, other *unset* `ac_cv_foo' will be assigned the
11710 # following values.
11711
11712 _ACEOF
11713
11714 # The following way of writing the cache mishandles newlines in values,
11715 # but we know of no workaround that is simple, portable, and efficient.
11716 # So, don't put newlines in cache variables' values.
11717 # Ultrix sh set writes to stderr and can't be redirected directly,
11718 # and sets the high bit in the cache file unless we assign to the vars.
11719 {
11720   (set) 2>&1 |
11721     case `(ac_space=' '; set | grep ac_space) 2>&1` in
11722     *ac_space=\ *)
11723       # `set' does not quote correctly, so add quotes (double-quote
11724       # substitution turns \\\\ into \\, and sed turns \\ into \).
11725       sed -n \
11726         "s/'/'\\\\''/g;
11727           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
11728       ;;
11729     *)
11730       # `set' quotes correctly as required by POSIX, so do not add quotes.
11731       sed -n \
11732         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
11733       ;;
11734     esac;
11735 } |
11736   sed '
11737      t clear
11738      : clear
11739      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
11740      t end
11741      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
11742      : end' >>confcache
11743 if cmp -s $cache_file confcache; then :; else
11744   if test -w $cache_file; then
11745     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
11746     cat confcache >$cache_file
11747   else
11748     echo "not updating unwritable cache $cache_file"
11749   fi
11750 fi
11751 rm -f confcache
11752
11753 test "x$prefix" = xNONE && prefix=$ac_default_prefix
11754 # Let make expand exec_prefix.
11755 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
11756
11757 # VPATH may cause trouble with some makes, so we remove $(srcdir),
11758 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
11759 # trailing colons and then remove the whole line if VPATH becomes empty
11760 # (actually we leave an empty line to preserve line numbers).
11761 if test "x$srcdir" = x.; then
11762   ac_vpsub='/^[         ]*VPATH[        ]*=/{
11763 s/:*\$(srcdir):*/:/;
11764 s/:*\${srcdir}:*/:/;
11765 s/:*@srcdir@:*/:/;
11766 s/^\([^=]*=[    ]*\):*/\1/;
11767 s/:*$//;
11768 s/^[^=]*=[      ]*$//;
11769 }'
11770 fi
11771
11772 DEFS=-DHAVE_CONFIG_H
11773
11774 : ${CONFIG_STATUS=./config.status}
11775 ac_clean_files_save=$ac_clean_files
11776 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
11777 { echo "$as_me:11777: creating $CONFIG_STATUS" >&5
11778 echo "$as_me: creating $CONFIG_STATUS" >&6;}
11779 cat >$CONFIG_STATUS <<_ACEOF
11780 #! $SHELL
11781 # Generated automatically by configure.
11782 # Run this file to recreate the current configuration.
11783 # Compiler output produced by configure, useful for debugging
11784 # configure, is in config.log if it exists.
11785
11786 debug=false
11787 SHELL=\${CONFIG_SHELL-$SHELL}
11788 ac_cs_invocation="\$0 \$@"
11789
11790 _ACEOF
11791
11792 cat >>$CONFIG_STATUS <<\_ACEOF
11793 # Be Bourne compatible
11794 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
11795   emulate sh
11796   NULLCMD=:
11797 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
11798   set -o posix
11799 fi
11800
11801 # Name of the executable.
11802 as_me=`echo "$0" |sed 's,.*[\\/],,'`
11803
11804 if expr a : '\(a\)' >/dev/null 2>&1; then
11805   as_expr=expr
11806 else
11807   as_expr=false
11808 fi
11809
11810 rm -f conf$$ conf$$.exe conf$$.file
11811 echo >conf$$.file
11812 if ln -s conf$$.file conf$$ 2>/dev/null; then
11813   # We could just check for DJGPP; but this test a) works b) is more generic
11814   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
11815   if test -f conf$$.exe; then
11816     # Don't use ln at all; we don't have any links
11817     as_ln_s='cp -p'
11818   else
11819     as_ln_s='ln -s'
11820   fi
11821 elif ln conf$$.file conf$$ 2>/dev/null; then
11822   as_ln_s=ln
11823 else
11824   as_ln_s='cp -p'
11825 fi
11826 rm -f conf$$ conf$$.exe conf$$.file
11827
11828 as_executable_p="test -f"
11829
11830 # Support unset when possible.
11831 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
11832   as_unset=unset
11833 else
11834   as_unset=false
11835 fi
11836
11837 # NLS nuisances.
11838 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
11839 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
11840 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
11841 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
11842 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
11843 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
11844 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
11845 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
11846
11847 # IFS
11848 # We need space, tab and new line, in precisely that order.
11849 as_nl='
11850 '
11851 IFS="   $as_nl"
11852
11853 # CDPATH.
11854 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
11855
11856 exec 6>&1
11857
11858 _ACEOF
11859
11860 # Files that config.status was made for.
11861 if test -n "$ac_config_files"; then
11862   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
11863 fi
11864
11865 if test -n "$ac_config_headers"; then
11866   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
11867 fi
11868
11869 if test -n "$ac_config_links"; then
11870   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
11871 fi
11872
11873 if test -n "$ac_config_commands"; then
11874   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
11875 fi
11876
11877 cat >>$CONFIG_STATUS <<\EOF
11878
11879 ac_cs_usage="\
11880 \`$as_me' instantiates files from templates according to the
11881 current configuration.
11882
11883 Usage: $0 [OPTIONS] [FILE]...
11884
11885   -h, --help       print this help, then exit
11886   -V, --version    print version number, then exit
11887   -d, --debug      don't remove temporary files
11888       --recheck    update $as_me by reconfiguring in the same conditions
11889   --file=FILE[:TEMPLATE]
11890                    instantiate the configuration file FILE
11891   --header=FILE[:TEMPLATE]
11892                    instantiate the configuration header FILE
11893
11894 Configuration files:
11895 $config_files
11896
11897 Configuration headers:
11898 $config_headers
11899
11900 Configuration commands:
11901 $config_commands
11902
11903 Report bugs to <dickey@invisible-island.net>."
11904 EOF
11905
11906 cat >>$CONFIG_STATUS <<EOF
11907 ac_cs_version="\\
11908 config.status
11909 configured by $0, generated by GNU Autoconf 2.52.20101002,
11910   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
11911
11912 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
11913 Free Software Foundation, Inc.
11914 This config.status script is free software; the Free Software Foundation
11915 gives unlimited permission to copy, distribute and modify it."
11916 srcdir=$srcdir
11917 INSTALL="$INSTALL"
11918 EOF
11919
11920 cat >>$CONFIG_STATUS <<\EOF
11921 # If no file are specified by the user, then we need to provide default
11922 # value.  By we need to know if files were specified by the user.
11923 ac_need_defaults=:
11924 while test $# != 0
11925 do
11926   case $1 in
11927   --*=*)
11928     ac_option=`expr "x$1" : 'x\([^=]*\)='`
11929     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
11930     shift
11931     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
11932     shift
11933     ;;
11934   -*);;
11935   *) # This is not an option, so the user has probably given explicit
11936      # arguments.
11937      ac_need_defaults=false;;
11938   esac
11939
11940   case $1 in
11941   # Handling of the options.
11942 EOF
11943 cat >>$CONFIG_STATUS <<EOF
11944   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
11945     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
11946     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
11947 EOF
11948 cat >>$CONFIG_STATUS <<\EOF
11949   --version | --vers* | -V )
11950     echo "$ac_cs_version"; exit 0 ;;
11951   --he | --h)
11952     # Conflict between --help and --header
11953     { { echo "$as_me:11953: error: ambiguous option: $1
11954 Try \`$0 --help' for more information." >&5
11955 echo "$as_me: error: ambiguous option: $1
11956 Try \`$0 --help' for more information." >&2;}
11957    { (exit 1); exit 1; }; };;
11958   --help | --hel | -h )
11959     echo "$ac_cs_usage"; exit 0 ;;
11960   --debug | --d* | -d )
11961     debug=: ;;
11962   --file | --fil | --fi | --f )
11963     shift
11964     CONFIG_FILES="$CONFIG_FILES $1"
11965     ac_need_defaults=false;;
11966   --header | --heade | --head | --hea )
11967     shift
11968     CONFIG_HEADERS="$CONFIG_HEADERS $1"
11969     ac_need_defaults=false;;
11970
11971   # This is an error.
11972   -*) { { echo "$as_me:11972: error: unrecognized option: $1
11973 Try \`$0 --help' for more information." >&5
11974 echo "$as_me: error: unrecognized option: $1
11975 Try \`$0 --help' for more information." >&2;}
11976    { (exit 1); exit 1; }; } ;;
11977
11978   *) ac_config_targets="$ac_config_targets $1" ;;
11979
11980   esac
11981   shift
11982 done
11983
11984 exec 5>>config.log
11985 cat >&5 << _ACEOF
11986
11987 ## ----------------------- ##
11988 ## Running config.status.  ##
11989 ## ----------------------- ##
11990
11991 This file was extended by $as_me 2.52.20101002, executed with
11992   CONFIG_FILES    = $CONFIG_FILES
11993   CONFIG_HEADERS  = $CONFIG_HEADERS
11994   CONFIG_LINKS    = $CONFIG_LINKS
11995   CONFIG_COMMANDS = $CONFIG_COMMANDS
11996   > $ac_cs_invocation
11997 on `(hostname || uname -n) 2>/dev/null | sed 1q`
11998
11999 _ACEOF
12000 EOF
12001
12002 cat >>$CONFIG_STATUS <<EOF
12003 #
12004 # INIT-COMMANDS section.
12005 #
12006
12007 ### Special initialization commands, used to pass information from the
12008 ### configuration-run into config.status
12009
12010 AWK="$AWK"
12011 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
12012 DFT_LWR_MODEL="$DFT_LWR_MODEL"
12013 ECHO_LINK="$ECHO_LINK"
12014 LIB_NAME="$LIB_NAME"
12015 LIB_SUFFIX="$LIB_SUFFIX"
12016 LN_S="$LN_S"
12017 NCURSES_MAJOR="$NCURSES_MAJOR"
12018 NCURSES_MINOR="$NCURSES_MINOR"
12019 NCURSES_PATCH="$NCURSES_PATCH"
12020 USE_OLD_MAKERULES="$USE_OLD_MAKERULES"
12021 cf_cv_abi_version="$cf_cv_abi_version"
12022 cf_cv_rel_version="$cf_cv_rel_version"
12023 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
12024 cf_cv_shared_soname='$cf_cv_shared_soname'
12025 cf_cv_shlib_version="$cf_cv_shlib_version"
12026 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
12027 cf_cv_system_name="$cf_cv_system_name"
12028 host="$host"
12029 target="$target"
12030
12031 EOF
12032
12033 cat >>$CONFIG_STATUS <<\EOF
12034 for ac_config_target in $ac_config_targets
12035 do
12036   case "$ac_config_target" in
12037   # Handling of arguments.
12038   "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
12039   "doc/adacurses${DFT_ARG_SUFFIX}-config.1" ) CONFIG_FILES="$CONFIG_FILES doc/adacurses${DFT_ARG_SUFFIX}-config.1:doc/MKada_config.in" ;;
12040   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
12041   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
12042   "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
12043   *) { { echo "$as_me:12043: error: invalid argument: $ac_config_target" >&5
12044 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
12045    { (exit 1); exit 1; }; };;
12046   esac
12047 done
12048
12049 # If the user did not use the arguments to specify the items to instantiate,
12050 # then the envvar interface is used.  Set only those that are not.
12051 # We use the long form for the default assignment because of an extremely
12052 # bizarre bug on SunOS 4.1.3.
12053 if $ac_need_defaults; then
12054   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
12055   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
12056   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
12057 fi
12058
12059 # Create a temporary directory, and hook for its removal unless debugging.
12060 $debug ||
12061 {
12062   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
12063   trap '{ (exit 1); exit 1; }' 1 2 13 15
12064 }
12065
12066 # Create a (secure) tmp directory for tmp files.
12067 : ${TMPDIR=/tmp}
12068 {
12069   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
12070   test -n "$tmp" && test -d "$tmp"
12071 }  ||
12072 {
12073   tmp=$TMPDIR/cs$$-$RANDOM
12074   (umask 077 && mkdir $tmp)
12075 } ||
12076 {
12077    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
12078    { (exit 1); exit 1; }
12079 }
12080
12081 EOF
12082
12083 cat >>$CONFIG_STATUS <<EOF
12084
12085 #
12086 # CONFIG_FILES section.
12087 #
12088
12089 # No need to generate the scripts if there are no CONFIG_FILES.
12090 # This happens for instance when ./config.status config.h
12091 if test -n "\$CONFIG_FILES"; then
12092   # Protect against being on the right side of a sed subst in config.status.
12093   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
12094    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
12095 s,@SHELL@,$SHELL,;t t
12096 s,@exec_prefix@,$exec_prefix,;t t
12097 s,@prefix@,$prefix,;t t
12098 s,@program_transform_name@,$program_transform_name,;t t
12099 s,@bindir@,$bindir,;t t
12100 s,@sbindir@,$sbindir,;t t
12101 s,@libexecdir@,$libexecdir,;t t
12102 s,@datadir@,$datadir,;t t
12103 s,@sysconfdir@,$sysconfdir,;t t
12104 s,@sharedstatedir@,$sharedstatedir,;t t
12105 s,@localstatedir@,$localstatedir,;t t
12106 s,@libdir@,$libdir,;t t
12107 s,@includedir@,$includedir,;t t
12108 s,@oldincludedir@,$oldincludedir,;t t
12109 s,@infodir@,$infodir,;t t
12110 s,@mandir@,$mandir,;t t
12111 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
12112 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
12113 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
12114 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
12115 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
12116 s,@build_alias@,$build_alias,;t t
12117 s,@host_alias@,$host_alias,;t t
12118 s,@target_alias@,$target_alias,;t t
12119 s,@ECHO_C@,$ECHO_C,;t t
12120 s,@ECHO_N@,$ECHO_N,;t t
12121 s,@ECHO_T@,$ECHO_T,;t t
12122 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
12123 s,@DEFS@,$DEFS,;t t
12124 s,@LIBS@,$LIBS,;t t
12125 s,@top_builddir@,$top_builddir,;t t
12126 s,@build@,$build,;t t
12127 s,@build_cpu@,$build_cpu,;t t
12128 s,@build_vendor@,$build_vendor,;t t
12129 s,@build_os@,$build_os,;t t
12130 s,@host@,$host,;t t
12131 s,@host_cpu@,$host_cpu,;t t
12132 s,@host_vendor@,$host_vendor,;t t
12133 s,@host_os@,$host_os,;t t
12134 s,@target@,$target,;t t
12135 s,@target_cpu@,$target_cpu,;t t
12136 s,@target_vendor@,$target_vendor,;t t
12137 s,@target_os@,$target_os,;t t
12138 s,@CC@,$CC,;t t
12139 s,@CFLAGS@,$CFLAGS,;t t
12140 s,@LDFLAGS@,$LDFLAGS,;t t
12141 s,@CPPFLAGS@,$CPPFLAGS,;t t
12142 s,@ac_ct_CC@,$ac_ct_CC,;t t
12143 s,@EXEEXT@,$EXEEXT,;t t
12144 s,@OBJEXT@,$OBJEXT,;t t
12145 s,@CPP@,$CPP,;t t
12146 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
12147 s,@PROG_EXT@,$PROG_EXT,;t t
12148 s,@AWK@,$AWK,;t t
12149 s,@EGREP@,$EGREP,;t t
12150 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
12151 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
12152 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
12153 s,@LN_S@,$LN_S,;t t
12154 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
12155 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
12156 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
12157 s,@SET_MAKE@,$SET_MAKE,;t t
12158 s,@CTAGS@,$CTAGS,;t t
12159 s,@ETAGS@,$ETAGS,;t t
12160 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
12161 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
12162 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
12163 s,@RANLIB@,$RANLIB,;t t
12164 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
12165 s,@LD@,$LD,;t t
12166 s,@ac_ct_LD@,$ac_ct_LD,;t t
12167 s,@AR@,$AR,;t t
12168 s,@ac_ct_AR@,$ac_ct_AR,;t t
12169 s,@ARFLAGS@,$ARFLAGS,;t t
12170 s,@DESTDIR@,$DESTDIR,;t t
12171 s,@BUILD_CC@,$BUILD_CC,;t t
12172 s,@BUILD_CPP@,$BUILD_CPP,;t t
12173 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
12174 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
12175 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
12176 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
12177 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
12178 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
12179 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
12180 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
12181 s,@NCURSES_CONFIG@,$NCURSES_CONFIG,;t t
12182 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
12183 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
12184 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
12185 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
12186 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
12187 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
12188 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
12189 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
12190 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
12191 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
12192 s,@CC_G_OPT@,$CC_G_OPT,;t t
12193 s,@LD_MODEL@,$LD_MODEL,;t t
12194 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
12195 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
12196 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
12197 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
12198 s,@LINK_PROGS@,$LINK_PROGS,;t t
12199 s,@LINK_TESTS@,$LINK_TESTS,;t t
12200 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
12201 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
12202 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
12203 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
12204 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
12205 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
12206 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
12207 s,@PTHREAD@,$PTHREAD,;t t
12208 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
12209 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
12210 s,@ECHO_LINK@,$ECHO_LINK,;t t
12211 s,@ADAFLAGS@,$ADAFLAGS,;t t
12212 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
12213 s,@ADA_TRACE@,$ADA_TRACE,;t t
12214 s,@gnat_exists@,$gnat_exists,;t t
12215 s,@M4_exists@,$M4_exists,;t t
12216 s,@cf_ada_make@,$cf_ada_make,;t t
12217 s,@cf_compile_generics@,$cf_compile_generics,;t t
12218 s,@cf_generic_objects@,$cf_generic_objects,;t t
12219 s,@USE_GNAT_SIGINT@,$USE_GNAT_SIGINT,;t t
12220 s,@PRAGMA_UNREF@,$PRAGMA_UNREF,;t t
12221 s,@USE_OLD_MAKERULES@,$USE_OLD_MAKERULES,;t t
12222 s,@USE_GNAT_PROJECTS@,$USE_GNAT_PROJECTS,;t t
12223 s,@USE_GNAT_LIBRARIES@,$USE_GNAT_LIBRARIES,;t t
12224 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
12225 s,@cf_ada_package@,$cf_ada_package,;t t
12226 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
12227 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
12228 s,@ADA_SHAREDLIB@,$ADA_SHAREDLIB,;t t
12229 s,@MAKE_ADA_SHAREDLIB@,$MAKE_ADA_SHAREDLIB,;t t
12230 s,@TINFO_ARGS2@,$TINFO_ARGS2,;t t
12231 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
12232 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
12233 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
12234 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
12235 s,@MAKE_PC_FILES@,$MAKE_PC_FILES,;t t
12236 s,@cross_compiling@,$cross_compiling,;t t
12237 s,@TEST_ARG2@,$TEST_ARG2,;t t
12238 s,@TEST_LIBS2@,$TEST_LIBS2,;t t
12239 s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
12240 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
12241 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
12242 s,@EXTERNAL_TREE@,$EXTERNAL_TREE,;t t
12243 s,@ADAHTML_DIR@,$ADAHTML_DIR,;t t
12244 CEOF
12245
12246 EOF
12247
12248   cat >>$CONFIG_STATUS <<\EOF
12249   # Split the substitutions into bite-sized pieces for seds with
12250   # small command number limits, like on Digital OSF/1 and HP-UX.
12251   ac_max_sed_lines=48
12252   ac_sed_frag=1 # Number of current file.
12253   ac_beg=1 # First line for current file.
12254   ac_end=$ac_max_sed_lines # Line after last line for current file.
12255   ac_more_lines=:
12256   ac_sed_cmds=
12257   while $ac_more_lines; do
12258     if test $ac_beg -gt 1; then
12259       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
12260     else
12261       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
12262     fi
12263     if test ! -s $tmp/subs.frag; then
12264       ac_more_lines=false
12265     else
12266       # The purpose of the label and of the branching condition is to
12267       # speed up the sed processing (if there are no `@' at all, there
12268       # is no need to browse any of the substitutions).
12269       # These are the two extra sed commands mentioned above.
12270       (echo ':t
12271   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
12272       if test -z "$ac_sed_cmds"; then
12273         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
12274       else
12275         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
12276       fi
12277       ac_sed_frag=`expr $ac_sed_frag + 1`
12278       ac_beg=$ac_end
12279       ac_end=`expr $ac_end + $ac_max_sed_lines`
12280     fi
12281   done
12282   if test -z "$ac_sed_cmds"; then
12283     ac_sed_cmds=cat
12284   fi
12285 fi # test -n "$CONFIG_FILES"
12286
12287 EOF
12288 cat >>$CONFIG_STATUS <<\EOF
12289 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
12290   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
12291   case $ac_file in
12292   - | *:- | *:-:* ) # input from stdin
12293         cat >$tmp/stdin
12294         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
12295         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
12296   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
12297         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
12298   * )   ac_file_in=$ac_file.in ;;
12299   esac
12300
12301   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
12302   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
12303          X"$ac_file" : 'X\(//\)[^/]' \| \
12304          X"$ac_file" : 'X\(//\)$' \| \
12305          X"$ac_file" : 'X\(/\)' \| \
12306          .     : '\(.\)' 2>/dev/null ||
12307 echo X"$ac_file" |
12308     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
12309           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
12310           /^X\(\/\/\)$/{ s//\1/; q; }
12311           /^X\(\/\).*/{ s//\1/; q; }
12312           s/.*/./; q'`
12313   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
12314     { case "$ac_dir" in
12315   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
12316   *)                      as_incr_dir=.;;
12317 esac
12318 as_dummy="$ac_dir"
12319 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
12320   case $as_mkdir_dir in
12321     # Skip DOS drivespec
12322     ?:) as_incr_dir=$as_mkdir_dir ;;
12323     *)
12324       as_incr_dir=$as_incr_dir/$as_mkdir_dir
12325       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
12326     ;;
12327   esac
12328 done; }
12329
12330     ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
12331     # A "../" for each directory in $ac_dir_suffix.
12332     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
12333   else
12334     ac_dir_suffix= ac_dots=
12335   fi
12336
12337   case $srcdir in
12338   .)  ac_srcdir=.
12339       if test -z "$ac_dots"; then
12340          ac_top_srcdir=.
12341       else
12342          ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
12343       fi ;;
12344   [\\/]* | ?:[\\/]* )
12345       ac_srcdir=$srcdir$ac_dir_suffix;
12346       ac_top_srcdir=$srcdir ;;
12347   *) # Relative path.
12348     ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
12349     ac_top_srcdir=$ac_dots$srcdir ;;
12350   esac
12351
12352   case $INSTALL in
12353   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
12354   *) ac_INSTALL=$ac_dots$INSTALL ;;
12355   esac
12356
12357   if test x"$ac_file" != x-; then
12358     { echo "$as_me:12358: creating $ac_file" >&5
12359 echo "$as_me: creating $ac_file" >&6;}
12360     rm -f "$ac_file"
12361   fi
12362   # Let's still pretend it is `configure' which instantiates (i.e., don't
12363   # use $as_me), people would be surprised to read:
12364   #    /* config.h.  Generated automatically by config.status.  */
12365   configure_input="Generated automatically from `echo $ac_file_in |
12366                                                  sed 's,.*/,,'` by configure."
12367
12368   # First look for the input files in the build tree, otherwise in the
12369   # src tree.
12370   ac_file_inputs=`IFS=:
12371     for f in $ac_file_in; do
12372       case $f in
12373       -) echo $tmp/stdin ;;
12374       [\\/$]*)
12375          # Absolute (can't be DOS-style, as IFS=:)
12376          test -f "$f" || { { echo "$as_me:12376: error: cannot find input file: $f" >&5
12377 echo "$as_me: error: cannot find input file: $f" >&2;}
12378    { (exit 1); exit 1; }; }
12379          echo $f;;
12380       *) # Relative
12381          if test -f "$f"; then
12382            # Build tree
12383            echo $f
12384          elif test -f "$srcdir/$f"; then
12385            # Source tree
12386            echo $srcdir/$f
12387          else
12388            # /dev/null tree
12389            { { echo "$as_me:12389: error: cannot find input file: $f" >&5
12390 echo "$as_me: error: cannot find input file: $f" >&2;}
12391    { (exit 1); exit 1; }; }
12392          fi;;
12393       esac
12394     done` || { (exit 1); exit 1; }
12395 EOF
12396 cat >>$CONFIG_STATUS <<EOF
12397   sed "$ac_vpsub
12398 $extrasub
12399 EOF
12400 cat >>$CONFIG_STATUS <<\EOF
12401 :t
12402 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
12403 s,@configure_input@,$configure_input,;t t
12404 s,@srcdir@,$ac_srcdir,;t t
12405 s,@top_srcdir@,$ac_top_srcdir,;t t
12406 s,@INSTALL@,$ac_INSTALL,;t t
12407 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
12408   rm -f $tmp/stdin
12409   if test x"$ac_file" != x-; then
12410     mv $tmp/out $ac_file
12411   else
12412     cat $tmp/out
12413     rm -f $tmp/out
12414   fi
12415
12416 done
12417 EOF
12418 cat >>$CONFIG_STATUS <<\EOF
12419
12420 #
12421 # CONFIG_HEADER section.
12422 #
12423
12424 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
12425 # NAME is the cpp macro being defined and VALUE is the value it is being given.
12426 #
12427 # ac_d sets the value in "#define NAME VALUE" lines.
12428 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
12429 ac_dB='[        ].*$,\1#\2'
12430 ac_dC=' '
12431 ac_dD=',;t'
12432 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
12433 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
12434 ac_iB='\([      ]\),\1#\2define\3'
12435 ac_iC=' '
12436 ac_iD='\4,;t'
12437 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
12438 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
12439 ac_uB='$,\1#\2define\3'
12440 ac_uC=' '
12441 ac_uD=',;t'
12442
12443 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
12444   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
12445   case $ac_file in
12446   - | *:- | *:-:* ) # input from stdin
12447         cat >$tmp/stdin
12448         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
12449         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
12450   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
12451         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
12452   * )   ac_file_in=$ac_file.in ;;
12453   esac
12454
12455   test x"$ac_file" != x- && { echo "$as_me:12455: creating $ac_file" >&5
12456 echo "$as_me: creating $ac_file" >&6;}
12457
12458   # First look for the input files in the build tree, otherwise in the
12459   # src tree.
12460   ac_file_inputs=`IFS=:
12461     for f in $ac_file_in; do
12462       case $f in
12463       -) echo $tmp/stdin ;;
12464       [\\/$]*)
12465          # Absolute (can't be DOS-style, as IFS=:)
12466          test -f "$f" || { { echo "$as_me:12466: error: cannot find input file: $f" >&5
12467 echo "$as_me: error: cannot find input file: $f" >&2;}
12468    { (exit 1); exit 1; }; }
12469          echo $f;;
12470       *) # Relative
12471          if test -f "$f"; then
12472            # Build tree
12473            echo $f
12474          elif test -f "$srcdir/$f"; then
12475            # Source tree
12476            echo $srcdir/$f
12477          else
12478            # /dev/null tree
12479            { { echo "$as_me:12479: error: cannot find input file: $f" >&5
12480 echo "$as_me: error: cannot find input file: $f" >&2;}
12481    { (exit 1); exit 1; }; }
12482          fi;;
12483       esac
12484     done` || { (exit 1); exit 1; }
12485   # Remove the trailing spaces.
12486   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
12487
12488 EOF
12489
12490 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
12491 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
12492 # be either 'cat' or 'sort'.
12493 cat confdefs.h | uniq >conftest.vals
12494
12495 # Break up conftest.vals because some shells have a limit on
12496 # the size of here documents, and old seds have small limits too.
12497
12498 rm -f conftest.tail
12499 echo '  rm -f conftest.frag' >> $CONFIG_STATUS
12500 while grep . conftest.vals >/dev/null
12501 do
12502   # Write chunks of a limited-size here document to conftest.frag.
12503   echo '  cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
12504   sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
12505   echo 'CEOF' >> $CONFIG_STATUS
12506   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
12507   rm -f conftest.vals
12508   mv conftest.tail conftest.vals
12509 done
12510 rm -f conftest.vals
12511
12512 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
12513 # marker @DEFS@.
12514 echo '  cat >> conftest.edit <<CEOF
12515 /@DEFS@/r conftest.frag
12516 /@DEFS@/d
12517 CEOF
12518 sed -f conftest.edit $tmp/in > $tmp/out
12519 rm -f $tmp/in
12520 mv $tmp/out $tmp/in
12521 rm -f conftest.edit conftest.frag
12522 ' >> $CONFIG_STATUS
12523
12524 cat >>$CONFIG_STATUS <<\EOF
12525   # Let's still pretend it is `configure' which instantiates (i.e., don't
12526   # use $as_me), people would be surprised to read:
12527   #    /* config.h.  Generated automatically by config.status.  */
12528   if test x"$ac_file" = x-; then
12529     echo "/* Generated automatically by configure.  */" >$tmp/config.h
12530   else
12531     echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
12532   fi
12533   cat $tmp/in >>$tmp/config.h
12534   rm -f $tmp/in
12535   if test x"$ac_file" != x-; then
12536     if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
12537       { echo "$as_me:12537: $ac_file is unchanged" >&5
12538 echo "$as_me: $ac_file is unchanged" >&6;}
12539     else
12540       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
12541          X"$ac_file" : 'X\(//\)[^/]' \| \
12542          X"$ac_file" : 'X\(//\)$' \| \
12543          X"$ac_file" : 'X\(/\)' \| \
12544          .     : '\(.\)' 2>/dev/null ||
12545 echo X"$ac_file" |
12546     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
12547           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
12548           /^X\(\/\/\)$/{ s//\1/; q; }
12549           /^X\(\/\).*/{ s//\1/; q; }
12550           s/.*/./; q'`
12551       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
12552         { case "$ac_dir" in
12553   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
12554   *)                      as_incr_dir=.;;
12555 esac
12556 as_dummy="$ac_dir"
12557 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
12558   case $as_mkdir_dir in
12559     # Skip DOS drivespec
12560     ?:) as_incr_dir=$as_mkdir_dir ;;
12561     *)
12562       as_incr_dir=$as_incr_dir/$as_mkdir_dir
12563       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
12564     ;;
12565   esac
12566 done; }
12567
12568       fi
12569       rm -f $ac_file
12570       mv $tmp/config.h $ac_file
12571     fi
12572   else
12573     cat $tmp/config.h
12574     rm -f $tmp/config.h
12575   fi
12576 done
12577 EOF
12578 cat >>$CONFIG_STATUS <<\EOF
12579 #
12580 # CONFIG_COMMANDS section.
12581 #
12582 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
12583   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
12584   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
12585
12586   case $ac_dest in
12587     default )
12588 if test -z "$USE_OLD_MAKERULES" ; then
12589         $AWK -f $srcdir/mk-1st.awk <$srcdir/src/modules >>src/Makefile
12590 fi
12591  ;;
12592   esac
12593 done
12594 EOF
12595
12596 cat >>$CONFIG_STATUS <<\EOF
12597
12598 { (exit 0); exit 0; }
12599 EOF
12600 chmod +x $CONFIG_STATUS
12601 ac_clean_files=$ac_clean_files_save
12602
12603 # configure is writing to config.log, and then calls config.status.
12604 # config.status does its own redirection, appending to config.log.
12605 # Unfortunately, on DOS this fails, as config.log is still kept open
12606 # by configure, so config.status won't be able to write to it; its
12607 # output is simply discarded.  So we exec the FD to /dev/null,
12608 # effectively closing config.log, so it can be properly (re)opened and
12609 # appended to by config.status.  When coming back to configure, we
12610 # need to make the FD available again.
12611 if test "$no_create" != yes; then
12612   ac_cs_success=:
12613   exec 5>/dev/null
12614   $SHELL $CONFIG_STATUS || ac_cs_success=false
12615   exec 5>>config.log
12616   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
12617   # would make configure fail if this is the last instruction.
12618   $ac_cs_success || { (exit 1); exit 1; }
12619 fi
12620 ${MAKE:-make} preinstall