]> ncurses.scripts.mit.edu Git - ncurses.git/blob - Ada95/configure
ncurses 5.7 - patch 20100501
[ncurses.git] / Ada95 / configure
1 #! /bin/sh
2 # From configure.in Revision: 1.11 .
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated by Autoconf 2.52.20081225.
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   --enable-mixed-case     tic should assume mixed-case filenames
650   --with-install-prefix   prefixes actual install-location ($DESTDIR)
651 Build-Tools Needed to Compile Temporary Applications for Cross-compiling:
652   --with-build-cc=XXX     the build C compiler ($BUILD_CC)
653   --with-build-cpp=XXX    the build C preprocessor ($BUILD_CPP)
654   --with-build-cflags=XXX the build C compiler-flags ($BUILD_CFLAGS)
655   --with-build-cppflags=XXX the build C preprocessor-flags ($BUILD_CPPFLAGS)
656   --with-build-ldflags=XXX the build linker-flags ($BUILD_LDFLAGS)
657   --with-build-libs=XXX   the build libraries (${BUILD_LIBS})
658 Options to Specify the Libraries Built/Used:
659   --enable-widec          compile with wide-char/UTF-8 code
660   --with-curses-dir=DIR   directory in which (n)curses is installed
661   --with-shlib-version=X  Specify rel or abi version for shared libs
662 Fine-Tuning Your Configuration:
663   --enable-broken_linker  compile with broken-linker support code
664   --disable-largefile     omit support for large files
665   --with-rcs-ids          compile-in RCS identifiers
666 Extensions:
667   --disable-ext-funcs     disable function-extensions
668   --enable-const          compile with extra/non-standard const
669 Development Code:
670   --without-develop       disable development options
671 Experimental Code:
672   --with-pthread          use POSIX thread library
673   --enable-weak-symbols   enable weak-symbols for pthreads
674   --enable-reentrant      compile with experimental reentrant code
675   --with-wrap-prefix=XXX  override prefix used for public variables
676 Testing/development Options:
677   --enable-echo           build: display "compiling" commands (default)
678   --enable-warnings       build: turn on GCC compiler warnings
679   --enable-assertions     test: turn on generation of assertion code
680   --enable-expanded       test: generate functions for certain macros
681   --disable-macros        test: use functions rather than macros
682   --with-trace            test: add trace() function to all models of ncurses
683 Ada95 Binding Options:
684   --with-ada-compiler=CMD specify Ada95 compiler command (default gnatmake)
685   --with-ada-include=DIR  Ada includes are in DIR (default: PREFIX/lib/ada/adainclude)
686   --with-ada-objects=DIR  Ada objects are in DIR (default: PREFIX/lib/ada/adalib)
687
688 Some influential environment variables:
689   CC          C compiler command
690   CFLAGS      C compiler flags
691   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
692               nonstandard directory <lib dir>
693   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
694               headers in a nonstandard directory <include dir>
695   CPP         C preprocessor
696
697 Use these variables to override the choices made by `configure' or to help
698 it to find libraries and programs with nonstandard names/locations.
699
700 EOF
701 fi
702
703 if test "$ac_init_help" = "recursive"; then
704   # If there are subdirs, report their specific --help.
705   ac_popdir=`pwd`
706   for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
707     cd $ac_subdir
708     # A "../" for each directory in /$ac_subdir.
709     ac_dots=`echo $ac_subdir |
710              sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
711
712     case $srcdir in
713     .) # No --srcdir option.  We are building in place.
714       ac_sub_srcdir=$srcdir ;;
715     [\\/]* | ?:[\\/]* ) # Absolute path.
716       ac_sub_srcdir=$srcdir/$ac_subdir ;;
717     *) # Relative path.
718       ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;;
719     esac
720
721     # Check for guested configure; otherwise get Cygnus style configure.
722     if test -f $ac_sub_srcdir/configure.gnu; then
723       echo
724       $SHELL $ac_sub_srcdir/configure.gnu  --help=recursive
725     elif test -f $ac_sub_srcdir/configure; then
726       echo
727       $SHELL $ac_sub_srcdir/configure  --help=recursive
728     elif test -f $ac_sub_srcdir/configure.ac ||
729            test -f $ac_sub_srcdir/configure.in; then
730       echo
731       $ac_configure --help
732     else
733       echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
734     fi
735     cd $ac_popdir
736   done
737 fi
738
739 test -n "$ac_init_help" && exit 0
740 if $ac_init_version; then
741   cat <<\EOF
742
743 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
744 Free Software Foundation, Inc.
745 This configure script is free software; the Free Software Foundation
746 gives unlimited permission to copy, distribute and modify it.
747 EOF
748   exit 0
749 fi
750 exec 5>config.log
751 cat >&5 <<EOF
752 This file contains any messages produced by compilers while
753 running configure, to aid debugging if configure makes a mistake.
754
755 It was created by $as_me, which was
756 generated by GNU Autoconf 2.52.20081225.  Invocation command line was
757
758   $ $0 $@
759
760 EOF
761 {
762 cat <<_ASUNAME
763 ## ---------- ##
764 ## Platform.  ##
765 ## ---------- ##
766
767 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
768 uname -m = `(uname -m) 2>/dev/null || echo unknown`
769 uname -r = `(uname -r) 2>/dev/null || echo unknown`
770 uname -s = `(uname -s) 2>/dev/null || echo unknown`
771 uname -v = `(uname -v) 2>/dev/null || echo unknown`
772
773 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
774 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
775
776 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
777 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
778 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
779 hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
780 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
781 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
782 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
783
784 PATH = $PATH
785
786 _ASUNAME
787 } >&5
788
789 cat >&5 <<EOF
790 ## ------------ ##
791 ## Core tests.  ##
792 ## ------------ ##
793
794 EOF
795
796 # Keep a trace of the command line.
797 # Strip out --no-create and --no-recursion so they do not pile up.
798 # Also quote any args containing shell meta-characters.
799 ac_configure_args=
800 ac_sep=
801 for ac_arg
802 do
803   case $ac_arg in
804   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
805   | --no-cr | --no-c) ;;
806   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
807   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
808   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
809     ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
810     ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
811     ac_sep=" " ;;
812   *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
813      ac_sep=" " ;;
814   esac
815   # Get rid of the leading space.
816 done
817
818 # When interrupted or exit'd, cleanup temporary files, and complete
819 # config.log.  We remove comments because anyway the quotes in there
820 # would cause problems or look ugly.
821 trap 'exit_status=$?
822   # Save into config.log some information that might help in debugging.
823   echo >&5
824   echo "## ----------------- ##" >&5
825   echo "## Cache variables.  ##" >&5
826   echo "## ----------------- ##" >&5
827   echo >&5
828   # The following way of writing the cache mishandles newlines in values,
829 {
830   (set) 2>&1 |
831     case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
832     *ac_space=\ *)
833       sed -n \
834         "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
835           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
836       ;;
837     *)
838       sed -n \
839         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
840       ;;
841     esac;
842 } >&5
843   sed "/^$/d" confdefs.h >conftest.log
844   if test -s conftest.log; then
845     echo >&5
846     echo "## ------------ ##" >&5
847     echo "## confdefs.h.  ##" >&5
848     echo "## ------------ ##" >&5
849     echo >&5
850     cat conftest.log >&5
851   fi
852   (echo; echo) >&5
853   test "$ac_signal" != 0 &&
854     echo "$as_me: caught signal $ac_signal" >&5
855   echo "$as_me: exit $exit_status" >&5
856   rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
857     exit $exit_status
858      ' 0
859 for ac_signal in 1 2 13 15; do
860   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
861 done
862 ac_signal=0
863
864 # confdefs.h avoids OS command line length limits that DEFS can exceed.
865 rm -rf conftest* confdefs.h
866 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
867 echo >confdefs.h
868
869 # Let the site file select an alternate cache file if it wants to.
870 # Prefer explicitly selected file to automatically selected ones.
871 if test -z "$CONFIG_SITE"; then
872   if test "x$prefix" != xNONE; then
873     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
874   else
875     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
876   fi
877 fi
878 for ac_site_file in $CONFIG_SITE; do
879   if test -r "$ac_site_file"; then
880     { echo "$as_me:880: loading site script $ac_site_file" >&5
881 echo "$as_me: loading site script $ac_site_file" >&6;}
882     cat "$ac_site_file" >&5
883     . "$ac_site_file"
884   fi
885 done
886
887 if test -r "$cache_file"; then
888   # Some versions of bash will fail to source /dev/null (special
889   # files actually), so we avoid doing that.
890   if test -f "$cache_file"; then
891     { echo "$as_me:891: loading cache $cache_file" >&5
892 echo "$as_me: loading cache $cache_file" >&6;}
893     case $cache_file in
894       [\\/]* | ?:[\\/]* ) . $cache_file;;
895       *)                      . ./$cache_file;;
896     esac
897   fi
898 else
899   { echo "$as_me:899: creating cache $cache_file" >&5
900 echo "$as_me: creating cache $cache_file" >&6;}
901   >$cache_file
902 fi
903
904 # Check that the precious variables saved in the cache have kept the same
905 # value.
906 ac_cache_corrupted=false
907 for ac_var in `(set) 2>&1 |
908                sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
909   eval ac_old_set=\$ac_cv_env_${ac_var}_set
910   eval ac_new_set=\$ac_env_${ac_var}_set
911   eval ac_old_val="\$ac_cv_env_${ac_var}_value"
912   eval ac_new_val="\$ac_env_${ac_var}_value"
913   case $ac_old_set,$ac_new_set in
914     set,)
915       { echo "$as_me:915: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
916 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
917       ac_cache_corrupted=: ;;
918     ,set)
919       { echo "$as_me:919: error: \`$ac_var' was not set in the previous run" >&5
920 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
921       ac_cache_corrupted=: ;;
922     ,);;
923     *)
924       if test "x$ac_old_val" != "x$ac_new_val"; then
925         { echo "$as_me:925: error: \`$ac_var' has changed since the previous run:" >&5
926 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
927         { echo "$as_me:927:   former value:  $ac_old_val" >&5
928 echo "$as_me:   former value:  $ac_old_val" >&2;}
929         { echo "$as_me:929:   current value: $ac_new_val" >&5
930 echo "$as_me:   current value: $ac_new_val" >&2;}
931         ac_cache_corrupted=:
932       fi;;
933   esac
934   # Pass precious variables to config.status.  It doesn't matter if
935   # we pass some twice (in addition to the command line arguments).
936   if test "$ac_new_set" = set; then
937     case $ac_new_val in
938     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
939       ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
940       ac_configure_args="$ac_configure_args '$ac_arg'"
941       ;;
942     *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
943        ;;
944     esac
945   fi
946 done
947 if $ac_cache_corrupted; then
948   { echo "$as_me:948: error: changes in the environment can compromise the build" >&5
949 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
950   { { echo "$as_me:950: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
951 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
952    { (exit 1); exit 1; }; }
953 fi
954
955 ac_ext=c
956 ac_cpp='$CPP $CPPFLAGS'
957 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
958 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
959 ac_compiler_gnu=$ac_cv_c_compiler_gnu
960 ac_main_return=return
961
962 case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
963   *c*,-n*) ECHO_N= ECHO_C='
964 ' ECHO_T='      ' ;;
965   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
966   *)      ECHO_N= ECHO_C='\c' ECHO_T= ;;
967 esac
968 echo "#! $SHELL" >conftest.sh
969 echo  "exit 0"   >>conftest.sh
970 chmod +x conftest.sh
971 if { (echo "$as_me:971: PATH=\".;.\"; conftest.sh") >&5
972   (PATH=".;."; conftest.sh) 2>&5
973   ac_status=$?
974   echo "$as_me:974: \$? = $ac_status" >&5
975   (exit $ac_status); }; then
976   ac_path_separator=';'
977 else
978   ac_path_separator=:
979 fi
980 PATH_SEPARATOR="$ac_path_separator"
981 rm -f conftest.sh
982
983 ac_config_headers="$ac_config_headers include/ncurses_cfg.h:include/ncurses_cfg.hin"
984
985 top_builddir=`pwd`
986
987 ac_aux_dir=
988 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
989   if test -f $ac_dir/install-sh; then
990     ac_aux_dir=$ac_dir
991     ac_install_sh="$ac_aux_dir/install-sh -c"
992     break
993   elif test -f $ac_dir/install.sh; then
994     ac_aux_dir=$ac_dir
995     ac_install_sh="$ac_aux_dir/install.sh -c"
996     break
997   elif test -f $ac_dir/shtool; then
998     ac_aux_dir=$ac_dir
999     ac_install_sh="$ac_aux_dir/shtool install -c"
1000     break
1001   fi
1002 done
1003 if test -z "$ac_aux_dir"; then
1004   { { echo "$as_me:1004: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1005 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1006    { (exit 1); exit 1; }; }
1007 fi
1008 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1009 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1010 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1011
1012 # Make sure we can run config.sub.
1013 $ac_config_sub sun4 >/dev/null 2>&1 ||
1014   { { echo "$as_me:1014: error: cannot run $ac_config_sub" >&5
1015 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1016    { (exit 1); exit 1; }; }
1017
1018 echo "$as_me:1018: checking build system type" >&5
1019 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1020 if test "${ac_cv_build+set}" = set; then
1021   echo $ECHO_N "(cached) $ECHO_C" >&6
1022 else
1023   ac_cv_build_alias=$build_alias
1024 test -z "$ac_cv_build_alias" &&
1025   ac_cv_build_alias=`$ac_config_guess`
1026 test -z "$ac_cv_build_alias" &&
1027   { { echo "$as_me:1027: error: cannot guess build type; you must specify one" >&5
1028 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1029    { (exit 1); exit 1; }; }
1030 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1031   { { echo "$as_me:1031: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1032 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1033    { (exit 1); exit 1; }; }
1034
1035 fi
1036 echo "$as_me:1036: result: $ac_cv_build" >&5
1037 echo "${ECHO_T}$ac_cv_build" >&6
1038 build=$ac_cv_build
1039 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1040 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1041 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1042
1043 echo "$as_me:1043: checking host system type" >&5
1044 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1045 if test "${ac_cv_host+set}" = set; then
1046   echo $ECHO_N "(cached) $ECHO_C" >&6
1047 else
1048   ac_cv_host_alias=$host_alias
1049 test -z "$ac_cv_host_alias" &&
1050   ac_cv_host_alias=$ac_cv_build_alias
1051 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1052   { { echo "$as_me:1052: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1053 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1054    { (exit 1); exit 1; }; }
1055
1056 fi
1057 echo "$as_me:1057: result: $ac_cv_host" >&5
1058 echo "${ECHO_T}$ac_cv_host" >&6
1059 host=$ac_cv_host
1060 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1061 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1062 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1063
1064 if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then
1065         echo "$as_me:1065: checking target system type" >&5
1066 echo $ECHO_N "checking target system type... $ECHO_C" >&6
1067 if test "${ac_cv_target+set}" = set; then
1068   echo $ECHO_N "(cached) $ECHO_C" >&6
1069 else
1070   ac_cv_target_alias=$target_alias
1071 test "x$ac_cv_target_alias" = "x" &&
1072   ac_cv_target_alias=$ac_cv_host_alias
1073 ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
1074   { { echo "$as_me:1074: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1075 echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1076    { (exit 1); exit 1; }; }
1077
1078 fi
1079 echo "$as_me:1079: result: $ac_cv_target" >&5
1080 echo "${ECHO_T}$ac_cv_target" >&6
1081 target=$ac_cv_target
1082 target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1083 target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1084 target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1085
1086 # The aliases save the names the user supplied, while $host etc.
1087 # will get canonicalized.
1088 test -n "$target_alias" &&
1089   test "$program_prefix$program_suffix$program_transform_name" = \
1090     NONENONEs,x,x, &&
1091   program_prefix=${target_alias}-
1092         system_name="$host_os"
1093 else
1094         system_name="`(uname -s -r) 2>/dev/null`"
1095         if test -z "$system_name" ; then
1096                 system_name="`(hostname) 2>/dev/null`"
1097         fi
1098 fi
1099 test -n "$system_name" && cat >>confdefs.h <<EOF
1100 #define SYSTEM_NAME "$system_name"
1101 EOF
1102
1103 if test "${cf_cv_system_name+set}" = set; then
1104   echo $ECHO_N "(cached) $ECHO_C" >&6
1105 else
1106   cf_cv_system_name="$system_name"
1107 fi
1108
1109 test -z "$system_name" && system_name="$cf_cv_system_name"
1110 test -n "$cf_cv_system_name" && echo "$as_me:1110: result: Configuring for $cf_cv_system_name" >&5
1111 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1112
1113 if test ".$system_name" != ".$cf_cv_system_name" ; then
1114         echo "$as_me:1114: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1115 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1116         { { echo "$as_me:1116: error: \"Please remove config.cache and try again.\"" >&5
1117 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1118    { (exit 1); exit 1; }; }
1119 fi
1120
1121 # Check whether --with-system-type or --without-system-type was given.
1122 if test "${with_system_type+set}" = set; then
1123   withval="$with_system_type"
1124   { echo "$as_me:1124: WARNING: overriding system type to $withval" >&5
1125 echo "$as_me: WARNING: overriding system type to $withval" >&2;}
1126  cf_cv_system_name=$withval
1127 fi;
1128
1129 ###     Save the given $CFLAGS to allow user-override.
1130 cf_user_CFLAGS="$CFLAGS"
1131
1132 ###     Default install-location
1133
1134 echo "$as_me:1134: checking for prefix" >&5
1135 echo $ECHO_N "checking for prefix... $ECHO_C" >&6
1136 if test "x$prefix" = "xNONE" ; then
1137         case "$cf_cv_system_name" in
1138                 # non-vendor systems don't have a conflict
1139         openbsd*|freebsd*|linux*|cygwin*|k*bsd*-gnu)
1140                 prefix=/usr
1141                 ;;
1142         *)      prefix=$ac_default_prefix
1143                 ;;
1144         esac
1145 fi
1146 echo "$as_me:1146: result: $prefix" >&5
1147 echo "${ECHO_T}$prefix" >&6
1148
1149 if test "x$prefix" = "xNONE" ; then
1150 echo "$as_me:1150: checking for default include-directory" >&5
1151 echo $ECHO_N "checking for default include-directory... $ECHO_C" >&6
1152 test -n "$verbose" && echo 1>&6
1153 for cf_symbol in \
1154         $includedir \
1155         $includedir/ncurses \
1156         $prefix/include \
1157         $prefix/include/ncurses \
1158         /usr/local/include \
1159         /usr/local/include/ncurses \
1160         /usr/include \
1161         /usr/include/ncurses
1162 do
1163         cf_dir=`eval echo $cf_symbol`
1164         if test -f $cf_dir/curses.h ; then
1165         if ( fgrep NCURSES_VERSION $cf_dir/curses.h 2>&1 >/dev/null ) ; then
1166                 includedir="$cf_symbol"
1167                 test -n "$verbose"  && echo $ac_n "     found " 1>&6
1168                 break
1169         fi
1170         fi
1171         test -n "$verbose"  && echo "   tested $cf_dir" 1>&6
1172 done
1173 echo "$as_me:1173: result: $includedir" >&5
1174 echo "${ECHO_T}$includedir" >&6
1175 fi
1176
1177 ###     Checks for programs.
1178 ac_ext=c
1179 ac_cpp='$CPP $CPPFLAGS'
1180 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1181 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1182 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1183 ac_main_return=return
1184 if test -n "$ac_tool_prefix"; then
1185   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1186 set dummy ${ac_tool_prefix}gcc; ac_word=$2
1187 echo "$as_me:1187: checking for $ac_word" >&5
1188 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1189 if test "${ac_cv_prog_CC+set}" = set; then
1190   echo $ECHO_N "(cached) $ECHO_C" >&6
1191 else
1192   if test -n "$CC"; then
1193   ac_cv_prog_CC="$CC" # Let the user override the test.
1194 else
1195   ac_save_IFS=$IFS; IFS=$ac_path_separator
1196 ac_dummy="$PATH"
1197 for ac_dir in $ac_dummy; do
1198   IFS=$ac_save_IFS
1199   test -z "$ac_dir" && ac_dir=.
1200   $as_executable_p "$ac_dir/$ac_word" || continue
1201 ac_cv_prog_CC="${ac_tool_prefix}gcc"
1202 echo "$as_me:1202: found $ac_dir/$ac_word" >&5
1203 break
1204 done
1205
1206 fi
1207 fi
1208 CC=$ac_cv_prog_CC
1209 if test -n "$CC"; then
1210   echo "$as_me:1210: result: $CC" >&5
1211 echo "${ECHO_T}$CC" >&6
1212 else
1213   echo "$as_me:1213: result: no" >&5
1214 echo "${ECHO_T}no" >&6
1215 fi
1216
1217 fi
1218 if test -z "$ac_cv_prog_CC"; then
1219   ac_ct_CC=$CC
1220   # Extract the first word of "gcc", so it can be a program name with args.
1221 set dummy gcc; ac_word=$2
1222 echo "$as_me:1222: checking for $ac_word" >&5
1223 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1224 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1225   echo $ECHO_N "(cached) $ECHO_C" >&6
1226 else
1227   if test -n "$ac_ct_CC"; then
1228   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1229 else
1230   ac_save_IFS=$IFS; IFS=$ac_path_separator
1231 ac_dummy="$PATH"
1232 for ac_dir in $ac_dummy; do
1233   IFS=$ac_save_IFS
1234   test -z "$ac_dir" && ac_dir=.
1235   $as_executable_p "$ac_dir/$ac_word" || continue
1236 ac_cv_prog_ac_ct_CC="gcc"
1237 echo "$as_me:1237: found $ac_dir/$ac_word" >&5
1238 break
1239 done
1240
1241 fi
1242 fi
1243 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1244 if test -n "$ac_ct_CC"; then
1245   echo "$as_me:1245: result: $ac_ct_CC" >&5
1246 echo "${ECHO_T}$ac_ct_CC" >&6
1247 else
1248   echo "$as_me:1248: result: no" >&5
1249 echo "${ECHO_T}no" >&6
1250 fi
1251
1252   CC=$ac_ct_CC
1253 else
1254   CC="$ac_cv_prog_CC"
1255 fi
1256
1257 if test -z "$CC"; then
1258   if test -n "$ac_tool_prefix"; then
1259   # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1260 set dummy ${ac_tool_prefix}cc; ac_word=$2
1261 echo "$as_me:1261: checking for $ac_word" >&5
1262 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1263 if test "${ac_cv_prog_CC+set}" = set; then
1264   echo $ECHO_N "(cached) $ECHO_C" >&6
1265 else
1266   if test -n "$CC"; then
1267   ac_cv_prog_CC="$CC" # Let the user override the test.
1268 else
1269   ac_save_IFS=$IFS; IFS=$ac_path_separator
1270 ac_dummy="$PATH"
1271 for ac_dir in $ac_dummy; do
1272   IFS=$ac_save_IFS
1273   test -z "$ac_dir" && ac_dir=.
1274   $as_executable_p "$ac_dir/$ac_word" || continue
1275 ac_cv_prog_CC="${ac_tool_prefix}cc"
1276 echo "$as_me:1276: found $ac_dir/$ac_word" >&5
1277 break
1278 done
1279
1280 fi
1281 fi
1282 CC=$ac_cv_prog_CC
1283 if test -n "$CC"; then
1284   echo "$as_me:1284: result: $CC" >&5
1285 echo "${ECHO_T}$CC" >&6
1286 else
1287   echo "$as_me:1287: result: no" >&5
1288 echo "${ECHO_T}no" >&6
1289 fi
1290
1291 fi
1292 if test -z "$ac_cv_prog_CC"; then
1293   ac_ct_CC=$CC
1294   # Extract the first word of "cc", so it can be a program name with args.
1295 set dummy cc; ac_word=$2
1296 echo "$as_me:1296: checking for $ac_word" >&5
1297 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1298 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1299   echo $ECHO_N "(cached) $ECHO_C" >&6
1300 else
1301   if test -n "$ac_ct_CC"; then
1302   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1303 else
1304   ac_save_IFS=$IFS; IFS=$ac_path_separator
1305 ac_dummy="$PATH"
1306 for ac_dir in $ac_dummy; do
1307   IFS=$ac_save_IFS
1308   test -z "$ac_dir" && ac_dir=.
1309   $as_executable_p "$ac_dir/$ac_word" || continue
1310 ac_cv_prog_ac_ct_CC="cc"
1311 echo "$as_me:1311: found $ac_dir/$ac_word" >&5
1312 break
1313 done
1314
1315 fi
1316 fi
1317 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1318 if test -n "$ac_ct_CC"; then
1319   echo "$as_me:1319: result: $ac_ct_CC" >&5
1320 echo "${ECHO_T}$ac_ct_CC" >&6
1321 else
1322   echo "$as_me:1322: result: no" >&5
1323 echo "${ECHO_T}no" >&6
1324 fi
1325
1326   CC=$ac_ct_CC
1327 else
1328   CC="$ac_cv_prog_CC"
1329 fi
1330
1331 fi
1332 if test -z "$CC"; then
1333   # Extract the first word of "cc", so it can be a program name with args.
1334 set dummy cc; ac_word=$2
1335 echo "$as_me:1335: checking for $ac_word" >&5
1336 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1337 if test "${ac_cv_prog_CC+set}" = set; then
1338   echo $ECHO_N "(cached) $ECHO_C" >&6
1339 else
1340   if test -n "$CC"; then
1341   ac_cv_prog_CC="$CC" # Let the user override the test.
1342 else
1343   ac_prog_rejected=no
1344   ac_save_IFS=$IFS; IFS=$ac_path_separator
1345 ac_dummy="$PATH"
1346 for ac_dir in $ac_dummy; do
1347   IFS=$ac_save_IFS
1348   test -z "$ac_dir" && ac_dir=.
1349   $as_executable_p "$ac_dir/$ac_word" || continue
1350 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1351   ac_prog_rejected=yes
1352   continue
1353 fi
1354 ac_cv_prog_CC="cc"
1355 echo "$as_me:1355: found $ac_dir/$ac_word" >&5
1356 break
1357 done
1358
1359 if test $ac_prog_rejected = yes; then
1360   # We found a bogon in the path, so make sure we never use it.
1361   set dummy $ac_cv_prog_CC
1362   shift
1363   if test $# != 0; then
1364     # We chose a different compiler from the bogus one.
1365     # However, it has the same basename, so the bogon will be chosen
1366     # first if we set CC to just the basename; use the full file name.
1367     shift
1368     set dummy "$ac_dir/$ac_word" ${1+"$@"}
1369     shift
1370     ac_cv_prog_CC="$@"
1371   fi
1372 fi
1373 fi
1374 fi
1375 CC=$ac_cv_prog_CC
1376 if test -n "$CC"; then
1377   echo "$as_me:1377: result: $CC" >&5
1378 echo "${ECHO_T}$CC" >&6
1379 else
1380   echo "$as_me:1380: result: no" >&5
1381 echo "${ECHO_T}no" >&6
1382 fi
1383
1384 fi
1385 if test -z "$CC"; then
1386   if test -n "$ac_tool_prefix"; then
1387   for ac_prog in cl
1388   do
1389     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1390 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1391 echo "$as_me:1391: checking for $ac_word" >&5
1392 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1393 if test "${ac_cv_prog_CC+set}" = set; then
1394   echo $ECHO_N "(cached) $ECHO_C" >&6
1395 else
1396   if test -n "$CC"; then
1397   ac_cv_prog_CC="$CC" # Let the user override the test.
1398 else
1399   ac_save_IFS=$IFS; IFS=$ac_path_separator
1400 ac_dummy="$PATH"
1401 for ac_dir in $ac_dummy; do
1402   IFS=$ac_save_IFS
1403   test -z "$ac_dir" && ac_dir=.
1404   $as_executable_p "$ac_dir/$ac_word" || continue
1405 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1406 echo "$as_me:1406: found $ac_dir/$ac_word" >&5
1407 break
1408 done
1409
1410 fi
1411 fi
1412 CC=$ac_cv_prog_CC
1413 if test -n "$CC"; then
1414   echo "$as_me:1414: result: $CC" >&5
1415 echo "${ECHO_T}$CC" >&6
1416 else
1417   echo "$as_me:1417: result: no" >&5
1418 echo "${ECHO_T}no" >&6
1419 fi
1420
1421     test -n "$CC" && break
1422   done
1423 fi
1424 if test -z "$CC"; then
1425   ac_ct_CC=$CC
1426   for ac_prog in cl
1427 do
1428   # Extract the first word of "$ac_prog", so it can be a program name with args.
1429 set dummy $ac_prog; ac_word=$2
1430 echo "$as_me:1430: checking for $ac_word" >&5
1431 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1432 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1433   echo $ECHO_N "(cached) $ECHO_C" >&6
1434 else
1435   if test -n "$ac_ct_CC"; then
1436   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1437 else
1438   ac_save_IFS=$IFS; IFS=$ac_path_separator
1439 ac_dummy="$PATH"
1440 for ac_dir in $ac_dummy; do
1441   IFS=$ac_save_IFS
1442   test -z "$ac_dir" && ac_dir=.
1443   $as_executable_p "$ac_dir/$ac_word" || continue
1444 ac_cv_prog_ac_ct_CC="$ac_prog"
1445 echo "$as_me:1445: found $ac_dir/$ac_word" >&5
1446 break
1447 done
1448
1449 fi
1450 fi
1451 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1452 if test -n "$ac_ct_CC"; then
1453   echo "$as_me:1453: result: $ac_ct_CC" >&5
1454 echo "${ECHO_T}$ac_ct_CC" >&6
1455 else
1456   echo "$as_me:1456: result: no" >&5
1457 echo "${ECHO_T}no" >&6
1458 fi
1459
1460   test -n "$ac_ct_CC" && break
1461 done
1462
1463   CC=$ac_ct_CC
1464 fi
1465
1466 fi
1467
1468 test -z "$CC" && { { echo "$as_me:1468: error: no acceptable cc found in \$PATH" >&5
1469 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1470    { (exit 1); exit 1; }; }
1471
1472 # Provide some information about the compiler.
1473 echo "$as_me:1473:" \
1474      "checking for C compiler version" >&5
1475 ac_compiler=`set X $ac_compile; echo $2`
1476 { (eval echo "$as_me:1476: \"$ac_compiler --version </dev/null >&5\"") >&5
1477   (eval $ac_compiler --version </dev/null >&5) 2>&5
1478   ac_status=$?
1479   echo "$as_me:1479: \$? = $ac_status" >&5
1480   (exit $ac_status); }
1481 { (eval echo "$as_me:1481: \"$ac_compiler -v </dev/null >&5\"") >&5
1482   (eval $ac_compiler -v </dev/null >&5) 2>&5
1483   ac_status=$?
1484   echo "$as_me:1484: \$? = $ac_status" >&5
1485   (exit $ac_status); }
1486 { (eval echo "$as_me:1486: \"$ac_compiler -V </dev/null >&5\"") >&5
1487   (eval $ac_compiler -V </dev/null >&5) 2>&5
1488   ac_status=$?
1489   echo "$as_me:1489: \$? = $ac_status" >&5
1490   (exit $ac_status); }
1491
1492 cat >conftest.$ac_ext <<_ACEOF
1493 #line 1493 "configure"
1494 #include "confdefs.h"
1495
1496 int
1497 main ()
1498 {
1499
1500   ;
1501   return 0;
1502 }
1503 _ACEOF
1504 ac_clean_files_save=$ac_clean_files
1505 ac_clean_files="$ac_clean_files a.out a.exe"
1506 # Try to create an executable without -o first, disregard a.out.
1507 # It will help us diagnose broken compilers, and finding out an intuition
1508 # of exeext.
1509 echo "$as_me:1509: checking for C compiler default output" >&5
1510 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1511 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1512 if { (eval echo "$as_me:1512: \"$ac_link_default\"") >&5
1513   (eval $ac_link_default) 2>&5
1514   ac_status=$?
1515   echo "$as_me:1515: \$? = $ac_status" >&5
1516   (exit $ac_status); }; then
1517   # Find the output, starting from the most likely.  This scheme is
1518 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1519 # resort.
1520 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1521                 ls a.out conftest 2>/dev/null;
1522                 ls a.* conftest.* 2>/dev/null`; do
1523   case $ac_file in
1524     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1525     a.out ) # We found the default executable, but exeext='' is most
1526             # certainly right.
1527             break;;
1528     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1529           # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1530           export ac_cv_exeext
1531           break;;
1532     * ) break;;
1533   esac
1534 done
1535 else
1536   echo "$as_me: failed program was:" >&5
1537 cat conftest.$ac_ext >&5
1538 { { echo "$as_me:1538: error: C compiler cannot create executables" >&5
1539 echo "$as_me: error: C compiler cannot create executables" >&2;}
1540    { (exit 77); exit 77; }; }
1541 fi
1542
1543 ac_exeext=$ac_cv_exeext
1544 echo "$as_me:1544: result: $ac_file" >&5
1545 echo "${ECHO_T}$ac_file" >&6
1546
1547 # Check the compiler produces executables we can run.  If not, either
1548 # the compiler is broken, or we cross compile.
1549 echo "$as_me:1549: checking whether the C compiler works" >&5
1550 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1551 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1552 # If not cross compiling, check that we can run a simple program.
1553 if test "$cross_compiling" != yes; then
1554   if { ac_try='./$ac_file'
1555   { (eval echo "$as_me:1555: \"$ac_try\"") >&5
1556   (eval $ac_try) 2>&5
1557   ac_status=$?
1558   echo "$as_me:1558: \$? = $ac_status" >&5
1559   (exit $ac_status); }; }; then
1560     cross_compiling=no
1561   else
1562     if test "$cross_compiling" = maybe; then
1563         cross_compiling=yes
1564     else
1565         { { echo "$as_me:1565: error: cannot run C compiled programs.
1566 If you meant to cross compile, use \`--host'." >&5
1567 echo "$as_me: error: cannot run C compiled programs.
1568 If you meant to cross compile, use \`--host'." >&2;}
1569    { (exit 1); exit 1; }; }
1570     fi
1571   fi
1572 fi
1573 echo "$as_me:1573: result: yes" >&5
1574 echo "${ECHO_T}yes" >&6
1575
1576 rm -f a.out a.exe conftest$ac_cv_exeext
1577 ac_clean_files=$ac_clean_files_save
1578 # Check the compiler produces executables we can run.  If not, either
1579 # the compiler is broken, or we cross compile.
1580 echo "$as_me:1580: checking whether we are cross compiling" >&5
1581 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1582 echo "$as_me:1582: result: $cross_compiling" >&5
1583 echo "${ECHO_T}$cross_compiling" >&6
1584
1585 echo "$as_me:1585: checking for executable suffix" >&5
1586 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1587 if { (eval echo "$as_me:1587: \"$ac_link\"") >&5
1588   (eval $ac_link) 2>&5
1589   ac_status=$?
1590   echo "$as_me:1590: \$? = $ac_status" >&5
1591   (exit $ac_status); }; then
1592   # If both `conftest.exe' and `conftest' are `present' (well, observable)
1593 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
1594 # work properly (i.e., refer to `conftest.exe'), while it won't with
1595 # `rm'.
1596 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1597   case $ac_file in
1598     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1599     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1600           export ac_cv_exeext
1601           break;;
1602     * ) break;;
1603   esac
1604 done
1605 else
1606   { { echo "$as_me:1606: error: cannot compute EXEEXT: cannot compile and link" >&5
1607 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1608    { (exit 1); exit 1; }; }
1609 fi
1610
1611 rm -f conftest$ac_cv_exeext
1612 echo "$as_me:1612: result: $ac_cv_exeext" >&5
1613 echo "${ECHO_T}$ac_cv_exeext" >&6
1614
1615 rm -f conftest.$ac_ext
1616 EXEEXT=$ac_cv_exeext
1617 ac_exeext=$EXEEXT
1618 echo "$as_me:1618: checking for object suffix" >&5
1619 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1620 if test "${ac_cv_objext+set}" = set; then
1621   echo $ECHO_N "(cached) $ECHO_C" >&6
1622 else
1623   cat >conftest.$ac_ext <<_ACEOF
1624 #line 1624 "configure"
1625 #include "confdefs.h"
1626
1627 int
1628 main ()
1629 {
1630
1631   ;
1632   return 0;
1633 }
1634 _ACEOF
1635 rm -f conftest.o conftest.obj
1636 if { (eval echo "$as_me:1636: \"$ac_compile\"") >&5
1637   (eval $ac_compile) 2>&5
1638   ac_status=$?
1639   echo "$as_me:1639: \$? = $ac_status" >&5
1640   (exit $ac_status); }; then
1641   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1642   case $ac_file in
1643     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
1644     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1645        break;;
1646   esac
1647 done
1648 else
1649   echo "$as_me: failed program was:" >&5
1650 cat conftest.$ac_ext >&5
1651 { { echo "$as_me:1651: error: cannot compute OBJEXT: cannot compile" >&5
1652 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1653    { (exit 1); exit 1; }; }
1654 fi
1655
1656 rm -f conftest.$ac_cv_objext conftest.$ac_ext
1657 fi
1658 echo "$as_me:1658: result: $ac_cv_objext" >&5
1659 echo "${ECHO_T}$ac_cv_objext" >&6
1660 OBJEXT=$ac_cv_objext
1661 ac_objext=$OBJEXT
1662 echo "$as_me:1662: checking whether we are using the GNU C compiler" >&5
1663 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1664 if test "${ac_cv_c_compiler_gnu+set}" = set; then
1665   echo $ECHO_N "(cached) $ECHO_C" >&6
1666 else
1667   cat >conftest.$ac_ext <<_ACEOF
1668 #line 1668 "configure"
1669 #include "confdefs.h"
1670
1671 int
1672 main ()
1673 {
1674 #ifndef __GNUC__
1675        choke me
1676 #endif
1677
1678   ;
1679   return 0;
1680 }
1681 _ACEOF
1682 rm -f conftest.$ac_objext
1683 if { (eval echo "$as_me:1683: \"$ac_compile\"") >&5
1684   (eval $ac_compile) 2>&5
1685   ac_status=$?
1686   echo "$as_me:1686: \$? = $ac_status" >&5
1687   (exit $ac_status); } &&
1688          { ac_try='test -s conftest.$ac_objext'
1689   { (eval echo "$as_me:1689: \"$ac_try\"") >&5
1690   (eval $ac_try) 2>&5
1691   ac_status=$?
1692   echo "$as_me:1692: \$? = $ac_status" >&5
1693   (exit $ac_status); }; }; then
1694   ac_compiler_gnu=yes
1695 else
1696   echo "$as_me: failed program was:" >&5
1697 cat conftest.$ac_ext >&5
1698 ac_compiler_gnu=no
1699 fi
1700 rm -f conftest.$ac_objext conftest.$ac_ext
1701 ac_cv_c_compiler_gnu=$ac_compiler_gnu
1702
1703 fi
1704 echo "$as_me:1704: result: $ac_cv_c_compiler_gnu" >&5
1705 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1706 GCC=`test $ac_compiler_gnu = yes && echo yes`
1707 ac_test_CFLAGS=${CFLAGS+set}
1708 ac_save_CFLAGS=$CFLAGS
1709 CFLAGS="-g"
1710 echo "$as_me:1710: checking whether $CC accepts -g" >&5
1711 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1712 if test "${ac_cv_prog_cc_g+set}" = set; then
1713   echo $ECHO_N "(cached) $ECHO_C" >&6
1714 else
1715   cat >conftest.$ac_ext <<_ACEOF
1716 #line 1716 "configure"
1717 #include "confdefs.h"
1718
1719 int
1720 main ()
1721 {
1722
1723   ;
1724   return 0;
1725 }
1726 _ACEOF
1727 rm -f conftest.$ac_objext
1728 if { (eval echo "$as_me:1728: \"$ac_compile\"") >&5
1729   (eval $ac_compile) 2>&5
1730   ac_status=$?
1731   echo "$as_me:1731: \$? = $ac_status" >&5
1732   (exit $ac_status); } &&
1733          { ac_try='test -s conftest.$ac_objext'
1734   { (eval echo "$as_me:1734: \"$ac_try\"") >&5
1735   (eval $ac_try) 2>&5
1736   ac_status=$?
1737   echo "$as_me:1737: \$? = $ac_status" >&5
1738   (exit $ac_status); }; }; then
1739   ac_cv_prog_cc_g=yes
1740 else
1741   echo "$as_me: failed program was:" >&5
1742 cat conftest.$ac_ext >&5
1743 ac_cv_prog_cc_g=no
1744 fi
1745 rm -f conftest.$ac_objext conftest.$ac_ext
1746 fi
1747 echo "$as_me:1747: result: $ac_cv_prog_cc_g" >&5
1748 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1749 if test "$ac_test_CFLAGS" = set; then
1750   CFLAGS=$ac_save_CFLAGS
1751 elif test $ac_cv_prog_cc_g = yes; then
1752   if test "$GCC" = yes; then
1753     CFLAGS="-g -O2"
1754   else
1755     CFLAGS="-g"
1756   fi
1757 else
1758   if test "$GCC" = yes; then
1759     CFLAGS="-O2"
1760   else
1761     CFLAGS=
1762   fi
1763 fi
1764 # Some people use a C++ compiler to compile C.  Since we use `exit',
1765 # in C++ we need to declare it.  In case someone uses the same compiler
1766 # for both compiling C and C++ we need to have the C++ compiler decide
1767 # the declaration of exit, since it's the most demanding environment.
1768 cat >conftest.$ac_ext <<_ACEOF
1769 #ifndef __cplusplus
1770   choke me
1771 #endif
1772 _ACEOF
1773 rm -f conftest.$ac_objext
1774 if { (eval echo "$as_me:1774: \"$ac_compile\"") >&5
1775   (eval $ac_compile) 2>&5
1776   ac_status=$?
1777   echo "$as_me:1777: \$? = $ac_status" >&5
1778   (exit $ac_status); } &&
1779          { ac_try='test -s conftest.$ac_objext'
1780   { (eval echo "$as_me:1780: \"$ac_try\"") >&5
1781   (eval $ac_try) 2>&5
1782   ac_status=$?
1783   echo "$as_me:1783: \$? = $ac_status" >&5
1784   (exit $ac_status); }; }; then
1785   for ac_declaration in \
1786    ''\
1787    '#include <stdlib.h>' \
1788    'extern "C" void std::exit (int) throw (); using std::exit;' \
1789    'extern "C" void std::exit (int); using std::exit;' \
1790    'extern "C" void exit (int) throw ();' \
1791    'extern "C" void exit (int);' \
1792    'void exit (int);'
1793 do
1794   cat >conftest.$ac_ext <<_ACEOF
1795 #line 1795 "configure"
1796 #include "confdefs.h"
1797 #include <stdlib.h>
1798 $ac_declaration
1799 int
1800 main ()
1801 {
1802 exit (42);
1803   ;
1804   return 0;
1805 }
1806 _ACEOF
1807 rm -f conftest.$ac_objext
1808 if { (eval echo "$as_me:1808: \"$ac_compile\"") >&5
1809   (eval $ac_compile) 2>&5
1810   ac_status=$?
1811   echo "$as_me:1811: \$? = $ac_status" >&5
1812   (exit $ac_status); } &&
1813          { ac_try='test -s conftest.$ac_objext'
1814   { (eval echo "$as_me:1814: \"$ac_try\"") >&5
1815   (eval $ac_try) 2>&5
1816   ac_status=$?
1817   echo "$as_me:1817: \$? = $ac_status" >&5
1818   (exit $ac_status); }; }; then
1819   :
1820 else
1821   echo "$as_me: failed program was:" >&5
1822 cat conftest.$ac_ext >&5
1823 continue
1824 fi
1825 rm -f conftest.$ac_objext conftest.$ac_ext
1826   cat >conftest.$ac_ext <<_ACEOF
1827 #line 1827 "configure"
1828 #include "confdefs.h"
1829 $ac_declaration
1830 int
1831 main ()
1832 {
1833 exit (42);
1834   ;
1835   return 0;
1836 }
1837 _ACEOF
1838 rm -f conftest.$ac_objext
1839 if { (eval echo "$as_me:1839: \"$ac_compile\"") >&5
1840   (eval $ac_compile) 2>&5
1841   ac_status=$?
1842   echo "$as_me:1842: \$? = $ac_status" >&5
1843   (exit $ac_status); } &&
1844          { ac_try='test -s conftest.$ac_objext'
1845   { (eval echo "$as_me:1845: \"$ac_try\"") >&5
1846   (eval $ac_try) 2>&5
1847   ac_status=$?
1848   echo "$as_me:1848: \$? = $ac_status" >&5
1849   (exit $ac_status); }; }; then
1850   break
1851 else
1852   echo "$as_me: failed program was:" >&5
1853 cat conftest.$ac_ext >&5
1854 fi
1855 rm -f conftest.$ac_objext conftest.$ac_ext
1856 done
1857 rm -f conftest*
1858 if test -n "$ac_declaration"; then
1859   echo '#ifdef __cplusplus' >>confdefs.h
1860   echo $ac_declaration      >>confdefs.h
1861   echo '#endif'             >>confdefs.h
1862 fi
1863
1864 else
1865   echo "$as_me: failed program was:" >&5
1866 cat conftest.$ac_ext >&5
1867 fi
1868 rm -f conftest.$ac_objext conftest.$ac_ext
1869 ac_ext=c
1870 ac_cpp='$CPP $CPPFLAGS'
1871 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1872 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1873 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1874 ac_main_return=return
1875
1876 GCC_VERSION=none
1877 if test "$GCC" = yes ; then
1878         echo "$as_me:1878: checking version of $CC" >&5
1879 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
1880         GCC_VERSION="`${CC} --version| sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
1881         test -z "$GCC_VERSION" && GCC_VERSION=unknown
1882         echo "$as_me:1882: result: $GCC_VERSION" >&5
1883 echo "${ECHO_T}$GCC_VERSION" >&6
1884 fi
1885
1886 ac_ext=c
1887 ac_cpp='$CPP $CPPFLAGS'
1888 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1889 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1890 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1891 ac_main_return=return
1892 echo "$as_me:1892: checking how to run the C preprocessor" >&5
1893 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
1894 # On Suns, sometimes $CPP names a directory.
1895 if test -n "$CPP" && test -d "$CPP"; then
1896   CPP=
1897 fi
1898 if test -z "$CPP"; then
1899   if test "${ac_cv_prog_CPP+set}" = set; then
1900   echo $ECHO_N "(cached) $ECHO_C" >&6
1901 else
1902       # Double quotes because CPP needs to be expanded
1903     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
1904     do
1905       ac_preproc_ok=false
1906 for ac_c_preproc_warn_flag in '' yes
1907 do
1908   # Use a header file that comes with gcc, so configuring glibc
1909   # with a fresh cross-compiler works.
1910   # On the NeXT, cc -E runs the code through the compiler's parser,
1911   # not just through cpp. "Syntax error" is here to catch this case.
1912   cat >conftest.$ac_ext <<_ACEOF
1913 #line 1913 "configure"
1914 #include "confdefs.h"
1915 #include <assert.h>
1916                      Syntax error
1917 _ACEOF
1918 if { (eval echo "$as_me:1918: \"$ac_cpp conftest.$ac_ext\"") >&5
1919   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
1920   ac_status=$?
1921   egrep -v '^ *\+' conftest.er1 >conftest.err
1922   rm -f conftest.er1
1923   cat conftest.err >&5
1924   echo "$as_me:1924: \$? = $ac_status" >&5
1925   (exit $ac_status); } >/dev/null; then
1926   if test -s conftest.err; then
1927     ac_cpp_err=$ac_c_preproc_warn_flag
1928   else
1929     ac_cpp_err=
1930   fi
1931 else
1932   ac_cpp_err=yes
1933 fi
1934 if test -z "$ac_cpp_err"; then
1935   :
1936 else
1937   echo "$as_me: failed program was:" >&5
1938   cat conftest.$ac_ext >&5
1939   # Broken: fails on valid input.
1940 continue
1941 fi
1942 rm -f conftest.err conftest.$ac_ext
1943
1944   # OK, works on sane cases.  Now check whether non-existent headers
1945   # can be detected and how.
1946   cat >conftest.$ac_ext <<_ACEOF
1947 #line 1947 "configure"
1948 #include "confdefs.h"
1949 #include <ac_nonexistent.h>
1950 _ACEOF
1951 if { (eval echo "$as_me:1951: \"$ac_cpp conftest.$ac_ext\"") >&5
1952   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
1953   ac_status=$?
1954   egrep -v '^ *\+' conftest.er1 >conftest.err
1955   rm -f conftest.er1
1956   cat conftest.err >&5
1957   echo "$as_me:1957: \$? = $ac_status" >&5
1958   (exit $ac_status); } >/dev/null; then
1959   if test -s conftest.err; then
1960     ac_cpp_err=$ac_c_preproc_warn_flag
1961   else
1962     ac_cpp_err=
1963   fi
1964 else
1965   ac_cpp_err=yes
1966 fi
1967 if test -z "$ac_cpp_err"; then
1968   # Broken: success on invalid input.
1969 continue
1970 else
1971   echo "$as_me: failed program was:" >&5
1972   cat conftest.$ac_ext >&5
1973   # Passes both tests.
1974 ac_preproc_ok=:
1975 break
1976 fi
1977 rm -f conftest.err conftest.$ac_ext
1978
1979 done
1980 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
1981 rm -f conftest.err conftest.$ac_ext
1982 if $ac_preproc_ok; then
1983   break
1984 fi
1985
1986     done
1987     ac_cv_prog_CPP=$CPP
1988
1989 fi
1990   CPP=$ac_cv_prog_CPP
1991 else
1992   ac_cv_prog_CPP=$CPP
1993 fi
1994 echo "$as_me:1994: result: $CPP" >&5
1995 echo "${ECHO_T}$CPP" >&6
1996 ac_preproc_ok=false
1997 for ac_c_preproc_warn_flag in '' yes
1998 do
1999   # Use a header file that comes with gcc, so configuring glibc
2000   # with a fresh cross-compiler works.
2001   # On the NeXT, cc -E runs the code through the compiler's parser,
2002   # not just through cpp. "Syntax error" is here to catch this case.
2003   cat >conftest.$ac_ext <<_ACEOF
2004 #line 2004 "configure"
2005 #include "confdefs.h"
2006 #include <assert.h>
2007                      Syntax error
2008 _ACEOF
2009 if { (eval echo "$as_me:2009: \"$ac_cpp conftest.$ac_ext\"") >&5
2010   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2011   ac_status=$?
2012   egrep -v '^ *\+' conftest.er1 >conftest.err
2013   rm -f conftest.er1
2014   cat conftest.err >&5
2015   echo "$as_me:2015: \$? = $ac_status" >&5
2016   (exit $ac_status); } >/dev/null; then
2017   if test -s conftest.err; then
2018     ac_cpp_err=$ac_c_preproc_warn_flag
2019   else
2020     ac_cpp_err=
2021   fi
2022 else
2023   ac_cpp_err=yes
2024 fi
2025 if test -z "$ac_cpp_err"; then
2026   :
2027 else
2028   echo "$as_me: failed program was:" >&5
2029   cat conftest.$ac_ext >&5
2030   # Broken: fails on valid input.
2031 continue
2032 fi
2033 rm -f conftest.err conftest.$ac_ext
2034
2035   # OK, works on sane cases.  Now check whether non-existent headers
2036   # can be detected and how.
2037   cat >conftest.$ac_ext <<_ACEOF
2038 #line 2038 "configure"
2039 #include "confdefs.h"
2040 #include <ac_nonexistent.h>
2041 _ACEOF
2042 if { (eval echo "$as_me:2042: \"$ac_cpp conftest.$ac_ext\"") >&5
2043   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2044   ac_status=$?
2045   egrep -v '^ *\+' conftest.er1 >conftest.err
2046   rm -f conftest.er1
2047   cat conftest.err >&5
2048   echo "$as_me:2048: \$? = $ac_status" >&5
2049   (exit $ac_status); } >/dev/null; then
2050   if test -s conftest.err; then
2051     ac_cpp_err=$ac_c_preproc_warn_flag
2052   else
2053     ac_cpp_err=
2054   fi
2055 else
2056   ac_cpp_err=yes
2057 fi
2058 if test -z "$ac_cpp_err"; then
2059   # Broken: success on invalid input.
2060 continue
2061 else
2062   echo "$as_me: failed program was:" >&5
2063   cat conftest.$ac_ext >&5
2064   # Passes both tests.
2065 ac_preproc_ok=:
2066 break
2067 fi
2068 rm -f conftest.err conftest.$ac_ext
2069
2070 done
2071 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2072 rm -f conftest.err conftest.$ac_ext
2073 if $ac_preproc_ok; then
2074   :
2075 else
2076   { { echo "$as_me:2076: error: C preprocessor \"$CPP\" fails sanity check" >&5
2077 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2078    { (exit 1); exit 1; }; }
2079 fi
2080
2081 ac_ext=c
2082 ac_cpp='$CPP $CPPFLAGS'
2083 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2084 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2085 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2086 ac_main_return=return
2087
2088 if test $ac_cv_c_compiler_gnu = yes; then
2089     echo "$as_me:2089: checking whether $CC needs -traditional" >&5
2090 echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
2091 if test "${ac_cv_prog_gcc_traditional+set}" = set; then
2092   echo $ECHO_N "(cached) $ECHO_C" >&6
2093 else
2094     ac_pattern="Autoconf.*'x'"
2095   cat >conftest.$ac_ext <<_ACEOF
2096 #line 2096 "configure"
2097 #include "confdefs.h"
2098 #include <sgtty.h>
2099 int Autoconf = TIOCGETP;
2100 _ACEOF
2101 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2102   egrep "$ac_pattern" >/dev/null 2>&1; then
2103   ac_cv_prog_gcc_traditional=yes
2104 else
2105   ac_cv_prog_gcc_traditional=no
2106 fi
2107 rm -f conftest*
2108
2109   if test $ac_cv_prog_gcc_traditional = no; then
2110     cat >conftest.$ac_ext <<_ACEOF
2111 #line 2111 "configure"
2112 #include "confdefs.h"
2113 #include <termio.h>
2114 int Autoconf = TCGETA;
2115 _ACEOF
2116 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2117   egrep "$ac_pattern" >/dev/null 2>&1; then
2118   ac_cv_prog_gcc_traditional=yes
2119 fi
2120 rm -f conftest*
2121
2122   fi
2123 fi
2124 echo "$as_me:2124: result: $ac_cv_prog_gcc_traditional" >&5
2125 echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
2126   if test $ac_cv_prog_gcc_traditional = yes; then
2127     CC="$CC -traditional"
2128   fi
2129 fi
2130
2131 echo "$as_me:2131: checking whether $CC understands -c and -o together" >&5
2132 echo $ECHO_N "checking whether $CC understands -c and -o together... $ECHO_C" >&6
2133 if test "${cf_cv_prog_CC_c_o+set}" = set; then
2134   echo $ECHO_N "(cached) $ECHO_C" >&6
2135 else
2136
2137 cat > conftest.$ac_ext <<CF_EOF
2138 #include <stdio.h>
2139 int main()
2140 {
2141         ${cf_cv_main_return:-return}(0);
2142 }
2143 CF_EOF
2144 # We do the test twice because some compilers refuse to overwrite an
2145 # existing .o file with -o, though they will create one.
2146 ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
2147 if { (eval echo "$as_me:2147: \"$ac_try\"") >&5
2148   (eval $ac_try) 2>&5
2149   ac_status=$?
2150   echo "$as_me:2150: \$? = $ac_status" >&5
2151   (exit $ac_status); } &&
2152   test -f conftest2.$ac_objext && { (eval echo "$as_me:2152: \"$ac_try\"") >&5
2153   (eval $ac_try) 2>&5
2154   ac_status=$?
2155   echo "$as_me:2155: \$? = $ac_status" >&5
2156   (exit $ac_status); };
2157 then
2158   eval cf_cv_prog_CC_c_o=yes
2159 else
2160   eval cf_cv_prog_CC_c_o=no
2161 fi
2162 rm -f conftest*
2163
2164 fi
2165 if test $cf_cv_prog_CC_c_o = yes; then
2166   echo "$as_me:2166: result: yes" >&5
2167 echo "${ECHO_T}yes" >&6
2168 else
2169   echo "$as_me:2169: result: no" >&5
2170 echo "${ECHO_T}no" >&6
2171 fi
2172
2173 echo "$as_me:2173: checking for POSIXized ISC" >&5
2174 echo $ECHO_N "checking for POSIXized ISC... $ECHO_C" >&6
2175 if test -d /etc/conf/kconfig.d &&
2176    grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
2177 then
2178   echo "$as_me:2178: result: yes" >&5
2179 echo "${ECHO_T}yes" >&6
2180   ISC=yes # If later tests want to check for ISC.
2181
2182 cat >>confdefs.h <<\EOF
2183 #define _POSIX_SOURCE 1
2184 EOF
2185
2186   if test "$GCC" = yes; then
2187     CC="$CC -posix"
2188   else
2189     CC="$CC -Xp"
2190   fi
2191 else
2192   echo "$as_me:2192: result: no" >&5
2193 echo "${ECHO_T}no" >&6
2194   ISC=
2195 fi
2196
2197 echo "$as_me:2197: checking for ${CC-cc} option to accept ANSI C" >&5
2198 echo $ECHO_N "checking for ${CC-cc} option to accept ANSI C... $ECHO_C" >&6
2199 if test "${cf_cv_ansi_cc+set}" = set; then
2200   echo $ECHO_N "(cached) $ECHO_C" >&6
2201 else
2202
2203 cf_cv_ansi_cc=no
2204 cf_save_CFLAGS="$CFLAGS"
2205 cf_save_CPPFLAGS="$CPPFLAGS"
2206 # Don't try gcc -ansi; that turns off useful extensions and
2207 # breaks some systems' header files.
2208 # AIX                   -qlanglvl=ansi
2209 # Ultrix and OSF/1      -std1
2210 # HP-UX                 -Aa -D_HPUX_SOURCE
2211 # SVR4                  -Xc
2212 # UnixWare 1.2          (cannot use -Xc, since ANSI/POSIX clashes)
2213 for cf_arg in "-DCC_HAS_PROTOS" \
2214         "" \
2215         -qlanglvl=ansi \
2216         -std1 \
2217         -Ae \
2218         "-Aa -D_HPUX_SOURCE" \
2219         -Xc
2220 do
2221
2222 cf_fix_cppflags=no
2223 cf_new_cflags=
2224 cf_new_cppflags=
2225 cf_new_extra_cppflags=
2226
2227 for cf_add_cflags in $cf_arg
2228 do
2229 case $cf_fix_cppflags in
2230 no)
2231         case $cf_add_cflags in #(vi
2232         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2233                 case $cf_add_cflags in
2234                 -D*)
2235                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2236
2237                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2238                                 && test -z "${cf_tst_cflags}" \
2239                                 && cf_fix_cppflags=yes
2240
2241                         if test $cf_fix_cppflags = yes ; then
2242                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2243                                 continue
2244                         elif test "${cf_tst_cflags}" = "\"'" ; then
2245                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2246                                 continue
2247                         fi
2248                         ;;
2249                 esac
2250                 case "$CPPFLAGS" in
2251                 *$cf_add_cflags) #(vi
2252                         ;;
2253                 *) #(vi
2254                         case $cf_add_cflags in #(vi
2255                         -D*)
2256                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2257
2258 CPPFLAGS=`echo "$CPPFLAGS" | \
2259         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2260                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2261
2262                                 ;;
2263                         esac
2264                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2265                         ;;
2266                 esac
2267                 ;;
2268         *)
2269                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2270                 ;;
2271         esac
2272         ;;
2273 yes)
2274         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2275
2276         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2277
2278         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2279                 && test -z "${cf_tst_cflags}" \
2280                 && cf_fix_cppflags=no
2281         ;;
2282 esac
2283 done
2284
2285 if test -n "$cf_new_cflags" ; then
2286
2287         CFLAGS="$CFLAGS $cf_new_cflags"
2288 fi
2289
2290 if test -n "$cf_new_cppflags" ; then
2291
2292         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
2293 fi
2294
2295 if test -n "$cf_new_extra_cppflags" ; then
2296
2297         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2298 fi
2299
2300         cat >conftest.$ac_ext <<_ACEOF
2301 #line 2301 "configure"
2302 #include "confdefs.h"
2303
2304 #ifndef CC_HAS_PROTOS
2305 #if !defined(__STDC__) || (__STDC__ != 1)
2306 choke me
2307 #endif
2308 #endif
2309
2310 int
2311 main ()
2312 {
2313
2314         int test (int i, double x);
2315         struct s1 {int (*f) (int a);};
2316         struct s2 {int (*f) (double a);};
2317   ;
2318   return 0;
2319 }
2320 _ACEOF
2321 rm -f conftest.$ac_objext
2322 if { (eval echo "$as_me:2322: \"$ac_compile\"") >&5
2323   (eval $ac_compile) 2>&5
2324   ac_status=$?
2325   echo "$as_me:2325: \$? = $ac_status" >&5
2326   (exit $ac_status); } &&
2327          { ac_try='test -s conftest.$ac_objext'
2328   { (eval echo "$as_me:2328: \"$ac_try\"") >&5
2329   (eval $ac_try) 2>&5
2330   ac_status=$?
2331   echo "$as_me:2331: \$? = $ac_status" >&5
2332   (exit $ac_status); }; }; then
2333   cf_cv_ansi_cc="$cf_arg"; break
2334 else
2335   echo "$as_me: failed program was:" >&5
2336 cat conftest.$ac_ext >&5
2337 fi
2338 rm -f conftest.$ac_objext conftest.$ac_ext
2339 done
2340 CFLAGS="$cf_save_CFLAGS"
2341 CPPFLAGS="$cf_save_CPPFLAGS"
2342
2343 fi
2344 echo "$as_me:2344: result: $cf_cv_ansi_cc" >&5
2345 echo "${ECHO_T}$cf_cv_ansi_cc" >&6
2346
2347 if test "$cf_cv_ansi_cc" != "no"; then
2348 if test ".$cf_cv_ansi_cc" != ".-DCC_HAS_PROTOS"; then
2349
2350 cf_fix_cppflags=no
2351 cf_new_cflags=
2352 cf_new_cppflags=
2353 cf_new_extra_cppflags=
2354
2355 for cf_add_cflags in $cf_cv_ansi_cc
2356 do
2357 case $cf_fix_cppflags in
2358 no)
2359         case $cf_add_cflags in #(vi
2360         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2361                 case $cf_add_cflags in
2362                 -D*)
2363                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2364
2365                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2366                                 && test -z "${cf_tst_cflags}" \
2367                                 && cf_fix_cppflags=yes
2368
2369                         if test $cf_fix_cppflags = yes ; then
2370                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2371                                 continue
2372                         elif test "${cf_tst_cflags}" = "\"'" ; then
2373                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2374                                 continue
2375                         fi
2376                         ;;
2377                 esac
2378                 case "$CPPFLAGS" in
2379                 *$cf_add_cflags) #(vi
2380                         ;;
2381                 *) #(vi
2382                         case $cf_add_cflags in #(vi
2383                         -D*)
2384                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2385
2386 CPPFLAGS=`echo "$CPPFLAGS" | \
2387         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2388                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2389
2390                                 ;;
2391                         esac
2392                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2393                         ;;
2394                 esac
2395                 ;;
2396         *)
2397                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2398                 ;;
2399         esac
2400         ;;
2401 yes)
2402         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2403
2404         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2405
2406         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2407                 && test -z "${cf_tst_cflags}" \
2408                 && cf_fix_cppflags=no
2409         ;;
2410 esac
2411 done
2412
2413 if test -n "$cf_new_cflags" ; then
2414
2415         CFLAGS="$CFLAGS $cf_new_cflags"
2416 fi
2417
2418 if test -n "$cf_new_cppflags" ; then
2419
2420         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
2421 fi
2422
2423 if test -n "$cf_new_extra_cppflags" ; then
2424
2425         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2426 fi
2427
2428 else
2429         cat >>confdefs.h <<\EOF
2430 #define CC_HAS_PROTOS 1
2431 EOF
2432
2433 fi
2434 fi
2435
2436 if test "$cf_cv_ansi_cc" = "no"; then
2437         { { echo "$as_me:2437: error: Your compiler does not appear to recognize prototypes.
2438 You have the following choices:
2439         a. adjust your compiler options
2440         b. get an up-to-date compiler
2441         c. use a wrapper such as unproto" >&5
2442 echo "$as_me: error: Your compiler does not appear to recognize prototypes.
2443 You have the following choices:
2444         a. adjust your compiler options
2445         b. get an up-to-date compiler
2446         c. use a wrapper such as unproto" >&2;}
2447    { (exit 1); exit 1; }; }
2448 fi
2449
2450 case $cf_cv_system_name in
2451 os2*)
2452     CFLAGS="$CFLAGS -Zmt"
2453     CPPFLAGS="$CPPFLAGS -D__ST_MT_ERRNO__"
2454     CXXFLAGS="$CXXFLAGS -Zmt"
2455     # autoconf's macro sets -Zexe and suffix both, which conflict:w
2456     LDFLAGS="$LDFLAGS -Zmt -Zcrtdll"
2457     ac_cv_exeext=.exe
2458     ;;
2459 esac
2460
2461 PROG_EXT="$EXEEXT"
2462
2463 test -n "$PROG_EXT" && cat >>confdefs.h <<EOF
2464 #define PROG_EXT "$PROG_EXT"
2465 EOF
2466
2467 test "$program_prefix" != NONE &&
2468   program_transform_name="s,^,$program_prefix,;$program_transform_name"
2469 # Use a double $ so make ignores it.
2470 test "$program_suffix" != NONE &&
2471   program_transform_name="s,\$,$program_suffix,;$program_transform_name"
2472 # Double any \ or $.  echo might interpret backslashes.
2473 # By default was `s,x,x', remove it if useless.
2474 cat <<\_ACEOF >conftest.sed
2475 s/[\\$]/&&/g;s/;s,x,x,$//
2476 _ACEOF
2477 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
2478 rm conftest.sed
2479
2480 for ac_prog in mawk gawk nawk awk
2481 do
2482   # Extract the first word of "$ac_prog", so it can be a program name with args.
2483 set dummy $ac_prog; ac_word=$2
2484 echo "$as_me:2484: checking for $ac_word" >&5
2485 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2486 if test "${ac_cv_prog_AWK+set}" = set; then
2487   echo $ECHO_N "(cached) $ECHO_C" >&6
2488 else
2489   if test -n "$AWK"; then
2490   ac_cv_prog_AWK="$AWK" # Let the user override the test.
2491 else
2492   ac_save_IFS=$IFS; IFS=$ac_path_separator
2493 ac_dummy="$PATH"
2494 for ac_dir in $ac_dummy; do
2495   IFS=$ac_save_IFS
2496   test -z "$ac_dir" && ac_dir=.
2497   $as_executable_p "$ac_dir/$ac_word" || continue
2498 ac_cv_prog_AWK="$ac_prog"
2499 echo "$as_me:2499: found $ac_dir/$ac_word" >&5
2500 break
2501 done
2502
2503 fi
2504 fi
2505 AWK=$ac_cv_prog_AWK
2506 if test -n "$AWK"; then
2507   echo "$as_me:2507: result: $AWK" >&5
2508 echo "${ECHO_T}$AWK" >&6
2509 else
2510   echo "$as_me:2510: result: no" >&5
2511 echo "${ECHO_T}no" >&6
2512 fi
2513
2514   test -n "$AWK" && break
2515 done
2516
2517 test -z "$AWK" && { { echo "$as_me:2517: error: No awk program found" >&5
2518 echo "$as_me: error: No awk program found" >&2;}
2519    { (exit 1); exit 1; }; }
2520
2521 echo "$as_me:2521: checking for egrep" >&5
2522 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
2523 if test "${ac_cv_prog_egrep+set}" = set; then
2524   echo $ECHO_N "(cached) $ECHO_C" >&6
2525 else
2526   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
2527     then ac_cv_prog_egrep='grep -E'
2528     else ac_cv_prog_egrep='egrep'
2529     fi
2530 fi
2531 echo "$as_me:2531: result: $ac_cv_prog_egrep" >&5
2532 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
2533  EGREP=$ac_cv_prog_egrep
2534
2535 test -z "$EGREP" && { { echo "$as_me:2535: error: No egrep program found" >&5
2536 echo "$as_me: error: No egrep program found" >&2;}
2537    { (exit 1); exit 1; }; }
2538
2539 # Find a good install program.  We prefer a C program (faster),
2540 # so one script is as good as another.  But avoid the broken or
2541 # incompatible versions:
2542 # SysV /etc/install, /usr/sbin/install
2543 # SunOS /usr/etc/install
2544 # IRIX /sbin/install
2545 # AIX /bin/install
2546 # AmigaOS /C/install, which installs bootblocks on floppy discs
2547 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2548 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2549 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2550 # ./install, which can be erroneously created by make from ./install.sh.
2551 echo "$as_me:2551: checking for a BSD compatible install" >&5
2552 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
2553 if test -z "$INSTALL"; then
2554 if test "${ac_cv_path_install+set}" = set; then
2555   echo $ECHO_N "(cached) $ECHO_C" >&6
2556 else
2557     ac_save_IFS=$IFS; IFS=$ac_path_separator
2558   for ac_dir in $PATH; do
2559     IFS=$ac_save_IFS
2560     # Account for people who put trailing slashes in PATH elements.
2561     case $ac_dir/ in
2562     / | ./ | .// | /cC/* \
2563     | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
2564     | /usr/ucb/* ) ;;
2565     *)
2566       # OSF1 and SCO ODT 3.0 have their own names for install.
2567       # Don't use installbsd from OSF since it installs stuff as root
2568       # by default.
2569       for ac_prog in ginstall scoinst install; do
2570         if $as_executable_p "$ac_dir/$ac_prog"; then
2571           if test $ac_prog = install &&
2572             grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2573             # AIX install.  It has an incompatible calling convention.
2574             :
2575           elif test $ac_prog = install &&
2576             grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2577             # program-specific install script used by HP pwplus--don't use.
2578             :
2579           else
2580             ac_cv_path_install="$ac_dir/$ac_prog -c"
2581             break 2
2582           fi
2583         fi
2584       done
2585       ;;
2586     esac
2587   done
2588
2589 fi
2590   if test "${ac_cv_path_install+set}" = set; then
2591     INSTALL=$ac_cv_path_install
2592   else
2593     # As a last resort, use the slow shell script.  We don't cache a
2594     # path for INSTALL within a source directory, because that will
2595     # break other packages using the cache if that directory is
2596     # removed, or if the path is relative.
2597     INSTALL=$ac_install_sh
2598   fi
2599 fi
2600 echo "$as_me:2600: result: $INSTALL" >&5
2601 echo "${ECHO_T}$INSTALL" >&6
2602
2603 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2604 # It thinks the first close brace ends the variable substitution.
2605 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2606
2607 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
2608
2609 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2610
2611 echo "$as_me:2611: checking whether ln -s works" >&5
2612 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
2613 LN_S=$as_ln_s
2614 if test "$LN_S" = "ln -s"; then
2615   echo "$as_me:2615: result: yes" >&5
2616 echo "${ECHO_T}yes" >&6
2617 else
2618   echo "$as_me:2618: result: no, using $LN_S" >&5
2619 echo "${ECHO_T}no, using $LN_S" >&6
2620 fi
2621
2622 echo "$as_me:2622: checking for long file names" >&5
2623 echo $ECHO_N "checking for long file names... $ECHO_C" >&6
2624 if test "${ac_cv_sys_long_file_names+set}" = set; then
2625   echo $ECHO_N "(cached) $ECHO_C" >&6
2626 else
2627   ac_cv_sys_long_file_names=yes
2628 # Test for long file names in all the places we know might matter:
2629 #      .                the current directory, where building will happen
2630 #      $prefix/lib      where we will be installing things
2631 #      $exec_prefix/lib likewise
2632 # eval it to expand exec_prefix.
2633 #      $TMPDIR          if set, where it might want to write temporary files
2634 # if $TMPDIR is not set:
2635 #      /tmp             where it might want to write temporary files
2636 #      /var/tmp         likewise
2637 #      /usr/tmp         likewise
2638 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
2639   ac_tmpdirs=$TMPDIR
2640 else
2641   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
2642 fi
2643 for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
2644   test -d $ac_dir || continue
2645   test -w $ac_dir || continue # It is less confusing to not echo anything here.
2646   ac_xdir=$ac_dir/cf$$
2647   (umask 077 && mkdir $ac_xdir 2>/dev/null) || continue
2648   ac_tf1=$ac_xdir/conftest9012345
2649   ac_tf2=$ac_xdir/conftest9012346
2650   (echo 1 >$ac_tf1) 2>/dev/null
2651   (echo 2 >$ac_tf2) 2>/dev/null
2652   ac_val=`cat $ac_tf1 2>/dev/null`
2653   if test ! -f $ac_tf1 || test "$ac_val" != 1; then
2654     ac_cv_sys_long_file_names=no
2655     rm -rf $ac_xdir 2>/dev/null
2656     break
2657   fi
2658   rm -rf $ac_xdir 2>/dev/null
2659 done
2660 fi
2661 echo "$as_me:2661: result: $ac_cv_sys_long_file_names" >&5
2662 echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
2663 if test $ac_cv_sys_long_file_names = yes; then
2664
2665 cat >>confdefs.h <<\EOF
2666 #define HAVE_LONG_FILE_NAMES 1
2667 EOF
2668
2669 fi
2670
2671 # if we find pkg-config, check if we should install the ".pc" files.
2672
2673 echo "$as_me:2673: checking if you want to use pkg-config" >&5
2674 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
2675
2676 # Check whether --with-pkg-config or --without-pkg-config was given.
2677 if test "${with_pkg_config+set}" = set; then
2678   withval="$with_pkg_config"
2679   cf_pkg_config=$withval
2680 else
2681   cf_pkg_config=yes
2682 fi;
2683 echo "$as_me:2683: result: $cf_pkg_config" >&5
2684 echo "${ECHO_T}$cf_pkg_config" >&6
2685
2686 case $cf_pkg_config in #(vi
2687 no) #(vi
2688         PKG_CONFIG=none
2689         ;;
2690 yes) #(vi
2691         # Extract the first word of "pkg-config", so it can be a program name with args.
2692 set dummy pkg-config; ac_word=$2
2693 echo "$as_me:2693: checking for $ac_word" >&5
2694 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2695 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
2696   echo $ECHO_N "(cached) $ECHO_C" >&6
2697 else
2698   case $PKG_CONFIG in
2699   [\\/]* | ?:[\\/]*)
2700   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
2701   ;;
2702   *)
2703   ac_save_IFS=$IFS; IFS=$ac_path_separator
2704 ac_dummy="$PATH"
2705 for ac_dir in $ac_dummy; do
2706   IFS=$ac_save_IFS
2707   test -z "$ac_dir" && ac_dir=.
2708   if $as_executable_p "$ac_dir/$ac_word"; then
2709    ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
2710    echo "$as_me:2710: found $ac_dir/$ac_word" >&5
2711    break
2712 fi
2713 done
2714
2715   test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="none"
2716   ;;
2717 esac
2718 fi
2719 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
2720
2721 if test -n "$PKG_CONFIG"; then
2722   echo "$as_me:2722: result: $PKG_CONFIG" >&5
2723 echo "${ECHO_T}$PKG_CONFIG" >&6
2724 else
2725   echo "$as_me:2725: result: no" >&5
2726 echo "${ECHO_T}no" >&6
2727 fi
2728
2729         ;;
2730 *)
2731         PKG_CONFIG=$withval
2732         ;;
2733 esac
2734
2735 test -z "$PKG_CONFIG" && PKG_CONFIG=none
2736 if test "$PKG_CONFIG" != none ; then
2737
2738 if test "x$prefix" != xNONE; then
2739   cf_path_syntax="$prefix"
2740 else
2741   cf_path_syntax="$ac_default_prefix"
2742 fi
2743
2744 case ".$PKG_CONFIG" in #(vi
2745 .\$\(*\)*|.\'*\'*) #(vi
2746   ;;
2747 ..|./*|.\\*) #(vi
2748   ;;
2749 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
2750   ;;
2751 .\${*prefix}*) #(vi
2752   eval PKG_CONFIG="$PKG_CONFIG"
2753   case ".$PKG_CONFIG" in #(vi
2754   .NONE/*)
2755     PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
2756     ;;
2757   esac
2758   ;; #(vi
2759 .no|.NONE/*)
2760   PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
2761   ;;
2762 *)
2763   { { echo "$as_me:2763: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
2764 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
2765    { (exit 1); exit 1; }; }
2766   ;;
2767 esac
2768
2769 fi
2770
2771 if test "$PKG_CONFIG" != no ; then
2772         echo "$as_me:2772: checking if we should install .pc files for $PKG_CONFIG" >&5
2773 echo $ECHO_N "checking if we should install .pc files for $PKG_CONFIG... $ECHO_C" >&6
2774
2775         # Leave this as something that can be overridden in the environment.
2776         if test -z "$PKG_CONFIG_LIBDIR" ; then
2777                 PKG_CONFIG_LIBDIR=`echo "$PKG_CONFIG" | sed -e 's,/[^/]*/[^/]*$,,'`/lib/pkgconfig
2778         fi
2779         PKG_CONFIG_LIBDIR=`echo "$PKG_CONFIG_LIBDIR" | sed -e 's/^://' -e 's/:.*//'`
2780         if test -n "$PKG_CONFIG_LIBDIR" && test -d "$PKG_CONFIG_LIBDIR" ; then
2781
2782 # Check whether --enable-pc-files or --disable-pc-files was given.
2783 if test "${enable_pc_files+set}" = set; then
2784   enableval="$enable_pc_files"
2785   enable_pc_files=$enableval
2786 else
2787   enable_pc_files=no
2788 fi;
2789                 echo "$as_me:2789: result: $enable_pc_files" >&5
2790 echo "${ECHO_T}$enable_pc_files" >&6
2791         else
2792                 echo "$as_me:2792: result: no" >&5
2793 echo "${ECHO_T}no" >&6
2794                 { echo "$as_me:2794: WARNING: did not find library $PKG_CONFIG_LIBDIR" >&5
2795 echo "$as_me: WARNING: did not find library $PKG_CONFIG_LIBDIR" >&2;}
2796                 enable_pc_files=no
2797         fi
2798 fi
2799
2800 echo "$as_me:2800: checking if we should assume mixed-case filenames" >&5
2801 echo $ECHO_N "checking if we should assume mixed-case filenames... $ECHO_C" >&6
2802
2803 # Check whether --enable-mixed-case or --disable-mixed-case was given.
2804 if test "${enable_mixed_case+set}" = set; then
2805   enableval="$enable_mixed_case"
2806   enable_mixedcase=$enableval
2807 else
2808   enable_mixedcase=auto
2809 fi;
2810 echo "$as_me:2810: result: $enable_mixedcase" >&5
2811 echo "${ECHO_T}$enable_mixedcase" >&6
2812 if test "$enable_mixedcase" = "auto" ; then
2813
2814 echo "$as_me:2814: checking if filesystem supports mixed-case filenames" >&5
2815 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
2816 if test "${cf_cv_mixedcase+set}" = set; then
2817   echo $ECHO_N "(cached) $ECHO_C" >&6
2818 else
2819
2820 if test "$cross_compiling" = yes ; then
2821         case $target_alias in #(vi
2822         *-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-mingw32*|*-uwin*) #(vi
2823                 cf_cv_mixedcase=no
2824                 ;;
2825         *)
2826                 cf_cv_mixedcase=yes
2827                 ;;
2828         esac
2829 else
2830         rm -f conftest CONFTEST
2831         echo test >conftest
2832         if test -f CONFTEST ; then
2833                 cf_cv_mixedcase=no
2834         else
2835                 cf_cv_mixedcase=yes
2836         fi
2837         rm -f conftest CONFTEST
2838 fi
2839
2840 fi
2841 echo "$as_me:2841: result: $cf_cv_mixedcase" >&5
2842 echo "${ECHO_T}$cf_cv_mixedcase" >&6
2843 test "$cf_cv_mixedcase" = yes && cat >>confdefs.h <<\EOF
2844 #define MIXEDCASE_FILENAMES 1
2845 EOF
2846
2847 else
2848     cf_cv_mixedcase=$enable_mixedcase
2849     if test "$enable_mixedcase" = "yes" ; then
2850         cat >>confdefs.h <<\EOF
2851 #define MIXEDCASE_FILENAMES 1
2852 EOF
2853
2854     fi
2855 fi
2856
2857 # do this after mixed-case option (tags/TAGS is not as important as tic).
2858 echo "$as_me:2858: checking whether ${MAKE-make} sets \${MAKE}" >&5
2859 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
2860 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
2861 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
2862   echo $ECHO_N "(cached) $ECHO_C" >&6
2863 else
2864   cat >conftest.make <<\EOF
2865 all:
2866         @echo 'ac_maketemp="${MAKE}"'
2867 EOF
2868 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
2869 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
2870 if test -n "$ac_maketemp"; then
2871   eval ac_cv_prog_make_${ac_make}_set=yes
2872 else
2873   eval ac_cv_prog_make_${ac_make}_set=no
2874 fi
2875 rm -f conftest.make
2876 fi
2877 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
2878   echo "$as_me:2878: result: yes" >&5
2879 echo "${ECHO_T}yes" >&6
2880   SET_MAKE=
2881 else
2882   echo "$as_me:2882: result: no" >&5
2883 echo "${ECHO_T}no" >&6
2884   SET_MAKE="MAKE=${MAKE-make}"
2885 fi
2886
2887 # Extract the first word of "ctags", so it can be a program name with args.
2888 set dummy ctags; ac_word=$2
2889 echo "$as_me:2889: checking for $ac_word" >&5
2890 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2891 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
2892   echo $ECHO_N "(cached) $ECHO_C" >&6
2893 else
2894   if test -n "$MAKE_LOWER_TAGS"; then
2895   ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
2896 else
2897   ac_save_IFS=$IFS; IFS=$ac_path_separator
2898 ac_dummy="$PATH"
2899 for ac_dir in $ac_dummy; do
2900   IFS=$ac_save_IFS
2901   test -z "$ac_dir" && ac_dir=.
2902   $as_executable_p "$ac_dir/$ac_word" || continue
2903 ac_cv_prog_MAKE_LOWER_TAGS="yes"
2904 echo "$as_me:2904: found $ac_dir/$ac_word" >&5
2905 break
2906 done
2907
2908   test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
2909 fi
2910 fi
2911 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
2912 if test -n "$MAKE_LOWER_TAGS"; then
2913   echo "$as_me:2913: result: $MAKE_LOWER_TAGS" >&5
2914 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
2915 else
2916   echo "$as_me:2916: result: no" >&5
2917 echo "${ECHO_T}no" >&6
2918 fi
2919
2920 if test "$cf_cv_mixedcase" = yes ; then
2921         # Extract the first word of "etags", so it can be a program name with args.
2922 set dummy etags; ac_word=$2
2923 echo "$as_me:2923: checking for $ac_word" >&5
2924 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2925 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
2926   echo $ECHO_N "(cached) $ECHO_C" >&6
2927 else
2928   if test -n "$MAKE_UPPER_TAGS"; then
2929   ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
2930 else
2931   ac_save_IFS=$IFS; IFS=$ac_path_separator
2932 ac_dummy="$PATH"
2933 for ac_dir in $ac_dummy; do
2934   IFS=$ac_save_IFS
2935   test -z "$ac_dir" && ac_dir=.
2936   $as_executable_p "$ac_dir/$ac_word" || continue
2937 ac_cv_prog_MAKE_UPPER_TAGS="yes"
2938 echo "$as_me:2938: found $ac_dir/$ac_word" >&5
2939 break
2940 done
2941
2942   test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
2943 fi
2944 fi
2945 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
2946 if test -n "$MAKE_UPPER_TAGS"; then
2947   echo "$as_me:2947: result: $MAKE_UPPER_TAGS" >&5
2948 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
2949 else
2950   echo "$as_me:2950: result: no" >&5
2951 echo "${ECHO_T}no" >&6
2952 fi
2953
2954 else
2955         MAKE_UPPER_TAGS=no
2956 fi
2957
2958 if test "$MAKE_UPPER_TAGS" = yes ; then
2959         MAKE_UPPER_TAGS=
2960 else
2961         MAKE_UPPER_TAGS="#"
2962 fi
2963
2964 if test "$MAKE_LOWER_TAGS" = yes ; then
2965         MAKE_LOWER_TAGS=
2966 else
2967         MAKE_LOWER_TAGS="#"
2968 fi
2969
2970 echo "$as_me:2970: checking for makeflags variable" >&5
2971 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
2972 if test "${cf_cv_makeflags+set}" = set; then
2973   echo $ECHO_N "(cached) $ECHO_C" >&6
2974 else
2975
2976         cf_cv_makeflags=''
2977         for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
2978         do
2979                 cat >cf_makeflags.tmp <<CF_EOF
2980 SHELL = /bin/sh
2981 all :
2982         @ echo '.$cf_option'
2983 CF_EOF
2984                 cf_result=`${MAKE-make} -k -f cf_makeflags.tmp 2>/dev/null | sed -e 's,[        ]*$,,'`
2985                 case "$cf_result" in
2986                 .*k)
2987                         cf_result=`${MAKE-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`
2988                         case "$cf_result" in
2989                         .*CC=*) cf_cv_makeflags=
2990                                 ;;
2991                         *)      cf_cv_makeflags=$cf_option
2992                                 ;;
2993                         esac
2994                         break
2995                         ;;
2996                 .-)     ;;
2997                 *)      echo "given option \"$cf_option\", no match \"$cf_result\""
2998                         ;;
2999                 esac
3000         done
3001         rm -f cf_makeflags.tmp
3002
3003 fi
3004 echo "$as_me:3004: result: $cf_cv_makeflags" >&5
3005 echo "${ECHO_T}$cf_cv_makeflags" >&6
3006
3007 if test -n "$ac_tool_prefix"; then
3008   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3009 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3010 echo "$as_me:3010: checking for $ac_word" >&5
3011 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3012 if test "${ac_cv_prog_RANLIB+set}" = set; then
3013   echo $ECHO_N "(cached) $ECHO_C" >&6
3014 else
3015   if test -n "$RANLIB"; then
3016   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3017 else
3018   ac_save_IFS=$IFS; IFS=$ac_path_separator
3019 ac_dummy="$PATH"
3020 for ac_dir in $ac_dummy; do
3021   IFS=$ac_save_IFS
3022   test -z "$ac_dir" && ac_dir=.
3023   $as_executable_p "$ac_dir/$ac_word" || continue
3024 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3025 echo "$as_me:3025: found $ac_dir/$ac_word" >&5
3026 break
3027 done
3028
3029 fi
3030 fi
3031 RANLIB=$ac_cv_prog_RANLIB
3032 if test -n "$RANLIB"; then
3033   echo "$as_me:3033: result: $RANLIB" >&5
3034 echo "${ECHO_T}$RANLIB" >&6
3035 else
3036   echo "$as_me:3036: result: no" >&5
3037 echo "${ECHO_T}no" >&6
3038 fi
3039
3040 fi
3041 if test -z "$ac_cv_prog_RANLIB"; then
3042   ac_ct_RANLIB=$RANLIB
3043   # Extract the first word of "ranlib", so it can be a program name with args.
3044 set dummy ranlib; ac_word=$2
3045 echo "$as_me:3045: checking for $ac_word" >&5
3046 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3047 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
3048   echo $ECHO_N "(cached) $ECHO_C" >&6
3049 else
3050   if test -n "$ac_ct_RANLIB"; then
3051   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
3052 else
3053   ac_save_IFS=$IFS; IFS=$ac_path_separator
3054 ac_dummy="$PATH"
3055 for ac_dir in $ac_dummy; do
3056   IFS=$ac_save_IFS
3057   test -z "$ac_dir" && ac_dir=.
3058   $as_executable_p "$ac_dir/$ac_word" || continue
3059 ac_cv_prog_ac_ct_RANLIB="ranlib"
3060 echo "$as_me:3060: found $ac_dir/$ac_word" >&5
3061 break
3062 done
3063
3064   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
3065 fi
3066 fi
3067 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3068 if test -n "$ac_ct_RANLIB"; then
3069   echo "$as_me:3069: result: $ac_ct_RANLIB" >&5
3070 echo "${ECHO_T}$ac_ct_RANLIB" >&6
3071 else
3072   echo "$as_me:3072: result: no" >&5
3073 echo "${ECHO_T}no" >&6
3074 fi
3075
3076   RANLIB=$ac_ct_RANLIB
3077 else
3078   RANLIB="$ac_cv_prog_RANLIB"
3079 fi
3080
3081 if test -n "$ac_tool_prefix"; then
3082   # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
3083 set dummy ${ac_tool_prefix}ld; ac_word=$2
3084 echo "$as_me:3084: checking for $ac_word" >&5
3085 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3086 if test "${ac_cv_prog_LD+set}" = set; then
3087   echo $ECHO_N "(cached) $ECHO_C" >&6
3088 else
3089   if test -n "$LD"; then
3090   ac_cv_prog_LD="$LD" # Let the user override the test.
3091 else
3092   ac_save_IFS=$IFS; IFS=$ac_path_separator
3093 ac_dummy="$PATH"
3094 for ac_dir in $ac_dummy; do
3095   IFS=$ac_save_IFS
3096   test -z "$ac_dir" && ac_dir=.
3097   $as_executable_p "$ac_dir/$ac_word" || continue
3098 ac_cv_prog_LD="${ac_tool_prefix}ld"
3099 echo "$as_me:3099: found $ac_dir/$ac_word" >&5
3100 break
3101 done
3102
3103 fi
3104 fi
3105 LD=$ac_cv_prog_LD
3106 if test -n "$LD"; then
3107   echo "$as_me:3107: result: $LD" >&5
3108 echo "${ECHO_T}$LD" >&6
3109 else
3110   echo "$as_me:3110: result: no" >&5
3111 echo "${ECHO_T}no" >&6
3112 fi
3113
3114 fi
3115 if test -z "$ac_cv_prog_LD"; then
3116   ac_ct_LD=$LD
3117   # Extract the first word of "ld", so it can be a program name with args.
3118 set dummy ld; ac_word=$2
3119 echo "$as_me:3119: checking for $ac_word" >&5
3120 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3121 if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
3122   echo $ECHO_N "(cached) $ECHO_C" >&6
3123 else
3124   if test -n "$ac_ct_LD"; then
3125   ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
3126 else
3127   ac_save_IFS=$IFS; IFS=$ac_path_separator
3128 ac_dummy="$PATH"
3129 for ac_dir in $ac_dummy; do
3130   IFS=$ac_save_IFS
3131   test -z "$ac_dir" && ac_dir=.
3132   $as_executable_p "$ac_dir/$ac_word" || continue
3133 ac_cv_prog_ac_ct_LD="ld"
3134 echo "$as_me:3134: found $ac_dir/$ac_word" >&5
3135 break
3136 done
3137
3138   test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
3139 fi
3140 fi
3141 ac_ct_LD=$ac_cv_prog_ac_ct_LD
3142 if test -n "$ac_ct_LD"; then
3143   echo "$as_me:3143: result: $ac_ct_LD" >&5
3144 echo "${ECHO_T}$ac_ct_LD" >&6
3145 else
3146   echo "$as_me:3146: result: no" >&5
3147 echo "${ECHO_T}no" >&6
3148 fi
3149
3150   LD=$ac_ct_LD
3151 else
3152   LD="$ac_cv_prog_LD"
3153 fi
3154
3155 if test -n "$ac_tool_prefix"; then
3156   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
3157 set dummy ${ac_tool_prefix}ar; ac_word=$2
3158 echo "$as_me:3158: checking for $ac_word" >&5
3159 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3160 if test "${ac_cv_prog_AR+set}" = set; then
3161   echo $ECHO_N "(cached) $ECHO_C" >&6
3162 else
3163   if test -n "$AR"; then
3164   ac_cv_prog_AR="$AR" # Let the user override the test.
3165 else
3166   ac_save_IFS=$IFS; IFS=$ac_path_separator
3167 ac_dummy="$PATH"
3168 for ac_dir in $ac_dummy; do
3169   IFS=$ac_save_IFS
3170   test -z "$ac_dir" && ac_dir=.
3171   $as_executable_p "$ac_dir/$ac_word" || continue
3172 ac_cv_prog_AR="${ac_tool_prefix}ar"
3173 echo "$as_me:3173: found $ac_dir/$ac_word" >&5
3174 break
3175 done
3176
3177 fi
3178 fi
3179 AR=$ac_cv_prog_AR
3180 if test -n "$AR"; then
3181   echo "$as_me:3181: result: $AR" >&5
3182 echo "${ECHO_T}$AR" >&6
3183 else
3184   echo "$as_me:3184: result: no" >&5
3185 echo "${ECHO_T}no" >&6
3186 fi
3187
3188 fi
3189 if test -z "$ac_cv_prog_AR"; then
3190   ac_ct_AR=$AR
3191   # Extract the first word of "ar", so it can be a program name with args.
3192 set dummy ar; ac_word=$2
3193 echo "$as_me:3193: checking for $ac_word" >&5
3194 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3195 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
3196   echo $ECHO_N "(cached) $ECHO_C" >&6
3197 else
3198   if test -n "$ac_ct_AR"; then
3199   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
3200 else
3201   ac_save_IFS=$IFS; IFS=$ac_path_separator
3202 ac_dummy="$PATH"
3203 for ac_dir in $ac_dummy; do
3204   IFS=$ac_save_IFS
3205   test -z "$ac_dir" && ac_dir=.
3206   $as_executable_p "$ac_dir/$ac_word" || continue
3207 ac_cv_prog_ac_ct_AR="ar"
3208 echo "$as_me:3208: found $ac_dir/$ac_word" >&5
3209 break
3210 done
3211
3212   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
3213 fi
3214 fi
3215 ac_ct_AR=$ac_cv_prog_ac_ct_AR
3216 if test -n "$ac_ct_AR"; then
3217   echo "$as_me:3217: result: $ac_ct_AR" >&5
3218 echo "${ECHO_T}$ac_ct_AR" >&6
3219 else
3220   echo "$as_me:3220: result: no" >&5
3221 echo "${ECHO_T}no" >&6
3222 fi
3223
3224   AR=$ac_ct_AR
3225 else
3226   AR="$ac_cv_prog_AR"
3227 fi
3228
3229 if test -n "$ac_tool_prefix"; then
3230   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
3231 set dummy ${ac_tool_prefix}ar; ac_word=$2
3232 echo "$as_me:3232: checking for $ac_word" >&5
3233 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3234 if test "${ac_cv_prog_AR+set}" = set; then
3235   echo $ECHO_N "(cached) $ECHO_C" >&6
3236 else
3237   if test -n "$AR"; then
3238   ac_cv_prog_AR="$AR" # Let the user override the test.
3239 else
3240   ac_save_IFS=$IFS; IFS=$ac_path_separator
3241 ac_dummy="$PATH"
3242 for ac_dir in $ac_dummy; do
3243   IFS=$ac_save_IFS
3244   test -z "$ac_dir" && ac_dir=.
3245   $as_executable_p "$ac_dir/$ac_word" || continue
3246 ac_cv_prog_AR="${ac_tool_prefix}ar"
3247 echo "$as_me:3247: found $ac_dir/$ac_word" >&5
3248 break
3249 done
3250
3251 fi
3252 fi
3253 AR=$ac_cv_prog_AR
3254 if test -n "$AR"; then
3255   echo "$as_me:3255: result: $AR" >&5
3256 echo "${ECHO_T}$AR" >&6
3257 else
3258   echo "$as_me:3258: result: no" >&5
3259 echo "${ECHO_T}no" >&6
3260 fi
3261
3262 fi
3263 if test -z "$ac_cv_prog_AR"; then
3264   ac_ct_AR=$AR
3265   # Extract the first word of "ar", so it can be a program name with args.
3266 set dummy ar; ac_word=$2
3267 echo "$as_me:3267: checking for $ac_word" >&5
3268 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3269 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
3270   echo $ECHO_N "(cached) $ECHO_C" >&6
3271 else
3272   if test -n "$ac_ct_AR"; then
3273   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
3274 else
3275   ac_save_IFS=$IFS; IFS=$ac_path_separator
3276 ac_dummy="$PATH"
3277 for ac_dir in $ac_dummy; do
3278   IFS=$ac_save_IFS
3279   test -z "$ac_dir" && ac_dir=.
3280   $as_executable_p "$ac_dir/$ac_word" || continue
3281 ac_cv_prog_ac_ct_AR="ar"
3282 echo "$as_me:3282: found $ac_dir/$ac_word" >&5
3283 break
3284 done
3285
3286   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
3287 fi
3288 fi
3289 ac_ct_AR=$ac_cv_prog_ac_ct_AR
3290 if test -n "$ac_ct_AR"; then
3291   echo "$as_me:3291: result: $ac_ct_AR" >&5
3292 echo "${ECHO_T}$ac_ct_AR" >&6
3293 else
3294   echo "$as_me:3294: result: no" >&5
3295 echo "${ECHO_T}no" >&6
3296 fi
3297
3298   AR=$ac_ct_AR
3299 else
3300   AR="$ac_cv_prog_AR"
3301 fi
3302
3303 echo "$as_me:3303: checking for options to update archives" >&5
3304 echo $ECHO_N "checking for options to update archives... $ECHO_C" >&6
3305 if test "${cf_cv_ar_flags+set}" = set; then
3306   echo $ECHO_N "(cached) $ECHO_C" >&6
3307 else
3308
3309         cf_cv_ar_flags=unknown
3310         for cf_ar_flags in -curv curv -crv crv -cqv cqv -rv rv
3311         do
3312                 rm -f conftest.$ac_cv_objext
3313                 rm -f conftest.a
3314
3315                 cat >conftest.$ac_ext <<EOF
3316 #line 3316 "configure"
3317 int     testdata[3] = { 123, 456, 789 };
3318 EOF
3319                 if { (eval echo "$as_me:3319: \"$ac_compile\"") >&5
3320   (eval $ac_compile) 2>&5
3321   ac_status=$?
3322   echo "$as_me:3322: \$? = $ac_status" >&5
3323   (exit $ac_status); } ; then
3324                         $AR $cf_ar_flags conftest.a conftest.$ac_cv_objext 2>&5 1>/dev/null
3325                         if test -f conftest.a ; then
3326                                 cf_cv_ar_flags=$cf_ar_flags
3327                                 break
3328                         fi
3329                 else
3330                         test -n "$verbose" && echo "    cannot compile test-program" 1>&6
3331
3332 echo "${as_me-configure}:3332: testing cannot compile test-program ..." 1>&5
3333
3334                         break
3335                 fi
3336         done
3337         rm -f conftest.a conftest.$ac_ext conftest.$ac_cv_objext
3338
3339 fi
3340 echo "$as_me:3340: result: $cf_cv_ar_flags" >&5
3341 echo "${ECHO_T}$cf_cv_ar_flags" >&6
3342 test -z "$ARFLAGS" && ARFLAGS=$cf_cv_ar_flags
3343 ARFLAGS=$cf_cv_ar_flags
3344
3345 echo "$as_me:3345: checking if you have specified an install-prefix" >&5
3346 echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
3347
3348 # Check whether --with-install-prefix or --without-install-prefix was given.
3349 if test "${with_install_prefix+set}" = set; then
3350   withval="$with_install_prefix"
3351   case "$withval" in #(vi
3352         yes|no) #(vi
3353                 ;;
3354         *)      DESTDIR="$withval"
3355                 ;;
3356         esac
3357 fi;
3358 echo "$as_me:3358: result: $DESTDIR" >&5
3359 echo "${ECHO_T}$DESTDIR" >&6
3360
3361 ###############################################################################
3362
3363 # If we're cross-compiling, allow the user to override the tools and their
3364 # options.  The configure script is oriented toward identifying the host
3365 # compiler, etc., but we need a build compiler to generate parts of the source.
3366
3367 if test "$cross_compiling" = yes ; then
3368
3369         # defaults that we might want to override
3370         : ${BUILD_CFLAGS:=''}
3371         : ${BUILD_CPPFLAGS:=''}
3372         : ${BUILD_LDFLAGS:=''}
3373         : ${BUILD_LIBS:=''}
3374         : ${BUILD_EXEEXT:='$x'}
3375         : ${BUILD_OBJEXT:='o'}
3376
3377 # Check whether --with-build-cc or --without-build-cc was given.
3378 if test "${with_build_cc+set}" = set; then
3379   withval="$with_build_cc"
3380   BUILD_CC="$withval"
3381 else
3382   for ac_prog in gcc cc cl
3383 do
3384   # Extract the first word of "$ac_prog", so it can be a program name with args.
3385 set dummy $ac_prog; ac_word=$2
3386 echo "$as_me:3386: checking for $ac_word" >&5
3387 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3388 if test "${ac_cv_prog_BUILD_CC+set}" = set; then
3389   echo $ECHO_N "(cached) $ECHO_C" >&6
3390 else
3391   if test -n "$BUILD_CC"; then
3392   ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
3393 else
3394   ac_save_IFS=$IFS; IFS=$ac_path_separator
3395 ac_dummy="$PATH"
3396 for ac_dir in $ac_dummy; do
3397   IFS=$ac_save_IFS
3398   test -z "$ac_dir" && ac_dir=.
3399   $as_executable_p "$ac_dir/$ac_word" || continue
3400 ac_cv_prog_BUILD_CC="$ac_prog"
3401 echo "$as_me:3401: found $ac_dir/$ac_word" >&5
3402 break
3403 done
3404
3405 fi
3406 fi
3407 BUILD_CC=$ac_cv_prog_BUILD_CC
3408 if test -n "$BUILD_CC"; then
3409   echo "$as_me:3409: result: $BUILD_CC" >&5
3410 echo "${ECHO_T}$BUILD_CC" >&6
3411 else
3412   echo "$as_me:3412: result: no" >&5
3413 echo "${ECHO_T}no" >&6
3414 fi
3415
3416   test -n "$BUILD_CC" && break
3417 done
3418
3419 fi;
3420         echo "$as_me:3420: checking for native build C compiler" >&5
3421 echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
3422         echo "$as_me:3422: result: $BUILD_CC" >&5
3423 echo "${ECHO_T}$BUILD_CC" >&6
3424
3425         echo "$as_me:3425: checking for native build C preprocessor" >&5
3426 echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
3427
3428 # Check whether --with-build-cpp or --without-build-cpp was given.
3429 if test "${with_build_cpp+set}" = set; then
3430   withval="$with_build_cpp"
3431   BUILD_CPP="$withval"
3432 else
3433   BUILD_CPP='${BUILD_CC} -E'
3434 fi;
3435         echo "$as_me:3435: result: $BUILD_CPP" >&5
3436 echo "${ECHO_T}$BUILD_CPP" >&6
3437
3438         echo "$as_me:3438: checking for native build C flags" >&5
3439 echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
3440
3441 # Check whether --with-build-cflags or --without-build-cflags was given.
3442 if test "${with_build_cflags+set}" = set; then
3443   withval="$with_build_cflags"
3444   BUILD_CFLAGS="$withval"
3445 fi;
3446         echo "$as_me:3446: result: $BUILD_CFLAGS" >&5
3447 echo "${ECHO_T}$BUILD_CFLAGS" >&6
3448
3449         echo "$as_me:3449: checking for native build C preprocessor-flags" >&5
3450 echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
3451
3452 # Check whether --with-build-cppflags or --without-build-cppflags was given.
3453 if test "${with_build_cppflags+set}" = set; then
3454   withval="$with_build_cppflags"
3455   BUILD_CPPFLAGS="$withval"
3456 fi;
3457         echo "$as_me:3457: result: $BUILD_CPPFLAGS" >&5
3458 echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
3459
3460         echo "$as_me:3460: checking for native build linker-flags" >&5
3461 echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
3462
3463 # Check whether --with-build-ldflags or --without-build-ldflags was given.
3464 if test "${with_build_ldflags+set}" = set; then
3465   withval="$with_build_ldflags"
3466   BUILD_LDFLAGS="$withval"
3467 fi;
3468         echo "$as_me:3468: result: $BUILD_LDFLAGS" >&5
3469 echo "${ECHO_T}$BUILD_LDFLAGS" >&6
3470
3471         echo "$as_me:3471: checking for native build linker-libraries" >&5
3472 echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
3473
3474 # Check whether --with-build-libs or --without-build-libs was given.
3475 if test "${with_build_libs+set}" = set; then
3476   withval="$with_build_libs"
3477   BUILD_LIBS="$withval"
3478 fi;
3479         echo "$as_me:3479: result: $BUILD_LIBS" >&5
3480 echo "${ECHO_T}$BUILD_LIBS" >&6
3481
3482         # this assumes we're on Unix.
3483         BUILD_EXEEXT=
3484         BUILD_OBJEXT=o
3485
3486         : ${BUILD_CC:='${CC}'}
3487
3488         if ( test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '${CC}' ) ; then
3489                 { { echo "$as_me:3489: error: Cross-build requires two compilers.
3490 Use --with-build-cc to specify the native compiler." >&5
3491 echo "$as_me: error: Cross-build requires two compilers.
3492 Use --with-build-cc to specify the native compiler." >&2;}
3493    { (exit 1); exit 1; }; }
3494         fi
3495
3496 else
3497         : ${BUILD_CC:='${CC}'}
3498         : ${BUILD_CPP:='${CPP}'}
3499         : ${BUILD_CFLAGS:='${CFLAGS}'}
3500         : ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
3501         : ${BUILD_LDFLAGS:='${LDFLAGS}'}
3502         : ${BUILD_LIBS:='${LIBS}'}
3503         : ${BUILD_EXEEXT:='$x'}
3504         : ${BUILD_OBJEXT:='o'}
3505 fi
3506
3507 ###############################################################################
3508
3509 ### Options to allow the user to specify the set of libraries which are used.
3510 ### Use "--without-normal --with-shared" to allow the default model to be
3511 ### shared, for example.
3512 cf_list_models=""
3513 echo "$as_me:3513: checking for specified models" >&5
3514 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
3515 test -z "$cf_list_models" && cf_list_models=normal
3516 echo "$as_me:3516: result: $cf_list_models" >&5
3517 echo "${ECHO_T}$cf_list_models" >&6
3518
3519 ### Use the first model as the default, and save its suffix for use in building
3520 ### up test-applications.
3521 echo "$as_me:3521: checking for default model" >&5
3522 echo $ECHO_N "checking for default model... $ECHO_C" >&6
3523 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
3524 echo "$as_me:3524: result: $DFT_LWR_MODEL" >&5
3525 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
3526
3527 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
3528
3529 # Check whether --with-curses-dir or --without-curses-dir was given.
3530 if test "${with_curses_dir+set}" = set; then
3531   withval="$with_curses_dir"
3532
3533 if test "x$prefix" != xNONE; then
3534   cf_path_syntax="$prefix"
3535 else
3536   cf_path_syntax="$ac_default_prefix"
3537 fi
3538
3539 case ".$withval" in #(vi
3540 .\$\(*\)*|.\'*\'*) #(vi
3541   ;;
3542 ..|./*|.\\*) #(vi
3543   ;;
3544 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
3545   ;;
3546 .\${*prefix}*) #(vi
3547   eval withval="$withval"
3548   case ".$withval" in #(vi
3549   .NONE/*)
3550     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
3551     ;;
3552   esac
3553   ;; #(vi
3554 .no|.NONE/*)
3555   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
3556   ;;
3557 *)
3558   { { echo "$as_me:3558: error: expected a pathname, not \"$withval\"" >&5
3559 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
3560    { (exit 1); exit 1; }; }
3561   ;;
3562 esac
3563
3564          cf_cv_curses_dir=$withval
3565 else
3566   cf_cv_curses_dir=no
3567 fi;
3568
3569 echo "$as_me:3569: checking if you want wide-character code" >&5
3570 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
3571
3572 # Check whether --enable-widec or --disable-widec was given.
3573 if test "${enable_widec+set}" = set; then
3574   enableval="$enable_widec"
3575   with_widec=$enableval
3576 else
3577   with_widec=no
3578 fi;
3579 echo "$as_me:3579: result: $with_widec" >&5
3580 echo "${ECHO_T}$with_widec" >&6
3581 if test "$with_widec" = yes ; then
3582
3583 echo "$as_me:3583: checking for multibyte character support" >&5
3584 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
3585 if test "${cf_cv_utf8_lib+set}" = set; then
3586   echo $ECHO_N "(cached) $ECHO_C" >&6
3587 else
3588
3589         cf_save_LIBS="$LIBS"
3590         cat >conftest.$ac_ext <<_ACEOF
3591 #line 3591 "configure"
3592 #include "confdefs.h"
3593
3594 #include <stdlib.h>
3595 int
3596 main ()
3597 {
3598 putwc(0,0);
3599   ;
3600   return 0;
3601 }
3602 _ACEOF
3603 rm -f conftest.$ac_objext conftest$ac_exeext
3604 if { (eval echo "$as_me:3604: \"$ac_link\"") >&5
3605   (eval $ac_link) 2>&5
3606   ac_status=$?
3607   echo "$as_me:3607: \$? = $ac_status" >&5
3608   (exit $ac_status); } &&
3609          { ac_try='test -s conftest$ac_exeext'
3610   { (eval echo "$as_me:3610: \"$ac_try\"") >&5
3611   (eval $ac_try) 2>&5
3612   ac_status=$?
3613   echo "$as_me:3613: \$? = $ac_status" >&5
3614   (exit $ac_status); }; }; then
3615   cf_cv_utf8_lib=yes
3616 else
3617   echo "$as_me: failed program was:" >&5
3618 cat conftest.$ac_ext >&5
3619
3620 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
3621 # will be set on completion of the AC_TRY_LINK below.
3622 cf_cv_header_path_utf8=
3623 cf_cv_library_path_utf8=
3624
3625 echo "${as_me-configure}:3625: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
3626
3627 cat >conftest.$ac_ext <<_ACEOF
3628 #line 3628 "configure"
3629 #include "confdefs.h"
3630
3631 #include <libutf8.h>
3632 int
3633 main ()
3634 {
3635 putwc(0,0);
3636   ;
3637   return 0;
3638 }
3639 _ACEOF
3640 rm -f conftest.$ac_objext conftest$ac_exeext
3641 if { (eval echo "$as_me:3641: \"$ac_link\"") >&5
3642   (eval $ac_link) 2>&5
3643   ac_status=$?
3644   echo "$as_me:3644: \$? = $ac_status" >&5
3645   (exit $ac_status); } &&
3646          { ac_try='test -s conftest$ac_exeext'
3647   { (eval echo "$as_me:3647: \"$ac_try\"") >&5
3648   (eval $ac_try) 2>&5
3649   ac_status=$?
3650   echo "$as_me:3650: \$? = $ac_status" >&5
3651   (exit $ac_status); }; }; then
3652   cf_cv_find_linkage_utf8=yes
3653 else
3654   echo "$as_me: failed program was:" >&5
3655 cat conftest.$ac_ext >&5
3656
3657     cf_cv_find_linkage_utf8=no
3658
3659     test -n "$verbose" && echo "        find linkage for utf8 library" 1>&6
3660
3661 echo "${as_me-configure}:3661: testing find linkage for utf8 library ..." 1>&5
3662
3663 echo "${as_me-configure}:3663: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
3664
3665     cf_save_CPPFLAGS="$CPPFLAGS"
3666     cf_test_CPPFLAGS="$CPPFLAGS"
3667
3668 cf_search=
3669 cf_header_path_list=""
3670 if test -n "${CFLAGS}${CPPFLAGS}" ; then
3671         for cf_header_path in $CPPFLAGS $CFLAGS
3672         do
3673                 case $cf_header_path in #(vi
3674                 -I*)
3675                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
3676
3677 test "$cf_header_path" != "NONE" && \
3678 test -d "$cf_header_path" && \
3679  {
3680         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
3681         test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
3682         test -d $cf_header_path/include/utf8 &&       cf_search="$cf_search $cf_header_path/include/utf8"
3683         test -d $cf_header_path/include/utf8/include &&    cf_search="$cf_search $cf_header_path/include/utf8/include"
3684         test -d $cf_header_path/utf8/include &&       cf_search="$cf_search $cf_header_path/utf8/include"
3685         test -d $cf_header_path/utf8/include/utf8 &&    cf_search="$cf_search $cf_header_path/utf8/include/utf8"
3686 }
3687
3688                         cf_header_path_list="$cf_header_path_list $cf_search"
3689                         ;;
3690                 esac
3691         done
3692 fi
3693
3694 cf_search=""
3695
3696 test "/usr" != "$prefix" && \
3697 test -d "/usr" && \
3698 (test $prefix = NONE || test -d $prefix) && {
3699         test -n "$verbose" && echo "    ... testing for include-directories under /usr"
3700         test -d /usr/include &&          cf_search="$cf_search /usr/include"
3701         test -d /usr/include/utf8 &&       cf_search="$cf_search /usr/include/utf8"
3702         test -d /usr/include/utf8/include &&    cf_search="$cf_search /usr/include/utf8/include"
3703         test -d /usr/utf8/include &&       cf_search="$cf_search /usr/utf8/include"
3704         test -d /usr/utf8/include/utf8 &&    cf_search="$cf_search /usr/utf8/include/utf8"
3705 }
3706
3707 test "$prefix" != "NONE" && \
3708 test -d "$prefix" && \
3709  {
3710         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
3711         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
3712         test -d $prefix/include/utf8 &&       cf_search="$cf_search $prefix/include/utf8"
3713         test -d $prefix/include/utf8/include &&    cf_search="$cf_search $prefix/include/utf8/include"
3714         test -d $prefix/utf8/include &&       cf_search="$cf_search $prefix/utf8/include"
3715         test -d $prefix/utf8/include/utf8 &&    cf_search="$cf_search $prefix/utf8/include/utf8"
3716 }
3717
3718 test "/usr/local" != "$prefix" && \
3719 test -d "/usr/local" && \
3720 (test $prefix = NONE || test -d $prefix) && {
3721         test -n "$verbose" && echo "    ... testing for include-directories under /usr/local"
3722         test -d /usr/local/include &&          cf_search="$cf_search /usr/local/include"
3723         test -d /usr/local/include/utf8 &&       cf_search="$cf_search /usr/local/include/utf8"
3724         test -d /usr/local/include/utf8/include &&    cf_search="$cf_search /usr/local/include/utf8/include"
3725         test -d /usr/local/utf8/include &&       cf_search="$cf_search /usr/local/utf8/include"
3726         test -d /usr/local/utf8/include/utf8 &&    cf_search="$cf_search /usr/local/utf8/include/utf8"
3727 }
3728
3729 test "/opt" != "$prefix" && \
3730 test -d "/opt" && \
3731 (test $prefix = NONE || test -d $prefix) && {
3732         test -n "$verbose" && echo "    ... testing for include-directories under /opt"
3733         test -d /opt/include &&          cf_search="$cf_search /opt/include"
3734         test -d /opt/include/utf8 &&       cf_search="$cf_search /opt/include/utf8"
3735         test -d /opt/include/utf8/include &&    cf_search="$cf_search /opt/include/utf8/include"
3736         test -d /opt/utf8/include &&       cf_search="$cf_search /opt/utf8/include"
3737         test -d /opt/utf8/include/utf8 &&    cf_search="$cf_search /opt/utf8/include/utf8"
3738 }
3739
3740 test "$HOME" != "$prefix" && \
3741 test -d "$HOME" && \
3742 (test $prefix = NONE || test -d $prefix) && {
3743         test -n "$verbose" && echo "    ... testing for include-directories under $HOME"
3744         test -d $HOME/include &&          cf_search="$cf_search $HOME/include"
3745         test -d $HOME/include/utf8 &&       cf_search="$cf_search $HOME/include/utf8"
3746         test -d $HOME/include/utf8/include &&    cf_search="$cf_search $HOME/include/utf8/include"
3747         test -d $HOME/utf8/include &&       cf_search="$cf_search $HOME/utf8/include"
3748         test -d $HOME/utf8/include/utf8 &&    cf_search="$cf_search $HOME/utf8/include/utf8"
3749 }
3750
3751 test "$includedir" != NONE && \
3752 test "$includedir" != "/usr/include" && \
3753 test -d "$includedir" && {
3754         test -d $includedir &&    cf_search="$cf_search $includedir"
3755         test -d $includedir/utf8 && cf_search="$cf_search $includedir/utf8"
3756 }
3757
3758 test "$oldincludedir" != NONE && \
3759 test "$oldincludedir" != "/usr/include" && \
3760 test -d "$oldincludedir" && {
3761         test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
3762         test -d $oldincludedir/utf8 && cf_search="$cf_search $oldincludedir/utf8"
3763 }
3764
3765 cf_search="$cf_header_path_list $cf_search"
3766
3767     for cf_cv_header_path_utf8 in $cf_search
3768     do
3769       if test -d $cf_cv_header_path_utf8 ; then
3770         test -n "$verbose" && echo "    ... testing $cf_cv_header_path_utf8" 1>&6
3771
3772 echo "${as_me-configure}:3772: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
3773
3774         CPPFLAGS="$cf_save_CPPFLAGS -I$cf_cv_header_path_utf8"
3775         cat >conftest.$ac_ext <<_ACEOF
3776 #line 3776 "configure"
3777 #include "confdefs.h"
3778
3779 #include <libutf8.h>
3780 int
3781 main ()
3782 {
3783 putwc(0,0);
3784   ;
3785   return 0;
3786 }
3787 _ACEOF
3788 rm -f conftest.$ac_objext
3789 if { (eval echo "$as_me:3789: \"$ac_compile\"") >&5
3790   (eval $ac_compile) 2>&5
3791   ac_status=$?
3792   echo "$as_me:3792: \$? = $ac_status" >&5
3793   (exit $ac_status); } &&
3794          { ac_try='test -s conftest.$ac_objext'
3795   { (eval echo "$as_me:3795: \"$ac_try\"") >&5
3796   (eval $ac_try) 2>&5
3797   ac_status=$?
3798   echo "$as_me:3798: \$? = $ac_status" >&5
3799   (exit $ac_status); }; }; then
3800
3801             test -n "$verbose" && echo "        ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
3802
3803 echo "${as_me-configure}:3803: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
3804
3805             cf_cv_find_linkage_utf8=maybe
3806             cf_test_CPPFLAGS="$CPPFLAGS"
3807             break
3808 else
3809   echo "$as_me: failed program was:" >&5
3810 cat conftest.$ac_ext >&5
3811
3812             CPPFLAGS="$cf_save_CPPFLAGS"
3813
3814 fi
3815 rm -f conftest.$ac_objext conftest.$ac_ext
3816       fi
3817     done
3818
3819     if test "$cf_cv_find_linkage_utf8" = maybe ; then
3820
3821 echo "${as_me-configure}:3821: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
3822
3823       cf_save_LIBS="$LIBS"
3824       cf_save_LDFLAGS="$LDFLAGS"
3825
3826       if test "$cf_cv_find_linkage_utf8" != yes ; then
3827
3828 cf_library_path_list=""
3829 if test -n "${LDFLAGS}${LIBS}" ; then
3830         for cf_library_path in $LDFLAGS $LIBS
3831         do
3832                 case $cf_library_path in #(vi
3833                 -L*)
3834                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
3835
3836 test "$cf_library_path" != "NONE" && \
3837 test -d "$cf_library_path" && \
3838  {
3839         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
3840         test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
3841         test -d $cf_library_path/lib/utf8 &&       cf_search="$cf_search $cf_library_path/lib/utf8"
3842         test -d $cf_library_path/lib/utf8/lib &&    cf_search="$cf_search $cf_library_path/lib/utf8/lib"
3843         test -d $cf_library_path/utf8/lib &&       cf_search="$cf_search $cf_library_path/utf8/lib"
3844         test -d $cf_library_path/utf8/lib/utf8 &&    cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
3845 }
3846
3847                         cf_library_path_list="$cf_library_path_list $cf_search"
3848                         ;;
3849                 esac
3850         done
3851 fi
3852
3853 cf_search=""
3854
3855 test "/usr" != "$prefix" && \
3856 test -d "/usr" && \
3857 (test $prefix = NONE || test -d $prefix) && {
3858         test -n "$verbose" && echo "    ... testing for lib-directories under /usr"
3859         test -d /usr/lib &&          cf_search="$cf_search /usr/lib"
3860         test -d /usr/lib/utf8 &&       cf_search="$cf_search /usr/lib/utf8"
3861         test -d /usr/lib/utf8/lib &&    cf_search="$cf_search /usr/lib/utf8/lib"
3862         test -d /usr/utf8/lib &&       cf_search="$cf_search /usr/utf8/lib"
3863         test -d /usr/utf8/lib/utf8 &&    cf_search="$cf_search /usr/utf8/lib/utf8"
3864 }
3865
3866 test "$prefix" != "NONE" && \
3867 test -d "$prefix" && \
3868  {
3869         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
3870         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
3871         test -d $prefix/lib/utf8 &&       cf_search="$cf_search $prefix/lib/utf8"
3872         test -d $prefix/lib/utf8/lib &&    cf_search="$cf_search $prefix/lib/utf8/lib"
3873         test -d $prefix/utf8/lib &&       cf_search="$cf_search $prefix/utf8/lib"
3874         test -d $prefix/utf8/lib/utf8 &&    cf_search="$cf_search $prefix/utf8/lib/utf8"
3875 }
3876
3877 test "/usr/local" != "$prefix" && \
3878 test -d "/usr/local" && \
3879 (test $prefix = NONE || test -d $prefix) && {
3880         test -n "$verbose" && echo "    ... testing for lib-directories under /usr/local"
3881         test -d /usr/local/lib &&          cf_search="$cf_search /usr/local/lib"
3882         test -d /usr/local/lib/utf8 &&       cf_search="$cf_search /usr/local/lib/utf8"
3883         test -d /usr/local/lib/utf8/lib &&    cf_search="$cf_search /usr/local/lib/utf8/lib"
3884         test -d /usr/local/utf8/lib &&       cf_search="$cf_search /usr/local/utf8/lib"
3885         test -d /usr/local/utf8/lib/utf8 &&    cf_search="$cf_search /usr/local/utf8/lib/utf8"
3886 }
3887
3888 test "/opt" != "$prefix" && \
3889 test -d "/opt" && \
3890 (test $prefix = NONE || test -d $prefix) && {
3891         test -n "$verbose" && echo "    ... testing for lib-directories under /opt"
3892         test -d /opt/lib &&          cf_search="$cf_search /opt/lib"
3893         test -d /opt/lib/utf8 &&       cf_search="$cf_search /opt/lib/utf8"
3894         test -d /opt/lib/utf8/lib &&    cf_search="$cf_search /opt/lib/utf8/lib"
3895         test -d /opt/utf8/lib &&       cf_search="$cf_search /opt/utf8/lib"
3896         test -d /opt/utf8/lib/utf8 &&    cf_search="$cf_search /opt/utf8/lib/utf8"
3897 }
3898
3899 test "$HOME" != "$prefix" && \
3900 test -d "$HOME" && \
3901 (test $prefix = NONE || test -d $prefix) && {
3902         test -n "$verbose" && echo "    ... testing for lib-directories under $HOME"
3903         test -d $HOME/lib &&          cf_search="$cf_search $HOME/lib"
3904         test -d $HOME/lib/utf8 &&       cf_search="$cf_search $HOME/lib/utf8"
3905         test -d $HOME/lib/utf8/lib &&    cf_search="$cf_search $HOME/lib/utf8/lib"
3906         test -d $HOME/utf8/lib &&       cf_search="$cf_search $HOME/utf8/lib"
3907         test -d $HOME/utf8/lib/utf8 &&    cf_search="$cf_search $HOME/utf8/lib/utf8"
3908 }
3909
3910 cf_search="$cf_library_path_list $cf_search"
3911
3912         for cf_cv_library_path_utf8 in $cf_search
3913         do
3914           if test -d $cf_cv_library_path_utf8 ; then
3915             test -n "$verbose" && echo "        ... testing $cf_cv_library_path_utf8" 1>&6
3916
3917 echo "${as_me-configure}:3917: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
3918
3919             CPPFLAGS="$cf_test_CPPFLAGS"
3920             LIBS="-lutf8  $cf_save_LIBS"
3921             LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
3922             cat >conftest.$ac_ext <<_ACEOF
3923 #line 3923 "configure"
3924 #include "confdefs.h"
3925
3926 #include <libutf8.h>
3927 int
3928 main ()
3929 {
3930 putwc(0,0);
3931   ;
3932   return 0;
3933 }
3934 _ACEOF
3935 rm -f conftest.$ac_objext conftest$ac_exeext
3936 if { (eval echo "$as_me:3936: \"$ac_link\"") >&5
3937   (eval $ac_link) 2>&5
3938   ac_status=$?
3939   echo "$as_me:3939: \$? = $ac_status" >&5
3940   (exit $ac_status); } &&
3941          { ac_try='test -s conftest$ac_exeext'
3942   { (eval echo "$as_me:3942: \"$ac_try\"") >&5
3943   (eval $ac_try) 2>&5
3944   ac_status=$?
3945   echo "$as_me:3945: \$? = $ac_status" >&5
3946   (exit $ac_status); }; }; then
3947
3948                 test -n "$verbose" && echo "    ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
3949
3950 echo "${as_me-configure}:3950: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
3951
3952                 cf_cv_find_linkage_utf8=yes
3953                 cf_cv_library_file_utf8="-lutf8"
3954                 break
3955 else
3956   echo "$as_me: failed program was:" >&5
3957 cat conftest.$ac_ext >&5
3958
3959                 CPPFLAGS="$cf_save_CPPFLAGS"
3960                 LIBS="$cf_save_LIBS"
3961                 LDFLAGS="$cf_save_LDFLAGS"
3962
3963 fi
3964 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
3965           fi
3966         done
3967         LIBS="$cf_save_LIBS"
3968         CPPFLAGS="$cf_save_CPPFLAGS"
3969         LDFLAGS="$cf_save_LDFLAGS"
3970       fi
3971
3972     else
3973       cf_cv_find_linkage_utf8=no
3974     fi
3975
3976 fi
3977 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
3978
3979 if test "$cf_cv_find_linkage_utf8" = yes ; then
3980 cf_cv_utf8_lib=add-on
3981 else
3982 cf_cv_utf8_lib=no
3983 fi
3984
3985 fi
3986 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
3987 fi
3988 echo "$as_me:3988: result: $cf_cv_utf8_lib" >&5
3989 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
3990
3991 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
3992 # ncurses/ncursesw:
3993 if test "$cf_cv_utf8_lib" = "add-on" ; then
3994         cat >>confdefs.h <<\EOF
3995 #define HAVE_LIBUTF8_H 1
3996 EOF
3997
3998 if test -n "$cf_cv_header_path_utf8" ; then
3999   for cf_add_incdir in $cf_cv_header_path_utf8
4000   do
4001         while test $cf_add_incdir != /usr/include
4002         do
4003           if test -d $cf_add_incdir
4004           then
4005                 cf_have_incdir=no
4006                 if test -n "$CFLAGS$CPPFLAGS" ; then
4007                   # a loop is needed to ensure we can add subdirs of existing dirs
4008                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
4009                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
4010                           cf_have_incdir=yes; break
4011                         fi
4012                   done
4013                 fi
4014
4015                 if test "$cf_have_incdir" = no ; then
4016                   if test "$cf_add_incdir" = /usr/local/include ; then
4017                         if test "$GCC" = yes
4018                         then
4019                           cf_save_CPPFLAGS=$CPPFLAGS
4020                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4021                           cat >conftest.$ac_ext <<_ACEOF
4022 #line 4022 "configure"
4023 #include "confdefs.h"
4024 #include <stdio.h>
4025 int
4026 main ()
4027 {
4028 printf("Hello")
4029   ;
4030   return 0;
4031 }
4032 _ACEOF
4033 rm -f conftest.$ac_objext
4034 if { (eval echo "$as_me:4034: \"$ac_compile\"") >&5
4035   (eval $ac_compile) 2>&5
4036   ac_status=$?
4037   echo "$as_me:4037: \$? = $ac_status" >&5
4038   (exit $ac_status); } &&
4039          { ac_try='test -s conftest.$ac_objext'
4040   { (eval echo "$as_me:4040: \"$ac_try\"") >&5
4041   (eval $ac_try) 2>&5
4042   ac_status=$?
4043   echo "$as_me:4043: \$? = $ac_status" >&5
4044   (exit $ac_status); }; }; then
4045   :
4046 else
4047   echo "$as_me: failed program was:" >&5
4048 cat conftest.$ac_ext >&5
4049 cf_have_incdir=yes
4050 fi
4051 rm -f conftest.$ac_objext conftest.$ac_ext
4052                           CPPFLAGS=$cf_save_CPPFLAGS
4053                         fi
4054                   fi
4055                 fi
4056
4057                 if test "$cf_have_incdir" = no ; then
4058                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
4059
4060 echo "${as_me-configure}:4060: testing adding $cf_add_incdir to include-path ..." 1>&5
4061
4062                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4063
4064                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
4065                   test "$cf_top_incdir" = "$cf_add_incdir" && break
4066                   cf_add_incdir="$cf_top_incdir"
4067                 else
4068                   break
4069                 fi
4070           fi
4071         done
4072   done
4073 fi
4074
4075 if test -n "$cf_cv_library_path_utf8" ; then
4076   for cf_add_libdir in $cf_cv_library_path_utf8
4077   do
4078     if test $cf_add_libdir = /usr/lib ; then
4079       :
4080     elif test -d $cf_add_libdir
4081     then
4082       cf_have_libdir=no
4083       if test -n "$LDFLAGS$LIBS" ; then
4084         # a loop is needed to ensure we can add subdirs of existing dirs
4085         for cf_test_libdir in $LDFLAGS $LIBS ; do
4086           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
4087             cf_have_libdir=yes; break
4088           fi
4089         done
4090       fi
4091       if test "$cf_have_libdir" = no ; then
4092         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
4093
4094 echo "${as_me-configure}:4094: testing adding $cf_add_libdir to library-path ..." 1>&5
4095
4096         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
4097       fi
4098     fi
4099   done
4100 fi
4101
4102         LIBS="-lutf8 $LIBS"
4103 fi
4104
4105 cf_ncuconfig_root=ncursesw
4106
4107 echo "Looking for ${cf_ncuconfig_root}-config"
4108 for ac_prog in ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
4109 do
4110   # Extract the first word of "$ac_prog", so it can be a program name with args.
4111 set dummy $ac_prog; ac_word=$2
4112 echo "$as_me:4112: checking for $ac_word" >&5
4113 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4114 if test "${ac_cv_path_NCURSES_CONFIG+set}" = set; then
4115   echo $ECHO_N "(cached) $ECHO_C" >&6
4116 else
4117   case $NCURSES_CONFIG in
4118   [\\/]* | ?:[\\/]*)
4119   ac_cv_path_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test with a path.
4120   ;;
4121   *)
4122   ac_save_IFS=$IFS; IFS=$ac_path_separator
4123 ac_dummy="$PATH"
4124 for ac_dir in $ac_dummy; do
4125   IFS=$ac_save_IFS
4126   test -z "$ac_dir" && ac_dir=.
4127   if $as_executable_p "$ac_dir/$ac_word"; then
4128    ac_cv_path_NCURSES_CONFIG="$ac_dir/$ac_word"
4129    echo "$as_me:4129: found $ac_dir/$ac_word" >&5
4130    break
4131 fi
4132 done
4133
4134   ;;
4135 esac
4136 fi
4137 NCURSES_CONFIG=$ac_cv_path_NCURSES_CONFIG
4138
4139 if test -n "$NCURSES_CONFIG"; then
4140   echo "$as_me:4140: result: $NCURSES_CONFIG" >&5
4141 echo "${ECHO_T}$NCURSES_CONFIG" >&6
4142 else
4143   echo "$as_me:4143: result: no" >&5
4144 echo "${ECHO_T}no" >&6
4145 fi
4146
4147   test -n "$NCURSES_CONFIG" && break
4148 done
4149 test -n "$NCURSES_CONFIG" || NCURSES_CONFIG="none"
4150
4151 if test "$NCURSES_CONFIG" != none ; then
4152
4153 cf_cv_ncurses_header=curses.h
4154
4155 CPPFLAGS="$CPPFLAGS `$NCURSES_CONFIG --cflags`"
4156 LIBS="`$NCURSES_CONFIG --libs` $LIBS"
4157
4158 cat >>confdefs.h <<\EOF
4159 #define NCURSES 1
4160 EOF
4161
4162 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
4163
4164 cat >>confdefs.h <<EOF
4165 #define $cf_nculib_ROOT 1
4166 EOF
4167
4168 cf_cv_ncurses_version=`$NCURSES_CONFIG --version`
4169
4170 else
4171
4172 cf_ncuhdr_root=ncursesw
4173
4174 test -n "$cf_cv_curses_dir" && \
4175 test "$cf_cv_curses_dir" != "no" && { \
4176
4177 if test -n "$cf_cv_curses_dir/include $cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
4178   for cf_add_incdir in $cf_cv_curses_dir/include $cf_cv_curses_dir/include/$cf_ncuhdr_root
4179   do
4180         while test $cf_add_incdir != /usr/include
4181         do
4182           if test -d $cf_add_incdir
4183           then
4184                 cf_have_incdir=no
4185                 if test -n "$CFLAGS$CPPFLAGS" ; then
4186                   # a loop is needed to ensure we can add subdirs of existing dirs
4187                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
4188                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
4189                           cf_have_incdir=yes; break
4190                         fi
4191                   done
4192                 fi
4193
4194                 if test "$cf_have_incdir" = no ; then
4195                   if test "$cf_add_incdir" = /usr/local/include ; then
4196                         if test "$GCC" = yes
4197                         then
4198                           cf_save_CPPFLAGS=$CPPFLAGS
4199                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4200                           cat >conftest.$ac_ext <<_ACEOF
4201 #line 4201 "configure"
4202 #include "confdefs.h"
4203 #include <stdio.h>
4204 int
4205 main ()
4206 {
4207 printf("Hello")
4208   ;
4209   return 0;
4210 }
4211 _ACEOF
4212 rm -f conftest.$ac_objext
4213 if { (eval echo "$as_me:4213: \"$ac_compile\"") >&5
4214   (eval $ac_compile) 2>&5
4215   ac_status=$?
4216   echo "$as_me:4216: \$? = $ac_status" >&5
4217   (exit $ac_status); } &&
4218          { ac_try='test -s conftest.$ac_objext'
4219   { (eval echo "$as_me:4219: \"$ac_try\"") >&5
4220   (eval $ac_try) 2>&5
4221   ac_status=$?
4222   echo "$as_me:4222: \$? = $ac_status" >&5
4223   (exit $ac_status); }; }; then
4224   :
4225 else
4226   echo "$as_me: failed program was:" >&5
4227 cat conftest.$ac_ext >&5
4228 cf_have_incdir=yes
4229 fi
4230 rm -f conftest.$ac_objext conftest.$ac_ext
4231                           CPPFLAGS=$cf_save_CPPFLAGS
4232                         fi
4233                   fi
4234                 fi
4235
4236                 if test "$cf_have_incdir" = no ; then
4237                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
4238
4239 echo "${as_me-configure}:4239: testing adding $cf_add_incdir to include-path ..." 1>&5
4240
4241                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4242
4243                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
4244                   test "$cf_top_incdir" = "$cf_add_incdir" && break
4245                   cf_add_incdir="$cf_top_incdir"
4246                 else
4247                   break
4248                 fi
4249           fi
4250         done
4251   done
4252 fi
4253
4254 }
4255
4256 echo "$as_me:4256: checking for $cf_ncuhdr_root header in include-path" >&5
4257 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
4258 if test "${cf_cv_ncurses_h+set}" = set; then
4259   echo $ECHO_N "(cached) $ECHO_C" >&6
4260 else
4261
4262         cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
4263         ( test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw ) && cf_header_list="$cf_header_list curses.h ncurses.h"
4264         for cf_header in $cf_header_list
4265         do
4266
4267         cat >conftest.$ac_ext <<_ACEOF
4268 #line 4268 "configure"
4269 #include "confdefs.h"
4270
4271 #define _XOPEN_SOURCE_EXTENDED
4272 #undef  HAVE_LIBUTF8_H  /* in case we used CF_UTF8_LIB */
4273 #define HAVE_LIBUTF8_H  /* to force ncurses' header file to use cchar_t */
4274
4275 #include <$cf_header>
4276 int
4277 main ()
4278 {
4279
4280 #ifdef NCURSES_VERSION
4281
4282 #ifndef WACS_BSSB
4283         make an error
4284 #endif
4285
4286 printf("%s\n", NCURSES_VERSION);
4287 #else
4288 #ifdef __NCURSES_H
4289 printf("old\n");
4290 #else
4291         make an error
4292 #endif
4293 #endif
4294
4295   ;
4296   return 0;
4297 }
4298 _ACEOF
4299 rm -f conftest.$ac_objext
4300 if { (eval echo "$as_me:4300: \"$ac_compile\"") >&5
4301   (eval $ac_compile) 2>&5
4302   ac_status=$?
4303   echo "$as_me:4303: \$? = $ac_status" >&5
4304   (exit $ac_status); } &&
4305          { ac_try='test -s conftest.$ac_objext'
4306   { (eval echo "$as_me:4306: \"$ac_try\"") >&5
4307   (eval $ac_try) 2>&5
4308   ac_status=$?
4309   echo "$as_me:4309: \$? = $ac_status" >&5
4310   (exit $ac_status); }; }; then
4311   cf_cv_ncurses_h=$cf_header
4312
4313 else
4314   echo "$as_me: failed program was:" >&5
4315 cat conftest.$ac_ext >&5
4316 cf_cv_ncurses_h=no
4317 fi
4318 rm -f conftest.$ac_objext conftest.$ac_ext
4319
4320                 test "$cf_cv_ncurses_h" != no && break
4321         done
4322
4323 fi
4324 echo "$as_me:4324: result: $cf_cv_ncurses_h" >&5
4325 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
4326
4327 if test "$cf_cv_ncurses_h" != no ; then
4328         cf_cv_ncurses_header=$cf_cv_ncurses_h
4329 else
4330
4331 echo "$as_me:4331: checking for $cf_ncuhdr_root include-path" >&5
4332 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
4333 if test "${cf_cv_ncurses_h2+set}" = set; then
4334   echo $ECHO_N "(cached) $ECHO_C" >&6
4335 else
4336
4337         test -n "$verbose" && echo
4338
4339 cf_search=
4340 cf_header_path_list=""
4341 if test -n "${CFLAGS}${CPPFLAGS}" ; then
4342         for cf_header_path in $CPPFLAGS $CFLAGS
4343         do
4344                 case $cf_header_path in #(vi
4345                 -I*)
4346                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
4347
4348 test "$cf_header_path" != "NONE" && \
4349 test -d "$cf_header_path" && \
4350  {
4351         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
4352         test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
4353         test -d $cf_header_path/include/$cf_ncuhdr_root &&       cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
4354         test -d $cf_header_path/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
4355         test -d $cf_header_path/$cf_ncuhdr_root/include &&       cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
4356         test -d $cf_header_path/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
4357 }
4358
4359                         cf_header_path_list="$cf_header_path_list $cf_search"
4360                         ;;
4361                 esac
4362         done
4363 fi
4364
4365 cf_search=""
4366
4367 test "/usr" != "$prefix" && \
4368 test -d "/usr" && \
4369 (test $prefix = NONE || test -d $prefix) && {
4370         test -n "$verbose" && echo "    ... testing for include-directories under /usr"
4371         test -d /usr/include &&          cf_search="$cf_search /usr/include"
4372         test -d /usr/include/$cf_ncuhdr_root &&       cf_search="$cf_search /usr/include/$cf_ncuhdr_root"
4373         test -d /usr/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search /usr/include/$cf_ncuhdr_root/include"
4374         test -d /usr/$cf_ncuhdr_root/include &&       cf_search="$cf_search /usr/$cf_ncuhdr_root/include"
4375         test -d /usr/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search /usr/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
4376 }
4377
4378 test "$prefix" != "NONE" && \
4379 test -d "$prefix" && \
4380  {
4381         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
4382         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
4383         test -d $prefix/include/$cf_ncuhdr_root &&       cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
4384         test -d $prefix/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
4385         test -d $prefix/$cf_ncuhdr_root/include &&       cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
4386         test -d $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
4387 }
4388
4389 test "/usr/local" != "$prefix" && \
4390 test -d "/usr/local" && \
4391 (test $prefix = NONE || test -d $prefix) && {
4392         test -n "$verbose" && echo "    ... testing for include-directories under /usr/local"
4393         test -d /usr/local/include &&          cf_search="$cf_search /usr/local/include"
4394         test -d /usr/local/include/$cf_ncuhdr_root &&       cf_search="$cf_search /usr/local/include/$cf_ncuhdr_root"
4395         test -d /usr/local/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search /usr/local/include/$cf_ncuhdr_root/include"
4396         test -d /usr/local/$cf_ncuhdr_root/include &&       cf_search="$cf_search /usr/local/$cf_ncuhdr_root/include"
4397         test -d /usr/local/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search /usr/local/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
4398 }
4399
4400 test "/opt" != "$prefix" && \
4401 test -d "/opt" && \
4402 (test $prefix = NONE || test -d $prefix) && {
4403         test -n "$verbose" && echo "    ... testing for include-directories under /opt"
4404         test -d /opt/include &&          cf_search="$cf_search /opt/include"
4405         test -d /opt/include/$cf_ncuhdr_root &&       cf_search="$cf_search /opt/include/$cf_ncuhdr_root"
4406         test -d /opt/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search /opt/include/$cf_ncuhdr_root/include"
4407         test -d /opt/$cf_ncuhdr_root/include &&       cf_search="$cf_search /opt/$cf_ncuhdr_root/include"
4408         test -d /opt/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search /opt/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
4409 }
4410
4411 test "$HOME" != "$prefix" && \
4412 test -d "$HOME" && \
4413 (test $prefix = NONE || test -d $prefix) && {
4414         test -n "$verbose" && echo "    ... testing for include-directories under $HOME"
4415         test -d $HOME/include &&          cf_search="$cf_search $HOME/include"
4416         test -d $HOME/include/$cf_ncuhdr_root &&       cf_search="$cf_search $HOME/include/$cf_ncuhdr_root"
4417         test -d $HOME/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search $HOME/include/$cf_ncuhdr_root/include"
4418         test -d $HOME/$cf_ncuhdr_root/include &&       cf_search="$cf_search $HOME/$cf_ncuhdr_root/include"
4419         test -d $HOME/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search $HOME/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
4420 }
4421
4422 test "$includedir" != NONE && \
4423 test "$includedir" != "/usr/include" && \
4424 test -d "$includedir" && {
4425         test -d $includedir &&    cf_search="$cf_search $includedir"
4426         test -d $includedir/$cf_ncuhdr_root && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
4427 }
4428
4429 test "$oldincludedir" != NONE && \
4430 test "$oldincludedir" != "/usr/include" && \
4431 test -d "$oldincludedir" && {
4432         test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
4433         test -d $oldincludedir/$cf_ncuhdr_root && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
4434 }
4435
4436 cf_search="$cf_header_path_list $cf_search"
4437
4438         test -n "$verbose" && echo search path $cf_search
4439         cf_save2_CPPFLAGS="$CPPFLAGS"
4440         for cf_incdir in $cf_search
4441         do
4442
4443 if test -n "$cf_incdir" ; then
4444   for cf_add_incdir in $cf_incdir
4445   do
4446         while test $cf_add_incdir != /usr/include
4447         do
4448           if test -d $cf_add_incdir
4449           then
4450                 cf_have_incdir=no
4451                 if test -n "$CFLAGS$CPPFLAGS" ; then
4452                   # a loop is needed to ensure we can add subdirs of existing dirs
4453                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
4454                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
4455                           cf_have_incdir=yes; break
4456                         fi
4457                   done
4458                 fi
4459
4460                 if test "$cf_have_incdir" = no ; then
4461                   if test "$cf_add_incdir" = /usr/local/include ; then
4462                         if test "$GCC" = yes
4463                         then
4464                           cf_save_CPPFLAGS=$CPPFLAGS
4465                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4466                           cat >conftest.$ac_ext <<_ACEOF
4467 #line 4467 "configure"
4468 #include "confdefs.h"
4469 #include <stdio.h>
4470 int
4471 main ()
4472 {
4473 printf("Hello")
4474   ;
4475   return 0;
4476 }
4477 _ACEOF
4478 rm -f conftest.$ac_objext
4479 if { (eval echo "$as_me:4479: \"$ac_compile\"") >&5
4480   (eval $ac_compile) 2>&5
4481   ac_status=$?
4482   echo "$as_me:4482: \$? = $ac_status" >&5
4483   (exit $ac_status); } &&
4484          { ac_try='test -s conftest.$ac_objext'
4485   { (eval echo "$as_me:4485: \"$ac_try\"") >&5
4486   (eval $ac_try) 2>&5
4487   ac_status=$?
4488   echo "$as_me:4488: \$? = $ac_status" >&5
4489   (exit $ac_status); }; }; then
4490   :
4491 else
4492   echo "$as_me: failed program was:" >&5
4493 cat conftest.$ac_ext >&5
4494 cf_have_incdir=yes
4495 fi
4496 rm -f conftest.$ac_objext conftest.$ac_ext
4497                           CPPFLAGS=$cf_save_CPPFLAGS
4498                         fi
4499                   fi
4500                 fi
4501
4502                 if test "$cf_have_incdir" = no ; then
4503                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
4504
4505 echo "${as_me-configure}:4505: testing adding $cf_add_incdir to include-path ..." 1>&5
4506
4507                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4508
4509                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
4510                   test "$cf_top_incdir" = "$cf_add_incdir" && break
4511                   cf_add_incdir="$cf_top_incdir"
4512                 else
4513                   break
4514                 fi
4515           fi
4516         done
4517   done
4518 fi
4519
4520                 for cf_header in \
4521                         ncurses.h \
4522                         curses.h
4523                 do
4524
4525         cat >conftest.$ac_ext <<_ACEOF
4526 #line 4526 "configure"
4527 #include "confdefs.h"
4528
4529 #include <$cf_header>
4530 int
4531 main ()
4532 {
4533
4534 #ifdef NCURSES_VERSION
4535
4536 printf("%s\n", NCURSES_VERSION);
4537 #else
4538 #ifdef __NCURSES_H
4539 printf("old\n");
4540 #else
4541         make an error
4542 #endif
4543 #endif
4544
4545   ;
4546   return 0;
4547 }
4548 _ACEOF
4549 rm -f conftest.$ac_objext
4550 if { (eval echo "$as_me:4550: \"$ac_compile\"") >&5
4551   (eval $ac_compile) 2>&5
4552   ac_status=$?
4553   echo "$as_me:4553: \$? = $ac_status" >&5
4554   (exit $ac_status); } &&
4555          { ac_try='test -s conftest.$ac_objext'
4556   { (eval echo "$as_me:4556: \"$ac_try\"") >&5
4557   (eval $ac_try) 2>&5
4558   ac_status=$?
4559   echo "$as_me:4559: \$? = $ac_status" >&5
4560   (exit $ac_status); }; }; then
4561   cf_cv_ncurses_h2=$cf_header
4562
4563 else
4564   echo "$as_me: failed program was:" >&5
4565 cat conftest.$ac_ext >&5
4566 cf_cv_ncurses_h2=no
4567 fi
4568 rm -f conftest.$ac_objext conftest.$ac_ext
4569
4570                         if test "$cf_cv_ncurses_h2" != no ; then
4571                                 cf_cv_ncurses_h2=$cf_incdir/$cf_header
4572                                 test -n "$verbose" && echo $ac_n "      ... found $ac_c" 1>&6
4573                                 break
4574                         fi
4575                         test -n "$verbose" && echo "    ... tested $cf_incdir/$cf_header" 1>&6
4576                 done
4577                 CPPFLAGS="$cf_save2_CPPFLAGS"
4578                 test "$cf_cv_ncurses_h2" != no && break
4579         done
4580         test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:4580: error: not found" >&5
4581 echo "$as_me: error: not found" >&2;}
4582    { (exit 1); exit 1; }; }
4583
4584 fi
4585 echo "$as_me:4585: result: $cf_cv_ncurses_h2" >&5
4586 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
4587
4588         cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's%/[^/]*$%%'`
4589         cf_cv_ncurses_header=`basename $cf_cv_ncurses_h2`
4590         if test `basename $cf_1st_incdir` = $cf_ncuhdr_root ; then
4591                 cf_cv_ncurses_header=$cf_ncuhdr_root/$cf_cv_ncurses_header
4592         fi
4593
4594 if test -n "$cf_1st_incdir" ; then
4595   for cf_add_incdir in $cf_1st_incdir
4596   do
4597         while test $cf_add_incdir != /usr/include
4598         do
4599           if test -d $cf_add_incdir
4600           then
4601                 cf_have_incdir=no
4602                 if test -n "$CFLAGS$CPPFLAGS" ; then
4603                   # a loop is needed to ensure we can add subdirs of existing dirs
4604                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
4605                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
4606                           cf_have_incdir=yes; break
4607                         fi
4608                   done
4609                 fi
4610
4611                 if test "$cf_have_incdir" = no ; then
4612                   if test "$cf_add_incdir" = /usr/local/include ; then
4613                         if test "$GCC" = yes
4614                         then
4615                           cf_save_CPPFLAGS=$CPPFLAGS
4616                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4617                           cat >conftest.$ac_ext <<_ACEOF
4618 #line 4618 "configure"
4619 #include "confdefs.h"
4620 #include <stdio.h>
4621 int
4622 main ()
4623 {
4624 printf("Hello")
4625   ;
4626   return 0;
4627 }
4628 _ACEOF
4629 rm -f conftest.$ac_objext
4630 if { (eval echo "$as_me:4630: \"$ac_compile\"") >&5
4631   (eval $ac_compile) 2>&5
4632   ac_status=$?
4633   echo "$as_me:4633: \$? = $ac_status" >&5
4634   (exit $ac_status); } &&
4635          { ac_try='test -s conftest.$ac_objext'
4636   { (eval echo "$as_me:4636: \"$ac_try\"") >&5
4637   (eval $ac_try) 2>&5
4638   ac_status=$?
4639   echo "$as_me:4639: \$? = $ac_status" >&5
4640   (exit $ac_status); }; }; then
4641   :
4642 else
4643   echo "$as_me: failed program was:" >&5
4644 cat conftest.$ac_ext >&5
4645 cf_have_incdir=yes
4646 fi
4647 rm -f conftest.$ac_objext conftest.$ac_ext
4648                           CPPFLAGS=$cf_save_CPPFLAGS
4649                         fi
4650                   fi
4651                 fi
4652
4653                 if test "$cf_have_incdir" = no ; then
4654                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
4655
4656 echo "${as_me-configure}:4656: testing adding $cf_add_incdir to include-path ..." 1>&5
4657
4658                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4659
4660                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
4661                   test "$cf_top_incdir" = "$cf_add_incdir" && break
4662                   cf_add_incdir="$cf_top_incdir"
4663                 else
4664                   break
4665                 fi
4666           fi
4667         done
4668   done
4669 fi
4670
4671 fi
4672
4673 # Set definitions to allow ifdef'ing for ncurses.h
4674
4675 case $cf_cv_ncurses_header in # (vi
4676 *ncurses.h)
4677         cat >>confdefs.h <<\EOF
4678 #define HAVE_NCURSES_H 1
4679 EOF
4680
4681         ;;
4682 esac
4683
4684 case $cf_cv_ncurses_header in # (vi
4685 ncurses/curses.h|ncurses/ncurses.h)
4686         cat >>confdefs.h <<\EOF
4687 #define HAVE_NCURSES_NCURSES_H 1
4688 EOF
4689
4690         ;;
4691 ncursesw/curses.h|ncursesw/ncurses.h)
4692         cat >>confdefs.h <<\EOF
4693 #define HAVE_NCURSESW_NCURSES_H 1
4694 EOF
4695
4696         ;;
4697 esac
4698
4699 echo "$as_me:4699: checking for terminfo header" >&5
4700 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
4701 if test "${cf_cv_term_header+set}" = set; then
4702   echo $ECHO_N "(cached) $ECHO_C" >&6
4703 else
4704
4705 case ${cf_cv_ncurses_header} in #(vi
4706 */ncurses.h|*/ncursesw.h) #(vi
4707         cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
4708         ;;
4709 *)
4710         cf_term_header=term.h
4711         ;;
4712 esac
4713
4714 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
4715 do
4716 cat >conftest.$ac_ext <<_ACEOF
4717 #line 4717 "configure"
4718 #include "confdefs.h"
4719 #include <stdio.h>
4720 #include <${cf_cv_ncurses_header-curses.h}>
4721 #include <$cf_test>
4722
4723 int
4724 main ()
4725 {
4726 int x = auto_left_margin
4727   ;
4728   return 0;
4729 }
4730 _ACEOF
4731 rm -f conftest.$ac_objext
4732 if { (eval echo "$as_me:4732: \"$ac_compile\"") >&5
4733   (eval $ac_compile) 2>&5
4734   ac_status=$?
4735   echo "$as_me:4735: \$? = $ac_status" >&5
4736   (exit $ac_status); } &&
4737          { ac_try='test -s conftest.$ac_objext'
4738   { (eval echo "$as_me:4738: \"$ac_try\"") >&5
4739   (eval $ac_try) 2>&5
4740   ac_status=$?
4741   echo "$as_me:4741: \$? = $ac_status" >&5
4742   (exit $ac_status); }; }; then
4743
4744         cf_cv_term_header="$cf_test"
4745 else
4746   echo "$as_me: failed program was:" >&5
4747 cat conftest.$ac_ext >&5
4748
4749         cf_cv_term_header=unknown
4750
4751 fi
4752 rm -f conftest.$ac_objext conftest.$ac_ext
4753         test "$cf_cv_term_header" != unknown && break
4754 done
4755
4756 fi
4757 echo "$as_me:4757: result: $cf_cv_term_header" >&5
4758 echo "${ECHO_T}$cf_cv_term_header" >&6
4759
4760 # Set definitions to allow ifdef'ing to accommodate subdirectories
4761
4762 case $cf_cv_term_header in # (vi
4763 *term.h)
4764         cat >>confdefs.h <<\EOF
4765 #define HAVE_TERM_H 1
4766 EOF
4767
4768         ;;
4769 esac
4770
4771 case $cf_cv_term_header in # (vi
4772 ncurses/term.h) #(vi
4773         cat >>confdefs.h <<\EOF
4774 #define HAVE_NCURSES_TERM_H 1
4775 EOF
4776
4777         ;;
4778 ncursesw/term.h)
4779         cat >>confdefs.h <<\EOF
4780 #define HAVE_NCURSESW_TERM_H 1
4781 EOF
4782
4783         ;;
4784 esac
4785
4786 # some applications need this, but should check for NCURSES_VERSION
4787 cat >>confdefs.h <<\EOF
4788 #define NCURSES 1
4789 EOF
4790
4791 echo "$as_me:4791: checking for ncurses version" >&5
4792 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
4793 if test "${cf_cv_ncurses_version+set}" = set; then
4794   echo $ECHO_N "(cached) $ECHO_C" >&6
4795 else
4796
4797         cf_cv_ncurses_version=no
4798         cf_tempfile=out$$
4799         rm -f $cf_tempfile
4800         if test "$cross_compiling" = yes; then
4801
4802         # This will not work if the preprocessor splits the line after the
4803         # Autoconf token.  The 'unproto' program does that.
4804         cat > conftest.$ac_ext <<EOF
4805 #include <${cf_cv_ncurses_header-curses.h}>
4806 #undef Autoconf
4807 #ifdef NCURSES_VERSION
4808 Autoconf NCURSES_VERSION
4809 #else
4810 #ifdef __NCURSES_H
4811 Autoconf "old"
4812 #endif
4813 ;
4814 #endif
4815 EOF
4816         cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
4817         { (eval echo "$as_me:4817: \"$cf_try\"") >&5
4818   (eval $cf_try) 2>&5
4819   ac_status=$?
4820   echo "$as_me:4820: \$? = $ac_status" >&5
4821   (exit $ac_status); }
4822         if test -f conftest.out ; then
4823                 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
4824                 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
4825                 rm -f conftest.out
4826         fi
4827
4828 else
4829   cat >conftest.$ac_ext <<_ACEOF
4830 #line 4830 "configure"
4831 #include "confdefs.h"
4832
4833 #include <${cf_cv_ncurses_header-curses.h}>
4834 #include <stdio.h>
4835 int main()
4836 {
4837         FILE *fp = fopen("$cf_tempfile", "w");
4838 #ifdef NCURSES_VERSION
4839 # ifdef NCURSES_VERSION_PATCH
4840         fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
4841 # else
4842         fprintf(fp, "%s\n", NCURSES_VERSION);
4843 # endif
4844 #else
4845 # ifdef __NCURSES_H
4846         fprintf(fp, "old\n");
4847 # else
4848         make an error
4849 # endif
4850 #endif
4851         ${cf_cv_main_return-return}(0);
4852 }
4853 _ACEOF
4854 rm -f conftest$ac_exeext
4855 if { (eval echo "$as_me:4855: \"$ac_link\"") >&5
4856   (eval $ac_link) 2>&5
4857   ac_status=$?
4858   echo "$as_me:4858: \$? = $ac_status" >&5
4859   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4860   { (eval echo "$as_me:4860: \"$ac_try\"") >&5
4861   (eval $ac_try) 2>&5
4862   ac_status=$?
4863   echo "$as_me:4863: \$? = $ac_status" >&5
4864   (exit $ac_status); }; }; then
4865
4866         cf_cv_ncurses_version=`cat $cf_tempfile`
4867 else
4868   echo "$as_me: program exited with status $ac_status" >&5
4869 echo "$as_me: failed program was:" >&5
4870 cat conftest.$ac_ext >&5
4871 fi
4872 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4873 fi
4874         rm -f $cf_tempfile
4875
4876 fi
4877 echo "$as_me:4877: result: $cf_cv_ncurses_version" >&5
4878 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
4879 test "$cf_cv_ncurses_version" = no || cat >>confdefs.h <<\EOF
4880 #define NCURSES 1
4881 EOF
4882
4883 cf_nculib_root=ncursesw
4884         # This works, except for the special case where we find gpm, but
4885         # ncurses is in a nonstandard location via $LIBS, and we really want
4886         # to link gpm.
4887 cf_ncurses_LIBS=""
4888 cf_ncurses_SAVE="$LIBS"
4889 echo "$as_me:4889: checking for Gpm_Open in -lgpm" >&5
4890 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
4891 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
4892   echo $ECHO_N "(cached) $ECHO_C" >&6
4893 else
4894   ac_check_lib_save_LIBS=$LIBS
4895 LIBS="-lgpm  $LIBS"
4896 cat >conftest.$ac_ext <<_ACEOF
4897 #line 4897 "configure"
4898 #include "confdefs.h"
4899
4900 /* Override any gcc2 internal prototype to avoid an error.  */
4901 #ifdef __cplusplus
4902 extern "C"
4903 #endif
4904 /* We use char because int might match the return type of a gcc2
4905    builtin and then its argument prototype would still apply.  */
4906 char Gpm_Open ();
4907 int
4908 main ()
4909 {
4910 Gpm_Open ();
4911   ;
4912   return 0;
4913 }
4914 _ACEOF
4915 rm -f conftest.$ac_objext conftest$ac_exeext
4916 if { (eval echo "$as_me:4916: \"$ac_link\"") >&5
4917   (eval $ac_link) 2>&5
4918   ac_status=$?
4919   echo "$as_me:4919: \$? = $ac_status" >&5
4920   (exit $ac_status); } &&
4921          { ac_try='test -s conftest$ac_exeext'
4922   { (eval echo "$as_me:4922: \"$ac_try\"") >&5
4923   (eval $ac_try) 2>&5
4924   ac_status=$?
4925   echo "$as_me:4925: \$? = $ac_status" >&5
4926   (exit $ac_status); }; }; then
4927   ac_cv_lib_gpm_Gpm_Open=yes
4928 else
4929   echo "$as_me: failed program was:" >&5
4930 cat conftest.$ac_ext >&5
4931 ac_cv_lib_gpm_Gpm_Open=no
4932 fi
4933 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4934 LIBS=$ac_check_lib_save_LIBS
4935 fi
4936 echo "$as_me:4936: result: $ac_cv_lib_gpm_Gpm_Open" >&5
4937 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
4938 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
4939   echo "$as_me:4939: checking for initscr in -lgpm" >&5
4940 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
4941 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
4942   echo $ECHO_N "(cached) $ECHO_C" >&6
4943 else
4944   ac_check_lib_save_LIBS=$LIBS
4945 LIBS="-lgpm  $LIBS"
4946 cat >conftest.$ac_ext <<_ACEOF
4947 #line 4947 "configure"
4948 #include "confdefs.h"
4949
4950 /* Override any gcc2 internal prototype to avoid an error.  */
4951 #ifdef __cplusplus
4952 extern "C"
4953 #endif
4954 /* We use char because int might match the return type of a gcc2
4955    builtin and then its argument prototype would still apply.  */
4956 char initscr ();
4957 int
4958 main ()
4959 {
4960 initscr ();
4961   ;
4962   return 0;
4963 }
4964 _ACEOF
4965 rm -f conftest.$ac_objext conftest$ac_exeext
4966 if { (eval echo "$as_me:4966: \"$ac_link\"") >&5
4967   (eval $ac_link) 2>&5
4968   ac_status=$?
4969   echo "$as_me:4969: \$? = $ac_status" >&5
4970   (exit $ac_status); } &&
4971          { ac_try='test -s conftest$ac_exeext'
4972   { (eval echo "$as_me:4972: \"$ac_try\"") >&5
4973   (eval $ac_try) 2>&5
4974   ac_status=$?
4975   echo "$as_me:4975: \$? = $ac_status" >&5
4976   (exit $ac_status); }; }; then
4977   ac_cv_lib_gpm_initscr=yes
4978 else
4979   echo "$as_me: failed program was:" >&5
4980 cat conftest.$ac_ext >&5
4981 ac_cv_lib_gpm_initscr=no
4982 fi
4983 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4984 LIBS=$ac_check_lib_save_LIBS
4985 fi
4986 echo "$as_me:4986: result: $ac_cv_lib_gpm_initscr" >&5
4987 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
4988 if test $ac_cv_lib_gpm_initscr = yes; then
4989   LIBS="$cf_ncurses_SAVE"
4990 else
4991   cf_ncurses_LIBS="-lgpm"
4992 fi
4993
4994 fi
4995
4996 case $host_os in #(vi
4997 freebsd*)
4998         # This is only necessary if you are linking against an obsolete
4999         # version of ncurses (but it should do no harm, since it's static).
5000         if test "$cf_nculib_root" = ncurses ; then
5001                 echo "$as_me:5001: checking for tgoto in -lmytinfo" >&5
5002 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
5003 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
5004   echo $ECHO_N "(cached) $ECHO_C" >&6
5005 else
5006   ac_check_lib_save_LIBS=$LIBS
5007 LIBS="-lmytinfo  $LIBS"
5008 cat >conftest.$ac_ext <<_ACEOF
5009 #line 5009 "configure"
5010 #include "confdefs.h"
5011
5012 /* Override any gcc2 internal prototype to avoid an error.  */
5013 #ifdef __cplusplus
5014 extern "C"
5015 #endif
5016 /* We use char because int might match the return type of a gcc2
5017    builtin and then its argument prototype would still apply.  */
5018 char tgoto ();
5019 int
5020 main ()
5021 {
5022 tgoto ();
5023   ;
5024   return 0;
5025 }
5026 _ACEOF
5027 rm -f conftest.$ac_objext conftest$ac_exeext
5028 if { (eval echo "$as_me:5028: \"$ac_link\"") >&5
5029   (eval $ac_link) 2>&5
5030   ac_status=$?
5031   echo "$as_me:5031: \$? = $ac_status" >&5
5032   (exit $ac_status); } &&
5033          { ac_try='test -s conftest$ac_exeext'
5034   { (eval echo "$as_me:5034: \"$ac_try\"") >&5
5035   (eval $ac_try) 2>&5
5036   ac_status=$?
5037   echo "$as_me:5037: \$? = $ac_status" >&5
5038   (exit $ac_status); }; }; then
5039   ac_cv_lib_mytinfo_tgoto=yes
5040 else
5041   echo "$as_me: failed program was:" >&5
5042 cat conftest.$ac_ext >&5
5043 ac_cv_lib_mytinfo_tgoto=no
5044 fi
5045 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5046 LIBS=$ac_check_lib_save_LIBS
5047 fi
5048 echo "$as_me:5048: result: $ac_cv_lib_mytinfo_tgoto" >&5
5049 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
5050 if test $ac_cv_lib_mytinfo_tgoto = yes; then
5051   cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
5052 fi
5053
5054         fi
5055         ;;
5056 esac
5057
5058 LIBS="$cf_ncurses_LIBS $LIBS"
5059
5060 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
5061 then
5062
5063 if test -n "$cf_cv_curses_dir/lib" ; then
5064   for cf_add_libdir in $cf_cv_curses_dir/lib
5065   do
5066     if test $cf_add_libdir = /usr/lib ; then
5067       :
5068     elif test -d $cf_add_libdir
5069     then
5070       cf_have_libdir=no
5071       if test -n "$LDFLAGS$LIBS" ; then
5072         # a loop is needed to ensure we can add subdirs of existing dirs
5073         for cf_test_libdir in $LDFLAGS $LIBS ; do
5074           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
5075             cf_have_libdir=yes; break
5076           fi
5077         done
5078       fi
5079       if test "$cf_have_libdir" = no ; then
5080         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
5081
5082 echo "${as_me-configure}:5082: testing adding $cf_add_libdir to library-path ..." 1>&5
5083
5084         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
5085       fi
5086     fi
5087   done
5088 fi
5089
5090         LIBS="-l$cf_nculib_root $LIBS"
5091 else
5092
5093         eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
5094         cf_libdir=""
5095         echo "$as_me:5095: checking for initscr" >&5
5096 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
5097 if test "${ac_cv_func_initscr+set}" = set; then
5098   echo $ECHO_N "(cached) $ECHO_C" >&6
5099 else
5100   cat >conftest.$ac_ext <<_ACEOF
5101 #line 5101 "configure"
5102 #include "confdefs.h"
5103 /* System header to define __stub macros and hopefully few prototypes,
5104     which can conflict with char initscr (); below.  */
5105 #include <assert.h>
5106 /* Override any gcc2 internal prototype to avoid an error.  */
5107 #ifdef __cplusplus
5108 extern "C"
5109 #endif
5110 /* We use char because int might match the return type of a gcc2
5111    builtin and then its argument prototype would still apply.  */
5112 char initscr ();
5113 char (*f) ();
5114
5115 int
5116 main ()
5117 {
5118 /* The GNU C library defines this for functions which it implements
5119     to always fail with ENOSYS.  Some functions are actually named
5120     something starting with __ and the normal name is an alias.  */
5121 #if defined (__stub_initscr) || defined (__stub___initscr)
5122 choke me
5123 #else
5124 f = initscr;
5125 #endif
5126
5127   ;
5128   return 0;
5129 }
5130 _ACEOF
5131 rm -f conftest.$ac_objext conftest$ac_exeext
5132 if { (eval echo "$as_me:5132: \"$ac_link\"") >&5
5133   (eval $ac_link) 2>&5
5134   ac_status=$?
5135   echo "$as_me:5135: \$? = $ac_status" >&5
5136   (exit $ac_status); } &&
5137          { ac_try='test -s conftest$ac_exeext'
5138   { (eval echo "$as_me:5138: \"$ac_try\"") >&5
5139   (eval $ac_try) 2>&5
5140   ac_status=$?
5141   echo "$as_me:5141: \$? = $ac_status" >&5
5142   (exit $ac_status); }; }; then
5143   ac_cv_func_initscr=yes
5144 else
5145   echo "$as_me: failed program was:" >&5
5146 cat conftest.$ac_ext >&5
5147 ac_cv_func_initscr=no
5148 fi
5149 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5150 fi
5151 echo "$as_me:5151: result: $ac_cv_func_initscr" >&5
5152 echo "${ECHO_T}$ac_cv_func_initscr" >&6
5153 if test $ac_cv_func_initscr = yes; then
5154   eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
5155 else
5156
5157                 cf_save_LIBS="$LIBS"
5158                 echo "$as_me:5158: checking for initscr in -l$cf_nculib_root" >&5
5159 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
5160                 LIBS="-l$cf_nculib_root $LIBS"
5161                 cat >conftest.$ac_ext <<_ACEOF
5162 #line 5162 "configure"
5163 #include "confdefs.h"
5164 #include <${cf_cv_ncurses_header-curses.h}>
5165 int
5166 main ()
5167 {
5168 initscr()
5169   ;
5170   return 0;
5171 }
5172 _ACEOF
5173 rm -f conftest.$ac_objext conftest$ac_exeext
5174 if { (eval echo "$as_me:5174: \"$ac_link\"") >&5
5175   (eval $ac_link) 2>&5
5176   ac_status=$?
5177   echo "$as_me:5177: \$? = $ac_status" >&5
5178   (exit $ac_status); } &&
5179          { ac_try='test -s conftest$ac_exeext'
5180   { (eval echo "$as_me:5180: \"$ac_try\"") >&5
5181   (eval $ac_try) 2>&5
5182   ac_status=$?
5183   echo "$as_me:5183: \$? = $ac_status" >&5
5184   (exit $ac_status); }; }; then
5185   echo "$as_me:5185: result: yes" >&5
5186 echo "${ECHO_T}yes" >&6
5187                          eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
5188
5189 else
5190   echo "$as_me: failed program was:" >&5
5191 cat conftest.$ac_ext >&5
5192 echo "$as_me:5192: result: no" >&5
5193 echo "${ECHO_T}no" >&6
5194
5195 cf_library_path_list=""
5196 if test -n "${LDFLAGS}${LIBS}" ; then
5197         for cf_library_path in $LDFLAGS $LIBS
5198         do
5199                 case $cf_library_path in #(vi
5200                 -L*)
5201                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
5202
5203 test "$cf_library_path" != "NONE" && \
5204 test -d "$cf_library_path" && \
5205  {
5206         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
5207         test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
5208         test -d $cf_library_path/lib/$cf_nculib_root &&       cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
5209         test -d $cf_library_path/lib/$cf_nculib_root/lib &&    cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
5210         test -d $cf_library_path/$cf_nculib_root/lib &&       cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
5211         test -d $cf_library_path/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib/$cf_nculib_root"
5212 }
5213
5214                         cf_library_path_list="$cf_library_path_list $cf_search"
5215                         ;;
5216                 esac
5217         done
5218 fi
5219
5220 cf_search=""
5221
5222 test "/usr" != "$prefix" && \
5223 test -d "/usr" && \
5224 (test $prefix = NONE || test -d $prefix) && {
5225         test -n "$verbose" && echo "    ... testing for lib-directories under /usr"
5226         test -d /usr/lib &&          cf_search="$cf_search /usr/lib"
5227         test -d /usr/lib/$cf_nculib_root &&       cf_search="$cf_search /usr/lib/$cf_nculib_root"
5228         test -d /usr/lib/$cf_nculib_root/lib &&    cf_search="$cf_search /usr/lib/$cf_nculib_root/lib"
5229         test -d /usr/$cf_nculib_root/lib &&       cf_search="$cf_search /usr/$cf_nculib_root/lib"
5230         test -d /usr/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search /usr/$cf_nculib_root/lib/$cf_nculib_root"
5231 }
5232
5233 test "$prefix" != "NONE" && \
5234 test -d "$prefix" && \
5235  {
5236         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
5237         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
5238         test -d $prefix/lib/$cf_nculib_root &&       cf_search="$cf_search $prefix/lib/$cf_nculib_root"
5239         test -d $prefix/lib/$cf_nculib_root/lib &&    cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
5240         test -d $prefix/$cf_nculib_root/lib &&       cf_search="$cf_search $prefix/$cf_nculib_root/lib"
5241         test -d $prefix/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
5242 }
5243
5244 test "/usr/local" != "$prefix" && \
5245 test -d "/usr/local" && \
5246 (test $prefix = NONE || test -d $prefix) && {
5247         test -n "$verbose" && echo "    ... testing for lib-directories under /usr/local"
5248         test -d /usr/local/lib &&          cf_search="$cf_search /usr/local/lib"
5249         test -d /usr/local/lib/$cf_nculib_root &&       cf_search="$cf_search /usr/local/lib/$cf_nculib_root"
5250         test -d /usr/local/lib/$cf_nculib_root/lib &&    cf_search="$cf_search /usr/local/lib/$cf_nculib_root/lib"
5251         test -d /usr/local/$cf_nculib_root/lib &&       cf_search="$cf_search /usr/local/$cf_nculib_root/lib"
5252         test -d /usr/local/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search /usr/local/$cf_nculib_root/lib/$cf_nculib_root"
5253 }
5254
5255 test "/opt" != "$prefix" && \
5256 test -d "/opt" && \
5257 (test $prefix = NONE || test -d $prefix) && {
5258         test -n "$verbose" && echo "    ... testing for lib-directories under /opt"
5259         test -d /opt/lib &&          cf_search="$cf_search /opt/lib"
5260         test -d /opt/lib/$cf_nculib_root &&       cf_search="$cf_search /opt/lib/$cf_nculib_root"
5261         test -d /opt/lib/$cf_nculib_root/lib &&    cf_search="$cf_search /opt/lib/$cf_nculib_root/lib"
5262         test -d /opt/$cf_nculib_root/lib &&       cf_search="$cf_search /opt/$cf_nculib_root/lib"
5263         test -d /opt/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search /opt/$cf_nculib_root/lib/$cf_nculib_root"
5264 }
5265
5266 test "$HOME" != "$prefix" && \
5267 test -d "$HOME" && \
5268 (test $prefix = NONE || test -d $prefix) && {
5269         test -n "$verbose" && echo "    ... testing for lib-directories under $HOME"
5270         test -d $HOME/lib &&          cf_search="$cf_search $HOME/lib"
5271         test -d $HOME/lib/$cf_nculib_root &&       cf_search="$cf_search $HOME/lib/$cf_nculib_root"
5272         test -d $HOME/lib/$cf_nculib_root/lib &&    cf_search="$cf_search $HOME/lib/$cf_nculib_root/lib"
5273         test -d $HOME/$cf_nculib_root/lib &&       cf_search="$cf_search $HOME/$cf_nculib_root/lib"
5274         test -d $HOME/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search $HOME/$cf_nculib_root/lib/$cf_nculib_root"
5275 }
5276
5277 cf_search="$cf_library_path_list $cf_search"
5278
5279                         for cf_libdir in $cf_search
5280                         do
5281                                 echo "$as_me:5281: checking for -l$cf_nculib_root in $cf_libdir" >&5
5282 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
5283                                 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
5284                                 cat >conftest.$ac_ext <<_ACEOF
5285 #line 5285 "configure"
5286 #include "confdefs.h"
5287 #include <${cf_cv_ncurses_header-curses.h}>
5288 int
5289 main ()
5290 {
5291 initscr()
5292   ;
5293   return 0;
5294 }
5295 _ACEOF
5296 rm -f conftest.$ac_objext conftest$ac_exeext
5297 if { (eval echo "$as_me:5297: \"$ac_link\"") >&5
5298   (eval $ac_link) 2>&5
5299   ac_status=$?
5300   echo "$as_me:5300: \$? = $ac_status" >&5
5301   (exit $ac_status); } &&
5302          { ac_try='test -s conftest$ac_exeext'
5303   { (eval echo "$as_me:5303: \"$ac_try\"") >&5
5304   (eval $ac_try) 2>&5
5305   ac_status=$?
5306   echo "$as_me:5306: \$? = $ac_status" >&5
5307   (exit $ac_status); }; }; then
5308   echo "$as_me:5308: result: yes" >&5
5309 echo "${ECHO_T}yes" >&6
5310                                          eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
5311                                          break
5312 else
5313   echo "$as_me: failed program was:" >&5
5314 cat conftest.$ac_ext >&5
5315 echo "$as_me:5315: result: no" >&5
5316 echo "${ECHO_T}no" >&6
5317                                          LIBS="$cf_save_LIBS"
5318 fi
5319 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5320                         done
5321
5322 fi
5323 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5324
5325 fi
5326
5327 eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root
5328
5329 if test $cf_found_library = no ; then
5330         { { echo "$as_me:5330: error: Cannot link $cf_nculib_root library" >&5
5331 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
5332    { (exit 1); exit 1; }; }
5333 fi
5334
5335 fi
5336
5337 if test -n "$cf_ncurses_LIBS" ; then
5338         echo "$as_me:5338: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
5339 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
5340         cf_ncurses_SAVE="$LIBS"
5341         for p in $cf_ncurses_LIBS ; do
5342                 q=`echo $LIBS | sed -e "s%$p %%" -e "s%$p$%%"`
5343                 if test "$q" != "$LIBS" ; then
5344                         LIBS="$q"
5345                 fi
5346         done
5347         cat >conftest.$ac_ext <<_ACEOF
5348 #line 5348 "configure"
5349 #include "confdefs.h"
5350 #include <${cf_cv_ncurses_header-curses.h}>
5351 int
5352 main ()
5353 {
5354 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
5355   ;
5356   return 0;
5357 }
5358 _ACEOF
5359 rm -f conftest.$ac_objext conftest$ac_exeext
5360 if { (eval echo "$as_me:5360: \"$ac_link\"") >&5
5361   (eval $ac_link) 2>&5
5362   ac_status=$?
5363   echo "$as_me:5363: \$? = $ac_status" >&5
5364   (exit $ac_status); } &&
5365          { ac_try='test -s conftest$ac_exeext'
5366   { (eval echo "$as_me:5366: \"$ac_try\"") >&5
5367   (eval $ac_try) 2>&5
5368   ac_status=$?
5369   echo "$as_me:5369: \$? = $ac_status" >&5
5370   (exit $ac_status); }; }; then
5371   echo "$as_me:5371: result: yes" >&5
5372 echo "${ECHO_T}yes" >&6
5373 else
5374   echo "$as_me: failed program was:" >&5
5375 cat conftest.$ac_ext >&5
5376 echo "$as_me:5376: result: no" >&5
5377 echo "${ECHO_T}no" >&6
5378                  LIBS="$cf_ncurses_SAVE"
5379 fi
5380 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5381 fi
5382
5383 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
5384
5385 cat >>confdefs.h <<EOF
5386 #define $cf_nculib_ROOT 1
5387 EOF
5388
5389 fi
5390
5391 else
5392
5393 cf_ncuconfig_root=ncurses
5394
5395 echo "Looking for ${cf_ncuconfig_root}-config"
5396 for ac_prog in ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
5397 do
5398   # Extract the first word of "$ac_prog", so it can be a program name with args.
5399 set dummy $ac_prog; ac_word=$2
5400 echo "$as_me:5400: checking for $ac_word" >&5
5401 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5402 if test "${ac_cv_path_NCURSES_CONFIG+set}" = set; then
5403   echo $ECHO_N "(cached) $ECHO_C" >&6
5404 else
5405   case $NCURSES_CONFIG in
5406   [\\/]* | ?:[\\/]*)
5407   ac_cv_path_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test with a path.
5408   ;;
5409   *)
5410   ac_save_IFS=$IFS; IFS=$ac_path_separator
5411 ac_dummy="$PATH"
5412 for ac_dir in $ac_dummy; do
5413   IFS=$ac_save_IFS
5414   test -z "$ac_dir" && ac_dir=.
5415   if $as_executable_p "$ac_dir/$ac_word"; then
5416    ac_cv_path_NCURSES_CONFIG="$ac_dir/$ac_word"
5417    echo "$as_me:5417: found $ac_dir/$ac_word" >&5
5418    break
5419 fi
5420 done
5421
5422   ;;
5423 esac
5424 fi
5425 NCURSES_CONFIG=$ac_cv_path_NCURSES_CONFIG
5426
5427 if test -n "$NCURSES_CONFIG"; then
5428   echo "$as_me:5428: result: $NCURSES_CONFIG" >&5
5429 echo "${ECHO_T}$NCURSES_CONFIG" >&6
5430 else
5431   echo "$as_me:5431: result: no" >&5
5432 echo "${ECHO_T}no" >&6
5433 fi
5434
5435   test -n "$NCURSES_CONFIG" && break
5436 done
5437 test -n "$NCURSES_CONFIG" || NCURSES_CONFIG="none"
5438
5439 if test "$NCURSES_CONFIG" != none ; then
5440
5441 cf_cv_ncurses_header=curses.h
5442
5443 CPPFLAGS="$CPPFLAGS `$NCURSES_CONFIG --cflags`"
5444 LIBS="`$NCURSES_CONFIG --libs` $LIBS"
5445
5446 cat >>confdefs.h <<\EOF
5447 #define NCURSES 1
5448 EOF
5449
5450 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
5451
5452 cat >>confdefs.h <<EOF
5453 #define $cf_nculib_ROOT 1
5454 EOF
5455
5456 cf_cv_ncurses_version=`$NCURSES_CONFIG --version`
5457
5458 else
5459
5460 cf_ncuhdr_root=ncurses
5461
5462 test -n "$cf_cv_curses_dir" && \
5463 test "$cf_cv_curses_dir" != "no" && { \
5464
5465 if test -n "$cf_cv_curses_dir/include $cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
5466   for cf_add_incdir in $cf_cv_curses_dir/include $cf_cv_curses_dir/include/$cf_ncuhdr_root
5467   do
5468         while test $cf_add_incdir != /usr/include
5469         do
5470           if test -d $cf_add_incdir
5471           then
5472                 cf_have_incdir=no
5473                 if test -n "$CFLAGS$CPPFLAGS" ; then
5474                   # a loop is needed to ensure we can add subdirs of existing dirs
5475                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
5476                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
5477                           cf_have_incdir=yes; break
5478                         fi
5479                   done
5480                 fi
5481
5482                 if test "$cf_have_incdir" = no ; then
5483                   if test "$cf_add_incdir" = /usr/local/include ; then
5484                         if test "$GCC" = yes
5485                         then
5486                           cf_save_CPPFLAGS=$CPPFLAGS
5487                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
5488                           cat >conftest.$ac_ext <<_ACEOF
5489 #line 5489 "configure"
5490 #include "confdefs.h"
5491 #include <stdio.h>
5492 int
5493 main ()
5494 {
5495 printf("Hello")
5496   ;
5497   return 0;
5498 }
5499 _ACEOF
5500 rm -f conftest.$ac_objext
5501 if { (eval echo "$as_me:5501: \"$ac_compile\"") >&5
5502   (eval $ac_compile) 2>&5
5503   ac_status=$?
5504   echo "$as_me:5504: \$? = $ac_status" >&5
5505   (exit $ac_status); } &&
5506          { ac_try='test -s conftest.$ac_objext'
5507   { (eval echo "$as_me:5507: \"$ac_try\"") >&5
5508   (eval $ac_try) 2>&5
5509   ac_status=$?
5510   echo "$as_me:5510: \$? = $ac_status" >&5
5511   (exit $ac_status); }; }; then
5512   :
5513 else
5514   echo "$as_me: failed program was:" >&5
5515 cat conftest.$ac_ext >&5
5516 cf_have_incdir=yes
5517 fi
5518 rm -f conftest.$ac_objext conftest.$ac_ext
5519                           CPPFLAGS=$cf_save_CPPFLAGS
5520                         fi
5521                   fi
5522                 fi
5523
5524                 if test "$cf_have_incdir" = no ; then
5525                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
5526
5527 echo "${as_me-configure}:5527: testing adding $cf_add_incdir to include-path ..." 1>&5
5528
5529                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
5530
5531                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
5532                   test "$cf_top_incdir" = "$cf_add_incdir" && break
5533                   cf_add_incdir="$cf_top_incdir"
5534                 else
5535                   break
5536                 fi
5537           fi
5538         done
5539   done
5540 fi
5541
5542 }
5543
5544 echo "$as_me:5544: checking for $cf_ncuhdr_root header in include-path" >&5
5545 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
5546 if test "${cf_cv_ncurses_h+set}" = set; then
5547   echo $ECHO_N "(cached) $ECHO_C" >&6
5548 else
5549
5550         cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
5551         ( test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw ) && cf_header_list="$cf_header_list curses.h ncurses.h"
5552         for cf_header in $cf_header_list
5553         do
5554
5555         cat >conftest.$ac_ext <<_ACEOF
5556 #line 5556 "configure"
5557 #include "confdefs.h"
5558
5559 #include <$cf_header>
5560 int
5561 main ()
5562 {
5563
5564 #ifdef NCURSES_VERSION
5565
5566 printf("%s\n", NCURSES_VERSION);
5567 #else
5568 #ifdef __NCURSES_H
5569 printf("old\n");
5570 #else
5571         make an error
5572 #endif
5573 #endif
5574
5575   ;
5576   return 0;
5577 }
5578 _ACEOF
5579 rm -f conftest.$ac_objext
5580 if { (eval echo "$as_me:5580: \"$ac_compile\"") >&5
5581   (eval $ac_compile) 2>&5
5582   ac_status=$?
5583   echo "$as_me:5583: \$? = $ac_status" >&5
5584   (exit $ac_status); } &&
5585          { ac_try='test -s conftest.$ac_objext'
5586   { (eval echo "$as_me:5586: \"$ac_try\"") >&5
5587   (eval $ac_try) 2>&5
5588   ac_status=$?
5589   echo "$as_me:5589: \$? = $ac_status" >&5
5590   (exit $ac_status); }; }; then
5591   cf_cv_ncurses_h=$cf_header
5592
5593 else
5594   echo "$as_me: failed program was:" >&5
5595 cat conftest.$ac_ext >&5
5596 cf_cv_ncurses_h=no
5597 fi
5598 rm -f conftest.$ac_objext conftest.$ac_ext
5599
5600                 test "$cf_cv_ncurses_h" != no && break
5601         done
5602
5603 fi
5604 echo "$as_me:5604: result: $cf_cv_ncurses_h" >&5
5605 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
5606
5607 if test "$cf_cv_ncurses_h" != no ; then
5608         cf_cv_ncurses_header=$cf_cv_ncurses_h
5609 else
5610
5611 echo "$as_me:5611: checking for $cf_ncuhdr_root include-path" >&5
5612 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
5613 if test "${cf_cv_ncurses_h2+set}" = set; then
5614   echo $ECHO_N "(cached) $ECHO_C" >&6
5615 else
5616
5617         test -n "$verbose" && echo
5618
5619 cf_search=
5620 cf_header_path_list=""
5621 if test -n "${CFLAGS}${CPPFLAGS}" ; then
5622         for cf_header_path in $CPPFLAGS $CFLAGS
5623         do
5624                 case $cf_header_path in #(vi
5625                 -I*)
5626                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
5627
5628 test "$cf_header_path" != "NONE" && \
5629 test -d "$cf_header_path" && \
5630  {
5631         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
5632         test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
5633         test -d $cf_header_path/include/$cf_ncuhdr_root &&       cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
5634         test -d $cf_header_path/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
5635         test -d $cf_header_path/$cf_ncuhdr_root/include &&       cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
5636         test -d $cf_header_path/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
5637 }
5638
5639                         cf_header_path_list="$cf_header_path_list $cf_search"
5640                         ;;
5641                 esac
5642         done
5643 fi
5644
5645 cf_search=""
5646
5647 test "/usr" != "$prefix" && \
5648 test -d "/usr" && \
5649 (test $prefix = NONE || test -d $prefix) && {
5650         test -n "$verbose" && echo "    ... testing for include-directories under /usr"
5651         test -d /usr/include &&          cf_search="$cf_search /usr/include"
5652         test -d /usr/include/$cf_ncuhdr_root &&       cf_search="$cf_search /usr/include/$cf_ncuhdr_root"
5653         test -d /usr/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search /usr/include/$cf_ncuhdr_root/include"
5654         test -d /usr/$cf_ncuhdr_root/include &&       cf_search="$cf_search /usr/$cf_ncuhdr_root/include"
5655         test -d /usr/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search /usr/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
5656 }
5657
5658 test "$prefix" != "NONE" && \
5659 test -d "$prefix" && \
5660  {
5661         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
5662         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
5663         test -d $prefix/include/$cf_ncuhdr_root &&       cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
5664         test -d $prefix/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
5665         test -d $prefix/$cf_ncuhdr_root/include &&       cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
5666         test -d $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
5667 }
5668
5669 test "/usr/local" != "$prefix" && \
5670 test -d "/usr/local" && \
5671 (test $prefix = NONE || test -d $prefix) && {
5672         test -n "$verbose" && echo "    ... testing for include-directories under /usr/local"
5673         test -d /usr/local/include &&          cf_search="$cf_search /usr/local/include"
5674         test -d /usr/local/include/$cf_ncuhdr_root &&       cf_search="$cf_search /usr/local/include/$cf_ncuhdr_root"
5675         test -d /usr/local/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search /usr/local/include/$cf_ncuhdr_root/include"
5676         test -d /usr/local/$cf_ncuhdr_root/include &&       cf_search="$cf_search /usr/local/$cf_ncuhdr_root/include"
5677         test -d /usr/local/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search /usr/local/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
5678 }
5679
5680 test "/opt" != "$prefix" && \
5681 test -d "/opt" && \
5682 (test $prefix = NONE || test -d $prefix) && {
5683         test -n "$verbose" && echo "    ... testing for include-directories under /opt"
5684         test -d /opt/include &&          cf_search="$cf_search /opt/include"
5685         test -d /opt/include/$cf_ncuhdr_root &&       cf_search="$cf_search /opt/include/$cf_ncuhdr_root"
5686         test -d /opt/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search /opt/include/$cf_ncuhdr_root/include"
5687         test -d /opt/$cf_ncuhdr_root/include &&       cf_search="$cf_search /opt/$cf_ncuhdr_root/include"
5688         test -d /opt/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search /opt/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
5689 }
5690
5691 test "$HOME" != "$prefix" && \
5692 test -d "$HOME" && \
5693 (test $prefix = NONE || test -d $prefix) && {
5694         test -n "$verbose" && echo "    ... testing for include-directories under $HOME"
5695         test -d $HOME/include &&          cf_search="$cf_search $HOME/include"
5696         test -d $HOME/include/$cf_ncuhdr_root &&       cf_search="$cf_search $HOME/include/$cf_ncuhdr_root"
5697         test -d $HOME/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search $HOME/include/$cf_ncuhdr_root/include"
5698         test -d $HOME/$cf_ncuhdr_root/include &&       cf_search="$cf_search $HOME/$cf_ncuhdr_root/include"
5699         test -d $HOME/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search $HOME/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
5700 }
5701
5702 test "$includedir" != NONE && \
5703 test "$includedir" != "/usr/include" && \
5704 test -d "$includedir" && {
5705         test -d $includedir &&    cf_search="$cf_search $includedir"
5706         test -d $includedir/$cf_ncuhdr_root && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
5707 }
5708
5709 test "$oldincludedir" != NONE && \
5710 test "$oldincludedir" != "/usr/include" && \
5711 test -d "$oldincludedir" && {
5712         test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
5713         test -d $oldincludedir/$cf_ncuhdr_root && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
5714 }
5715
5716 cf_search="$cf_header_path_list $cf_search"
5717
5718         test -n "$verbose" && echo search path $cf_search
5719         cf_save2_CPPFLAGS="$CPPFLAGS"
5720         for cf_incdir in $cf_search
5721         do
5722
5723 if test -n "$cf_incdir" ; then
5724   for cf_add_incdir in $cf_incdir
5725   do
5726         while test $cf_add_incdir != /usr/include
5727         do
5728           if test -d $cf_add_incdir
5729           then
5730                 cf_have_incdir=no
5731                 if test -n "$CFLAGS$CPPFLAGS" ; then
5732                   # a loop is needed to ensure we can add subdirs of existing dirs
5733                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
5734                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
5735                           cf_have_incdir=yes; break
5736                         fi
5737                   done
5738                 fi
5739
5740                 if test "$cf_have_incdir" = no ; then
5741                   if test "$cf_add_incdir" = /usr/local/include ; then
5742                         if test "$GCC" = yes
5743                         then
5744                           cf_save_CPPFLAGS=$CPPFLAGS
5745                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
5746                           cat >conftest.$ac_ext <<_ACEOF
5747 #line 5747 "configure"
5748 #include "confdefs.h"
5749 #include <stdio.h>
5750 int
5751 main ()
5752 {
5753 printf("Hello")
5754   ;
5755   return 0;
5756 }
5757 _ACEOF
5758 rm -f conftest.$ac_objext
5759 if { (eval echo "$as_me:5759: \"$ac_compile\"") >&5
5760   (eval $ac_compile) 2>&5
5761   ac_status=$?
5762   echo "$as_me:5762: \$? = $ac_status" >&5
5763   (exit $ac_status); } &&
5764          { ac_try='test -s conftest.$ac_objext'
5765   { (eval echo "$as_me:5765: \"$ac_try\"") >&5
5766   (eval $ac_try) 2>&5
5767   ac_status=$?
5768   echo "$as_me:5768: \$? = $ac_status" >&5
5769   (exit $ac_status); }; }; then
5770   :
5771 else
5772   echo "$as_me: failed program was:" >&5
5773 cat conftest.$ac_ext >&5
5774 cf_have_incdir=yes
5775 fi
5776 rm -f conftest.$ac_objext conftest.$ac_ext
5777                           CPPFLAGS=$cf_save_CPPFLAGS
5778                         fi
5779                   fi
5780                 fi
5781
5782                 if test "$cf_have_incdir" = no ; then
5783                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
5784
5785 echo "${as_me-configure}:5785: testing adding $cf_add_incdir to include-path ..." 1>&5
5786
5787                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
5788
5789                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
5790                   test "$cf_top_incdir" = "$cf_add_incdir" && break
5791                   cf_add_incdir="$cf_top_incdir"
5792                 else
5793                   break
5794                 fi
5795           fi
5796         done
5797   done
5798 fi
5799
5800                 for cf_header in \
5801                         ncurses.h \
5802                         curses.h
5803                 do
5804
5805         cat >conftest.$ac_ext <<_ACEOF
5806 #line 5806 "configure"
5807 #include "confdefs.h"
5808
5809 #include <$cf_header>
5810 int
5811 main ()
5812 {
5813
5814 #ifdef NCURSES_VERSION
5815
5816 printf("%s\n", NCURSES_VERSION);
5817 #else
5818 #ifdef __NCURSES_H
5819 printf("old\n");
5820 #else
5821         make an error
5822 #endif
5823 #endif
5824
5825   ;
5826   return 0;
5827 }
5828 _ACEOF
5829 rm -f conftest.$ac_objext
5830 if { (eval echo "$as_me:5830: \"$ac_compile\"") >&5
5831   (eval $ac_compile) 2>&5
5832   ac_status=$?
5833   echo "$as_me:5833: \$? = $ac_status" >&5
5834   (exit $ac_status); } &&
5835          { ac_try='test -s conftest.$ac_objext'
5836   { (eval echo "$as_me:5836: \"$ac_try\"") >&5
5837   (eval $ac_try) 2>&5
5838   ac_status=$?
5839   echo "$as_me:5839: \$? = $ac_status" >&5
5840   (exit $ac_status); }; }; then
5841   cf_cv_ncurses_h2=$cf_header
5842
5843 else
5844   echo "$as_me: failed program was:" >&5
5845 cat conftest.$ac_ext >&5
5846 cf_cv_ncurses_h2=no
5847 fi
5848 rm -f conftest.$ac_objext conftest.$ac_ext
5849
5850                         if test "$cf_cv_ncurses_h2" != no ; then
5851                                 cf_cv_ncurses_h2=$cf_incdir/$cf_header
5852                                 test -n "$verbose" && echo $ac_n "      ... found $ac_c" 1>&6
5853                                 break
5854                         fi
5855                         test -n "$verbose" && echo "    ... tested $cf_incdir/$cf_header" 1>&6
5856                 done
5857                 CPPFLAGS="$cf_save2_CPPFLAGS"
5858                 test "$cf_cv_ncurses_h2" != no && break
5859         done
5860         test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:5860: error: not found" >&5
5861 echo "$as_me: error: not found" >&2;}
5862    { (exit 1); exit 1; }; }
5863
5864 fi
5865 echo "$as_me:5865: result: $cf_cv_ncurses_h2" >&5
5866 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
5867
5868         cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's%/[^/]*$%%'`
5869         cf_cv_ncurses_header=`basename $cf_cv_ncurses_h2`
5870         if test `basename $cf_1st_incdir` = $cf_ncuhdr_root ; then
5871                 cf_cv_ncurses_header=$cf_ncuhdr_root/$cf_cv_ncurses_header
5872         fi
5873
5874 if test -n "$cf_1st_incdir" ; then
5875   for cf_add_incdir in $cf_1st_incdir
5876   do
5877         while test $cf_add_incdir != /usr/include
5878         do
5879           if test -d $cf_add_incdir
5880           then
5881                 cf_have_incdir=no
5882                 if test -n "$CFLAGS$CPPFLAGS" ; then
5883                   # a loop is needed to ensure we can add subdirs of existing dirs
5884                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
5885                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
5886                           cf_have_incdir=yes; break
5887                         fi
5888                   done
5889                 fi
5890
5891                 if test "$cf_have_incdir" = no ; then
5892                   if test "$cf_add_incdir" = /usr/local/include ; then
5893                         if test "$GCC" = yes
5894                         then
5895                           cf_save_CPPFLAGS=$CPPFLAGS
5896                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
5897                           cat >conftest.$ac_ext <<_ACEOF
5898 #line 5898 "configure"
5899 #include "confdefs.h"
5900 #include <stdio.h>
5901 int
5902 main ()
5903 {
5904 printf("Hello")
5905   ;
5906   return 0;
5907 }
5908 _ACEOF
5909 rm -f conftest.$ac_objext
5910 if { (eval echo "$as_me:5910: \"$ac_compile\"") >&5
5911   (eval $ac_compile) 2>&5
5912   ac_status=$?
5913   echo "$as_me:5913: \$? = $ac_status" >&5
5914   (exit $ac_status); } &&
5915          { ac_try='test -s conftest.$ac_objext'
5916   { (eval echo "$as_me:5916: \"$ac_try\"") >&5
5917   (eval $ac_try) 2>&5
5918   ac_status=$?
5919   echo "$as_me:5919: \$? = $ac_status" >&5
5920   (exit $ac_status); }; }; then
5921   :
5922 else
5923   echo "$as_me: failed program was:" >&5
5924 cat conftest.$ac_ext >&5
5925 cf_have_incdir=yes
5926 fi
5927 rm -f conftest.$ac_objext conftest.$ac_ext
5928                           CPPFLAGS=$cf_save_CPPFLAGS
5929                         fi
5930                   fi
5931                 fi
5932
5933                 if test "$cf_have_incdir" = no ; then
5934                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
5935
5936 echo "${as_me-configure}:5936: testing adding $cf_add_incdir to include-path ..." 1>&5
5937
5938                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
5939
5940                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
5941                   test "$cf_top_incdir" = "$cf_add_incdir" && break
5942                   cf_add_incdir="$cf_top_incdir"
5943                 else
5944                   break
5945                 fi
5946           fi
5947         done
5948   done
5949 fi
5950
5951 fi
5952
5953 # Set definitions to allow ifdef'ing for ncurses.h
5954
5955 case $cf_cv_ncurses_header in # (vi
5956 *ncurses.h)
5957         cat >>confdefs.h <<\EOF
5958 #define HAVE_NCURSES_H 1
5959 EOF
5960
5961         ;;
5962 esac
5963
5964 case $cf_cv_ncurses_header in # (vi
5965 ncurses/curses.h|ncurses/ncurses.h)
5966         cat >>confdefs.h <<\EOF
5967 #define HAVE_NCURSES_NCURSES_H 1
5968 EOF
5969
5970         ;;
5971 ncursesw/curses.h|ncursesw/ncurses.h)
5972         cat >>confdefs.h <<\EOF
5973 #define HAVE_NCURSESW_NCURSES_H 1
5974 EOF
5975
5976         ;;
5977 esac
5978
5979 echo "$as_me:5979: checking for terminfo header" >&5
5980 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
5981 if test "${cf_cv_term_header+set}" = set; then
5982   echo $ECHO_N "(cached) $ECHO_C" >&6
5983 else
5984
5985 case ${cf_cv_ncurses_header} in #(vi
5986 */ncurses.h|*/ncursesw.h) #(vi
5987         cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
5988         ;;
5989 *)
5990         cf_term_header=term.h
5991         ;;
5992 esac
5993
5994 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
5995 do
5996 cat >conftest.$ac_ext <<_ACEOF
5997 #line 5997 "configure"
5998 #include "confdefs.h"
5999 #include <stdio.h>
6000 #include <${cf_cv_ncurses_header-curses.h}>
6001 #include <$cf_test>
6002
6003 int
6004 main ()
6005 {
6006 int x = auto_left_margin
6007   ;
6008   return 0;
6009 }
6010 _ACEOF
6011 rm -f conftest.$ac_objext
6012 if { (eval echo "$as_me:6012: \"$ac_compile\"") >&5
6013   (eval $ac_compile) 2>&5
6014   ac_status=$?
6015   echo "$as_me:6015: \$? = $ac_status" >&5
6016   (exit $ac_status); } &&
6017          { ac_try='test -s conftest.$ac_objext'
6018   { (eval echo "$as_me:6018: \"$ac_try\"") >&5
6019   (eval $ac_try) 2>&5
6020   ac_status=$?
6021   echo "$as_me:6021: \$? = $ac_status" >&5
6022   (exit $ac_status); }; }; then
6023
6024         cf_cv_term_header="$cf_test"
6025 else
6026   echo "$as_me: failed program was:" >&5
6027 cat conftest.$ac_ext >&5
6028
6029         cf_cv_term_header=unknown
6030
6031 fi
6032 rm -f conftest.$ac_objext conftest.$ac_ext
6033         test "$cf_cv_term_header" != unknown && break
6034 done
6035
6036 fi
6037 echo "$as_me:6037: result: $cf_cv_term_header" >&5
6038 echo "${ECHO_T}$cf_cv_term_header" >&6
6039
6040 # Set definitions to allow ifdef'ing to accommodate subdirectories
6041
6042 case $cf_cv_term_header in # (vi
6043 *term.h)
6044         cat >>confdefs.h <<\EOF
6045 #define HAVE_TERM_H 1
6046 EOF
6047
6048         ;;
6049 esac
6050
6051 case $cf_cv_term_header in # (vi
6052 ncurses/term.h) #(vi
6053         cat >>confdefs.h <<\EOF
6054 #define HAVE_NCURSES_TERM_H 1
6055 EOF
6056
6057         ;;
6058 ncursesw/term.h)
6059         cat >>confdefs.h <<\EOF
6060 #define HAVE_NCURSESW_TERM_H 1
6061 EOF
6062
6063         ;;
6064 esac
6065
6066 # some applications need this, but should check for NCURSES_VERSION
6067 cat >>confdefs.h <<\EOF
6068 #define NCURSES 1
6069 EOF
6070
6071 echo "$as_me:6071: checking for ncurses version" >&5
6072 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
6073 if test "${cf_cv_ncurses_version+set}" = set; then
6074   echo $ECHO_N "(cached) $ECHO_C" >&6
6075 else
6076
6077         cf_cv_ncurses_version=no
6078         cf_tempfile=out$$
6079         rm -f $cf_tempfile
6080         if test "$cross_compiling" = yes; then
6081
6082         # This will not work if the preprocessor splits the line after the
6083         # Autoconf token.  The 'unproto' program does that.
6084         cat > conftest.$ac_ext <<EOF
6085 #include <${cf_cv_ncurses_header-curses.h}>
6086 #undef Autoconf
6087 #ifdef NCURSES_VERSION
6088 Autoconf NCURSES_VERSION
6089 #else
6090 #ifdef __NCURSES_H
6091 Autoconf "old"
6092 #endif
6093 ;
6094 #endif
6095 EOF
6096         cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
6097         { (eval echo "$as_me:6097: \"$cf_try\"") >&5
6098   (eval $cf_try) 2>&5
6099   ac_status=$?
6100   echo "$as_me:6100: \$? = $ac_status" >&5
6101   (exit $ac_status); }
6102         if test -f conftest.out ; then
6103                 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
6104                 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
6105                 rm -f conftest.out
6106         fi
6107
6108 else
6109   cat >conftest.$ac_ext <<_ACEOF
6110 #line 6110 "configure"
6111 #include "confdefs.h"
6112
6113 #include <${cf_cv_ncurses_header-curses.h}>
6114 #include <stdio.h>
6115 int main()
6116 {
6117         FILE *fp = fopen("$cf_tempfile", "w");
6118 #ifdef NCURSES_VERSION
6119 # ifdef NCURSES_VERSION_PATCH
6120         fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
6121 # else
6122         fprintf(fp, "%s\n", NCURSES_VERSION);
6123 # endif
6124 #else
6125 # ifdef __NCURSES_H
6126         fprintf(fp, "old\n");
6127 # else
6128         make an error
6129 # endif
6130 #endif
6131         ${cf_cv_main_return-return}(0);
6132 }
6133 _ACEOF
6134 rm -f conftest$ac_exeext
6135 if { (eval echo "$as_me:6135: \"$ac_link\"") >&5
6136   (eval $ac_link) 2>&5
6137   ac_status=$?
6138   echo "$as_me:6138: \$? = $ac_status" >&5
6139   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6140   { (eval echo "$as_me:6140: \"$ac_try\"") >&5
6141   (eval $ac_try) 2>&5
6142   ac_status=$?
6143   echo "$as_me:6143: \$? = $ac_status" >&5
6144   (exit $ac_status); }; }; then
6145
6146         cf_cv_ncurses_version=`cat $cf_tempfile`
6147 else
6148   echo "$as_me: program exited with status $ac_status" >&5
6149 echo "$as_me: failed program was:" >&5
6150 cat conftest.$ac_ext >&5
6151 fi
6152 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6153 fi
6154         rm -f $cf_tempfile
6155
6156 fi
6157 echo "$as_me:6157: result: $cf_cv_ncurses_version" >&5
6158 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
6159 test "$cf_cv_ncurses_version" = no || cat >>confdefs.h <<\EOF
6160 #define NCURSES 1
6161 EOF
6162
6163 cf_nculib_root=ncurses
6164         # This works, except for the special case where we find gpm, but
6165         # ncurses is in a nonstandard location via $LIBS, and we really want
6166         # to link gpm.
6167 cf_ncurses_LIBS=""
6168 cf_ncurses_SAVE="$LIBS"
6169 echo "$as_me:6169: checking for Gpm_Open in -lgpm" >&5
6170 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
6171 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
6172   echo $ECHO_N "(cached) $ECHO_C" >&6
6173 else
6174   ac_check_lib_save_LIBS=$LIBS
6175 LIBS="-lgpm  $LIBS"
6176 cat >conftest.$ac_ext <<_ACEOF
6177 #line 6177 "configure"
6178 #include "confdefs.h"
6179
6180 /* Override any gcc2 internal prototype to avoid an error.  */
6181 #ifdef __cplusplus
6182 extern "C"
6183 #endif
6184 /* We use char because int might match the return type of a gcc2
6185    builtin and then its argument prototype would still apply.  */
6186 char Gpm_Open ();
6187 int
6188 main ()
6189 {
6190 Gpm_Open ();
6191   ;
6192   return 0;
6193 }
6194 _ACEOF
6195 rm -f conftest.$ac_objext conftest$ac_exeext
6196 if { (eval echo "$as_me:6196: \"$ac_link\"") >&5
6197   (eval $ac_link) 2>&5
6198   ac_status=$?
6199   echo "$as_me:6199: \$? = $ac_status" >&5
6200   (exit $ac_status); } &&
6201          { ac_try='test -s conftest$ac_exeext'
6202   { (eval echo "$as_me:6202: \"$ac_try\"") >&5
6203   (eval $ac_try) 2>&5
6204   ac_status=$?
6205   echo "$as_me:6205: \$? = $ac_status" >&5
6206   (exit $ac_status); }; }; then
6207   ac_cv_lib_gpm_Gpm_Open=yes
6208 else
6209   echo "$as_me: failed program was:" >&5
6210 cat conftest.$ac_ext >&5
6211 ac_cv_lib_gpm_Gpm_Open=no
6212 fi
6213 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6214 LIBS=$ac_check_lib_save_LIBS
6215 fi
6216 echo "$as_me:6216: result: $ac_cv_lib_gpm_Gpm_Open" >&5
6217 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
6218 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
6219   echo "$as_me:6219: checking for initscr in -lgpm" >&5
6220 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
6221 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
6222   echo $ECHO_N "(cached) $ECHO_C" >&6
6223 else
6224   ac_check_lib_save_LIBS=$LIBS
6225 LIBS="-lgpm  $LIBS"
6226 cat >conftest.$ac_ext <<_ACEOF
6227 #line 6227 "configure"
6228 #include "confdefs.h"
6229
6230 /* Override any gcc2 internal prototype to avoid an error.  */
6231 #ifdef __cplusplus
6232 extern "C"
6233 #endif
6234 /* We use char because int might match the return type of a gcc2
6235    builtin and then its argument prototype would still apply.  */
6236 char initscr ();
6237 int
6238 main ()
6239 {
6240 initscr ();
6241   ;
6242   return 0;
6243 }
6244 _ACEOF
6245 rm -f conftest.$ac_objext conftest$ac_exeext
6246 if { (eval echo "$as_me:6246: \"$ac_link\"") >&5
6247   (eval $ac_link) 2>&5
6248   ac_status=$?
6249   echo "$as_me:6249: \$? = $ac_status" >&5
6250   (exit $ac_status); } &&
6251          { ac_try='test -s conftest$ac_exeext'
6252   { (eval echo "$as_me:6252: \"$ac_try\"") >&5
6253   (eval $ac_try) 2>&5
6254   ac_status=$?
6255   echo "$as_me:6255: \$? = $ac_status" >&5
6256   (exit $ac_status); }; }; then
6257   ac_cv_lib_gpm_initscr=yes
6258 else
6259   echo "$as_me: failed program was:" >&5
6260 cat conftest.$ac_ext >&5
6261 ac_cv_lib_gpm_initscr=no
6262 fi
6263 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6264 LIBS=$ac_check_lib_save_LIBS
6265 fi
6266 echo "$as_me:6266: result: $ac_cv_lib_gpm_initscr" >&5
6267 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
6268 if test $ac_cv_lib_gpm_initscr = yes; then
6269   LIBS="$cf_ncurses_SAVE"
6270 else
6271   cf_ncurses_LIBS="-lgpm"
6272 fi
6273
6274 fi
6275
6276 case $host_os in #(vi
6277 freebsd*)
6278         # This is only necessary if you are linking against an obsolete
6279         # version of ncurses (but it should do no harm, since it's static).
6280         if test "$cf_nculib_root" = ncurses ; then
6281                 echo "$as_me:6281: checking for tgoto in -lmytinfo" >&5
6282 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
6283 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
6284   echo $ECHO_N "(cached) $ECHO_C" >&6
6285 else
6286   ac_check_lib_save_LIBS=$LIBS
6287 LIBS="-lmytinfo  $LIBS"
6288 cat >conftest.$ac_ext <<_ACEOF
6289 #line 6289 "configure"
6290 #include "confdefs.h"
6291
6292 /* Override any gcc2 internal prototype to avoid an error.  */
6293 #ifdef __cplusplus
6294 extern "C"
6295 #endif
6296 /* We use char because int might match the return type of a gcc2
6297    builtin and then its argument prototype would still apply.  */
6298 char tgoto ();
6299 int
6300 main ()
6301 {
6302 tgoto ();
6303   ;
6304   return 0;
6305 }
6306 _ACEOF
6307 rm -f conftest.$ac_objext conftest$ac_exeext
6308 if { (eval echo "$as_me:6308: \"$ac_link\"") >&5
6309   (eval $ac_link) 2>&5
6310   ac_status=$?
6311   echo "$as_me:6311: \$? = $ac_status" >&5
6312   (exit $ac_status); } &&
6313          { ac_try='test -s conftest$ac_exeext'
6314   { (eval echo "$as_me:6314: \"$ac_try\"") >&5
6315   (eval $ac_try) 2>&5
6316   ac_status=$?
6317   echo "$as_me:6317: \$? = $ac_status" >&5
6318   (exit $ac_status); }; }; then
6319   ac_cv_lib_mytinfo_tgoto=yes
6320 else
6321   echo "$as_me: failed program was:" >&5
6322 cat conftest.$ac_ext >&5
6323 ac_cv_lib_mytinfo_tgoto=no
6324 fi
6325 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6326 LIBS=$ac_check_lib_save_LIBS
6327 fi
6328 echo "$as_me:6328: result: $ac_cv_lib_mytinfo_tgoto" >&5
6329 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
6330 if test $ac_cv_lib_mytinfo_tgoto = yes; then
6331   cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
6332 fi
6333
6334         fi
6335         ;;
6336 esac
6337
6338 LIBS="$cf_ncurses_LIBS $LIBS"
6339
6340 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
6341 then
6342
6343 if test -n "$cf_cv_curses_dir/lib" ; then
6344   for cf_add_libdir in $cf_cv_curses_dir/lib
6345   do
6346     if test $cf_add_libdir = /usr/lib ; then
6347       :
6348     elif test -d $cf_add_libdir
6349     then
6350       cf_have_libdir=no
6351       if test -n "$LDFLAGS$LIBS" ; then
6352         # a loop is needed to ensure we can add subdirs of existing dirs
6353         for cf_test_libdir in $LDFLAGS $LIBS ; do
6354           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
6355             cf_have_libdir=yes; break
6356           fi
6357         done
6358       fi
6359       if test "$cf_have_libdir" = no ; then
6360         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
6361
6362 echo "${as_me-configure}:6362: testing adding $cf_add_libdir to library-path ..." 1>&5
6363
6364         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
6365       fi
6366     fi
6367   done
6368 fi
6369
6370         LIBS="-l$cf_nculib_root $LIBS"
6371 else
6372
6373         eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
6374         cf_libdir=""
6375         echo "$as_me:6375: checking for initscr" >&5
6376 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
6377 if test "${ac_cv_func_initscr+set}" = set; then
6378   echo $ECHO_N "(cached) $ECHO_C" >&6
6379 else
6380   cat >conftest.$ac_ext <<_ACEOF
6381 #line 6381 "configure"
6382 #include "confdefs.h"
6383 /* System header to define __stub macros and hopefully few prototypes,
6384     which can conflict with char initscr (); below.  */
6385 #include <assert.h>
6386 /* Override any gcc2 internal prototype to avoid an error.  */
6387 #ifdef __cplusplus
6388 extern "C"
6389 #endif
6390 /* We use char because int might match the return type of a gcc2
6391    builtin and then its argument prototype would still apply.  */
6392 char initscr ();
6393 char (*f) ();
6394
6395 int
6396 main ()
6397 {
6398 /* The GNU C library defines this for functions which it implements
6399     to always fail with ENOSYS.  Some functions are actually named
6400     something starting with __ and the normal name is an alias.  */
6401 #if defined (__stub_initscr) || defined (__stub___initscr)
6402 choke me
6403 #else
6404 f = initscr;
6405 #endif
6406
6407   ;
6408   return 0;
6409 }
6410 _ACEOF
6411 rm -f conftest.$ac_objext conftest$ac_exeext
6412 if { (eval echo "$as_me:6412: \"$ac_link\"") >&5
6413   (eval $ac_link) 2>&5
6414   ac_status=$?
6415   echo "$as_me:6415: \$? = $ac_status" >&5
6416   (exit $ac_status); } &&
6417          { ac_try='test -s conftest$ac_exeext'
6418   { (eval echo "$as_me:6418: \"$ac_try\"") >&5
6419   (eval $ac_try) 2>&5
6420   ac_status=$?
6421   echo "$as_me:6421: \$? = $ac_status" >&5
6422   (exit $ac_status); }; }; then
6423   ac_cv_func_initscr=yes
6424 else
6425   echo "$as_me: failed program was:" >&5
6426 cat conftest.$ac_ext >&5
6427 ac_cv_func_initscr=no
6428 fi
6429 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6430 fi
6431 echo "$as_me:6431: result: $ac_cv_func_initscr" >&5
6432 echo "${ECHO_T}$ac_cv_func_initscr" >&6
6433 if test $ac_cv_func_initscr = yes; then
6434   eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
6435 else
6436
6437                 cf_save_LIBS="$LIBS"
6438                 echo "$as_me:6438: checking for initscr in -l$cf_nculib_root" >&5
6439 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
6440                 LIBS="-l$cf_nculib_root $LIBS"
6441                 cat >conftest.$ac_ext <<_ACEOF
6442 #line 6442 "configure"
6443 #include "confdefs.h"
6444 #include <${cf_cv_ncurses_header-curses.h}>
6445 int
6446 main ()
6447 {
6448 initscr()
6449   ;
6450   return 0;
6451 }
6452 _ACEOF
6453 rm -f conftest.$ac_objext conftest$ac_exeext
6454 if { (eval echo "$as_me:6454: \"$ac_link\"") >&5
6455   (eval $ac_link) 2>&5
6456   ac_status=$?
6457   echo "$as_me:6457: \$? = $ac_status" >&5
6458   (exit $ac_status); } &&
6459          { ac_try='test -s conftest$ac_exeext'
6460   { (eval echo "$as_me:6460: \"$ac_try\"") >&5
6461   (eval $ac_try) 2>&5
6462   ac_status=$?
6463   echo "$as_me:6463: \$? = $ac_status" >&5
6464   (exit $ac_status); }; }; then
6465   echo "$as_me:6465: result: yes" >&5
6466 echo "${ECHO_T}yes" >&6
6467                          eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
6468
6469 else
6470   echo "$as_me: failed program was:" >&5
6471 cat conftest.$ac_ext >&5
6472 echo "$as_me:6472: result: no" >&5
6473 echo "${ECHO_T}no" >&6
6474
6475 cf_library_path_list=""
6476 if test -n "${LDFLAGS}${LIBS}" ; then
6477         for cf_library_path in $LDFLAGS $LIBS
6478         do
6479                 case $cf_library_path in #(vi
6480                 -L*)
6481                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
6482
6483 test "$cf_library_path" != "NONE" && \
6484 test -d "$cf_library_path" && \
6485  {
6486         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
6487         test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
6488         test -d $cf_library_path/lib/$cf_nculib_root &&       cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
6489         test -d $cf_library_path/lib/$cf_nculib_root/lib &&    cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
6490         test -d $cf_library_path/$cf_nculib_root/lib &&       cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
6491         test -d $cf_library_path/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib/$cf_nculib_root"
6492 }
6493
6494                         cf_library_path_list="$cf_library_path_list $cf_search"
6495                         ;;
6496                 esac
6497         done
6498 fi
6499
6500 cf_search=""
6501
6502 test "/usr" != "$prefix" && \
6503 test -d "/usr" && \
6504 (test $prefix = NONE || test -d $prefix) && {
6505         test -n "$verbose" && echo "    ... testing for lib-directories under /usr"
6506         test -d /usr/lib &&          cf_search="$cf_search /usr/lib"
6507         test -d /usr/lib/$cf_nculib_root &&       cf_search="$cf_search /usr/lib/$cf_nculib_root"
6508         test -d /usr/lib/$cf_nculib_root/lib &&    cf_search="$cf_search /usr/lib/$cf_nculib_root/lib"
6509         test -d /usr/$cf_nculib_root/lib &&       cf_search="$cf_search /usr/$cf_nculib_root/lib"
6510         test -d /usr/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search /usr/$cf_nculib_root/lib/$cf_nculib_root"
6511 }
6512
6513 test "$prefix" != "NONE" && \
6514 test -d "$prefix" && \
6515  {
6516         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
6517         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
6518         test -d $prefix/lib/$cf_nculib_root &&       cf_search="$cf_search $prefix/lib/$cf_nculib_root"
6519         test -d $prefix/lib/$cf_nculib_root/lib &&    cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
6520         test -d $prefix/$cf_nculib_root/lib &&       cf_search="$cf_search $prefix/$cf_nculib_root/lib"
6521         test -d $prefix/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
6522 }
6523
6524 test "/usr/local" != "$prefix" && \
6525 test -d "/usr/local" && \
6526 (test $prefix = NONE || test -d $prefix) && {
6527         test -n "$verbose" && echo "    ... testing for lib-directories under /usr/local"
6528         test -d /usr/local/lib &&          cf_search="$cf_search /usr/local/lib"
6529         test -d /usr/local/lib/$cf_nculib_root &&       cf_search="$cf_search /usr/local/lib/$cf_nculib_root"
6530         test -d /usr/local/lib/$cf_nculib_root/lib &&    cf_search="$cf_search /usr/local/lib/$cf_nculib_root/lib"
6531         test -d /usr/local/$cf_nculib_root/lib &&       cf_search="$cf_search /usr/local/$cf_nculib_root/lib"
6532         test -d /usr/local/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search /usr/local/$cf_nculib_root/lib/$cf_nculib_root"
6533 }
6534
6535 test "/opt" != "$prefix" && \
6536 test -d "/opt" && \
6537 (test $prefix = NONE || test -d $prefix) && {
6538         test -n "$verbose" && echo "    ... testing for lib-directories under /opt"
6539         test -d /opt/lib &&          cf_search="$cf_search /opt/lib"
6540         test -d /opt/lib/$cf_nculib_root &&       cf_search="$cf_search /opt/lib/$cf_nculib_root"
6541         test -d /opt/lib/$cf_nculib_root/lib &&    cf_search="$cf_search /opt/lib/$cf_nculib_root/lib"
6542         test -d /opt/$cf_nculib_root/lib &&       cf_search="$cf_search /opt/$cf_nculib_root/lib"
6543         test -d /opt/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search /opt/$cf_nculib_root/lib/$cf_nculib_root"
6544 }
6545
6546 test "$HOME" != "$prefix" && \
6547 test -d "$HOME" && \
6548 (test $prefix = NONE || test -d $prefix) && {
6549         test -n "$verbose" && echo "    ... testing for lib-directories under $HOME"
6550         test -d $HOME/lib &&          cf_search="$cf_search $HOME/lib"
6551         test -d $HOME/lib/$cf_nculib_root &&       cf_search="$cf_search $HOME/lib/$cf_nculib_root"
6552         test -d $HOME/lib/$cf_nculib_root/lib &&    cf_search="$cf_search $HOME/lib/$cf_nculib_root/lib"
6553         test -d $HOME/$cf_nculib_root/lib &&       cf_search="$cf_search $HOME/$cf_nculib_root/lib"
6554         test -d $HOME/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search $HOME/$cf_nculib_root/lib/$cf_nculib_root"
6555 }
6556
6557 cf_search="$cf_library_path_list $cf_search"
6558
6559                         for cf_libdir in $cf_search
6560                         do
6561                                 echo "$as_me:6561: checking for -l$cf_nculib_root in $cf_libdir" >&5
6562 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
6563                                 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
6564                                 cat >conftest.$ac_ext <<_ACEOF
6565 #line 6565 "configure"
6566 #include "confdefs.h"
6567 #include <${cf_cv_ncurses_header-curses.h}>
6568 int
6569 main ()
6570 {
6571 initscr()
6572   ;
6573   return 0;
6574 }
6575 _ACEOF
6576 rm -f conftest.$ac_objext conftest$ac_exeext
6577 if { (eval echo "$as_me:6577: \"$ac_link\"") >&5
6578   (eval $ac_link) 2>&5
6579   ac_status=$?
6580   echo "$as_me:6580: \$? = $ac_status" >&5
6581   (exit $ac_status); } &&
6582          { ac_try='test -s conftest$ac_exeext'
6583   { (eval echo "$as_me:6583: \"$ac_try\"") >&5
6584   (eval $ac_try) 2>&5
6585   ac_status=$?
6586   echo "$as_me:6586: \$? = $ac_status" >&5
6587   (exit $ac_status); }; }; then
6588   echo "$as_me:6588: result: yes" >&5
6589 echo "${ECHO_T}yes" >&6
6590                                          eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
6591                                          break
6592 else
6593   echo "$as_me: failed program was:" >&5
6594 cat conftest.$ac_ext >&5
6595 echo "$as_me:6595: result: no" >&5
6596 echo "${ECHO_T}no" >&6
6597                                          LIBS="$cf_save_LIBS"
6598 fi
6599 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6600                         done
6601
6602 fi
6603 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6604
6605 fi
6606
6607 eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root
6608
6609 if test $cf_found_library = no ; then
6610         { { echo "$as_me:6610: error: Cannot link $cf_nculib_root library" >&5
6611 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
6612    { (exit 1); exit 1; }; }
6613 fi
6614
6615 fi
6616
6617 if test -n "$cf_ncurses_LIBS" ; then
6618         echo "$as_me:6618: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
6619 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
6620         cf_ncurses_SAVE="$LIBS"
6621         for p in $cf_ncurses_LIBS ; do
6622                 q=`echo $LIBS | sed -e "s%$p %%" -e "s%$p$%%"`
6623                 if test "$q" != "$LIBS" ; then
6624                         LIBS="$q"
6625                 fi
6626         done
6627         cat >conftest.$ac_ext <<_ACEOF
6628 #line 6628 "configure"
6629 #include "confdefs.h"
6630 #include <${cf_cv_ncurses_header-curses.h}>
6631 int
6632 main ()
6633 {
6634 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
6635   ;
6636   return 0;
6637 }
6638 _ACEOF
6639 rm -f conftest.$ac_objext conftest$ac_exeext
6640 if { (eval echo "$as_me:6640: \"$ac_link\"") >&5
6641   (eval $ac_link) 2>&5
6642   ac_status=$?
6643   echo "$as_me:6643: \$? = $ac_status" >&5
6644   (exit $ac_status); } &&
6645          { ac_try='test -s conftest$ac_exeext'
6646   { (eval echo "$as_me:6646: \"$ac_try\"") >&5
6647   (eval $ac_try) 2>&5
6648   ac_status=$?
6649   echo "$as_me:6649: \$? = $ac_status" >&5
6650   (exit $ac_status); }; }; then
6651   echo "$as_me:6651: result: yes" >&5
6652 echo "${ECHO_T}yes" >&6
6653 else
6654   echo "$as_me: failed program was:" >&5
6655 cat conftest.$ac_ext >&5
6656 echo "$as_me:6656: result: no" >&5
6657 echo "${ECHO_T}no" >&6
6658                  LIBS="$cf_ncurses_SAVE"
6659 fi
6660 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6661 fi
6662
6663 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
6664
6665 cat >>confdefs.h <<EOF
6666 #define $cf_nculib_ROOT 1
6667 EOF
6668
6669 fi
6670
6671 fi
6672
6673 if test "$NCURSES_CONFIG" != none ; then
6674
6675 cf_version=`$NCURSES_CONFIG --version`
6676
6677 NCURSES_MAJOR=`echo "$cf_version" | sed -e 's/\..*//'`
6678 NCURSES_MINOR=`echo "$cf_version" | sed -e 's/^[0-9]\+\.//' -e 's/\..*//'`
6679 NCURSES_PATCH=`echo "$cf_version" | sed -e 's/^[0-9]\+\.[0-9]\+\.//'`
6680
6681 # ABI version is not available from headers
6682 cf_cv_abi_version=`$NCURSES_CONFIG --abi-version`
6683
6684 else
6685
6686 for cf_name in MAJOR MINOR PATCH
6687 do
6688 cat >conftest.$ac_ext <<CF_EOF
6689 #include <${cf_cv_ncurses_header-curses.h}>
6690 AUTOCONF_$cf_name NCURSES_VERSION_$cf_name
6691 CF_EOF
6692         cf_try="$ac_cpp conftest.$ac_ext 2>&5 | fgrep AUTOCONF_$cf_name >conftest.out"
6693         { (eval echo "$as_me:6693: \"$cf_try\"") >&5
6694   (eval $cf_try) 2>&5
6695   ac_status=$?
6696   echo "$as_me:6696: \$? = $ac_status" >&5
6697   (exit $ac_status); }
6698         if test -f conftest.out ; then
6699                 cf_result=`cat conftest.out | sed -e "s/^.*AUTOCONF_$cf_name[   ]\+//"`
6700                 eval NCURSES_$cf_name=$cf_result
6701                 cat conftest.$ac_ext
6702                 cat conftest.out
6703         fi
6704 done
6705
6706 cf_cv_abi_version=${NCURSES_MAJOR}
6707
6708 fi
6709
6710 cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
6711
6712 cf_cv_timestamp=`date`
6713
6714 echo "$as_me:6714: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&5
6715 echo "${ECHO_T}Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&6
6716
6717         case $cf_cv_system_name in #(vi
6718         OS/2*|os2*) #(vi
6719         LIB_PREFIX=''
6720         ;;
6721         *)      LIB_PREFIX='lib'
6722         ;;
6723         esac
6724 cf_prefix=$LIB_PREFIX
6725
6726 LIB_PREFIX=$cf_prefix
6727
6728 LIB_SUFFIX=
6729
6730 ###############################################################################
6731
6732 if test X"$CC_G_OPT" = X"" ; then
6733         CC_G_OPT='-g'
6734         test -n "$GCC" && test "${ac_cv_prog_cc_g}" != yes && CC_G_OPT=''
6735 fi
6736
6737 echo "$as_me:6737: checking for default loader flags" >&5
6738 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
6739 case $DFT_LWR_MODEL in
6740 normal)  LD_MODEL=''   ;;
6741 debug)   LD_MODEL=$CC_G_OPT ;;
6742 profile) LD_MODEL='-pg';;
6743 shared)  LD_MODEL=''   ;;
6744 esac
6745 echo "$as_me:6745: result: $LD_MODEL" >&5
6746 echo "${ECHO_T}$LD_MODEL" >&6
6747
6748         LOCAL_LDFLAGS=
6749         LOCAL_LDFLAGS2=
6750         LD_RPATH_OPT=
6751         LD_SHARED_OPTS=
6752         INSTALL_LIB="-m 644"
6753
6754         cf_cv_do_symlinks=no
6755
6756         echo "$as_me:6756: checking if release/abi version should be used for shared libs" >&5
6757 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
6758
6759 # Check whether --with-shlib-version or --without-shlib-version was given.
6760 if test "${with_shlib_version+set}" = set; then
6761   withval="$with_shlib_version"
6762   test -z "$withval" && withval=auto
6763         case $withval in #(vi
6764         yes) #(vi
6765                 cf_cv_shlib_version=auto
6766                 ;;
6767         rel|abi|auto|no) #(vi
6768                 cf_cv_shlib_version=$withval
6769                 ;;
6770         *)
6771                 { { echo "$as_me:6771: error: option value must be one of: rel, abi, auto or no" >&5
6772 echo "$as_me: error: option value must be one of: rel, abi, auto or no" >&2;}
6773    { (exit 1); exit 1; }; }
6774                 ;;
6775         esac
6776
6777 else
6778   cf_cv_shlib_version=auto
6779 fi;
6780         echo "$as_me:6780: result: $cf_cv_shlib_version" >&5
6781 echo "${ECHO_T}$cf_cv_shlib_version" >&6
6782
6783         cf_cv_rm_so_locs=no
6784
6785         # Some less-capable ports of gcc support only -fpic
6786         CC_SHARED_OPTS=
6787         if test "$GCC" = yes
6788         then
6789                 echo "$as_me:6789: checking which $CC option to use" >&5
6790 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
6791                 cf_save_CFLAGS="$CFLAGS"
6792                 for CC_SHARED_OPTS in -fPIC -fpic ''
6793                 do
6794                         CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
6795                         cat >conftest.$ac_ext <<_ACEOF
6796 #line 6796 "configure"
6797 #include "confdefs.h"
6798 #include <stdio.h>
6799 int
6800 main ()
6801 {
6802 int x = 1
6803   ;
6804   return 0;
6805 }
6806 _ACEOF
6807 rm -f conftest.$ac_objext
6808 if { (eval echo "$as_me:6808: \"$ac_compile\"") >&5
6809   (eval $ac_compile) 2>&5
6810   ac_status=$?
6811   echo "$as_me:6811: \$? = $ac_status" >&5
6812   (exit $ac_status); } &&
6813          { ac_try='test -s conftest.$ac_objext'
6814   { (eval echo "$as_me:6814: \"$ac_try\"") >&5
6815   (eval $ac_try) 2>&5
6816   ac_status=$?
6817   echo "$as_me:6817: \$? = $ac_status" >&5
6818   (exit $ac_status); }; }; then
6819   break
6820 else
6821   echo "$as_me: failed program was:" >&5
6822 cat conftest.$ac_ext >&5
6823 fi
6824 rm -f conftest.$ac_objext conftest.$ac_ext
6825                 done
6826                 echo "$as_me:6826: result: $CC_SHARED_OPTS" >&5
6827 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
6828                 CFLAGS="$cf_save_CFLAGS"
6829         fi
6830
6831         cf_cv_shlib_version_infix=no
6832
6833         case $cf_cv_system_name in
6834         aix[56]*)
6835                 if test "$GCC" = yes; then
6836                         CC_SHARED_OPTS=
6837                         MK_SHARED_LIB="$(CC) -shared"
6838                 fi
6839                 ;;
6840         beos*)
6841                 MK_SHARED_LIB='${CC} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
6842                 ;;
6843         cygwin*)
6844                 CC_SHARED_OPTS=
6845                 MK_SHARED_LIB='sh ../mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
6846                 cf_cv_shlib_version=cygdll
6847                 cf_cv_shlib_version_infix=cygdll
6848                 cat >mk_shared_lib.sh <<-CF_EOF
6849                 #!/bin/sh
6850                 SHARED_LIB=\$1
6851                 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
6852                 shift
6853                 cat <<-EOF
6854                 Linking shared library
6855                 ** SHARED_LIB \$SHARED_LIB
6856                 ** IMPORT_LIB \$IMPORT_LIB
6857 EOF
6858                 exec \$* -shared -Wl,--out-implib=../lib/\${IMPORT_LIB} -Wl,--export-all-symbols -o ../lib/\${SHARED_LIB}
6859 CF_EOF
6860                 chmod +x mk_shared_lib.sh
6861                 ;;
6862         darwin*)
6863                 EXTRA_CFLAGS="-no-cpp-precomp"
6864                 CC_SHARED_OPTS="-dynamic"
6865                 MK_SHARED_LIB='${CC} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
6866                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
6867                 cf_cv_shlib_version_infix=yes
6868                 echo "$as_me:6868: checking if ld -search_paths_first works" >&5
6869 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
6870 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
6871   echo $ECHO_N "(cached) $ECHO_C" >&6
6872 else
6873
6874                         cf_save_LDFLAGS=$LDFLAGS
6875                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
6876                         cat >conftest.$ac_ext <<_ACEOF
6877 #line 6877 "configure"
6878 #include "confdefs.h"
6879
6880 int
6881 main ()
6882 {
6883 int i;
6884   ;
6885   return 0;
6886 }
6887 _ACEOF
6888 rm -f conftest.$ac_objext conftest$ac_exeext
6889 if { (eval echo "$as_me:6889: \"$ac_link\"") >&5
6890   (eval $ac_link) 2>&5
6891   ac_status=$?
6892   echo "$as_me:6892: \$? = $ac_status" >&5
6893   (exit $ac_status); } &&
6894          { ac_try='test -s conftest$ac_exeext'
6895   { (eval echo "$as_me:6895: \"$ac_try\"") >&5
6896   (eval $ac_try) 2>&5
6897   ac_status=$?
6898   echo "$as_me:6898: \$? = $ac_status" >&5
6899   (exit $ac_status); }; }; then
6900   cf_cv_ldflags_search_paths_first=yes
6901 else
6902   echo "$as_me: failed program was:" >&5
6903 cat conftest.$ac_ext >&5
6904 cf_cv_ldflags_search_paths_first=no
6905 fi
6906 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6907                                 LDFLAGS=$cf_save_LDFLAGS
6908 fi
6909 echo "$as_me:6909: result: $cf_cv_ldflags_search_paths_first" >&5
6910 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
6911                 if test $cf_cv_ldflags_search_paths_first = yes; then
6912                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
6913                 fi
6914                 ;;
6915         hpux*)
6916                 # (tested with gcc 2.7.2 -- I don't have c89)
6917                 if test "$GCC" = yes; then
6918                         LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
6919                 else
6920                         CC_SHARED_OPTS='+Z'
6921                         LD_SHARED_OPTS='-Wl,+b,${libdir}'
6922                 fi
6923                 MK_SHARED_LIB='${LD} +b ${libdir} -b -o $@'
6924                 # HP-UX shared libraries must be executable, and should be
6925                 # readonly to exploit a quirk in the memory manager.
6926                 INSTALL_LIB="-m 555"
6927                 ;;
6928         irix*)
6929                 if test "$cf_cv_ld_rpath" = yes ; then
6930                         if test "$GCC" = yes; then
6931                                 LD_RPATH_OPT="-Wl,-rpath,"
6932                                 EXTRA_LDFLAGS="-Wl,-rpath,\${libdir} $EXTRA_LDFLAGS"
6933                         else
6934                                 LD_RPATH_OPT="-rpath "
6935                                 EXTRA_LDFLAGS="-rpath \${libdir} $EXTRA_LDFLAGS"
6936                         fi
6937                 fi
6938                 # tested with IRIX 5.2 and 'cc'.
6939                 if test "$GCC" != yes; then
6940                         CC_SHARED_OPTS='-KPIC'
6941                         MK_SHARED_LIB='${CC} -shared -rdata_shared -soname `basename $@` -o $@'
6942                 else
6943                         MK_SHARED_LIB='${CC} -shared -Wl,-soname,`basename $@` -o $@'
6944                 fi
6945                 cf_cv_rm_so_locs=yes
6946                 ;;
6947         linux*|gnu*|k*bsd*-gnu)
6948                 if test "$DFT_LWR_MODEL" = "shared" ; then
6949                         LOCAL_LDFLAGS="-Wl,-rpath,\$(LOCAL_LIBDIR)"
6950                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6951                 fi
6952                 if test "$cf_cv_ld_rpath" = yes ; then
6953                         LD_RPATH_OPT="-Wl,-rpath,"
6954                         EXTRA_LDFLAGS="-Wl,-rpath,\${libdir} $EXTRA_LDFLAGS"
6955                 fi
6956
6957         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6958         if test "$cf_cv_shlib_version" = rel; then
6959                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6960         else
6961                 cf_cv_shared_soname='`basename $@`'
6962         fi
6963
6964                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6965                 ;;
6966         openbsd[2-9].*)
6967                 if test "$DFT_LWR_MODEL" = "shared" ; then
6968                         LOCAL_LDFLAGS="-Wl,-rpath,\$(LOCAL_LIBDIR)"
6969                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6970                 fi
6971                 if test "$cf_cv_ld_rpath" = yes ; then
6972                         LD_RPATH_OPT="-Wl,-rpath,"
6973                         EXTRA_LDFLAGS="-Wl,-rpath,\${libdir} $EXTRA_LDFLAGS"
6974                 fi
6975                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6976
6977         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6978         if test "$cf_cv_shlib_version" = rel; then
6979                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6980         else
6981                 cf_cv_shared_soname='`basename $@`'
6982         fi
6983
6984                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6985                 ;;
6986         nto-qnx*|openbsd*|freebsd[12].*)
6987                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6988                 MK_SHARED_LIB='${LD} -Bshareable -o $@'
6989                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6990                 ;;
6991         freebsd*)
6992                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6993                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_ld_rpath" = yes ; then
6994                         LOCAL_LDFLAGS="-rpath \$(LOCAL_LIBDIR)"
6995                         LOCAL_LDFLAGS2="-rpath \${libdir} $LOCAL_LDFLAGS"
6996                         LD_RPATH_OPT="-rpath "
6997                         EXTRA_LDFLAGS="-rpath \${libdir} $EXTRA_LDFLAGS"
6998                 fi
6999
7000         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
7001         if test "$cf_cv_shlib_version" = rel; then
7002                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
7003         else
7004                 cf_cv_shared_soname='`basename $@`'
7005         fi
7006
7007                 MK_SHARED_LIB='${LD} -shared -Bshareable -soname=`basename $@` -o $@'
7008                 ;;
7009         netbsd*)
7010                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
7011                 test "$cf_cv_ld_rpath" = yes && LD_RPATH_OPT="-Wl,-rpath,"
7012                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_ld_rpath" = yes ; then
7013                         LOCAL_LDFLAGS="-Wl,-rpath,\$(LOCAL_LIBDIR)"
7014                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
7015                         EXTRA_LDFLAGS="-Wl,-rpath,\${libdir} $EXTRA_LDFLAGS"
7016                         if test "$cf_cv_shlib_version" = auto; then
7017                         if test -f /usr/libexec/ld.elf_so; then
7018                                 cf_cv_shlib_version=abi
7019                         else
7020                                 cf_cv_shlib_version=rel
7021                         fi
7022                         fi
7023
7024         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
7025         if test "$cf_cv_shlib_version" = rel; then
7026                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
7027         else
7028                 cf_cv_shared_soname='`basename $@`'
7029         fi
7030
7031                         MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
7032                 else
7033                         MK_SHARED_LIB='${LD} -shared -Bshareable -o $@'
7034                 fi
7035                 ;;
7036         osf*|mls+*)
7037                 # tested with OSF/1 V3.2 and 'cc'
7038                 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
7039                 # link with shared libs).
7040                 MK_SHARED_LIB='${LD} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
7041                 case $host_os in
7042                 osf4*)
7043                         MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
7044                         ;;
7045                 esac
7046                 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
7047                 if test "$DFT_LWR_MODEL" = "shared" ; then
7048                         LOCAL_LDFLAGS="-Wl,-rpath,\$(LOCAL_LIBDIR)"
7049                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
7050                 fi
7051                 if test "$cf_cv_ld_rpath" = yes ; then
7052                         LD_RPATH_OPT="-rpath"
7053                         # EXTRA_LDFLAGS="$LOCAL_LDFLAGS $EXTRA_LDFLAGS"
7054                 fi
7055                 cf_cv_rm_so_locs=yes
7056                 ;;
7057         sco3.2v5*)  # (also uw2* and UW7) hops 13-Apr-98
7058                 # tested with osr5.0.5
7059                 if test "$GCC" != yes; then
7060                         CC_SHARED_OPTS='-belf -KPIC'
7061                 fi
7062                 MK_SHARED_LIB='${LD} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
7063                 if test "$cf_cv_ld_rpath" = yes ; then
7064                         # only way is to set LD_RUN_PATH but no switch for it
7065                         RUN_PATH=$libdir
7066                 fi
7067                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
7068                 LINK_PROGS='LD_RUN_PATH=${libdir}'
7069                 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
7070                 ;;
7071         sunos4*)
7072                 # tested with SunOS 4.1.1 and gcc 2.7.0
7073                 if test "$GCC" != yes; then
7074                         CC_SHARED_OPTS='-KPIC'
7075                 fi
7076                 MK_SHARED_LIB='${LD} -assert pure-text -o $@'
7077                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
7078                 ;;
7079         solaris2*)
7080                 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
7081                 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
7082                 if test "$DFT_LWR_MODEL" = "shared" ; then
7083                         LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
7084                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
7085                 fi
7086                 if test "$cf_cv_ld_rpath" = yes ; then
7087                         LD_RPATH_OPT="-R"
7088                         EXTRA_LDFLAGS="$LOCAL_LDFLAGS $EXTRA_LDFLAGS"
7089                 fi
7090
7091         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
7092         if test "$cf_cv_shlib_version" = rel; then
7093                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
7094         else
7095                 cf_cv_shared_soname='`basename $@`'
7096         fi
7097
7098                 if test "$GCC" != yes; then
7099                         cf_save_CFLAGS="$CFLAGS"
7100                         for cf_shared_opts in -xcode=pic13 -xcode=pic32 -Kpic -KPIC -O
7101                         do
7102                                 CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
7103                                 cat >conftest.$ac_ext <<_ACEOF
7104 #line 7104 "configure"
7105 #include "confdefs.h"
7106 #include <stdio.h>
7107 int
7108 main ()
7109 {
7110 printf("Hello\n");
7111   ;
7112   return 0;
7113 }
7114 _ACEOF
7115 rm -f conftest.$ac_objext
7116 if { (eval echo "$as_me:7116: \"$ac_compile\"") >&5
7117   (eval $ac_compile) 2>&5
7118   ac_status=$?
7119   echo "$as_me:7119: \$? = $ac_status" >&5
7120   (exit $ac_status); } &&
7121          { ac_try='test -s conftest.$ac_objext'
7122   { (eval echo "$as_me:7122: \"$ac_try\"") >&5
7123   (eval $ac_try) 2>&5
7124   ac_status=$?
7125   echo "$as_me:7125: \$? = $ac_status" >&5
7126   (exit $ac_status); }; }; then
7127   break
7128 else
7129   echo "$as_me: failed program was:" >&5
7130 cat conftest.$ac_ext >&5
7131 fi
7132 rm -f conftest.$ac_objext conftest.$ac_ext
7133                         done
7134                         CFLAGS="$cf_save_CFLAGS"
7135                         CC_SHARED_OPTS=$cf_shared_opts
7136                         MK_SHARED_LIB='${CC} -dy -G -h '$cf_cv_shared_soname' -o $@'
7137                 else
7138                         MK_SHARED_LIB='${CC} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
7139                 fi
7140                 ;;
7141         sysv5uw7*|unix_sv*)
7142                 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
7143                 if test "$GCC" != yes; then
7144                         CC_SHARED_OPTS='-KPIC'
7145                 fi
7146                 MK_SHARED_LIB='${LD} -d y -G -o $@'
7147                 ;;
7148         *)
7149                 CC_SHARED_OPTS='unknown'
7150                 MK_SHARED_LIB='echo unknown'
7151                 ;;
7152         esac
7153
7154         # This works if the last tokens in $MK_SHARED_LIB are the -o target.
7155         case "$cf_cv_shlib_version" in #(vi
7156         rel|abi)
7157                 case "$MK_SHARED_LIB" in #(vi
7158                 *'-o $@')
7159                         test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
7160                         ;;
7161                 *)
7162                         { echo "$as_me:7162: WARNING: ignored --with-shlib-version" >&5
7163 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
7164                         ;;
7165                 esac
7166                 ;;
7167         esac
7168
7169         if test -n "$LD_RPATH_OPT" ; then
7170                 echo "$as_me:7170: checking if we need a space after rpath option" >&5
7171 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
7172                 cf_save_LIBS="$LIBS"
7173                 LIBS="${LD_RPATH_OPT}$libdir $LIBS"
7174                 cat >conftest.$ac_ext <<_ACEOF
7175 #line 7175 "configure"
7176 #include "confdefs.h"
7177
7178 int
7179 main ()
7180 {
7181
7182   ;
7183   return 0;
7184 }
7185 _ACEOF
7186 rm -f conftest.$ac_objext conftest$ac_exeext
7187 if { (eval echo "$as_me:7187: \"$ac_link\"") >&5
7188   (eval $ac_link) 2>&5
7189   ac_status=$?
7190   echo "$as_me:7190: \$? = $ac_status" >&5
7191   (exit $ac_status); } &&
7192          { ac_try='test -s conftest$ac_exeext'
7193   { (eval echo "$as_me:7193: \"$ac_try\"") >&5
7194   (eval $ac_try) 2>&5
7195   ac_status=$?
7196   echo "$as_me:7196: \$? = $ac_status" >&5
7197   (exit $ac_status); }; }; then
7198   cf_rpath_space=no
7199 else
7200   echo "$as_me: failed program was:" >&5
7201 cat conftest.$ac_ext >&5
7202 cf_rpath_space=yes
7203 fi
7204 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7205                 LIBS="$cf_save_LIBS"
7206                 echo "$as_me:7206: result: $cf_rpath_space" >&5
7207 echo "${ECHO_T}$cf_rpath_space" >&6
7208                 test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
7209                 MK_SHARED_LIB="$MK_SHARED_LIB $LD_RPATH_OPT\${libdir}"
7210         fi
7211
7212 ###############################################################################
7213
7214         case $cf_cv_system_name in
7215         os2*)   PATH_SEPARATOR=';'  ;;
7216         *)      PATH_SEPARATOR=':'  ;;
7217         esac
7218
7219 ###   use option --enable-broken-linker to force on use of broken-linker support
7220 echo "$as_me:7220: checking if you want broken-linker support code" >&5
7221 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
7222
7223 # Check whether --enable-broken_linker or --disable-broken_linker was given.
7224 if test "${enable_broken_linker+set}" = set; then
7225   enableval="$enable_broken_linker"
7226   with_broken_linker=$enableval
7227 else
7228   with_broken_linker=${BROKEN_LINKER-no}
7229 fi;
7230 echo "$as_me:7230: result: $with_broken_linker" >&5
7231 echo "${ECHO_T}$with_broken_linker" >&6
7232
7233 BROKEN_LINKER=0
7234 if test "$with_broken_linker" = yes ; then
7235         cat >>confdefs.h <<\EOF
7236 #define BROKEN_LINKER 1
7237 EOF
7238
7239         BROKEN_LINKER=1
7240 elif test "$DFT_LWR_MODEL" = shared ; then
7241         case $cf_cv_system_name in #(vi
7242         cygwin*)
7243                 cat >>confdefs.h <<\EOF
7244 #define BROKEN_LINKER 1
7245 EOF
7246
7247                 BROKEN_LINKER=1
7248                 test -n "$verbose" && echo "    cygwin linker is broken anyway" 1>&6
7249
7250 echo "${as_me-configure}:7250: testing cygwin linker is broken anyway ..." 1>&5
7251
7252                 ;;
7253         esac
7254 fi
7255
7256 # Check to define _XOPEN_SOURCE "automatically"
7257
7258 cf_XOPEN_SOURCE=500
7259 cf_POSIX_C_SOURCE=199506L
7260 cf_xopen_source=
7261
7262 case $host_os in #(vi
7263 aix[456]*) #(vi
7264         cf_xopen_source="-D_ALL_SOURCE"
7265         ;;
7266 darwin[0-8].*) #(vi
7267         cf_xopen_source="-D_APPLE_C_SOURCE"
7268         ;;
7269 darwin*) #(vi
7270         cf_xopen_source="-D_DARWIN_C_SOURCE"
7271         ;;
7272 freebsd*|dragonfly*) #(vi
7273         # 5.x headers associate
7274         #       _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
7275         #       _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
7276         cf_POSIX_C_SOURCE=200112L
7277         cf_XOPEN_SOURCE=600
7278         cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
7279         ;;
7280 hpux11*) #(vi
7281         cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
7282         ;;
7283 hpux*) #(vi
7284         cf_xopen_source="-D_HPUX_SOURCE"
7285         ;;
7286 irix[56].*) #(vi
7287         cf_xopen_source="-D_SGI_SOURCE"
7288         ;;
7289 linux*|gnu*|mint*|k*bsd*-gnu) #(vi
7290
7291 echo "$as_me:7291: checking if we must define _GNU_SOURCE" >&5
7292 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
7293 if test "${cf_cv_gnu_source+set}" = set; then
7294   echo $ECHO_N "(cached) $ECHO_C" >&6
7295 else
7296
7297 cat >conftest.$ac_ext <<_ACEOF
7298 #line 7298 "configure"
7299 #include "confdefs.h"
7300 #include <sys/types.h>
7301 int
7302 main ()
7303 {
7304
7305 #ifndef _XOPEN_SOURCE
7306 make an error
7307 #endif
7308   ;
7309   return 0;
7310 }
7311 _ACEOF
7312 rm -f conftest.$ac_objext
7313 if { (eval echo "$as_me:7313: \"$ac_compile\"") >&5
7314   (eval $ac_compile) 2>&5
7315   ac_status=$?
7316   echo "$as_me:7316: \$? = $ac_status" >&5
7317   (exit $ac_status); } &&
7318          { ac_try='test -s conftest.$ac_objext'
7319   { (eval echo "$as_me:7319: \"$ac_try\"") >&5
7320   (eval $ac_try) 2>&5
7321   ac_status=$?
7322   echo "$as_me:7322: \$? = $ac_status" >&5
7323   (exit $ac_status); }; }; then
7324   cf_cv_gnu_source=no
7325 else
7326   echo "$as_me: failed program was:" >&5
7327 cat conftest.$ac_ext >&5
7328 cf_save="$CPPFLAGS"
7329          CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
7330          cat >conftest.$ac_ext <<_ACEOF
7331 #line 7331 "configure"
7332 #include "confdefs.h"
7333 #include <sys/types.h>
7334 int
7335 main ()
7336 {
7337
7338 #ifdef _XOPEN_SOURCE
7339 make an error
7340 #endif
7341   ;
7342   return 0;
7343 }
7344 _ACEOF
7345 rm -f conftest.$ac_objext
7346 if { (eval echo "$as_me:7346: \"$ac_compile\"") >&5
7347   (eval $ac_compile) 2>&5
7348   ac_status=$?
7349   echo "$as_me:7349: \$? = $ac_status" >&5
7350   (exit $ac_status); } &&
7351          { ac_try='test -s conftest.$ac_objext'
7352   { (eval echo "$as_me:7352: \"$ac_try\"") >&5
7353   (eval $ac_try) 2>&5
7354   ac_status=$?
7355   echo "$as_me:7355: \$? = $ac_status" >&5
7356   (exit $ac_status); }; }; then
7357   cf_cv_gnu_source=no
7358 else
7359   echo "$as_me: failed program was:" >&5
7360 cat conftest.$ac_ext >&5
7361 cf_cv_gnu_source=yes
7362 fi
7363 rm -f conftest.$ac_objext conftest.$ac_ext
7364         CPPFLAGS="$cf_save"
7365
7366 fi
7367 rm -f conftest.$ac_objext conftest.$ac_ext
7368
7369 fi
7370 echo "$as_me:7370: result: $cf_cv_gnu_source" >&5
7371 echo "${ECHO_T}$cf_cv_gnu_source" >&6
7372 test "$cf_cv_gnu_source" = yes && CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
7373
7374         ;;
7375 mirbsd*) #(vi
7376         # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <arpa/inet.h>
7377         ;;
7378 netbsd*) #(vi
7379         # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
7380         ;;
7381 openbsd*) #(vi
7382         # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
7383         ;;
7384 osf[45]*) #(vi
7385         cf_xopen_source="-D_OSF_SOURCE"
7386         ;;
7387 nto-qnx*) #(vi
7388         cf_xopen_source="-D_QNX_SOURCE"
7389         ;;
7390 sco*) #(vi
7391         # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
7392         ;;
7393 solaris*) #(vi
7394         cf_xopen_source="-D__EXTENSIONS__"
7395         ;;
7396 *)
7397         echo "$as_me:7397: checking if we should define _XOPEN_SOURCE" >&5
7398 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
7399 if test "${cf_cv_xopen_source+set}" = set; then
7400   echo $ECHO_N "(cached) $ECHO_C" >&6
7401 else
7402
7403         cat >conftest.$ac_ext <<_ACEOF
7404 #line 7404 "configure"
7405 #include "confdefs.h"
7406 #include <sys/types.h>
7407 int
7408 main ()
7409 {
7410
7411 #ifndef _XOPEN_SOURCE
7412 make an error
7413 #endif
7414   ;
7415   return 0;
7416 }
7417 _ACEOF
7418 rm -f conftest.$ac_objext
7419 if { (eval echo "$as_me:7419: \"$ac_compile\"") >&5
7420   (eval $ac_compile) 2>&5
7421   ac_status=$?
7422   echo "$as_me:7422: \$? = $ac_status" >&5
7423   (exit $ac_status); } &&
7424          { ac_try='test -s conftest.$ac_objext'
7425   { (eval echo "$as_me:7425: \"$ac_try\"") >&5
7426   (eval $ac_try) 2>&5
7427   ac_status=$?
7428   echo "$as_me:7428: \$? = $ac_status" >&5
7429   (exit $ac_status); }; }; then
7430   cf_cv_xopen_source=no
7431 else
7432   echo "$as_me: failed program was:" >&5
7433 cat conftest.$ac_ext >&5
7434 cf_save="$CPPFLAGS"
7435          CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
7436          cat >conftest.$ac_ext <<_ACEOF
7437 #line 7437 "configure"
7438 #include "confdefs.h"
7439 #include <sys/types.h>
7440 int
7441 main ()
7442 {
7443
7444 #ifdef _XOPEN_SOURCE
7445 make an error
7446 #endif
7447   ;
7448   return 0;
7449 }
7450 _ACEOF
7451 rm -f conftest.$ac_objext
7452 if { (eval echo "$as_me:7452: \"$ac_compile\"") >&5
7453   (eval $ac_compile) 2>&5
7454   ac_status=$?
7455   echo "$as_me:7455: \$? = $ac_status" >&5
7456   (exit $ac_status); } &&
7457          { ac_try='test -s conftest.$ac_objext'
7458   { (eval echo "$as_me:7458: \"$ac_try\"") >&5
7459   (eval $ac_try) 2>&5
7460   ac_status=$?
7461   echo "$as_me:7461: \$? = $ac_status" >&5
7462   (exit $ac_status); }; }; then
7463   cf_cv_xopen_source=no
7464 else
7465   echo "$as_me: failed program was:" >&5
7466 cat conftest.$ac_ext >&5
7467 cf_cv_xopen_source=$cf_XOPEN_SOURCE
7468 fi
7469 rm -f conftest.$ac_objext conftest.$ac_ext
7470         CPPFLAGS="$cf_save"
7471
7472 fi
7473 rm -f conftest.$ac_objext conftest.$ac_ext
7474
7475 fi
7476 echo "$as_me:7476: result: $cf_cv_xopen_source" >&5
7477 echo "${ECHO_T}$cf_cv_xopen_source" >&6
7478         if test "$cf_cv_xopen_source" != no ; then
7479
7480 CFLAGS=`echo "$CFLAGS" | \
7481         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
7482                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
7483
7484 CPPFLAGS=`echo "$CPPFLAGS" | \
7485         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
7486                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
7487
7488                 cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
7489
7490 cf_fix_cppflags=no
7491 cf_new_cflags=
7492 cf_new_cppflags=
7493 cf_new_extra_cppflags=
7494
7495 for cf_add_cflags in $cf_temp_xopen_source
7496 do
7497 case $cf_fix_cppflags in
7498 no)
7499         case $cf_add_cflags in #(vi
7500         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
7501                 case $cf_add_cflags in
7502                 -D*)
7503                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7504
7505                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7506                                 && test -z "${cf_tst_cflags}" \
7507                                 && cf_fix_cppflags=yes
7508
7509                         if test $cf_fix_cppflags = yes ; then
7510                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7511                                 continue
7512                         elif test "${cf_tst_cflags}" = "\"'" ; then
7513                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7514                                 continue
7515                         fi
7516                         ;;
7517                 esac
7518                 case "$CPPFLAGS" in
7519                 *$cf_add_cflags) #(vi
7520                         ;;
7521                 *) #(vi
7522                         case $cf_add_cflags in #(vi
7523                         -D*)
7524                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7525
7526 CPPFLAGS=`echo "$CPPFLAGS" | \
7527         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7528                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7529
7530                                 ;;
7531                         esac
7532                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
7533                         ;;
7534                 esac
7535                 ;;
7536         *)
7537                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
7538                 ;;
7539         esac
7540         ;;
7541 yes)
7542         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7543
7544         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7545
7546         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7547                 && test -z "${cf_tst_cflags}" \
7548                 && cf_fix_cppflags=no
7549         ;;
7550 esac
7551 done
7552
7553 if test -n "$cf_new_cflags" ; then
7554
7555         CFLAGS="$CFLAGS $cf_new_cflags"
7556 fi
7557
7558 if test -n "$cf_new_cppflags" ; then
7559
7560         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
7561 fi
7562
7563 if test -n "$cf_new_extra_cppflags" ; then
7564
7565         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
7566 fi
7567
7568         fi
7569
7570 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
7571
7572 cf_save_CFLAGS="$CFLAGS"
7573 cf_save_CPPFLAGS="$CPPFLAGS"
7574
7575 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
7576         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
7577                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
7578
7579 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
7580         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
7581                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
7582
7583 echo "$as_me:7583: checking if we should define _POSIX_C_SOURCE" >&5
7584 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
7585 if test "${cf_cv_posix_c_source+set}" = set; then
7586   echo $ECHO_N "(cached) $ECHO_C" >&6
7587 else
7588
7589 echo "${as_me-configure}:7589: testing if the symbol is already defined go no further ..." 1>&5
7590
7591         cat >conftest.$ac_ext <<_ACEOF
7592 #line 7592 "configure"
7593 #include "confdefs.h"
7594 #include <sys/types.h>
7595 int
7596 main ()
7597 {
7598
7599 #ifndef _POSIX_C_SOURCE
7600 make an error
7601 #endif
7602   ;
7603   return 0;
7604 }
7605 _ACEOF
7606 rm -f conftest.$ac_objext
7607 if { (eval echo "$as_me:7607: \"$ac_compile\"") >&5
7608   (eval $ac_compile) 2>&5
7609   ac_status=$?
7610   echo "$as_me:7610: \$? = $ac_status" >&5
7611   (exit $ac_status); } &&
7612          { ac_try='test -s conftest.$ac_objext'
7613   { (eval echo "$as_me:7613: \"$ac_try\"") >&5
7614   (eval $ac_try) 2>&5
7615   ac_status=$?
7616   echo "$as_me:7616: \$? = $ac_status" >&5
7617   (exit $ac_status); }; }; then
7618   cf_cv_posix_c_source=no
7619 else
7620   echo "$as_me: failed program was:" >&5
7621 cat conftest.$ac_ext >&5
7622 cf_want_posix_source=no
7623          case .$cf_POSIX_C_SOURCE in #(vi
7624          .[12]??*) #(vi
7625                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
7626                 ;;
7627          .2) #(vi
7628                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
7629                 cf_want_posix_source=yes
7630                 ;;
7631          .*)
7632                 cf_want_posix_source=yes
7633                 ;;
7634          esac
7635          if test "$cf_want_posix_source" = yes ; then
7636                 cat >conftest.$ac_ext <<_ACEOF
7637 #line 7637 "configure"
7638 #include "confdefs.h"
7639 #include <sys/types.h>
7640 int
7641 main ()
7642 {
7643
7644 #ifdef _POSIX_SOURCE
7645 make an error
7646 #endif
7647   ;
7648   return 0;
7649 }
7650 _ACEOF
7651 rm -f conftest.$ac_objext
7652 if { (eval echo "$as_me:7652: \"$ac_compile\"") >&5
7653   (eval $ac_compile) 2>&5
7654   ac_status=$?
7655   echo "$as_me:7655: \$? = $ac_status" >&5
7656   (exit $ac_status); } &&
7657          { ac_try='test -s conftest.$ac_objext'
7658   { (eval echo "$as_me:7658: \"$ac_try\"") >&5
7659   (eval $ac_try) 2>&5
7660   ac_status=$?
7661   echo "$as_me:7661: \$? = $ac_status" >&5
7662   (exit $ac_status); }; }; then
7663   :
7664 else
7665   echo "$as_me: failed program was:" >&5
7666 cat conftest.$ac_ext >&5
7667 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
7668 fi
7669 rm -f conftest.$ac_objext conftest.$ac_ext
7670          fi
7671
7672 echo "${as_me-configure}:7672: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
7673
7674          CFLAGS="$cf_trim_CFLAGS"
7675          CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
7676
7677 echo "${as_me-configure}:7677: testing if the second compile does not leave our definition intact error ..." 1>&5
7678
7679          cat >conftest.$ac_ext <<_ACEOF
7680 #line 7680 "configure"
7681 #include "confdefs.h"
7682 #include <sys/types.h>
7683 int
7684 main ()
7685 {
7686
7687 #ifndef _POSIX_C_SOURCE
7688 make an error
7689 #endif
7690   ;
7691   return 0;
7692 }
7693 _ACEOF
7694 rm -f conftest.$ac_objext
7695 if { (eval echo "$as_me:7695: \"$ac_compile\"") >&5
7696   (eval $ac_compile) 2>&5
7697   ac_status=$?
7698   echo "$as_me:7698: \$? = $ac_status" >&5
7699   (exit $ac_status); } &&
7700          { ac_try='test -s conftest.$ac_objext'
7701   { (eval echo "$as_me:7701: \"$ac_try\"") >&5
7702   (eval $ac_try) 2>&5
7703   ac_status=$?
7704   echo "$as_me:7704: \$? = $ac_status" >&5
7705   (exit $ac_status); }; }; then
7706   :
7707 else
7708   echo "$as_me: failed program was:" >&5
7709 cat conftest.$ac_ext >&5
7710 cf_cv_posix_c_source=no
7711 fi
7712 rm -f conftest.$ac_objext conftest.$ac_ext
7713          CFLAGS="$cf_save_CFLAGS"
7714          CPPFLAGS="$cf_save_CPPFLAGS"
7715
7716 fi
7717 rm -f conftest.$ac_objext conftest.$ac_ext
7718
7719 fi
7720 echo "$as_me:7720: result: $cf_cv_posix_c_source" >&5
7721 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
7722
7723 if test "$cf_cv_posix_c_source" != no ; then
7724         CFLAGS="$cf_trim_CFLAGS"
7725         CPPFLAGS="$cf_trim_CPPFLAGS"
7726
7727 cf_fix_cppflags=no
7728 cf_new_cflags=
7729 cf_new_cppflags=
7730 cf_new_extra_cppflags=
7731
7732 for cf_add_cflags in $cf_cv_posix_c_source
7733 do
7734 case $cf_fix_cppflags in
7735 no)
7736         case $cf_add_cflags in #(vi
7737         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
7738                 case $cf_add_cflags in
7739                 -D*)
7740                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7741
7742                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7743                                 && test -z "${cf_tst_cflags}" \
7744                                 && cf_fix_cppflags=yes
7745
7746                         if test $cf_fix_cppflags = yes ; then
7747                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7748                                 continue
7749                         elif test "${cf_tst_cflags}" = "\"'" ; then
7750                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7751                                 continue
7752                         fi
7753                         ;;
7754                 esac
7755                 case "$CPPFLAGS" in
7756                 *$cf_add_cflags) #(vi
7757                         ;;
7758                 *) #(vi
7759                         case $cf_add_cflags in #(vi
7760                         -D*)
7761                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7762
7763 CPPFLAGS=`echo "$CPPFLAGS" | \
7764         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7765                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7766
7767                                 ;;
7768                         esac
7769                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
7770                         ;;
7771                 esac
7772                 ;;
7773         *)
7774                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
7775                 ;;
7776         esac
7777         ;;
7778 yes)
7779         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7780
7781         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7782
7783         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7784                 && test -z "${cf_tst_cflags}" \
7785                 && cf_fix_cppflags=no
7786         ;;
7787 esac
7788 done
7789
7790 if test -n "$cf_new_cflags" ; then
7791
7792         CFLAGS="$CFLAGS $cf_new_cflags"
7793 fi
7794
7795 if test -n "$cf_new_cppflags" ; then
7796
7797         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
7798 fi
7799
7800 if test -n "$cf_new_extra_cppflags" ; then
7801
7802         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
7803 fi
7804
7805 fi
7806
7807         ;;
7808 esac
7809
7810 if test -n "$cf_xopen_source" ; then
7811
7812 cf_fix_cppflags=no
7813 cf_new_cflags=
7814 cf_new_cppflags=
7815 cf_new_extra_cppflags=
7816
7817 for cf_add_cflags in $cf_xopen_source
7818 do
7819 case $cf_fix_cppflags in
7820 no)
7821         case $cf_add_cflags in #(vi
7822         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
7823                 case $cf_add_cflags in
7824                 -D*)
7825                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7826
7827                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7828                                 && test -z "${cf_tst_cflags}" \
7829                                 && cf_fix_cppflags=yes
7830
7831                         if test $cf_fix_cppflags = yes ; then
7832                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7833                                 continue
7834                         elif test "${cf_tst_cflags}" = "\"'" ; then
7835                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7836                                 continue
7837                         fi
7838                         ;;
7839                 esac
7840                 case "$CPPFLAGS" in
7841                 *$cf_add_cflags) #(vi
7842                         ;;
7843                 *) #(vi
7844                         case $cf_add_cflags in #(vi
7845                         -D*)
7846                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7847
7848 CPPFLAGS=`echo "$CPPFLAGS" | \
7849         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7850                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7851
7852                                 ;;
7853                         esac
7854                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
7855                         ;;
7856                 esac
7857                 ;;
7858         *)
7859                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
7860                 ;;
7861         esac
7862         ;;
7863 yes)
7864         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7865
7866         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7867
7868         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7869                 && test -z "${cf_tst_cflags}" \
7870                 && cf_fix_cppflags=no
7871         ;;
7872 esac
7873 done
7874
7875 if test -n "$cf_new_cflags" ; then
7876
7877         CFLAGS="$CFLAGS $cf_new_cflags"
7878 fi
7879
7880 if test -n "$cf_new_cppflags" ; then
7881
7882         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
7883 fi
7884
7885 if test -n "$cf_new_extra_cppflags" ; then
7886
7887         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
7888 fi
7889
7890 fi
7891
7892 # Check whether --enable-largefile or --disable-largefile was given.
7893 if test "${enable_largefile+set}" = set; then
7894   enableval="$enable_largefile"
7895
7896 fi;
7897 if test "$enable_largefile" != no; then
7898
7899   echo "$as_me:7899: checking for special C compiler options needed for large files" >&5
7900 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
7901 if test "${ac_cv_sys_largefile_CC+set}" = set; then
7902   echo $ECHO_N "(cached) $ECHO_C" >&6
7903 else
7904   ac_cv_sys_largefile_CC=no
7905      if test "$GCC" != yes; then
7906        ac_save_CC=$CC
7907        while :; do
7908          # IRIX 6.2 and later do not support large files by default,
7909          # so use the C compiler's -n32 option if that helps.
7910          cat >conftest.$ac_ext <<_ACEOF
7911 #line 7911 "configure"
7912 #include "confdefs.h"
7913 #include <sys/types.h>
7914  /* Check that off_t can represent 2**63 - 1 correctly.
7915     We can't simply define LARGE_OFF_T to be 9223372036854775807,
7916     since some C++ compilers masquerading as C compilers
7917     incorrectly reject 9223372036854775807.  */
7918 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
7919   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7920                        && LARGE_OFF_T % 2147483647 == 1)
7921                       ? 1 : -1];
7922 int
7923 main ()
7924 {
7925
7926   ;
7927   return 0;
7928 }
7929 _ACEOF
7930          rm -f conftest.$ac_objext
7931 if { (eval echo "$as_me:7931: \"$ac_compile\"") >&5
7932   (eval $ac_compile) 2>&5
7933   ac_status=$?
7934   echo "$as_me:7934: \$? = $ac_status" >&5
7935   (exit $ac_status); } &&
7936          { ac_try='test -s conftest.$ac_objext'
7937   { (eval echo "$as_me:7937: \"$ac_try\"") >&5
7938   (eval $ac_try) 2>&5
7939   ac_status=$?
7940   echo "$as_me:7940: \$? = $ac_status" >&5
7941   (exit $ac_status); }; }; then
7942   break
7943 else
7944   echo "$as_me: failed program was:" >&5
7945 cat conftest.$ac_ext >&5
7946 fi
7947 rm -f conftest.$ac_objext
7948          CC="$CC -n32"
7949          rm -f conftest.$ac_objext
7950 if { (eval echo "$as_me:7950: \"$ac_compile\"") >&5
7951   (eval $ac_compile) 2>&5
7952   ac_status=$?
7953   echo "$as_me:7953: \$? = $ac_status" >&5
7954   (exit $ac_status); } &&
7955          { ac_try='test -s conftest.$ac_objext'
7956   { (eval echo "$as_me:7956: \"$ac_try\"") >&5
7957   (eval $ac_try) 2>&5
7958   ac_status=$?
7959   echo "$as_me:7959: \$? = $ac_status" >&5
7960   (exit $ac_status); }; }; then
7961   ac_cv_sys_largefile_CC=' -n32'; break
7962 else
7963   echo "$as_me: failed program was:" >&5
7964 cat conftest.$ac_ext >&5
7965 fi
7966 rm -f conftest.$ac_objext
7967          break
7968        done
7969        CC=$ac_save_CC
7970        rm -f conftest.$ac_ext
7971     fi
7972 fi
7973 echo "$as_me:7973: result: $ac_cv_sys_largefile_CC" >&5
7974 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
7975   if test "$ac_cv_sys_largefile_CC" != no; then
7976     CC=$CC$ac_cv_sys_largefile_CC
7977   fi
7978
7979   echo "$as_me:7979: checking for _FILE_OFFSET_BITS value needed for large files" >&5
7980 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
7981 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
7982   echo $ECHO_N "(cached) $ECHO_C" >&6
7983 else
7984   while :; do
7985   ac_cv_sys_file_offset_bits=no
7986   cat >conftest.$ac_ext <<_ACEOF
7987 #line 7987 "configure"
7988 #include "confdefs.h"
7989 #include <sys/types.h>
7990  /* Check that off_t can represent 2**63 - 1 correctly.
7991     We can't simply define LARGE_OFF_T to be 9223372036854775807,
7992     since some C++ compilers masquerading as C compilers
7993     incorrectly reject 9223372036854775807.  */
7994 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
7995   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7996                        && LARGE_OFF_T % 2147483647 == 1)
7997                       ? 1 : -1];
7998 int
7999 main ()
8000 {
8001
8002   ;
8003   return 0;
8004 }
8005 _ACEOF
8006 rm -f conftest.$ac_objext
8007 if { (eval echo "$as_me:8007: \"$ac_compile\"") >&5
8008   (eval $ac_compile) 2>&5
8009   ac_status=$?
8010   echo "$as_me:8010: \$? = $ac_status" >&5
8011   (exit $ac_status); } &&
8012          { ac_try='test -s conftest.$ac_objext'
8013   { (eval echo "$as_me:8013: \"$ac_try\"") >&5
8014   (eval $ac_try) 2>&5
8015   ac_status=$?
8016   echo "$as_me:8016: \$? = $ac_status" >&5
8017   (exit $ac_status); }; }; then
8018   break
8019 else
8020   echo "$as_me: failed program was:" >&5
8021 cat conftest.$ac_ext >&5
8022 fi
8023 rm -f conftest.$ac_objext conftest.$ac_ext
8024   cat >conftest.$ac_ext <<_ACEOF
8025 #line 8025 "configure"
8026 #include "confdefs.h"
8027 #define _FILE_OFFSET_BITS 64
8028 #include <sys/types.h>
8029  /* Check that off_t can represent 2**63 - 1 correctly.
8030     We can't simply define LARGE_OFF_T to be 9223372036854775807,
8031     since some C++ compilers masquerading as C compilers
8032     incorrectly reject 9223372036854775807.  */
8033 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
8034   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
8035                        && LARGE_OFF_T % 2147483647 == 1)
8036                       ? 1 : -1];
8037 int
8038 main ()
8039 {
8040
8041   ;
8042   return 0;
8043 }
8044 _ACEOF
8045 rm -f conftest.$ac_objext
8046 if { (eval echo "$as_me:8046: \"$ac_compile\"") >&5
8047   (eval $ac_compile) 2>&5
8048   ac_status=$?
8049   echo "$as_me:8049: \$? = $ac_status" >&5
8050   (exit $ac_status); } &&
8051          { ac_try='test -s conftest.$ac_objext'
8052   { (eval echo "$as_me:8052: \"$ac_try\"") >&5
8053   (eval $ac_try) 2>&5
8054   ac_status=$?
8055   echo "$as_me:8055: \$? = $ac_status" >&5
8056   (exit $ac_status); }; }; then
8057   ac_cv_sys_file_offset_bits=64; break
8058 else
8059   echo "$as_me: failed program was:" >&5
8060 cat conftest.$ac_ext >&5
8061 fi
8062 rm -f conftest.$ac_objext conftest.$ac_ext
8063   break
8064 done
8065 fi
8066 echo "$as_me:8066: result: $ac_cv_sys_file_offset_bits" >&5
8067 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
8068 if test "$ac_cv_sys_file_offset_bits" != no; then
8069
8070 cat >>confdefs.h <<EOF
8071 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
8072 EOF
8073
8074 fi
8075 rm -f conftest*
8076   echo "$as_me:8076: checking for _LARGE_FILES value needed for large files" >&5
8077 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
8078 if test "${ac_cv_sys_large_files+set}" = set; then
8079   echo $ECHO_N "(cached) $ECHO_C" >&6
8080 else
8081   while :; do
8082   ac_cv_sys_large_files=no
8083   cat >conftest.$ac_ext <<_ACEOF
8084 #line 8084 "configure"
8085 #include "confdefs.h"
8086 #include <sys/types.h>
8087  /* Check that off_t can represent 2**63 - 1 correctly.
8088     We can't simply define LARGE_OFF_T to be 9223372036854775807,
8089     since some C++ compilers masquerading as C compilers
8090     incorrectly reject 9223372036854775807.  */
8091 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
8092   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
8093                        && LARGE_OFF_T % 2147483647 == 1)
8094                       ? 1 : -1];
8095 int
8096 main ()
8097 {
8098
8099   ;
8100   return 0;
8101 }
8102 _ACEOF
8103 rm -f conftest.$ac_objext
8104 if { (eval echo "$as_me:8104: \"$ac_compile\"") >&5
8105   (eval $ac_compile) 2>&5
8106   ac_status=$?
8107   echo "$as_me:8107: \$? = $ac_status" >&5
8108   (exit $ac_status); } &&
8109          { ac_try='test -s conftest.$ac_objext'
8110   { (eval echo "$as_me:8110: \"$ac_try\"") >&5
8111   (eval $ac_try) 2>&5
8112   ac_status=$?
8113   echo "$as_me:8113: \$? = $ac_status" >&5
8114   (exit $ac_status); }; }; then
8115   break
8116 else
8117   echo "$as_me: failed program was:" >&5
8118 cat conftest.$ac_ext >&5
8119 fi
8120 rm -f conftest.$ac_objext conftest.$ac_ext
8121   cat >conftest.$ac_ext <<_ACEOF
8122 #line 8122 "configure"
8123 #include "confdefs.h"
8124 #define _LARGE_FILES 1
8125 #include <sys/types.h>
8126  /* Check that off_t can represent 2**63 - 1 correctly.
8127     We can't simply define LARGE_OFF_T to be 9223372036854775807,
8128     since some C++ compilers masquerading as C compilers
8129     incorrectly reject 9223372036854775807.  */
8130 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
8131   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
8132                        && LARGE_OFF_T % 2147483647 == 1)
8133                       ? 1 : -1];
8134 int
8135 main ()
8136 {
8137
8138   ;
8139   return 0;
8140 }
8141 _ACEOF
8142 rm -f conftest.$ac_objext
8143 if { (eval echo "$as_me:8143: \"$ac_compile\"") >&5
8144   (eval $ac_compile) 2>&5
8145   ac_status=$?
8146   echo "$as_me:8146: \$? = $ac_status" >&5
8147   (exit $ac_status); } &&
8148          { ac_try='test -s conftest.$ac_objext'
8149   { (eval echo "$as_me:8149: \"$ac_try\"") >&5
8150   (eval $ac_try) 2>&5
8151   ac_status=$?
8152   echo "$as_me:8152: \$? = $ac_status" >&5
8153   (exit $ac_status); }; }; then
8154   ac_cv_sys_large_files=1; break
8155 else
8156   echo "$as_me: failed program was:" >&5
8157 cat conftest.$ac_ext >&5
8158 fi
8159 rm -f conftest.$ac_objext conftest.$ac_ext
8160   break
8161 done
8162 fi
8163 echo "$as_me:8163: result: $ac_cv_sys_large_files" >&5
8164 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
8165 if test "$ac_cv_sys_large_files" != no; then
8166
8167 cat >>confdefs.h <<EOF
8168 #define _LARGE_FILES $ac_cv_sys_large_files
8169 EOF
8170
8171 fi
8172 rm -f conftest*
8173 fi
8174
8175     if test "$enable_largefile" != no ; then
8176         echo "$as_me:8176: checking for _LARGEFILE_SOURCE value needed for large files" >&5
8177 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
8178 if test "${ac_cv_sys_largefile_source+set}" = set; then
8179   echo $ECHO_N "(cached) $ECHO_C" >&6
8180 else
8181   while :; do
8182   ac_cv_sys_largefile_source=no
8183   cat >conftest.$ac_ext <<_ACEOF
8184 #line 8184 "configure"
8185 #include "confdefs.h"
8186 #include <stdio.h>
8187 int
8188 main ()
8189 {
8190 return !fseeko;
8191   ;
8192   return 0;
8193 }
8194 _ACEOF
8195 rm -f conftest.$ac_objext
8196 if { (eval echo "$as_me:8196: \"$ac_compile\"") >&5
8197   (eval $ac_compile) 2>&5
8198   ac_status=$?
8199   echo "$as_me:8199: \$? = $ac_status" >&5
8200   (exit $ac_status); } &&
8201          { ac_try='test -s conftest.$ac_objext'
8202   { (eval echo "$as_me:8202: \"$ac_try\"") >&5
8203   (eval $ac_try) 2>&5
8204   ac_status=$?
8205   echo "$as_me:8205: \$? = $ac_status" >&5
8206   (exit $ac_status); }; }; then
8207   break
8208 else
8209   echo "$as_me: failed program was:" >&5
8210 cat conftest.$ac_ext >&5
8211 fi
8212 rm -f conftest.$ac_objext conftest.$ac_ext
8213   cat >conftest.$ac_ext <<_ACEOF
8214 #line 8214 "configure"
8215 #include "confdefs.h"
8216 #define _LARGEFILE_SOURCE 1
8217 #include <stdio.h>
8218 int
8219 main ()
8220 {
8221 return !fseeko;
8222   ;
8223   return 0;
8224 }
8225 _ACEOF
8226 rm -f conftest.$ac_objext
8227 if { (eval echo "$as_me:8227: \"$ac_compile\"") >&5
8228   (eval $ac_compile) 2>&5
8229   ac_status=$?
8230   echo "$as_me:8230: \$? = $ac_status" >&5
8231   (exit $ac_status); } &&
8232          { ac_try='test -s conftest.$ac_objext'
8233   { (eval echo "$as_me:8233: \"$ac_try\"") >&5
8234   (eval $ac_try) 2>&5
8235   ac_status=$?
8236   echo "$as_me:8236: \$? = $ac_status" >&5
8237   (exit $ac_status); }; }; then
8238   ac_cv_sys_largefile_source=1; break
8239 else
8240   echo "$as_me: failed program was:" >&5
8241 cat conftest.$ac_ext >&5
8242 fi
8243 rm -f conftest.$ac_objext conftest.$ac_ext
8244   break
8245 done
8246 fi
8247 echo "$as_me:8247: result: $ac_cv_sys_largefile_source" >&5
8248 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
8249 if test "$ac_cv_sys_largefile_source" != no; then
8250
8251 cat >>confdefs.h <<EOF
8252 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
8253 EOF
8254
8255 fi
8256 rm -f conftest*
8257
8258 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
8259 # in glibc 2.1.3, but that breaks too many other things.
8260 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
8261 echo "$as_me:8261: checking for fseeko" >&5
8262 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
8263 if test "${ac_cv_func_fseeko+set}" = set; then
8264   echo $ECHO_N "(cached) $ECHO_C" >&6
8265 else
8266   cat >conftest.$ac_ext <<_ACEOF
8267 #line 8267 "configure"
8268 #include "confdefs.h"
8269 #include <stdio.h>
8270 int
8271 main ()
8272 {
8273 return fseeko && fseeko (stdin, 0, 0);
8274   ;
8275   return 0;
8276 }
8277 _ACEOF
8278 rm -f conftest.$ac_objext conftest$ac_exeext
8279 if { (eval echo "$as_me:8279: \"$ac_link\"") >&5
8280   (eval $ac_link) 2>&5
8281   ac_status=$?
8282   echo "$as_me:8282: \$? = $ac_status" >&5
8283   (exit $ac_status); } &&
8284          { ac_try='test -s conftest$ac_exeext'
8285   { (eval echo "$as_me:8285: \"$ac_try\"") >&5
8286   (eval $ac_try) 2>&5
8287   ac_status=$?
8288   echo "$as_me:8288: \$? = $ac_status" >&5
8289   (exit $ac_status); }; }; then
8290   ac_cv_func_fseeko=yes
8291 else
8292   echo "$as_me: failed program was:" >&5
8293 cat conftest.$ac_ext >&5
8294 ac_cv_func_fseeko=no
8295 fi
8296 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8297 fi
8298 echo "$as_me:8298: result: $ac_cv_func_fseeko" >&5
8299 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
8300 if test $ac_cv_func_fseeko = yes; then
8301
8302 cat >>confdefs.h <<\EOF
8303 #define HAVE_FSEEKO 1
8304 EOF
8305
8306 fi
8307
8308         # Normally we would collect these definitions in the config.h,
8309         # but (like _XOPEN_SOURCE), some environments rely on having these
8310         # defined before any of the system headers are included.  Another
8311         # case comes up with C++, e.g., on AIX the compiler compiles the
8312         # header files by themselves before looking at the body files it is
8313         # told to compile.  For ncurses, those header files do not include
8314         # the config.h
8315         test "$ac_cv_sys_large_files"      != no && CPPFLAGS="$CPPFLAGS -D_LARGE_FILES "
8316         test "$ac_cv_sys_largefile_source" != no && CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE "
8317         test "$ac_cv_sys_file_offset_bits" != no && CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits "
8318
8319         echo "$as_me:8319: checking whether to use struct dirent64" >&5
8320 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
8321 if test "${cf_cv_struct_dirent64+set}" = set; then
8322   echo $ECHO_N "(cached) $ECHO_C" >&6
8323 else
8324
8325                 cat >conftest.$ac_ext <<_ACEOF
8326 #line 8326 "configure"
8327 #include "confdefs.h"
8328
8329 #include <sys/types.h>
8330 #include <dirent.h>
8331
8332 int
8333 main ()
8334 {
8335
8336                 /* if transitional largefile support is setup, this is true */
8337                 extern struct dirent64 * readdir(DIR *);
8338                 struct dirent64 *x = readdir((DIR *)0);
8339                 struct dirent *y = readdir((DIR *)0);
8340                 int z = x - y;
8341
8342   ;
8343   return 0;
8344 }
8345 _ACEOF
8346 rm -f conftest.$ac_objext
8347 if { (eval echo "$as_me:8347: \"$ac_compile\"") >&5
8348   (eval $ac_compile) 2>&5
8349   ac_status=$?
8350   echo "$as_me:8350: \$? = $ac_status" >&5
8351   (exit $ac_status); } &&
8352          { ac_try='test -s conftest.$ac_objext'
8353   { (eval echo "$as_me:8353: \"$ac_try\"") >&5
8354   (eval $ac_try) 2>&5
8355   ac_status=$?
8356   echo "$as_me:8356: \$? = $ac_status" >&5
8357   (exit $ac_status); }; }; then
8358   cf_cv_struct_dirent64=yes
8359 else
8360   echo "$as_me: failed program was:" >&5
8361 cat conftest.$ac_ext >&5
8362 cf_cv_struct_dirent64=no
8363 fi
8364 rm -f conftest.$ac_objext conftest.$ac_ext
8365
8366 fi
8367 echo "$as_me:8367: result: $cf_cv_struct_dirent64" >&5
8368 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
8369         test "$cf_cv_struct_dirent64" = yes && cat >>confdefs.h <<\EOF
8370 #define HAVE_STRUCT_DIRENT64 1
8371 EOF
8372
8373     fi
8374
8375 ### Enable compiling-in rcs id's
8376 echo "$as_me:8376: checking if RCS identifiers should be compiled-in" >&5
8377 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
8378
8379 # Check whether --with-rcs-ids or --without-rcs-ids was given.
8380 if test "${with_rcs_ids+set}" = set; then
8381   withval="$with_rcs_ids"
8382   with_rcs_ids=$withval
8383 else
8384   with_rcs_ids=no
8385 fi;
8386 echo "$as_me:8386: result: $with_rcs_ids" >&5
8387 echo "${ECHO_T}$with_rcs_ids" >&6
8388 test "$with_rcs_ids" = yes && cat >>confdefs.h <<\EOF
8389 #define USE_RCS_IDS 1
8390 EOF
8391
8392 ###############################################################################
8393
8394 ### Note that some functions (such as const) are normally disabled anyway.
8395 echo "$as_me:8395: checking if you want to build with function extensions" >&5
8396 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
8397
8398 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
8399 if test "${enable_ext_funcs+set}" = set; then
8400   enableval="$enable_ext_funcs"
8401   with_ext_funcs=$enableval
8402 else
8403   with_ext_funcs=yes
8404 fi;
8405 echo "$as_me:8405: result: $with_ext_funcs" >&5
8406 echo "${ECHO_T}$with_ext_funcs" >&6
8407 if test "$with_ext_funcs" = yes ; then
8408         NCURSES_EXT_FUNCS=1
8409         cat >>confdefs.h <<\EOF
8410 #define HAVE_USE_DEFAULT_COLORS 1
8411 EOF
8412
8413         cat >>confdefs.h <<\EOF
8414 #define NCURSES_EXT_FUNCS 1
8415 EOF
8416
8417 else
8418         NCURSES_EXT_FUNCS=0
8419 fi
8420
8421 ###   use option --enable-const to turn on use of const beyond that in XSI.
8422 echo "$as_me:8422: checking for extended use of const keyword" >&5
8423 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
8424
8425 # Check whether --enable-const or --disable-const was given.
8426 if test "${enable_const+set}" = set; then
8427   enableval="$enable_const"
8428   with_ext_const=$enableval
8429 else
8430   with_ext_const=no
8431 fi;
8432 echo "$as_me:8432: result: $with_ext_const" >&5
8433 echo "${ECHO_T}$with_ext_const" >&6
8434 NCURSES_CONST='/*nothing*/'
8435 if test "$with_ext_const" = yes ; then
8436         NCURSES_CONST=const
8437 fi
8438
8439 ###############################################################################
8440 # These options are relatively safe to experiment with.
8441
8442 echo "$as_me:8442: checking if you want all development code" >&5
8443 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
8444
8445 # Check whether --with-develop or --without-develop was given.
8446 if test "${with_develop+set}" = set; then
8447   withval="$with_develop"
8448   with_develop=$withval
8449 else
8450   with_develop=no
8451 fi;
8452 echo "$as_me:8452: result: $with_develop" >&5
8453 echo "${ECHO_T}$with_develop" >&6
8454
8455 ###############################################################################
8456 # These are just experimental, probably should not be in a package:
8457
8458 # This is still experimental (20080329), but should ultimately be moved to
8459 # the script-block --with-normal, etc.
8460
8461 echo "$as_me:8461: checking if you want to link with the pthread library" >&5
8462 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
8463
8464 # Check whether --with-pthread or --without-pthread was given.
8465 if test "${with_pthread+set}" = set; then
8466   withval="$with_pthread"
8467   with_pthread=$withval
8468 else
8469   with_pthread=no
8470 fi;
8471 echo "$as_me:8471: result: $with_pthread" >&5
8472 echo "${ECHO_T}$with_pthread" >&6
8473
8474 if test "$with_pthread" != no ; then
8475     echo "$as_me:8475: checking for pthread.h" >&5
8476 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
8477 if test "${ac_cv_header_pthread_h+set}" = set; then
8478   echo $ECHO_N "(cached) $ECHO_C" >&6
8479 else
8480   cat >conftest.$ac_ext <<_ACEOF
8481 #line 8481 "configure"
8482 #include "confdefs.h"
8483 #include <pthread.h>
8484 _ACEOF
8485 if { (eval echo "$as_me:8485: \"$ac_cpp conftest.$ac_ext\"") >&5
8486   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8487   ac_status=$?
8488   egrep -v '^ *\+' conftest.er1 >conftest.err
8489   rm -f conftest.er1
8490   cat conftest.err >&5
8491   echo "$as_me:8491: \$? = $ac_status" >&5
8492   (exit $ac_status); } >/dev/null; then
8493   if test -s conftest.err; then
8494     ac_cpp_err=$ac_c_preproc_warn_flag
8495   else
8496     ac_cpp_err=
8497   fi
8498 else
8499   ac_cpp_err=yes
8500 fi
8501 if test -z "$ac_cpp_err"; then
8502   ac_cv_header_pthread_h=yes
8503 else
8504   echo "$as_me: failed program was:" >&5
8505   cat conftest.$ac_ext >&5
8506   ac_cv_header_pthread_h=no
8507 fi
8508 rm -f conftest.err conftest.$ac_ext
8509 fi
8510 echo "$as_me:8510: result: $ac_cv_header_pthread_h" >&5
8511 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
8512 if test $ac_cv_header_pthread_h = yes; then
8513
8514         cat >>confdefs.h <<\EOF
8515 #define HAVE_PTHREADS_H 1
8516 EOF
8517
8518         echo "$as_me:8518: checking if we can link with the pthread library" >&5
8519 echo $ECHO_N "checking if we can link with the pthread library... $ECHO_C" >&6
8520         cf_save_LIBS="$LIBS"
8521         LIBS="-lpthread $LIBS"
8522         cat >conftest.$ac_ext <<_ACEOF
8523 #line 8523 "configure"
8524 #include "confdefs.h"
8525
8526 #include <pthread.h>
8527
8528 int
8529 main ()
8530 {
8531
8532         int rc = pthread_create(0,0,0,0);
8533
8534   ;
8535   return 0;
8536 }
8537 _ACEOF
8538 rm -f conftest.$ac_objext conftest$ac_exeext
8539 if { (eval echo "$as_me:8539: \"$ac_link\"") >&5
8540   (eval $ac_link) 2>&5
8541   ac_status=$?
8542   echo "$as_me:8542: \$? = $ac_status" >&5
8543   (exit $ac_status); } &&
8544          { ac_try='test -s conftest$ac_exeext'
8545   { (eval echo "$as_me:8545: \"$ac_try\"") >&5
8546   (eval $ac_try) 2>&5
8547   ac_status=$?
8548   echo "$as_me:8548: \$? = $ac_status" >&5
8549   (exit $ac_status); }; }; then
8550   with_pthread=yes
8551 else
8552   echo "$as_me: failed program was:" >&5
8553 cat conftest.$ac_ext >&5
8554 with_pthread=no
8555 fi
8556 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8557         LIBS="$cf_save_LIBS"
8558         echo "$as_me:8558: result: $with_pthread" >&5
8559 echo "${ECHO_T}$with_pthread" >&6
8560
8561         if test "$with_pthread" = yes ; then
8562             LIBS="-lpthread $LIBS"
8563             cat >>confdefs.h <<\EOF
8564 #define HAVE_LIBPTHREADS 1
8565 EOF
8566
8567         else
8568             { { echo "$as_me:8568: error: Cannot link with pthread library" >&5
8569 echo "$as_me: error: Cannot link with pthread library" >&2;}
8570    { (exit 1); exit 1; }; }
8571         fi
8572
8573 fi
8574
8575 fi
8576
8577 echo "$as_me:8577: checking if you want to use weak-symbols for pthreads" >&5
8578 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
8579
8580 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
8581 if test "${enable_weak_symbols+set}" = set; then
8582   enableval="$enable_weak_symbols"
8583   use_weak_symbols=$withval
8584 else
8585   use_weak_symbols=no
8586 fi;
8587 echo "$as_me:8587: result: $use_weak_symbols" >&5
8588 echo "${ECHO_T}$use_weak_symbols" >&6
8589 if test "$use_weak_symbols" = yes ; then
8590
8591 echo "$as_me:8591: checking if $CC supports weak symbols" >&5
8592 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
8593 if test "${cf_cv_weak_symbols+set}" = set; then
8594   echo $ECHO_N "(cached) $ECHO_C" >&6
8595 else
8596
8597 cat >conftest.$ac_ext <<_ACEOF
8598 #line 8598 "configure"
8599 #include "confdefs.h"
8600
8601 #include <stdio.h>
8602 int
8603 main ()
8604 {
8605
8606 #if defined(__GNUC__)
8607 #  if defined __USE_ISOC99
8608 #    define _cat_pragma(exp)    _Pragma(#exp)
8609 #    define _weak_pragma(exp)   _cat_pragma(weak name)
8610 #  else
8611 #    define _weak_pragma(exp)
8612 #  endif
8613 #  define _declare(name)        __extension__ extern __typeof__(name) name
8614 #  define weak_symbol(name)     _weak_pragma(name) _declare(name) __attribute__((weak))
8615 #endif
8616
8617 weak_symbol(fopen);
8618
8619   ;
8620   return 0;
8621 }
8622 _ACEOF
8623 rm -f conftest.$ac_objext
8624 if { (eval echo "$as_me:8624: \"$ac_compile\"") >&5
8625   (eval $ac_compile) 2>&5
8626   ac_status=$?
8627   echo "$as_me:8627: \$? = $ac_status" >&5
8628   (exit $ac_status); } &&
8629          { ac_try='test -s conftest.$ac_objext'
8630   { (eval echo "$as_me:8630: \"$ac_try\"") >&5
8631   (eval $ac_try) 2>&5
8632   ac_status=$?
8633   echo "$as_me:8633: \$? = $ac_status" >&5
8634   (exit $ac_status); }; }; then
8635   cf_cv_weak_symbols=yes
8636 else
8637   echo "$as_me: failed program was:" >&5
8638 cat conftest.$ac_ext >&5
8639 cf_cv_weak_symbols=no
8640 fi
8641 rm -f conftest.$ac_objext conftest.$ac_ext
8642
8643 fi
8644 echo "$as_me:8644: result: $cf_cv_weak_symbols" >&5
8645 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
8646
8647 else
8648     cf_cv_weak_symbols=no
8649 fi
8650
8651 if test $cf_cv_weak_symbols = yes ; then
8652     cat >>confdefs.h <<\EOF
8653 #define USE_WEAK_SYMBOLS 1
8654 EOF
8655
8656 fi
8657
8658 PTHREAD=
8659 if test "$with_pthread" = "yes" ; then
8660     cat >>confdefs.h <<\EOF
8661 #define USE_PTHREADS 1
8662 EOF
8663
8664     enable_reentrant=yes
8665     if test $cf_cv_weak_symbols = yes ; then
8666         PTHREAD=-lpthread
8667     fi
8668 fi
8669
8670 # Reentrant code has to be opaque; there's little advantage to making ncurses
8671 # opaque outside of that, so there is no --enable-opaque option.  We can use
8672 # this option without --with-pthreads, but this will be always set for
8673 # pthreads.
8674 echo "$as_me:8674: checking if you want experimental reentrant code" >&5
8675 echo $ECHO_N "checking if you want experimental reentrant code... $ECHO_C" >&6
8676
8677 # Check whether --enable-reentrant or --disable-reentrant was given.
8678 if test "${enable_reentrant+set}" = set; then
8679   enableval="$enable_reentrant"
8680   with_reentrant=$enableval
8681 else
8682   with_reentrant=no
8683 fi;
8684 echo "$as_me:8684: result: $with_reentrant" >&5
8685 echo "${ECHO_T}$with_reentrant" >&6
8686 if test "$with_reentrant" = yes ; then
8687         cf_cv_enable_reentrant=1
8688         if test $cf_cv_weak_symbols = yes ; then
8689
8690 # remove pthread library from $LIBS
8691 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[       ]//g' -e 's/-lpthread$//'`
8692
8693         else
8694                 LIB_SUFFIX="t${LIB_SUFFIX}"
8695         fi
8696         cat >>confdefs.h <<\EOF
8697 #define USE_REENTRANT 1
8698 EOF
8699
8700 else
8701         cf_cv_enable_reentrant=0
8702 fi
8703
8704 ### Allow using a different wrap-prefix
8705 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
8706         echo "$as_me:8706: checking for prefix used to wrap public variables" >&5
8707 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
8708
8709 # Check whether --with-wrap-prefix or --without-wrap-prefix was given.
8710 if test "${with_wrap_prefix+set}" = set; then
8711   withval="$with_wrap_prefix"
8712   NCURSES_WRAP_PREFIX=$withval
8713 else
8714   NCURSES_WRAP_PREFIX=_nc_
8715 fi;
8716         echo "$as_me:8716: result: $NCURSES_WRAP_PREFIX" >&5
8717 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
8718 else
8719         NCURSES_WRAP_PREFIX=_nc_
8720 fi
8721
8722 cat >>confdefs.h <<EOF
8723 #define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
8724 EOF
8725
8726 ###############################################################################
8727
8728 ###     use option --disable-echo to suppress full display compiling commands
8729 echo "$as_me:8729: checking if you want to display full commands during build" >&5
8730 echo $ECHO_N "checking if you want to display full commands during build... $ECHO_C" >&6
8731
8732 # Check whether --enable-echo or --disable-echo was given.
8733 if test "${enable_echo+set}" = set; then
8734   enableval="$enable_echo"
8735   with_echo=$enableval
8736 else
8737   with_echo=yes
8738 fi;
8739 if test "$with_echo" = yes; then
8740         ECHO_LINK=
8741 else
8742         ECHO_LINK='@ echo linking $@ ... ;'
8743 fi
8744 echo "$as_me:8744: result: $with_echo" >&5
8745 echo "${ECHO_T}$with_echo" >&6
8746
8747 ###     use option --enable-warnings to turn on all gcc warnings
8748 echo "$as_me:8748: checking if you want to see compiler warnings" >&5
8749 echo $ECHO_N "checking if you want to see compiler warnings... $ECHO_C" >&6
8750
8751 # Check whether --enable-warnings or --disable-warnings was given.
8752 if test "${enable_warnings+set}" = set; then
8753   enableval="$enable_warnings"
8754   with_warnings=$enableval
8755 fi;
8756 echo "$as_me:8756: result: $with_warnings" >&5
8757 echo "${ECHO_T}$with_warnings" >&6
8758
8759 if test "x$with_warnings" = "xyes"; then
8760         ADAFLAGS="$ADAFLAGS -gnatg"
8761
8762 INTEL_COMPILER=no
8763
8764 if test "$GCC" = yes ; then
8765         case $host_os in
8766         linux*|gnu*)
8767                 echo "$as_me:8767: checking if this is really Intel C compiler" >&5
8768 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
8769                 cf_save_CFLAGS="$CFLAGS"
8770                 CFLAGS="$CFLAGS -no-gcc"
8771                 cat >conftest.$ac_ext <<_ACEOF
8772 #line 8772 "configure"
8773 #include "confdefs.h"
8774
8775 int
8776 main ()
8777 {
8778
8779 #ifdef __INTEL_COMPILER
8780 #else
8781 make an error
8782 #endif
8783
8784   ;
8785   return 0;
8786 }
8787 _ACEOF
8788 rm -f conftest.$ac_objext
8789 if { (eval echo "$as_me:8789: \"$ac_compile\"") >&5
8790   (eval $ac_compile) 2>&5
8791   ac_status=$?
8792   echo "$as_me:8792: \$? = $ac_status" >&5
8793   (exit $ac_status); } &&
8794          { ac_try='test -s conftest.$ac_objext'
8795   { (eval echo "$as_me:8795: \"$ac_try\"") >&5
8796   (eval $ac_try) 2>&5
8797   ac_status=$?
8798   echo "$as_me:8798: \$? = $ac_status" >&5
8799   (exit $ac_status); }; }; then
8800   INTEL_COMPILER=yes
8801 cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
8802
8803 else
8804   echo "$as_me: failed program was:" >&5
8805 cat conftest.$ac_ext >&5
8806 fi
8807 rm -f conftest.$ac_objext conftest.$ac_ext
8808                 CFLAGS="$cf_save_CFLAGS"
8809                 echo "$as_me:8809: result: $INTEL_COMPILER" >&5
8810 echo "${ECHO_T}$INTEL_COMPILER" >&6
8811                 ;;
8812         esac
8813 fi
8814
8815 cat > conftest.$ac_ext <<EOF
8816 #line 8816 "${as_me-configure}"
8817 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
8818 EOF
8819
8820 if test "$INTEL_COMPILER" = yes
8821 then
8822 # The "-wdXXX" options suppress warnings:
8823 # remark #1419: external declaration in primary source file
8824 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
8825 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
8826 # remark #193: zero used for undefined preprocessing identifier
8827 # remark #593: variable "curs_sb_left_arrow" was set but never used
8828 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
8829 # remark #869: parameter "tw" was never referenced
8830 # remark #981: operands are evaluated in unspecified order
8831 # warning #279: controlling expression is constant
8832
8833         { echo "$as_me:8833: checking for $CC warning options..." >&5
8834 echo "$as_me: checking for $CC warning options..." >&6;}
8835         cf_save_CFLAGS="$CFLAGS"
8836         EXTRA_CFLAGS="-Wall"
8837         for cf_opt in \
8838                 wd1419 \
8839                 wd1683 \
8840                 wd1684 \
8841                 wd193 \
8842                 wd593 \
8843                 wd279 \
8844                 wd810 \
8845                 wd869 \
8846                 wd981
8847         do
8848                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
8849                 if { (eval echo "$as_me:8849: \"$ac_compile\"") >&5
8850   (eval $ac_compile) 2>&5
8851   ac_status=$?
8852   echo "$as_me:8852: \$? = $ac_status" >&5
8853   (exit $ac_status); }; then
8854                         test -n "$verbose" && echo "$as_me:8854: result: ... -$cf_opt" >&5
8855 echo "${ECHO_T}... -$cf_opt" >&6
8856                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
8857                 fi
8858         done
8859         CFLAGS="$cf_save_CFLAGS"
8860
8861 elif test "$GCC" = yes
8862 then
8863         { echo "$as_me:8863: checking for $CC warning options..." >&5
8864 echo "$as_me: checking for $CC warning options..." >&6;}
8865         cf_save_CFLAGS="$CFLAGS"
8866         EXTRA_CFLAGS="-W -Wall"
8867         cf_warn_CONST=""
8868         test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
8869         for cf_opt in \
8870                 Wbad-function-cast \
8871                 Wcast-align \
8872                 Wcast-qual \
8873                 Winline \
8874                 Wmissing-declarations \
8875                 Wmissing-prototypes \
8876                 Wnested-externs \
8877                 Wpointer-arith \
8878                 Wshadow \
8879                 Wstrict-prototypes \
8880                 Wundef $cf_warn_CONST Wdeclaration-after-statement Wextra Wno-unknown-pragmas Wswitch-enum
8881         do
8882                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
8883                 if { (eval echo "$as_me:8883: \"$ac_compile\"") >&5
8884   (eval $ac_compile) 2>&5
8885   ac_status=$?
8886   echo "$as_me:8886: \$? = $ac_status" >&5
8887   (exit $ac_status); }; then
8888                         test -n "$verbose" && echo "$as_me:8888: result: ... -$cf_opt" >&5
8889 echo "${ECHO_T}... -$cf_opt" >&6
8890                         case $cf_opt in #(vi
8891                         Wcast-qual) #(vi
8892                                 CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
8893                                 ;;
8894                         Winline) #(vi
8895                                 case $GCC_VERSION in
8896                                 [34].*)
8897                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
8898
8899 echo "${as_me-configure}:8899: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
8900
8901                                         continue;;
8902                                 esac
8903                                 ;;
8904                         esac
8905                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
8906                 fi
8907         done
8908         CFLAGS="$cf_save_CFLAGS"
8909 fi
8910 rm -f conftest*
8911
8912 fi
8913
8914 if test "$GCC" = yes
8915 then
8916 cat > conftest.i <<EOF
8917 #ifndef GCC_PRINTF
8918 #define GCC_PRINTF 0
8919 #endif
8920 #ifndef GCC_SCANF
8921 #define GCC_SCANF 0
8922 #endif
8923 #ifndef GCC_NORETURN
8924 #define GCC_NORETURN /* nothing */
8925 #endif
8926 #ifndef GCC_UNUSED
8927 #define GCC_UNUSED /* nothing */
8928 #endif
8929 EOF
8930 if test "$GCC" = yes
8931 then
8932         { echo "$as_me:8932: checking for $CC __attribute__ directives..." >&5
8933 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
8934 cat > conftest.$ac_ext <<EOF
8935 #line 8935 "${as_me-configure}"
8936 #include "confdefs.h"
8937 #include "conftest.h"
8938 #include "conftest.i"
8939 #if     GCC_PRINTF
8940 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
8941 #else
8942 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
8943 #endif
8944 #if     GCC_SCANF
8945 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
8946 #else
8947 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
8948 #endif
8949 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
8950 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
8951 extern void foo(void) GCC_NORETURN;
8952 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
8953 EOF
8954         cf_printf_attribute=no
8955         cf_scanf_attribute=no
8956         for cf_attribute in scanf printf unused noreturn
8957         do
8958
8959 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
8960
8961                 cf_directive="__attribute__(($cf_attribute))"
8962                 echo "checking for $CC $cf_directive" 1>&5
8963
8964                 case $cf_attribute in #(vi
8965                 printf) #(vi
8966                         cf_printf_attribute=yes
8967                         cat >conftest.h <<EOF
8968 #define GCC_$cf_ATTRIBUTE 1
8969 EOF
8970                         ;;
8971                 scanf) #(vi
8972                         cf_scanf_attribute=yes
8973                         cat >conftest.h <<EOF
8974 #define GCC_$cf_ATTRIBUTE 1
8975 EOF
8976                         ;;
8977                 *) #(vi
8978                         cat >conftest.h <<EOF
8979 #define GCC_$cf_ATTRIBUTE $cf_directive
8980 EOF
8981                         ;;
8982                 esac
8983
8984                 if { (eval echo "$as_me:8984: \"$ac_compile\"") >&5
8985   (eval $ac_compile) 2>&5
8986   ac_status=$?
8987   echo "$as_me:8987: \$? = $ac_status" >&5
8988   (exit $ac_status); }; then
8989                         test -n "$verbose" && echo "$as_me:8989: result: ... $cf_attribute" >&5
8990 echo "${ECHO_T}... $cf_attribute" >&6
8991                         cat conftest.h >>confdefs.h
8992                         case $cf_attribute in #(vi
8993                         printf) #(vi
8994                                 if test "$cf_printf_attribute" = no ; then
8995                                         cat >>confdefs.h <<EOF
8996 #define GCC_PRINTFLIKE(fmt,var) /* nothing */
8997 EOF
8998                                 else
8999                                         cat >>confdefs.h <<EOF
9000 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
9001 EOF
9002                                 fi
9003                                 ;;
9004                         scanf) #(vi
9005                                 if test "$cf_scanf_attribute" = no ; then
9006                                         cat >>confdefs.h <<EOF
9007 #define GCC_SCANFLIKE(fmt,var) /* nothing */
9008 EOF
9009                                 else
9010                                         cat >>confdefs.h <<EOF
9011 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
9012 EOF
9013                                 fi
9014                                 ;;
9015                         esac
9016                 fi
9017         done
9018 else
9019         fgrep define conftest.i >>confdefs.h
9020 fi
9021 rm -rf conftest*
9022 fi
9023
9024 ###     use option --enable-assertions to turn on generation of assertion code
9025 echo "$as_me:9025: checking if you want to enable runtime assertions" >&5
9026 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
9027
9028 # Check whether --enable-assertions or --disable-assertions was given.
9029 if test "${enable_assertions+set}" = set; then
9030   enableval="$enable_assertions"
9031   with_assertions=$enableval
9032 else
9033   with_assertions=no
9034 fi;
9035 echo "$as_me:9035: result: $with_assertions" >&5
9036 echo "${ECHO_T}$with_assertions" >&6
9037 if test -n "$GCC"
9038 then
9039         if test "$with_assertions" = no
9040         then
9041                 cat >>confdefs.h <<\EOF
9042 #define NDEBUG 1
9043 EOF
9044
9045                 CPPFLAGS="$CPPFLAGS -DNDEBUG"
9046         else
9047                 ADAFLAGS="$ADAFLAGS -gnata"
9048         fi
9049 fi
9050
9051 ###     use option --disable-leaks to suppress "permanent" leaks, for testing
9052 cat >>confdefs.h <<\EOF
9053 #define HAVE_NC_ALLOC_H 1
9054 EOF
9055
9056 ###     use option --enable-expanded to generate certain macros as functions
9057
9058 # Check whether --enable-expanded or --disable-expanded was given.
9059 if test "${enable_expanded+set}" = set; then
9060   enableval="$enable_expanded"
9061   test "$enableval" = yes && cat >>confdefs.h <<\EOF
9062 #define NCURSES_EXPANDED 1
9063 EOF
9064
9065 fi;
9066
9067 ###     use option --disable-macros to suppress macros in favor of functions
9068
9069 # Check whether --enable-macros or --disable-macros was given.
9070 if test "${enable_macros+set}" = set; then
9071   enableval="$enable_macros"
9072   test "$enableval" = no && cat >>confdefs.h <<\EOF
9073 #define NCURSES_NOMACROS 1
9074 EOF
9075
9076 fi;
9077
9078 # Normally we only add trace() to the debug-library.  Allow this to be
9079 # extended to all models of the ncurses library:
9080 cf_all_traces=no
9081 case "$CFLAGS $CPPFLAGS" in
9082 *-DTRACE*)
9083         cf_all_traces=yes
9084         ;;
9085 esac
9086
9087 echo "$as_me:9087: checking whether to add trace feature to all models" >&5
9088 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
9089
9090 # Check whether --with-trace or --without-trace was given.
9091 if test "${with_trace+set}" = set; then
9092   withval="$with_trace"
9093   cf_with_trace=$withval
9094 else
9095   cf_with_trace=$cf_all_traces
9096 fi;
9097 echo "$as_me:9097: result: $cf_with_trace" >&5
9098 echo "${ECHO_T}$cf_with_trace" >&6
9099
9100 if test "$cf_with_trace" = yes ; then
9101         ADA_TRACE=TRUE
9102
9103 cf_fix_cppflags=no
9104 cf_new_cflags=
9105 cf_new_cppflags=
9106 cf_new_extra_cppflags=
9107
9108 for cf_add_cflags in -DTRACE
9109 do
9110 case $cf_fix_cppflags in
9111 no)
9112         case $cf_add_cflags in #(vi
9113         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
9114                 case $cf_add_cflags in
9115                 -D*)
9116                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9117
9118                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
9119                                 && test -z "${cf_tst_cflags}" \
9120                                 && cf_fix_cppflags=yes
9121
9122                         if test $cf_fix_cppflags = yes ; then
9123                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9124                                 continue
9125                         elif test "${cf_tst_cflags}" = "\"'" ; then
9126                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9127                                 continue
9128                         fi
9129                         ;;
9130                 esac
9131                 case "$CPPFLAGS" in
9132                 *$cf_add_cflags) #(vi
9133                         ;;
9134                 *) #(vi
9135                         case $cf_add_cflags in #(vi
9136                         -D*)
9137                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9138
9139 CPPFLAGS=`echo "$CPPFLAGS" | \
9140         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
9141                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
9142
9143                                 ;;
9144                         esac
9145                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
9146                         ;;
9147                 esac
9148                 ;;
9149         *)
9150                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
9151                 ;;
9152         esac
9153         ;;
9154 yes)
9155         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9156
9157         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
9158
9159         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
9160                 && test -z "${cf_tst_cflags}" \
9161                 && cf_fix_cppflags=no
9162         ;;
9163 esac
9164 done
9165
9166 if test -n "$cf_new_cflags" ; then
9167
9168         CFLAGS="$CFLAGS $cf_new_cflags"
9169 fi
9170
9171 if test -n "$cf_new_cppflags" ; then
9172
9173         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
9174 fi
9175
9176 if test -n "$cf_new_extra_cppflags" ; then
9177
9178         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
9179 fi
9180
9181 else
9182         ADA_TRACE=FALSE
9183 fi
9184
9185 ###     Checks for libraries.
9186 case $cf_cv_system_name in #(vi
9187 *mingw32*) #(vi
9188         ;;
9189 *)
9190 echo "$as_me:9190: checking for gettimeofday" >&5
9191 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
9192 if test "${ac_cv_func_gettimeofday+set}" = set; then
9193   echo $ECHO_N "(cached) $ECHO_C" >&6
9194 else
9195   cat >conftest.$ac_ext <<_ACEOF
9196 #line 9196 "configure"
9197 #include "confdefs.h"
9198 /* System header to define __stub macros and hopefully few prototypes,
9199     which can conflict with char gettimeofday (); below.  */
9200 #include <assert.h>
9201 /* Override any gcc2 internal prototype to avoid an error.  */
9202 #ifdef __cplusplus
9203 extern "C"
9204 #endif
9205 /* We use char because int might match the return type of a gcc2
9206    builtin and then its argument prototype would still apply.  */
9207 char gettimeofday ();
9208 char (*f) ();
9209
9210 int
9211 main ()
9212 {
9213 /* The GNU C library defines this for functions which it implements
9214     to always fail with ENOSYS.  Some functions are actually named
9215     something starting with __ and the normal name is an alias.  */
9216 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
9217 choke me
9218 #else
9219 f = gettimeofday;
9220 #endif
9221
9222   ;
9223   return 0;
9224 }
9225 _ACEOF
9226 rm -f conftest.$ac_objext conftest$ac_exeext
9227 if { (eval echo "$as_me:9227: \"$ac_link\"") >&5
9228   (eval $ac_link) 2>&5
9229   ac_status=$?
9230   echo "$as_me:9230: \$? = $ac_status" >&5
9231   (exit $ac_status); } &&
9232          { ac_try='test -s conftest$ac_exeext'
9233   { (eval echo "$as_me:9233: \"$ac_try\"") >&5
9234   (eval $ac_try) 2>&5
9235   ac_status=$?
9236   echo "$as_me:9236: \$? = $ac_status" >&5
9237   (exit $ac_status); }; }; then
9238   ac_cv_func_gettimeofday=yes
9239 else
9240   echo "$as_me: failed program was:" >&5
9241 cat conftest.$ac_ext >&5
9242 ac_cv_func_gettimeofday=no
9243 fi
9244 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9245 fi
9246 echo "$as_me:9246: result: $ac_cv_func_gettimeofday" >&5
9247 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
9248 if test $ac_cv_func_gettimeofday = yes; then
9249   cat >>confdefs.h <<\EOF
9250 #define HAVE_GETTIMEOFDAY 1
9251 EOF
9252
9253 else
9254
9255 echo "$as_me:9255: checking for gettimeofday in -lbsd" >&5
9256 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
9257 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
9258   echo $ECHO_N "(cached) $ECHO_C" >&6
9259 else
9260   ac_check_lib_save_LIBS=$LIBS
9261 LIBS="-lbsd  $LIBS"
9262 cat >conftest.$ac_ext <<_ACEOF
9263 #line 9263 "configure"
9264 #include "confdefs.h"
9265
9266 /* Override any gcc2 internal prototype to avoid an error.  */
9267 #ifdef __cplusplus
9268 extern "C"
9269 #endif
9270 /* We use char because int might match the return type of a gcc2
9271    builtin and then its argument prototype would still apply.  */
9272 char gettimeofday ();
9273 int
9274 main ()
9275 {
9276 gettimeofday ();
9277   ;
9278   return 0;
9279 }
9280 _ACEOF
9281 rm -f conftest.$ac_objext conftest$ac_exeext
9282 if { (eval echo "$as_me:9282: \"$ac_link\"") >&5
9283   (eval $ac_link) 2>&5
9284   ac_status=$?
9285   echo "$as_me:9285: \$? = $ac_status" >&5
9286   (exit $ac_status); } &&
9287          { ac_try='test -s conftest$ac_exeext'
9288   { (eval echo "$as_me:9288: \"$ac_try\"") >&5
9289   (eval $ac_try) 2>&5
9290   ac_status=$?
9291   echo "$as_me:9291: \$? = $ac_status" >&5
9292   (exit $ac_status); }; }; then
9293   ac_cv_lib_bsd_gettimeofday=yes
9294 else
9295   echo "$as_me: failed program was:" >&5
9296 cat conftest.$ac_ext >&5
9297 ac_cv_lib_bsd_gettimeofday=no
9298 fi
9299 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9300 LIBS=$ac_check_lib_save_LIBS
9301 fi
9302 echo "$as_me:9302: result: $ac_cv_lib_bsd_gettimeofday" >&5
9303 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
9304 if test $ac_cv_lib_bsd_gettimeofday = yes; then
9305   cat >>confdefs.h <<\EOF
9306 #define HAVE_GETTIMEOFDAY 1
9307 EOF
9308
9309         LIBS="$LIBS -lbsd"
9310 fi
9311
9312 fi
9313         ;;
9314 esac
9315
9316 ###     Checks for header files.
9317 echo "$as_me:9317: checking for ANSI C header files" >&5
9318 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
9319 if test "${ac_cv_header_stdc+set}" = set; then
9320   echo $ECHO_N "(cached) $ECHO_C" >&6
9321 else
9322   cat >conftest.$ac_ext <<_ACEOF
9323 #line 9323 "configure"
9324 #include "confdefs.h"
9325 #include <stdlib.h>
9326 #include <stdarg.h>
9327 #include <string.h>
9328 #include <float.h>
9329
9330 _ACEOF
9331 if { (eval echo "$as_me:9331: \"$ac_cpp conftest.$ac_ext\"") >&5
9332   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9333   ac_status=$?
9334   egrep -v '^ *\+' conftest.er1 >conftest.err
9335   rm -f conftest.er1
9336   cat conftest.err >&5
9337   echo "$as_me:9337: \$? = $ac_status" >&5
9338   (exit $ac_status); } >/dev/null; then
9339   if test -s conftest.err; then
9340     ac_cpp_err=$ac_c_preproc_warn_flag
9341   else
9342     ac_cpp_err=
9343   fi
9344 else
9345   ac_cpp_err=yes
9346 fi
9347 if test -z "$ac_cpp_err"; then
9348   ac_cv_header_stdc=yes
9349 else
9350   echo "$as_me: failed program was:" >&5
9351   cat conftest.$ac_ext >&5
9352   ac_cv_header_stdc=no
9353 fi
9354 rm -f conftest.err conftest.$ac_ext
9355
9356 if test $ac_cv_header_stdc = yes; then
9357   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
9358   cat >conftest.$ac_ext <<_ACEOF
9359 #line 9359 "configure"
9360 #include "confdefs.h"
9361 #include <string.h>
9362
9363 _ACEOF
9364 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9365   egrep "memchr" >/dev/null 2>&1; then
9366   :
9367 else
9368   ac_cv_header_stdc=no
9369 fi
9370 rm -f conftest*
9371
9372 fi
9373
9374 if test $ac_cv_header_stdc = yes; then
9375   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
9376   cat >conftest.$ac_ext <<_ACEOF
9377 #line 9377 "configure"
9378 #include "confdefs.h"
9379 #include <stdlib.h>
9380
9381 _ACEOF
9382 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9383   egrep "free" >/dev/null 2>&1; then
9384   :
9385 else
9386   ac_cv_header_stdc=no
9387 fi
9388 rm -f conftest*
9389
9390 fi
9391
9392 if test $ac_cv_header_stdc = yes; then
9393   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
9394   if test "$cross_compiling" = yes; then
9395   :
9396 else
9397   cat >conftest.$ac_ext <<_ACEOF
9398 #line 9398 "configure"
9399 #include "confdefs.h"
9400 #include <ctype.h>
9401 #if ((' ' & 0x0FF) == 0x020)
9402 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
9403 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
9404 #else
9405 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
9406                      || ('j' <= (c) && (c) <= 'r') \
9407                      || ('s' <= (c) && (c) <= 'z'))
9408 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
9409 #endif
9410
9411 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
9412 int
9413 main ()
9414 {
9415   int i;
9416   for (i = 0; i < 256; i++)
9417     if (XOR (islower (i), ISLOWER (i))
9418         || toupper (i) != TOUPPER (i))
9419       $ac_main_return(2);
9420   $ac_main_return (0);
9421 }
9422 _ACEOF
9423 rm -f conftest$ac_exeext
9424 if { (eval echo "$as_me:9424: \"$ac_link\"") >&5
9425   (eval $ac_link) 2>&5
9426   ac_status=$?
9427   echo "$as_me:9427: \$? = $ac_status" >&5
9428   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9429   { (eval echo "$as_me:9429: \"$ac_try\"") >&5
9430   (eval $ac_try) 2>&5
9431   ac_status=$?
9432   echo "$as_me:9432: \$? = $ac_status" >&5
9433   (exit $ac_status); }; }; then
9434   :
9435 else
9436   echo "$as_me: program exited with status $ac_status" >&5
9437 echo "$as_me: failed program was:" >&5
9438 cat conftest.$ac_ext >&5
9439 ac_cv_header_stdc=no
9440 fi
9441 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
9442 fi
9443 fi
9444 fi
9445 echo "$as_me:9445: result: $ac_cv_header_stdc" >&5
9446 echo "${ECHO_T}$ac_cv_header_stdc" >&6
9447 if test $ac_cv_header_stdc = yes; then
9448
9449 cat >>confdefs.h <<\EOF
9450 #define STDC_HEADERS 1
9451 EOF
9452
9453 fi
9454
9455 ac_header_dirent=no
9456 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
9457   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
9458 echo "$as_me:9458: checking for $ac_hdr that defines DIR" >&5
9459 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
9460 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9461   echo $ECHO_N "(cached) $ECHO_C" >&6
9462 else
9463   cat >conftest.$ac_ext <<_ACEOF
9464 #line 9464 "configure"
9465 #include "confdefs.h"
9466 #include <sys/types.h>
9467 #include <$ac_hdr>
9468
9469 int
9470 main ()
9471 {
9472 if ((DIR *) 0)
9473 return 0;
9474   ;
9475   return 0;
9476 }
9477 _ACEOF
9478 rm -f conftest.$ac_objext
9479 if { (eval echo "$as_me:9479: \"$ac_compile\"") >&5
9480   (eval $ac_compile) 2>&5
9481   ac_status=$?
9482   echo "$as_me:9482: \$? = $ac_status" >&5
9483   (exit $ac_status); } &&
9484          { ac_try='test -s conftest.$ac_objext'
9485   { (eval echo "$as_me:9485: \"$ac_try\"") >&5
9486   (eval $ac_try) 2>&5
9487   ac_status=$?
9488   echo "$as_me:9488: \$? = $ac_status" >&5
9489   (exit $ac_status); }; }; then
9490   eval "$as_ac_Header=yes"
9491 else
9492   echo "$as_me: failed program was:" >&5
9493 cat conftest.$ac_ext >&5
9494 eval "$as_ac_Header=no"
9495 fi
9496 rm -f conftest.$ac_objext conftest.$ac_ext
9497 fi
9498 echo "$as_me:9498: result: `eval echo '${'$as_ac_Header'}'`" >&5
9499 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9500 if test `eval echo '${'$as_ac_Header'}'` = yes; then
9501   cat >>confdefs.h <<EOF
9502 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
9503 EOF
9504
9505 ac_header_dirent=$ac_hdr; break
9506 fi
9507
9508 done
9509 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
9510 if test $ac_header_dirent = dirent.h; then
9511   echo "$as_me:9511: checking for opendir in -ldir" >&5
9512 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
9513 if test "${ac_cv_lib_dir_opendir+set}" = set; then
9514   echo $ECHO_N "(cached) $ECHO_C" >&6
9515 else
9516   ac_check_lib_save_LIBS=$LIBS
9517 LIBS="-ldir  $LIBS"
9518 cat >conftest.$ac_ext <<_ACEOF
9519 #line 9519 "configure"
9520 #include "confdefs.h"
9521
9522 /* Override any gcc2 internal prototype to avoid an error.  */
9523 #ifdef __cplusplus
9524 extern "C"
9525 #endif
9526 /* We use char because int might match the return type of a gcc2
9527    builtin and then its argument prototype would still apply.  */
9528 char opendir ();
9529 int
9530 main ()
9531 {
9532 opendir ();
9533   ;
9534   return 0;
9535 }
9536 _ACEOF
9537 rm -f conftest.$ac_objext conftest$ac_exeext
9538 if { (eval echo "$as_me:9538: \"$ac_link\"") >&5
9539   (eval $ac_link) 2>&5
9540   ac_status=$?
9541   echo "$as_me:9541: \$? = $ac_status" >&5
9542   (exit $ac_status); } &&
9543          { ac_try='test -s conftest$ac_exeext'
9544   { (eval echo "$as_me:9544: \"$ac_try\"") >&5
9545   (eval $ac_try) 2>&5
9546   ac_status=$?
9547   echo "$as_me:9547: \$? = $ac_status" >&5
9548   (exit $ac_status); }; }; then
9549   ac_cv_lib_dir_opendir=yes
9550 else
9551   echo "$as_me: failed program was:" >&5
9552 cat conftest.$ac_ext >&5
9553 ac_cv_lib_dir_opendir=no
9554 fi
9555 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9556 LIBS=$ac_check_lib_save_LIBS
9557 fi
9558 echo "$as_me:9558: result: $ac_cv_lib_dir_opendir" >&5
9559 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
9560 if test $ac_cv_lib_dir_opendir = yes; then
9561   LIBS="$LIBS -ldir"
9562 fi
9563
9564 else
9565   echo "$as_me:9565: checking for opendir in -lx" >&5
9566 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
9567 if test "${ac_cv_lib_x_opendir+set}" = set; then
9568   echo $ECHO_N "(cached) $ECHO_C" >&6
9569 else
9570   ac_check_lib_save_LIBS=$LIBS
9571 LIBS="-lx  $LIBS"
9572 cat >conftest.$ac_ext <<_ACEOF
9573 #line 9573 "configure"
9574 #include "confdefs.h"
9575
9576 /* Override any gcc2 internal prototype to avoid an error.  */
9577 #ifdef __cplusplus
9578 extern "C"
9579 #endif
9580 /* We use char because int might match the return type of a gcc2
9581    builtin and then its argument prototype would still apply.  */
9582 char opendir ();
9583 int
9584 main ()
9585 {
9586 opendir ();
9587   ;
9588   return 0;
9589 }
9590 _ACEOF
9591 rm -f conftest.$ac_objext conftest$ac_exeext
9592 if { (eval echo "$as_me:9592: \"$ac_link\"") >&5
9593   (eval $ac_link) 2>&5
9594   ac_status=$?
9595   echo "$as_me:9595: \$? = $ac_status" >&5
9596   (exit $ac_status); } &&
9597          { ac_try='test -s conftest$ac_exeext'
9598   { (eval echo "$as_me:9598: \"$ac_try\"") >&5
9599   (eval $ac_try) 2>&5
9600   ac_status=$?
9601   echo "$as_me:9601: \$? = $ac_status" >&5
9602   (exit $ac_status); }; }; then
9603   ac_cv_lib_x_opendir=yes
9604 else
9605   echo "$as_me: failed program was:" >&5
9606 cat conftest.$ac_ext >&5
9607 ac_cv_lib_x_opendir=no
9608 fi
9609 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9610 LIBS=$ac_check_lib_save_LIBS
9611 fi
9612 echo "$as_me:9612: result: $ac_cv_lib_x_opendir" >&5
9613 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
9614 if test $ac_cv_lib_x_opendir = yes; then
9615   LIBS="$LIBS -lx"
9616 fi
9617
9618 fi
9619
9620 echo "$as_me:9620: checking whether time.h and sys/time.h may both be included" >&5
9621 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
9622 if test "${ac_cv_header_time+set}" = set; then
9623   echo $ECHO_N "(cached) $ECHO_C" >&6
9624 else
9625   cat >conftest.$ac_ext <<_ACEOF
9626 #line 9626 "configure"
9627 #include "confdefs.h"
9628 #include <sys/types.h>
9629 #include <sys/time.h>
9630 #include <time.h>
9631
9632 int
9633 main ()
9634 {
9635 if ((struct tm *) 0)
9636 return 0;
9637   ;
9638   return 0;
9639 }
9640 _ACEOF
9641 rm -f conftest.$ac_objext
9642 if { (eval echo "$as_me:9642: \"$ac_compile\"") >&5
9643   (eval $ac_compile) 2>&5
9644   ac_status=$?
9645   echo "$as_me:9645: \$? = $ac_status" >&5
9646   (exit $ac_status); } &&
9647          { ac_try='test -s conftest.$ac_objext'
9648   { (eval echo "$as_me:9648: \"$ac_try\"") >&5
9649   (eval $ac_try) 2>&5
9650   ac_status=$?
9651   echo "$as_me:9651: \$? = $ac_status" >&5
9652   (exit $ac_status); }; }; then
9653   ac_cv_header_time=yes
9654 else
9655   echo "$as_me: failed program was:" >&5
9656 cat conftest.$ac_ext >&5
9657 ac_cv_header_time=no
9658 fi
9659 rm -f conftest.$ac_objext conftest.$ac_ext
9660 fi
9661 echo "$as_me:9661: result: $ac_cv_header_time" >&5
9662 echo "${ECHO_T}$ac_cv_header_time" >&6
9663 if test $ac_cv_header_time = yes; then
9664
9665 cat >>confdefs.h <<\EOF
9666 #define TIME_WITH_SYS_TIME 1
9667 EOF
9668
9669 fi
9670
9671 ###     checks for compiler characteristics
9672 ac_ext=c
9673 ac_cpp='$CPP $CPPFLAGS'
9674 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
9675 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
9676 ac_compiler_gnu=$ac_cv_c_compiler_gnu
9677 ac_main_return=return
9678
9679 echo "$as_me:9679: checking for $CC option to accept ANSI C" >&5
9680 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
9681 if test "${ac_cv_prog_cc_stdc+set}" = set; then
9682   echo $ECHO_N "(cached) $ECHO_C" >&6
9683 else
9684   ac_cv_prog_cc_stdc=no
9685 ac_save_CC=$CC
9686 cat >conftest.$ac_ext <<_ACEOF
9687 #line 9687 "configure"
9688 #include "confdefs.h"
9689 #include <stdarg.h>
9690 #include <stdio.h>
9691 #include <sys/types.h>
9692 #include <sys/stat.h>
9693 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
9694 struct buf { int x; };
9695 FILE * (*rcsopen) (struct buf *, struct stat *, int);
9696 static char *e (p, i)
9697      char **p;
9698      int i;
9699 {
9700   return p[i];
9701 }
9702 static char *f (char * (*g) (char **, int), char **p, ...)
9703 {
9704   char *s;
9705   va_list v;
9706   va_start (v,p);
9707   s = g (p, va_arg (v,int));
9708   va_end (v);
9709   return s;
9710 }
9711 int test (int i, double x);
9712 struct s1 {int (*f) (int a);};
9713 struct s2 {int (*f) (double a);};
9714 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
9715 int argc;
9716 char **argv;
9717 int
9718 main ()
9719 {
9720 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
9721   ;
9722   return 0;
9723 }
9724 _ACEOF
9725 # Don't try gcc -ansi; that turns off useful extensions and
9726 # breaks some systems' header files.
9727 # AIX                   -qlanglvl=ansi
9728 # Ultrix and OSF/1      -std1
9729 # HP-UX 10.20 and later -Ae
9730 # HP-UX older versions  -Aa -D_HPUX_SOURCE
9731 # SVR4                  -Xc -D__EXTENSIONS__
9732 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
9733 do
9734   CC="$ac_save_CC $ac_arg"
9735   rm -f conftest.$ac_objext
9736 if { (eval echo "$as_me:9736: \"$ac_compile\"") >&5
9737   (eval $ac_compile) 2>&5
9738   ac_status=$?
9739   echo "$as_me:9739: \$? = $ac_status" >&5
9740   (exit $ac_status); } &&
9741          { ac_try='test -s conftest.$ac_objext'
9742   { (eval echo "$as_me:9742: \"$ac_try\"") >&5
9743   (eval $ac_try) 2>&5
9744   ac_status=$?
9745   echo "$as_me:9745: \$? = $ac_status" >&5
9746   (exit $ac_status); }; }; then
9747   ac_cv_prog_cc_stdc=$ac_arg
9748 break
9749 else
9750   echo "$as_me: failed program was:" >&5
9751 cat conftest.$ac_ext >&5
9752 fi
9753 rm -f conftest.$ac_objext
9754 done
9755 rm -f conftest.$ac_ext conftest.$ac_objext
9756 CC=$ac_save_CC
9757
9758 fi
9759
9760 case "x$ac_cv_prog_cc_stdc" in
9761   x|xno)
9762     echo "$as_me:9762: result: none needed" >&5
9763 echo "${ECHO_T}none needed" >&6 ;;
9764   *)
9765     echo "$as_me:9765: result: $ac_cv_prog_cc_stdc" >&5
9766 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
9767     CC="$CC $ac_cv_prog_cc_stdc" ;;
9768 esac
9769
9770 echo "$as_me:9770: checking for an ANSI C-conforming const" >&5
9771 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
9772 if test "${ac_cv_c_const+set}" = set; then
9773   echo $ECHO_N "(cached) $ECHO_C" >&6
9774 else
9775   cat >conftest.$ac_ext <<_ACEOF
9776 #line 9776 "configure"
9777 #include "confdefs.h"
9778
9779 int
9780 main ()
9781 {
9782 /* FIXME: Include the comments suggested by Paul. */
9783 #ifndef __cplusplus
9784   /* Ultrix mips cc rejects this.  */
9785   typedef int charset[2];
9786   const charset x;
9787   /* SunOS 4.1.1 cc rejects this.  */
9788   char const *const *ccp;
9789   char **p;
9790   /* NEC SVR4.0.2 mips cc rejects this.  */
9791   struct point {int x, y;};
9792   static struct point const zero = {0,0};
9793   /* AIX XL C 1.02.0.0 rejects this.
9794      It does not let you subtract one const X* pointer from another in
9795      an arm of an if-expression whose if-part is not a constant
9796      expression */
9797   const char *g = "string";
9798   ccp = &g + (g ? g-g : 0);
9799   /* HPUX 7.0 cc rejects these. */
9800   ++ccp;
9801   p = (char**) ccp;
9802   ccp = (char const *const *) p;
9803   { /* SCO 3.2v4 cc rejects this.  */
9804     char *t;
9805     char const *s = 0 ? (char *) 0 : (char const *) 0;
9806
9807     *t++ = 0;
9808   }
9809   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
9810     int x[] = {25, 17};
9811     const int *foo = &x[0];
9812     ++foo;
9813   }
9814   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
9815     typedef const int *iptr;
9816     iptr p = 0;
9817     ++p;
9818   }
9819   { /* AIX XL C 1.02.0.0 rejects this saying
9820        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
9821     struct s { int j; const int *ap[3]; };
9822     struct s *b; b->j = 5;
9823   }
9824   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
9825     const int foo = 10;
9826   }
9827 #endif
9828
9829   ;
9830   return 0;
9831 }
9832 _ACEOF
9833 rm -f conftest.$ac_objext
9834 if { (eval echo "$as_me:9834: \"$ac_compile\"") >&5
9835   (eval $ac_compile) 2>&5
9836   ac_status=$?
9837   echo "$as_me:9837: \$? = $ac_status" >&5
9838   (exit $ac_status); } &&
9839          { ac_try='test -s conftest.$ac_objext'
9840   { (eval echo "$as_me:9840: \"$ac_try\"") >&5
9841   (eval $ac_try) 2>&5
9842   ac_status=$?
9843   echo "$as_me:9843: \$? = $ac_status" >&5
9844   (exit $ac_status); }; }; then
9845   ac_cv_c_const=yes
9846 else
9847   echo "$as_me: failed program was:" >&5
9848 cat conftest.$ac_ext >&5
9849 ac_cv_c_const=no
9850 fi
9851 rm -f conftest.$ac_objext conftest.$ac_ext
9852 fi
9853 echo "$as_me:9853: result: $ac_cv_c_const" >&5
9854 echo "${ECHO_T}$ac_cv_c_const" >&6
9855 if test $ac_cv_c_const = no; then
9856
9857 cat >>confdefs.h <<\EOF
9858 #define const
9859 EOF
9860
9861 fi
9862
9863 ###     Checks for external-data
9864
9865 echo "$as_me:9865: checking if data-only library module links" >&5
9866 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
9867 if test "${cf_cv_link_dataonly+set}" = set; then
9868   echo $ECHO_N "(cached) $ECHO_C" >&6
9869 else
9870
9871         rm -f conftest.a
9872         cat >conftest.$ac_ext <<EOF
9873 #line 9873 "configure"
9874 int     testdata[3] = { 123, 456, 789 };
9875 EOF
9876         if { (eval echo "$as_me:9876: \"$ac_compile\"") >&5
9877   (eval $ac_compile) 2>&5
9878   ac_status=$?
9879   echo "$as_me:9879: \$? = $ac_status" >&5
9880   (exit $ac_status); } ; then
9881                 mv conftest.o data.o && \
9882                 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
9883         fi
9884         rm -f conftest.$ac_ext data.o
9885         cat >conftest.$ac_ext <<EOF
9886 #line 9886 "configure"
9887 int     testfunc()
9888 {
9889 #if defined(NeXT)
9890         ${cf_cv_main_return:-return}(1);        /* I'm told this linker is broken */
9891 #else
9892         extern int testdata[3];
9893         return testdata[0] == 123
9894            &&  testdata[1] == 456
9895            &&  testdata[2] == 789;
9896 #endif
9897 }
9898 EOF
9899         if { (eval echo "$as_me:9899: \"$ac_compile\"") >&5
9900   (eval $ac_compile) 2>&5
9901   ac_status=$?
9902   echo "$as_me:9902: \$? = $ac_status" >&5
9903   (exit $ac_status); }; then
9904                 mv conftest.o func.o && \
9905                 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
9906         fi
9907         rm -f conftest.$ac_ext func.o
9908         ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
9909         cf_saveLIBS="$LIBS"
9910         LIBS="conftest.a $LIBS"
9911         if test "$cross_compiling" = yes; then
9912   cf_cv_link_dataonly=unknown
9913 else
9914   cat >conftest.$ac_ext <<_ACEOF
9915 #line 9915 "configure"
9916 #include "confdefs.h"
9917
9918         int main()
9919         {
9920                 extern int testfunc();
9921                 ${cf_cv_main_return:-return} (!testfunc());
9922         }
9923
9924 _ACEOF
9925 rm -f conftest$ac_exeext
9926 if { (eval echo "$as_me:9926: \"$ac_link\"") >&5
9927   (eval $ac_link) 2>&5
9928   ac_status=$?
9929   echo "$as_me:9929: \$? = $ac_status" >&5
9930   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9931   { (eval echo "$as_me:9931: \"$ac_try\"") >&5
9932   (eval $ac_try) 2>&5
9933   ac_status=$?
9934   echo "$as_me:9934: \$? = $ac_status" >&5
9935   (exit $ac_status); }; }; then
9936   cf_cv_link_dataonly=yes
9937 else
9938   echo "$as_me: program exited with status $ac_status" >&5
9939 echo "$as_me: failed program was:" >&5
9940 cat conftest.$ac_ext >&5
9941 cf_cv_link_dataonly=no
9942 fi
9943 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
9944 fi
9945         LIBS="$cf_saveLIBS"
9946
9947 fi
9948
9949 echo "$as_me:9949: result: $cf_cv_link_dataonly" >&5
9950 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
9951
9952 if test "$cf_cv_link_dataonly" = no ; then
9953         cat >>confdefs.h <<\EOF
9954 #define BROKEN_LINKER 1
9955 EOF
9956
9957         BROKEN_LINKER=1
9958 fi
9959
9960 ###     Checks for library functions.
9961
9962 echo "$as_me:9962: checking for working mkstemp" >&5
9963 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
9964 if test "${cf_cv_func_mkstemp+set}" = set; then
9965   echo $ECHO_N "(cached) $ECHO_C" >&6
9966 else
9967
9968 rm -f conftest*
9969 if test "$cross_compiling" = yes; then
9970   echo "$as_me:9970: checking for mkstemp" >&5
9971 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
9972 if test "${ac_cv_func_mkstemp+set}" = set; then
9973   echo $ECHO_N "(cached) $ECHO_C" >&6
9974 else
9975   cat >conftest.$ac_ext <<_ACEOF
9976 #line 9976 "configure"
9977 #include "confdefs.h"
9978 /* System header to define __stub macros and hopefully few prototypes,
9979     which can conflict with char mkstemp (); below.  */
9980 #include <assert.h>
9981 /* Override any gcc2 internal prototype to avoid an error.  */
9982 #ifdef __cplusplus
9983 extern "C"
9984 #endif
9985 /* We use char because int might match the return type of a gcc2
9986    builtin and then its argument prototype would still apply.  */
9987 char mkstemp ();
9988 char (*f) ();
9989
9990 int
9991 main ()
9992 {
9993 /* The GNU C library defines this for functions which it implements
9994     to always fail with ENOSYS.  Some functions are actually named
9995     something starting with __ and the normal name is an alias.  */
9996 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
9997 choke me
9998 #else
9999 f = mkstemp;
10000 #endif
10001
10002   ;
10003   return 0;
10004 }
10005 _ACEOF
10006 rm -f conftest.$ac_objext conftest$ac_exeext
10007 if { (eval echo "$as_me:10007: \"$ac_link\"") >&5
10008   (eval $ac_link) 2>&5
10009   ac_status=$?
10010   echo "$as_me:10010: \$? = $ac_status" >&5
10011   (exit $ac_status); } &&
10012          { ac_try='test -s conftest$ac_exeext'
10013   { (eval echo "$as_me:10013: \"$ac_try\"") >&5
10014   (eval $ac_try) 2>&5
10015   ac_status=$?
10016   echo "$as_me:10016: \$? = $ac_status" >&5
10017   (exit $ac_status); }; }; then
10018   ac_cv_func_mkstemp=yes
10019 else
10020   echo "$as_me: failed program was:" >&5
10021 cat conftest.$ac_ext >&5
10022 ac_cv_func_mkstemp=no
10023 fi
10024 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10025 fi
10026 echo "$as_me:10026: result: $ac_cv_func_mkstemp" >&5
10027 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
10028
10029 else
10030   cat >conftest.$ac_ext <<_ACEOF
10031 #line 10031 "configure"
10032 #include "confdefs.h"
10033
10034 #include <sys/types.h>
10035 #include <stdlib.h>
10036 #include <stdio.h>
10037 #include <string.h>
10038 #include <sys/stat.h>
10039 int main()
10040 {
10041         char *tmpl = "conftestXXXXXX";
10042         char name[2][80];
10043         int n;
10044         int result = 0;
10045         int fd;
10046         struct stat sb;
10047
10048         umask(077);
10049         for (n = 0; n < 2; ++n) {
10050                 strcpy(name[n], tmpl);
10051                 if ((fd = mkstemp(name[n])) >= 0) {
10052                         if (!strcmp(name[n], tmpl)
10053                          || stat(name[n], &sb) != 0
10054                          || (sb.st_mode & S_IFMT) != S_IFREG
10055                          || (sb.st_mode & 077) != 0) {
10056                                 result = 1;
10057                         }
10058                         close(fd);
10059                 }
10060         }
10061         if (result == 0
10062          && !strcmp(name[0], name[1]))
10063                 result = 1;
10064         ${cf_cv_main_return:-return}(result);
10065 }
10066
10067 _ACEOF
10068 rm -f conftest$ac_exeext
10069 if { (eval echo "$as_me:10069: \"$ac_link\"") >&5
10070   (eval $ac_link) 2>&5
10071   ac_status=$?
10072   echo "$as_me:10072: \$? = $ac_status" >&5
10073   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10074   { (eval echo "$as_me:10074: \"$ac_try\"") >&5
10075   (eval $ac_try) 2>&5
10076   ac_status=$?
10077   echo "$as_me:10077: \$? = $ac_status" >&5
10078   (exit $ac_status); }; }; then
10079   cf_cv_func_mkstemp=yes
10080
10081 else
10082   echo "$as_me: program exited with status $ac_status" >&5
10083 echo "$as_me: failed program was:" >&5
10084 cat conftest.$ac_ext >&5
10085 cf_cv_func_mkstemp=no
10086
10087 fi
10088 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
10089 fi
10090
10091 fi
10092 echo "$as_me:10092: result: $cf_cv_func_mkstemp" >&5
10093 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
10094 if test "$cf_cv_func_mkstemp" = yes ; then
10095         cat >>confdefs.h <<\EOF
10096 #define HAVE_MKSTEMP 1
10097 EOF
10098
10099 fi
10100
10101 echo "$as_me:10101: checking return type of signal handlers" >&5
10102 echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
10103 if test "${ac_cv_type_signal+set}" = set; then
10104   echo $ECHO_N "(cached) $ECHO_C" >&6
10105 else
10106   cat >conftest.$ac_ext <<_ACEOF
10107 #line 10107 "configure"
10108 #include "confdefs.h"
10109 #include <sys/types.h>
10110 #include <signal.h>
10111 #ifdef signal
10112 # undef signal
10113 #endif
10114 #ifdef __cplusplus
10115 extern "C" void (*signal (int, void (*)(int)))(int);
10116 #else
10117 void (*signal ()) ();
10118 #endif
10119
10120 int
10121 main ()
10122 {
10123 int i;
10124   ;
10125   return 0;
10126 }
10127 _ACEOF
10128 rm -f conftest.$ac_objext
10129 if { (eval echo "$as_me:10129: \"$ac_compile\"") >&5
10130   (eval $ac_compile) 2>&5
10131   ac_status=$?
10132   echo "$as_me:10132: \$? = $ac_status" >&5
10133   (exit $ac_status); } &&
10134          { ac_try='test -s conftest.$ac_objext'
10135   { (eval echo "$as_me:10135: \"$ac_try\"") >&5
10136   (eval $ac_try) 2>&5
10137   ac_status=$?
10138   echo "$as_me:10138: \$? = $ac_status" >&5
10139   (exit $ac_status); }; }; then
10140   ac_cv_type_signal=void
10141 else
10142   echo "$as_me: failed program was:" >&5
10143 cat conftest.$ac_ext >&5
10144 ac_cv_type_signal=int
10145 fi
10146 rm -f conftest.$ac_objext conftest.$ac_ext
10147 fi
10148 echo "$as_me:10148: result: $ac_cv_type_signal" >&5
10149 echo "${ECHO_T}$ac_cv_type_signal" >&6
10150
10151 cat >>confdefs.h <<EOF
10152 #define RETSIGTYPE $ac_cv_type_signal
10153 EOF
10154
10155 if test -z "$cf_user_CFLAGS" && test "$with_no_leaks" = no ; then
10156         CFLAGS=`echo ${CFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
10157         CXXFLAGS=`echo ${CXXFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
10158 fi
10159
10160 cf_ada_make=gnatmake
10161 # Extract the first word of "$cf_ada_make", so it can be a program name with args.
10162 set dummy $cf_ada_make; ac_word=$2
10163 echo "$as_me:10163: checking for $ac_word" >&5
10164 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
10165 if test "${ac_cv_prog_gnat_exists+set}" = set; then
10166   echo $ECHO_N "(cached) $ECHO_C" >&6
10167 else
10168   if test -n "$gnat_exists"; then
10169   ac_cv_prog_gnat_exists="$gnat_exists" # Let the user override the test.
10170 else
10171   ac_save_IFS=$IFS; IFS=$ac_path_separator
10172 ac_dummy="$PATH"
10173 for ac_dir in $ac_dummy; do
10174   IFS=$ac_save_IFS
10175   test -z "$ac_dir" && ac_dir=.
10176   $as_executable_p "$ac_dir/$ac_word" || continue
10177 ac_cv_prog_gnat_exists="yes"
10178 echo "$as_me:10178: found $ac_dir/$ac_word" >&5
10179 break
10180 done
10181
10182   test -z "$ac_cv_prog_gnat_exists" && ac_cv_prog_gnat_exists="no"
10183 fi
10184 fi
10185 gnat_exists=$ac_cv_prog_gnat_exists
10186 if test -n "$gnat_exists"; then
10187   echo "$as_me:10187: result: $gnat_exists" >&5
10188 echo "${ECHO_T}$gnat_exists" >&6
10189 else
10190   echo "$as_me:10190: result: no" >&5
10191 echo "${ECHO_T}no" >&6
10192 fi
10193
10194 if test "$ac_cv_prog_gnat_exists" = no; then
10195    cf_ada_make=
10196 else
10197
10198 echo "$as_me:10198: checking for gnat version" >&5
10199 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
10200 cf_gnat_version=`${cf_ada_make-gnatmake} -v 2>&1 | grep '[0-9].[0-9][0-9]*' |\
10201   sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
10202 echo "$as_me:10202: result: $cf_gnat_version" >&5
10203 echo "${ECHO_T}$cf_gnat_version" >&6
10204
10205 case $cf_gnat_version in
10206   3.1[1-9]*|3.[2-9]*|[4-9].*)
10207     cf_cv_prog_gnat_correct=yes
10208     ;;
10209   *) echo Unsupported GNAT version $cf_gnat_version. Required is 3.11 or better. Disabling Ada95 binding.
10210      cf_cv_prog_gnat_correct=no
10211      ;;
10212 esac
10213 case $cf_gnat_version in
10214   3.[1-9]*|[4-9].*)
10215       cf_compile_generics=generics
10216       cf_generic_objects="\${GENOBJS}"
10217       ;;
10218   *)  cf_compile_generics=
10219       cf_generic_objects=
10220       ;;
10221 esac
10222
10223    # Extract the first word of "m4", so it can be a program name with args.
10224 set dummy m4; ac_word=$2
10225 echo "$as_me:10225: checking for $ac_word" >&5
10226 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
10227 if test "${ac_cv_prog_M4_exists+set}" = set; then
10228   echo $ECHO_N "(cached) $ECHO_C" >&6
10229 else
10230   if test -n "$M4_exists"; then
10231   ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
10232 else
10233   ac_save_IFS=$IFS; IFS=$ac_path_separator
10234 ac_dummy="$PATH"
10235 for ac_dir in $ac_dummy; do
10236   IFS=$ac_save_IFS
10237   test -z "$ac_dir" && ac_dir=.
10238   $as_executable_p "$ac_dir/$ac_word" || continue
10239 ac_cv_prog_M4_exists="yes"
10240 echo "$as_me:10240: found $ac_dir/$ac_word" >&5
10241 break
10242 done
10243
10244   test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
10245 fi
10246 fi
10247 M4_exists=$ac_cv_prog_M4_exists
10248 if test -n "$M4_exists"; then
10249   echo "$as_me:10249: result: $M4_exists" >&5
10250 echo "${ECHO_T}$M4_exists" >&6
10251 else
10252   echo "$as_me:10252: result: no" >&5
10253 echo "${ECHO_T}no" >&6
10254 fi
10255
10256    if test "$ac_cv_prog_M4_exists" = no; then
10257       cf_cv_prog_gnat_correct=no
10258       echo Ada95 binding required program m4 not found. Ada95 binding disabled.
10259    fi
10260    if test "$cf_cv_prog_gnat_correct" = yes; then
10261       echo "$as_me:10261: checking if GNAT works" >&5
10262 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
10263
10264 rm -f conftest*
10265 cat >>conftest.ads <<CF_EOF
10266 procedure conftest;
10267 CF_EOF
10268 cat >>conftest.adb <<CF_EOF
10269 with Text_IO;
10270 with GNAT.OS_Lib;
10271 procedure conftest is
10272 begin
10273    Text_IO.Put ("Hello World");
10274    Text_IO.New_Line;
10275    GNAT.OS_Lib.OS_Exit (0);
10276 end conftest;
10277 CF_EOF
10278 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
10279    if ( ./conftest 1>&5 2>&1 ) ; then
10280       cf_cv_prog_gnat_correct=yes
10281    else
10282       cf_cv_prog_gnat_correct=no
10283    fi
10284 else
10285    cf_cv_prog_gnat_correct=no
10286 fi
10287 rm -f conftest*
10288
10289       echo "$as_me:10289: result: $cf_cv_prog_gnat_correct" >&5
10290 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
10291    fi
10292 fi
10293 if test "$cf_cv_prog_gnat_correct" = yes; then
10294    ADAFLAGS="-O3 -gnatpn $ADAFLAGS"
10295
10296    echo "$as_me:10296: checking if GNAT pragma Unreferenced works" >&5
10297 echo $ECHO_N "checking if GNAT pragma Unreferenced works... $ECHO_C" >&6
10298
10299 rm -f conftest*
10300 cat >>conftest.ads <<CF_EOF
10301 procedure conftest;
10302 CF_EOF
10303 cat >>conftest.adb <<CF_EOF
10304 with Text_IO;
10305 with GNAT.OS_Lib;
10306 procedure conftest is
10307    test : Integer;
10308    pragma Unreferenced (test);
10309 begin
10310    test := 1;
10311    Text_IO.Put ("Hello World");
10312    Text_IO.New_Line;
10313    GNAT.OS_Lib.OS_Exit (0);
10314 end conftest;
10315 CF_EOF
10316 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
10317       cf_cv_pragma_unreferenced=yes
10318 else
10319    cf_cv_pragma_unreferenced=no
10320 fi
10321 rm -f conftest*
10322
10323    echo "$as_me:10323: result: $cf_cv_pragma_unreferenced" >&5
10324 echo "${ECHO_T}$cf_cv_pragma_unreferenced" >&6
10325
10326    # if the pragma is supported, use it (needed in the Trace code).
10327    if test $cf_cv_pragma_unreferenced = yes ; then
10328       PRAGMA_UNREF=TRUE
10329    else
10330       PRAGMA_UNREF=FALSE
10331    fi
10332
10333 # Check whether --with-ada-compiler or --without-ada-compiler was given.
10334 if test "${with_ada_compiler+set}" = set; then
10335   withval="$with_ada_compiler"
10336   cf_ada_compiler=$withval
10337 else
10338   cf_ada_compiler=gnatmake
10339 fi;
10340
10341    cf_ada_package=terminal_interface
10342
10343 # Check whether --with-ada-include or --without-ada-include was given.
10344 if test "${with_ada_include+set}" = set; then
10345   withval="$with_ada_include"
10346
10347 else
10348   withval="${ADA_INCLUDE-$prefix/lib/ada/adainclude}"
10349 fi; if test -n "$prefix/lib/ada/adainclude" ; then
10350
10351 if test "x$prefix" != xNONE; then
10352   cf_path_syntax="$prefix"
10353 else
10354   cf_path_syntax="$ac_default_prefix"
10355 fi
10356
10357 case ".$withval" in #(vi
10358 .\$\(*\)*|.\'*\'*) #(vi
10359   ;;
10360 ..|./*|.\\*) #(vi
10361   ;;
10362 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
10363   ;;
10364 .\${*prefix}*) #(vi
10365   eval withval="$withval"
10366   case ".$withval" in #(vi
10367   .NONE/*)
10368     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
10369     ;;
10370   esac
10371   ;; #(vi
10372 .no|.NONE/*)
10373   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
10374   ;;
10375 *)
10376   { { echo "$as_me:10376: error: expected a pathname, not \"$withval\"" >&5
10377 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
10378    { (exit 1); exit 1; }; }
10379   ;;
10380 esac
10381
10382 fi
10383 ADA_INCLUDE="$withval"
10384
10385 # Check whether --with-ada-objects or --without-ada-objects was given.
10386 if test "${with_ada_objects+set}" = set; then
10387   withval="$with_ada_objects"
10388
10389 else
10390   withval="${ADA_OBJECTS-$prefix/lib/ada/adalib}"
10391 fi; if test -n "$prefix/lib/ada/adalib" ; then
10392
10393 if test "x$prefix" != xNONE; then
10394   cf_path_syntax="$prefix"
10395 else
10396   cf_path_syntax="$ac_default_prefix"
10397 fi
10398
10399 case ".$withval" in #(vi
10400 .\$\(*\)*|.\'*\'*) #(vi
10401   ;;
10402 ..|./*|.\\*) #(vi
10403   ;;
10404 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
10405   ;;
10406 .\${*prefix}*) #(vi
10407   eval withval="$withval"
10408   case ".$withval" in #(vi
10409   .NONE/*)
10410     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
10411     ;;
10412   esac
10413   ;; #(vi
10414 .no|.NONE/*)
10415   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
10416   ;;
10417 *)
10418   { { echo "$as_me:10418: error: expected a pathname, not \"$withval\"" >&5
10419 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
10420    { (exit 1); exit 1; }; }
10421   ;;
10422 esac
10423
10424 fi
10425 ADA_OBJECTS="$withval"
10426
10427 fi
10428
10429 ################################################################################
10430
10431 # not needed
10432 TINFO_ARGS2=
10433
10434 ### Construct the list of include-directories to be generated
10435
10436 CPPFLAGS="$CPPFLAGS -I. -I../include"
10437 if test "$srcdir" != "."; then
10438         CPPFLAGS="$CPPFLAGS -I\${srcdir}/../include"
10439 fi
10440 if test "$GCC" != yes; then
10441         CPPFLAGS="$CPPFLAGS -I\${includedir}"
10442 elif test "$includedir" != "/usr/include"; then
10443         if test "$includedir" = '${prefix}/include' ; then
10444                 if test $prefix != /usr ; then
10445                         CPPFLAGS="$CPPFLAGS -I\${includedir}"
10446                 fi
10447         else
10448                 CPPFLAGS="$CPPFLAGS -I\${includedir}"
10449         fi
10450 fi
10451
10452 ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
10453 if test "$srcdir" != "."; then
10454         ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
10455 fi
10456 if test "$GCC" != yes; then
10457         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
10458 elif test "$includedir" != "/usr/include"; then
10459         if test "$includedir" = '${prefix}/include' ; then
10460                 if test $prefix != /usr ; then
10461                         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
10462                 fi
10463         else
10464                 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
10465         fi
10466 fi
10467
10468 ### Build up pieces for makefile rules
10469 echo "$as_me:10469: checking default library suffix" >&5
10470 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
10471
10472         case $DFT_LWR_MODEL in
10473         libtool) DFT_ARG_SUFFIX=''   ;;
10474         normal)  DFT_ARG_SUFFIX=''   ;;
10475         debug)   DFT_ARG_SUFFIX='_g' ;;
10476         profile) DFT_ARG_SUFFIX='_p' ;;
10477         shared)  DFT_ARG_SUFFIX=''   ;;
10478         esac
10479         test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
10480 echo "$as_me:10480: result: $DFT_ARG_SUFFIX" >&5
10481 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
10482
10483 echo "$as_me:10483: checking default library-dependency suffix" >&5
10484 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
10485
10486         case $DFT_LWR_MODEL in #(vi
10487         libtool) #(vi
10488                 DFT_LIB_SUFFIX='.la'
10489                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
10490                 ;;
10491         normal) #(vi
10492                 DFT_LIB_SUFFIX='.a'
10493                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
10494                 ;;
10495         debug) #(vi
10496                 DFT_LIB_SUFFIX='_g.a'
10497                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
10498                 ;;
10499         profile) #(vi
10500                 DFT_LIB_SUFFIX='_p.a'
10501                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
10502                 ;;
10503         shared) #(vi
10504                 case $cf_cv_system_name in
10505                 aix[56]*) #(vi
10506                         DFT_LIB_SUFFIX='.a'
10507                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
10508                         ;;
10509                 cygwin*) #(vi
10510                         DFT_LIB_SUFFIX='.dll'
10511                         DFT_DEP_SUFFIX='.dll.a'
10512                         ;;
10513                 darwin*) #(vi
10514                         DFT_LIB_SUFFIX='.dylib'
10515                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
10516                         ;;
10517                 hpux*) #(vi
10518                         case $target in
10519                         ia64*) #(vi
10520                                 DFT_LIB_SUFFIX='.so'
10521                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
10522                                 ;;
10523                         *) #(vi
10524                                 DFT_LIB_SUFFIX='.sl'
10525                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
10526                                 ;;
10527                         esac
10528                         ;;
10529                 *)      DFT_LIB_SUFFIX='.so'
10530                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
10531                         ;;
10532                 esac
10533         esac
10534         test -n "$LIB_SUFFIX" && DFT_LIB_SUFFIX="${LIB_SUFFIX}${DFT_LIB_SUFFIX}"
10535         test -n "$LIB_SUFFIX" && DFT_DEP_SUFFIX="${LIB_SUFFIX}${DFT_DEP_SUFFIX}"
10536 echo "$as_me:10536: result: $DFT_DEP_SUFFIX" >&5
10537 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
10538
10539 echo "$as_me:10539: checking default object directory" >&5
10540 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
10541
10542         case $DFT_LWR_MODEL in
10543         libtool) DFT_OBJ_SUBDIR='obj_lo'  ;;
10544         normal)  DFT_OBJ_SUBDIR='objects' ;;
10545         debug)   DFT_OBJ_SUBDIR='obj_g' ;;
10546         profile) DFT_OBJ_SUBDIR='obj_p' ;;
10547         shared)
10548                 case $cf_cv_system_name in #(vi
10549                 cygwin) #(vi
10550                         DFT_OBJ_SUBDIR='objects' ;;
10551                 *)
10552                         DFT_OBJ_SUBDIR='obj_s' ;;
10553                 esac
10554         esac
10555 echo "$as_me:10555: result: $DFT_OBJ_SUBDIR" >&5
10556 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
10557
10558 ### Set up low-level terminfo dependencies for makefiles.
10559
10560 if test "$DFT_LWR_MODEL" = shared ; then
10561         case $cf_cv_system_name in #(vi
10562         cygwin*)
10563                 # "lib" files have ".dll.a" suffix, "cyg" files have ".dll"
10564                 ;;
10565         esac
10566 fi
10567
10568 ### Construct the list of subdirectories for which we'll customize makefiles
10569 ### with the appropriate compile-rules.
10570
10571 SUB_MAKEFILES="gen/adacurses${DFT_ARG_SUFFIX}-config:gen/adacurses-config.in"
10572
10573 cat >>confdefs.h <<EOF
10574 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
10575 EOF
10576
10577 ### Now that we're done running tests, add the compiler-warnings, if any
10578
10579 cf_fix_cppflags=no
10580 cf_new_cflags=
10581 cf_new_cppflags=
10582 cf_new_extra_cppflags=
10583
10584 for cf_add_cflags in $EXTRA_CFLAGS
10585 do
10586 case $cf_fix_cppflags in
10587 no)
10588         case $cf_add_cflags in #(vi
10589         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
10590                 case $cf_add_cflags in
10591                 -D*)
10592                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10593
10594                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10595                                 && test -z "${cf_tst_cflags}" \
10596                                 && cf_fix_cppflags=yes
10597
10598                         if test $cf_fix_cppflags = yes ; then
10599                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10600                                 continue
10601                         elif test "${cf_tst_cflags}" = "\"'" ; then
10602                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10603                                 continue
10604                         fi
10605                         ;;
10606                 esac
10607                 case "$CPPFLAGS" in
10608                 *$cf_add_cflags) #(vi
10609                         ;;
10610                 *) #(vi
10611                         case $cf_add_cflags in #(vi
10612                         -D*)
10613                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10614
10615 CPPFLAGS=`echo "$CPPFLAGS" | \
10616         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10617                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10618
10619                                 ;;
10620                         esac
10621                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
10622                         ;;
10623                 esac
10624                 ;;
10625         *)
10626                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
10627                 ;;
10628         esac
10629         ;;
10630 yes)
10631         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10632
10633         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10634
10635         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10636                 && test -z "${cf_tst_cflags}" \
10637                 && cf_fix_cppflags=no
10638         ;;
10639 esac
10640 done
10641
10642 if test -n "$cf_new_cflags" ; then
10643
10644         CFLAGS="$CFLAGS $cf_new_cflags"
10645 fi
10646
10647 if test -n "$cf_new_cppflags" ; then
10648
10649         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
10650 fi
10651
10652 if test -n "$cf_new_extra_cppflags" ; then
10653
10654         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
10655 fi
10656
10657 ################################################################################
10658
10659 if test x"$enable_pc_files" = xyes ; then \
10660 SUB_MAKEFILES="$SUB_MAKEFILES misc/gen-pkgconfig:misc/gen-pkgconfig.in"
10661 MAKE_PC_FILES=
10662 else
10663 MAKE_PC_FILES="#"
10664 fi
10665
10666 ################################################################################
10667
10668 TEST_ARG2=
10669
10670 NCURSES_SHLIB2="sh -c"
10671
10672 for cf_path in . .. ../..
10673 do
10674         if test -f $cf_path/tar-copy.sh
10675         then
10676                 NCURSES_COPY2=`echo 'sh $(top_srcdir)/'$cf_path'/tar-copy.sh' | sed -e 's,/./,/,'`
10677                 break
10678         fi
10679 done
10680
10681 ADA_SUBDIRS="include gen src samples"
10682 for cf_dir in $ADA_SUBDIRS
10683 do
10684         SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
10685 done
10686
10687 NCURSES_TREE="#"
10688
10689 EXTERNAL_TREE=
10690
10691 ac_config_files="$ac_config_files $SUB_MAKEFILES Makefile"
10692 ac_config_commands="$ac_config_commands default"
10693 cat >confcache <<\_ACEOF
10694 # This file is a shell script that caches the results of configure
10695 # tests run on this system so they can be shared between configure
10696 # scripts and configure runs, see configure's option --config-cache.
10697 # It is not useful on other systems.  If it contains results you don't
10698 # want to keep, you may remove or edit it.
10699 #
10700 # config.status only pays attention to the cache file if you give it
10701 # the --recheck option to rerun configure.
10702 #
10703 # `ac_cv_env_foo' variables (set or unset) will be overriden when
10704 # loading this file, other *unset* `ac_cv_foo' will be assigned the
10705 # following values.
10706
10707 _ACEOF
10708
10709 # The following way of writing the cache mishandles newlines in values,
10710 # but we know of no workaround that is simple, portable, and efficient.
10711 # So, don't put newlines in cache variables' values.
10712 # Ultrix sh set writes to stderr and can't be redirected directly,
10713 # and sets the high bit in the cache file unless we assign to the vars.
10714 {
10715   (set) 2>&1 |
10716     case `(ac_space=' '; set | grep ac_space) 2>&1` in
10717     *ac_space=\ *)
10718       # `set' does not quote correctly, so add quotes (double-quote
10719       # substitution turns \\\\ into \\, and sed turns \\ into \).
10720       sed -n \
10721         "s/'/'\\\\''/g;
10722           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
10723       ;;
10724     *)
10725       # `set' quotes correctly as required by POSIX, so do not add quotes.
10726       sed -n \
10727         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
10728       ;;
10729     esac;
10730 } |
10731   sed '
10732      t clear
10733      : clear
10734      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
10735      t end
10736      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
10737      : end' >>confcache
10738 if cmp -s $cache_file confcache; then :; else
10739   if test -w $cache_file; then
10740     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
10741     cat confcache >$cache_file
10742   else
10743     echo "not updating unwritable cache $cache_file"
10744   fi
10745 fi
10746 rm -f confcache
10747
10748 test "x$prefix" = xNONE && prefix=$ac_default_prefix
10749 # Let make expand exec_prefix.
10750 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
10751
10752 # VPATH may cause trouble with some makes, so we remove $(srcdir),
10753 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
10754 # trailing colons and then remove the whole line if VPATH becomes empty
10755 # (actually we leave an empty line to preserve line numbers).
10756 if test "x$srcdir" = x.; then
10757   ac_vpsub='/^[         ]*VPATH[        ]*=/{
10758 s/:*\$(srcdir):*/:/;
10759 s/:*\${srcdir}:*/:/;
10760 s/:*@srcdir@:*/:/;
10761 s/^\([^=]*=[    ]*\):*/\1/;
10762 s/:*$//;
10763 s/^[^=]*=[      ]*$//;
10764 }'
10765 fi
10766
10767 DEFS=-DHAVE_CONFIG_H
10768
10769 : ${CONFIG_STATUS=./config.status}
10770 ac_clean_files_save=$ac_clean_files
10771 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
10772 { echo "$as_me:10772: creating $CONFIG_STATUS" >&5
10773 echo "$as_me: creating $CONFIG_STATUS" >&6;}
10774 cat >$CONFIG_STATUS <<_ACEOF
10775 #! $SHELL
10776 # Generated automatically by configure.
10777 # Run this file to recreate the current configuration.
10778 # Compiler output produced by configure, useful for debugging
10779 # configure, is in config.log if it exists.
10780
10781 debug=false
10782 SHELL=\${CONFIG_SHELL-$SHELL}
10783 ac_cs_invocation="\$0 \$@"
10784
10785 _ACEOF
10786
10787 cat >>$CONFIG_STATUS <<\_ACEOF
10788 # Be Bourne compatible
10789 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
10790   emulate sh
10791   NULLCMD=:
10792 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
10793   set -o posix
10794 fi
10795
10796 # Name of the executable.
10797 as_me=`echo "$0" |sed 's,.*[\\/],,'`
10798
10799 if expr a : '\(a\)' >/dev/null 2>&1; then
10800   as_expr=expr
10801 else
10802   as_expr=false
10803 fi
10804
10805 rm -f conf$$ conf$$.exe conf$$.file
10806 echo >conf$$.file
10807 if ln -s conf$$.file conf$$ 2>/dev/null; then
10808   # We could just check for DJGPP; but this test a) works b) is more generic
10809   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
10810   if test -f conf$$.exe; then
10811     # Don't use ln at all; we don't have any links
10812     as_ln_s='cp -p'
10813   else
10814     as_ln_s='ln -s'
10815   fi
10816 elif ln conf$$.file conf$$ 2>/dev/null; then
10817   as_ln_s=ln
10818 else
10819   as_ln_s='cp -p'
10820 fi
10821 rm -f conf$$ conf$$.exe conf$$.file
10822
10823 as_executable_p="test -f"
10824
10825 # Support unset when possible.
10826 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
10827   as_unset=unset
10828 else
10829   as_unset=false
10830 fi
10831
10832 # NLS nuisances.
10833 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
10834 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
10835 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
10836 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
10837 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
10838 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
10839 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
10840 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
10841
10842 # IFS
10843 # We need space, tab and new line, in precisely that order.
10844 as_nl='
10845 '
10846 IFS="   $as_nl"
10847
10848 # CDPATH.
10849 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
10850
10851 exec 6>&1
10852
10853 _ACEOF
10854
10855 # Files that config.status was made for.
10856 if test -n "$ac_config_files"; then
10857   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
10858 fi
10859
10860 if test -n "$ac_config_headers"; then
10861   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
10862 fi
10863
10864 if test -n "$ac_config_links"; then
10865   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
10866 fi
10867
10868 if test -n "$ac_config_commands"; then
10869   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
10870 fi
10871
10872 cat >>$CONFIG_STATUS <<\EOF
10873
10874 ac_cs_usage="\
10875 \`$as_me' instantiates files from templates according to the
10876 current configuration.
10877
10878 Usage: $0 [OPTIONS] [FILE]...
10879
10880   -h, --help       print this help, then exit
10881   -V, --version    print version number, then exit
10882   -d, --debug      don't remove temporary files
10883       --recheck    update $as_me by reconfiguring in the same conditions
10884   --file=FILE[:TEMPLATE]
10885                    instantiate the configuration file FILE
10886   --header=FILE[:TEMPLATE]
10887                    instantiate the configuration header FILE
10888
10889 Configuration files:
10890 $config_files
10891
10892 Configuration headers:
10893 $config_headers
10894
10895 Configuration commands:
10896 $config_commands
10897
10898 Report bugs to <bug-autoconf@gnu.org>."
10899 EOF
10900
10901 cat >>$CONFIG_STATUS <<EOF
10902 ac_cs_version="\\
10903 config.status
10904 configured by $0, generated by GNU Autoconf 2.52.20081225,
10905   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
10906
10907 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
10908 Free Software Foundation, Inc.
10909 This config.status script is free software; the Free Software Foundation
10910 gives unlimited permission to copy, distribute and modify it."
10911 srcdir=$srcdir
10912 INSTALL="$INSTALL"
10913 EOF
10914
10915 cat >>$CONFIG_STATUS <<\EOF
10916 # If no file are specified by the user, then we need to provide default
10917 # value.  By we need to know if files were specified by the user.
10918 ac_need_defaults=:
10919 while test $# != 0
10920 do
10921   case $1 in
10922   --*=*)
10923     ac_option=`expr "x$1" : 'x\([^=]*\)='`
10924     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
10925     shift
10926     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
10927     shift
10928     ;;
10929   -*);;
10930   *) # This is not an option, so the user has probably given explicit
10931      # arguments.
10932      ac_need_defaults=false;;
10933   esac
10934
10935   case $1 in
10936   # Handling of the options.
10937 EOF
10938 cat >>$CONFIG_STATUS <<EOF
10939   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
10940     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
10941     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
10942 EOF
10943 cat >>$CONFIG_STATUS <<\EOF
10944   --version | --vers* | -V )
10945     echo "$ac_cs_version"; exit 0 ;;
10946   --he | --h)
10947     # Conflict between --help and --header
10948     { { echo "$as_me:10948: error: ambiguous option: $1
10949 Try \`$0 --help' for more information." >&5
10950 echo "$as_me: error: ambiguous option: $1
10951 Try \`$0 --help' for more information." >&2;}
10952    { (exit 1); exit 1; }; };;
10953   --help | --hel | -h )
10954     echo "$ac_cs_usage"; exit 0 ;;
10955   --debug | --d* | -d )
10956     debug=: ;;
10957   --file | --fil | --fi | --f )
10958     shift
10959     CONFIG_FILES="$CONFIG_FILES $1"
10960     ac_need_defaults=false;;
10961   --header | --heade | --head | --hea )
10962     shift
10963     CONFIG_HEADERS="$CONFIG_HEADERS $1"
10964     ac_need_defaults=false;;
10965
10966   # This is an error.
10967   -*) { { echo "$as_me:10967: error: unrecognized option: $1
10968 Try \`$0 --help' for more information." >&5
10969 echo "$as_me: error: unrecognized option: $1
10970 Try \`$0 --help' for more information." >&2;}
10971    { (exit 1); exit 1; }; } ;;
10972
10973   *) ac_config_targets="$ac_config_targets $1" ;;
10974
10975   esac
10976   shift
10977 done
10978
10979 exec 5>>config.log
10980 cat >&5 << _ACEOF
10981
10982 ## ----------------------- ##
10983 ## Running config.status.  ##
10984 ## ----------------------- ##
10985
10986 This file was extended by $as_me 2.52.20081225, executed with
10987   CONFIG_FILES    = $CONFIG_FILES
10988   CONFIG_HEADERS  = $CONFIG_HEADERS
10989   CONFIG_LINKS    = $CONFIG_LINKS
10990   CONFIG_COMMANDS = $CONFIG_COMMANDS
10991   > $ac_cs_invocation
10992 on `(hostname || uname -n) 2>/dev/null | sed 1q`
10993
10994 _ACEOF
10995 EOF
10996
10997 cat >>$CONFIG_STATUS <<EOF
10998 #
10999 # INIT-COMMANDS section.
11000 #
11001
11002 ### Special initialization commands, used to pass information from the
11003 ### configuration-run into config.status
11004
11005 AWK="$AWK"
11006 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
11007 DFT_LWR_MODEL="$DFT_LWR_MODEL"
11008 ECHO_LINK="$ECHO_LINK"
11009 LIB_NAME="$LIB_NAME"
11010 LIB_SUFFIX="$LIB_SUFFIX"
11011 NCURSES_MAJOR="$NCURSES_MAJOR"
11012 NCURSES_MINOR="$NCURSES_MINOR"
11013 NCURSES_PATCH="$NCURSES_PATCH"
11014 cf_cv_abi_version="$cf_cv_abi_version"
11015 cf_cv_rel_version="$cf_cv_rel_version"
11016 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
11017 cf_cv_shared_soname='$cf_cv_shared_soname'
11018 cf_cv_shlib_version="$cf_cv_shlib_version"
11019 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
11020 cf_cv_system_name="$cf_cv_system_name"
11021 host="$host"
11022 target="$target"
11023
11024 EOF
11025
11026 cat >>$CONFIG_STATUS <<\EOF
11027 for ac_config_target in $ac_config_targets
11028 do
11029   case "$ac_config_target" in
11030   # Handling of arguments.
11031   "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
11032   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
11033   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
11034   "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
11035   *) { { echo "$as_me:11035: error: invalid argument: $ac_config_target" >&5
11036 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
11037    { (exit 1); exit 1; }; };;
11038   esac
11039 done
11040
11041 # If the user did not use the arguments to specify the items to instantiate,
11042 # then the envvar interface is used.  Set only those that are not.
11043 # We use the long form for the default assignment because of an extremely
11044 # bizarre bug on SunOS 4.1.3.
11045 if $ac_need_defaults; then
11046   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
11047   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
11048   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
11049 fi
11050
11051 # Create a temporary directory, and hook for its removal unless debugging.
11052 $debug ||
11053 {
11054   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
11055   trap '{ (exit 1); exit 1; }' 1 2 13 15
11056 }
11057
11058 # Create a (secure) tmp directory for tmp files.
11059 : ${TMPDIR=/tmp}
11060 {
11061   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
11062   test -n "$tmp" && test -d "$tmp"
11063 }  ||
11064 {
11065   tmp=$TMPDIR/cs$$-$RANDOM
11066   (umask 077 && mkdir $tmp)
11067 } ||
11068 {
11069    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
11070    { (exit 1); exit 1; }
11071 }
11072
11073 EOF
11074
11075 cat >>$CONFIG_STATUS <<EOF
11076
11077 #
11078 # CONFIG_FILES section.
11079 #
11080
11081 # No need to generate the scripts if there are no CONFIG_FILES.
11082 # This happens for instance when ./config.status config.h
11083 if test -n "\$CONFIG_FILES"; then
11084   # Protect against being on the right side of a sed subst in config.status.
11085   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
11086    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
11087 s,@SHELL@,$SHELL,;t t
11088 s,@exec_prefix@,$exec_prefix,;t t
11089 s,@prefix@,$prefix,;t t
11090 s,@program_transform_name@,$program_transform_name,;t t
11091 s,@bindir@,$bindir,;t t
11092 s,@sbindir@,$sbindir,;t t
11093 s,@libexecdir@,$libexecdir,;t t
11094 s,@datadir@,$datadir,;t t
11095 s,@sysconfdir@,$sysconfdir,;t t
11096 s,@sharedstatedir@,$sharedstatedir,;t t
11097 s,@localstatedir@,$localstatedir,;t t
11098 s,@libdir@,$libdir,;t t
11099 s,@includedir@,$includedir,;t t
11100 s,@oldincludedir@,$oldincludedir,;t t
11101 s,@infodir@,$infodir,;t t
11102 s,@mandir@,$mandir,;t t
11103 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
11104 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
11105 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
11106 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
11107 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
11108 s,@build_alias@,$build_alias,;t t
11109 s,@host_alias@,$host_alias,;t t
11110 s,@target_alias@,$target_alias,;t t
11111 s,@ECHO_C@,$ECHO_C,;t t
11112 s,@ECHO_N@,$ECHO_N,;t t
11113 s,@ECHO_T@,$ECHO_T,;t t
11114 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
11115 s,@DEFS@,$DEFS,;t t
11116 s,@LIBS@,$LIBS,;t t
11117 s,@top_builddir@,$top_builddir,;t t
11118 s,@build@,$build,;t t
11119 s,@build_cpu@,$build_cpu,;t t
11120 s,@build_vendor@,$build_vendor,;t t
11121 s,@build_os@,$build_os,;t t
11122 s,@host@,$host,;t t
11123 s,@host_cpu@,$host_cpu,;t t
11124 s,@host_vendor@,$host_vendor,;t t
11125 s,@host_os@,$host_os,;t t
11126 s,@target@,$target,;t t
11127 s,@target_cpu@,$target_cpu,;t t
11128 s,@target_vendor@,$target_vendor,;t t
11129 s,@target_os@,$target_os,;t t
11130 s,@CC@,$CC,;t t
11131 s,@CFLAGS@,$CFLAGS,;t t
11132 s,@LDFLAGS@,$LDFLAGS,;t t
11133 s,@CPPFLAGS@,$CPPFLAGS,;t t
11134 s,@ac_ct_CC@,$ac_ct_CC,;t t
11135 s,@EXEEXT@,$EXEEXT,;t t
11136 s,@OBJEXT@,$OBJEXT,;t t
11137 s,@CPP@,$CPP,;t t
11138 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
11139 s,@PROG_EXT@,$PROG_EXT,;t t
11140 s,@AWK@,$AWK,;t t
11141 s,@EGREP@,$EGREP,;t t
11142 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
11143 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
11144 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
11145 s,@LN_S@,$LN_S,;t t
11146 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
11147 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
11148 s,@SET_MAKE@,$SET_MAKE,;t t
11149 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
11150 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
11151 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
11152 s,@RANLIB@,$RANLIB,;t t
11153 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
11154 s,@LD@,$LD,;t t
11155 s,@ac_ct_LD@,$ac_ct_LD,;t t
11156 s,@AR@,$AR,;t t
11157 s,@ac_ct_AR@,$ac_ct_AR,;t t
11158 s,@ARFLAGS@,$ARFLAGS,;t t
11159 s,@DESTDIR@,$DESTDIR,;t t
11160 s,@BUILD_CC@,$BUILD_CC,;t t
11161 s,@BUILD_CPP@,$BUILD_CPP,;t t
11162 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
11163 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
11164 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
11165 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
11166 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
11167 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
11168 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
11169 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
11170 s,@NCURSES_CONFIG@,$NCURSES_CONFIG,;t t
11171 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
11172 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
11173 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
11174 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
11175 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
11176 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
11177 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
11178 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
11179 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
11180 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
11181 s,@CC_G_OPT@,$CC_G_OPT,;t t
11182 s,@LD_MODEL@,$LD_MODEL,;t t
11183 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
11184 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
11185 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
11186 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
11187 s,@LINK_PROGS@,$LINK_PROGS,;t t
11188 s,@LINK_TESTS@,$LINK_TESTS,;t t
11189 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
11190 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
11191 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
11192 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
11193 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
11194 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
11195 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
11196 s,@PTHREAD@,$PTHREAD,;t t
11197 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
11198 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
11199 s,@ECHO_LINK@,$ECHO_LINK,;t t
11200 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
11201 s,@ADA_TRACE@,$ADA_TRACE,;t t
11202 s,@gnat_exists@,$gnat_exists,;t t
11203 s,@M4_exists@,$M4_exists,;t t
11204 s,@cf_ada_make@,$cf_ada_make,;t t
11205 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
11206 s,@cf_ada_package@,$cf_ada_package,;t t
11207 s,@ADAFLAGS@,$ADAFLAGS,;t t
11208 s,@cf_compile_generics@,$cf_compile_generics,;t t
11209 s,@cf_generic_objects@,$cf_generic_objects,;t t
11210 s,@PRAGMA_UNREF@,$PRAGMA_UNREF,;t t
11211 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
11212 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
11213 s,@TINFO_ARGS2@,$TINFO_ARGS2,;t t
11214 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
11215 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
11216 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
11217 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
11218 s,@MAKE_PC_FILES@,$MAKE_PC_FILES,;t t
11219 s,@cross_compiling@,$cross_compiling,;t t
11220 s,@TEST_ARG2@,$TEST_ARG2,;t t
11221 s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
11222 s,@NCURSES_COPY2@,$NCURSES_COPY2,;t t
11223 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
11224 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
11225 s,@EXTERNAL_TREE@,$EXTERNAL_TREE,;t t
11226 CEOF
11227
11228 EOF
11229
11230   cat >>$CONFIG_STATUS <<\EOF
11231   # Split the substitutions into bite-sized pieces for seds with
11232   # small command number limits, like on Digital OSF/1 and HP-UX.
11233   ac_max_sed_lines=48
11234   ac_sed_frag=1 # Number of current file.
11235   ac_beg=1 # First line for current file.
11236   ac_end=$ac_max_sed_lines # Line after last line for current file.
11237   ac_more_lines=:
11238   ac_sed_cmds=
11239   while $ac_more_lines; do
11240     if test $ac_beg -gt 1; then
11241       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
11242     else
11243       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
11244     fi
11245     if test ! -s $tmp/subs.frag; then
11246       ac_more_lines=false
11247     else
11248       # The purpose of the label and of the branching condition is to
11249       # speed up the sed processing (if there are no `@' at all, there
11250       # is no need to browse any of the substitutions).
11251       # These are the two extra sed commands mentioned above.
11252       (echo ':t
11253   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
11254       if test -z "$ac_sed_cmds"; then
11255         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
11256       else
11257         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
11258       fi
11259       ac_sed_frag=`expr $ac_sed_frag + 1`
11260       ac_beg=$ac_end
11261       ac_end=`expr $ac_end + $ac_max_sed_lines`
11262     fi
11263   done
11264   if test -z "$ac_sed_cmds"; then
11265     ac_sed_cmds=cat
11266   fi
11267 fi # test -n "$CONFIG_FILES"
11268
11269 EOF
11270 cat >>$CONFIG_STATUS <<\EOF
11271 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
11272   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
11273   case $ac_file in
11274   - | *:- | *:-:* ) # input from stdin
11275         cat >$tmp/stdin
11276         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
11277         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
11278   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
11279         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
11280   * )   ac_file_in=$ac_file.in ;;
11281   esac
11282
11283   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
11284   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
11285          X"$ac_file" : 'X\(//\)[^/]' \| \
11286          X"$ac_file" : 'X\(//\)$' \| \
11287          X"$ac_file" : 'X\(/\)' \| \
11288          .     : '\(.\)' 2>/dev/null ||
11289 echo X"$ac_file" |
11290     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
11291           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
11292           /^X\(\/\/\)$/{ s//\1/; q; }
11293           /^X\(\/\).*/{ s//\1/; q; }
11294           s/.*/./; q'`
11295   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
11296     { case "$ac_dir" in
11297   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
11298   *)                      as_incr_dir=.;;
11299 esac
11300 as_dummy="$ac_dir"
11301 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
11302   case $as_mkdir_dir in
11303     # Skip DOS drivespec
11304     ?:) as_incr_dir=$as_mkdir_dir ;;
11305     *)
11306       as_incr_dir=$as_incr_dir/$as_mkdir_dir
11307       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
11308     ;;
11309   esac
11310 done; }
11311
11312     ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
11313     # A "../" for each directory in $ac_dir_suffix.
11314     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
11315   else
11316     ac_dir_suffix= ac_dots=
11317   fi
11318
11319   case $srcdir in
11320   .)  ac_srcdir=.
11321       if test -z "$ac_dots"; then
11322          ac_top_srcdir=.
11323       else
11324          ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
11325       fi ;;
11326   [\\/]* | ?:[\\/]* )
11327       ac_srcdir=$srcdir$ac_dir_suffix;
11328       ac_top_srcdir=$srcdir ;;
11329   *) # Relative path.
11330     ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
11331     ac_top_srcdir=$ac_dots$srcdir ;;
11332   esac
11333
11334   case $INSTALL in
11335   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
11336   *) ac_INSTALL=$ac_dots$INSTALL ;;
11337   esac
11338
11339   if test x"$ac_file" != x-; then
11340     { echo "$as_me:11340: creating $ac_file" >&5
11341 echo "$as_me: creating $ac_file" >&6;}
11342     rm -f "$ac_file"
11343   fi
11344   # Let's still pretend it is `configure' which instantiates (i.e., don't
11345   # use $as_me), people would be surprised to read:
11346   #    /* config.h.  Generated automatically by config.status.  */
11347   configure_input="Generated automatically from `echo $ac_file_in |
11348                                                  sed 's,.*/,,'` by configure."
11349
11350   # First look for the input files in the build tree, otherwise in the
11351   # src tree.
11352   ac_file_inputs=`IFS=:
11353     for f in $ac_file_in; do
11354       case $f in
11355       -) echo $tmp/stdin ;;
11356       [\\/$]*)
11357          # Absolute (can't be DOS-style, as IFS=:)
11358          test -f "$f" || { { echo "$as_me:11358: error: cannot find input file: $f" >&5
11359 echo "$as_me: error: cannot find input file: $f" >&2;}
11360    { (exit 1); exit 1; }; }
11361          echo $f;;
11362       *) # Relative
11363          if test -f "$f"; then
11364            # Build tree
11365            echo $f
11366          elif test -f "$srcdir/$f"; then
11367            # Source tree
11368            echo $srcdir/$f
11369          else
11370            # /dev/null tree
11371            { { echo "$as_me:11371: error: cannot find input file: $f" >&5
11372 echo "$as_me: error: cannot find input file: $f" >&2;}
11373    { (exit 1); exit 1; }; }
11374          fi;;
11375       esac
11376     done` || { (exit 1); exit 1; }
11377 EOF
11378 cat >>$CONFIG_STATUS <<EOF
11379   sed "$ac_vpsub
11380 $extrasub
11381 EOF
11382 cat >>$CONFIG_STATUS <<\EOF
11383 :t
11384 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
11385 s,@configure_input@,$configure_input,;t t
11386 s,@srcdir@,$ac_srcdir,;t t
11387 s,@top_srcdir@,$ac_top_srcdir,;t t
11388 s,@INSTALL@,$ac_INSTALL,;t t
11389 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
11390   rm -f $tmp/stdin
11391   if test x"$ac_file" != x-; then
11392     mv $tmp/out $ac_file
11393   else
11394     cat $tmp/out
11395     rm -f $tmp/out
11396   fi
11397
11398 done
11399 EOF
11400 cat >>$CONFIG_STATUS <<\EOF
11401
11402 #
11403 # CONFIG_HEADER section.
11404 #
11405
11406 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
11407 # NAME is the cpp macro being defined and VALUE is the value it is being given.
11408 #
11409 # ac_d sets the value in "#define NAME VALUE" lines.
11410 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
11411 ac_dB='[        ].*$,\1#\2'
11412 ac_dC=' '
11413 ac_dD=',;t'
11414 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
11415 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
11416 ac_iB='\([      ]\),\1#\2define\3'
11417 ac_iC=' '
11418 ac_iD='\4,;t'
11419 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
11420 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
11421 ac_uB='$,\1#\2define\3'
11422 ac_uC=' '
11423 ac_uD=',;t'
11424
11425 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
11426   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
11427   case $ac_file in
11428   - | *:- | *:-:* ) # input from stdin
11429         cat >$tmp/stdin
11430         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
11431         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
11432   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
11433         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
11434   * )   ac_file_in=$ac_file.in ;;
11435   esac
11436
11437   test x"$ac_file" != x- && { echo "$as_me:11437: creating $ac_file" >&5
11438 echo "$as_me: creating $ac_file" >&6;}
11439
11440   # First look for the input files in the build tree, otherwise in the
11441   # src tree.
11442   ac_file_inputs=`IFS=:
11443     for f in $ac_file_in; do
11444       case $f in
11445       -) echo $tmp/stdin ;;
11446       [\\/$]*)
11447          # Absolute (can't be DOS-style, as IFS=:)
11448          test -f "$f" || { { echo "$as_me:11448: error: cannot find input file: $f" >&5
11449 echo "$as_me: error: cannot find input file: $f" >&2;}
11450    { (exit 1); exit 1; }; }
11451          echo $f;;
11452       *) # Relative
11453          if test -f "$f"; then
11454            # Build tree
11455            echo $f
11456          elif test -f "$srcdir/$f"; then
11457            # Source tree
11458            echo $srcdir/$f
11459          else
11460            # /dev/null tree
11461            { { echo "$as_me:11461: error: cannot find input file: $f" >&5
11462 echo "$as_me: error: cannot find input file: $f" >&2;}
11463    { (exit 1); exit 1; }; }
11464          fi;;
11465       esac
11466     done` || { (exit 1); exit 1; }
11467   # Remove the trailing spaces.
11468   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
11469
11470 EOF
11471
11472 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
11473 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
11474 # be either 'cat' or 'sort'.
11475 cat confdefs.h | uniq >conftest.vals
11476
11477 # Break up conftest.vals because some shells have a limit on
11478 # the size of here documents, and old seds have small limits too.
11479
11480 rm -f conftest.tail
11481 echo '  rm -f conftest.frag' >> $CONFIG_STATUS
11482 while grep . conftest.vals >/dev/null
11483 do
11484   # Write chunks of a limited-size here document to conftest.frag.
11485   echo '  cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
11486   sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
11487   echo 'CEOF' >> $CONFIG_STATUS
11488   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
11489   rm -f conftest.vals
11490   mv conftest.tail conftest.vals
11491 done
11492 rm -f conftest.vals
11493
11494 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
11495 # marker @DEFS@.
11496 echo '  cat >> conftest.edit <<CEOF
11497 /@DEFS@/r conftest.frag
11498 /@DEFS@/d
11499 CEOF
11500 sed -f conftest.edit $tmp/in > $tmp/out
11501 rm -f $tmp/in
11502 mv $tmp/out $tmp/in
11503 rm -f conftest.edit conftest.frag
11504 ' >> $CONFIG_STATUS
11505
11506 cat >>$CONFIG_STATUS <<\EOF
11507   # Let's still pretend it is `configure' which instantiates (i.e., don't
11508   # use $as_me), people would be surprised to read:
11509   #    /* config.h.  Generated automatically by config.status.  */
11510   if test x"$ac_file" = x-; then
11511     echo "/* Generated automatically by configure.  */" >$tmp/config.h
11512   else
11513     echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
11514   fi
11515   cat $tmp/in >>$tmp/config.h
11516   rm -f $tmp/in
11517   if test x"$ac_file" != x-; then
11518     if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
11519       { echo "$as_me:11519: $ac_file is unchanged" >&5
11520 echo "$as_me: $ac_file is unchanged" >&6;}
11521     else
11522       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
11523          X"$ac_file" : 'X\(//\)[^/]' \| \
11524          X"$ac_file" : 'X\(//\)$' \| \
11525          X"$ac_file" : 'X\(/\)' \| \
11526          .     : '\(.\)' 2>/dev/null ||
11527 echo X"$ac_file" |
11528     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
11529           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
11530           /^X\(\/\/\)$/{ s//\1/; q; }
11531           /^X\(\/\).*/{ s//\1/; q; }
11532           s/.*/./; q'`
11533       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
11534         { case "$ac_dir" in
11535   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
11536   *)                      as_incr_dir=.;;
11537 esac
11538 as_dummy="$ac_dir"
11539 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
11540   case $as_mkdir_dir in
11541     # Skip DOS drivespec
11542     ?:) as_incr_dir=$as_mkdir_dir ;;
11543     *)
11544       as_incr_dir=$as_incr_dir/$as_mkdir_dir
11545       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
11546     ;;
11547   esac
11548 done; }
11549
11550       fi
11551       rm -f $ac_file
11552       mv $tmp/config.h $ac_file
11553     fi
11554   else
11555     cat $tmp/config.h
11556     rm -f $tmp/config.h
11557   fi
11558 done
11559 EOF
11560 cat >>$CONFIG_STATUS <<\EOF
11561
11562 #
11563 # CONFIG_COMMANDS section.
11564 #
11565 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
11566   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
11567   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
11568
11569   case $ac_dest in
11570   esac
11571 done
11572 EOF
11573
11574 cat >>$CONFIG_STATUS <<\EOF
11575
11576 { (exit 0); exit 0; }
11577 EOF
11578 chmod +x $CONFIG_STATUS
11579 ac_clean_files=$ac_clean_files_save
11580
11581 # configure is writing to config.log, and then calls config.status.
11582 # config.status does its own redirection, appending to config.log.
11583 # Unfortunately, on DOS this fails, as config.log is still kept open
11584 # by configure, so config.status won't be able to write to it; its
11585 # output is simply discarded.  So we exec the FD to /dev/null,
11586 # effectively closing config.log, so it can be properly (re)opened and
11587 # appended to by config.status.  When coming back to configure, we
11588 # need to make the FD available again.
11589 if test "$no_create" != yes; then
11590   ac_cs_success=:
11591   exec 5>/dev/null
11592   $SHELL $CONFIG_STATUS || ac_cs_success=false
11593   exec 5>>config.log
11594   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
11595   # would make configure fail if this is the last instruction.
11596   $ac_cs_success || { (exit 1); exit 1; }
11597 fi
11598 ${MAKE-make} preinstall