]> ncurses.scripts.mit.edu Git - ncurses.git/blob - Ada95/configure
ncurses 5.8 - patch 20110329
[ncurses.git] / Ada95 / configure
1 #! /bin/sh
2 # From configure.in Revision: 1.27 .
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   --enable-widec          compile with wide-char/UTF-8 code
661   --with-curses-dir=DIR   directory in which (n)curses is installed
662   --with-shlib-version=X  Specify rel or abi version for shared libs
663 Fine-Tuning Your Configuration:
664   --enable-broken_linker  compile with broken-linker support code
665   --disable-largefile     omit support for large files
666   --with-rcs-ids          compile-in RCS identifiers
667 Extensions:
668   --disable-ext-funcs     disable function-extensions
669   --enable-const          compile with extra/non-standard const
670 Development Code:
671   --without-develop       disable development options
672 Experimental Code:
673   --with-pthread          use POSIX thread library
674   --enable-weak-symbols   enable weak-symbols for pthreads
675   --enable-reentrant      compile with experimental reentrant code
676   --with-wrap-prefix=XXX  override prefix used for public variables
677 Testing/development Options:
678   --enable-echo           build: display "compiling" commands (default)
679   --enable-warnings       build: turn on GCC compiler warnings
680   --enable-assertions     test: turn on generation of assertion code
681   --enable-expanded       test: generate functions for certain macros
682   --disable-macros        test: use functions rather than macros
683   --with-trace            test: add trace() function to all models of ncurses
684 Ada95 Binding Options:
685   --with-ada-compiler=CMD specify Ada95 compiler command (default gnatmake)
686   --with-ada-include=DIR  Ada includes are in DIR (default: PREFIX/share/ada/adainclude)
687   --with-ada-objects=DIR  Ada objects are in DIR (default: PREFIX/lib/ada/adalib)
688   --with-ada-sharedlib=XX build Ada95 shared-library
689
690 Some influential environment variables:
691   CC          C compiler command
692   CFLAGS      C compiler flags
693   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
694               nonstandard directory <lib dir>
695   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
696               headers in a nonstandard directory <include dir>
697   CPP         C preprocessor
698
699 Use these variables to override the choices made by `configure' or to help
700 it to find libraries and programs with nonstandard names/locations.
701
702 EOF
703 fi
704
705 if test "$ac_init_help" = "recursive"; then
706   # If there are subdirs, report their specific --help.
707   ac_popdir=`pwd`
708   for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
709     cd $ac_subdir
710     # A "../" for each directory in /$ac_subdir.
711     ac_dots=`echo $ac_subdir |
712              sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
713
714     case $srcdir in
715     .) # No --srcdir option.  We are building in place.
716       ac_sub_srcdir=$srcdir ;;
717     [\\/]* | ?:[\\/]* ) # Absolute path.
718       ac_sub_srcdir=$srcdir/$ac_subdir ;;
719     *) # Relative path.
720       ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;;
721     esac
722
723     # Check for guested configure; otherwise get Cygnus style configure.
724     if test -f $ac_sub_srcdir/configure.gnu; then
725       echo
726       $SHELL $ac_sub_srcdir/configure.gnu  --help=recursive
727     elif test -f $ac_sub_srcdir/configure; then
728       echo
729       $SHELL $ac_sub_srcdir/configure  --help=recursive
730     elif test -f $ac_sub_srcdir/configure.ac ||
731            test -f $ac_sub_srcdir/configure.in; then
732       echo
733       $ac_configure --help
734     else
735       echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
736     fi
737     cd $ac_popdir
738   done
739 fi
740
741 test -n "$ac_init_help" && exit 0
742 if $ac_init_version; then
743   cat <<\EOF
744
745 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
746 Free Software Foundation, Inc.
747 This configure script is free software; the Free Software Foundation
748 gives unlimited permission to copy, distribute and modify it.
749 EOF
750   exit 0
751 fi
752 exec 5>config.log
753 cat >&5 <<EOF
754 This file contains any messages produced by compilers while
755 running configure, to aid debugging if configure makes a mistake.
756
757 It was created by $as_me, which was
758 generated by GNU Autoconf 2.52.20101002.  Invocation command line was
759
760   $ $0 $@
761
762 EOF
763 {
764 cat <<_ASUNAME
765 ## ---------- ##
766 ## Platform.  ##
767 ## ---------- ##
768
769 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
770 uname -m = `(uname -m) 2>/dev/null || echo unknown`
771 uname -r = `(uname -r) 2>/dev/null || echo unknown`
772 uname -s = `(uname -s) 2>/dev/null || echo unknown`
773 uname -v = `(uname -v) 2>/dev/null || echo unknown`
774
775 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
776 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
777
778 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
779 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
780 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
781 hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
782 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
783 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
784 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
785
786 PATH = $PATH
787
788 _ASUNAME
789 } >&5
790
791 cat >&5 <<EOF
792 ## ------------ ##
793 ## Core tests.  ##
794 ## ------------ ##
795
796 EOF
797
798 # Keep a trace of the command line.
799 # Strip out --no-create and --no-recursion so they do not pile up.
800 # Also quote any args containing shell meta-characters.
801 ac_configure_args=
802 ac_sep=
803 for ac_arg
804 do
805   case $ac_arg in
806   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
807   | --no-cr | --no-c) ;;
808   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
809   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
810   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
811     ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
812     ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
813     ac_sep=" " ;;
814   *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
815      ac_sep=" " ;;
816   esac
817   # Get rid of the leading space.
818 done
819
820 # When interrupted or exit'd, cleanup temporary files, and complete
821 # config.log.  We remove comments because anyway the quotes in there
822 # would cause problems or look ugly.
823 trap 'exit_status=$?
824   # Save into config.log some information that might help in debugging.
825   echo >&5
826   echo "## ----------------- ##" >&5
827   echo "## Cache variables.  ##" >&5
828   echo "## ----------------- ##" >&5
829   echo >&5
830   # The following way of writing the cache mishandles newlines in values,
831 {
832   (set) 2>&1 |
833     case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
834     *ac_space=\ *)
835       sed -n \
836         "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
837           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
838       ;;
839     *)
840       sed -n \
841         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
842       ;;
843     esac;
844 } >&5
845   sed "/^$/d" confdefs.h >conftest.log
846   if test -s conftest.log; then
847     echo >&5
848     echo "## ------------ ##" >&5
849     echo "## confdefs.h.  ##" >&5
850     echo "## ------------ ##" >&5
851     echo >&5
852     cat conftest.log >&5
853   fi
854   (echo; echo) >&5
855   test "$ac_signal" != 0 &&
856     echo "$as_me: caught signal $ac_signal" >&5
857   echo "$as_me: exit $exit_status" >&5
858   rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
859     exit $exit_status
860      ' 0
861 for ac_signal in 1 2 13 15; do
862   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
863 done
864 ac_signal=0
865
866 # confdefs.h avoids OS command line length limits that DEFS can exceed.
867 rm -rf conftest* confdefs.h
868 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
869 echo >confdefs.h
870
871 # Let the site file select an alternate cache file if it wants to.
872 # Prefer explicitly selected file to automatically selected ones.
873 if test -z "$CONFIG_SITE"; then
874   if test "x$prefix" != xNONE; then
875     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
876   else
877     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
878   fi
879 fi
880 for ac_site_file in $CONFIG_SITE; do
881   if test -r "$ac_site_file"; then
882     { echo "$as_me:882: loading site script $ac_site_file" >&5
883 echo "$as_me: loading site script $ac_site_file" >&6;}
884     cat "$ac_site_file" >&5
885     . "$ac_site_file"
886   fi
887 done
888
889 if test -r "$cache_file"; then
890   # Some versions of bash will fail to source /dev/null (special
891   # files actually), so we avoid doing that.
892   if test -f "$cache_file"; then
893     { echo "$as_me:893: loading cache $cache_file" >&5
894 echo "$as_me: loading cache $cache_file" >&6;}
895     case $cache_file in
896       [\\/]* | ?:[\\/]* ) . $cache_file;;
897       *)                      . ./$cache_file;;
898     esac
899   fi
900 else
901   { echo "$as_me:901: creating cache $cache_file" >&5
902 echo "$as_me: creating cache $cache_file" >&6;}
903   >$cache_file
904 fi
905
906 # Check that the precious variables saved in the cache have kept the same
907 # value.
908 ac_cache_corrupted=false
909 for ac_var in `(set) 2>&1 |
910                sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
911   eval ac_old_set=\$ac_cv_env_${ac_var}_set
912   eval ac_new_set=\$ac_env_${ac_var}_set
913   eval ac_old_val="\$ac_cv_env_${ac_var}_value"
914   eval ac_new_val="\$ac_env_${ac_var}_value"
915   case $ac_old_set,$ac_new_set in
916     set,)
917       { echo "$as_me:917: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
918 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
919       ac_cache_corrupted=: ;;
920     ,set)
921       { echo "$as_me:921: error: \`$ac_var' was not set in the previous run" >&5
922 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
923       ac_cache_corrupted=: ;;
924     ,);;
925     *)
926       if test "x$ac_old_val" != "x$ac_new_val"; then
927         { echo "$as_me:927: error: \`$ac_var' has changed since the previous run:" >&5
928 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
929         { echo "$as_me:929:   former value:  $ac_old_val" >&5
930 echo "$as_me:   former value:  $ac_old_val" >&2;}
931         { echo "$as_me:931:   current value: $ac_new_val" >&5
932 echo "$as_me:   current value: $ac_new_val" >&2;}
933         ac_cache_corrupted=:
934       fi;;
935   esac
936   # Pass precious variables to config.status.  It doesn't matter if
937   # we pass some twice (in addition to the command line arguments).
938   if test "$ac_new_set" = set; then
939     case $ac_new_val in
940     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
941       ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
942       ac_configure_args="$ac_configure_args '$ac_arg'"
943       ;;
944     *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
945        ;;
946     esac
947   fi
948 done
949 if $ac_cache_corrupted; then
950   { echo "$as_me:950: error: changes in the environment can compromise the build" >&5
951 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
952   { { echo "$as_me:952: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
953 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
954    { (exit 1); exit 1; }; }
955 fi
956
957 ac_ext=c
958 ac_cpp='$CPP $CPPFLAGS'
959 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
960 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
961 ac_compiler_gnu=$ac_cv_c_compiler_gnu
962 ac_main_return=return
963
964 case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
965   *c*,-n*) ECHO_N= ECHO_C='
966 ' ECHO_T='      ' ;;
967   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
968   *)      ECHO_N= ECHO_C='\c' ECHO_T= ;;
969 esac
970 echo "#! $SHELL" >conftest.sh
971 echo  "exit 0"   >>conftest.sh
972 chmod +x conftest.sh
973 if { (echo "$as_me:973: PATH=\".;.\"; conftest.sh") >&5
974   (PATH=".;."; conftest.sh) 2>&5
975   ac_status=$?
976   echo "$as_me:976: \$? = $ac_status" >&5
977   (exit $ac_status); }; then
978   ac_path_separator=';'
979 else
980   ac_path_separator=:
981 fi
982 PATH_SEPARATOR="$ac_path_separator"
983 rm -f conftest.sh
984
985 ac_config_headers="$ac_config_headers include/ncurses_cfg.h:include/ncurses_cfg.hin"
986
987 top_builddir=`pwd`
988
989 ac_aux_dir=
990 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
991   if test -f $ac_dir/install-sh; then
992     ac_aux_dir=$ac_dir
993     ac_install_sh="$ac_aux_dir/install-sh -c"
994     break
995   elif test -f $ac_dir/install.sh; then
996     ac_aux_dir=$ac_dir
997     ac_install_sh="$ac_aux_dir/install.sh -c"
998     break
999   elif test -f $ac_dir/shtool; then
1000     ac_aux_dir=$ac_dir
1001     ac_install_sh="$ac_aux_dir/shtool install -c"
1002     break
1003   fi
1004 done
1005 if test -z "$ac_aux_dir"; then
1006   { { echo "$as_me:1006: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1007 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1008    { (exit 1); exit 1; }; }
1009 fi
1010 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1011 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1012 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1013
1014 # Make sure we can run config.sub.
1015 $ac_config_sub sun4 >/dev/null 2>&1 ||
1016   { { echo "$as_me:1016: error: cannot run $ac_config_sub" >&5
1017 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1018    { (exit 1); exit 1; }; }
1019
1020 echo "$as_me:1020: checking build system type" >&5
1021 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1022 if test "${ac_cv_build+set}" = set; then
1023   echo $ECHO_N "(cached) $ECHO_C" >&6
1024 else
1025   ac_cv_build_alias=$build_alias
1026 test -z "$ac_cv_build_alias" &&
1027   ac_cv_build_alias=`$ac_config_guess`
1028 test -z "$ac_cv_build_alias" &&
1029   { { echo "$as_me:1029: error: cannot guess build type; you must specify one" >&5
1030 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1031    { (exit 1); exit 1; }; }
1032 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1033   { { echo "$as_me:1033: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1034 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1035    { (exit 1); exit 1; }; }
1036
1037 fi
1038 echo "$as_me:1038: result: $ac_cv_build" >&5
1039 echo "${ECHO_T}$ac_cv_build" >&6
1040 build=$ac_cv_build
1041 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1042 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1043 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1044
1045 echo "$as_me:1045: checking host system type" >&5
1046 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1047 if test "${ac_cv_host+set}" = set; then
1048   echo $ECHO_N "(cached) $ECHO_C" >&6
1049 else
1050   ac_cv_host_alias=$host_alias
1051 test -z "$ac_cv_host_alias" &&
1052   ac_cv_host_alias=$ac_cv_build_alias
1053 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1054   { { echo "$as_me:1054: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1055 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1056    { (exit 1); exit 1; }; }
1057
1058 fi
1059 echo "$as_me:1059: result: $ac_cv_host" >&5
1060 echo "${ECHO_T}$ac_cv_host" >&6
1061 host=$ac_cv_host
1062 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1063 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1064 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1065
1066 if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then
1067         echo "$as_me:1067: checking target system type" >&5
1068 echo $ECHO_N "checking target system type... $ECHO_C" >&6
1069 if test "${ac_cv_target+set}" = set; then
1070   echo $ECHO_N "(cached) $ECHO_C" >&6
1071 else
1072   ac_cv_target_alias=$target_alias
1073 test "x$ac_cv_target_alias" = "x" &&
1074   ac_cv_target_alias=$ac_cv_host_alias
1075 ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
1076   { { echo "$as_me:1076: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1077 echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1078    { (exit 1); exit 1; }; }
1079
1080 fi
1081 echo "$as_me:1081: result: $ac_cv_target" >&5
1082 echo "${ECHO_T}$ac_cv_target" >&6
1083 target=$ac_cv_target
1084 target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1085 target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1086 target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1087
1088 # The aliases save the names the user supplied, while $host etc.
1089 # will get canonicalized.
1090 test -n "$target_alias" &&
1091   test "$program_prefix$program_suffix$program_transform_name" = \
1092     NONENONEs,x,x, &&
1093   program_prefix=${target_alias}-
1094         system_name="$host_os"
1095 else
1096         system_name="`(uname -s -r) 2>/dev/null`"
1097         if test -z "$system_name" ; then
1098                 system_name="`(hostname) 2>/dev/null`"
1099         fi
1100 fi
1101 test -n "$system_name" && cat >>confdefs.h <<EOF
1102 #define SYSTEM_NAME "$system_name"
1103 EOF
1104
1105 if test "${cf_cv_system_name+set}" = set; then
1106   echo $ECHO_N "(cached) $ECHO_C" >&6
1107 else
1108   cf_cv_system_name="$system_name"
1109 fi
1110
1111 test -z "$system_name" && system_name="$cf_cv_system_name"
1112 test -n "$cf_cv_system_name" && echo "$as_me:1112: result: Configuring for $cf_cv_system_name" >&5
1113 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1114
1115 if test ".$system_name" != ".$cf_cv_system_name" ; then
1116         echo "$as_me:1116: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1117 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1118         { { echo "$as_me:1118: error: \"Please remove config.cache and try again.\"" >&5
1119 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1120    { (exit 1); exit 1; }; }
1121 fi
1122
1123 # Check whether --with-system-type or --without-system-type was given.
1124 if test "${with_system_type+set}" = set; then
1125   withval="$with_system_type"
1126   { echo "$as_me:1126: WARNING: overriding system type to $withval" >&5
1127 echo "$as_me: WARNING: overriding system type to $withval" >&2;}
1128  cf_cv_system_name=$withval
1129 fi;
1130
1131 ###     Save the given $CFLAGS to allow user-override.
1132 cf_user_CFLAGS="$CFLAGS"
1133
1134 ###     Default install-location
1135
1136 echo "$as_me:1136: checking for prefix" >&5
1137 echo $ECHO_N "checking for prefix... $ECHO_C" >&6
1138 if test "x$prefix" = "xNONE" ; then
1139         case "$cf_cv_system_name" in
1140                 # non-vendor systems don't have a conflict
1141         openbsd*|freebsd*|linux*|cygwin*|k*bsd*-gnu)
1142                 prefix=/usr
1143                 ;;
1144         *)      prefix=$ac_default_prefix
1145                 ;;
1146         esac
1147 fi
1148 echo "$as_me:1148: result: $prefix" >&5
1149 echo "${ECHO_T}$prefix" >&6
1150
1151 if test "x$prefix" = "xNONE" ; then
1152 echo "$as_me:1152: checking for default include-directory" >&5
1153 echo $ECHO_N "checking for default include-directory... $ECHO_C" >&6
1154 test -n "$verbose" && echo 1>&6
1155 for cf_symbol in \
1156         $includedir \
1157         $includedir/ncurses \
1158         $prefix/include \
1159         $prefix/include/ncurses \
1160         /usr/local/include \
1161         /usr/local/include/ncurses \
1162         /usr/include \
1163         /usr/include/ncurses
1164 do
1165         cf_dir=`eval echo $cf_symbol`
1166         if test -f $cf_dir/curses.h ; then
1167         if ( fgrep NCURSES_VERSION $cf_dir/curses.h 2>&1 >/dev/null ) ; then
1168                 includedir="$cf_symbol"
1169                 test -n "$verbose"  && echo $ac_n "     found " 1>&6
1170                 break
1171         fi
1172         fi
1173         test -n "$verbose"  && echo "   tested $cf_dir" 1>&6
1174 done
1175 echo "$as_me:1175: result: $includedir" >&5
1176 echo "${ECHO_T}$includedir" >&6
1177 fi
1178
1179 ###     Checks for programs.
1180 ac_ext=c
1181 ac_cpp='$CPP $CPPFLAGS'
1182 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1183 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1184 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1185 ac_main_return=return
1186 if test -n "$ac_tool_prefix"; then
1187   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1188 set dummy ${ac_tool_prefix}gcc; ac_word=$2
1189 echo "$as_me:1189: checking for $ac_word" >&5
1190 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1191 if test "${ac_cv_prog_CC+set}" = set; then
1192   echo $ECHO_N "(cached) $ECHO_C" >&6
1193 else
1194   if test -n "$CC"; then
1195   ac_cv_prog_CC="$CC" # Let the user override the test.
1196 else
1197   ac_save_IFS=$IFS; IFS=$ac_path_separator
1198 ac_dummy="$PATH"
1199 for ac_dir in $ac_dummy; do
1200   IFS=$ac_save_IFS
1201   test -z "$ac_dir" && ac_dir=.
1202   $as_executable_p "$ac_dir/$ac_word" || continue
1203 ac_cv_prog_CC="${ac_tool_prefix}gcc"
1204 echo "$as_me:1204: found $ac_dir/$ac_word" >&5
1205 break
1206 done
1207
1208 fi
1209 fi
1210 CC=$ac_cv_prog_CC
1211 if test -n "$CC"; then
1212   echo "$as_me:1212: result: $CC" >&5
1213 echo "${ECHO_T}$CC" >&6
1214 else
1215   echo "$as_me:1215: result: no" >&5
1216 echo "${ECHO_T}no" >&6
1217 fi
1218
1219 fi
1220 if test -z "$ac_cv_prog_CC"; then
1221   ac_ct_CC=$CC
1222   # Extract the first word of "gcc", so it can be a program name with args.
1223 set dummy gcc; ac_word=$2
1224 echo "$as_me:1224: checking for $ac_word" >&5
1225 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1226 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1227   echo $ECHO_N "(cached) $ECHO_C" >&6
1228 else
1229   if test -n "$ac_ct_CC"; then
1230   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1231 else
1232   ac_save_IFS=$IFS; IFS=$ac_path_separator
1233 ac_dummy="$PATH"
1234 for ac_dir in $ac_dummy; do
1235   IFS=$ac_save_IFS
1236   test -z "$ac_dir" && ac_dir=.
1237   $as_executable_p "$ac_dir/$ac_word" || continue
1238 ac_cv_prog_ac_ct_CC="gcc"
1239 echo "$as_me:1239: found $ac_dir/$ac_word" >&5
1240 break
1241 done
1242
1243 fi
1244 fi
1245 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1246 if test -n "$ac_ct_CC"; then
1247   echo "$as_me:1247: result: $ac_ct_CC" >&5
1248 echo "${ECHO_T}$ac_ct_CC" >&6
1249 else
1250   echo "$as_me:1250: result: no" >&5
1251 echo "${ECHO_T}no" >&6
1252 fi
1253
1254   CC=$ac_ct_CC
1255 else
1256   CC="$ac_cv_prog_CC"
1257 fi
1258
1259 if test -z "$CC"; then
1260   if test -n "$ac_tool_prefix"; then
1261   # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1262 set dummy ${ac_tool_prefix}cc; ac_word=$2
1263 echo "$as_me:1263: checking for $ac_word" >&5
1264 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1265 if test "${ac_cv_prog_CC+set}" = set; then
1266   echo $ECHO_N "(cached) $ECHO_C" >&6
1267 else
1268   if test -n "$CC"; then
1269   ac_cv_prog_CC="$CC" # Let the user override the test.
1270 else
1271   ac_save_IFS=$IFS; IFS=$ac_path_separator
1272 ac_dummy="$PATH"
1273 for ac_dir in $ac_dummy; do
1274   IFS=$ac_save_IFS
1275   test -z "$ac_dir" && ac_dir=.
1276   $as_executable_p "$ac_dir/$ac_word" || continue
1277 ac_cv_prog_CC="${ac_tool_prefix}cc"
1278 echo "$as_me:1278: found $ac_dir/$ac_word" >&5
1279 break
1280 done
1281
1282 fi
1283 fi
1284 CC=$ac_cv_prog_CC
1285 if test -n "$CC"; then
1286   echo "$as_me:1286: result: $CC" >&5
1287 echo "${ECHO_T}$CC" >&6
1288 else
1289   echo "$as_me:1289: result: no" >&5
1290 echo "${ECHO_T}no" >&6
1291 fi
1292
1293 fi
1294 if test -z "$ac_cv_prog_CC"; then
1295   ac_ct_CC=$CC
1296   # Extract the first word of "cc", so it can be a program name with args.
1297 set dummy cc; ac_word=$2
1298 echo "$as_me:1298: checking for $ac_word" >&5
1299 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1300 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1301   echo $ECHO_N "(cached) $ECHO_C" >&6
1302 else
1303   if test -n "$ac_ct_CC"; then
1304   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1305 else
1306   ac_save_IFS=$IFS; IFS=$ac_path_separator
1307 ac_dummy="$PATH"
1308 for ac_dir in $ac_dummy; do
1309   IFS=$ac_save_IFS
1310   test -z "$ac_dir" && ac_dir=.
1311   $as_executable_p "$ac_dir/$ac_word" || continue
1312 ac_cv_prog_ac_ct_CC="cc"
1313 echo "$as_me:1313: found $ac_dir/$ac_word" >&5
1314 break
1315 done
1316
1317 fi
1318 fi
1319 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1320 if test -n "$ac_ct_CC"; then
1321   echo "$as_me:1321: result: $ac_ct_CC" >&5
1322 echo "${ECHO_T}$ac_ct_CC" >&6
1323 else
1324   echo "$as_me:1324: result: no" >&5
1325 echo "${ECHO_T}no" >&6
1326 fi
1327
1328   CC=$ac_ct_CC
1329 else
1330   CC="$ac_cv_prog_CC"
1331 fi
1332
1333 fi
1334 if test -z "$CC"; then
1335   # Extract the first word of "cc", so it can be a program name with args.
1336 set dummy cc; ac_word=$2
1337 echo "$as_me:1337: checking for $ac_word" >&5
1338 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1339 if test "${ac_cv_prog_CC+set}" = set; then
1340   echo $ECHO_N "(cached) $ECHO_C" >&6
1341 else
1342   if test -n "$CC"; then
1343   ac_cv_prog_CC="$CC" # Let the user override the test.
1344 else
1345   ac_prog_rejected=no
1346   ac_save_IFS=$IFS; IFS=$ac_path_separator
1347 ac_dummy="$PATH"
1348 for ac_dir in $ac_dummy; do
1349   IFS=$ac_save_IFS
1350   test -z "$ac_dir" && ac_dir=.
1351   $as_executable_p "$ac_dir/$ac_word" || continue
1352 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1353   ac_prog_rejected=yes
1354   continue
1355 fi
1356 ac_cv_prog_CC="cc"
1357 echo "$as_me:1357: found $ac_dir/$ac_word" >&5
1358 break
1359 done
1360
1361 if test $ac_prog_rejected = yes; then
1362   # We found a bogon in the path, so make sure we never use it.
1363   set dummy $ac_cv_prog_CC
1364   shift
1365   if test $# != 0; then
1366     # We chose a different compiler from the bogus one.
1367     # However, it has the same basename, so the bogon will be chosen
1368     # first if we set CC to just the basename; use the full file name.
1369     shift
1370     set dummy "$ac_dir/$ac_word" ${1+"$@"}
1371     shift
1372     ac_cv_prog_CC="$@"
1373   fi
1374 fi
1375 fi
1376 fi
1377 CC=$ac_cv_prog_CC
1378 if test -n "$CC"; then
1379   echo "$as_me:1379: result: $CC" >&5
1380 echo "${ECHO_T}$CC" >&6
1381 else
1382   echo "$as_me:1382: result: no" >&5
1383 echo "${ECHO_T}no" >&6
1384 fi
1385
1386 fi
1387 if test -z "$CC"; then
1388   if test -n "$ac_tool_prefix"; then
1389   for ac_prog in cl
1390   do
1391     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1392 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1393 echo "$as_me:1393: checking for $ac_word" >&5
1394 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1395 if test "${ac_cv_prog_CC+set}" = set; then
1396   echo $ECHO_N "(cached) $ECHO_C" >&6
1397 else
1398   if test -n "$CC"; then
1399   ac_cv_prog_CC="$CC" # Let the user override the test.
1400 else
1401   ac_save_IFS=$IFS; IFS=$ac_path_separator
1402 ac_dummy="$PATH"
1403 for ac_dir in $ac_dummy; do
1404   IFS=$ac_save_IFS
1405   test -z "$ac_dir" && ac_dir=.
1406   $as_executable_p "$ac_dir/$ac_word" || continue
1407 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1408 echo "$as_me:1408: found $ac_dir/$ac_word" >&5
1409 break
1410 done
1411
1412 fi
1413 fi
1414 CC=$ac_cv_prog_CC
1415 if test -n "$CC"; then
1416   echo "$as_me:1416: result: $CC" >&5
1417 echo "${ECHO_T}$CC" >&6
1418 else
1419   echo "$as_me:1419: result: no" >&5
1420 echo "${ECHO_T}no" >&6
1421 fi
1422
1423     test -n "$CC" && break
1424   done
1425 fi
1426 if test -z "$CC"; then
1427   ac_ct_CC=$CC
1428   for ac_prog in cl
1429 do
1430   # Extract the first word of "$ac_prog", so it can be a program name with args.
1431 set dummy $ac_prog; ac_word=$2
1432 echo "$as_me:1432: checking for $ac_word" >&5
1433 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1434 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1435   echo $ECHO_N "(cached) $ECHO_C" >&6
1436 else
1437   if test -n "$ac_ct_CC"; then
1438   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1439 else
1440   ac_save_IFS=$IFS; IFS=$ac_path_separator
1441 ac_dummy="$PATH"
1442 for ac_dir in $ac_dummy; do
1443   IFS=$ac_save_IFS
1444   test -z "$ac_dir" && ac_dir=.
1445   $as_executable_p "$ac_dir/$ac_word" || continue
1446 ac_cv_prog_ac_ct_CC="$ac_prog"
1447 echo "$as_me:1447: found $ac_dir/$ac_word" >&5
1448 break
1449 done
1450
1451 fi
1452 fi
1453 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1454 if test -n "$ac_ct_CC"; then
1455   echo "$as_me:1455: result: $ac_ct_CC" >&5
1456 echo "${ECHO_T}$ac_ct_CC" >&6
1457 else
1458   echo "$as_me:1458: result: no" >&5
1459 echo "${ECHO_T}no" >&6
1460 fi
1461
1462   test -n "$ac_ct_CC" && break
1463 done
1464
1465   CC=$ac_ct_CC
1466 fi
1467
1468 fi
1469
1470 test -z "$CC" && { { echo "$as_me:1470: error: no acceptable cc found in \$PATH" >&5
1471 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1472    { (exit 1); exit 1; }; }
1473
1474 # Provide some information about the compiler.
1475 echo "$as_me:1475:" \
1476      "checking for C compiler version" >&5
1477 ac_compiler=`set X $ac_compile; echo $2`
1478 { (eval echo "$as_me:1478: \"$ac_compiler --version </dev/null >&5\"") >&5
1479   (eval $ac_compiler --version </dev/null >&5) 2>&5
1480   ac_status=$?
1481   echo "$as_me:1481: \$? = $ac_status" >&5
1482   (exit $ac_status); }
1483 { (eval echo "$as_me:1483: \"$ac_compiler -v </dev/null >&5\"") >&5
1484   (eval $ac_compiler -v </dev/null >&5) 2>&5
1485   ac_status=$?
1486   echo "$as_me:1486: \$? = $ac_status" >&5
1487   (exit $ac_status); }
1488 { (eval echo "$as_me:1488: \"$ac_compiler -V </dev/null >&5\"") >&5
1489   (eval $ac_compiler -V </dev/null >&5) 2>&5
1490   ac_status=$?
1491   echo "$as_me:1491: \$? = $ac_status" >&5
1492   (exit $ac_status); }
1493
1494 cat >conftest.$ac_ext <<_ACEOF
1495 #line 1495 "configure"
1496 #include "confdefs.h"
1497
1498 int
1499 main ()
1500 {
1501
1502   ;
1503   return 0;
1504 }
1505 _ACEOF
1506 ac_clean_files_save=$ac_clean_files
1507 ac_clean_files="$ac_clean_files a.out a.exe"
1508 # Try to create an executable without -o first, disregard a.out.
1509 # It will help us diagnose broken compilers, and finding out an intuition
1510 # of exeext.
1511 echo "$as_me:1511: checking for C compiler default output" >&5
1512 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1513 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1514 if { (eval echo "$as_me:1514: \"$ac_link_default\"") >&5
1515   (eval $ac_link_default) 2>&5
1516   ac_status=$?
1517   echo "$as_me:1517: \$? = $ac_status" >&5
1518   (exit $ac_status); }; then
1519   # Find the output, starting from the most likely.  This scheme is
1520 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1521 # resort.
1522 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1523                 ls a.out conftest 2>/dev/null;
1524                 ls a.* conftest.* 2>/dev/null`; do
1525   case $ac_file in
1526     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1527     a.out ) # We found the default executable, but exeext='' is most
1528             # certainly right.
1529             break;;
1530     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1531           # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1532           export ac_cv_exeext
1533           break;;
1534     * ) break;;
1535   esac
1536 done
1537 else
1538   echo "$as_me: failed program was:" >&5
1539 cat conftest.$ac_ext >&5
1540 { { echo "$as_me:1540: error: C compiler cannot create executables" >&5
1541 echo "$as_me: error: C compiler cannot create executables" >&2;}
1542    { (exit 77); exit 77; }; }
1543 fi
1544
1545 ac_exeext=$ac_cv_exeext
1546 echo "$as_me:1546: result: $ac_file" >&5
1547 echo "${ECHO_T}$ac_file" >&6
1548
1549 # Check the compiler produces executables we can run.  If not, either
1550 # the compiler is broken, or we cross compile.
1551 echo "$as_me:1551: checking whether the C compiler works" >&5
1552 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1553 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1554 # If not cross compiling, check that we can run a simple program.
1555 if test "$cross_compiling" != yes; then
1556   if { ac_try='./$ac_file'
1557   { (eval echo "$as_me:1557: \"$ac_try\"") >&5
1558   (eval $ac_try) 2>&5
1559   ac_status=$?
1560   echo "$as_me:1560: \$? = $ac_status" >&5
1561   (exit $ac_status); }; }; then
1562     cross_compiling=no
1563   else
1564     if test "$cross_compiling" = maybe; then
1565         cross_compiling=yes
1566     else
1567         { { echo "$as_me:1567: error: cannot run C compiled programs.
1568 If you meant to cross compile, use \`--host'." >&5
1569 echo "$as_me: error: cannot run C compiled programs.
1570 If you meant to cross compile, use \`--host'." >&2;}
1571    { (exit 1); exit 1; }; }
1572     fi
1573   fi
1574 fi
1575 echo "$as_me:1575: result: yes" >&5
1576 echo "${ECHO_T}yes" >&6
1577
1578 rm -f a.out a.exe conftest$ac_cv_exeext
1579 ac_clean_files=$ac_clean_files_save
1580 # Check the compiler produces executables we can run.  If not, either
1581 # the compiler is broken, or we cross compile.
1582 echo "$as_me:1582: checking whether we are cross compiling" >&5
1583 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1584 echo "$as_me:1584: result: $cross_compiling" >&5
1585 echo "${ECHO_T}$cross_compiling" >&6
1586
1587 echo "$as_me:1587: checking for executable suffix" >&5
1588 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1589 if { (eval echo "$as_me:1589: \"$ac_link\"") >&5
1590   (eval $ac_link) 2>&5
1591   ac_status=$?
1592   echo "$as_me:1592: \$? = $ac_status" >&5
1593   (exit $ac_status); }; then
1594   # If both `conftest.exe' and `conftest' are `present' (well, observable)
1595 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
1596 # work properly (i.e., refer to `conftest.exe'), while it won't with
1597 # `rm'.
1598 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1599   case $ac_file in
1600     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1601     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1602           export ac_cv_exeext
1603           break;;
1604     * ) break;;
1605   esac
1606 done
1607 else
1608   { { echo "$as_me:1608: error: cannot compute EXEEXT: cannot compile and link" >&5
1609 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1610    { (exit 1); exit 1; }; }
1611 fi
1612
1613 rm -f conftest$ac_cv_exeext
1614 echo "$as_me:1614: result: $ac_cv_exeext" >&5
1615 echo "${ECHO_T}$ac_cv_exeext" >&6
1616
1617 rm -f conftest.$ac_ext
1618 EXEEXT=$ac_cv_exeext
1619 ac_exeext=$EXEEXT
1620 echo "$as_me:1620: checking for object suffix" >&5
1621 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1622 if test "${ac_cv_objext+set}" = set; then
1623   echo $ECHO_N "(cached) $ECHO_C" >&6
1624 else
1625   cat >conftest.$ac_ext <<_ACEOF
1626 #line 1626 "configure"
1627 #include "confdefs.h"
1628
1629 int
1630 main ()
1631 {
1632
1633   ;
1634   return 0;
1635 }
1636 _ACEOF
1637 rm -f conftest.o conftest.obj
1638 if { (eval echo "$as_me:1638: \"$ac_compile\"") >&5
1639   (eval $ac_compile) 2>&5
1640   ac_status=$?
1641   echo "$as_me:1641: \$? = $ac_status" >&5
1642   (exit $ac_status); }; then
1643   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1644   case $ac_file in
1645     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
1646     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1647        break;;
1648   esac
1649 done
1650 else
1651   echo "$as_me: failed program was:" >&5
1652 cat conftest.$ac_ext >&5
1653 { { echo "$as_me:1653: error: cannot compute OBJEXT: cannot compile" >&5
1654 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1655    { (exit 1); exit 1; }; }
1656 fi
1657
1658 rm -f conftest.$ac_cv_objext conftest.$ac_ext
1659 fi
1660 echo "$as_me:1660: result: $ac_cv_objext" >&5
1661 echo "${ECHO_T}$ac_cv_objext" >&6
1662 OBJEXT=$ac_cv_objext
1663 ac_objext=$OBJEXT
1664 echo "$as_me:1664: checking whether we are using the GNU C compiler" >&5
1665 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1666 if test "${ac_cv_c_compiler_gnu+set}" = set; then
1667   echo $ECHO_N "(cached) $ECHO_C" >&6
1668 else
1669   cat >conftest.$ac_ext <<_ACEOF
1670 #line 1670 "configure"
1671 #include "confdefs.h"
1672
1673 int
1674 main ()
1675 {
1676 #ifndef __GNUC__
1677        choke me
1678 #endif
1679
1680   ;
1681   return 0;
1682 }
1683 _ACEOF
1684 rm -f conftest.$ac_objext
1685 if { (eval echo "$as_me:1685: \"$ac_compile\"") >&5
1686   (eval $ac_compile) 2>&5
1687   ac_status=$?
1688   echo "$as_me:1688: \$? = $ac_status" >&5
1689   (exit $ac_status); } &&
1690          { ac_try='test -s conftest.$ac_objext'
1691   { (eval echo "$as_me:1691: \"$ac_try\"") >&5
1692   (eval $ac_try) 2>&5
1693   ac_status=$?
1694   echo "$as_me:1694: \$? = $ac_status" >&5
1695   (exit $ac_status); }; }; then
1696   ac_compiler_gnu=yes
1697 else
1698   echo "$as_me: failed program was:" >&5
1699 cat conftest.$ac_ext >&5
1700 ac_compiler_gnu=no
1701 fi
1702 rm -f conftest.$ac_objext conftest.$ac_ext
1703 ac_cv_c_compiler_gnu=$ac_compiler_gnu
1704
1705 fi
1706 echo "$as_me:1706: result: $ac_cv_c_compiler_gnu" >&5
1707 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1708 GCC=`test $ac_compiler_gnu = yes && echo yes`
1709 ac_test_CFLAGS=${CFLAGS+set}
1710 ac_save_CFLAGS=$CFLAGS
1711 CFLAGS="-g"
1712 echo "$as_me:1712: checking whether $CC accepts -g" >&5
1713 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1714 if test "${ac_cv_prog_cc_g+set}" = set; then
1715   echo $ECHO_N "(cached) $ECHO_C" >&6
1716 else
1717   cat >conftest.$ac_ext <<_ACEOF
1718 #line 1718 "configure"
1719 #include "confdefs.h"
1720
1721 int
1722 main ()
1723 {
1724
1725   ;
1726   return 0;
1727 }
1728 _ACEOF
1729 rm -f conftest.$ac_objext
1730 if { (eval echo "$as_me:1730: \"$ac_compile\"") >&5
1731   (eval $ac_compile) 2>&5
1732   ac_status=$?
1733   echo "$as_me:1733: \$? = $ac_status" >&5
1734   (exit $ac_status); } &&
1735          { ac_try='test -s conftest.$ac_objext'
1736   { (eval echo "$as_me:1736: \"$ac_try\"") >&5
1737   (eval $ac_try) 2>&5
1738   ac_status=$?
1739   echo "$as_me:1739: \$? = $ac_status" >&5
1740   (exit $ac_status); }; }; then
1741   ac_cv_prog_cc_g=yes
1742 else
1743   echo "$as_me: failed program was:" >&5
1744 cat conftest.$ac_ext >&5
1745 ac_cv_prog_cc_g=no
1746 fi
1747 rm -f conftest.$ac_objext conftest.$ac_ext
1748 fi
1749 echo "$as_me:1749: result: $ac_cv_prog_cc_g" >&5
1750 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1751 if test "$ac_test_CFLAGS" = set; then
1752   CFLAGS=$ac_save_CFLAGS
1753 elif test $ac_cv_prog_cc_g = yes; then
1754   if test "$GCC" = yes; then
1755     CFLAGS="-g -O2"
1756   else
1757     CFLAGS="-g"
1758   fi
1759 else
1760   if test "$GCC" = yes; then
1761     CFLAGS="-O2"
1762   else
1763     CFLAGS=
1764   fi
1765 fi
1766 # Some people use a C++ compiler to compile C.  Since we use `exit',
1767 # in C++ we need to declare it.  In case someone uses the same compiler
1768 # for both compiling C and C++ we need to have the C++ compiler decide
1769 # the declaration of exit, since it's the most demanding environment.
1770 cat >conftest.$ac_ext <<_ACEOF
1771 #ifndef __cplusplus
1772   choke me
1773 #endif
1774 _ACEOF
1775 rm -f conftest.$ac_objext
1776 if { (eval echo "$as_me:1776: \"$ac_compile\"") >&5
1777   (eval $ac_compile) 2>&5
1778   ac_status=$?
1779   echo "$as_me:1779: \$? = $ac_status" >&5
1780   (exit $ac_status); } &&
1781          { ac_try='test -s conftest.$ac_objext'
1782   { (eval echo "$as_me:1782: \"$ac_try\"") >&5
1783   (eval $ac_try) 2>&5
1784   ac_status=$?
1785   echo "$as_me:1785: \$? = $ac_status" >&5
1786   (exit $ac_status); }; }; then
1787   for ac_declaration in \
1788    ''\
1789    '#include <stdlib.h>' \
1790    'extern "C" void std::exit (int) throw (); using std::exit;' \
1791    'extern "C" void std::exit (int); using std::exit;' \
1792    'extern "C" void exit (int) throw ();' \
1793    'extern "C" void exit (int);' \
1794    'void exit (int);'
1795 do
1796   cat >conftest.$ac_ext <<_ACEOF
1797 #line 1797 "configure"
1798 #include "confdefs.h"
1799 #include <stdlib.h>
1800 $ac_declaration
1801 int
1802 main ()
1803 {
1804 exit (42);
1805   ;
1806   return 0;
1807 }
1808 _ACEOF
1809 rm -f conftest.$ac_objext
1810 if { (eval echo "$as_me:1810: \"$ac_compile\"") >&5
1811   (eval $ac_compile) 2>&5
1812   ac_status=$?
1813   echo "$as_me:1813: \$? = $ac_status" >&5
1814   (exit $ac_status); } &&
1815          { ac_try='test -s conftest.$ac_objext'
1816   { (eval echo "$as_me:1816: \"$ac_try\"") >&5
1817   (eval $ac_try) 2>&5
1818   ac_status=$?
1819   echo "$as_me:1819: \$? = $ac_status" >&5
1820   (exit $ac_status); }; }; then
1821   :
1822 else
1823   echo "$as_me: failed program was:" >&5
1824 cat conftest.$ac_ext >&5
1825 continue
1826 fi
1827 rm -f conftest.$ac_objext conftest.$ac_ext
1828   cat >conftest.$ac_ext <<_ACEOF
1829 #line 1829 "configure"
1830 #include "confdefs.h"
1831 $ac_declaration
1832 int
1833 main ()
1834 {
1835 exit (42);
1836   ;
1837   return 0;
1838 }
1839 _ACEOF
1840 rm -f conftest.$ac_objext
1841 if { (eval echo "$as_me:1841: \"$ac_compile\"") >&5
1842   (eval $ac_compile) 2>&5
1843   ac_status=$?
1844   echo "$as_me:1844: \$? = $ac_status" >&5
1845   (exit $ac_status); } &&
1846          { ac_try='test -s conftest.$ac_objext'
1847   { (eval echo "$as_me:1847: \"$ac_try\"") >&5
1848   (eval $ac_try) 2>&5
1849   ac_status=$?
1850   echo "$as_me:1850: \$? = $ac_status" >&5
1851   (exit $ac_status); }; }; then
1852   break
1853 else
1854   echo "$as_me: failed program was:" >&5
1855 cat conftest.$ac_ext >&5
1856 fi
1857 rm -f conftest.$ac_objext conftest.$ac_ext
1858 done
1859 rm -rf conftest*
1860 if test -n "$ac_declaration"; then
1861   echo '#ifdef __cplusplus' >>confdefs.h
1862   echo $ac_declaration      >>confdefs.h
1863   echo '#endif'             >>confdefs.h
1864 fi
1865
1866 else
1867   echo "$as_me: failed program was:" >&5
1868 cat conftest.$ac_ext >&5
1869 fi
1870 rm -f conftest.$ac_objext conftest.$ac_ext
1871 ac_ext=c
1872 ac_cpp='$CPP $CPPFLAGS'
1873 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1874 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1875 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1876 ac_main_return=return
1877
1878 GCC_VERSION=none
1879 if test "$GCC" = yes ; then
1880         echo "$as_me:1880: checking version of $CC" >&5
1881 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
1882         GCC_VERSION="`${CC} --version 2>/dev/null | sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
1883         test -z "$GCC_VERSION" && GCC_VERSION=unknown
1884         echo "$as_me:1884: result: $GCC_VERSION" >&5
1885 echo "${ECHO_T}$GCC_VERSION" >&6
1886 fi
1887
1888 ac_ext=c
1889 ac_cpp='$CPP $CPPFLAGS'
1890 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1891 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1892 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1893 ac_main_return=return
1894 echo "$as_me:1894: checking how to run the C preprocessor" >&5
1895 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
1896 # On Suns, sometimes $CPP names a directory.
1897 if test -n "$CPP" && test -d "$CPP"; then
1898   CPP=
1899 fi
1900 if test -z "$CPP"; then
1901   if test "${ac_cv_prog_CPP+set}" = set; then
1902   echo $ECHO_N "(cached) $ECHO_C" >&6
1903 else
1904       # Double quotes because CPP needs to be expanded
1905     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
1906     do
1907       ac_preproc_ok=false
1908 for ac_c_preproc_warn_flag in '' yes
1909 do
1910   # Use a header file that comes with gcc, so configuring glibc
1911   # with a fresh cross-compiler works.
1912   # On the NeXT, cc -E runs the code through the compiler's parser,
1913   # not just through cpp. "Syntax error" is here to catch this case.
1914   cat >conftest.$ac_ext <<_ACEOF
1915 #line 1915 "configure"
1916 #include "confdefs.h"
1917 #include <assert.h>
1918                      Syntax error
1919 _ACEOF
1920 if { (eval echo "$as_me:1920: \"$ac_cpp conftest.$ac_ext\"") >&5
1921   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
1922   ac_status=$?
1923   egrep -v '^ *\+' conftest.er1 >conftest.err
1924   rm -f conftest.er1
1925   cat conftest.err >&5
1926   echo "$as_me:1926: \$? = $ac_status" >&5
1927   (exit $ac_status); } >/dev/null; then
1928   if test -s conftest.err; then
1929     ac_cpp_err=$ac_c_preproc_warn_flag
1930   else
1931     ac_cpp_err=
1932   fi
1933 else
1934   ac_cpp_err=yes
1935 fi
1936 if test -z "$ac_cpp_err"; then
1937   :
1938 else
1939   echo "$as_me: failed program was:" >&5
1940   cat conftest.$ac_ext >&5
1941   # Broken: fails on valid input.
1942 continue
1943 fi
1944 rm -f conftest.err conftest.$ac_ext
1945
1946   # OK, works on sane cases.  Now check whether non-existent headers
1947   # can be detected and how.
1948   cat >conftest.$ac_ext <<_ACEOF
1949 #line 1949 "configure"
1950 #include "confdefs.h"
1951 #include <ac_nonexistent.h>
1952 _ACEOF
1953 if { (eval echo "$as_me:1953: \"$ac_cpp conftest.$ac_ext\"") >&5
1954   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
1955   ac_status=$?
1956   egrep -v '^ *\+' conftest.er1 >conftest.err
1957   rm -f conftest.er1
1958   cat conftest.err >&5
1959   echo "$as_me:1959: \$? = $ac_status" >&5
1960   (exit $ac_status); } >/dev/null; then
1961   if test -s conftest.err; then
1962     ac_cpp_err=$ac_c_preproc_warn_flag
1963   else
1964     ac_cpp_err=
1965   fi
1966 else
1967   ac_cpp_err=yes
1968 fi
1969 if test -z "$ac_cpp_err"; then
1970   # Broken: success on invalid input.
1971 continue
1972 else
1973   echo "$as_me: failed program was:" >&5
1974   cat conftest.$ac_ext >&5
1975   # Passes both tests.
1976 ac_preproc_ok=:
1977 break
1978 fi
1979 rm -f conftest.err conftest.$ac_ext
1980
1981 done
1982 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
1983 rm -f conftest.err conftest.$ac_ext
1984 if $ac_preproc_ok; then
1985   break
1986 fi
1987
1988     done
1989     ac_cv_prog_CPP=$CPP
1990
1991 fi
1992   CPP=$ac_cv_prog_CPP
1993 else
1994   ac_cv_prog_CPP=$CPP
1995 fi
1996 echo "$as_me:1996: result: $CPP" >&5
1997 echo "${ECHO_T}$CPP" >&6
1998 ac_preproc_ok=false
1999 for ac_c_preproc_warn_flag in '' yes
2000 do
2001   # Use a header file that comes with gcc, so configuring glibc
2002   # with a fresh cross-compiler works.
2003   # On the NeXT, cc -E runs the code through the compiler's parser,
2004   # not just through cpp. "Syntax error" is here to catch this case.
2005   cat >conftest.$ac_ext <<_ACEOF
2006 #line 2006 "configure"
2007 #include "confdefs.h"
2008 #include <assert.h>
2009                      Syntax error
2010 _ACEOF
2011 if { (eval echo "$as_me:2011: \"$ac_cpp conftest.$ac_ext\"") >&5
2012   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2013   ac_status=$?
2014   egrep -v '^ *\+' conftest.er1 >conftest.err
2015   rm -f conftest.er1
2016   cat conftest.err >&5
2017   echo "$as_me:2017: \$? = $ac_status" >&5
2018   (exit $ac_status); } >/dev/null; then
2019   if test -s conftest.err; then
2020     ac_cpp_err=$ac_c_preproc_warn_flag
2021   else
2022     ac_cpp_err=
2023   fi
2024 else
2025   ac_cpp_err=yes
2026 fi
2027 if test -z "$ac_cpp_err"; then
2028   :
2029 else
2030   echo "$as_me: failed program was:" >&5
2031   cat conftest.$ac_ext >&5
2032   # Broken: fails on valid input.
2033 continue
2034 fi
2035 rm -f conftest.err conftest.$ac_ext
2036
2037   # OK, works on sane cases.  Now check whether non-existent headers
2038   # can be detected and how.
2039   cat >conftest.$ac_ext <<_ACEOF
2040 #line 2040 "configure"
2041 #include "confdefs.h"
2042 #include <ac_nonexistent.h>
2043 _ACEOF
2044 if { (eval echo "$as_me:2044: \"$ac_cpp conftest.$ac_ext\"") >&5
2045   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2046   ac_status=$?
2047   egrep -v '^ *\+' conftest.er1 >conftest.err
2048   rm -f conftest.er1
2049   cat conftest.err >&5
2050   echo "$as_me:2050: \$? = $ac_status" >&5
2051   (exit $ac_status); } >/dev/null; then
2052   if test -s conftest.err; then
2053     ac_cpp_err=$ac_c_preproc_warn_flag
2054   else
2055     ac_cpp_err=
2056   fi
2057 else
2058   ac_cpp_err=yes
2059 fi
2060 if test -z "$ac_cpp_err"; then
2061   # Broken: success on invalid input.
2062 continue
2063 else
2064   echo "$as_me: failed program was:" >&5
2065   cat conftest.$ac_ext >&5
2066   # Passes both tests.
2067 ac_preproc_ok=:
2068 break
2069 fi
2070 rm -f conftest.err conftest.$ac_ext
2071
2072 done
2073 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2074 rm -f conftest.err conftest.$ac_ext
2075 if $ac_preproc_ok; then
2076   :
2077 else
2078   { { echo "$as_me:2078: error: C preprocessor \"$CPP\" fails sanity check" >&5
2079 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2080    { (exit 1); exit 1; }; }
2081 fi
2082
2083 ac_ext=c
2084 ac_cpp='$CPP $CPPFLAGS'
2085 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2086 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2087 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2088 ac_main_return=return
2089
2090 if test $ac_cv_c_compiler_gnu = yes; then
2091     echo "$as_me:2091: checking whether $CC needs -traditional" >&5
2092 echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
2093 if test "${ac_cv_prog_gcc_traditional+set}" = set; then
2094   echo $ECHO_N "(cached) $ECHO_C" >&6
2095 else
2096     ac_pattern="Autoconf.*'x'"
2097   cat >conftest.$ac_ext <<_ACEOF
2098 #line 2098 "configure"
2099 #include "confdefs.h"
2100 #include <sgtty.h>
2101 int Autoconf = TIOCGETP;
2102 _ACEOF
2103 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2104   egrep "$ac_pattern" >/dev/null 2>&1; then
2105   ac_cv_prog_gcc_traditional=yes
2106 else
2107   ac_cv_prog_gcc_traditional=no
2108 fi
2109 rm -rf conftest*
2110
2111   if test $ac_cv_prog_gcc_traditional = no; then
2112     cat >conftest.$ac_ext <<_ACEOF
2113 #line 2113 "configure"
2114 #include "confdefs.h"
2115 #include <termio.h>
2116 int Autoconf = TCGETA;
2117 _ACEOF
2118 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2119   egrep "$ac_pattern" >/dev/null 2>&1; then
2120   ac_cv_prog_gcc_traditional=yes
2121 fi
2122 rm -rf conftest*
2123
2124   fi
2125 fi
2126 echo "$as_me:2126: result: $ac_cv_prog_gcc_traditional" >&5
2127 echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
2128   if test $ac_cv_prog_gcc_traditional = yes; then
2129     CC="$CC -traditional"
2130   fi
2131 fi
2132
2133 echo "$as_me:2133: checking whether $CC understands -c and -o together" >&5
2134 echo $ECHO_N "checking whether $CC understands -c and -o together... $ECHO_C" >&6
2135 if test "${cf_cv_prog_CC_c_o+set}" = set; then
2136   echo $ECHO_N "(cached) $ECHO_C" >&6
2137 else
2138
2139 cat > conftest.$ac_ext <<CF_EOF
2140 #include <stdio.h>
2141 int main()
2142 {
2143         ${cf_cv_main_return:-return}(0);
2144 }
2145 CF_EOF
2146 # We do the test twice because some compilers refuse to overwrite an
2147 # existing .o file with -o, though they will create one.
2148 ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
2149 if { (eval echo "$as_me:2149: \"$ac_try\"") >&5
2150   (eval $ac_try) 2>&5
2151   ac_status=$?
2152   echo "$as_me:2152: \$? = $ac_status" >&5
2153   (exit $ac_status); } &&
2154   test -f conftest2.$ac_objext && { (eval echo "$as_me:2154: \"$ac_try\"") >&5
2155   (eval $ac_try) 2>&5
2156   ac_status=$?
2157   echo "$as_me:2157: \$? = $ac_status" >&5
2158   (exit $ac_status); };
2159 then
2160   eval cf_cv_prog_CC_c_o=yes
2161 else
2162   eval cf_cv_prog_CC_c_o=no
2163 fi
2164 rm -rf conftest*
2165
2166 fi
2167 if test $cf_cv_prog_CC_c_o = yes; then
2168   echo "$as_me:2168: result: yes" >&5
2169 echo "${ECHO_T}yes" >&6
2170 else
2171   echo "$as_me:2171: result: no" >&5
2172 echo "${ECHO_T}no" >&6
2173 fi
2174
2175 echo "$as_me:2175: checking for POSIXized ISC" >&5
2176 echo $ECHO_N "checking for POSIXized ISC... $ECHO_C" >&6
2177 if test -d /etc/conf/kconfig.d &&
2178    grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
2179 then
2180   echo "$as_me:2180: result: yes" >&5
2181 echo "${ECHO_T}yes" >&6
2182   ISC=yes # If later tests want to check for ISC.
2183
2184 cat >>confdefs.h <<\EOF
2185 #define _POSIX_SOURCE 1
2186 EOF
2187
2188   if test "$GCC" = yes; then
2189     CC="$CC -posix"
2190   else
2191     CC="$CC -Xp"
2192   fi
2193 else
2194   echo "$as_me:2194: result: no" >&5
2195 echo "${ECHO_T}no" >&6
2196   ISC=
2197 fi
2198
2199 echo "$as_me:2199: checking for ${CC:-cc} option to accept ANSI C" >&5
2200 echo $ECHO_N "checking for ${CC:-cc} option to accept ANSI C... $ECHO_C" >&6
2201 if test "${cf_cv_ansi_cc+set}" = set; then
2202   echo $ECHO_N "(cached) $ECHO_C" >&6
2203 else
2204
2205 cf_cv_ansi_cc=no
2206 cf_save_CFLAGS="$CFLAGS"
2207 cf_save_CPPFLAGS="$CPPFLAGS"
2208 # Don't try gcc -ansi; that turns off useful extensions and
2209 # breaks some systems' header files.
2210 # AIX                   -qlanglvl=ansi
2211 # Ultrix and OSF/1      -std1
2212 # HP-UX                 -Aa -D_HPUX_SOURCE
2213 # SVR4                  -Xc
2214 # UnixWare 1.2          (cannot use -Xc, since ANSI/POSIX clashes)
2215 for cf_arg in "-DCC_HAS_PROTOS" \
2216         "" \
2217         -qlanglvl=ansi \
2218         -std1 \
2219         -Ae \
2220         "-Aa -D_HPUX_SOURCE" \
2221         -Xc
2222 do
2223
2224 cf_fix_cppflags=no
2225 cf_new_cflags=
2226 cf_new_cppflags=
2227 cf_new_extra_cppflags=
2228
2229 for cf_add_cflags in $cf_arg
2230 do
2231 case $cf_fix_cppflags in
2232 no)
2233         case $cf_add_cflags in #(vi
2234         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2235                 case $cf_add_cflags in
2236                 -D*)
2237                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2238
2239                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2240                                 && test -z "${cf_tst_cflags}" \
2241                                 && cf_fix_cppflags=yes
2242
2243                         if test $cf_fix_cppflags = yes ; then
2244                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2245                                 continue
2246                         elif test "${cf_tst_cflags}" = "\"'" ; then
2247                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2248                                 continue
2249                         fi
2250                         ;;
2251                 esac
2252                 case "$CPPFLAGS" in
2253                 *$cf_add_cflags) #(vi
2254                         ;;
2255                 *) #(vi
2256                         case $cf_add_cflags in #(vi
2257                         -D*)
2258                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2259
2260 CPPFLAGS=`echo "$CPPFLAGS" | \
2261         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2262                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2263
2264                                 ;;
2265                         esac
2266                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2267                         ;;
2268                 esac
2269                 ;;
2270         *)
2271                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2272                 ;;
2273         esac
2274         ;;
2275 yes)
2276         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2277
2278         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2279
2280         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2281                 && test -z "${cf_tst_cflags}" \
2282                 && cf_fix_cppflags=no
2283         ;;
2284 esac
2285 done
2286
2287 if test -n "$cf_new_cflags" ; then
2288
2289         CFLAGS="$CFLAGS $cf_new_cflags"
2290 fi
2291
2292 if test -n "$cf_new_cppflags" ; then
2293
2294         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
2295 fi
2296
2297 if test -n "$cf_new_extra_cppflags" ; then
2298
2299         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2300 fi
2301
2302         cat >conftest.$ac_ext <<_ACEOF
2303 #line 2303 "configure"
2304 #include "confdefs.h"
2305
2306 #ifndef CC_HAS_PROTOS
2307 #if !defined(__STDC__) || (__STDC__ != 1)
2308 choke me
2309 #endif
2310 #endif
2311
2312 int
2313 main ()
2314 {
2315
2316         int test (int i, double x);
2317         struct s1 {int (*f) (int a);};
2318         struct s2 {int (*f) (double a);};
2319   ;
2320   return 0;
2321 }
2322 _ACEOF
2323 rm -f conftest.$ac_objext
2324 if { (eval echo "$as_me:2324: \"$ac_compile\"") >&5
2325   (eval $ac_compile) 2>&5
2326   ac_status=$?
2327   echo "$as_me:2327: \$? = $ac_status" >&5
2328   (exit $ac_status); } &&
2329          { ac_try='test -s conftest.$ac_objext'
2330   { (eval echo "$as_me:2330: \"$ac_try\"") >&5
2331   (eval $ac_try) 2>&5
2332   ac_status=$?
2333   echo "$as_me:2333: \$? = $ac_status" >&5
2334   (exit $ac_status); }; }; then
2335   cf_cv_ansi_cc="$cf_arg"; break
2336 else
2337   echo "$as_me: failed program was:" >&5
2338 cat conftest.$ac_ext >&5
2339 fi
2340 rm -f conftest.$ac_objext conftest.$ac_ext
2341 done
2342 CFLAGS="$cf_save_CFLAGS"
2343 CPPFLAGS="$cf_save_CPPFLAGS"
2344
2345 fi
2346 echo "$as_me:2346: result: $cf_cv_ansi_cc" >&5
2347 echo "${ECHO_T}$cf_cv_ansi_cc" >&6
2348
2349 if test "$cf_cv_ansi_cc" != "no"; then
2350 if test ".$cf_cv_ansi_cc" != ".-DCC_HAS_PROTOS"; then
2351
2352 cf_fix_cppflags=no
2353 cf_new_cflags=
2354 cf_new_cppflags=
2355 cf_new_extra_cppflags=
2356
2357 for cf_add_cflags in $cf_cv_ansi_cc
2358 do
2359 case $cf_fix_cppflags in
2360 no)
2361         case $cf_add_cflags in #(vi
2362         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2363                 case $cf_add_cflags in
2364                 -D*)
2365                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2366
2367                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2368                                 && test -z "${cf_tst_cflags}" \
2369                                 && cf_fix_cppflags=yes
2370
2371                         if test $cf_fix_cppflags = yes ; then
2372                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2373                                 continue
2374                         elif test "${cf_tst_cflags}" = "\"'" ; then
2375                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2376                                 continue
2377                         fi
2378                         ;;
2379                 esac
2380                 case "$CPPFLAGS" in
2381                 *$cf_add_cflags) #(vi
2382                         ;;
2383                 *) #(vi
2384                         case $cf_add_cflags in #(vi
2385                         -D*)
2386                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2387
2388 CPPFLAGS=`echo "$CPPFLAGS" | \
2389         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2390                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2391
2392                                 ;;
2393                         esac
2394                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2395                         ;;
2396                 esac
2397                 ;;
2398         *)
2399                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2400                 ;;
2401         esac
2402         ;;
2403 yes)
2404         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2405
2406         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2407
2408         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2409                 && test -z "${cf_tst_cflags}" \
2410                 && cf_fix_cppflags=no
2411         ;;
2412 esac
2413 done
2414
2415 if test -n "$cf_new_cflags" ; then
2416
2417         CFLAGS="$CFLAGS $cf_new_cflags"
2418 fi
2419
2420 if test -n "$cf_new_cppflags" ; then
2421
2422         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
2423 fi
2424
2425 if test -n "$cf_new_extra_cppflags" ; then
2426
2427         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2428 fi
2429
2430 else
2431         cat >>confdefs.h <<\EOF
2432 #define CC_HAS_PROTOS 1
2433 EOF
2434
2435 fi
2436 fi
2437
2438 if test "$cf_cv_ansi_cc" = "no"; then
2439         { { echo "$as_me:2439: error: Your compiler does not appear to recognize prototypes.
2440 You have the following choices:
2441         a. adjust your compiler options
2442         b. get an up-to-date compiler
2443         c. use a wrapper such as unproto" >&5
2444 echo "$as_me: error: Your compiler does not appear to recognize prototypes.
2445 You have the following choices:
2446         a. adjust your compiler options
2447         b. get an up-to-date compiler
2448         c. use a wrapper such as unproto" >&2;}
2449    { (exit 1); exit 1; }; }
2450 fi
2451
2452 case $cf_cv_system_name in
2453 os2*)
2454     CFLAGS="$CFLAGS -Zmt"
2455     CPPFLAGS="$CPPFLAGS -D__ST_MT_ERRNO__"
2456     CXXFLAGS="$CXXFLAGS -Zmt"
2457     # autoconf's macro sets -Zexe and suffix both, which conflict:w
2458     LDFLAGS="$LDFLAGS -Zmt -Zcrtdll"
2459     ac_cv_exeext=.exe
2460     ;;
2461 esac
2462
2463 PROG_EXT="$EXEEXT"
2464
2465 test -n "$PROG_EXT" && cat >>confdefs.h <<EOF
2466 #define PROG_EXT "$PROG_EXT"
2467 EOF
2468
2469 test "$program_prefix" != NONE &&
2470   program_transform_name="s,^,$program_prefix,;$program_transform_name"
2471 # Use a double $ so make ignores it.
2472 test "$program_suffix" != NONE &&
2473   program_transform_name="s,\$,$program_suffix,;$program_transform_name"
2474 # Double any \ or $.  echo might interpret backslashes.
2475 # By default was `s,x,x', remove it if useless.
2476 cat <<\_ACEOF >conftest.sed
2477 s/[\\$]/&&/g;s/;s,x,x,$//
2478 _ACEOF
2479 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
2480 rm conftest.sed
2481
2482 for ac_prog in mawk gawk nawk awk
2483 do
2484   # Extract the first word of "$ac_prog", so it can be a program name with args.
2485 set dummy $ac_prog; ac_word=$2
2486 echo "$as_me:2486: checking for $ac_word" >&5
2487 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2488 if test "${ac_cv_prog_AWK+set}" = set; then
2489   echo $ECHO_N "(cached) $ECHO_C" >&6
2490 else
2491   if test -n "$AWK"; then
2492   ac_cv_prog_AWK="$AWK" # Let the user override the test.
2493 else
2494   ac_save_IFS=$IFS; IFS=$ac_path_separator
2495 ac_dummy="$PATH"
2496 for ac_dir in $ac_dummy; do
2497   IFS=$ac_save_IFS
2498   test -z "$ac_dir" && ac_dir=.
2499   $as_executable_p "$ac_dir/$ac_word" || continue
2500 ac_cv_prog_AWK="$ac_prog"
2501 echo "$as_me:2501: found $ac_dir/$ac_word" >&5
2502 break
2503 done
2504
2505 fi
2506 fi
2507 AWK=$ac_cv_prog_AWK
2508 if test -n "$AWK"; then
2509   echo "$as_me:2509: result: $AWK" >&5
2510 echo "${ECHO_T}$AWK" >&6
2511 else
2512   echo "$as_me:2512: result: no" >&5
2513 echo "${ECHO_T}no" >&6
2514 fi
2515
2516   test -n "$AWK" && break
2517 done
2518
2519 test -z "$AWK" && { { echo "$as_me:2519: error: No awk program found" >&5
2520 echo "$as_me: error: No awk program found" >&2;}
2521    { (exit 1); exit 1; }; }
2522
2523 echo "$as_me:2523: checking for egrep" >&5
2524 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
2525 if test "${ac_cv_prog_egrep+set}" = set; then
2526   echo $ECHO_N "(cached) $ECHO_C" >&6
2527 else
2528   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
2529     then ac_cv_prog_egrep='grep -E'
2530     else ac_cv_prog_egrep='egrep'
2531     fi
2532 fi
2533 echo "$as_me:2533: result: $ac_cv_prog_egrep" >&5
2534 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
2535  EGREP=$ac_cv_prog_egrep
2536
2537 test -z "$EGREP" && { { echo "$as_me:2537: error: No egrep program found" >&5
2538 echo "$as_me: error: No egrep program found" >&2;}
2539    { (exit 1); exit 1; }; }
2540
2541 # Find a good install program.  We prefer a C program (faster),
2542 # so one script is as good as another.  But avoid the broken or
2543 # incompatible versions:
2544 # SysV /etc/install, /usr/sbin/install
2545 # SunOS /usr/etc/install
2546 # IRIX /sbin/install
2547 # AIX /bin/install
2548 # AmigaOS /C/install, which installs bootblocks on floppy discs
2549 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2550 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2551 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2552 # ./install, which can be erroneously created by make from ./install.sh.
2553 echo "$as_me:2553: checking for a BSD compatible install" >&5
2554 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
2555 if test -z "$INSTALL"; then
2556 if test "${ac_cv_path_install+set}" = set; then
2557   echo $ECHO_N "(cached) $ECHO_C" >&6
2558 else
2559     ac_save_IFS=$IFS; IFS=$ac_path_separator
2560   for ac_dir in $PATH; do
2561     IFS=$ac_save_IFS
2562     # Account for people who put trailing slashes in PATH elements.
2563     case $ac_dir/ in
2564     / | ./ | .// | /cC/* \
2565     | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
2566     | /usr/ucb/* ) ;;
2567     *)
2568       # OSF1 and SCO ODT 3.0 have their own names for install.
2569       # Don't use installbsd from OSF since it installs stuff as root
2570       # by default.
2571       for ac_prog in ginstall scoinst install; do
2572         if $as_executable_p "$ac_dir/$ac_prog"; then
2573           if test $ac_prog = install &&
2574             grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2575             # AIX install.  It has an incompatible calling convention.
2576             :
2577           elif test $ac_prog = install &&
2578             grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2579             # program-specific install script used by HP pwplus--don't use.
2580             :
2581           else
2582             ac_cv_path_install="$ac_dir/$ac_prog -c"
2583             break 2
2584           fi
2585         fi
2586       done
2587       ;;
2588     esac
2589   done
2590
2591 fi
2592   if test "${ac_cv_path_install+set}" = set; then
2593     INSTALL=$ac_cv_path_install
2594   else
2595     # As a last resort, use the slow shell script.  We don't cache a
2596     # path for INSTALL within a source directory, because that will
2597     # break other packages using the cache if that directory is
2598     # removed, or if the path is relative.
2599     INSTALL=$ac_install_sh
2600   fi
2601 fi
2602 echo "$as_me:2602: result: $INSTALL" >&5
2603 echo "${ECHO_T}$INSTALL" >&6
2604
2605 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2606 # It thinks the first close brace ends the variable substitution.
2607 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2608
2609 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
2610
2611 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2612
2613 echo "$as_me:2613: checking whether ln -s works" >&5
2614 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
2615 LN_S=$as_ln_s
2616 if test "$LN_S" = "ln -s"; then
2617   echo "$as_me:2617: result: yes" >&5
2618 echo "${ECHO_T}yes" >&6
2619 else
2620   echo "$as_me:2620: result: no, using $LN_S" >&5
2621 echo "${ECHO_T}no, using $LN_S" >&6
2622 fi
2623
2624 echo "$as_me:2624: checking if $LN_S -f options work" >&5
2625 echo $ECHO_N "checking if $LN_S -f options work... $ECHO_C" >&6
2626
2627 rm -f conf$$.src conf$$dst
2628 echo >conf$$.dst
2629 echo first >conf$$.src
2630 if $LN_S -f conf$$.src conf$$.dst 2>/dev/null; then
2631         cf_prog_ln_sf=yes
2632 else
2633         cf_prog_ln_sf=no
2634 fi
2635 rm -f conf$$.dst conf$$src
2636 echo "$as_me:2636: result: $cf_prog_ln_sf" >&5
2637 echo "${ECHO_T}$cf_prog_ln_sf" >&6
2638
2639 test "$cf_prog_ln_sf" = yes && LN_S="$LN_S -f"
2640
2641 echo "$as_me:2641: checking for long file names" >&5
2642 echo $ECHO_N "checking for long file names... $ECHO_C" >&6
2643 if test "${ac_cv_sys_long_file_names+set}" = set; then
2644   echo $ECHO_N "(cached) $ECHO_C" >&6
2645 else
2646   ac_cv_sys_long_file_names=yes
2647 # Test for long file names in all the places we know might matter:
2648 #      .                the current directory, where building will happen
2649 #      $prefix/lib      where we will be installing things
2650 #      $exec_prefix/lib likewise
2651 # eval it to expand exec_prefix.
2652 #      $TMPDIR          if set, where it might want to write temporary files
2653 # if $TMPDIR is not set:
2654 #      /tmp             where it might want to write temporary files
2655 #      /var/tmp         likewise
2656 #      /usr/tmp         likewise
2657 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
2658   ac_tmpdirs=$TMPDIR
2659 else
2660   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
2661 fi
2662 for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
2663   test -d $ac_dir || continue
2664   test -w $ac_dir || continue # It is less confusing to not echo anything here.
2665   ac_xdir=$ac_dir/cf$$
2666   (umask 077 && mkdir $ac_xdir 2>/dev/null) || continue
2667   ac_tf1=$ac_xdir/conftest9012345
2668   ac_tf2=$ac_xdir/conftest9012346
2669   (echo 1 >$ac_tf1) 2>/dev/null
2670   (echo 2 >$ac_tf2) 2>/dev/null
2671   ac_val=`cat $ac_tf1 2>/dev/null`
2672   if test ! -f $ac_tf1 || test "$ac_val" != 1; then
2673     ac_cv_sys_long_file_names=no
2674     rm -rf $ac_xdir 2>/dev/null
2675     break
2676   fi
2677   rm -rf $ac_xdir 2>/dev/null
2678 done
2679 fi
2680 echo "$as_me:2680: result: $ac_cv_sys_long_file_names" >&5
2681 echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
2682 if test $ac_cv_sys_long_file_names = yes; then
2683
2684 cat >>confdefs.h <<\EOF
2685 #define HAVE_LONG_FILE_NAMES 1
2686 EOF
2687
2688 fi
2689
2690 # if we find pkg-config, check if we should install the ".pc" files.
2691
2692 echo "$as_me:2692: checking if you want to use pkg-config" >&5
2693 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
2694
2695 # Check whether --with-pkg-config or --without-pkg-config was given.
2696 if test "${with_pkg_config+set}" = set; then
2697   withval="$with_pkg_config"
2698   cf_pkg_config=$withval
2699 else
2700   cf_pkg_config=yes
2701 fi;
2702 echo "$as_me:2702: result: $cf_pkg_config" >&5
2703 echo "${ECHO_T}$cf_pkg_config" >&6
2704
2705 case $cf_pkg_config in #(vi
2706 no) #(vi
2707         PKG_CONFIG=none
2708         ;;
2709 yes) #(vi
2710         if test -n "$ac_tool_prefix"; then
2711   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
2712 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
2713 echo "$as_me:2713: checking for $ac_word" >&5
2714 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2715 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
2716   echo $ECHO_N "(cached) $ECHO_C" >&6
2717 else
2718   case $PKG_CONFIG in
2719   [\\/]* | ?:[\\/]*)
2720   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
2721   ;;
2722   *)
2723   ac_save_IFS=$IFS; IFS=$ac_path_separator
2724 ac_dummy="$PATH"
2725 for ac_dir in $ac_dummy; do
2726   IFS=$ac_save_IFS
2727   test -z "$ac_dir" && ac_dir=.
2728   if $as_executable_p "$ac_dir/$ac_word"; then
2729    ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
2730    echo "$as_me:2730: found $ac_dir/$ac_word" >&5
2731    break
2732 fi
2733 done
2734
2735   ;;
2736 esac
2737 fi
2738 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
2739
2740 if test -n "$PKG_CONFIG"; then
2741   echo "$as_me:2741: result: $PKG_CONFIG" >&5
2742 echo "${ECHO_T}$PKG_CONFIG" >&6
2743 else
2744   echo "$as_me:2744: result: no" >&5
2745 echo "${ECHO_T}no" >&6
2746 fi
2747
2748 fi
2749 if test -z "$ac_cv_path_PKG_CONFIG"; then
2750   ac_pt_PKG_CONFIG=$PKG_CONFIG
2751   # Extract the first word of "pkg-config", so it can be a program name with args.
2752 set dummy pkg-config; ac_word=$2
2753 echo "$as_me:2753: checking for $ac_word" >&5
2754 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2755 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
2756   echo $ECHO_N "(cached) $ECHO_C" >&6
2757 else
2758   case $ac_pt_PKG_CONFIG in
2759   [\\/]* | ?:[\\/]*)
2760   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
2761   ;;
2762   *)
2763   ac_save_IFS=$IFS; IFS=$ac_path_separator
2764 ac_dummy="$PATH"
2765 for ac_dir in $ac_dummy; do
2766   IFS=$ac_save_IFS
2767   test -z "$ac_dir" && ac_dir=.
2768   if $as_executable_p "$ac_dir/$ac_word"; then
2769    ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
2770    echo "$as_me:2770: found $ac_dir/$ac_word" >&5
2771    break
2772 fi
2773 done
2774
2775   test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
2776   ;;
2777 esac
2778 fi
2779 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
2780
2781 if test -n "$ac_pt_PKG_CONFIG"; then
2782   echo "$as_me:2782: result: $ac_pt_PKG_CONFIG" >&5
2783 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
2784 else
2785   echo "$as_me:2785: result: no" >&5
2786 echo "${ECHO_T}no" >&6
2787 fi
2788
2789   PKG_CONFIG=$ac_pt_PKG_CONFIG
2790 else
2791   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
2792 fi
2793
2794         ;;
2795 *)
2796         PKG_CONFIG=$withval
2797         ;;
2798 esac
2799
2800 test -z "$PKG_CONFIG" && PKG_CONFIG=none
2801 if test "$PKG_CONFIG" != none ; then
2802
2803 if test "x$prefix" != xNONE; then
2804   cf_path_syntax="$prefix"
2805 else
2806   cf_path_syntax="$ac_default_prefix"
2807 fi
2808
2809 case ".$PKG_CONFIG" in #(vi
2810 .\$\(*\)*|.\'*\'*) #(vi
2811   ;;
2812 ..|./*|.\\*) #(vi
2813   ;;
2814 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
2815   ;;
2816 .\${*prefix}*) #(vi
2817   eval PKG_CONFIG="$PKG_CONFIG"
2818   case ".$PKG_CONFIG" in #(vi
2819   .NONE/*)
2820     PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
2821     ;;
2822   esac
2823   ;; #(vi
2824 .no|.NONE/*)
2825   PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
2826   ;;
2827 *)
2828   { { echo "$as_me:2828: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
2829 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
2830    { (exit 1); exit 1; }; }
2831   ;;
2832 esac
2833
2834 fi
2835
2836 if test "$PKG_CONFIG" != none ; then
2837         echo "$as_me:2837: checking if we should install .pc files for $PKG_CONFIG" >&5
2838 echo $ECHO_N "checking if we should install .pc files for $PKG_CONFIG... $ECHO_C" >&6
2839
2840         # Leave this as something that can be overridden in the environment.
2841         if test -z "$PKG_CONFIG_LIBDIR" ; then
2842                 PKG_CONFIG_LIBDIR=`echo "$PKG_CONFIG" | sed -e 's,/[^/]*/[^/]*$,,'`/lib/pkgconfig
2843         fi
2844         PKG_CONFIG_LIBDIR=`echo "$PKG_CONFIG_LIBDIR" | sed -e 's/^://' -e 's/:.*//'`
2845         if test -n "$PKG_CONFIG_LIBDIR" && test -d "$PKG_CONFIG_LIBDIR" ; then
2846
2847 # Check whether --enable-pc-files or --disable-pc-files was given.
2848 if test "${enable_pc_files+set}" = set; then
2849   enableval="$enable_pc_files"
2850   enable_pc_files=$enableval
2851 else
2852   enable_pc_files=no
2853 fi;
2854                 echo "$as_me:2854: result: $enable_pc_files" >&5
2855 echo "${ECHO_T}$enable_pc_files" >&6
2856         else
2857                 echo "$as_me:2857: result: no" >&5
2858 echo "${ECHO_T}no" >&6
2859                 { echo "$as_me:2859: WARNING: did not find library $PKG_CONFIG_LIBDIR" >&5
2860 echo "$as_me: WARNING: did not find library $PKG_CONFIG_LIBDIR" >&2;}
2861                 enable_pc_files=no
2862         fi
2863 fi
2864
2865 echo "$as_me:2865: checking if you want to build test-programs" >&5
2866 echo $ECHO_N "checking if you want to build test-programs... $ECHO_C" >&6
2867
2868 # Check whether --with-tests or --without-tests was given.
2869 if test "${with_tests+set}" = set; then
2870   withval="$with_tests"
2871   cf_with_tests=$withval
2872 else
2873   cf_with_tests=yes
2874 fi;
2875 echo "$as_me:2875: result: $cf_with_tests" >&5
2876 echo "${ECHO_T}$cf_with_tests" >&6
2877
2878 echo "$as_me:2878: checking if we should assume mixed-case filenames" >&5
2879 echo $ECHO_N "checking if we should assume mixed-case filenames... $ECHO_C" >&6
2880
2881 # Check whether --enable-mixed-case or --disable-mixed-case was given.
2882 if test "${enable_mixed_case+set}" = set; then
2883   enableval="$enable_mixed_case"
2884   enable_mixedcase=$enableval
2885 else
2886   enable_mixedcase=auto
2887 fi;
2888 echo "$as_me:2888: result: $enable_mixedcase" >&5
2889 echo "${ECHO_T}$enable_mixedcase" >&6
2890 if test "$enable_mixedcase" = "auto" ; then
2891
2892 echo "$as_me:2892: checking if filesystem supports mixed-case filenames" >&5
2893 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
2894 if test "${cf_cv_mixedcase+set}" = set; then
2895   echo $ECHO_N "(cached) $ECHO_C" >&6
2896 else
2897
2898 if test "$cross_compiling" = yes ; then
2899         case $target_alias in #(vi
2900         *-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-mingw32*|*-uwin*) #(vi
2901                 cf_cv_mixedcase=no
2902                 ;;
2903         *)
2904                 cf_cv_mixedcase=yes
2905                 ;;
2906         esac
2907 else
2908         rm -f conftest CONFTEST
2909         echo test >conftest
2910         if test -f CONFTEST ; then
2911                 cf_cv_mixedcase=no
2912         else
2913                 cf_cv_mixedcase=yes
2914         fi
2915         rm -f conftest CONFTEST
2916 fi
2917
2918 fi
2919 echo "$as_me:2919: result: $cf_cv_mixedcase" >&5
2920 echo "${ECHO_T}$cf_cv_mixedcase" >&6
2921 test "$cf_cv_mixedcase" = yes && cat >>confdefs.h <<\EOF
2922 #define MIXEDCASE_FILENAMES 1
2923 EOF
2924
2925 else
2926     cf_cv_mixedcase=$enable_mixedcase
2927     if test "$enable_mixedcase" = "yes" ; then
2928         cat >>confdefs.h <<\EOF
2929 #define MIXEDCASE_FILENAMES 1
2930 EOF
2931
2932     fi
2933 fi
2934
2935 # do this after mixed-case option (tags/TAGS is not as important as tic).
2936 echo "$as_me:2936: checking whether ${MAKE-make} sets \${MAKE}" >&5
2937 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
2938 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
2939 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
2940   echo $ECHO_N "(cached) $ECHO_C" >&6
2941 else
2942   cat >conftest.make <<\EOF
2943 all:
2944         @echo 'ac_maketemp="${MAKE}"'
2945 EOF
2946 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
2947 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
2948 if test -n "$ac_maketemp"; then
2949   eval ac_cv_prog_make_${ac_make}_set=yes
2950 else
2951   eval ac_cv_prog_make_${ac_make}_set=no
2952 fi
2953 rm -f conftest.make
2954 fi
2955 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
2956   echo "$as_me:2956: result: yes" >&5
2957 echo "${ECHO_T}yes" >&6
2958   SET_MAKE=
2959 else
2960   echo "$as_me:2960: result: no" >&5
2961 echo "${ECHO_T}no" >&6
2962   SET_MAKE="MAKE=${MAKE-make}"
2963 fi
2964
2965 for ac_prog in exctags ctags
2966 do
2967   # Extract the first word of "$ac_prog", so it can be a program name with args.
2968 set dummy $ac_prog; ac_word=$2
2969 echo "$as_me:2969: checking for $ac_word" >&5
2970 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2971 if test "${ac_cv_prog_CTAGS+set}" = set; then
2972   echo $ECHO_N "(cached) $ECHO_C" >&6
2973 else
2974   if test -n "$CTAGS"; then
2975   ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
2976 else
2977   ac_save_IFS=$IFS; IFS=$ac_path_separator
2978 ac_dummy="$PATH"
2979 for ac_dir in $ac_dummy; do
2980   IFS=$ac_save_IFS
2981   test -z "$ac_dir" && ac_dir=.
2982   $as_executable_p "$ac_dir/$ac_word" || continue
2983 ac_cv_prog_CTAGS="$ac_prog"
2984 echo "$as_me:2984: found $ac_dir/$ac_word" >&5
2985 break
2986 done
2987
2988 fi
2989 fi
2990 CTAGS=$ac_cv_prog_CTAGS
2991 if test -n "$CTAGS"; then
2992   echo "$as_me:2992: result: $CTAGS" >&5
2993 echo "${ECHO_T}$CTAGS" >&6
2994 else
2995   echo "$as_me:2995: result: no" >&5
2996 echo "${ECHO_T}no" >&6
2997 fi
2998
2999   test -n "$CTAGS" && break
3000 done
3001
3002 for ac_prog in exetags etags
3003 do
3004   # Extract the first word of "$ac_prog", so it can be a program name with args.
3005 set dummy $ac_prog; ac_word=$2
3006 echo "$as_me:3006: checking for $ac_word" >&5
3007 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3008 if test "${ac_cv_prog_ETAGS+set}" = set; then
3009   echo $ECHO_N "(cached) $ECHO_C" >&6
3010 else
3011   if test -n "$ETAGS"; then
3012   ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
3013 else
3014   ac_save_IFS=$IFS; IFS=$ac_path_separator
3015 ac_dummy="$PATH"
3016 for ac_dir in $ac_dummy; do
3017   IFS=$ac_save_IFS
3018   test -z "$ac_dir" && ac_dir=.
3019   $as_executable_p "$ac_dir/$ac_word" || continue
3020 ac_cv_prog_ETAGS="$ac_prog"
3021 echo "$as_me:3021: found $ac_dir/$ac_word" >&5
3022 break
3023 done
3024
3025 fi
3026 fi
3027 ETAGS=$ac_cv_prog_ETAGS
3028 if test -n "$ETAGS"; then
3029   echo "$as_me:3029: result: $ETAGS" >&5
3030 echo "${ECHO_T}$ETAGS" >&6
3031 else
3032   echo "$as_me:3032: result: no" >&5
3033 echo "${ECHO_T}no" >&6
3034 fi
3035
3036   test -n "$ETAGS" && break
3037 done
3038
3039 # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
3040 set dummy ${CTAGS:-ctags}; ac_word=$2
3041 echo "$as_me:3041: checking for $ac_word" >&5
3042 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3043 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
3044   echo $ECHO_N "(cached) $ECHO_C" >&6
3045 else
3046   if test -n "$MAKE_LOWER_TAGS"; then
3047   ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
3048 else
3049   ac_save_IFS=$IFS; IFS=$ac_path_separator
3050 ac_dummy="$PATH"
3051 for ac_dir in $ac_dummy; do
3052   IFS=$ac_save_IFS
3053   test -z "$ac_dir" && ac_dir=.
3054   $as_executable_p "$ac_dir/$ac_word" || continue
3055 ac_cv_prog_MAKE_LOWER_TAGS="yes"
3056 echo "$as_me:3056: found $ac_dir/$ac_word" >&5
3057 break
3058 done
3059
3060   test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
3061 fi
3062 fi
3063 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
3064 if test -n "$MAKE_LOWER_TAGS"; then
3065   echo "$as_me:3065: result: $MAKE_LOWER_TAGS" >&5
3066 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
3067 else
3068   echo "$as_me:3068: result: no" >&5
3069 echo "${ECHO_T}no" >&6
3070 fi
3071
3072 if test "$cf_cv_mixedcase" = yes ; then
3073         # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
3074 set dummy ${ETAGS:-etags}; 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_MAKE_UPPER_TAGS+set}" = set; then
3078   echo $ECHO_N "(cached) $ECHO_C" >&6
3079 else
3080   if test -n "$MAKE_UPPER_TAGS"; then
3081   ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # 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_MAKE_UPPER_TAGS="yes"
3090 echo "$as_me:3090: found $ac_dir/$ac_word" >&5
3091 break
3092 done
3093
3094   test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
3095 fi
3096 fi
3097 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
3098 if test -n "$MAKE_UPPER_TAGS"; then
3099   echo "$as_me:3099: result: $MAKE_UPPER_TAGS" >&5
3100 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
3101 else
3102   echo "$as_me:3102: result: no" >&5
3103 echo "${ECHO_T}no" >&6
3104 fi
3105
3106 else
3107         MAKE_UPPER_TAGS=no
3108 fi
3109
3110 if test "$MAKE_UPPER_TAGS" = yes ; then
3111         MAKE_UPPER_TAGS=
3112 else
3113         MAKE_UPPER_TAGS="#"
3114 fi
3115
3116 if test "$MAKE_LOWER_TAGS" = yes ; then
3117         MAKE_LOWER_TAGS=
3118 else
3119         MAKE_LOWER_TAGS="#"
3120 fi
3121
3122 echo "$as_me:3122: checking for makeflags variable" >&5
3123 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
3124 if test "${cf_cv_makeflags+set}" = set; then
3125   echo $ECHO_N "(cached) $ECHO_C" >&6
3126 else
3127
3128         cf_cv_makeflags=''
3129         for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
3130         do
3131                 cat >cf_makeflags.tmp <<CF_EOF
3132 SHELL = /bin/sh
3133 all :
3134         @ echo '.$cf_option'
3135 CF_EOF
3136                 cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp 2>/dev/null | sed -e 's,[       ]*$,,'`
3137                 case "$cf_result" in
3138                 .*k)
3139                         cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`
3140                         case "$cf_result" in
3141                         .*CC=*) cf_cv_makeflags=
3142                                 ;;
3143                         *)      cf_cv_makeflags=$cf_option
3144                                 ;;
3145                         esac
3146                         break
3147                         ;;
3148                 .-)     ;;
3149                 *)      echo "given option \"$cf_option\", no match \"$cf_result\""
3150                         ;;
3151                 esac
3152         done
3153         rm -f cf_makeflags.tmp
3154
3155 fi
3156 echo "$as_me:3156: result: $cf_cv_makeflags" >&5
3157 echo "${ECHO_T}$cf_cv_makeflags" >&6
3158
3159 if test -n "$ac_tool_prefix"; then
3160   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3161 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3162 echo "$as_me:3162: checking for $ac_word" >&5
3163 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3164 if test "${ac_cv_prog_RANLIB+set}" = set; then
3165   echo $ECHO_N "(cached) $ECHO_C" >&6
3166 else
3167   if test -n "$RANLIB"; then
3168   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3169 else
3170   ac_save_IFS=$IFS; IFS=$ac_path_separator
3171 ac_dummy="$PATH"
3172 for ac_dir in $ac_dummy; do
3173   IFS=$ac_save_IFS
3174   test -z "$ac_dir" && ac_dir=.
3175   $as_executable_p "$ac_dir/$ac_word" || continue
3176 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3177 echo "$as_me:3177: found $ac_dir/$ac_word" >&5
3178 break
3179 done
3180
3181 fi
3182 fi
3183 RANLIB=$ac_cv_prog_RANLIB
3184 if test -n "$RANLIB"; then
3185   echo "$as_me:3185: result: $RANLIB" >&5
3186 echo "${ECHO_T}$RANLIB" >&6
3187 else
3188   echo "$as_me:3188: result: no" >&5
3189 echo "${ECHO_T}no" >&6
3190 fi
3191
3192 fi
3193 if test -z "$ac_cv_prog_RANLIB"; then
3194   ac_ct_RANLIB=$RANLIB
3195   # Extract the first word of "ranlib", so it can be a program name with args.
3196 set dummy ranlib; ac_word=$2
3197 echo "$as_me:3197: checking for $ac_word" >&5
3198 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3199 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
3200   echo $ECHO_N "(cached) $ECHO_C" >&6
3201 else
3202   if test -n "$ac_ct_RANLIB"; then
3203   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
3204 else
3205   ac_save_IFS=$IFS; IFS=$ac_path_separator
3206 ac_dummy="$PATH"
3207 for ac_dir in $ac_dummy; do
3208   IFS=$ac_save_IFS
3209   test -z "$ac_dir" && ac_dir=.
3210   $as_executable_p "$ac_dir/$ac_word" || continue
3211 ac_cv_prog_ac_ct_RANLIB="ranlib"
3212 echo "$as_me:3212: found $ac_dir/$ac_word" >&5
3213 break
3214 done
3215
3216   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
3217 fi
3218 fi
3219 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3220 if test -n "$ac_ct_RANLIB"; then
3221   echo "$as_me:3221: result: $ac_ct_RANLIB" >&5
3222 echo "${ECHO_T}$ac_ct_RANLIB" >&6
3223 else
3224   echo "$as_me:3224: result: no" >&5
3225 echo "${ECHO_T}no" >&6
3226 fi
3227
3228   RANLIB=$ac_ct_RANLIB
3229 else
3230   RANLIB="$ac_cv_prog_RANLIB"
3231 fi
3232
3233 if test -n "$ac_tool_prefix"; then
3234   # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
3235 set dummy ${ac_tool_prefix}ld; ac_word=$2
3236 echo "$as_me:3236: checking for $ac_word" >&5
3237 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3238 if test "${ac_cv_prog_LD+set}" = set; then
3239   echo $ECHO_N "(cached) $ECHO_C" >&6
3240 else
3241   if test -n "$LD"; then
3242   ac_cv_prog_LD="$LD" # Let the user override the test.
3243 else
3244   ac_save_IFS=$IFS; IFS=$ac_path_separator
3245 ac_dummy="$PATH"
3246 for ac_dir in $ac_dummy; do
3247   IFS=$ac_save_IFS
3248   test -z "$ac_dir" && ac_dir=.
3249   $as_executable_p "$ac_dir/$ac_word" || continue
3250 ac_cv_prog_LD="${ac_tool_prefix}ld"
3251 echo "$as_me:3251: found $ac_dir/$ac_word" >&5
3252 break
3253 done
3254
3255 fi
3256 fi
3257 LD=$ac_cv_prog_LD
3258 if test -n "$LD"; then
3259   echo "$as_me:3259: result: $LD" >&5
3260 echo "${ECHO_T}$LD" >&6
3261 else
3262   echo "$as_me:3262: result: no" >&5
3263 echo "${ECHO_T}no" >&6
3264 fi
3265
3266 fi
3267 if test -z "$ac_cv_prog_LD"; then
3268   ac_ct_LD=$LD
3269   # Extract the first word of "ld", so it can be a program name with args.
3270 set dummy ld; ac_word=$2
3271 echo "$as_me:3271: checking for $ac_word" >&5
3272 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3273 if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
3274   echo $ECHO_N "(cached) $ECHO_C" >&6
3275 else
3276   if test -n "$ac_ct_LD"; then
3277   ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
3278 else
3279   ac_save_IFS=$IFS; IFS=$ac_path_separator
3280 ac_dummy="$PATH"
3281 for ac_dir in $ac_dummy; do
3282   IFS=$ac_save_IFS
3283   test -z "$ac_dir" && ac_dir=.
3284   $as_executable_p "$ac_dir/$ac_word" || continue
3285 ac_cv_prog_ac_ct_LD="ld"
3286 echo "$as_me:3286: found $ac_dir/$ac_word" >&5
3287 break
3288 done
3289
3290   test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
3291 fi
3292 fi
3293 ac_ct_LD=$ac_cv_prog_ac_ct_LD
3294 if test -n "$ac_ct_LD"; then
3295   echo "$as_me:3295: result: $ac_ct_LD" >&5
3296 echo "${ECHO_T}$ac_ct_LD" >&6
3297 else
3298   echo "$as_me:3298: result: no" >&5
3299 echo "${ECHO_T}no" >&6
3300 fi
3301
3302   LD=$ac_ct_LD
3303 else
3304   LD="$ac_cv_prog_LD"
3305 fi
3306
3307 if test -n "$ac_tool_prefix"; then
3308   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
3309 set dummy ${ac_tool_prefix}ar; ac_word=$2
3310 echo "$as_me:3310: checking for $ac_word" >&5
3311 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3312 if test "${ac_cv_prog_AR+set}" = set; then
3313   echo $ECHO_N "(cached) $ECHO_C" >&6
3314 else
3315   if test -n "$AR"; then
3316   ac_cv_prog_AR="$AR" # Let the user override the test.
3317 else
3318   ac_save_IFS=$IFS; IFS=$ac_path_separator
3319 ac_dummy="$PATH"
3320 for ac_dir in $ac_dummy; do
3321   IFS=$ac_save_IFS
3322   test -z "$ac_dir" && ac_dir=.
3323   $as_executable_p "$ac_dir/$ac_word" || continue
3324 ac_cv_prog_AR="${ac_tool_prefix}ar"
3325 echo "$as_me:3325: found $ac_dir/$ac_word" >&5
3326 break
3327 done
3328
3329 fi
3330 fi
3331 AR=$ac_cv_prog_AR
3332 if test -n "$AR"; then
3333   echo "$as_me:3333: result: $AR" >&5
3334 echo "${ECHO_T}$AR" >&6
3335 else
3336   echo "$as_me:3336: result: no" >&5
3337 echo "${ECHO_T}no" >&6
3338 fi
3339
3340 fi
3341 if test -z "$ac_cv_prog_AR"; then
3342   ac_ct_AR=$AR
3343   # Extract the first word of "ar", so it can be a program name with args.
3344 set dummy ar; ac_word=$2
3345 echo "$as_me:3345: checking for $ac_word" >&5
3346 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3347 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
3348   echo $ECHO_N "(cached) $ECHO_C" >&6
3349 else
3350   if test -n "$ac_ct_AR"; then
3351   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
3352 else
3353   ac_save_IFS=$IFS; IFS=$ac_path_separator
3354 ac_dummy="$PATH"
3355 for ac_dir in $ac_dummy; do
3356   IFS=$ac_save_IFS
3357   test -z "$ac_dir" && ac_dir=.
3358   $as_executable_p "$ac_dir/$ac_word" || continue
3359 ac_cv_prog_ac_ct_AR="ar"
3360 echo "$as_me:3360: found $ac_dir/$ac_word" >&5
3361 break
3362 done
3363
3364   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
3365 fi
3366 fi
3367 ac_ct_AR=$ac_cv_prog_ac_ct_AR
3368 if test -n "$ac_ct_AR"; then
3369   echo "$as_me:3369: result: $ac_ct_AR" >&5
3370 echo "${ECHO_T}$ac_ct_AR" >&6
3371 else
3372   echo "$as_me:3372: result: no" >&5
3373 echo "${ECHO_T}no" >&6
3374 fi
3375
3376   AR=$ac_ct_AR
3377 else
3378   AR="$ac_cv_prog_AR"
3379 fi
3380
3381 if test -n "$ac_tool_prefix"; then
3382   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
3383 set dummy ${ac_tool_prefix}ar; ac_word=$2
3384 echo "$as_me:3384: checking for $ac_word" >&5
3385 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3386 if test "${ac_cv_prog_AR+set}" = set; then
3387   echo $ECHO_N "(cached) $ECHO_C" >&6
3388 else
3389   if test -n "$AR"; then
3390   ac_cv_prog_AR="$AR" # Let the user override the test.
3391 else
3392   ac_save_IFS=$IFS; IFS=$ac_path_separator
3393 ac_dummy="$PATH"
3394 for ac_dir in $ac_dummy; do
3395   IFS=$ac_save_IFS
3396   test -z "$ac_dir" && ac_dir=.
3397   $as_executable_p "$ac_dir/$ac_word" || continue
3398 ac_cv_prog_AR="${ac_tool_prefix}ar"
3399 echo "$as_me:3399: found $ac_dir/$ac_word" >&5
3400 break
3401 done
3402
3403 fi
3404 fi
3405 AR=$ac_cv_prog_AR
3406 if test -n "$AR"; then
3407   echo "$as_me:3407: result: $AR" >&5
3408 echo "${ECHO_T}$AR" >&6
3409 else
3410   echo "$as_me:3410: result: no" >&5
3411 echo "${ECHO_T}no" >&6
3412 fi
3413
3414 fi
3415 if test -z "$ac_cv_prog_AR"; then
3416   ac_ct_AR=$AR
3417   # Extract the first word of "ar", so it can be a program name with args.
3418 set dummy ar; ac_word=$2
3419 echo "$as_me:3419: checking for $ac_word" >&5
3420 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3421 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
3422   echo $ECHO_N "(cached) $ECHO_C" >&6
3423 else
3424   if test -n "$ac_ct_AR"; then
3425   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
3426 else
3427   ac_save_IFS=$IFS; IFS=$ac_path_separator
3428 ac_dummy="$PATH"
3429 for ac_dir in $ac_dummy; do
3430   IFS=$ac_save_IFS
3431   test -z "$ac_dir" && ac_dir=.
3432   $as_executable_p "$ac_dir/$ac_word" || continue
3433 ac_cv_prog_ac_ct_AR="ar"
3434 echo "$as_me:3434: found $ac_dir/$ac_word" >&5
3435 break
3436 done
3437
3438   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
3439 fi
3440 fi
3441 ac_ct_AR=$ac_cv_prog_ac_ct_AR
3442 if test -n "$ac_ct_AR"; then
3443   echo "$as_me:3443: result: $ac_ct_AR" >&5
3444 echo "${ECHO_T}$ac_ct_AR" >&6
3445 else
3446   echo "$as_me:3446: result: no" >&5
3447 echo "${ECHO_T}no" >&6
3448 fi
3449
3450   AR=$ac_ct_AR
3451 else
3452   AR="$ac_cv_prog_AR"
3453 fi
3454
3455 echo "$as_me:3455: checking for options to update archives" >&5
3456 echo $ECHO_N "checking for options to update archives... $ECHO_C" >&6
3457 if test "${cf_cv_ar_flags+set}" = set; then
3458   echo $ECHO_N "(cached) $ECHO_C" >&6
3459 else
3460
3461         cf_cv_ar_flags=unknown
3462         for cf_ar_flags in -curv curv -crv crv -cqv cqv -rv rv
3463         do
3464
3465                 # check if $ARFLAGS already contains this choice
3466                 if test "x$ARFLAGS" != "x" ; then
3467                         cf_check_ar_flags=`echo "x$ARFLAGS" | sed -e "s/$cf_ar_flags\$//" -e "s/$cf_ar_flags / /"`
3468                         if test "x$ARFLAGS" != "$cf_check_ar_flags" ; then
3469                                 cf_cv_ar_flags=
3470                                 break
3471                         fi
3472                 fi
3473
3474                 rm -f conftest.$ac_cv_objext
3475                 rm -f conftest.a
3476
3477                 cat >conftest.$ac_ext <<EOF
3478 #line 3478 "configure"
3479 int     testdata[3] = { 123, 456, 789 };
3480 EOF
3481                 if { (eval echo "$as_me:3481: \"$ac_compile\"") >&5
3482   (eval $ac_compile) 2>&5
3483   ac_status=$?
3484   echo "$as_me:3484: \$? = $ac_status" >&5
3485   (exit $ac_status); } ; then
3486                         echo "$AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext" >&5
3487                         $AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext 2>&5 1>/dev/null
3488                         if test -f conftest.a ; then
3489                                 cf_cv_ar_flags=$cf_ar_flags
3490                                 break
3491                         fi
3492                 else
3493                         test -n "$verbose" && echo "    cannot compile test-program" 1>&6
3494
3495 echo "${as_me:-configure}:3495: testing cannot compile test-program ..." 1>&5
3496
3497                         break
3498                 fi
3499         done
3500         rm -f conftest.a conftest.$ac_ext conftest.$ac_cv_objext
3501
3502 fi
3503 echo "$as_me:3503: result: $cf_cv_ar_flags" >&5
3504 echo "${ECHO_T}$cf_cv_ar_flags" >&6
3505
3506 if test -n "$ARFLAGS" ; then
3507         if test -n "$cf_cv_ar_flags" ; then
3508                 ARFLAGS="$ARFLAGS $cf_cv_ar_flags"
3509         fi
3510 else
3511         ARFLAGS=$cf_cv_ar_flags
3512 fi
3513
3514 echo "$as_me:3514: checking if you have specified an install-prefix" >&5
3515 echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
3516
3517 # Check whether --with-install-prefix or --without-install-prefix was given.
3518 if test "${with_install_prefix+set}" = set; then
3519   withval="$with_install_prefix"
3520   case "$withval" in #(vi
3521         yes|no) #(vi
3522                 ;;
3523         *)      DESTDIR="$withval"
3524                 ;;
3525         esac
3526 fi;
3527 echo "$as_me:3527: result: $DESTDIR" >&5
3528 echo "${ECHO_T}$DESTDIR" >&6
3529
3530 ###############################################################################
3531
3532 # If we're cross-compiling, allow the user to override the tools and their
3533 # options.  The configure script is oriented toward identifying the host
3534 # compiler, etc., but we need a build compiler to generate parts of the source.
3535
3536 if test "$cross_compiling" = yes ; then
3537
3538         # defaults that we might want to override
3539         : ${BUILD_CFLAGS:=''}
3540         : ${BUILD_CPPFLAGS:=''}
3541         : ${BUILD_LDFLAGS:=''}
3542         : ${BUILD_LIBS:=''}
3543         : ${BUILD_EXEEXT:='$x'}
3544         : ${BUILD_OBJEXT:='o'}
3545
3546 # Check whether --with-build-cc or --without-build-cc was given.
3547 if test "${with_build_cc+set}" = set; then
3548   withval="$with_build_cc"
3549   BUILD_CC="$withval"
3550 else
3551   for ac_prog in gcc cc cl
3552 do
3553   # Extract the first word of "$ac_prog", so it can be a program name with args.
3554 set dummy $ac_prog; ac_word=$2
3555 echo "$as_me:3555: checking for $ac_word" >&5
3556 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3557 if test "${ac_cv_prog_BUILD_CC+set}" = set; then
3558   echo $ECHO_N "(cached) $ECHO_C" >&6
3559 else
3560   if test -n "$BUILD_CC"; then
3561   ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
3562 else
3563   ac_save_IFS=$IFS; IFS=$ac_path_separator
3564 ac_dummy="$PATH"
3565 for ac_dir in $ac_dummy; do
3566   IFS=$ac_save_IFS
3567   test -z "$ac_dir" && ac_dir=.
3568   $as_executable_p "$ac_dir/$ac_word" || continue
3569 ac_cv_prog_BUILD_CC="$ac_prog"
3570 echo "$as_me:3570: found $ac_dir/$ac_word" >&5
3571 break
3572 done
3573
3574 fi
3575 fi
3576 BUILD_CC=$ac_cv_prog_BUILD_CC
3577 if test -n "$BUILD_CC"; then
3578   echo "$as_me:3578: result: $BUILD_CC" >&5
3579 echo "${ECHO_T}$BUILD_CC" >&6
3580 else
3581   echo "$as_me:3581: result: no" >&5
3582 echo "${ECHO_T}no" >&6
3583 fi
3584
3585   test -n "$BUILD_CC" && break
3586 done
3587
3588 fi;
3589         echo "$as_me:3589: checking for native build C compiler" >&5
3590 echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
3591         echo "$as_me:3591: result: $BUILD_CC" >&5
3592 echo "${ECHO_T}$BUILD_CC" >&6
3593
3594         echo "$as_me:3594: checking for native build C preprocessor" >&5
3595 echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
3596
3597 # Check whether --with-build-cpp or --without-build-cpp was given.
3598 if test "${with_build_cpp+set}" = set; then
3599   withval="$with_build_cpp"
3600   BUILD_CPP="$withval"
3601 else
3602   BUILD_CPP='${BUILD_CC} -E'
3603 fi;
3604         echo "$as_me:3604: result: $BUILD_CPP" >&5
3605 echo "${ECHO_T}$BUILD_CPP" >&6
3606
3607         echo "$as_me:3607: checking for native build C flags" >&5
3608 echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
3609
3610 # Check whether --with-build-cflags or --without-build-cflags was given.
3611 if test "${with_build_cflags+set}" = set; then
3612   withval="$with_build_cflags"
3613   BUILD_CFLAGS="$withval"
3614 fi;
3615         echo "$as_me:3615: result: $BUILD_CFLAGS" >&5
3616 echo "${ECHO_T}$BUILD_CFLAGS" >&6
3617
3618         echo "$as_me:3618: checking for native build C preprocessor-flags" >&5
3619 echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
3620
3621 # Check whether --with-build-cppflags or --without-build-cppflags was given.
3622 if test "${with_build_cppflags+set}" = set; then
3623   withval="$with_build_cppflags"
3624   BUILD_CPPFLAGS="$withval"
3625 fi;
3626         echo "$as_me:3626: result: $BUILD_CPPFLAGS" >&5
3627 echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
3628
3629         echo "$as_me:3629: checking for native build linker-flags" >&5
3630 echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
3631
3632 # Check whether --with-build-ldflags or --without-build-ldflags was given.
3633 if test "${with_build_ldflags+set}" = set; then
3634   withval="$with_build_ldflags"
3635   BUILD_LDFLAGS="$withval"
3636 fi;
3637         echo "$as_me:3637: result: $BUILD_LDFLAGS" >&5
3638 echo "${ECHO_T}$BUILD_LDFLAGS" >&6
3639
3640         echo "$as_me:3640: checking for native build linker-libraries" >&5
3641 echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
3642
3643 # Check whether --with-build-libs or --without-build-libs was given.
3644 if test "${with_build_libs+set}" = set; then
3645   withval="$with_build_libs"
3646   BUILD_LIBS="$withval"
3647 fi;
3648         echo "$as_me:3648: result: $BUILD_LIBS" >&5
3649 echo "${ECHO_T}$BUILD_LIBS" >&6
3650
3651         # this assumes we're on Unix.
3652         BUILD_EXEEXT=
3653         BUILD_OBJEXT=o
3654
3655         : ${BUILD_CC:='${CC}'}
3656
3657         if ( test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '${CC}' ) ; then
3658                 { { echo "$as_me:3658: error: Cross-build requires two compilers.
3659 Use --with-build-cc to specify the native compiler." >&5
3660 echo "$as_me: error: Cross-build requires two compilers.
3661 Use --with-build-cc to specify the native compiler." >&2;}
3662    { (exit 1); exit 1; }; }
3663         fi
3664
3665 else
3666         : ${BUILD_CC:='${CC}'}
3667         : ${BUILD_CPP:='${CPP}'}
3668         : ${BUILD_CFLAGS:='${CFLAGS}'}
3669         : ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
3670         : ${BUILD_LDFLAGS:='${LDFLAGS}'}
3671         : ${BUILD_LIBS:='${LIBS}'}
3672         : ${BUILD_EXEEXT:='$x'}
3673         : ${BUILD_OBJEXT:='o'}
3674 fi
3675
3676 ###############################################################################
3677
3678 ### Options to allow the user to specify the set of libraries which are used.
3679 ### Use "--without-normal --with-shared" to allow the default model to be
3680 ### shared, for example.
3681 cf_list_models=""
3682 echo "$as_me:3682: checking for specified models" >&5
3683 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
3684 test -z "$cf_list_models" && cf_list_models=normal
3685 echo "$as_me:3685: result: $cf_list_models" >&5
3686 echo "${ECHO_T}$cf_list_models" >&6
3687
3688 ### Use the first model as the default, and save its suffix for use in building
3689 ### up test-applications.
3690 echo "$as_me:3690: checking for default model" >&5
3691 echo $ECHO_N "checking for default model... $ECHO_C" >&6
3692 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
3693 echo "$as_me:3693: result: $DFT_LWR_MODEL" >&5
3694 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
3695
3696 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
3697
3698 echo "$as_me:3698: checking for specific curses-directory" >&5
3699 echo $ECHO_N "checking for specific curses-directory... $ECHO_C" >&6
3700
3701 # Check whether --with-curses-dir or --without-curses-dir was given.
3702 if test "${with_curses_dir+set}" = set; then
3703   withval="$with_curses_dir"
3704   cf_cv_curses_dir=$withval
3705 else
3706   cf_cv_curses_dir=no
3707 fi;
3708 echo "$as_me:3708: result: $cf_cv_curses_dir" >&5
3709 echo "${ECHO_T}$cf_cv_curses_dir" >&6
3710
3711 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
3712 then
3713
3714 if test "x$prefix" != xNONE; then
3715   cf_path_syntax="$prefix"
3716 else
3717   cf_path_syntax="$ac_default_prefix"
3718 fi
3719
3720 case ".$withval" in #(vi
3721 .\$\(*\)*|.\'*\'*) #(vi
3722   ;;
3723 ..|./*|.\\*) #(vi
3724   ;;
3725 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
3726   ;;
3727 .\${*prefix}*) #(vi
3728   eval withval="$withval"
3729   case ".$withval" in #(vi
3730   .NONE/*)
3731     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
3732     ;;
3733   esac
3734   ;; #(vi
3735 .no|.NONE/*)
3736   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
3737   ;;
3738 *)
3739   { { echo "$as_me:3739: error: expected a pathname, not \"$withval\"" >&5
3740 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
3741    { (exit 1); exit 1; }; }
3742   ;;
3743 esac
3744
3745         if test -d "$cf_cv_curses_dir"
3746         then
3747
3748 if test -n "$cf_cv_curses_dir/include" ; then
3749   for cf_add_incdir in $cf_cv_curses_dir/include
3750   do
3751         while test $cf_add_incdir != /usr/include
3752         do
3753           if test -d $cf_add_incdir
3754           then
3755                 cf_have_incdir=no
3756                 if test -n "$CFLAGS$CPPFLAGS" ; then
3757                   # a loop is needed to ensure we can add subdirs of existing dirs
3758                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
3759                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
3760                           cf_have_incdir=yes; break
3761                         fi
3762                   done
3763                 fi
3764
3765                 if test "$cf_have_incdir" = no ; then
3766                   if test "$cf_add_incdir" = /usr/local/include ; then
3767                         if test "$GCC" = yes
3768                         then
3769                           cf_save_CPPFLAGS=$CPPFLAGS
3770                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
3771                           cat >conftest.$ac_ext <<_ACEOF
3772 #line 3772 "configure"
3773 #include "confdefs.h"
3774 #include <stdio.h>
3775 int
3776 main ()
3777 {
3778 printf("Hello")
3779   ;
3780   return 0;
3781 }
3782 _ACEOF
3783 rm -f conftest.$ac_objext
3784 if { (eval echo "$as_me:3784: \"$ac_compile\"") >&5
3785   (eval $ac_compile) 2>&5
3786   ac_status=$?
3787   echo "$as_me:3787: \$? = $ac_status" >&5
3788   (exit $ac_status); } &&
3789          { ac_try='test -s conftest.$ac_objext'
3790   { (eval echo "$as_me:3790: \"$ac_try\"") >&5
3791   (eval $ac_try) 2>&5
3792   ac_status=$?
3793   echo "$as_me:3793: \$? = $ac_status" >&5
3794   (exit $ac_status); }; }; then
3795   :
3796 else
3797   echo "$as_me: failed program was:" >&5
3798 cat conftest.$ac_ext >&5
3799 cf_have_incdir=yes
3800 fi
3801 rm -f conftest.$ac_objext conftest.$ac_ext
3802                           CPPFLAGS=$cf_save_CPPFLAGS
3803                         fi
3804                   fi
3805                 fi
3806
3807                 if test "$cf_have_incdir" = no ; then
3808                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
3809
3810 echo "${as_me:-configure}:3810: testing adding $cf_add_incdir to include-path ..." 1>&5
3811
3812                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
3813
3814                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
3815                   test "$cf_top_incdir" = "$cf_add_incdir" && break
3816                   cf_add_incdir="$cf_top_incdir"
3817                 else
3818                   break
3819                 fi
3820           fi
3821         done
3822   done
3823 fi
3824
3825 if test -n "$cf_cv_curses_dir/lib" ; then
3826   for cf_add_libdir in $cf_cv_curses_dir/lib
3827   do
3828     if test $cf_add_libdir = /usr/lib ; then
3829       :
3830     elif test -d $cf_add_libdir
3831     then
3832       cf_have_libdir=no
3833       if test -n "$LDFLAGS$LIBS" ; then
3834         # a loop is needed to ensure we can add subdirs of existing dirs
3835         for cf_test_libdir in $LDFLAGS $LIBS ; do
3836           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
3837             cf_have_libdir=yes; break
3838           fi
3839         done
3840       fi
3841       if test "$cf_have_libdir" = no ; then
3842         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
3843
3844 echo "${as_me:-configure}:3844: testing adding $cf_add_libdir to library-path ..." 1>&5
3845
3846         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
3847       fi
3848     fi
3849   done
3850 fi
3851
3852         fi
3853 fi
3854
3855 echo "$as_me:3855: checking if you want wide-character code" >&5
3856 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
3857
3858 # Check whether --enable-widec or --disable-widec was given.
3859 if test "${enable_widec+set}" = set; then
3860   enableval="$enable_widec"
3861   with_widec=$enableval
3862 else
3863   with_widec=no
3864 fi;
3865 echo "$as_me:3865: result: $with_widec" >&5
3866 echo "${ECHO_T}$with_widec" >&6
3867 if test "$with_widec" = yes ; then
3868
3869 echo "$as_me:3869: checking for multibyte character support" >&5
3870 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
3871 if test "${cf_cv_utf8_lib+set}" = set; then
3872   echo $ECHO_N "(cached) $ECHO_C" >&6
3873 else
3874
3875         cf_save_LIBS="$LIBS"
3876         cat >conftest.$ac_ext <<_ACEOF
3877 #line 3877 "configure"
3878 #include "confdefs.h"
3879
3880 #include <stdlib.h>
3881 int
3882 main ()
3883 {
3884 putwc(0,0);
3885   ;
3886   return 0;
3887 }
3888 _ACEOF
3889 rm -f conftest.$ac_objext conftest$ac_exeext
3890 if { (eval echo "$as_me:3890: \"$ac_link\"") >&5
3891   (eval $ac_link) 2>&5
3892   ac_status=$?
3893   echo "$as_me:3893: \$? = $ac_status" >&5
3894   (exit $ac_status); } &&
3895          { ac_try='test -s conftest$ac_exeext'
3896   { (eval echo "$as_me:3896: \"$ac_try\"") >&5
3897   (eval $ac_try) 2>&5
3898   ac_status=$?
3899   echo "$as_me:3899: \$? = $ac_status" >&5
3900   (exit $ac_status); }; }; then
3901   cf_cv_utf8_lib=yes
3902 else
3903   echo "$as_me: failed program was:" >&5
3904 cat conftest.$ac_ext >&5
3905
3906 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
3907 # will be set on completion of the AC_TRY_LINK below.
3908 cf_cv_header_path_utf8=
3909 cf_cv_library_path_utf8=
3910
3911 echo "${as_me:-configure}:3911: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
3912
3913 cf_save_LIBS="$LIBS"
3914
3915 cat >conftest.$ac_ext <<_ACEOF
3916 #line 3916 "configure"
3917 #include "confdefs.h"
3918
3919 #include <libutf8.h>
3920 int
3921 main ()
3922 {
3923 putwc(0,0);
3924   ;
3925   return 0;
3926 }
3927 _ACEOF
3928 rm -f conftest.$ac_objext conftest$ac_exeext
3929 if { (eval echo "$as_me:3929: \"$ac_link\"") >&5
3930   (eval $ac_link) 2>&5
3931   ac_status=$?
3932   echo "$as_me:3932: \$? = $ac_status" >&5
3933   (exit $ac_status); } &&
3934          { ac_try='test -s conftest$ac_exeext'
3935   { (eval echo "$as_me:3935: \"$ac_try\"") >&5
3936   (eval $ac_try) 2>&5
3937   ac_status=$?
3938   echo "$as_me:3938: \$? = $ac_status" >&5
3939   (exit $ac_status); }; }; then
3940
3941         cf_cv_find_linkage_utf8=yes
3942         cf_cv_header_path_utf8=/usr/include
3943         cf_cv_library_path_utf8=/usr/lib
3944
3945 else
3946   echo "$as_me: failed program was:" >&5
3947 cat conftest.$ac_ext >&5
3948
3949 LIBS="-lutf8  $cf_save_LIBS"
3950
3951 cat >conftest.$ac_ext <<_ACEOF
3952 #line 3952 "configure"
3953 #include "confdefs.h"
3954
3955 #include <libutf8.h>
3956 int
3957 main ()
3958 {
3959 putwc(0,0);
3960   ;
3961   return 0;
3962 }
3963 _ACEOF
3964 rm -f conftest.$ac_objext conftest$ac_exeext
3965 if { (eval echo "$as_me:3965: \"$ac_link\"") >&5
3966   (eval $ac_link) 2>&5
3967   ac_status=$?
3968   echo "$as_me:3968: \$? = $ac_status" >&5
3969   (exit $ac_status); } &&
3970          { ac_try='test -s conftest$ac_exeext'
3971   { (eval echo "$as_me:3971: \"$ac_try\"") >&5
3972   (eval $ac_try) 2>&5
3973   ac_status=$?
3974   echo "$as_me:3974: \$? = $ac_status" >&5
3975   (exit $ac_status); }; }; then
3976
3977         cf_cv_find_linkage_utf8=yes
3978         cf_cv_header_path_utf8=/usr/include
3979         cf_cv_library_path_utf8=/usr/lib
3980         cf_cv_library_file_utf8="-lutf8"
3981
3982 else
3983   echo "$as_me: failed program was:" >&5
3984 cat conftest.$ac_ext >&5
3985
3986         cf_cv_find_linkage_utf8=no
3987         LIBS="$cf_save_LIBS"
3988
3989     test -n "$verbose" && echo "        find linkage for utf8 library" 1>&6
3990
3991 echo "${as_me:-configure}:3991: testing find linkage for utf8 library ..." 1>&5
3992
3993 echo "${as_me:-configure}:3993: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
3994
3995     cf_save_CPPFLAGS="$CPPFLAGS"
3996     cf_test_CPPFLAGS="$CPPFLAGS"
3997
3998 cf_search=
3999
4000 # collect the current set of include-directories from compiler flags
4001 cf_header_path_list=""
4002 if test -n "${CFLAGS}${CPPFLAGS}" ; then
4003         for cf_header_path in $CPPFLAGS $CFLAGS
4004         do
4005                 case $cf_header_path in #(vi
4006                 -I*)
4007                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
4008
4009 test "$cf_header_path" != "NONE" && \
4010 test -d "$cf_header_path" && \
4011  {
4012         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
4013         test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
4014         test -d $cf_header_path/include/utf8 &&       cf_search="$cf_search $cf_header_path/include/utf8"
4015         test -d $cf_header_path/include/utf8/include &&    cf_search="$cf_search $cf_header_path/include/utf8/include"
4016         test -d $cf_header_path/utf8/include &&       cf_search="$cf_search $cf_header_path/utf8/include"
4017         test -d $cf_header_path/utf8/include/utf8 &&    cf_search="$cf_search $cf_header_path/utf8/include/utf8"
4018 }
4019
4020                         cf_header_path_list="$cf_header_path_list $cf_search"
4021                         ;;
4022                 esac
4023         done
4024 fi
4025
4026 # add the variations for the package we are looking for
4027
4028 cf_search=
4029
4030 test "/usr" != "$prefix" && \
4031 test -d "/usr" && \
4032 (test $prefix = NONE || test "/usr" != "$prefix") && {
4033         test -n "$verbose" && echo "    ... testing for include-directories under /usr"
4034         test -d /usr/include &&          cf_search="$cf_search /usr/include"
4035         test -d /usr/include/utf8 &&       cf_search="$cf_search /usr/include/utf8"
4036         test -d /usr/include/utf8/include &&    cf_search="$cf_search /usr/include/utf8/include"
4037         test -d /usr/utf8/include &&       cf_search="$cf_search /usr/utf8/include"
4038         test -d /usr/utf8/include/utf8 &&    cf_search="$cf_search /usr/utf8/include/utf8"
4039 }
4040
4041 test "$prefix" != "NONE" && \
4042 test -d "$prefix" && \
4043  {
4044         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
4045         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
4046         test -d $prefix/include/utf8 &&       cf_search="$cf_search $prefix/include/utf8"
4047         test -d $prefix/include/utf8/include &&    cf_search="$cf_search $prefix/include/utf8/include"
4048         test -d $prefix/utf8/include &&       cf_search="$cf_search $prefix/utf8/include"
4049         test -d $prefix/utf8/include/utf8 &&    cf_search="$cf_search $prefix/utf8/include/utf8"
4050 }
4051
4052 test "/usr/local" != "$prefix" && \
4053 test -d "/usr/local" && \
4054 (test $prefix = NONE || test "/usr/local" != "$prefix") && {
4055         test -n "$verbose" && echo "    ... testing for include-directories under /usr/local"
4056         test -d /usr/local/include &&          cf_search="$cf_search /usr/local/include"
4057         test -d /usr/local/include/utf8 &&       cf_search="$cf_search /usr/local/include/utf8"
4058         test -d /usr/local/include/utf8/include &&    cf_search="$cf_search /usr/local/include/utf8/include"
4059         test -d /usr/local/utf8/include &&       cf_search="$cf_search /usr/local/utf8/include"
4060         test -d /usr/local/utf8/include/utf8 &&    cf_search="$cf_search /usr/local/utf8/include/utf8"
4061 }
4062
4063 test "/opt" != "$prefix" && \
4064 test -d "/opt" && \
4065 (test $prefix = NONE || test "/opt" != "$prefix") && {
4066         test -n "$verbose" && echo "    ... testing for include-directories under /opt"
4067         test -d /opt/include &&          cf_search="$cf_search /opt/include"
4068         test -d /opt/include/utf8 &&       cf_search="$cf_search /opt/include/utf8"
4069         test -d /opt/include/utf8/include &&    cf_search="$cf_search /opt/include/utf8/include"
4070         test -d /opt/utf8/include &&       cf_search="$cf_search /opt/utf8/include"
4071         test -d /opt/utf8/include/utf8 &&    cf_search="$cf_search /opt/utf8/include/utf8"
4072 }
4073
4074 test "$HOME" != "$prefix" && \
4075 test -d "$HOME" && \
4076 (test $prefix = NONE || test "$HOME" != "$prefix") && {
4077         test -n "$verbose" && echo "    ... testing for include-directories under $HOME"
4078         test -d $HOME/include &&          cf_search="$cf_search $HOME/include"
4079         test -d $HOME/include/utf8 &&       cf_search="$cf_search $HOME/include/utf8"
4080         test -d $HOME/include/utf8/include &&    cf_search="$cf_search $HOME/include/utf8/include"
4081         test -d $HOME/utf8/include &&       cf_search="$cf_search $HOME/utf8/include"
4082         test -d $HOME/utf8/include/utf8 &&    cf_search="$cf_search $HOME/utf8/include/utf8"
4083 }
4084
4085 test "$includedir" != NONE && \
4086 test "$includedir" != "/usr/include" && \
4087 test -d "$includedir" && {
4088         test -d $includedir &&    cf_search="$cf_search $includedir"
4089         test -d $includedir/utf8 && cf_search="$cf_search $includedir/utf8"
4090 }
4091
4092 test "$oldincludedir" != NONE && \
4093 test "$oldincludedir" != "/usr/include" && \
4094 test -d "$oldincludedir" && {
4095         test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
4096         test -d $oldincludedir/utf8 && cf_search="$cf_search $oldincludedir/utf8"
4097 }
4098
4099 cf_search="$cf_search $cf_header_path_list"
4100
4101     for cf_cv_header_path_utf8 in $cf_search
4102     do
4103       if test -d $cf_cv_header_path_utf8 ; then
4104         test -n "$verbose" && echo "    ... testing $cf_cv_header_path_utf8" 1>&6
4105
4106 echo "${as_me:-configure}:4106: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
4107
4108         CPPFLAGS="$cf_save_CPPFLAGS -I$cf_cv_header_path_utf8"
4109         cat >conftest.$ac_ext <<_ACEOF
4110 #line 4110 "configure"
4111 #include "confdefs.h"
4112
4113 #include <libutf8.h>
4114 int
4115 main ()
4116 {
4117 putwc(0,0);
4118   ;
4119   return 0;
4120 }
4121 _ACEOF
4122 rm -f conftest.$ac_objext
4123 if { (eval echo "$as_me:4123: \"$ac_compile\"") >&5
4124   (eval $ac_compile) 2>&5
4125   ac_status=$?
4126   echo "$as_me:4126: \$? = $ac_status" >&5
4127   (exit $ac_status); } &&
4128          { ac_try='test -s conftest.$ac_objext'
4129   { (eval echo "$as_me:4129: \"$ac_try\"") >&5
4130   (eval $ac_try) 2>&5
4131   ac_status=$?
4132   echo "$as_me:4132: \$? = $ac_status" >&5
4133   (exit $ac_status); }; }; then
4134
4135             test -n "$verbose" && echo "        ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
4136
4137 echo "${as_me:-configure}:4137: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
4138
4139             cf_cv_find_linkage_utf8=maybe
4140             cf_test_CPPFLAGS="$CPPFLAGS"
4141             break
4142 else
4143   echo "$as_me: failed program was:" >&5
4144 cat conftest.$ac_ext >&5
4145
4146             CPPFLAGS="$cf_save_CPPFLAGS"
4147
4148 fi
4149 rm -f conftest.$ac_objext conftest.$ac_ext
4150       fi
4151     done
4152
4153     if test "$cf_cv_find_linkage_utf8" = maybe ; then
4154
4155 echo "${as_me:-configure}:4155: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
4156
4157       cf_save_LIBS="$LIBS"
4158       cf_save_LDFLAGS="$LDFLAGS"
4159
4160       if test "$cf_cv_find_linkage_utf8" != yes ; then
4161
4162 cf_search=
4163 cf_library_path_list=""
4164 if test -n "${LDFLAGS}${LIBS}" ; then
4165         for cf_library_path in $LDFLAGS $LIBS
4166         do
4167                 case $cf_library_path in #(vi
4168                 -L*)
4169                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
4170
4171 test "$cf_library_path" != "NONE" && \
4172 test -d "$cf_library_path" && \
4173  {
4174         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
4175         test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
4176         test -d $cf_library_path/lib/utf8 &&       cf_search="$cf_search $cf_library_path/lib/utf8"
4177         test -d $cf_library_path/lib/utf8/lib &&    cf_search="$cf_search $cf_library_path/lib/utf8/lib"
4178         test -d $cf_library_path/utf8/lib &&       cf_search="$cf_search $cf_library_path/utf8/lib"
4179         test -d $cf_library_path/utf8/lib/utf8 &&    cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
4180 }
4181
4182                         cf_library_path_list="$cf_library_path_list $cf_search"
4183                         ;;
4184                 esac
4185         done
4186 fi
4187
4188 cf_search=
4189
4190 test "/usr" != "$prefix" && \
4191 test -d "/usr" && \
4192 (test $prefix = NONE || test "/usr" != "$prefix") && {
4193         test -n "$verbose" && echo "    ... testing for lib-directories under /usr"
4194         test -d /usr/lib &&          cf_search="$cf_search /usr/lib"
4195         test -d /usr/lib/utf8 &&       cf_search="$cf_search /usr/lib/utf8"
4196         test -d /usr/lib/utf8/lib &&    cf_search="$cf_search /usr/lib/utf8/lib"
4197         test -d /usr/utf8/lib &&       cf_search="$cf_search /usr/utf8/lib"
4198         test -d /usr/utf8/lib/utf8 &&    cf_search="$cf_search /usr/utf8/lib/utf8"
4199 }
4200
4201 test "$prefix" != "NONE" && \
4202 test -d "$prefix" && \
4203  {
4204         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
4205         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
4206         test -d $prefix/lib/utf8 &&       cf_search="$cf_search $prefix/lib/utf8"
4207         test -d $prefix/lib/utf8/lib &&    cf_search="$cf_search $prefix/lib/utf8/lib"
4208         test -d $prefix/utf8/lib &&       cf_search="$cf_search $prefix/utf8/lib"
4209         test -d $prefix/utf8/lib/utf8 &&    cf_search="$cf_search $prefix/utf8/lib/utf8"
4210 }
4211
4212 test "/usr/local" != "$prefix" && \
4213 test -d "/usr/local" && \
4214 (test $prefix = NONE || test "/usr/local" != "$prefix") && {
4215         test -n "$verbose" && echo "    ... testing for lib-directories under /usr/local"
4216         test -d /usr/local/lib &&          cf_search="$cf_search /usr/local/lib"
4217         test -d /usr/local/lib/utf8 &&       cf_search="$cf_search /usr/local/lib/utf8"
4218         test -d /usr/local/lib/utf8/lib &&    cf_search="$cf_search /usr/local/lib/utf8/lib"
4219         test -d /usr/local/utf8/lib &&       cf_search="$cf_search /usr/local/utf8/lib"
4220         test -d /usr/local/utf8/lib/utf8 &&    cf_search="$cf_search /usr/local/utf8/lib/utf8"
4221 }
4222
4223 test "/opt" != "$prefix" && \
4224 test -d "/opt" && \
4225 (test $prefix = NONE || test "/opt" != "$prefix") && {
4226         test -n "$verbose" && echo "    ... testing for lib-directories under /opt"
4227         test -d /opt/lib &&          cf_search="$cf_search /opt/lib"
4228         test -d /opt/lib/utf8 &&       cf_search="$cf_search /opt/lib/utf8"
4229         test -d /opt/lib/utf8/lib &&    cf_search="$cf_search /opt/lib/utf8/lib"
4230         test -d /opt/utf8/lib &&       cf_search="$cf_search /opt/utf8/lib"
4231         test -d /opt/utf8/lib/utf8 &&    cf_search="$cf_search /opt/utf8/lib/utf8"
4232 }
4233
4234 test "$HOME" != "$prefix" && \
4235 test -d "$HOME" && \
4236 (test $prefix = NONE || test "$HOME" != "$prefix") && {
4237         test -n "$verbose" && echo "    ... testing for lib-directories under $HOME"
4238         test -d $HOME/lib &&          cf_search="$cf_search $HOME/lib"
4239         test -d $HOME/lib/utf8 &&       cf_search="$cf_search $HOME/lib/utf8"
4240         test -d $HOME/lib/utf8/lib &&    cf_search="$cf_search $HOME/lib/utf8/lib"
4241         test -d $HOME/utf8/lib &&       cf_search="$cf_search $HOME/utf8/lib"
4242         test -d $HOME/utf8/lib/utf8 &&    cf_search="$cf_search $HOME/utf8/lib/utf8"
4243 }
4244
4245 cf_search="$cf_library_path_list $cf_search"
4246
4247         for cf_cv_library_path_utf8 in $cf_search
4248         do
4249           if test -d $cf_cv_library_path_utf8 ; then
4250             test -n "$verbose" && echo "        ... testing $cf_cv_library_path_utf8" 1>&6
4251
4252 echo "${as_me:-configure}:4252: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
4253
4254             CPPFLAGS="$cf_test_CPPFLAGS"
4255             LIBS="-lutf8  $cf_save_LIBS"
4256             LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
4257             cat >conftest.$ac_ext <<_ACEOF
4258 #line 4258 "configure"
4259 #include "confdefs.h"
4260
4261 #include <libutf8.h>
4262 int
4263 main ()
4264 {
4265 putwc(0,0);
4266   ;
4267   return 0;
4268 }
4269 _ACEOF
4270 rm -f conftest.$ac_objext conftest$ac_exeext
4271 if { (eval echo "$as_me:4271: \"$ac_link\"") >&5
4272   (eval $ac_link) 2>&5
4273   ac_status=$?
4274   echo "$as_me:4274: \$? = $ac_status" >&5
4275   (exit $ac_status); } &&
4276          { ac_try='test -s conftest$ac_exeext'
4277   { (eval echo "$as_me:4277: \"$ac_try\"") >&5
4278   (eval $ac_try) 2>&5
4279   ac_status=$?
4280   echo "$as_me:4280: \$? = $ac_status" >&5
4281   (exit $ac_status); }; }; then
4282
4283                 test -n "$verbose" && echo "    ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
4284
4285 echo "${as_me:-configure}:4285: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
4286
4287                 cf_cv_find_linkage_utf8=yes
4288                 cf_cv_library_file_utf8="-lutf8"
4289                 break
4290 else
4291   echo "$as_me: failed program was:" >&5
4292 cat conftest.$ac_ext >&5
4293
4294                 CPPFLAGS="$cf_save_CPPFLAGS"
4295                 LIBS="$cf_save_LIBS"
4296                 LDFLAGS="$cf_save_LDFLAGS"
4297
4298 fi
4299 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4300           fi
4301         done
4302         CPPFLAGS="$cf_save_CPPFLAGS"
4303         LDFLAGS="$cf_save_LDFLAGS"
4304       fi
4305
4306     else
4307       cf_cv_find_linkage_utf8=no
4308     fi
4309
4310 fi
4311 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4312
4313 fi
4314 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4315
4316 LIBS="$cf_save_LIBS"
4317
4318 if test "$cf_cv_find_linkage_utf8" = yes ; then
4319 cf_cv_utf8_lib=add-on
4320 else
4321 cf_cv_utf8_lib=no
4322 fi
4323
4324 fi
4325 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4326 fi
4327 echo "$as_me:4327: result: $cf_cv_utf8_lib" >&5
4328 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
4329
4330 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
4331 # ncurses/ncursesw:
4332 if test "$cf_cv_utf8_lib" = "add-on" ; then
4333         cat >>confdefs.h <<\EOF
4334 #define HAVE_LIBUTF8_H 1
4335 EOF
4336
4337 if test -n "$cf_cv_header_path_utf8" ; then
4338   for cf_add_incdir in $cf_cv_header_path_utf8
4339   do
4340         while test $cf_add_incdir != /usr/include
4341         do
4342           if test -d $cf_add_incdir
4343           then
4344                 cf_have_incdir=no
4345                 if test -n "$CFLAGS$CPPFLAGS" ; then
4346                   # a loop is needed to ensure we can add subdirs of existing dirs
4347                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
4348                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
4349                           cf_have_incdir=yes; break
4350                         fi
4351                   done
4352                 fi
4353
4354                 if test "$cf_have_incdir" = no ; then
4355                   if test "$cf_add_incdir" = /usr/local/include ; then
4356                         if test "$GCC" = yes
4357                         then
4358                           cf_save_CPPFLAGS=$CPPFLAGS
4359                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4360                           cat >conftest.$ac_ext <<_ACEOF
4361 #line 4361 "configure"
4362 #include "confdefs.h"
4363 #include <stdio.h>
4364 int
4365 main ()
4366 {
4367 printf("Hello")
4368   ;
4369   return 0;
4370 }
4371 _ACEOF
4372 rm -f conftest.$ac_objext
4373 if { (eval echo "$as_me:4373: \"$ac_compile\"") >&5
4374   (eval $ac_compile) 2>&5
4375   ac_status=$?
4376   echo "$as_me:4376: \$? = $ac_status" >&5
4377   (exit $ac_status); } &&
4378          { ac_try='test -s conftest.$ac_objext'
4379   { (eval echo "$as_me:4379: \"$ac_try\"") >&5
4380   (eval $ac_try) 2>&5
4381   ac_status=$?
4382   echo "$as_me:4382: \$? = $ac_status" >&5
4383   (exit $ac_status); }; }; then
4384   :
4385 else
4386   echo "$as_me: failed program was:" >&5
4387 cat conftest.$ac_ext >&5
4388 cf_have_incdir=yes
4389 fi
4390 rm -f conftest.$ac_objext conftest.$ac_ext
4391                           CPPFLAGS=$cf_save_CPPFLAGS
4392                         fi
4393                   fi
4394                 fi
4395
4396                 if test "$cf_have_incdir" = no ; then
4397                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
4398
4399 echo "${as_me:-configure}:4399: testing adding $cf_add_incdir to include-path ..." 1>&5
4400
4401                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4402
4403                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
4404                   test "$cf_top_incdir" = "$cf_add_incdir" && break
4405                   cf_add_incdir="$cf_top_incdir"
4406                 else
4407                   break
4408                 fi
4409           fi
4410         done
4411   done
4412 fi
4413
4414 if test -n "$cf_cv_library_path_utf8" ; then
4415   for cf_add_libdir in $cf_cv_library_path_utf8
4416   do
4417     if test $cf_add_libdir = /usr/lib ; then
4418       :
4419     elif test -d $cf_add_libdir
4420     then
4421       cf_have_libdir=no
4422       if test -n "$LDFLAGS$LIBS" ; then
4423         # a loop is needed to ensure we can add subdirs of existing dirs
4424         for cf_test_libdir in $LDFLAGS $LIBS ; do
4425           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
4426             cf_have_libdir=yes; break
4427           fi
4428         done
4429       fi
4430       if test "$cf_have_libdir" = no ; then
4431         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
4432
4433 echo "${as_me:-configure}:4433: testing adding $cf_add_libdir to library-path ..." 1>&5
4434
4435         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
4436       fi
4437     fi
4438   done
4439 fi
4440
4441         LIBS="$cf_cv_library_file_utf8 $LIBS"
4442 fi
4443
4444 cf_ncuconfig_root=ncursesw
4445
4446 echo "Looking for ${cf_ncuconfig_root}-config"
4447 for ac_prog in ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
4448 do
4449   # Extract the first word of "$ac_prog", so it can be a program name with args.
4450 set dummy $ac_prog; ac_word=$2
4451 echo "$as_me:4451: checking for $ac_word" >&5
4452 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4453 if test "${ac_cv_path_NCURSES_CONFIG+set}" = set; then
4454   echo $ECHO_N "(cached) $ECHO_C" >&6
4455 else
4456   case $NCURSES_CONFIG in
4457   [\\/]* | ?:[\\/]*)
4458   ac_cv_path_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test with a path.
4459   ;;
4460   *)
4461   ac_save_IFS=$IFS; IFS=$ac_path_separator
4462 ac_dummy="$PATH"
4463 for ac_dir in $ac_dummy; do
4464   IFS=$ac_save_IFS
4465   test -z "$ac_dir" && ac_dir=.
4466   if $as_executable_p "$ac_dir/$ac_word"; then
4467    ac_cv_path_NCURSES_CONFIG="$ac_dir/$ac_word"
4468    echo "$as_me:4468: found $ac_dir/$ac_word" >&5
4469    break
4470 fi
4471 done
4472
4473   ;;
4474 esac
4475 fi
4476 NCURSES_CONFIG=$ac_cv_path_NCURSES_CONFIG
4477
4478 if test -n "$NCURSES_CONFIG"; then
4479   echo "$as_me:4479: result: $NCURSES_CONFIG" >&5
4480 echo "${ECHO_T}$NCURSES_CONFIG" >&6
4481 else
4482   echo "$as_me:4482: result: no" >&5
4483 echo "${ECHO_T}no" >&6
4484 fi
4485
4486   test -n "$NCURSES_CONFIG" && break
4487 done
4488 test -n "$NCURSES_CONFIG" || NCURSES_CONFIG="none"
4489
4490 if test "$NCURSES_CONFIG" != none ; then
4491
4492 CPPFLAGS="$CPPFLAGS `$NCURSES_CONFIG --cflags`"
4493 LIBS="`$NCURSES_CONFIG --libs` $LIBS"
4494
4495 # even with config script, some packages use no-override for curses.h
4496
4497 echo "$as_me:4497: checking if we have identified curses headers" >&5
4498 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
4499 if test "${cf_cv_ncurses_header+set}" = set; then
4500   echo $ECHO_N "(cached) $ECHO_C" >&6
4501 else
4502
4503 cf_cv_ncurses_header=none
4504 for cf_header in  \
4505     ncursesw/curses.h \
4506         ncursesw/ncurses.h \
4507         curses.h \
4508         ncurses.h
4509 do
4510 cat >conftest.$ac_ext <<_ACEOF
4511 #line 4511 "configure"
4512 #include "confdefs.h"
4513 #include <${cf_header}>
4514 int
4515 main ()
4516 {
4517 initscr(); tgoto("?", 0,0)
4518   ;
4519   return 0;
4520 }
4521 _ACEOF
4522 rm -f conftest.$ac_objext
4523 if { (eval echo "$as_me:4523: \"$ac_compile\"") >&5
4524   (eval $ac_compile) 2>&5
4525   ac_status=$?
4526   echo "$as_me:4526: \$? = $ac_status" >&5
4527   (exit $ac_status); } &&
4528          { ac_try='test -s conftest.$ac_objext'
4529   { (eval echo "$as_me:4529: \"$ac_try\"") >&5
4530   (eval $ac_try) 2>&5
4531   ac_status=$?
4532   echo "$as_me:4532: \$? = $ac_status" >&5
4533   (exit $ac_status); }; }; then
4534   cf_cv_ncurses_header=$cf_header; break
4535 else
4536   echo "$as_me: failed program was:" >&5
4537 cat conftest.$ac_ext >&5
4538 fi
4539 rm -f conftest.$ac_objext conftest.$ac_ext
4540 done
4541
4542 fi
4543 echo "$as_me:4543: result: $cf_cv_ncurses_header" >&5
4544 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
4545
4546 if test "$cf_cv_ncurses_header" = none ; then
4547         { { echo "$as_me:4547: error: No curses header-files found" >&5
4548 echo "$as_me: error: No curses header-files found" >&2;}
4549    { (exit 1); exit 1; }; }
4550 fi
4551
4552 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
4553
4554 for ac_header in $cf_cv_ncurses_header
4555 do
4556 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4557 echo "$as_me:4557: checking for $ac_header" >&5
4558 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4559 if eval "test \"\${$as_ac_Header+set}\" = set"; then
4560   echo $ECHO_N "(cached) $ECHO_C" >&6
4561 else
4562   cat >conftest.$ac_ext <<_ACEOF
4563 #line 4563 "configure"
4564 #include "confdefs.h"
4565 #include <$ac_header>
4566 _ACEOF
4567 if { (eval echo "$as_me:4567: \"$ac_cpp conftest.$ac_ext\"") >&5
4568   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4569   ac_status=$?
4570   egrep -v '^ *\+' conftest.er1 >conftest.err
4571   rm -f conftest.er1
4572   cat conftest.err >&5
4573   echo "$as_me:4573: \$? = $ac_status" >&5
4574   (exit $ac_status); } >/dev/null; then
4575   if test -s conftest.err; then
4576     ac_cpp_err=$ac_c_preproc_warn_flag
4577   else
4578     ac_cpp_err=
4579   fi
4580 else
4581   ac_cpp_err=yes
4582 fi
4583 if test -z "$ac_cpp_err"; then
4584   eval "$as_ac_Header=yes"
4585 else
4586   echo "$as_me: failed program was:" >&5
4587   cat conftest.$ac_ext >&5
4588   eval "$as_ac_Header=no"
4589 fi
4590 rm -f conftest.err conftest.$ac_ext
4591 fi
4592 echo "$as_me:4592: result: `eval echo '${'$as_ac_Header'}'`" >&5
4593 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4594 if test `eval echo '${'$as_ac_Header'}'` = yes; then
4595   cat >>confdefs.h <<EOF
4596 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4597 EOF
4598
4599 fi
4600 done
4601
4602 cat >>confdefs.h <<\EOF
4603 #define NCURSES 1
4604 EOF
4605
4606 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
4607
4608 cat >>confdefs.h <<EOF
4609 #define $cf_nculib_ROOT 1
4610 EOF
4611
4612 cf_cv_ncurses_version=`$NCURSES_CONFIG --version`
4613
4614 else
4615
4616 cf_ncuhdr_root=ncursesw
4617
4618 test -n "$cf_cv_curses_dir" && \
4619 test "$cf_cv_curses_dir" != "no" && { \
4620
4621 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
4622   for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
4623   do
4624         while test $cf_add_incdir != /usr/include
4625         do
4626           if test -d $cf_add_incdir
4627           then
4628                 cf_have_incdir=no
4629                 if test -n "$CFLAGS$CPPFLAGS" ; then
4630                   # a loop is needed to ensure we can add subdirs of existing dirs
4631                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
4632                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
4633                           cf_have_incdir=yes; break
4634                         fi
4635                   done
4636                 fi
4637
4638                 if test "$cf_have_incdir" = no ; then
4639                   if test "$cf_add_incdir" = /usr/local/include ; then
4640                         if test "$GCC" = yes
4641                         then
4642                           cf_save_CPPFLAGS=$CPPFLAGS
4643                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4644                           cat >conftest.$ac_ext <<_ACEOF
4645 #line 4645 "configure"
4646 #include "confdefs.h"
4647 #include <stdio.h>
4648 int
4649 main ()
4650 {
4651 printf("Hello")
4652   ;
4653   return 0;
4654 }
4655 _ACEOF
4656 rm -f conftest.$ac_objext
4657 if { (eval echo "$as_me:4657: \"$ac_compile\"") >&5
4658   (eval $ac_compile) 2>&5
4659   ac_status=$?
4660   echo "$as_me:4660: \$? = $ac_status" >&5
4661   (exit $ac_status); } &&
4662          { ac_try='test -s conftest.$ac_objext'
4663   { (eval echo "$as_me:4663: \"$ac_try\"") >&5
4664   (eval $ac_try) 2>&5
4665   ac_status=$?
4666   echo "$as_me:4666: \$? = $ac_status" >&5
4667   (exit $ac_status); }; }; then
4668   :
4669 else
4670   echo "$as_me: failed program was:" >&5
4671 cat conftest.$ac_ext >&5
4672 cf_have_incdir=yes
4673 fi
4674 rm -f conftest.$ac_objext conftest.$ac_ext
4675                           CPPFLAGS=$cf_save_CPPFLAGS
4676                         fi
4677                   fi
4678                 fi
4679
4680                 if test "$cf_have_incdir" = no ; then
4681                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
4682
4683 echo "${as_me:-configure}:4683: testing adding $cf_add_incdir to include-path ..." 1>&5
4684
4685                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4686
4687                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
4688                   test "$cf_top_incdir" = "