]> ncurses.scripts.mit.edu Git - ncurses.git/blob - Ada95/configure
ncurses 5.9 - patch 20120804
[ncurses.git] / Ada95 / configure
1 #! /bin/sh
2 # From configure.in Revision: 1.41 .
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated by Autoconf 2.52.20120310.
5 #
6 # Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
7 # Free Software Foundation, Inc.
8 # This configure script is free software; the Free Software Foundation
9 # gives unlimited permission to copy, distribute and modify it.
10
11 # Avoid depending upon Character Ranges.
12 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
13 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
14 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
15 as_cr_digits='0123456789'
16 as_cr_alnum=$as_cr_Letters$as_cr_digits
17
18 # Sed expression to map a string onto a valid variable name.
19 as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
20
21 # Sed expression to map a string onto a valid CPP name.
22 as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
23
24 # Be Bourne compatible
25 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
26   emulate sh
27   NULLCMD=:
28 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
29   set -o posix
30 fi
31
32 # Name of the executable.
33 as_me=`echo "$0" |sed 's,.*[\\/],,'`
34
35 if expr a : '\(a\)' >/dev/null 2>&1; then
36   as_expr=expr
37 else
38   as_expr=false
39 fi
40
41 rm -f conf$$ conf$$.exe conf$$.file
42 echo >conf$$.file
43 if ln -s conf$$.file conf$$ 2>/dev/null; then
44   # We could just check for DJGPP; but this test a) works b) is more generic
45   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
46   if test -f conf$$.exe; then
47     # Don't use ln at all; we don't have any links
48     as_ln_s='cp -p'
49   else
50     as_ln_s='ln -s'
51   fi
52 elif ln conf$$.file conf$$ 2>/dev/null; then
53   as_ln_s=ln
54 else
55   as_ln_s='cp -p'
56 fi
57 rm -f conf$$ conf$$.exe conf$$.file
58
59 as_executable_p="test -f"
60
61 # Support unset when possible.
62 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
63   as_unset=unset
64 else
65   as_unset=false
66 fi
67
68 # NLS nuisances.
69 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
70 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
71 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
72 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
73 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
74 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
75 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
76 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
77
78 # IFS
79 # We need space, tab and new line, in precisely that order.
80 as_nl='
81 '
82 IFS="   $as_nl"
83
84 # CDPATH.
85 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
86
87 # Name of the host.
88 # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
89 # so uname gets run too.
90 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
91
92 exec 6>&1
93
94 #
95 # Initializations.
96 #
97 ac_default_prefix=/usr/local
98 cross_compiling=no
99 subdirs=
100 MFLAGS= MAKEFLAGS=
101 SHELL=${CONFIG_SHELL-/bin/sh}
102
103 # Maximum number of lines to put in a shell here document.
104 # This variable seems obsolete.  It should probably be removed, and
105 # only ac_max_sed_lines should be used.
106 : ${ac_max_here_lines=38}
107
108 ac_unique_file="gen/gen.c"
109
110 # Initialize some variables set by options.
111 ac_init_help=
112 ac_init_version=false
113 # The variables have the same names as the options, with
114 # dashes changed to underlines.
115 cache_file=/dev/null
116 exec_prefix=NONE
117 no_create=
118 no_recursion=
119 prefix=NONE
120 program_prefix=NONE
121 program_suffix=NONE
122 program_transform_name=s,x,x,
123 silent=
124 site=
125 srcdir=
126 verbose=
127 x_includes=NONE
128 x_libraries=NONE
129
130 # Installation directory options.
131 # These are left unexpanded so users can "make install exec_prefix=/foo"
132 # and all the variables that are supposed to be based on exec_prefix
133 # by default will actually change.
134 # Use braces instead of parens because sh, perl, etc. also accept them.
135 bindir='${exec_prefix}/bin'
136 sbindir='${exec_prefix}/sbin'
137 libexecdir='${exec_prefix}/libexec'
138 datadir='${prefix}/share'
139 sysconfdir='${prefix}/etc'
140 sharedstatedir='${prefix}/com'
141 localstatedir='${prefix}/var'
142 libdir='${exec_prefix}/lib'
143 includedir='${prefix}/include'
144 oldincludedir='/usr/include'
145 infodir='${prefix}/info'
146 mandir='${prefix}/man'
147
148 # Identity of this package.
149 PACKAGE_NAME=
150 PACKAGE_TARNAME=
151 PACKAGE_VERSION=
152 PACKAGE_STRING=
153 PACKAGE_BUGREPORT=
154
155 ac_prev=
156 for ac_option
157 do
158   # If the previous option needs an argument, assign it.
159   if test -n "$ac_prev"; then
160     eval "$ac_prev=\$ac_option"
161     ac_prev=
162     continue
163   fi
164
165   ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
166
167   # Accept the important Cygnus configure options, so we can diagnose typos.
168
169   case $ac_option in
170
171   -bindir | --bindir | --bindi | --bind | --bin | --bi)
172     ac_prev=bindir ;;
173   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
174     bindir=$ac_optarg ;;
175
176   -build | --build | --buil | --bui | --bu)
177     ac_prev=build_alias ;;
178   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
179     build_alias=$ac_optarg ;;
180
181   -cache-file | --cache-file | --cache-fil | --cache-fi \
182   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
183     ac_prev=cache_file ;;
184   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
185   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
186     cache_file=$ac_optarg ;;
187
188   --config-cache | -C)
189     cache_file=config.cache ;;
190
191   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
192     ac_prev=datadir ;;
193   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
194   | --da=*)
195     datadir=$ac_optarg ;;
196
197   -disable-* | --disable-*)
198     ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
199     # Reject names that are not valid shell variable names.
200     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
201       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
202    { (exit 1); exit 1; }; }
203     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
204     eval "enable_$ac_feature=no" ;;
205
206   -enable-* | --enable-*)
207     ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
208     # Reject names that are not valid shell variable names.
209     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
210       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
211    { (exit 1); exit 1; }; }
212     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
213     case $ac_option in
214       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
215       *) ac_optarg=yes ;;
216     esac
217     eval "enable_$ac_feature='$ac_optarg'" ;;
218
219   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
220   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
221   | --exec | --exe | --ex)
222     ac_prev=exec_prefix ;;
223   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
224   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
225   | --exec=* | --exe=* | --ex=*)
226     exec_prefix=$ac_optarg ;;
227
228   -gas | --gas | --ga | --g)
229     # Obsolete; use --with-gas.
230     with_gas=yes ;;
231
232   -help | --help | --hel | --he | -h)
233     ac_init_help=long ;;
234   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
235     ac_init_help=recursive ;;
236   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
237     ac_init_help=short ;;
238
239   -host | --host | --hos | --ho)
240     ac_prev=host_alias ;;
241   -host=* | --host=* | --hos=* | --ho=*)
242     host_alias=$ac_optarg ;;
243
244   -includedir | --includedir | --includedi | --included | --include \
245   | --includ | --inclu | --incl | --inc)
246     ac_prev=includedir ;;
247   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
248   | --includ=* | --inclu=* | --incl=* | --inc=*)
249     includedir=$ac_optarg ;;
250
251   -infodir | --infodir | --infodi | --infod | --info | --inf)
252     ac_prev=infodir ;;
253   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
254     infodir=$ac_optarg ;;
255
256   -libdir | --libdir | --libdi | --libd)
257     ac_prev=libdir ;;
258   -libdir=* | --libdir=* | --libdi=* | --libd=*)
259     libdir=$ac_optarg ;;
260
261   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
262   | --libexe | --libex | --libe)
263     ac_prev=libexecdir ;;
264   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
265   | --libexe=* | --libex=* | --libe=*)
266     libexecdir=$ac_optarg ;;
267
268   -localstatedir | --localstatedir | --localstatedi | --localstated \
269   | --localstate | --localstat | --localsta | --localst \
270   | --locals | --local | --loca | --loc | --lo)
271     ac_prev=localstatedir ;;
272   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
273   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
274   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
275     localstatedir=$ac_optarg ;;
276
277   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
278     ac_prev=mandir ;;
279   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
280     mandir=$ac_optarg ;;
281
282   -nfp | --nfp | --nf)
283     # Obsolete; use --without-fp.
284     with_fp=no ;;
285
286   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
287   | --no-cr | --no-c)
288     no_create=yes ;;
289
290   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
291   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
292     no_recursion=yes ;;
293
294   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
295   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
296   | --oldin | --oldi | --old | --ol | --o)
297     ac_prev=oldincludedir ;;
298   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
299   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
300   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
301     oldincludedir=$ac_optarg ;;
302
303   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
304     ac_prev=prefix ;;
305   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
306     prefix=$ac_optarg ;;
307
308   -program-prefix | --program-prefix | --program-prefi | --program-pref \
309   | --program-pre | --program-pr | --program-p)
310     ac_prev=program_prefix ;;
311   -program-prefix=* | --program-prefix=* | --program-prefi=* \
312   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
313     program_prefix=$ac_optarg ;;
314
315   -program-suffix | --program-suffix | --program-suffi | --program-suff \
316   | --program-suf | --program-su | --program-s)
317     ac_prev=program_suffix ;;
318   -program-suffix=* | --program-suffix=* | --program-suffi=* \
319   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
320     program_suffix=$ac_optarg ;;
321
322   -program-transform-name | --program-transform-name \
323   | --program-transform-nam | --program-transform-na \
324   | --program-transform-n | --program-transform- \
325   | --program-transform | --program-transfor \
326   | --program-transfo | --program-transf \
327   | --program-trans | --program-tran \
328   | --progr-tra | --program-tr | --program-t)
329     ac_prev=program_transform_name ;;
330   -program-transform-name=* | --program-transform-name=* \
331   | --program-transform-nam=* | --program-transform-na=* \
332   | --program-transform-n=* | --program-transform-=* \
333   | --program-transform=* | --program-transfor=* \
334   | --program-transfo=* | --program-transf=* \
335   | --program-trans=* | --program-tran=* \
336   | --progr-tra=* | --program-tr=* | --program-t=*)
337     program_transform_name=$ac_optarg ;;
338
339   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
340   | -silent | --silent | --silen | --sile | --sil)
341     silent=yes ;;
342
343   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
344     ac_prev=sbindir ;;
345   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
346   | --sbi=* | --sb=*)
347     sbindir=$ac_optarg ;;
348
349   -sharedstatedir | --sharedstatedir | --sharedstatedi \
350   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
351   | --sharedst | --shareds | --shared | --share | --shar \
352   | --sha | --sh)
353     ac_prev=sharedstatedir ;;
354   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
355   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
356   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
357   | --sha=* | --sh=*)
358     sharedstatedir=$ac_optarg ;;
359
360   -site | --site | --sit)
361     ac_prev=site ;;
362   -site=* | --site=* | --sit=*)
363     site=$ac_optarg ;;
364
365   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
366     ac_prev=srcdir ;;
367   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
368     srcdir=$ac_optarg ;;
369
370   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
371   | --syscon | --sysco | --sysc | --sys | --sy)
372     ac_prev=sysconfdir ;;
373   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
374   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
375     sysconfdir=$ac_optarg ;;
376
377   -target | --target | --targe | --targ | --tar | --ta | --t)
378     ac_prev=target_alias ;;
379   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
380     target_alias=$ac_optarg ;;
381
382   -v | -verbose | --verbose | --verbos | --verbo | --verb)
383     verbose=yes ;;
384
385   -version | --version | --versio | --versi | --vers | -V)
386     ac_init_version=: ;;
387
388   -with-* | --with-*)
389     ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
390     # Reject names that are not valid shell variable names.
391     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
392       { echo "$as_me: error: invalid package name: $ac_package" >&2
393    { (exit 1); exit 1; }; }
394     ac_package=`echo $ac_package| sed 's/-/_/g'`
395     case $ac_option in
396       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
397       *) ac_optarg=yes ;;
398     esac
399     eval "with_$ac_package='$ac_optarg'" ;;
400
401   -without-* | --without-*)
402     ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
403     # Reject names that are not valid shell variable names.
404     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
405       { echo "$as_me: error: invalid package name: $ac_package" >&2
406    { (exit 1); exit 1; }; }
407     ac_package=`echo $ac_package | sed 's/-/_/g'`
408     eval "with_$ac_package=no" ;;
409
410   --x)
411     # Obsolete; use --with-x.
412     with_x=yes ;;
413
414   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
415   | --x-incl | --x-inc | --x-in | --x-i)
416     ac_prev=x_includes ;;
417   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
418   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
419     x_includes=$ac_optarg ;;
420
421   -x-libraries | --x-libraries | --x-librarie | --x-librari \
422   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
423     ac_prev=x_libraries ;;
424   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
425   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
426     x_libraries=$ac_optarg ;;
427
428   -*) { echo "$as_me: error: unrecognized option: $ac_option
429 Try \`$0 --help' for more information." >&2
430    { (exit 1); exit 1; }; }
431     ;;
432
433   *=*)
434     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
435     # Reject names that are not valid shell variable names.
436     expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
437       { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
438    { (exit 1); exit 1; }; }
439     ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
440     eval "$ac_envvar='$ac_optarg'"
441     export $ac_envvar ;;
442
443   *)
444     # FIXME: should be removed in autoconf 3.0.
445     echo "$as_me: WARNING: you should use --build, --host, --target" >&2
446     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
447       echo "$as_me: WARNING: invalid host type: $ac_option" >&2
448     : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
449     ;;
450
451   esac
452 done
453
454 if test -n "$ac_prev"; then
455   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
456   { echo "$as_me: error: missing argument to $ac_option" >&2
457    { (exit 1); exit 1; }; }
458 fi
459
460 # Be sure to have absolute paths.
461 for ac_var in exec_prefix prefix
462 do
463   eval ac_val=$`echo $ac_var`
464   case $ac_val in
465     [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
466     *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
467    { (exit 1); exit 1; }; };;
468   esac
469 done
470
471 # Be sure to have absolute paths.
472 for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
473               localstatedir libdir includedir oldincludedir infodir mandir
474 do
475   eval ac_val=$`echo $ac_var`
476   case $ac_val in
477     [\\/$]* | ?:[\\/]* ) ;;
478     *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
479    { (exit 1); exit 1; }; };;
480   esac
481 done
482
483 # There might be people who depend on the old broken behavior: `$host'
484 # used to hold the argument of --host etc.
485 build=$build_alias
486 host=$host_alias
487 target=$target_alias
488
489 # FIXME: should be removed in autoconf 3.0.
490 if test "x$host_alias" != x; then
491   if test "x$build_alias" = x; then
492     cross_compiling=maybe
493     echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
494     If a cross compiler is detected then cross compile mode will be used." >&2
495   elif test "x$build_alias" != "x$host_alias"; then
496     cross_compiling=yes
497   fi
498 fi
499
500 ac_tool_prefix=
501 test -n "$host_alias" && ac_tool_prefix=$host_alias-
502
503 test "$silent" = yes && exec 6>/dev/null
504
505 # Find the source files, if location was not specified.
506 if test -z "$srcdir"; then
507   ac_srcdir_defaulted=yes
508   # Try the directory containing this script, then its parent.
509   ac_prog=$0
510   ac_confdir=`echo "$ac_prog" | sed 's%[\\/][^\\/][^\\/]*$%%'`
511   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
512   srcdir=$ac_confdir
513   if test ! -r $srcdir/$ac_unique_file; then
514     srcdir=..
515   fi
516 else
517   ac_srcdir_defaulted=no
518 fi
519 if test ! -r $srcdir/$ac_unique_file; then
520   if test "$ac_srcdir_defaulted" = yes; then
521     { echo "$as_me: error: cannot find sources in $ac_confdir or .." >&2
522    { (exit 1); exit 1; }; }
523   else
524     { echo "$as_me: error: cannot find sources in $srcdir" >&2
525    { (exit 1); exit 1; }; }
526   fi
527 fi
528 srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
529 ac_env_build_alias_set=${build_alias+set}
530 ac_env_build_alias_value=$build_alias
531 ac_cv_env_build_alias_set=${build_alias+set}
532 ac_cv_env_build_alias_value=$build_alias
533 ac_env_host_alias_set=${host_alias+set}
534 ac_env_host_alias_value=$host_alias
535 ac_cv_env_host_alias_set=${host_alias+set}
536 ac_cv_env_host_alias_value=$host_alias
537 ac_env_target_alias_set=${target_alias+set}
538 ac_env_target_alias_value=$target_alias
539 ac_cv_env_target_alias_set=${target_alias+set}
540 ac_cv_env_target_alias_value=$target_alias
541 ac_env_CC_set=${CC+set}
542 ac_env_CC_value=$CC
543 ac_cv_env_CC_set=${CC+set}
544 ac_cv_env_CC_value=$CC
545 ac_env_CFLAGS_set=${CFLAGS+set}
546 ac_env_CFLAGS_value=$CFLAGS
547 ac_cv_env_CFLAGS_set=${CFLAGS+set}
548 ac_cv_env_CFLAGS_value=$CFLAGS
549 ac_env_LDFLAGS_set=${LDFLAGS+set}
550 ac_env_LDFLAGS_value=$LDFLAGS
551 ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
552 ac_cv_env_LDFLAGS_value=$LDFLAGS
553 ac_env_CPPFLAGS_set=${CPPFLAGS+set}
554 ac_env_CPPFLAGS_value=$CPPFLAGS
555 ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
556 ac_cv_env_CPPFLAGS_value=$CPPFLAGS
557 ac_env_CPP_set=${CPP+set}
558 ac_env_CPP_value=$CPP
559 ac_cv_env_CPP_set=${CPP+set}
560 ac_cv_env_CPP_value=$CPP
561
562 #
563 # Report the --help message.
564 #
565 if test "$ac_init_help" = "long"; then
566   # Omit some internal or obsolete options to make the list less imposing.
567   # This message is too long to be a string in the A/UX 3.1 sh.
568   cat <<EOF
569 \`configure' configures this package to adapt to many kinds of systems.
570
571 Usage: $0 [OPTION]... [VAR=VALUE]...
572
573 To assign environment variables (e.g., CC, CFLAGS...), specify them as
574 VAR=VALUE.  See below for descriptions of some of the useful variables.
575
576 Defaults for the options are specified in brackets.
577
578 Configuration:
579   -h, --help              display this help and exit
580       --help=short        display options specific to this package
581       --help=recursive    display the short help of all the included packages
582   -V, --version           display version information and exit
583   -q, --quiet, --silent   do not print \`checking...' messages
584       --cache-file=FILE   cache test results in FILE [disabled]
585   -C, --config-cache      alias for \`--cache-file=config.cache'
586   -n, --no-create         do not create output files
587       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
588
589 EOF
590
591   cat <<EOF
592 Installation directories:
593   --prefix=PREFIX         install architecture-independent files in PREFIX
594                           [$ac_default_prefix]
595   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
596                           [PREFIX]
597
598 By default, \`make install' will install all the files in
599 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
600 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
601 for instance \`--prefix=\$HOME'.
602
603 For better control, use the options below.
604
605 Fine tuning of the installation directories:
606   --bindir=DIR            user executables [EPREFIX/bin]
607   --sbindir=DIR           system admin executables [EPREFIX/sbin]
608   --libexecdir=DIR        program executables [EPREFIX/libexec]
609   --datadir=DIR           read-only architecture-independent data [PREFIX/share]
610   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
611   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
612   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
613   --libdir=DIR            object code libraries [EPREFIX/lib]
614   --includedir=DIR        C header files [PREFIX/include]
615   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
616   --infodir=DIR           info documentation [PREFIX/info]
617   --mandir=DIR            man documentation [PREFIX/man]
618 EOF
619
620   cat <<\EOF
621
622 Program names:
623   --program-prefix=PREFIX            prepend PREFIX to installed program names
624   --program-suffix=SUFFIX            append SUFFIX to installed program names
625   --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
626
627 System types:
628   --build=BUILD           configure for building on BUILD [guessed]
629   --host=HOST       build programs to run on HOST [BUILD]
630   --target=TARGET   configure for building compilers for TARGET [HOST]
631 EOF
632 fi
633
634 if test -n "$ac_init_help"; then
635
636   cat <<\EOF
637
638 Optional Packages:
639   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
640   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
641
642 Optional Features:
643   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
644   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
645
646   --with-system-type=XXX  test: override derived host system-type
647   --with-pkg-config{=path} enable/disable use of pkg-config
648   --with-pkg-config-libdir=XXX use given directory for installing pc-files
649   --enable-pc-files       generate and install .pc files for pkg-config
650   --without-tests         suppress build with test-programs
651   --enable-mixed-case     tic should assume mixed-case filenames
652   --with-install-prefix   prefixes actual install-location ($DESTDIR)
653 Build-Tools Needed to Compile Temporary Applications for Cross-compiling:
654   --with-build-cc=XXX     the build C compiler ($BUILD_CC)
655   --with-build-cpp=XXX    the build C preprocessor ($BUILD_CPP)
656   --with-build-cflags=XXX the build C compiler-flags ($BUILD_CFLAGS)
657   --with-build-cppflags=XXX the build C preprocessor-flags ($BUILD_CPPFLAGS)
658   --with-build-ldflags=XXX the build linker-flags ($BUILD_LDFLAGS)
659   --with-build-libs=XXX   the build libraries (${BUILD_LIBS})
660 Options to Specify the Libraries Built/Used:
661   --with-shared           generate shared C-objects (needed for --with-ada-sharedlib)
662   --enable-widec          compile with wide-char/UTF-8 code
663   --with-curses-dir=DIR   directory in which (n)curses is installed
664   --with-lib-prefix       override library-prefix
665   --with-shlib-version=X  Specify rel or abi version for shared libs
666   --enable-rpath-link     link sample programs with rpath option
667 Fine-Tuning Your Configuration:
668   --enable-broken_linker  compile with broken-linker support code
669   --disable-largefile     omit support for large files
670   --with-rcs-ids          compile-in RCS identifiers
671 Extensions:
672   --disable-ext-funcs     disable function-extensions
673   --enable-const          compile with extra/non-standard const
674 Development Code:
675   --without-develop       disable development options
676 Experimental Code:
677   --with-pthread          use POSIX thread library
678   --enable-weak-symbols   enable weak-symbols for pthreads
679   --enable-reentrant      compile with experimental reentrant code
680   --with-wrap-prefix=XXX  override prefix used for public variables
681 Testing/development Options:
682   --disable-echo          display "compiling" commands
683   --enable-warnings       build: turn on GCC compiler warnings
684   --enable-assertions     test: turn on generation of assertion code
685   --enable-expanded       test: generate functions for certain macros
686   --disable-macros        test: use functions rather than macros
687   --with-trace            test: add trace() function to all models of ncurses
688 Ada95 Binding Options:
689   --with-ada-compiler=CMD specify Ada95 compiler command (default gnatmake)
690   --with-ada-include=DIR  Ada includes are in DIR (default: PREFIX/share/ada/adainclude)
691   --with-ada-objects=DIR  Ada objects are in DIR (default: PREFIX/lib/ada/adalib)
692   --with-ada-sharedlib=XX build Ada95 shared-library
693
694 Some influential environment variables:
695   CC          C compiler command
696   CFLAGS      C compiler flags
697   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
698               nonstandard directory <lib dir>
699   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
700               headers in a nonstandard directory <include dir>
701   CPP         C preprocessor
702
703 Use these variables to override the choices made by `configure' or to help
704 it to find libraries and programs with nonstandard names/locations.
705
706 EOF
707 fi
708
709 if test "$ac_init_help" = "recursive"; then
710   # If there are subdirs, report their specific --help.
711   ac_popdir=`pwd`
712   for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
713     cd $ac_subdir
714     # A "../" for each directory in /$ac_subdir.
715     ac_dots=`echo $ac_subdir |
716              sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
717
718     case $srcdir in
719     .) # No --srcdir option.  We are building in place.
720       ac_sub_srcdir=$srcdir ;;
721     [\\/]* | ?:[\\/]* ) # Absolute path.
722       ac_sub_srcdir=$srcdir/$ac_subdir ;;
723     *) # Relative path.
724       ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;;
725     esac
726
727     # Check for guested configure; otherwise get Cygnus style configure.
728     if test -f $ac_sub_srcdir/configure.gnu; then
729       echo
730       $SHELL $ac_sub_srcdir/configure.gnu  --help=recursive
731     elif test -f $ac_sub_srcdir/configure; then
732       echo
733       $SHELL $ac_sub_srcdir/configure  --help=recursive
734     elif test -f $ac_sub_srcdir/configure.ac ||
735            test -f $ac_sub_srcdir/configure.in; then
736       echo
737       $ac_configure --help
738     else
739       echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
740     fi
741     cd $ac_popdir
742   done
743 fi
744
745 test -n "$ac_init_help" && exit 0
746 if $ac_init_version; then
747   cat <<\EOF
748
749 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
750 Free Software Foundation, Inc.
751 This configure script is free software; the Free Software Foundation
752 gives unlimited permission to copy, distribute and modify it.
753 EOF
754   exit 0
755 fi
756 exec 5>config.log
757 cat >&5 <<EOF
758 This file contains any messages produced by compilers while
759 running configure, to aid debugging if configure makes a mistake.
760
761 It was created by $as_me, which was
762 generated by GNU Autoconf 2.52.20120310.  Invocation command line was
763
764   $ $0 $@
765
766 EOF
767 {
768 cat <<_ASUNAME
769 ## ---------- ##
770 ## Platform.  ##
771 ## ---------- ##
772
773 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
774 uname -m = `(uname -m) 2>/dev/null || echo unknown`
775 uname -r = `(uname -r) 2>/dev/null || echo unknown`
776 uname -s = `(uname -s) 2>/dev/null || echo unknown`
777 uname -v = `(uname -v) 2>/dev/null || echo unknown`
778
779 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
780 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
781
782 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
783 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
784 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
785 hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
786 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
787 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
788 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
789
790 PATH = $PATH
791
792 _ASUNAME
793 } >&5
794
795 cat >&5 <<EOF
796 ## ------------ ##
797 ## Core tests.  ##
798 ## ------------ ##
799
800 EOF
801
802 # Keep a trace of the command line.
803 # Strip out --no-create and --no-recursion so they do not pile up.
804 # Also quote any args containing shell meta-characters.
805 ac_configure_args=
806 ac_sep=
807 for ac_arg
808 do
809   case $ac_arg in
810   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
811   | --no-cr | --no-c) ;;
812   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
813   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
814   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
815     ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
816     ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
817     ac_sep=" " ;;
818   *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
819      ac_sep=" " ;;
820   esac
821   # Get rid of the leading space.
822 done
823
824 # When interrupted or exit'd, cleanup temporary files, and complete
825 # config.log.  We remove comments because anyway the quotes in there
826 # would cause problems or look ugly.
827 trap 'exit_status=$?
828   # Save into config.log some information that might help in debugging.
829   echo >&5
830   echo "## ----------------- ##" >&5
831   echo "## Cache variables.  ##" >&5
832   echo "## ----------------- ##" >&5
833   echo >&5
834   # The following way of writing the cache mishandles newlines in values,
835 {
836   (set) 2>&1 |
837     case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
838     *ac_space=\ *)
839       sed -n \
840         "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
841           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
842       ;;
843     *)
844       sed -n \
845         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
846       ;;
847     esac;
848 } >&5
849   sed "/^$/d" confdefs.h >conftest.log
850   if test -s conftest.log; then
851     echo >&5
852     echo "## ------------ ##" >&5
853     echo "## confdefs.h.  ##" >&5
854     echo "## ------------ ##" >&5
855     echo >&5
856     cat conftest.log >&5
857   fi
858   (echo; echo) >&5
859   test "$ac_signal" != 0 &&
860     echo "$as_me: caught signal $ac_signal" >&5
861   echo "$as_me: exit $exit_status" >&5
862   rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
863     exit $exit_status
864      ' 0
865 for ac_signal in 1 2 13 15; do
866   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
867 done
868 ac_signal=0
869
870 # confdefs.h avoids OS command line length limits that DEFS can exceed.
871 rm -rf conftest* confdefs.h
872 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
873 echo >confdefs.h
874
875 # Let the site file select an alternate cache file if it wants to.
876 # Prefer explicitly selected file to automatically selected ones.
877 if test -z "$CONFIG_SITE"; then
878   if test "x$prefix" != xNONE; then
879     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
880   else
881     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
882   fi
883 fi
884 for ac_site_file in $CONFIG_SITE; do
885   if test -r "$ac_site_file"; then
886     { echo "$as_me:886: loading site script $ac_site_file" >&5
887 echo "$as_me: loading site script $ac_site_file" >&6;}
888     cat "$ac_site_file" >&5
889     . "$ac_site_file"
890   fi
891 done
892
893 if test -r "$cache_file"; then
894   # Some versions of bash will fail to source /dev/null (special
895   # files actually), so we avoid doing that.
896   if test -f "$cache_file"; then
897     { echo "$as_me:897: loading cache $cache_file" >&5
898 echo "$as_me: loading cache $cache_file" >&6;}
899     case $cache_file in
900       [\\/]* | ?:[\\/]* ) . $cache_file;;
901       *)                      . ./$cache_file;;
902     esac
903   fi
904 else
905   { echo "$as_me:905: creating cache $cache_file" >&5
906 echo "$as_me: creating cache $cache_file" >&6;}
907   >$cache_file
908 fi
909
910 # Check that the precious variables saved in the cache have kept the same
911 # value.
912 ac_cache_corrupted=false
913 for ac_var in `(set) 2>&1 |
914                sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
915   eval ac_old_set=\$ac_cv_env_${ac_var}_set
916   eval ac_new_set=\$ac_env_${ac_var}_set
917   eval ac_old_val="\$ac_cv_env_${ac_var}_value"
918   eval ac_new_val="\$ac_env_${ac_var}_value"
919   case $ac_old_set,$ac_new_set in
920     set,)
921       { echo "$as_me:921: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
922 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
923       ac_cache_corrupted=: ;;
924     ,set)
925       { echo "$as_me:925: error: \`$ac_var' was not set in the previous run" >&5
926 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
927       ac_cache_corrupted=: ;;
928     ,);;
929     *)
930       if test "x$ac_old_val" != "x$ac_new_val"; then
931         { echo "$as_me:931: error: \`$ac_var' has changed since the previous run:" >&5
932 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
933         { echo "$as_me:933:   former value:  $ac_old_val" >&5
934 echo "$as_me:   former value:  $ac_old_val" >&2;}
935         { echo "$as_me:935:   current value: $ac_new_val" >&5
936 echo "$as_me:   current value: $ac_new_val" >&2;}
937         ac_cache_corrupted=:
938       fi;;
939   esac
940   # Pass precious variables to config.status.  It doesn't matter if
941   # we pass some twice (in addition to the command line arguments).
942   if test "$ac_new_set" = set; then
943     case $ac_new_val in
944     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
945       ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
946       ac_configure_args="$ac_configure_args '$ac_arg'"
947       ;;
948     *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
949        ;;
950     esac
951   fi
952 done
953 if $ac_cache_corrupted; then
954   { echo "$as_me:954: error: changes in the environment can compromise the build" >&5
955 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
956   { { echo "$as_me:956: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
957 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
958    { (exit 1); exit 1; }; }
959 fi
960
961 ac_ext=c
962 ac_cpp='$CPP $CPPFLAGS'
963 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
964 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
965 ac_compiler_gnu=$ac_cv_c_compiler_gnu
966 ac_main_return=return
967
968 case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
969   *c*,-n*) ECHO_N= ECHO_C='
970 ' ECHO_T='      ' ;;
971   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
972   *)      ECHO_N= ECHO_C='\c' ECHO_T= ;;
973 esac
974 echo "#! $SHELL" >conftest.sh
975 echo  "exit 0"   >>conftest.sh
976 chmod +x conftest.sh
977 if { (echo "$as_me:977: PATH=\".;.\"; conftest.sh") >&5
978   (PATH=".;."; conftest.sh) 2>&5
979   ac_status=$?
980   echo "$as_me:980: \$? = $ac_status" >&5
981   (exit $ac_status); }; then
982   ac_path_separator=';'
983 else
984   ac_path_separator=:
985 fi
986 PATH_SEPARATOR="$ac_path_separator"
987 rm -f conftest.sh
988
989 ac_config_headers="$ac_config_headers include/ncurses_cfg.h:include/ncurses_cfg.hin"
990
991 top_builddir=`pwd`
992
993 ac_aux_dir=
994 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
995   if test -f $ac_dir/install-sh; then
996     ac_aux_dir=$ac_dir
997     ac_install_sh="$ac_aux_dir/install-sh -c"
998     break
999   elif test -f $ac_dir/install.sh; then
1000     ac_aux_dir=$ac_dir
1001     ac_install_sh="$ac_aux_dir/install.sh -c"
1002     break
1003   elif test -f $ac_dir/shtool; then
1004     ac_aux_dir=$ac_dir
1005     ac_install_sh="$ac_aux_dir/shtool install -c"
1006     break
1007   fi
1008 done
1009 if test -z "$ac_aux_dir"; then
1010   { { echo "$as_me:1010: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1011 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1012    { (exit 1); exit 1; }; }
1013 fi
1014 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1015 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1016 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1017
1018 # Make sure we can run config.sub.
1019 $ac_config_sub sun4 >/dev/null 2>&1 ||
1020   { { echo "$as_me:1020: error: cannot run $ac_config_sub" >&5
1021 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1022    { (exit 1); exit 1; }; }
1023
1024 echo "$as_me:1024: checking build system type" >&5
1025 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1026 if test "${ac_cv_build+set}" = set; then
1027   echo $ECHO_N "(cached) $ECHO_C" >&6
1028 else
1029   ac_cv_build_alias=$build_alias
1030 test -z "$ac_cv_build_alias" &&
1031   ac_cv_build_alias=`$ac_config_guess`
1032 test -z "$ac_cv_build_alias" &&
1033   { { echo "$as_me:1033: error: cannot guess build type; you must specify one" >&5
1034 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1035    { (exit 1); exit 1; }; }
1036 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1037   { { echo "$as_me:1037: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1038 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1039    { (exit 1); exit 1; }; }
1040
1041 fi
1042 echo "$as_me:1042: result: $ac_cv_build" >&5
1043 echo "${ECHO_T}$ac_cv_build" >&6
1044 build=$ac_cv_build
1045 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1046 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1047 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1048
1049 echo "$as_me:1049: checking host system type" >&5
1050 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1051 if test "${ac_cv_host+set}" = set; then
1052   echo $ECHO_N "(cached) $ECHO_C" >&6
1053 else
1054   ac_cv_host_alias=$host_alias
1055 test -z "$ac_cv_host_alias" &&
1056   ac_cv_host_alias=$ac_cv_build_alias
1057 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1058   { { echo "$as_me:1058: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1059 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1060    { (exit 1); exit 1; }; }
1061
1062 fi
1063 echo "$as_me:1063: result: $ac_cv_host" >&5
1064 echo "${ECHO_T}$ac_cv_host" >&6
1065 host=$ac_cv_host
1066 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1067 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1068 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1069
1070 if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then
1071         echo "$as_me:1071: checking target system type" >&5
1072 echo $ECHO_N "checking target system type... $ECHO_C" >&6
1073 if test "${ac_cv_target+set}" = set; then
1074   echo $ECHO_N "(cached) $ECHO_C" >&6
1075 else
1076   ac_cv_target_alias=$target_alias
1077 test "x$ac_cv_target_alias" = "x" &&
1078   ac_cv_target_alias=$ac_cv_host_alias
1079 ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
1080   { { echo "$as_me:1080: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1081 echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1082    { (exit 1); exit 1; }; }
1083
1084 fi
1085 echo "$as_me:1085: result: $ac_cv_target" >&5
1086 echo "${ECHO_T}$ac_cv_target" >&6
1087 target=$ac_cv_target
1088 target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1089 target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1090 target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1091
1092 # The aliases save the names the user supplied, while $host etc.
1093 # will get canonicalized.
1094 test -n "$target_alias" &&
1095   test "$program_prefix$program_suffix$program_transform_name" = \
1096     NONENONEs,x,x, &&
1097   program_prefix=${target_alias}-
1098         system_name="$host_os"
1099 else
1100         system_name="`(uname -s -r) 2>/dev/null`"
1101         if test -z "$system_name" ; then
1102                 system_name="`(hostname) 2>/dev/null`"
1103         fi
1104 fi
1105 test -n "$system_name" && cat >>confdefs.h <<EOF
1106 #define SYSTEM_NAME "$system_name"
1107 EOF
1108
1109 if test "${cf_cv_system_name+set}" = set; then
1110   echo $ECHO_N "(cached) $ECHO_C" >&6
1111 else
1112   cf_cv_system_name="$system_name"
1113 fi
1114
1115 test -z "$system_name" && system_name="$cf_cv_system_name"
1116 test -n "$cf_cv_system_name" && echo "$as_me:1116: result: Configuring for $cf_cv_system_name" >&5
1117 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1118
1119 if test ".$system_name" != ".$cf_cv_system_name" ; then
1120         echo "$as_me:1120: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1121 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1122         { { echo "$as_me:1122: error: \"Please remove config.cache and try again.\"" >&5
1123 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1124    { (exit 1); exit 1; }; }
1125 fi
1126
1127 # Check whether --with-system-type or --without-system-type was given.
1128 if test "${with_system_type+set}" = set; then
1129   withval="$with_system_type"
1130   { echo "$as_me:1130: WARNING: overriding system type to $withval" >&5
1131 echo "$as_me: WARNING: overriding system type to $withval" >&2;}
1132  cf_cv_system_name=$withval
1133 fi;
1134
1135 ###     Save the given $CFLAGS to allow user-override.
1136 cf_user_CFLAGS="$CFLAGS"
1137
1138 ###     Default install-location
1139
1140 echo "$as_me:1140: checking for prefix" >&5
1141 echo $ECHO_N "checking for prefix... $ECHO_C" >&6
1142 if test "x$prefix" = "xNONE" ; then
1143         case "$cf_cv_system_name" in
1144                 # non-vendor systems don't have a conflict
1145         openbsd*|freebsd*|mirbsd*|linux*|cygwin*|k*bsd*-gnu)
1146                 prefix=/usr
1147                 ;;
1148         *)      prefix=$ac_default_prefix
1149                 ;;
1150         esac
1151 fi
1152 echo "$as_me:1152: result: $prefix" >&5
1153 echo "${ECHO_T}$prefix" >&6
1154
1155 if test "x$prefix" = "xNONE" ; then
1156 echo "$as_me:1156: checking for default include-directory" >&5
1157 echo $ECHO_N "checking for default include-directory... $ECHO_C" >&6
1158 test -n "$verbose" && echo 1>&6
1159 for cf_symbol in \
1160         $includedir \
1161         $includedir/ncurses \
1162         $prefix/include \
1163         $prefix/include/ncurses \
1164         /usr/local/include \
1165         /usr/local/include/ncurses \
1166         /usr/include \
1167         /usr/include/ncurses
1168 do
1169         cf_dir=`eval echo $cf_symbol`
1170         if test -f $cf_dir/curses.h ; then
1171         if ( fgrep NCURSES_VERSION $cf_dir/curses.h 2>&1 >/dev/null ) ; then
1172                 includedir="$cf_symbol"
1173                 test -n "$verbose"  && echo $ac_n "     found " 1>&6
1174                 break
1175         fi
1176         fi
1177         test -n "$verbose"  && echo "   tested $cf_dir" 1>&6
1178 done
1179 echo "$as_me:1179: result: $includedir" >&5
1180 echo "${ECHO_T}$includedir" >&6
1181 fi
1182
1183 ###     Checks for programs.
1184 ac_ext=c
1185 ac_cpp='$CPP $CPPFLAGS'
1186 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1187 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1188 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1189 ac_main_return=return
1190 if test -n "$ac_tool_prefix"; then
1191   for ac_prog in gnatgcc gcc cc
1192   do
1193     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1194 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1195 echo "$as_me:1195: checking for $ac_word" >&5
1196 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1197 if test "${ac_cv_prog_CC+set}" = set; then
1198   echo $ECHO_N "(cached) $ECHO_C" >&6
1199 else
1200   if test -n "$CC"; then
1201   ac_cv_prog_CC="$CC" # Let the user override the test.
1202 else
1203   ac_save_IFS=$IFS; IFS=$ac_path_separator
1204 ac_dummy="$PATH"
1205 for ac_dir in $ac_dummy; do
1206   IFS=$ac_save_IFS
1207   test -z "$ac_dir" && ac_dir=.
1208   $as_executable_p "$ac_dir/$ac_word" || continue
1209 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1210 echo "$as_me:1210: found $ac_dir/$ac_word" >&5
1211 break
1212 done
1213
1214 fi
1215 fi
1216 CC=$ac_cv_prog_CC
1217 if test -n "$CC"; then
1218   echo "$as_me:1218: result: $CC" >&5
1219 echo "${ECHO_T}$CC" >&6
1220 else
1221   echo "$as_me:1221: result: no" >&5
1222 echo "${ECHO_T}no" >&6
1223 fi
1224
1225     test -n "$CC" && break
1226   done
1227 fi
1228 if test -z "$CC"; then
1229   ac_ct_CC=$CC
1230   for ac_prog in gnatgcc gcc cc
1231 do
1232   # Extract the first word of "$ac_prog", so it can be a program name with args.
1233 set dummy $ac_prog; ac_word=$2
1234 echo "$as_me:1234: checking for $ac_word" >&5
1235 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1236 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1237   echo $ECHO_N "(cached) $ECHO_C" >&6
1238 else
1239   if test -n "$ac_ct_CC"; then
1240   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1241 else
1242   ac_save_IFS=$IFS; IFS=$ac_path_separator
1243 ac_dummy="$PATH"
1244 for ac_dir in $ac_dummy; do
1245   IFS=$ac_save_IFS
1246   test -z "$ac_dir" && ac_dir=.
1247   $as_executable_p "$ac_dir/$ac_word" || continue
1248 ac_cv_prog_ac_ct_CC="$ac_prog"
1249 echo "$as_me:1249: found $ac_dir/$ac_word" >&5
1250 break
1251 done
1252
1253 fi
1254 fi
1255 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1256 if test -n "$ac_ct_CC"; then
1257   echo "$as_me:1257: result: $ac_ct_CC" >&5
1258 echo "${ECHO_T}$ac_ct_CC" >&6
1259 else
1260   echo "$as_me:1260: result: no" >&5
1261 echo "${ECHO_T}no" >&6
1262 fi
1263
1264   test -n "$ac_ct_CC" && break
1265 done
1266
1267   CC=$ac_ct_CC
1268 fi
1269
1270 test -z "$CC" && { { echo "$as_me:1270: error: no acceptable cc found in \$PATH" >&5
1271 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1272    { (exit 1); exit 1; }; }
1273
1274 # Provide some information about the compiler.
1275 echo "$as_me:1275:" \
1276      "checking for C compiler version" >&5
1277 ac_compiler=`set X $ac_compile; echo $2`
1278 { (eval echo "$as_me:1278: \"$ac_compiler --version </dev/null >&5\"") >&5
1279   (eval $ac_compiler --version </dev/null >&5) 2>&5
1280   ac_status=$?
1281   echo "$as_me:1281: \$? = $ac_status" >&5
1282   (exit $ac_status); }
1283 { (eval echo "$as_me:1283: \"$ac_compiler -v </dev/null >&5\"") >&5
1284   (eval $ac_compiler -v </dev/null >&5) 2>&5
1285   ac_status=$?
1286   echo "$as_me:1286: \$? = $ac_status" >&5
1287   (exit $ac_status); }
1288 { (eval echo "$as_me:1288: \"$ac_compiler -V </dev/null >&5\"") >&5
1289   (eval $ac_compiler -V </dev/null >&5) 2>&5
1290   ac_status=$?
1291   echo "$as_me:1291: \$? = $ac_status" >&5
1292   (exit $ac_status); }
1293
1294 cat >conftest.$ac_ext <<_ACEOF
1295 #line 1295 "configure"
1296 #include "confdefs.h"
1297
1298 int
1299 main ()
1300 {
1301
1302   ;
1303   return 0;
1304 }
1305 _ACEOF
1306 ac_clean_files_save=$ac_clean_files
1307 ac_clean_files="$ac_clean_files a.out a.exe"
1308 # Try to create an executable without -o first, disregard a.out.
1309 # It will help us diagnose broken compilers, and finding out an intuition
1310 # of exeext.
1311 echo "$as_me:1311: checking for C compiler default output" >&5
1312 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1313 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1314 if { (eval echo "$as_me:1314: \"$ac_link_default\"") >&5
1315   (eval $ac_link_default) 2>&5
1316   ac_status=$?
1317   echo "$as_me:1317: \$? = $ac_status" >&5
1318   (exit $ac_status); }; then
1319   # Find the output, starting from the most likely.  This scheme is
1320 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1321 # resort.
1322 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1323                 ls a.out conftest 2>/dev/null;
1324                 ls a.* conftest.* 2>/dev/null`; do
1325   case $ac_file in
1326     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1327     a.out ) # We found the default executable, but exeext='' is most
1328             # certainly right.
1329             break;;
1330     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1331           # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1332           export ac_cv_exeext
1333           break;;
1334     * ) break;;
1335   esac
1336 done
1337 else
1338   echo "$as_me: failed program was:" >&5
1339 cat conftest.$ac_ext >&5
1340 { { echo "$as_me:1340: error: C compiler cannot create executables" >&5
1341 echo "$as_me: error: C compiler cannot create executables" >&2;}
1342    { (exit 77); exit 77; }; }
1343 fi
1344
1345 ac_exeext=$ac_cv_exeext
1346 echo "$as_me:1346: result: $ac_file" >&5
1347 echo "${ECHO_T}$ac_file" >&6
1348
1349 # Check the compiler produces executables we can run.  If not, either
1350 # the compiler is broken, or we cross compile.
1351 echo "$as_me:1351: checking whether the C compiler works" >&5
1352 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1353 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1354 # If not cross compiling, check that we can run a simple program.
1355 if test "$cross_compiling" != yes; then
1356   if { ac_try='./$ac_file'
1357   { (eval echo "$as_me:1357: \"$ac_try\"") >&5
1358   (eval $ac_try) 2>&5
1359   ac_status=$?
1360   echo "$as_me:1360: \$? = $ac_status" >&5
1361   (exit $ac_status); }; }; then
1362     cross_compiling=no
1363   else
1364     if test "$cross_compiling" = maybe; then
1365         cross_compiling=yes
1366     else
1367         { { echo "$as_me:1367: error: cannot run C compiled programs.
1368 If you meant to cross compile, use \`--host'." >&5
1369 echo "$as_me: error: cannot run C compiled programs.
1370 If you meant to cross compile, use \`--host'." >&2;}
1371    { (exit 1); exit 1; }; }
1372     fi
1373   fi
1374 fi
1375 echo "$as_me:1375: result: yes" >&5
1376 echo "${ECHO_T}yes" >&6
1377
1378 rm -f a.out a.exe conftest$ac_cv_exeext
1379 ac_clean_files=$ac_clean_files_save
1380 # Check the compiler produces executables we can run.  If not, either
1381 # the compiler is broken, or we cross compile.
1382 echo "$as_me:1382: checking whether we are cross compiling" >&5
1383 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1384 echo "$as_me:1384: result: $cross_compiling" >&5
1385 echo "${ECHO_T}$cross_compiling" >&6
1386
1387 echo "$as_me:1387: checking for executable suffix" >&5
1388 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1389 if { (eval echo "$as_me:1389: \"$ac_link\"") >&5
1390   (eval $ac_link) 2>&5
1391   ac_status=$?
1392   echo "$as_me:1392: \$? = $ac_status" >&5
1393   (exit $ac_status); }; then
1394   # If both `conftest.exe' and `conftest' are `present' (well, observable)
1395 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
1396 # work properly (i.e., refer to `conftest.exe'), while it won't with
1397 # `rm'.
1398 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1399   case $ac_file in
1400     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1401     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1402           export ac_cv_exeext
1403           break;;
1404     * ) break;;
1405   esac
1406 done
1407 else
1408   { { echo "$as_me:1408: error: cannot compute EXEEXT: cannot compile and link" >&5
1409 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1410    { (exit 1); exit 1; }; }
1411 fi
1412
1413 rm -f conftest$ac_cv_exeext
1414 echo "$as_me:1414: result: $ac_cv_exeext" >&5
1415 echo "${ECHO_T}$ac_cv_exeext" >&6
1416
1417 rm -f conftest.$ac_ext
1418 EXEEXT=$ac_cv_exeext
1419 ac_exeext=$EXEEXT
1420 echo "$as_me:1420: checking for object suffix" >&5
1421 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1422 if test "${ac_cv_objext+set}" = set; then
1423   echo $ECHO_N "(cached) $ECHO_C" >&6
1424 else
1425   cat >conftest.$ac_ext <<_ACEOF
1426 #line 1426 "configure"
1427 #include "confdefs.h"
1428
1429 int
1430 main ()
1431 {
1432
1433   ;
1434   return 0;
1435 }
1436 _ACEOF
1437 rm -f conftest.o conftest.obj
1438 if { (eval echo "$as_me:1438: \"$ac_compile\"") >&5
1439   (eval $ac_compile) 2>&5
1440   ac_status=$?
1441   echo "$as_me:1441: \$? = $ac_status" >&5
1442   (exit $ac_status); }; then
1443   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1444   case $ac_file in
1445     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
1446     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1447        break;;
1448   esac
1449 done
1450 else
1451   echo "$as_me: failed program was:" >&5
1452 cat conftest.$ac_ext >&5
1453 { { echo "$as_me:1453: error: cannot compute OBJEXT: cannot compile" >&5
1454 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1455    { (exit 1); exit 1; }; }
1456 fi
1457
1458 rm -f conftest.$ac_cv_objext conftest.$ac_ext
1459 fi
1460 echo "$as_me:1460: result: $ac_cv_objext" >&5
1461 echo "${ECHO_T}$ac_cv_objext" >&6
1462 OBJEXT=$ac_cv_objext
1463 ac_objext=$OBJEXT
1464 echo "$as_me:1464: checking whether we are using the GNU C compiler" >&5
1465 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1466 if test "${ac_cv_c_compiler_gnu+set}" = set; then
1467   echo $ECHO_N "(cached) $ECHO_C" >&6
1468 else
1469   cat >conftest.$ac_ext <<_ACEOF
1470 #line 1470 "configure"
1471 #include "confdefs.h"
1472
1473 int
1474 main ()
1475 {
1476 #ifndef __GNUC__
1477        choke me
1478 #endif
1479
1480   ;
1481   return 0;
1482 }
1483 _ACEOF
1484 rm -f conftest.$ac_objext
1485 if { (eval echo "$as_me:1485: \"$ac_compile\"") >&5
1486   (eval $ac_compile) 2>&5
1487   ac_status=$?
1488   echo "$as_me:1488: \$? = $ac_status" >&5
1489   (exit $ac_status); } &&
1490          { ac_try='test -s conftest.$ac_objext'
1491   { (eval echo "$as_me:1491: \"$ac_try\"") >&5
1492   (eval $ac_try) 2>&5
1493   ac_status=$?
1494   echo "$as_me:1494: \$? = $ac_status" >&5
1495   (exit $ac_status); }; }; then
1496   ac_compiler_gnu=yes
1497 else
1498   echo "$as_me: failed program was:" >&5
1499 cat conftest.$ac_ext >&5
1500 ac_compiler_gnu=no
1501 fi
1502 rm -f conftest.$ac_objext conftest.$ac_ext
1503 ac_cv_c_compiler_gnu=$ac_compiler_gnu
1504
1505 fi
1506 echo "$as_me:1506: result: $ac_cv_c_compiler_gnu" >&5
1507 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1508 GCC=`test $ac_compiler_gnu = yes && echo yes`
1509 ac_test_CFLAGS=${CFLAGS+set}
1510 ac_save_CFLAGS=$CFLAGS
1511 CFLAGS="-g"
1512 echo "$as_me:1512: checking whether $CC accepts -g" >&5
1513 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1514 if test "${ac_cv_prog_cc_g+set}" = set; then
1515   echo $ECHO_N "(cached) $ECHO_C" >&6
1516 else
1517   cat >conftest.$ac_ext <<_ACEOF
1518 #line 1518 "configure"
1519 #include "confdefs.h"
1520
1521 int
1522 main ()
1523 {
1524
1525   ;
1526   return 0;
1527 }
1528 _ACEOF
1529 rm -f conftest.$ac_objext
1530 if { (eval echo "$as_me:1530: \"$ac_compile\"") >&5
1531   (eval $ac_compile) 2>&5
1532   ac_status=$?
1533   echo "$as_me:1533: \$? = $ac_status" >&5
1534   (exit $ac_status); } &&
1535          { ac_try='test -s conftest.$ac_objext'
1536   { (eval echo "$as_me:1536: \"$ac_try\"") >&5
1537   (eval $ac_try) 2>&5
1538   ac_status=$?
1539   echo "$as_me:1539: \$? = $ac_status" >&5
1540   (exit $ac_status); }; }; then
1541   ac_cv_prog_cc_g=yes
1542 else
1543   echo "$as_me: failed program was:" >&5
1544 cat conftest.$ac_ext >&5
1545 ac_cv_prog_cc_g=no
1546 fi
1547 rm -f conftest.$ac_objext conftest.$ac_ext
1548 fi
1549 echo "$as_me:1549: result: $ac_cv_prog_cc_g" >&5
1550 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1551 if test "$ac_test_CFLAGS" = set; then
1552   CFLAGS=$ac_save_CFLAGS
1553 elif test $ac_cv_prog_cc_g = yes; then
1554   if test "$GCC" = yes; then
1555     CFLAGS="-g -O2"
1556   else
1557     CFLAGS="-g"
1558   fi
1559 else
1560   if test "$GCC" = yes; then
1561     CFLAGS="-O2"
1562   else
1563     CFLAGS=
1564   fi
1565 fi
1566 # Some people use a C++ compiler to compile C.  Since we use `exit',
1567 # in C++ we need to declare it.  In case someone uses the same compiler
1568 # for both compiling C and C++ we need to have the C++ compiler decide
1569 # the declaration of exit, since it's the most demanding environment.
1570 cat >conftest.$ac_ext <<_ACEOF
1571 #ifndef __cplusplus
1572   choke me
1573 #endif
1574 _ACEOF
1575 rm -f conftest.$ac_objext
1576 if { (eval echo "$as_me:1576: \"$ac_compile\"") >&5
1577   (eval $ac_compile) 2>&5
1578   ac_status=$?
1579   echo "$as_me:1579: \$? = $ac_status" >&5
1580   (exit $ac_status); } &&
1581          { ac_try='test -s conftest.$ac_objext'
1582   { (eval echo "$as_me:1582: \"$ac_try\"") >&5
1583   (eval $ac_try) 2>&5
1584   ac_status=$?
1585   echo "$as_me:1585: \$? = $ac_status" >&5
1586   (exit $ac_status); }; }; then
1587   for ac_declaration in \
1588    ''\
1589    '#include <stdlib.h>' \
1590    'extern "C" void std::exit (int) throw (); using std::exit;' \
1591    'extern "C" void std::exit (int); using std::exit;' \
1592    'extern "C" void exit (int) throw ();' \
1593    'extern "C" void exit (int);' \
1594    'void exit (int);'
1595 do
1596   cat >conftest.$ac_ext <<_ACEOF
1597 #line 1597 "configure"
1598 #include "confdefs.h"
1599 #include <stdlib.h>
1600 $ac_declaration
1601 int
1602 main ()
1603 {
1604 exit (42);
1605   ;
1606   return 0;
1607 }
1608 _ACEOF
1609 rm -f conftest.$ac_objext
1610 if { (eval echo "$as_me:1610: \"$ac_compile\"") >&5
1611   (eval $ac_compile) 2>&5
1612   ac_status=$?
1613   echo "$as_me:1613: \$? = $ac_status" >&5
1614   (exit $ac_status); } &&
1615          { ac_try='test -s conftest.$ac_objext'
1616   { (eval echo "$as_me:1616: \"$ac_try\"") >&5
1617   (eval $ac_try) 2>&5
1618   ac_status=$?
1619   echo "$as_me:1619: \$? = $ac_status" >&5
1620   (exit $ac_status); }; }; then
1621   :
1622 else
1623   echo "$as_me: failed program was:" >&5
1624 cat conftest.$ac_ext >&5
1625 continue
1626 fi
1627 rm -f conftest.$ac_objext conftest.$ac_ext
1628   cat >conftest.$ac_ext <<_ACEOF
1629 #line 1629 "configure"
1630 #include "confdefs.h"
1631 $ac_declaration
1632 int
1633 main ()
1634 {
1635 exit (42);
1636   ;
1637   return 0;
1638 }
1639 _ACEOF
1640 rm -f conftest.$ac_objext
1641 if { (eval echo "$as_me:1641: \"$ac_compile\"") >&5
1642   (eval $ac_compile) 2>&5
1643   ac_status=$?
1644   echo "$as_me:1644: \$? = $ac_status" >&5
1645   (exit $ac_status); } &&
1646          { ac_try='test -s conftest.$ac_objext'
1647   { (eval echo "$as_me:1647: \"$ac_try\"") >&5
1648   (eval $ac_try) 2>&5
1649   ac_status=$?
1650   echo "$as_me:1650: \$? = $ac_status" >&5
1651   (exit $ac_status); }; }; then
1652   break
1653 else
1654   echo "$as_me: failed program was:" >&5
1655 cat conftest.$ac_ext >&5
1656 fi
1657 rm -f conftest.$ac_objext conftest.$ac_ext
1658 done
1659 rm -rf conftest*
1660 if test -n "$ac_declaration"; then
1661   echo '#ifdef __cplusplus' >>confdefs.h
1662   echo $ac_declaration      >>confdefs.h
1663   echo '#endif'             >>confdefs.h
1664 fi
1665
1666 else
1667   echo "$as_me: failed program was:" >&5
1668 cat conftest.$ac_ext >&5
1669 fi
1670 rm -f conftest.$ac_objext conftest.$ac_ext
1671 ac_ext=c
1672 ac_cpp='$CPP $CPPFLAGS'
1673 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1674 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1675 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1676 ac_main_return=return
1677
1678 GCC_VERSION=none
1679 if test "$GCC" = yes ; then
1680         echo "$as_me:1680: checking version of $CC" >&5
1681 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
1682         GCC_VERSION="`${CC} --version 2>/dev/null | sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
1683         test -z "$GCC_VERSION" && GCC_VERSION=unknown
1684         echo "$as_me:1684: result: $GCC_VERSION" >&5
1685 echo "${ECHO_T}$GCC_VERSION" >&6
1686 fi
1687
1688 ac_ext=c
1689 ac_cpp='$CPP $CPPFLAGS'
1690 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1691 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1692 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1693 ac_main_return=return
1694 echo "$as_me:1694: checking how to run the C preprocessor" >&5
1695 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
1696 # On Suns, sometimes $CPP names a directory.
1697 if test -n "$CPP" && test -d "$CPP"; then
1698   CPP=
1699 fi
1700 if test -z "$CPP"; then
1701   if test "${ac_cv_prog_CPP+set}" = set; then
1702   echo $ECHO_N "(cached) $ECHO_C" >&6
1703 else
1704       # Double quotes because CPP needs to be expanded
1705     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
1706     do
1707       ac_preproc_ok=false
1708 for ac_c_preproc_warn_flag in '' yes
1709 do
1710   # Use a header file that comes with gcc, so configuring glibc
1711   # with a fresh cross-compiler works.
1712   # On the NeXT, cc -E runs the code through the compiler's parser,
1713   # not just through cpp. "Syntax error" is here to catch this case.
1714   cat >conftest.$ac_ext <<_ACEOF
1715 #line 1715 "configure"
1716 #include "confdefs.h"
1717 #include <assert.h>
1718                      Syntax error
1719 _ACEOF
1720 if { (eval echo "$as_me:1720: \"$ac_cpp conftest.$ac_ext\"") >&5
1721   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
1722   ac_status=$?
1723   egrep -v '^ *\+' conftest.er1 >conftest.err
1724   rm -f conftest.er1
1725   cat conftest.err >&5
1726   echo "$as_me:1726: \$? = $ac_status" >&5
1727   (exit $ac_status); } >/dev/null; then
1728   if test -s conftest.err; then
1729     ac_cpp_err=$ac_c_preproc_warn_flag
1730   else
1731     ac_cpp_err=
1732   fi
1733 else
1734   ac_cpp_err=yes
1735 fi
1736 if test -z "$ac_cpp_err"; then
1737   :
1738 else
1739   echo "$as_me: failed program was:" >&5
1740   cat conftest.$ac_ext >&5
1741   # Broken: fails on valid input.
1742 continue
1743 fi
1744 rm -f conftest.err conftest.$ac_ext
1745
1746   # OK, works on sane cases.  Now check whether non-existent headers
1747   # can be detected and how.
1748   cat >conftest.$ac_ext <<_ACEOF
1749 #line 1749 "configure"
1750 #include "confdefs.h"
1751 #include <ac_nonexistent.h>
1752 _ACEOF
1753 if { (eval echo "$as_me:1753: \"$ac_cpp conftest.$ac_ext\"") >&5
1754   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
1755   ac_status=$?
1756   egrep -v '^ *\+' conftest.er1 >conftest.err
1757   rm -f conftest.er1
1758   cat conftest.err >&5
1759   echo "$as_me:1759: \$? = $ac_status" >&5
1760   (exit $ac_status); } >/dev/null; then
1761   if test -s conftest.err; then
1762     ac_cpp_err=$ac_c_preproc_warn_flag
1763   else
1764     ac_cpp_err=
1765   fi
1766 else
1767   ac_cpp_err=yes
1768 fi
1769 if test -z "$ac_cpp_err"; then
1770   # Broken: success on invalid input.
1771 continue
1772 else
1773   echo "$as_me: failed program was:" >&5
1774   cat conftest.$ac_ext >&5
1775   # Passes both tests.
1776 ac_preproc_ok=:
1777 break
1778 fi
1779 rm -f conftest.err conftest.$ac_ext
1780
1781 done
1782 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
1783 rm -f conftest.err conftest.$ac_ext
1784 if $ac_preproc_ok; then
1785   break
1786 fi
1787
1788     done
1789     ac_cv_prog_CPP=$CPP
1790
1791 fi
1792   CPP=$ac_cv_prog_CPP
1793 else
1794   ac_cv_prog_CPP=$CPP
1795 fi
1796 echo "$as_me:1796: result: $CPP" >&5
1797 echo "${ECHO_T}$CPP" >&6
1798 ac_preproc_ok=false
1799 for ac_c_preproc_warn_flag in '' yes
1800 do
1801   # Use a header file that comes with gcc, so configuring glibc
1802   # with a fresh cross-compiler works.
1803   # On the NeXT, cc -E runs the code through the compiler's parser,
1804   # not just through cpp. "Syntax error" is here to catch this case.
1805   cat >conftest.$ac_ext <<_ACEOF
1806 #line 1806 "configure"
1807 #include "confdefs.h"
1808 #include <assert.h>
1809                      Syntax error
1810 _ACEOF
1811 if { (eval echo "$as_me:1811: \"$ac_cpp conftest.$ac_ext\"") >&5
1812   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
1813   ac_status=$?
1814   egrep -v '^ *\+' conftest.er1 >conftest.err
1815   rm -f conftest.er1
1816   cat conftest.err >&5
1817   echo "$as_me:1817: \$? = $ac_status" >&5
1818   (exit $ac_status); } >/dev/null; then
1819   if test -s conftest.err; then
1820     ac_cpp_err=$ac_c_preproc_warn_flag
1821   else
1822     ac_cpp_err=
1823   fi
1824 else
1825   ac_cpp_err=yes
1826 fi
1827 if test -z "$ac_cpp_err"; then
1828   :
1829 else
1830   echo "$as_me: failed program was:" >&5
1831   cat conftest.$ac_ext >&5
1832   # Broken: fails on valid input.
1833 continue
1834 fi
1835 rm -f conftest.err conftest.$ac_ext
1836
1837   # OK, works on sane cases.  Now check whether non-existent headers
1838   # can be detected and how.
1839   cat >conftest.$ac_ext <<_ACEOF
1840 #line 1840 "configure"
1841 #include "confdefs.h"
1842 #include <ac_nonexistent.h>
1843 _ACEOF
1844 if { (eval echo "$as_me:1844: \"$ac_cpp conftest.$ac_ext\"") >&5
1845   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
1846   ac_status=$?
1847   egrep -v '^ *\+' conftest.er1 >conftest.err
1848   rm -f conftest.er1
1849   cat conftest.err >&5
1850   echo "$as_me:1850: \$? = $ac_status" >&5
1851   (exit $ac_status); } >/dev/null; then
1852   if test -s conftest.err; then
1853     ac_cpp_err=$ac_c_preproc_warn_flag
1854   else
1855     ac_cpp_err=
1856   fi
1857 else
1858   ac_cpp_err=yes
1859 fi
1860 if test -z "$ac_cpp_err"; then
1861   # Broken: success on invalid input.
1862 continue
1863 else
1864   echo "$as_me: failed program was:" >&5
1865   cat conftest.$ac_ext >&5
1866   # Passes both tests.
1867 ac_preproc_ok=:
1868 break
1869 fi
1870 rm -f conftest.err conftest.$ac_ext
1871
1872 done
1873 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
1874 rm -f conftest.err conftest.$ac_ext
1875 if $ac_preproc_ok; then
1876   :
1877 else
1878   { { echo "$as_me:1878: error: C preprocessor \"$CPP\" fails sanity check" >&5
1879 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
1880    { (exit 1); exit 1; }; }
1881 fi
1882
1883 ac_ext=c
1884 ac_cpp='$CPP $CPPFLAGS'
1885 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1886 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1887 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1888 ac_main_return=return
1889
1890 if test $ac_cv_c_compiler_gnu = yes; then
1891     echo "$as_me:1891: checking whether $CC needs -traditional" >&5
1892 echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
1893 if test "${ac_cv_prog_gcc_traditional+set}" = set; then
1894   echo $ECHO_N "(cached) $ECHO_C" >&6
1895 else
1896     ac_pattern="Autoconf.*'x'"
1897   cat >conftest.$ac_ext <<_ACEOF
1898 #line 1898 "configure"
1899 #include "confdefs.h"
1900 #include <sgtty.h>
1901 int Autoconf = TIOCGETP;
1902 _ACEOF
1903 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1904   egrep "$ac_pattern" >/dev/null 2>&1; then
1905   ac_cv_prog_gcc_traditional=yes
1906 else
1907   ac_cv_prog_gcc_traditional=no
1908 fi
1909 rm -rf conftest*
1910
1911   if test $ac_cv_prog_gcc_traditional = no; then
1912     cat >conftest.$ac_ext <<_ACEOF
1913 #line 1913 "configure"
1914 #include "confdefs.h"
1915 #include <termio.h>
1916 int Autoconf = TCGETA;
1917 _ACEOF
1918 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1919   egrep "$ac_pattern" >/dev/null 2>&1; then
1920   ac_cv_prog_gcc_traditional=yes
1921 fi
1922 rm -rf conftest*
1923
1924   fi
1925 fi
1926 echo "$as_me:1926: result: $ac_cv_prog_gcc_traditional" >&5
1927 echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
1928   if test $ac_cv_prog_gcc_traditional = yes; then
1929     CC="$CC -traditional"
1930   fi
1931 fi
1932
1933 echo "$as_me:1933: checking whether $CC understands -c and -o together" >&5
1934 echo $ECHO_N "checking whether $CC understands -c and -o together... $ECHO_C" >&6
1935 if test "${cf_cv_prog_CC_c_o+set}" = set; then
1936   echo $ECHO_N "(cached) $ECHO_C" >&6
1937 else
1938
1939 cat > conftest.$ac_ext <<CF_EOF
1940 #include <stdio.h>
1941 int main()
1942 {
1943         ${cf_cv_main_return:-return}(0);
1944 }
1945 CF_EOF
1946 # We do the test twice because some compilers refuse to overwrite an
1947 # existing .o file with -o, though they will create one.
1948 ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
1949 if { (eval echo "$as_me:1949: \"$ac_try\"") >&5
1950   (eval $ac_try) 2>&5
1951   ac_status=$?
1952   echo "$as_me:1952: \$? = $ac_status" >&5
1953   (exit $ac_status); } &&
1954   test -f conftest2.$ac_objext && { (eval echo "$as_me:1954: \"$ac_try\"") >&5
1955   (eval $ac_try) 2>&5
1956   ac_status=$?
1957   echo "$as_me:1957: \$? = $ac_status" >&5
1958   (exit $ac_status); };
1959 then
1960   eval cf_cv_prog_CC_c_o=yes
1961 else
1962   eval cf_cv_prog_CC_c_o=no
1963 fi
1964 rm -rf conftest*
1965
1966 fi
1967 if test $cf_cv_prog_CC_c_o = yes; then
1968   echo "$as_me:1968: result: yes" >&5
1969 echo "${ECHO_T}yes" >&6
1970 else
1971   echo "$as_me:1971: result: no" >&5
1972 echo "${ECHO_T}no" >&6
1973 fi
1974
1975 echo "$as_me:1975: checking for POSIXized ISC" >&5
1976 echo $ECHO_N "checking for POSIXized ISC... $ECHO_C" >&6
1977 if test -d /etc/conf/kconfig.d &&
1978    grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
1979 then
1980   echo "$as_me:1980: result: yes" >&5
1981 echo "${ECHO_T}yes" >&6
1982   ISC=yes # If later tests want to check for ISC.
1983
1984 cat >>confdefs.h <<\EOF
1985 #define _POSIX_SOURCE 1
1986 EOF
1987
1988   if test "$GCC" = yes; then
1989     CC="$CC -posix"
1990   else
1991     CC="$CC -Xp"
1992   fi
1993 else
1994   echo "$as_me:1994: result: no" >&5
1995 echo "${ECHO_T}no" >&6
1996   ISC=
1997 fi
1998
1999 # This should have been defined by AC_PROG_CC
2000 : ${CC:=cc}
2001
2002 # Check for user's environment-breakage by stuffing CFLAGS/CPPFLAGS content
2003 # into CC.  This will not help with broken scripts that wrap the compiler with
2004 # options, but eliminates a more common category of user confusion.
2005 echo "$as_me:2005: checking \$CC variable" >&5
2006 echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
2007 case "$CC" in #(vi
2008 *[\ \   ]-[IUD]*)
2009         echo "$as_me:2009: result: broken" >&5
2010 echo "${ECHO_T}broken" >&6
2011         { echo "$as_me:2011: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
2012 echo "$as_me: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
2013         # humor him...
2014         cf_flags=`echo "$CC" | sed -e 's/^[^    ]*[     ]//'`
2015         CC=`echo "$CC" | sed -e 's/[    ].*//'`
2016
2017 cf_fix_cppflags=no
2018 cf_new_cflags=
2019 cf_new_cppflags=
2020 cf_new_extra_cppflags=
2021
2022 for cf_add_cflags in $cf_flags
2023 do
2024 case $cf_fix_cppflags in
2025 no)
2026         case $cf_add_cflags in #(vi
2027         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2028                 case $cf_add_cflags in
2029                 -D*)
2030                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2031
2032                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2033                                 && test -z "${cf_tst_cflags}" \
2034                                 && cf_fix_cppflags=yes
2035
2036                         if test $cf_fix_cppflags = yes ; then
2037                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2038                                 continue
2039                         elif test "${cf_tst_cflags}" = "\"'" ; then
2040                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2041                                 continue
2042                         fi
2043                         ;;
2044                 esac
2045                 case "$CPPFLAGS" in
2046                 *$cf_add_cflags) #(vi
2047                         ;;
2048                 *) #(vi
2049                         case $cf_add_cflags in #(vi
2050                         -D*)
2051                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2052
2053 CPPFLAGS=`echo "$CPPFLAGS" | \
2054         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2055                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2056
2057                                 ;;
2058                         esac
2059                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2060                         ;;
2061                 esac
2062                 ;;
2063         *)
2064                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2065                 ;;
2066         esac
2067         ;;
2068 yes)
2069         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2070
2071         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2072
2073         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2074                 && test -z "${cf_tst_cflags}" \
2075                 && cf_fix_cppflags=no
2076         ;;
2077 esac
2078 done
2079
2080 if test -n "$cf_new_cflags" ; then
2081
2082         CFLAGS="$CFLAGS $cf_new_cflags"
2083 fi
2084
2085 if test -n "$cf_new_cppflags" ; then
2086
2087         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
2088 fi
2089
2090 if test -n "$cf_new_extra_cppflags" ; then
2091
2092         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2093 fi
2094
2095         ;;
2096 *)
2097         echo "$as_me:2097: result: ok" >&5
2098 echo "${ECHO_T}ok" >&6
2099         ;;
2100 esac
2101
2102 echo "$as_me:2102: checking for ${CC:-cc} option to accept ANSI C" >&5
2103 echo $ECHO_N "checking for ${CC:-cc} option to accept ANSI C... $ECHO_C" >&6
2104 if test "${cf_cv_ansi_cc+set}" = set; then
2105   echo $ECHO_N "(cached) $ECHO_C" >&6
2106 else
2107
2108 cf_cv_ansi_cc=no
2109 cf_save_CFLAGS="$CFLAGS"
2110 cf_save_CPPFLAGS="$CPPFLAGS"
2111 # Don't try gcc -ansi; that turns off useful extensions and
2112 # breaks some systems' header files.
2113 # AIX                   -qlanglvl=ansi
2114 # Ultrix and OSF/1      -std1
2115 # HP-UX                 -Aa -D_HPUX_SOURCE
2116 # SVR4                  -Xc
2117 # UnixWare 1.2          (cannot use -Xc, since ANSI/POSIX clashes)
2118 for cf_arg in "-DCC_HAS_PROTOS" \
2119         "" \
2120         -qlanglvl=ansi \
2121         -std1 \
2122         -Ae \
2123         "-Aa -D_HPUX_SOURCE" \
2124         -Xc
2125 do
2126
2127 cf_fix_cppflags=no
2128 cf_new_cflags=
2129 cf_new_cppflags=
2130 cf_new_extra_cppflags=
2131
2132 for cf_add_cflags in $cf_arg
2133 do
2134 case $cf_fix_cppflags in
2135 no)
2136         case $cf_add_cflags in #(vi
2137         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2138                 case $cf_add_cflags in
2139                 -D*)
2140                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2141
2142                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2143                                 && test -z "${cf_tst_cflags}" \
2144                                 && cf_fix_cppflags=yes
2145
2146                         if test $cf_fix_cppflags = yes ; then
2147                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2148                                 continue
2149                         elif test "${cf_tst_cflags}" = "\"'" ; then
2150                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2151                                 continue
2152                         fi
2153                         ;;
2154                 esac
2155                 case "$CPPFLAGS" in
2156                 *$cf_add_cflags) #(vi
2157                         ;;
2158                 *) #(vi
2159                         case $cf_add_cflags in #(vi
2160                         -D*)
2161                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2162
2163 CPPFLAGS=`echo "$CPPFLAGS" | \
2164         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2165                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2166
2167                                 ;;
2168                         esac
2169                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2170                         ;;
2171                 esac
2172                 ;;
2173         *)
2174                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2175                 ;;
2176         esac
2177         ;;
2178 yes)
2179         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2180
2181         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2182
2183         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2184                 && test -z "${cf_tst_cflags}" \
2185                 && cf_fix_cppflags=no
2186         ;;
2187 esac
2188 done
2189
2190 if test -n "$cf_new_cflags" ; then
2191
2192         CFLAGS="$CFLAGS $cf_new_cflags"
2193 fi
2194
2195 if test -n "$cf_new_cppflags" ; then
2196
2197         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
2198 fi
2199
2200 if test -n "$cf_new_extra_cppflags" ; then
2201
2202         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2203 fi
2204
2205         cat >conftest.$ac_ext <<_ACEOF
2206 #line 2206 "configure"
2207 #include "confdefs.h"
2208
2209 #ifndef CC_HAS_PROTOS
2210 #if !defined(__STDC__) || (__STDC__ != 1)
2211 choke me
2212 #endif
2213 #endif
2214
2215 int
2216 main ()
2217 {
2218
2219         int test (int i, double x);
2220         struct s1 {int (*f) (int a);};
2221         struct s2 {int (*f) (double a);};
2222   ;
2223   return 0;
2224 }
2225 _ACEOF
2226 rm -f conftest.$ac_objext
2227 if { (eval echo "$as_me:2227: \"$ac_compile\"") >&5
2228   (eval $ac_compile) 2>&5
2229   ac_status=$?
2230   echo "$as_me:2230: \$? = $ac_status" >&5
2231   (exit $ac_status); } &&
2232          { ac_try='test -s conftest.$ac_objext'
2233   { (eval echo "$as_me:2233: \"$ac_try\"") >&5
2234   (eval $ac_try) 2>&5
2235   ac_status=$?
2236   echo "$as_me:2236: \$? = $ac_status" >&5
2237   (exit $ac_status); }; }; then
2238   cf_cv_ansi_cc="$cf_arg"; break
2239 else
2240   echo "$as_me: failed program was:" >&5
2241 cat conftest.$ac_ext >&5
2242 fi
2243 rm -f conftest.$ac_objext conftest.$ac_ext
2244 done
2245 CFLAGS="$cf_save_CFLAGS"
2246 CPPFLAGS="$cf_save_CPPFLAGS"
2247
2248 fi
2249 echo "$as_me:2249: result: $cf_cv_ansi_cc" >&5
2250 echo "${ECHO_T}$cf_cv_ansi_cc" >&6
2251
2252 if test "$cf_cv_ansi_cc" != "no"; then
2253 if test ".$cf_cv_ansi_cc" != ".-DCC_HAS_PROTOS"; then
2254
2255 cf_fix_cppflags=no
2256 cf_new_cflags=
2257 cf_new_cppflags=
2258 cf_new_extra_cppflags=
2259
2260 for cf_add_cflags in $cf_cv_ansi_cc
2261 do
2262 case $cf_fix_cppflags in
2263 no)
2264         case $cf_add_cflags in #(vi
2265         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2266                 case $cf_add_cflags in
2267                 -D*)
2268                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2269
2270                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2271                                 && test -z "${cf_tst_cflags}" \
2272                                 && cf_fix_cppflags=yes
2273
2274                         if test $cf_fix_cppflags = yes ; then
2275                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2276                                 continue
2277                         elif test "${cf_tst_cflags}" = "\"'" ; then
2278                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2279                                 continue
2280                         fi
2281                         ;;
2282                 esac
2283                 case "$CPPFLAGS" in
2284                 *$cf_add_cflags) #(vi
2285                         ;;
2286                 *) #(vi
2287                         case $cf_add_cflags in #(vi
2288                         -D*)
2289                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2290
2291 CPPFLAGS=`echo "$CPPFLAGS" | \
2292         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2293                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2294
2295                                 ;;
2296                         esac
2297                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2298                         ;;
2299                 esac
2300                 ;;
2301         *)
2302                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2303                 ;;
2304         esac
2305         ;;
2306 yes)
2307         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2308
2309         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2310
2311         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2312                 && test -z "${cf_tst_cflags}" \
2313                 && cf_fix_cppflags=no
2314         ;;
2315 esac
2316 done
2317
2318 if test -n "$cf_new_cflags" ; then
2319
2320         CFLAGS="$CFLAGS $cf_new_cflags"
2321 fi
2322
2323 if test -n "$cf_new_cppflags" ; then
2324
2325         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
2326 fi
2327
2328 if test -n "$cf_new_extra_cppflags" ; then
2329
2330         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2331 fi
2332
2333 else
2334         cat >>confdefs.h <<\EOF
2335 #define CC_HAS_PROTOS 1
2336 EOF
2337
2338 fi
2339 fi
2340
2341 if test "$cf_cv_ansi_cc" = "no"; then
2342         { { echo "$as_me:2342: error: Your compiler does not appear to recognize prototypes.
2343 You have the following choices:
2344         a. adjust your compiler options
2345         b. get an up-to-date compiler
2346         c. use a wrapper such as unproto" >&5
2347 echo "$as_me: error: Your compiler does not appear to recognize prototypes.
2348 You have the following choices:
2349         a. adjust your compiler options
2350         b. get an up-to-date compiler
2351         c. use a wrapper such as unproto" >&2;}
2352    { (exit 1); exit 1; }; }
2353 fi
2354
2355 case $cf_cv_system_name in
2356 os2*)
2357     CFLAGS="$CFLAGS -Zmt"
2358     CPPFLAGS="$CPPFLAGS -D__ST_MT_ERRNO__"
2359     CXXFLAGS="$CXXFLAGS -Zmt"
2360     # autoconf's macro sets -Zexe and suffix both, which conflict:w
2361     LDFLAGS="$LDFLAGS -Zmt -Zcrtdll"
2362     ac_cv_exeext=.exe
2363     ;;
2364 esac
2365
2366 PROG_EXT="$EXEEXT"
2367
2368 test -n "$PROG_EXT" && cat >>confdefs.h <<EOF
2369 #define PROG_EXT "$PROG_EXT"
2370 EOF
2371
2372 test "$program_prefix" != NONE &&
2373   program_transform_name="s,^,$program_prefix,;$program_transform_name"
2374 # Use a double $ so make ignores it.
2375 test "$program_suffix" != NONE &&
2376   program_transform_name="s,\$,$program_suffix,;$program_transform_name"
2377 # Double any \ or $.  echo might interpret backslashes.
2378 # By default was `s,x,x', remove it if useless.
2379 cat <<\_ACEOF >conftest.sed
2380 s/[\\$]/&&/g;s/;s,x,x,$//
2381 _ACEOF
2382 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
2383 rm conftest.sed
2384
2385 for ac_prog in mawk gawk nawk awk
2386 do
2387   # Extract the first word of "$ac_prog", so it can be a program name with args.
2388 set dummy $ac_prog; ac_word=$2
2389 echo "$as_me:2389: checking for $ac_word" >&5
2390 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2391 if test "${ac_cv_prog_AWK+set}" = set; then
2392   echo $ECHO_N "(cached) $ECHO_C" >&6
2393 else
2394   if test -n "$AWK"; then
2395   ac_cv_prog_AWK="$AWK" # Let the user override the test.
2396 else
2397   ac_save_IFS=$IFS; IFS=$ac_path_separator
2398 ac_dummy="$PATH"
2399 for ac_dir in $ac_dummy; do
2400   IFS=$ac_save_IFS
2401   test -z "$ac_dir" && ac_dir=.
2402   $as_executable_p "$ac_dir/$ac_word" || continue
2403 ac_cv_prog_AWK="$ac_prog"
2404 echo "$as_me:2404: found $ac_dir/$ac_word" >&5
2405 break
2406 done
2407
2408 fi
2409 fi
2410 AWK=$ac_cv_prog_AWK
2411 if test -n "$AWK"; then
2412   echo "$as_me:2412: result: $AWK" >&5
2413 echo "${ECHO_T}$AWK" >&6
2414 else
2415   echo "$as_me:2415: result: no" >&5
2416 echo "${ECHO_T}no" >&6
2417 fi
2418
2419   test -n "$AWK" && break
2420 done
2421
2422 test -z "$AWK" && { { echo "$as_me:2422: error: No awk program found" >&5
2423 echo "$as_me: error: No awk program found" >&2;}
2424    { (exit 1); exit 1; }; }
2425
2426 echo "$as_me:2426: checking for egrep" >&5
2427 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
2428 if test "${ac_cv_prog_egrep+set}" = set; then
2429   echo $ECHO_N "(cached) $ECHO_C" >&6
2430 else
2431   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
2432     then ac_cv_prog_egrep='grep -E'
2433     else ac_cv_prog_egrep='egrep'
2434     fi
2435 fi
2436 echo "$as_me:2436: result: $ac_cv_prog_egrep" >&5
2437 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
2438  EGREP=$ac_cv_prog_egrep
2439
2440 test -z "$EGREP" && { { echo "$as_me:2440: error: No egrep program found" >&5
2441 echo "$as_me: error: No egrep program found" >&2;}
2442    { (exit 1); exit 1; }; }
2443
2444 # Find a good install program.  We prefer a C program (faster),
2445 # so one script is as good as another.  But avoid the broken or
2446 # incompatible versions:
2447 # SysV /etc/install, /usr/sbin/install
2448 # SunOS /usr/etc/install
2449 # IRIX /sbin/install
2450 # AIX /bin/install
2451 # AmigaOS /C/install, which installs bootblocks on floppy discs
2452 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2453 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2454 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2455 # ./install, which can be erroneously created by make from ./install.sh.
2456 echo "$as_me:2456: checking for a BSD compatible install" >&5
2457 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
2458 if test -z "$INSTALL"; then
2459 if test "${ac_cv_path_install+set}" = set; then
2460   echo $ECHO_N "(cached) $ECHO_C" >&6
2461 else
2462     ac_save_IFS=$IFS; IFS=$ac_path_separator
2463   for ac_dir in $PATH; do
2464     IFS=$ac_save_IFS
2465     # Account for people who put trailing slashes in PATH elements.
2466     case $ac_dir/ in
2467     / | ./ | .// | /cC/* \
2468     | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
2469     | /usr/ucb/* ) ;;
2470     *)
2471       # OSF1 and SCO ODT 3.0 have their own names for install.
2472       # Don't use installbsd from OSF since it installs stuff as root
2473       # by default.
2474       for ac_prog in ginstall scoinst install; do
2475         if $as_executable_p "$ac_dir/$ac_prog"; then
2476           if test $ac_prog = install &&
2477             grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2478             # AIX install.  It has an incompatible calling convention.
2479             :
2480           elif test $ac_prog = install &&
2481             grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2482             # program-specific install script used by HP pwplus--don't use.
2483             :
2484           else
2485             ac_cv_path_install="$ac_dir/$ac_prog -c"
2486             break 2
2487           fi
2488         fi
2489       done
2490       ;;
2491     esac
2492   done
2493
2494 fi
2495   if test "${ac_cv_path_install+set}" = set; then
2496     INSTALL=$ac_cv_path_install
2497   else
2498     # As a last resort, use the slow shell script.  We don't cache a
2499     # path for INSTALL within a source directory, because that will
2500     # break other packages using the cache if that directory is
2501     # removed, or if the path is relative.
2502     INSTALL=$ac_install_sh
2503   fi
2504 fi
2505 echo "$as_me:2505: result: $INSTALL" >&5
2506 echo "${ECHO_T}$INSTALL" >&6
2507
2508 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2509 # It thinks the first close brace ends the variable substitution.
2510 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2511
2512 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
2513
2514 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2515
2516 echo "$as_me:2516: checking whether ln -s works" >&5
2517 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
2518 LN_S=$as_ln_s
2519 if test "$LN_S" = "ln -s"; then
2520   echo "$as_me:2520: result: yes" >&5
2521 echo "${ECHO_T}yes" >&6
2522 else
2523   echo "$as_me:2523: result: no, using $LN_S" >&5
2524 echo "${ECHO_T}no, using $LN_S" >&6
2525 fi
2526
2527 echo "$as_me:2527: checking if $LN_S -f options work" >&5
2528 echo $ECHO_N "checking if $LN_S -f options work... $ECHO_C" >&6
2529
2530 rm -f conf$$.src conf$$dst
2531 echo >conf$$.dst
2532 echo first >conf$$.src
2533 if $LN_S -f conf$$.src conf$$.dst 2>/dev/null; then
2534         cf_prog_ln_sf=yes
2535 else
2536         cf_prog_ln_sf=no
2537 fi
2538 rm -f conf$$.dst conf$$src
2539 echo "$as_me:2539: result: $cf_prog_ln_sf" >&5
2540 echo "${ECHO_T}$cf_prog_ln_sf" >&6
2541
2542 test "$cf_prog_ln_sf" = yes && LN_S="$LN_S -f"
2543
2544 echo "$as_me:2544: checking for long file names" >&5
2545 echo $ECHO_N "checking for long file names... $ECHO_C" >&6
2546 if test "${ac_cv_sys_long_file_names+set}" = set; then
2547   echo $ECHO_N "(cached) $ECHO_C" >&6
2548 else
2549   ac_cv_sys_long_file_names=yes
2550 # Test for long file names in all the places we know might matter:
2551 #      .                the current directory, where building will happen
2552 #      $prefix/lib      where we will be installing things
2553 #      $exec_prefix/lib likewise
2554 # eval it to expand exec_prefix.
2555 #      $TMPDIR          if set, where it might want to write temporary files
2556 # if $TMPDIR is not set:
2557 #      /tmp             where it might want to write temporary files
2558 #      /var/tmp         likewise
2559 #      /usr/tmp         likewise
2560 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
2561   ac_tmpdirs=$TMPDIR
2562 else
2563   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
2564 fi
2565 for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
2566   test -d $ac_dir || continue
2567   test -w $ac_dir || continue # It is less confusing to not echo anything here.
2568   ac_xdir=$ac_dir/cf$$
2569   (umask 077 && mkdir $ac_xdir 2>/dev/null) || continue
2570   ac_tf1=$ac_xdir/conftest9012345
2571   ac_tf2=$ac_xdir/conftest9012346
2572   (echo 1 >$ac_tf1) 2>/dev/null
2573   (echo 2 >$ac_tf2) 2>/dev/null
2574   ac_val=`cat $ac_tf1 2>/dev/null`
2575   if test ! -f $ac_tf1 || test "$ac_val" != 1; then
2576     ac_cv_sys_long_file_names=no
2577     rm -rf $ac_xdir 2>/dev/null
2578     break
2579   fi
2580   rm -rf $ac_xdir 2>/dev/null
2581 done
2582 fi
2583 echo "$as_me:2583: result: $ac_cv_sys_long_file_names" >&5
2584 echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
2585 if test $ac_cv_sys_long_file_names = yes; then
2586
2587 cat >>confdefs.h <<\EOF
2588 #define HAVE_LONG_FILE_NAMES 1
2589 EOF
2590
2591 fi
2592
2593 # if we find pkg-config, check if we should install the ".pc" files.
2594
2595 echo "$as_me:2595: checking if you want to use pkg-config" >&5
2596 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
2597
2598 # Check whether --with-pkg-config or --without-pkg-config was given.
2599 if test "${with_pkg_config+set}" = set; then
2600   withval="$with_pkg_config"
2601   cf_pkg_config=$withval
2602 else
2603   cf_pkg_config=yes
2604 fi;
2605 echo "$as_me:2605: result: $cf_pkg_config" >&5
2606 echo "${ECHO_T}$cf_pkg_config" >&6
2607
2608 case $cf_pkg_config in #(vi
2609 no) #(vi
2610         PKG_CONFIG=none
2611         ;;
2612 yes) #(vi
2613
2614 if test -n "$ac_tool_prefix"; then
2615   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
2616 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
2617 echo "$as_me:2617: checking for $ac_word" >&5
2618 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2619 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
2620   echo $ECHO_N "(cached) $ECHO_C" >&6
2621 else
2622   case $PKG_CONFIG in
2623   [\\/]* | ?:[\\/]*)
2624   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
2625   ;;
2626   *)
2627   ac_save_IFS=$IFS; IFS=$ac_path_separator
2628 ac_dummy="$PATH"
2629 for ac_dir in $ac_dummy; do
2630   IFS=$ac_save_IFS
2631   test -z "$ac_dir" && ac_dir=.
2632   if $as_executable_p "$ac_dir/$ac_word"; then
2633    ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
2634    echo "$as_me:2634: found $ac_dir/$ac_word" >&5
2635    break
2636 fi
2637 done
2638
2639   ;;
2640 esac
2641 fi
2642 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
2643
2644 if test -n "$PKG_CONFIG"; then
2645   echo "$as_me:2645: result: $PKG_CONFIG" >&5
2646 echo "${ECHO_T}$PKG_CONFIG" >&6
2647 else
2648   echo "$as_me:2648: result: no" >&5
2649 echo "${ECHO_T}no" >&6
2650 fi
2651
2652 fi
2653 if test -z "$ac_cv_path_PKG_CONFIG"; then
2654   ac_pt_PKG_CONFIG=$PKG_CONFIG
2655   # Extract the first word of "pkg-config", so it can be a program name with args.
2656 set dummy pkg-config; ac_word=$2
2657 echo "$as_me:2657: checking for $ac_word" >&5
2658 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2659 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
2660   echo $ECHO_N "(cached) $ECHO_C" >&6
2661 else
2662   case $ac_pt_PKG_CONFIG in
2663   [\\/]* | ?:[\\/]*)
2664   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
2665   ;;
2666   *)
2667   ac_save_IFS=$IFS; IFS=$ac_path_separator
2668 ac_dummy="$PATH"
2669 for ac_dir in $ac_dummy; do
2670   IFS=$ac_save_IFS
2671   test -z "$ac_dir" && ac_dir=.
2672   if $as_executable_p "$ac_dir/$ac_word"; then
2673    ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
2674    echo "$as_me:2674: found $ac_dir/$ac_word" >&5
2675    break
2676 fi
2677 done
2678
2679   test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
2680   ;;
2681 esac
2682 fi
2683 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
2684
2685 if test -n "$ac_pt_PKG_CONFIG"; then
2686   echo "$as_me:2686: result: $ac_pt_PKG_CONFIG" >&5
2687 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
2688 else
2689   echo "$as_me:2689: result: no" >&5
2690 echo "${ECHO_T}no" >&6
2691 fi
2692
2693   PKG_CONFIG=$ac_pt_PKG_CONFIG
2694 else
2695   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
2696 fi
2697
2698         ;;
2699 *)
2700         PKG_CONFIG=$withval
2701         ;;
2702 esac
2703
2704 test -z "$PKG_CONFIG" && PKG_CONFIG=none
2705 if test "$PKG_CONFIG" != none ; then
2706
2707 if test "x$prefix" != xNONE; then
2708   cf_path_syntax="$prefix"
2709 else
2710   cf_path_syntax="$ac_default_prefix"
2711 fi
2712
2713 case ".$PKG_CONFIG" in #(vi
2714 .\$\(*\)*|.\'*\'*) #(vi
2715   ;;
2716 ..|./*|.\\*) #(vi
2717   ;;
2718 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
2719   ;;
2720 .\${*prefix}*|.\${*dir}*) #(vi
2721   eval PKG_CONFIG="$PKG_CONFIG"
2722   case ".$PKG_CONFIG" in #(vi
2723   .NONE/*)
2724     PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
2725     ;;
2726   esac
2727   ;; #(vi
2728 .no|.NONE/*)
2729   PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
2730   ;;
2731 *)
2732   { { echo "$as_me:2732: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
2733 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
2734    { (exit 1); exit 1; }; }
2735   ;;
2736 esac
2737
2738 fi
2739
2740 if test "$PKG_CONFIG" != none ; then
2741         echo "$as_me:2741: checking for $PKG_CONFIG library directory" >&5
2742 echo $ECHO_N "checking for $PKG_CONFIG library directory... $ECHO_C" >&6
2743
2744 # Check whether --with-pkg-config-libdir or --without-pkg-config-libdir was given.
2745 if test "${with_pkg_config_libdir+set}" = set; then
2746   withval="$with_pkg_config_libdir"
2747   PKG_CONFIG_LIBDIR=$withval
2748 else
2749   PKG_CONFIG_LIBDIR=yes
2750 fi;
2751
2752         case x$PKG_CONFIG_LIBDIR in #(vi
2753         x/*) #(vi
2754                 ;;
2755         xyes) #(vi
2756                 # look for the library directory using the same prefix as the executable
2757                 cf_path=`echo "$PKG_CONFIG" | sed -e 's,/[^/]*/[^/]*$,,'`
2758                 case x`(arch) 2>/dev/null` in #(vi
2759                 *64) #(vi
2760                         for cf_config in $cf_path/share $cf_path/lib64 $cf_path/lib32 $cf_path/lib
2761                         do
2762                                 if test -d $cf_config/pkgconfig
2763                                 then
2764                                         PKG_CONFIG_LIBDIR=$cf_config/pkgconfig
2765                                         break
2766                                 fi
2767                         done
2768                         ;;
2769                 *)
2770                         PKG_CONFIG_LIBDIR=$cf_path/lib/pkgconfig
2771                         ;;
2772                 esac
2773                 ;;
2774         *)
2775                 ;;
2776         esac
2777
2778         echo "$as_me:2778: result: $PKG_CONFIG_LIBDIR" >&5
2779 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
2780 fi
2781
2782 if test "$PKG_CONFIG" != none ; then
2783         echo "$as_me:2783: checking if we should install .pc files for $PKG_CONFIG" >&5
2784 echo $ECHO_N "checking if we should install .pc files for $PKG_CONFIG... $ECHO_C" >&6
2785
2786 # Check whether --enable-pc-files or --disable-pc-files was given.
2787 if test "${enable_pc_files+set}" = set; then
2788   enableval="$enable_pc_files"
2789   enable_pc_files=$enableval
2790 else
2791   enable_pc_files=no
2792 fi;
2793         echo "$as_me:2793: result: $enable_pc_files" >&5
2794 echo "${ECHO_T}$enable_pc_files" >&6
2795         if test "$enable_pc_files" != no
2796         then
2797
2798 if test "x$prefix" != xNONE; then
2799   cf_path_syntax="$prefix"
2800 else
2801   cf_path_syntax="$ac_default_prefix"
2802 fi
2803
2804 case ".$PKG_CONFIG_LIBDIR" in #(vi
2805 .\$\(*\)*|.\'*\'*) #(vi
2806   ;;
2807 ..|./*|.\\*) #(vi
2808   ;;
2809 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
2810   ;;
2811 .\${*prefix}*|.\${*dir}*) #(vi
2812   eval PKG_CONFIG_LIBDIR="$PKG_CONFIG_LIBDIR"
2813   case ".$PKG_CONFIG_LIBDIR" in #(vi
2814   .NONE/*)
2815     PKG_CONFIG_LIBDIR=`echo $PKG_CONFIG_LIBDIR | sed -e s%NONE%$cf_path_syntax%`
2816     ;;
2817   esac
2818   ;; #(vi
2819 .no|.NONE/*)
2820   PKG_CONFIG_LIBDIR=`echo $PKG_CONFIG_LIBDIR | sed -e s%NONE%$cf_path_syntax%`
2821   ;;
2822 *)
2823   { { echo "$as_me:2823: error: expected a pathname, not \"$PKG_CONFIG_LIBDIR\"" >&5
2824 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG_LIBDIR\"" >&2;}
2825    { (exit 1); exit 1; }; }
2826   ;;
2827 esac
2828
2829         fi
2830 else
2831         enable_pc_files=no
2832 fi
2833
2834 echo "$as_me:2834: checking if you want to build test-programs" >&5
2835 echo $ECHO_N "checking if you want to build test-programs... $ECHO_C" >&6
2836
2837 # Check whether --with-tests or --without-tests was given.
2838 if test "${with_tests+set}" = set; then
2839   withval="$with_tests"
2840   cf_with_tests=$withval
2841 else
2842   cf_with_tests=yes
2843 fi;
2844 echo "$as_me:2844: result: $cf_with_tests" >&5
2845 echo "${ECHO_T}$cf_with_tests" >&6
2846
2847 echo "$as_me:2847: checking if we should assume mixed-case filenames" >&5
2848 echo $ECHO_N "checking if we should assume mixed-case filenames... $ECHO_C" >&6
2849
2850 # Check whether --enable-mixed-case or --disable-mixed-case was given.
2851 if test "${enable_mixed_case+set}" = set; then
2852   enableval="$enable_mixed_case"
2853   enable_mixedcase=$enableval
2854 else
2855   enable_mixedcase=auto
2856 fi;
2857 echo "$as_me:2857: result: $enable_mixedcase" >&5
2858 echo "${ECHO_T}$enable_mixedcase" >&6
2859 if test "$enable_mixedcase" = "auto" ; then
2860
2861 echo "$as_me:2861: checking if filesystem supports mixed-case filenames" >&5
2862 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
2863 if test "${cf_cv_mixedcase+set}" = set; then
2864   echo $ECHO_N "(cached) $ECHO_C" >&6
2865 else
2866
2867 if test "$cross_compiling" = yes ; then
2868         case $target_alias in #(vi
2869         *-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-mingw32*|*-uwin*) #(vi
2870                 cf_cv_mixedcase=no
2871                 ;;
2872         *)
2873                 cf_cv_mixedcase=yes
2874                 ;;
2875         esac
2876 else
2877         rm -f conftest CONFTEST
2878         echo test >conftest
2879         if test -f CONFTEST ; then
2880                 cf_cv_mixedcase=no
2881         else
2882                 cf_cv_mixedcase=yes
2883         fi
2884         rm -f conftest CONFTEST
2885 fi
2886
2887 fi
2888 echo "$as_me:2888: result: $cf_cv_mixedcase" >&5
2889 echo "${ECHO_T}$cf_cv_mixedcase" >&6
2890 test "$cf_cv_mixedcase" = yes && cat >>confdefs.h <<\EOF
2891 #define MIXEDCASE_FILENAMES 1
2892 EOF
2893
2894 else
2895     cf_cv_mixedcase=$enable_mixedcase
2896     if test "$enable_mixedcase" = "yes" ; then
2897         cat >>confdefs.h <<\EOF
2898 #define MIXEDCASE_FILENAMES 1
2899 EOF
2900
2901     fi
2902 fi
2903
2904 # do this after mixed-case option (tags/TAGS is not as important as tic).
2905 echo "$as_me:2905: checking whether ${MAKE-make} sets \${MAKE}" >&5
2906 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
2907 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
2908 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
2909   echo $ECHO_N "(cached) $ECHO_C" >&6
2910 else
2911   cat >conftest.make <<\EOF
2912 all:
2913         @echo 'ac_maketemp="${MAKE}"'
2914 EOF
2915 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
2916 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
2917 if test -n "$ac_maketemp"; then
2918   eval ac_cv_prog_make_${ac_make}_set=yes
2919 else
2920   eval ac_cv_prog_make_${ac_make}_set=no
2921 fi
2922 rm -f conftest.make
2923 fi
2924 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
2925   echo "$as_me:2925: result: yes" >&5
2926 echo "${ECHO_T}yes" >&6
2927   SET_MAKE=
2928 else
2929   echo "$as_me:2929: result: no" >&5
2930 echo "${ECHO_T}no" >&6
2931   SET_MAKE="MAKE=${MAKE-make}"
2932 fi
2933
2934 for ac_prog in exctags ctags
2935 do
2936   # Extract the first word of "$ac_prog", so it can be a program name with args.
2937 set dummy $ac_prog; ac_word=$2
2938 echo "$as_me:2938: checking for $ac_word" >&5
2939 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2940 if test "${ac_cv_prog_CTAGS+set}" = set; then
2941   echo $ECHO_N "(cached) $ECHO_C" >&6
2942 else
2943   if test -n "$CTAGS"; then
2944   ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
2945 else
2946   ac_save_IFS=$IFS; IFS=$ac_path_separator
2947 ac_dummy="$PATH"
2948 for ac_dir in $ac_dummy; do
2949   IFS=$ac_save_IFS
2950   test -z "$ac_dir" && ac_dir=.
2951   $as_executable_p "$ac_dir/$ac_word" || continue
2952 ac_cv_prog_CTAGS="$ac_prog"
2953 echo "$as_me:2953: found $ac_dir/$ac_word" >&5
2954 break
2955 done
2956
2957 fi
2958 fi
2959 CTAGS=$ac_cv_prog_CTAGS
2960 if test -n "$CTAGS"; then
2961   echo "$as_me:2961: result: $CTAGS" >&5
2962 echo "${ECHO_T}$CTAGS" >&6
2963 else
2964   echo "$as_me:2964: result: no" >&5
2965 echo "${ECHO_T}no" >&6
2966 fi
2967
2968   test -n "$CTAGS" && break
2969 done
2970
2971 for ac_prog in exetags etags
2972 do
2973   # Extract the first word of "$ac_prog", so it can be a program name with args.
2974 set dummy $ac_prog; ac_word=$2
2975 echo "$as_me:2975: checking for $ac_word" >&5
2976 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2977 if test "${ac_cv_prog_ETAGS+set}" = set; then
2978   echo $ECHO_N "(cached) $ECHO_C" >&6
2979 else
2980   if test -n "$ETAGS"; then
2981   ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
2982 else
2983   ac_save_IFS=$IFS; IFS=$ac_path_separator
2984 ac_dummy="$PATH"
2985 for ac_dir in $ac_dummy; do
2986   IFS=$ac_save_IFS
2987   test -z "$ac_dir" && ac_dir=.
2988   $as_executable_p "$ac_dir/$ac_word" || continue
2989 ac_cv_prog_ETAGS="$ac_prog"
2990 echo "$as_me:2990: found $ac_dir/$ac_word" >&5
2991 break
2992 done
2993
2994 fi
2995 fi
2996 ETAGS=$ac_cv_prog_ETAGS
2997 if test -n "$ETAGS"; then
2998   echo "$as_me:2998: result: $ETAGS" >&5
2999 echo "${ECHO_T}$ETAGS" >&6
3000 else
3001   echo "$as_me:3001: result: no" >&5
3002 echo "${ECHO_T}no" >&6
3003 fi
3004
3005   test -n "$ETAGS" && break
3006 done
3007
3008 # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
3009 set dummy ${CTAGS:-ctags}; 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_MAKE_LOWER_TAGS+set}" = set; then
3013   echo $ECHO_N "(cached) $ECHO_C" >&6
3014 else
3015   if test -n "$MAKE_LOWER_TAGS"; then
3016   ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # 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_MAKE_LOWER_TAGS="yes"
3025 echo "$as_me:3025: found $ac_dir/$ac_word" >&5
3026 break
3027 done
3028
3029   test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
3030 fi
3031 fi
3032 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
3033 if test -n "$MAKE_LOWER_TAGS"; then
3034   echo "$as_me:3034: result: $MAKE_LOWER_TAGS" >&5
3035 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
3036 else
3037   echo "$as_me:3037: result: no" >&5
3038 echo "${ECHO_T}no" >&6
3039 fi
3040
3041 if test "$cf_cv_mixedcase" = yes ; then
3042         # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
3043 set dummy ${ETAGS:-etags}; ac_word=$2
3044 echo "$as_me:3044: checking for $ac_word" >&5
3045 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3046 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
3047   echo $ECHO_N "(cached) $ECHO_C" >&6
3048 else
3049   if test -n "$MAKE_UPPER_TAGS"; then
3050   ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
3051 else
3052   ac_save_IFS=$IFS; IFS=$ac_path_separator
3053 ac_dummy="$PATH"
3054 for ac_dir in $ac_dummy; do
3055   IFS=$ac_save_IFS
3056   test -z "$ac_dir" && ac_dir=.
3057   $as_executable_p "$ac_dir/$ac_word" || continue
3058 ac_cv_prog_MAKE_UPPER_TAGS="yes"
3059 echo "$as_me:3059: found $ac_dir/$ac_word" >&5
3060 break
3061 done
3062
3063   test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
3064 fi
3065 fi
3066 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
3067 if test -n "$MAKE_UPPER_TAGS"; then
3068   echo "$as_me:3068: result: $MAKE_UPPER_TAGS" >&5
3069 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
3070 else
3071   echo "$as_me:3071: result: no" >&5
3072 echo "${ECHO_T}no" >&6
3073 fi
3074
3075 else
3076         MAKE_UPPER_TAGS=no
3077 fi
3078
3079 if test "$MAKE_UPPER_TAGS" = yes ; then
3080         MAKE_UPPER_TAGS=
3081 else
3082         MAKE_UPPER_TAGS="#"
3083 fi
3084
3085 if test "$MAKE_LOWER_TAGS" = yes ; then
3086         MAKE_LOWER_TAGS=
3087 else
3088         MAKE_LOWER_TAGS="#"
3089 fi
3090
3091 echo "$as_me:3091: checking for makeflags variable" >&5
3092 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
3093 if test "${cf_cv_makeflags+set}" = set; then
3094   echo $ECHO_N "(cached) $ECHO_C" >&6
3095 else
3096
3097         cf_cv_makeflags=''
3098         for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
3099         do
3100                 cat >cf_makeflags.tmp <<CF_EOF
3101 SHELL = /bin/sh
3102 all :
3103         @ echo '.$cf_option'
3104 CF_EOF
3105                 cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp 2>/dev/null | fgrep -v "ing directory" | sed -e 's,[    ]*$,,'`
3106                 case "$cf_result" in
3107                 .*k)
3108                         cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`
3109                         case "$cf_result" in
3110                         .*CC=*) cf_cv_makeflags=
3111                                 ;;
3112                         *)      cf_cv_makeflags=$cf_option
3113                                 ;;
3114                         esac
3115                         break
3116                         ;;
3117                 .-)     ;;
3118                 *)      echo "given option \"$cf_option\", no match \"$cf_result\""
3119                         ;;
3120                 esac
3121         done
3122         rm -f cf_makeflags.tmp
3123
3124 fi
3125 echo "$as_me:3125: result: $cf_cv_makeflags" >&5
3126 echo "${ECHO_T}$cf_cv_makeflags" >&6
3127
3128 if test -n "$ac_tool_prefix"; then
3129   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3130 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3131 echo "$as_me:3131: checking for $ac_word" >&5
3132 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3133 if test "${ac_cv_prog_RANLIB+set}" = set; then
3134   echo $ECHO_N "(cached) $ECHO_C" >&6
3135 else
3136   if test -n "$RANLIB"; then
3137   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3138 else
3139   ac_save_IFS=$IFS; IFS=$ac_path_separator
3140 ac_dummy="$PATH"
3141 for ac_dir in $ac_dummy; do
3142   IFS=$ac_save_IFS
3143   test -z "$ac_dir" && ac_dir=.
3144   $as_executable_p "$ac_dir/$ac_word" || continue
3145 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3146 echo "$as_me:3146: found $ac_dir/$ac_word" >&5
3147 break
3148 done
3149
3150 fi
3151 fi
3152 RANLIB=$ac_cv_prog_RANLIB
3153 if test -n "$RANLIB"; then
3154   echo "$as_me:3154: result: $RANLIB" >&5
3155 echo "${ECHO_T}$RANLIB" >&6
3156 else
3157   echo "$as_me:3157: result: no" >&5
3158 echo "${ECHO_T}no" >&6
3159 fi
3160
3161 fi
3162 if test -z "$ac_cv_prog_RANLIB"; then
3163   ac_ct_RANLIB=$RANLIB
3164   # Extract the first word of "ranlib", so it can be a program name with args.
3165 set dummy ranlib; ac_word=$2
3166 echo "$as_me:3166: checking for $ac_word" >&5
3167 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3168 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
3169   echo $ECHO_N "(cached) $ECHO_C" >&6
3170 else
3171   if test -n "$ac_ct_RANLIB"; then
3172   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
3173 else
3174   ac_save_IFS=$IFS; IFS=$ac_path_separator
3175 ac_dummy="$PATH"
3176 for ac_dir in $ac_dummy; do
3177   IFS=$ac_save_IFS
3178   test -z "$ac_dir" && ac_dir=.
3179   $as_executable_p "$ac_dir/$ac_word" || continue
3180 ac_cv_prog_ac_ct_RANLIB="ranlib"
3181 echo "$as_me:3181: found $ac_dir/$ac_word" >&5
3182 break
3183 done
3184
3185   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
3186 fi
3187 fi
3188 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3189 if test -n "$ac_ct_RANLIB"; then
3190   echo "$as_me:3190: result: $ac_ct_RANLIB" >&5
3191 echo "${ECHO_T}$ac_ct_RANLIB" >&6
3192 else
3193   echo "$as_me:3193: result: no" >&5
3194 echo "${ECHO_T}no" >&6
3195 fi
3196
3197   RANLIB=$ac_ct_RANLIB
3198 else
3199   RANLIB="$ac_cv_prog_RANLIB"
3200 fi
3201
3202 if test -n "$ac_tool_prefix"; then
3203   # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
3204 set dummy ${ac_tool_prefix}ld; ac_word=$2
3205 echo "$as_me:3205: checking for $ac_word" >&5
3206 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3207 if test "${ac_cv_prog_LD+set}" = set; then
3208   echo $ECHO_N "(cached) $ECHO_C" >&6
3209 else
3210   if test -n "$LD"; then
3211   ac_cv_prog_LD="$LD" # Let the user override the test.
3212 else
3213   ac_save_IFS=$IFS; IFS=$ac_path_separator
3214 ac_dummy="$PATH"
3215 for ac_dir in $ac_dummy; do
3216   IFS=$ac_save_IFS
3217   test -z "$ac_dir" && ac_dir=.
3218   $as_executable_p "$ac_dir/$ac_word" || continue
3219 ac_cv_prog_LD="${ac_tool_prefix}ld"
3220 echo "$as_me:3220: found $ac_dir/$ac_word" >&5
3221 break
3222 done
3223
3224 fi
3225 fi
3226 LD=$ac_cv_prog_LD
3227 if test -n "$LD"; then
3228   echo "$as_me:3228: result: $LD" >&5
3229 echo "${ECHO_T}$LD" >&6
3230 else
3231   echo "$as_me:3231: result: no" >&5
3232 echo "${ECHO_T}no" >&6
3233 fi
3234
3235 fi
3236 if test -z "$ac_cv_prog_LD"; then
3237   ac_ct_LD=$LD
3238   # Extract the first word of "ld", so it can be a program name with args.
3239 set dummy ld; ac_word=$2
3240 echo "$as_me:3240: checking for $ac_word" >&5
3241 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3242 if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
3243   echo $ECHO_N "(cached) $ECHO_C" >&6
3244 else
3245   if test -n "$ac_ct_LD"; then
3246   ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
3247 else
3248   ac_save_IFS=$IFS; IFS=$ac_path_separator
3249 ac_dummy="$PATH"
3250 for ac_dir in $ac_dummy; do
3251   IFS=$ac_save_IFS
3252   test -z "$ac_dir" && ac_dir=.
3253   $as_executable_p "$ac_dir/$ac_word" || continue
3254 ac_cv_prog_ac_ct_LD="ld"
3255 echo "$as_me:3255: found $ac_dir/$ac_word" >&5
3256 break
3257 done
3258
3259   test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
3260 fi
3261 fi
3262 ac_ct_LD=$ac_cv_prog_ac_ct_LD
3263 if test -n "$ac_ct_LD"; then
3264   echo "$as_me:3264: result: $ac_ct_LD" >&5
3265 echo "${ECHO_T}$ac_ct_LD" >&6
3266 else
3267   echo "$as_me:3267: result: no" >&5
3268 echo "${ECHO_T}no" >&6
3269 fi
3270
3271   LD=$ac_ct_LD
3272 else
3273   LD="$ac_cv_prog_LD"
3274 fi
3275
3276 if test -n "$ac_tool_prefix"; then
3277   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
3278 set dummy ${ac_tool_prefix}ar; ac_word=$2
3279 echo "$as_me:3279: checking for $ac_word" >&5
3280 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3281 if test "${ac_cv_prog_AR+set}" = set; then
3282   echo $ECHO_N "(cached) $ECHO_C" >&6
3283 else
3284   if test -n "$AR"; then
3285   ac_cv_prog_AR="$AR" # Let the user override the test.
3286 else
3287   ac_save_IFS=$IFS; IFS=$ac_path_separator
3288 ac_dummy="$PATH"
3289 for ac_dir in $ac_dummy; do
3290   IFS=$ac_save_IFS
3291   test -z "$ac_dir" && ac_dir=.
3292   $as_executable_p "$ac_dir/$ac_word" || continue
3293 ac_cv_prog_AR="${ac_tool_prefix}ar"
3294 echo "$as_me:3294: found $ac_dir/$ac_word" >&5
3295 break
3296 done
3297
3298 fi
3299 fi
3300 AR=$ac_cv_prog_AR
3301 if test -n "$AR"; then
3302   echo "$as_me:3302: result: $AR" >&5
3303 echo "${ECHO_T}$AR" >&6
3304 else
3305   echo "$as_me:3305: result: no" >&5
3306 echo "${ECHO_T}no" >&6
3307 fi
3308
3309 fi
3310 if test -z "$ac_cv_prog_AR"; then
3311   ac_ct_AR=$AR
3312   # Extract the first word of "ar", so it can be a program name with args.
3313 set dummy ar; ac_word=$2
3314 echo "$as_me:3314: checking for $ac_word" >&5
3315 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3316 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
3317   echo $ECHO_N "(cached) $ECHO_C" >&6
3318 else
3319   if test -n "$ac_ct_AR"; then
3320   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
3321 else
3322   ac_save_IFS=$IFS; IFS=$ac_path_separator
3323 ac_dummy="$PATH"
3324 for ac_dir in $ac_dummy; do
3325   IFS=$ac_save_IFS
3326   test -z "$ac_dir" && ac_dir=.
3327   $as_executable_p "$ac_dir/$ac_word" || continue
3328 ac_cv_prog_ac_ct_AR="ar"
3329 echo "$as_me:3329: found $ac_dir/$ac_word" >&5
3330 break
3331 done
3332
3333   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
3334 fi
3335 fi
3336 ac_ct_AR=$ac_cv_prog_ac_ct_AR
3337 if test -n "$ac_ct_AR"; then
3338   echo "$as_me:3338: result: $ac_ct_AR" >&5
3339 echo "${ECHO_T}$ac_ct_AR" >&6
3340 else
3341   echo "$as_me:3341: result: no" >&5
3342 echo "${ECHO_T}no" >&6
3343 fi
3344
3345   AR=$ac_ct_AR
3346 else
3347   AR="$ac_cv_prog_AR"
3348 fi
3349
3350 if test -n "$ac_tool_prefix"; then
3351   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
3352 set dummy ${ac_tool_prefix}ar; ac_word=$2
3353 echo "$as_me:3353: checking for $ac_word" >&5
3354 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3355 if test "${ac_cv_prog_AR+set}" = set; then
3356   echo $ECHO_N "(cached) $ECHO_C" >&6
3357 else
3358   if test -n "$AR"; then
3359   ac_cv_prog_AR="$AR" # Let the user override the test.
3360 else
3361   ac_save_IFS=$IFS; IFS=$ac_path_separator
3362 ac_dummy="$PATH"
3363 for ac_dir in $ac_dummy; do
3364   IFS=$ac_save_IFS
3365   test -z "$ac_dir" && ac_dir=.
3366   $as_executable_p "$ac_dir/$ac_word" || continue
3367 ac_cv_prog_AR="${ac_tool_prefix}ar"
3368 echo "$as_me:3368: found $ac_dir/$ac_word" >&5
3369 break
3370 done
3371
3372 fi
3373 fi
3374 AR=$ac_cv_prog_AR
3375 if test -n "$AR"; then
3376   echo "$as_me:3376: result: $AR" >&5
3377 echo "${ECHO_T}$AR" >&6
3378 else
3379   echo "$as_me:3379: result: no" >&5
3380 echo "${ECHO_T}no" >&6
3381 fi
3382
3383 fi
3384 if test -z "$ac_cv_prog_AR"; then
3385   ac_ct_AR=$AR
3386   # Extract the first word of "ar", so it can be a program name with args.
3387 set dummy ar; ac_word=$2
3388 echo "$as_me:3388: checking for $ac_word" >&5
3389 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3390 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
3391   echo $ECHO_N "(cached) $ECHO_C" >&6
3392 else
3393   if test -n "$ac_ct_AR"; then
3394   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
3395 else
3396   ac_save_IFS=$IFS; IFS=$ac_path_separator
3397 ac_dummy="$PATH"
3398 for ac_dir in $ac_dummy; do
3399   IFS=$ac_save_IFS
3400   test -z "$ac_dir" && ac_dir=.
3401   $as_executable_p "$ac_dir/$ac_word" || continue
3402 ac_cv_prog_ac_ct_AR="ar"
3403 echo "$as_me:3403: found $ac_dir/$ac_word" >&5
3404 break
3405 done
3406
3407   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
3408 fi
3409 fi
3410 ac_ct_AR=$ac_cv_prog_ac_ct_AR
3411 if test -n "$ac_ct_AR"; then
3412   echo "$as_me:3412: result: $ac_ct_AR" >&5
3413 echo "${ECHO_T}$ac_ct_AR" >&6
3414 else
3415   echo "$as_me:3415: result: no" >&5
3416 echo "${ECHO_T}no" >&6
3417 fi
3418
3419   AR=$ac_ct_AR
3420 else
3421   AR="$ac_cv_prog_AR"
3422 fi
3423
3424 echo "$as_me:3424: checking for options to update archives" >&5
3425 echo $ECHO_N "checking for options to update archives... $ECHO_C" >&6
3426 if test "${cf_cv_ar_flags+set}" = set; then
3427   echo $ECHO_N "(cached) $ECHO_C" >&6
3428 else
3429
3430         cf_cv_ar_flags=unknown
3431         for cf_ar_flags in -curv curv -crv crv -cqv cqv -rv rv
3432         do
3433
3434                 # check if $ARFLAGS already contains this choice
3435                 if test "x$ARFLAGS" != "x" ; then
3436                         cf_check_ar_flags=`echo "x$ARFLAGS" | sed -e "s/$cf_ar_flags\$//" -e "s/$cf_ar_flags / /"`
3437                         if test "x$ARFLAGS" != "$cf_check_ar_flags" ; then
3438                                 cf_cv_ar_flags=
3439                                 break
3440                         fi
3441                 fi
3442
3443                 rm -f conftest.$ac_cv_objext
3444                 rm -f conftest.a
3445
3446                 cat >conftest.$ac_ext <<EOF
3447 #line 3447 "configure"
3448 int     testdata[3] = { 123, 456, 789 };
3449 EOF
3450                 if { (eval echo "$as_me:3450: \"$ac_compile\"") >&5
3451   (eval $ac_compile) 2>&5
3452   ac_status=$?
3453   echo "$as_me:3453: \$? = $ac_status" >&5
3454   (exit $ac_status); } ; then
3455                         echo "$AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext" >&5
3456                         $AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext 2>&5 1>/dev/null
3457                         if test -f conftest.a ; then
3458                                 cf_cv_ar_flags=$cf_ar_flags
3459                                 break
3460                         fi
3461                 else
3462                         test -n "$verbose" && echo "    cannot compile test-program" 1>&6
3463
3464 echo "${as_me:-configure}:3464: testing cannot compile test-program ..." 1>&5
3465
3466                         break
3467                 fi
3468         done
3469         rm -f conftest.a conftest.$ac_ext conftest.$ac_cv_objext
3470
3471 fi
3472 echo "$as_me:3472: result: $cf_cv_ar_flags" >&5
3473 echo "${ECHO_T}$cf_cv_ar_flags" >&6
3474
3475 if test -n "$ARFLAGS" ; then
3476         if test -n "$cf_cv_ar_flags" ; then
3477                 ARFLAGS="$ARFLAGS $cf_cv_ar_flags"
3478         fi
3479 else
3480         ARFLAGS=$cf_cv_ar_flags
3481 fi
3482
3483 echo "$as_me:3483: checking if you have specified an install-prefix" >&5
3484 echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
3485
3486 # Check whether --with-install-prefix or --without-install-prefix was given.
3487 if test "${with_install_prefix+set}" = set; then
3488   withval="$with_install_prefix"
3489   case "$withval" in #(vi
3490         yes|no) #(vi
3491                 ;;
3492         *)      DESTDIR="$withval"
3493                 ;;
3494         esac
3495 fi;
3496 echo "$as_me:3496: result: $DESTDIR" >&5
3497 echo "${ECHO_T}$DESTDIR" >&6
3498
3499 ###############################################################################
3500
3501 # If we're cross-compiling, allow the user to override the tools and their
3502 # options.  The configure script is oriented toward identifying the host
3503 # compiler, etc., but we need a build compiler to generate parts of the source.
3504
3505 if test "$cross_compiling" = yes ; then
3506
3507         # defaults that we might want to override
3508         : ${BUILD_CFLAGS:=''}
3509         : ${BUILD_CPPFLAGS:=''}
3510         : ${BUILD_LDFLAGS:=''}
3511         : ${BUILD_LIBS:=''}
3512         : ${BUILD_EXEEXT:='$x'}
3513         : ${BUILD_OBJEXT:='o'}
3514
3515 # Check whether --with-build-cc or --without-build-cc was given.
3516 if test "${with_build_cc+set}" = set; then
3517   withval="$with_build_cc"
3518   BUILD_CC="$withval"
3519 else
3520   for ac_prog in gcc cc cl
3521 do
3522   # Extract the first word of "$ac_prog", so it can be a program name with args.
3523 set dummy $ac_prog; ac_word=$2
3524 echo "$as_me:3524: checking for $ac_word" >&5
3525 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3526 if test "${ac_cv_prog_BUILD_CC+set}" = set; then
3527   echo $ECHO_N "(cached) $ECHO_C" >&6
3528 else
3529   if test -n "$BUILD_CC"; then
3530   ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
3531 else
3532   ac_save_IFS=$IFS; IFS=$ac_path_separator
3533 ac_dummy="$PATH"
3534 for ac_dir in $ac_dummy; do
3535   IFS=$ac_save_IFS
3536   test -z "$ac_dir" && ac_dir=.
3537   $as_executable_p "$ac_dir/$ac_word" || continue
3538 ac_cv_prog_BUILD_CC="$ac_prog"
3539 echo "$as_me:3539: found $ac_dir/$ac_word" >&5
3540 break
3541 done
3542
3543 fi
3544 fi
3545 BUILD_CC=$ac_cv_prog_BUILD_CC
3546 if test -n "$BUILD_CC"; then
3547   echo "$as_me:3547: result: $BUILD_CC" >&5
3548 echo "${ECHO_T}$BUILD_CC" >&6
3549 else
3550   echo "$as_me:3550: result: no" >&5
3551 echo "${ECHO_T}no" >&6
3552 fi
3553
3554   test -n "$BUILD_CC" && break
3555 done
3556
3557 fi;
3558         echo "$as_me:3558: checking for native build C compiler" >&5
3559 echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
3560         echo "$as_me:3560: result: $BUILD_CC" >&5
3561 echo "${ECHO_T}$BUILD_CC" >&6
3562
3563         echo "$as_me:3563: checking for native build C preprocessor" >&5
3564 echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
3565
3566 # Check whether --with-build-cpp or --without-build-cpp was given.
3567 if test "${with_build_cpp+set}" = set; then
3568   withval="$with_build_cpp"
3569   BUILD_CPP="$withval"
3570 else
3571   BUILD_CPP='${BUILD_CC} -E'
3572 fi;
3573         echo "$as_me:3573: result: $BUILD_CPP" >&5
3574 echo "${ECHO_T}$BUILD_CPP" >&6
3575
3576         echo "$as_me:3576: checking for native build C flags" >&5
3577 echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
3578
3579 # Check whether --with-build-cflags or --without-build-cflags was given.
3580 if test "${with_build_cflags+set}" = set; then
3581   withval="$with_build_cflags"
3582   BUILD_CFLAGS="$withval"
3583 fi;
3584         echo "$as_me:3584: result: $BUILD_CFLAGS" >&5
3585 echo "${ECHO_T}$BUILD_CFLAGS" >&6
3586
3587         echo "$as_me:3587: checking for native build C preprocessor-flags" >&5
3588 echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
3589
3590 # Check whether --with-build-cppflags or --without-build-cppflags was given.
3591 if test "${with_build_cppflags+set}" = set; then
3592   withval="$with_build_cppflags"
3593   BUILD_CPPFLAGS="$withval"
3594 fi;
3595         echo "$as_me:3595: result: $BUILD_CPPFLAGS" >&5
3596 echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
3597
3598         echo "$as_me:3598: checking for native build linker-flags" >&5
3599 echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
3600
3601 # Check whether --with-build-ldflags or --without-build-ldflags was given.
3602 if test "${with_build_ldflags+set}" = set; then
3603   withval="$with_build_ldflags"
3604   BUILD_LDFLAGS="$withval"
3605 fi;
3606         echo "$as_me:3606: result: $BUILD_LDFLAGS" >&5
3607 echo "${ECHO_T}$BUILD_LDFLAGS" >&6
3608
3609         echo "$as_me:3609: checking for native build linker-libraries" >&5
3610 echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
3611
3612 # Check whether --with-build-libs or --without-build-libs was given.
3613 if test "${with_build_libs+set}" = set; then
3614   withval="$with_build_libs"
3615   BUILD_LIBS="$withval"
3616 fi;
3617         echo "$as_me:3617: result: $BUILD_LIBS" >&5
3618 echo "${ECHO_T}$BUILD_LIBS" >&6
3619
3620         # this assumes we're on Unix.
3621         BUILD_EXEEXT=
3622         BUILD_OBJEXT=o
3623
3624         : ${BUILD_CC:='${CC}'}
3625
3626         if ( test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '${CC}' ) ; then
3627                 { { echo "$as_me:3627: error: Cross-build requires two compilers.
3628 Use --with-build-cc to specify the native compiler." >&5
3629 echo "$as_me: error: Cross-build requires two compilers.
3630 Use --with-build-cc to specify the native compiler." >&2;}
3631    { (exit 1); exit 1; }; }
3632         fi
3633
3634 else
3635         : ${BUILD_CC:='${CC}'}
3636         : ${BUILD_CPP:='${CPP}'}
3637         : ${BUILD_CFLAGS:='${CFLAGS}'}
3638         : ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
3639         : ${BUILD_LDFLAGS:='${LDFLAGS}'}
3640         : ${BUILD_LIBS:='${LIBS}'}
3641         : ${BUILD_EXEEXT:='$x'}
3642         : ${BUILD_OBJEXT:='o'}
3643 fi
3644
3645 ###############################################################################
3646
3647 ### Options to allow the user to specify the set of libraries which are used.
3648 ### Use "--without-normal --with-shared" to allow the default model to be
3649 ### shared, for example.
3650 cf_list_models=""
3651
3652 echo "$as_me:3652: checking if you want to build shared C-objects" >&5
3653 echo $ECHO_N "checking if you want to build shared C-objects... $ECHO_C" >&6
3654
3655 # Check whether --with-shared or --without-shared was given.
3656 if test "${with_shared+set}" = set; then
3657   withval="$with_shared"
3658   with_shared=$withval
3659 else
3660   with_shared=no
3661 fi;
3662 echo "$as_me:3662: result: $with_shared" >&5
3663 echo "${ECHO_T}$with_shared" >&6
3664 test "$with_shared" = "yes" && cf_list_models="$cf_list_models shared"
3665
3666 echo "$as_me:3666: checking for specified models" >&5
3667 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
3668 test -z "$cf_list_models" && cf_list_models=normal
3669 echo "$as_me:3669: result: $cf_list_models" >&5
3670 echo "${ECHO_T}$cf_list_models" >&6
3671
3672 ### Use the first model as the default, and save its suffix for use in building
3673 ### up test-applications.
3674 echo "$as_me:3674: checking for default model" >&5
3675 echo $ECHO_N "checking for default model... $ECHO_C" >&6
3676 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
3677 echo "$as_me:3677: result: $DFT_LWR_MODEL" >&5
3678 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
3679
3680 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
3681
3682 echo "$as_me:3682: checking for specific curses-directory" >&5
3683 echo $ECHO_N "checking for specific curses-directory... $ECHO_C" >&6
3684
3685 # Check whether --with-curses-dir or --without-curses-dir was given.
3686 if test "${with_curses_dir+set}" = set; then
3687   withval="$with_curses_dir"
3688   cf_cv_curses_dir=$withval
3689 else
3690   cf_cv_curses_dir=no
3691 fi;
3692 echo "$as_me:3692: result: $cf_cv_curses_dir" >&5
3693 echo "${ECHO_T}$cf_cv_curses_dir" >&6
3694
3695 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
3696 then
3697
3698 if test "x$prefix" != xNONE; then
3699   cf_path_syntax="$prefix"
3700 else
3701   cf_path_syntax="$ac_default_prefix"
3702 fi
3703
3704 case ".$withval" in #(vi
3705 .\$\(*\)*|.\'*\'*) #(vi
3706   ;;
3707 ..|./*|.\\*) #(vi
3708   ;;
3709 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
3710   ;;
3711 .\${*prefix}*|.\${*dir}*) #(vi
3712   eval withval="$withval"
3713   case ".$withval" in #(vi
3714   .NONE/*)
3715     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
3716     ;;
3717   esac
3718   ;; #(vi
3719 .no|.NONE/*)
3720   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
3721   ;;
3722 *)
3723   { { echo "$as_me:3723: error: expected a pathname, not \"$withval\"" >&5
3724 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
3725    { (exit 1); exit 1; }; }
3726   ;;
3727 esac
3728
3729         if test -d "$cf_cv_curses_dir"
3730         then
3731
3732 if test -n "$cf_cv_curses_dir/include" ; then
3733   for cf_add_incdir in $cf_cv_curses_dir/include
3734   do
3735         while test $cf_add_incdir != /usr/include
3736         do
3737           if test -d $cf_add_incdir
3738           then
3739                 cf_have_incdir=no
3740                 if test -n "$CFLAGS$CPPFLAGS" ; then
3741                   # a loop is needed to ensure we can add subdirs of existing dirs
3742                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
3743                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
3744                           cf_have_incdir=yes; break
3745                         fi
3746                   done
3747                 fi
3748
3749                 if test "$cf_have_incdir" = no ; then
3750                   if test "$cf_add_incdir" = /usr/local/include ; then
3751                         if test "$GCC" = yes
3752                         then
3753                           cf_save_CPPFLAGS=$CPPFLAGS
3754                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
3755                           cat >conftest.$ac_ext <<_ACEOF
3756 #line 3756 "configure"
3757 #include "confdefs.h"
3758 #include <stdio.h>
3759 int
3760 main ()
3761 {
3762 printf("Hello")
3763   ;
3764   return 0;
3765 }
3766 _ACEOF
3767 rm -f conftest.$ac_objext
3768 if { (eval echo "$as_me:3768: \"$ac_compile\"") >&5
3769   (eval $ac_compile) 2>&5
3770   ac_status=$?
3771   echo "$as_me:3771: \$? = $ac_status" >&5
3772   (exit $ac_status); } &&
3773          { ac_try='test -s conftest.$ac_objext'
3774   { (eval echo "$as_me:3774: \"$ac_try\"") >&5
3775   (eval $ac_try) 2>&5
3776   ac_status=$?
3777   echo "$as_me:3777: \$? = $ac_status" >&5
3778   (exit $ac_status); }; }; then
3779   :
3780 else
3781   echo "$as_me: failed program was:" >&5
3782 cat conftest.$ac_ext >&5
3783 cf_have_incdir=yes
3784 fi
3785 rm -f conftest.$ac_objext conftest.$ac_ext
3786                           CPPFLAGS=$cf_save_CPPFLAGS
3787                         fi
3788                   fi
3789                 fi
3790
3791                 if test "$cf_have_incdir" = no ; then
3792                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
3793
3794 echo "${as_me:-configure}:3794: testing adding $cf_add_incdir to include-path ..." 1>&5
3795
3796                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
3797
3798                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
3799                   test "$cf_top_incdir" = "$cf_add_incdir" && break
3800                   cf_add_incdir="$cf_top_incdir"
3801                 else
3802                   break
3803                 fi
3804           fi
3805         done
3806   done
3807 fi
3808
3809 if test -n "$cf_cv_curses_dir/lib" ; then
3810   for cf_add_libdir in $cf_cv_curses_dir/lib
3811   do
3812     if test $cf_add_libdir = /usr/lib ; then
3813       :
3814     elif test -d $cf_add_libdir
3815     then
3816       cf_have_libdir=no
3817       if test -n "$LDFLAGS$LIBS" ; then
3818         # a loop is needed to ensure we can add subdirs of existing dirs
3819         for cf_test_libdir in $LDFLAGS $LIBS ; do
3820           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
3821             cf_have_libdir=yes; break
3822           fi
3823         done
3824       fi
3825       if test "$cf_have_libdir" = no ; then
3826         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
3827
3828 echo "${as_me:-configure}:3828: testing adding $cf_add_libdir to library-path ..." 1>&5
3829
3830         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
3831       fi
3832     fi
3833   done
3834 fi
3835
3836         fi
3837 fi
3838
3839 echo "$as_me:3839: checking if you want wide-character code" >&5
3840 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
3841
3842 # Check whether --enable-widec or --disable-widec was given.
3843 if test "${enable_widec+set}" = set; then
3844   enableval="$enable_widec"
3845   with_widec=$enableval
3846 else
3847   with_widec=no
3848 fi;
3849 echo "$as_me:3849: result: $with_widec" >&5
3850 echo "${ECHO_T}$with_widec" >&6
3851 if test "$with_widec" = yes ; then
3852
3853 echo "$as_me:3853: checking for multibyte character support" >&5
3854 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
3855 if test "${cf_cv_utf8_lib+set}" = set; then
3856   echo $ECHO_N "(cached) $ECHO_C" >&6
3857 else
3858
3859         cf_save_LIBS="$LIBS"
3860         cat >conftest.$ac_ext <<_ACEOF
3861 #line 3861 "configure"
3862 #include "confdefs.h"
3863
3864 #include <stdlib.h>
3865 int
3866 main ()
3867 {
3868 putwc(0,0);
3869   ;
3870   return 0;
3871 }
3872 _ACEOF
3873 rm -f conftest.$ac_objext conftest$ac_exeext
3874 if { (eval echo "$as_me:3874: \"$ac_link\"") >&5
3875   (eval $ac_link) 2>&5
3876   ac_status=$?
3877   echo "$as_me:3877: \$? = $ac_status" >&5
3878   (exit $ac_status); } &&
3879          { ac_try='test -s conftest$ac_exeext'
3880   { (eval echo "$as_me:3880: \"$ac_try\"") >&5
3881   (eval $ac_try) 2>&5
3882   ac_status=$?
3883   echo "$as_me:3883: \$? = $ac_status" >&5
3884   (exit $ac_status); }; }; then
3885   cf_cv_utf8_lib=yes
3886 else
3887   echo "$as_me: failed program was:" >&5
3888 cat conftest.$ac_ext >&5
3889
3890 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
3891 # will be set on completion of the AC_TRY_LINK below.
3892 cf_cv_header_path_utf8=
3893 cf_cv_library_path_utf8=
3894
3895 echo "${as_me:-configure}:3895: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
3896
3897 cf_save_LIBS="$LIBS"
3898
3899 cat >conftest.$ac_ext <<_ACEOF
3900 #line 3900 "configure"
3901 #include "confdefs.h"
3902
3903 #include <libutf8.h>
3904 int
3905 main ()
3906 {
3907 putwc(0,0);
3908   ;
3909   return 0;
3910 }
3911 _ACEOF
3912 rm -f conftest.$ac_objext conftest$ac_exeext
3913 if { (eval echo "$as_me:3913: \"$ac_link\"") >&5
3914   (eval $ac_link) 2>&5
3915   ac_status=$?
3916   echo "$as_me:3916: \$? = $ac_status" >&5
3917   (exit $ac_status); } &&
3918          { ac_try='test -s conftest$ac_exeext'
3919   { (eval echo "$as_me:3919: \"$ac_try\"") >&5
3920   (eval $ac_try) 2>&5
3921   ac_status=$?
3922   echo "$as_me:3922: \$? = $ac_status" >&5
3923   (exit $ac_status); }; }; then
3924
3925         cf_cv_find_linkage_utf8=yes
3926         cf_cv_header_path_utf8=/usr/include
3927         cf_cv_library_path_utf8=/usr/lib
3928
3929 else
3930   echo "$as_me: failed program was:" >&5
3931 cat conftest.$ac_ext >&5
3932
3933 LIBS="-lutf8  $cf_save_LIBS"
3934
3935 cat >conftest.$ac_ext <<_ACEOF
3936 #line 3936 "configure"
3937 #include "confdefs.h"
3938
3939 #include <libutf8.h>
3940 int
3941 main ()
3942 {
3943 putwc(0,0);
3944   ;
3945   return 0;
3946 }
3947 _ACEOF
3948 rm -f conftest.$ac_objext conftest$ac_exeext
3949 if { (eval echo "$as_me:3949: \"$ac_link\"") >&5
3950   (eval $ac_link) 2>&5
3951   ac_status=$?
3952   echo "$as_me:3952: \$? = $ac_status" >&5
3953   (exit $ac_status); } &&
3954          { ac_try='test -s conftest$ac_exeext'
3955   { (eval echo "$as_me:3955: \"$ac_try\"") >&5
3956   (eval $ac_try) 2>&5
3957   ac_status=$?
3958   echo "$as_me:3958: \$? = $ac_status" >&5
3959   (exit $ac_status); }; }; then
3960
3961         cf_cv_find_linkage_utf8=yes
3962         cf_cv_header_path_utf8=/usr/include
3963         cf_cv_library_path_utf8=/usr/lib
3964         cf_cv_library_file_utf8="-lutf8"
3965
3966 else
3967   echo "$as_me: failed program was:" >&5
3968 cat conftest.$ac_ext >&5
3969
3970         cf_cv_find_linkage_utf8=no
3971         LIBS="$cf_save_LIBS"
3972
3973     test -n "$verbose" && echo "        find linkage for utf8 library" 1>&6
3974
3975 echo "${as_me:-configure}:3975: testing find linkage for utf8 library ..." 1>&5
3976
3977 echo "${as_me:-configure}:3977: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
3978
3979     cf_save_CPPFLAGS="$CPPFLAGS"
3980     cf_test_CPPFLAGS="$CPPFLAGS"
3981
3982 cf_search=
3983
3984 # collect the current set of include-directories from compiler flags
3985 cf_header_path_list=""
3986 if test -n "${CFLAGS}${CPPFLAGS}" ; then
3987         for cf_header_path in $CPPFLAGS $CFLAGS
3988         do
3989                 case $cf_header_path in #(vi
3990                 -I*)
3991                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
3992
3993 test "$cf_header_path" != "NONE" && \
3994 test -d "$cf_header_path" && \
3995  {
3996         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
3997         test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
3998         test -d $cf_header_path/include/utf8 &&       cf_search="$cf_search $cf_header_path/include/utf8"
3999         test -d $cf_header_path/include/utf8/include &&    cf_search="$cf_search $cf_header_path/include/utf8/include"
4000         test -d $cf_header_path/utf8/include &&       cf_search="$cf_search $cf_header_path/utf8/include"
4001         test -d $cf_header_path/utf8/include/utf8 &&    cf_search="$cf_search $cf_header_path/utf8/include/utf8"
4002 }
4003
4004                         cf_header_path_list="$cf_header_path_list $cf_search"
4005                         ;;
4006                 esac
4007         done
4008 fi
4009
4010 # add the variations for the package we are looking for
4011
4012 cf_search=
4013
4014 test "/usr" != "$prefix" && \
4015 test -d "/usr" && \
4016 (test $prefix = NONE || test "/usr" != "$prefix") && {
4017         test -n "$verbose" && echo "    ... testing for include-directories under /usr"
4018         test -d /usr/include &&          cf_search="$cf_search /usr/include"
4019         test -d /usr/include/utf8 &&       cf_search="$cf_search /usr/include/utf8"
4020         test -d /usr/include/utf8/include &&    cf_search="$cf_search /usr/include/utf8/include"
4021         test -d /usr/utf8/include &&       cf_search="$cf_search /usr/utf8/include"
4022         test -d /usr/utf8/include/utf8 &&    cf_search="$cf_search /usr/utf8/include/utf8"
4023 }
4024
4025 test "$prefix" != "NONE" && \
4026 test -d "$prefix" && \
4027  {
4028         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
4029         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
4030         test -d $prefix/include/utf8 &&       cf_search="$cf_search $prefix/include/utf8"
4031         test -d $prefix/include/utf8/include &&    cf_search="$cf_search $prefix/include/utf8/include"
4032         test -d $prefix/utf8/include &&       cf_search="$cf_search $prefix/utf8/include"
4033         test -d $prefix/utf8/include/utf8 &&    cf_search="$cf_search $prefix/utf8/include/utf8"
4034 }
4035
4036 test "/usr/local" != "$prefix" && \
4037 test -d "/usr/local" && \
4038 (test $prefix = NONE || test "/usr/local" != "$prefix") && {
4039         test -n "$verbose" && echo "    ... testing for include-directories under /usr/local"
4040         test -d /usr/local/include &&          cf_search="$cf_search /usr/local/include"
4041         test -d /usr/local/include/utf8 &&       cf_search="$cf_search /usr/local/include/utf8"
4042         test -d /usr/local/include/utf8/include &&    cf_search="$cf_search /usr/local/include/utf8/include"
4043         test -d /usr/local/utf8/include &&       cf_search="$cf_search /usr/local/utf8/include"
4044         test -d /usr/local/utf8/include/utf8 &&    cf_search="$cf_search /usr/local/utf8/include/utf8"
4045 }
4046
4047 test "/opt" != "$prefix" && \
4048 test -d "/opt" && \
4049 (test $prefix = NONE || test "/opt" != "$prefix") && {
4050         test -n "$verbose" && echo "    ... testing for include-directories under /opt"
4051         test -d /opt/include &&          cf_search="$cf_search /opt/include"
4052         test -d /opt/include/utf8 &&       cf_search="$cf_search /opt/include/utf8"
4053         test -d /opt/include/utf8/include &&    cf_search="$cf_search /opt/include/utf8/include"
4054         test -d /opt/utf8/include &&       cf_search="$cf_search /opt/utf8/include"
4055         test -d /opt/utf8/include/utf8 &&    cf_search="$cf_search /opt/utf8/include/utf8"
4056 }
4057
4058 test "$HOME" != "$prefix" && \
4059 test -d "$HOME" && \
4060 (test $prefix = NONE || test "$HOME" != "$prefix") && {
4061         test -n "$verbose" && echo "    ... testing for include-directories under $HOME"
4062         test -d $HOME/include &&          cf_search="$cf_search $HOME/include"
4063         test -d $HOME/include/utf8 &&       cf_search="$cf_search $HOME/include/utf8"
4064         test -d $HOME/include/utf8/include &&    cf_search="$cf_search $HOME/include/utf8/include"
4065         test -d $HOME/utf8/include &&       cf_search="$cf_search $HOME/utf8/include"
4066         test -d $HOME/utf8/include/utf8 &&    cf_search="$cf_search $HOME/utf8/include/utf8"
4067 }
4068
4069 test "$includedir" != NONE && \
4070 test "$includedir" != "/usr/include" && \
4071 test -d "$includedir" && {
4072         test -d $includedir &&    cf_search="$cf_search $includedir"
4073         test -d $includedir/utf8 && cf_search="$cf_search $includedir/utf8"
4074 }
4075
4076 test "$oldincludedir" != NONE && \
4077 test "$oldincludedir" != "/usr/include" && \
4078 test -d "$oldincludedir" && {
4079         test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
4080         test -d $oldincludedir/utf8 && cf_search="$cf_search $oldincludedir/utf8"
4081 }
4082
4083 cf_search="$cf_search $cf_header_path_list"
4084
4085     for cf_cv_header_path_utf8 in $cf_search
4086     do
4087       if test -d $cf_cv_header_path_utf8 ; then
4088         test -n "$verbose" && echo "    ... testing $cf_cv_header_path_utf8" 1>&6
4089
4090 echo "${as_me:-configure}:4090: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
4091
4092         CPPFLAGS="$cf_save_CPPFLAGS -I$cf_cv_header_path_utf8"
4093         cat >conftest.$ac_ext <<_ACEOF
4094 #line 4094 "configure"
4095 #include "confdefs.h"
4096
4097 #include <libutf8.h>
4098 int
4099 main ()
4100 {
4101 putwc(0,0);
4102   ;
4103   return 0;
4104 }
4105 _ACEOF
4106 rm -f conftest.$ac_objext
4107 if { (eval echo "$as_me:4107: \"$ac_compile\"") >&5
4108   (eval $ac_compile) 2>&5
4109   ac_status=$?
4110   echo "$as_me:4110: \$? = $ac_status" >&5
4111   (exit $ac_status); } &&
4112          { ac_try='test -s conftest.$ac_objext'
4113   { (eval echo "$as_me:4113: \"$ac_try\"") >&5
4114   (eval $ac_try) 2>&5
4115   ac_status=$?
4116   echo "$as_me:4116: \$? = $ac_status" >&5
4117   (exit $ac_status); }; }; then
4118
4119             test -n "$verbose" && echo "        ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
4120
4121 echo "${as_me:-configure}:4121: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
4122
4123             cf_cv_find_linkage_utf8=maybe
4124             cf_test_CPPFLAGS="$CPPFLAGS"
4125             break
4126 else
4127   echo "$as_me: failed program was:" >&5
4128 cat conftest.$ac_ext >&5
4129
4130             CPPFLAGS="$cf_save_CPPFLAGS"
4131
4132 fi
4133 rm -f conftest.$ac_objext conftest.$ac_ext
4134       fi
4135     done
4136
4137     if test "$cf_cv_find_linkage_utf8" = maybe ; then
4138
4139 echo "${as_me:-configure}:4139: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
4140
4141       cf_save_LIBS="$LIBS"
4142       cf_save_LDFLAGS="$LDFLAGS"
4143
4144       if test "$cf_cv_find_linkage_utf8" != yes ; then
4145
4146 cf_search=
4147 cf_library_path_list=""
4148 if test -n "${LDFLAGS}${LIBS}" ; then
4149         for cf_library_path in $LDFLAGS $LIBS
4150         do
4151                 case $cf_library_path in #(vi
4152                 -L*)
4153                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
4154
4155 test "$cf_library_path" != "NONE" && \
4156 test -d "$cf_library_path" && \
4157  {
4158         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
4159         test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
4160         test -d $cf_library_path/lib/utf8 &&       cf_search="$cf_search $cf_library_path/lib/utf8"
4161         test -d $cf_library_path/lib/utf8/lib &&    cf_search="$cf_search $cf_library_path/lib/utf8/lib"
4162         test -d $cf_library_path/utf8/lib &&       cf_search="$cf_search $cf_library_path/utf8/lib"
4163         test -d $cf_library_path/utf8/lib/utf8 &&    cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
4164 }
4165
4166                         cf_library_path_list="$cf_library_path_list $cf_search"
4167                         ;;
4168                 esac
4169         done
4170 fi
4171
4172 cf_search=
4173
4174 test "/usr" != "$prefix" && \
4175 test -d "/usr" && \
4176 (test $prefix = NONE || test "/usr" != "$prefix") && {
4177         test -n "$verbose" && echo "    ... testing for lib-directories under /usr"
4178         test -d /usr/lib &&          cf_search="$cf_search /usr/lib"
4179         test -d /usr/lib/utf8 &&       cf_search="$cf_search /usr/lib/utf8"
4180         test -d /usr/lib/utf8/lib &&    cf_search="$cf_search /usr/lib/utf8/lib"
4181         test -d /usr/utf8/lib &&       cf_search="$cf_search /usr/utf8/lib"
4182         test -d /usr/utf8/lib/utf8 &&    cf_search="$cf_search /usr/utf8/lib/utf8"
4183 }
4184
4185 test "$prefix" != "NONE" && \
4186 test -d "$prefix" && \
4187  {
4188         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
4189         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
4190         test -d $prefix/lib/utf8 &&       cf_search="$cf_search $prefix/lib/utf8"
4191         test -d $prefix/lib/utf8/lib &&    cf_search="$cf_search $prefix/lib/utf8/lib"
4192         test -d $prefix/utf8/lib &&       cf_search="$cf_search $prefix/utf8/lib"
4193         test -d $prefix/utf8/lib/utf8 &&    cf_search="$cf_search $prefix/utf8/lib/utf8"
4194 }
4195
4196 test "/usr/local" != "$prefix" && \
4197 test -d "/usr/local" && \
4198 (test $prefix = NONE || test "/usr/local" != "$prefix") && {
4199         test -n "$verbose" && echo "    ... testing for lib-directories under /usr/local"
4200         test -d /usr/local/lib &&          cf_search="$cf_search /usr/local/lib"
4201         test -d /usr/local/lib/utf8 &&       cf_search="$cf_search /usr/local/lib/utf8"
4202         test -d /usr/local/lib/utf8/lib &&    cf_search="$cf_search /usr/local/lib/utf8/lib"
4203         test -d /usr/local/utf8/lib &&       cf_search="$cf_search /usr/local/utf8/lib"
4204         test -d /usr/local/utf8/lib/utf8 &&    cf_search="$cf_search /usr/local/utf8/lib/utf8"
4205 }
4206
4207 test "/opt" != "$prefix" && \
4208 test -d "/opt" && \
4209 (test $prefix = NONE || test "/opt" != "$prefix") && {
4210         test -n "$verbose" && echo "    ... testing for lib-directories under /opt"
4211         test -d /opt/lib &&          cf_search="$cf_search /opt/lib"
4212         test -d /opt/lib/utf8 &&       cf_search="$cf_search /opt/lib/utf8"
4213         test -d /opt/lib/utf8/lib &&    cf_search="$cf_search /opt/lib/utf8/lib"
4214         test -d /opt/utf8/lib &&       cf_search="$cf_search /opt/utf8/lib"
4215         test -d /opt/utf8/lib/utf8 &&    cf_search="$cf_search /opt/utf8/lib/utf8"
4216 }
4217
4218 test "$HOME" != "$prefix" && \
4219 test -d "$HOME" && \
4220 (test $prefix = NONE || test "$HOME" != "$prefix") && {
4221         test -n "$verbose" && echo "    ... testing for lib-directories under $HOME"
4222         test -d $HOME/lib &&          cf_search="$cf_search $HOME/lib"
4223         test -d $HOME/lib/utf8 &&       cf_search="$cf_search $HOME/lib/utf8"
4224         test -d $HOME/lib/utf8/lib &&    cf_search="$cf_search $HOME/lib/utf8/lib"
4225         test -d $HOME/utf8/lib &&       cf_search="$cf_search $HOME/utf8/lib"
4226         test -d $HOME/utf8/lib/utf8 &&    cf_search="$cf_search $HOME/utf8/lib/utf8"
4227 }
4228
4229 cf_search="$cf_library_path_list $cf_search"
4230
4231         for cf_cv_library_path_utf8 in $cf_search
4232         do
4233           if test -d $cf_cv_library_path_utf8 ; then
4234             test -n "$verbose" && echo "        ... testing $cf_cv_library_path_utf8" 1>&6
4235
4236 echo "${as_me:-configure}:4236: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
4237
4238             CPPFLAGS="$cf_test_CPPFLAGS"
4239             LIBS="-lutf8  $cf_save_LIBS"
4240             LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
4241             cat >conftest.$ac_ext <<_ACEOF
4242 #line 4242 "configure"
4243 #include "confdefs.h"
4244
4245 #include <libutf8.h>
4246 int
4247 main ()
4248 {
4249 putwc(0,0);
4250   ;
4251   return 0;
4252 }
4253 _ACEOF
4254 rm -f conftest.$ac_objext conftest$ac_exeext
4255 if { (eval echo "$as_me:4255: \"$ac_link\"") >&5
4256   (eval $ac_link) 2>&5
4257   ac_status=$?
4258   echo "$as_me:4258: \$? = $ac_status" >&5
4259   (exit $ac_status); } &&
4260          { ac_try='test -s conftest$ac_exeext'
4261   { (eval echo "$as_me:4261: \"$ac_try\"") >&5
4262   (eval $ac_try) 2>&5
4263   ac_status=$?
4264   echo "$as_me:4264: \$? = $ac_status" >&5
4265   (exit $ac_status); }; }; then
4266
4267                 test -n "$verbose" && echo "    ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
4268
4269 echo "${as_me:-configure}:4269: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
4270
4271                 cf_cv_find_linkage_utf8=yes
4272                 cf_cv_library_file_utf8="-lutf8"
4273                 break
4274 else
4275   echo "$as_me: failed program was:" >&5
4276 cat conftest.$ac_ext >&5
4277
4278                 CPPFLAGS="$cf_save_CPPFLAGS"
4279                 LIBS="$cf_save_LIBS"
4280                 LDFLAGS="$cf_save_LDFLAGS"
4281
4282 fi
4283 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4284           fi
4285         done
4286         CPPFLAGS="$cf_save_CPPFLAGS"
4287         LDFLAGS="$cf_save_LDFLAGS"
4288       fi
4289
4290     else
4291       cf_cv_find_linkage_utf8=no
4292     fi
4293
4294 fi
4295 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4296
4297 fi
4298 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4299
4300 LIBS="$cf_save_LIBS"
4301
4302 if test "$cf_cv_find_linkage_utf8" = yes ; then
4303 cf_cv_utf8_lib=add-on
4304 else
4305 cf_cv_utf8_lib=no
4306 fi
4307
4308 fi
4309 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4310 fi
4311 echo "$as_me:4311: result: $cf_cv_utf8_lib" >&5
4312 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
4313
4314 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
4315 # ncurses/ncursesw:
4316 if test "$cf_cv_utf8_lib" = "add-on" ; then
4317         cat >>confdefs.h <<\EOF
4318 #define HAVE_LIBUTF8_H 1
4319 EOF
4320
4321 if test -n "$cf_cv_header_path_utf8" ; then
4322   for cf_add_incdir in $cf_cv_header_path_utf8
4323   do
4324         while test $cf_add_incdir != /usr/include
4325         do
4326           if test -d $cf_add_incdir
4327           then
4328                 cf_have_incdir=no
4329                 if test -n "$CFLAGS$CPPFLAGS" ; then
4330                   # a loop is needed to ensure we can add subdirs of existing dirs
4331                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
4332                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
4333                           cf_have_incdir=yes; break
4334                         fi
4335                   done
4336                 fi
4337
4338                 if test "$cf_have_incdir" = no ; then
4339                   if test "$cf_add_incdir" = /usr/local/include ; then
4340                         if test "$GCC" = yes
4341                         then
4342                           cf_save_CPPFLAGS=$CPPFLAGS
4343                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4344                           cat >conftest.$ac_ext <<_ACEOF
4345 #line 4345 "configure"
4346 #include "confdefs.h"
4347 #include <stdio.h>
4348 int
4349 main ()
4350 {
4351 printf("Hello")
4352   ;
4353   return 0;
4354 }
4355 _ACEOF
4356 rm -f conftest.$ac_objext
4357 if { (eval echo "$as_me:4357: \"$ac_compile\"") >&5
4358   (eval $ac_compile) 2>&5
4359   ac_status=$?
4360   echo "$as_me:4360: \$? = $ac_status" >&5
4361   (exit $ac_status); } &&
4362          { ac_try='test -s conftest.$ac_objext'
4363   { (eval echo "$as_me:4363: \"$ac_try\"") >&5
4364   (eval $ac_try) 2>&5
4365   ac_status=$?
4366   echo "$as_me:4366: \$? = $ac_status" >&5
4367   (exit $ac_status); }; }; then
4368   :
4369 else
4370   echo "$as_me: failed program was:" >&5
4371 cat conftest.$ac_ext >&5
4372 cf_have_incdir=yes
4373 fi
4374 rm -f conftest.$ac_objext conftest.$ac_ext
4375                           CPPFLAGS=$cf_save_CPPFLAGS
4376                         fi
4377                   fi
4378                 fi
4379
4380                 if test "$cf_have_incdir" = no ; then
4381                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
4382
4383 echo "${as_me:-configure}:4383: testing adding $cf_add_incdir to include-path ..." 1>&5
4384
4385                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4386
4387                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
4388                   test "$cf_top_incdir" = "$cf_add_incdir" && break
4389                   cf_add_incdir="$cf_top_incdir"
4390                 else
4391                   break
4392                 fi
4393           fi
4394         done
4395   done
4396 fi
4397
4398 if test -n "$cf_cv_library_path_utf8" ; then
4399   for cf_add_libdir in $cf_cv_library_path_utf8
4400   do
4401     if test $cf_add_libdir = /usr/lib ; then
4402       :
4403     elif test -d $cf_add_libdir
4404     then
4405       cf_have_libdir=no
4406       if test -n "$LDFLAGS$LIBS" ; then
4407         # a loop is needed to ensure we can add subdirs of existing dirs
4408         for cf_test_libdir in $LDFLAGS $LIBS ; do
4409           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
4410             cf_have_libdir=yes; break
4411           fi
4412         done
4413       fi
4414       if test "$cf_have_libdir" = no ; then
4415         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
4416
4417 echo "${as_me:-configure}:4417: testing adding $cf_add_libdir to library-path ..." 1>&5
4418
4419         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
4420       fi
4421     fi
4422   done
4423 fi
4424
4425         LIBS="$cf_cv_library_file_utf8 $LIBS"
4426 fi
4427
4428 cf_ncuconfig_root=ncursesw
4429
4430 echo "Looking for ${cf_ncuconfig_root}-config"
4431
4432 if test -n "$ac_tool_prefix"; then
4433   for ac_prog in ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
4434   do
4435     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4436 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4437 echo "$as_me:4437: checking for $ac_word" >&5
4438 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4439 if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
4440   echo $ECHO_N "(cached) $ECHO_C" >&6
4441 else
4442   if test -n "$NCURSES_CONFIG"; then
4443   ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
4444 else
4445   ac_save_IFS=$IFS; IFS=$ac_path_separator
4446 ac_dummy="$PATH"
4447 for ac_dir in $ac_dummy; do
4448   IFS=$ac_save_IFS
4449   test -z "$ac_dir" && ac_dir=.
4450   $as_executable_p "$ac_dir/$ac_word" || continue
4451 ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
4452 echo "$as_me:4452: found $ac_dir/$ac_word" >&5
4453 break
4454 done
4455
4456 fi
4457 fi
4458 NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
4459 if test -n "$NCURSES_CONFIG"; then
4460   echo "$as_me:4460: result: $NCURSES_CONFIG" >&5
4461 echo "${ECHO_T}$NCURSES_CONFIG" >&6
4462 else
4463   echo "$as_me:4463: result: no" >&5
4464 echo "${ECHO_T}no" >&6
4465 fi
4466
4467     test -n "$NCURSES_CONFIG" && break
4468   done
4469 fi
4470 if test -z "$NCURSES_CONFIG"; then
4471   ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
4472   for ac_prog in ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
4473 do
4474   # Extract the first word of "$ac_prog", so it can be a program name with args.
4475 set dummy $ac_prog; ac_word=$2
4476 echo "$as_me:4476: checking for $ac_word" >&5
4477 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4478 if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
4479   echo $ECHO_N "(cached) $ECHO_C" >&6
4480 else
4481   if test -n "$ac_ct_NCURSES_CONFIG"; then
4482   ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
4483 else
4484   ac_save_IFS=$IFS; IFS=$ac_path_separator
4485 ac_dummy="$PATH"
4486 for ac_dir in $ac_dummy; do
4487   IFS=$ac_save_IFS
4488   test -z "$ac_dir" && ac_dir=.
4489   $as_executable_p "$ac_dir/$ac_word" || continue
4490 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
4491 echo "$as_me:4491: found $ac_dir/$ac_word" >&5
4492 break
4493 done
4494
4495 fi
4496 fi
4497 ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
4498 if test -n "$ac_ct_NCURSES_CONFIG"; then
4499   echo "$as_me:4499: result: $ac_ct_NCURSES_CONFIG" >&5
4500 echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
4501 else
4502   echo "$as_me:4502: result: no" >&5
4503 echo "${ECHO_T}no" >&6
4504 fi
4505
4506   test -n "$ac_ct_NCURSES_CONFIG" && break
4507 done
4508 test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
4509
4510   NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
4511 fi
4512
4513 if test "$NCURSES_CONFIG" != none ; then
4514
4515 CPPFLAGS="$CPPFLAGS `$NCURSES_CONFIG --cflags`"
4516 LIBS="`$NCURSES_CONFIG --libs` $LIBS"
4517
4518 # even with config script, some packages use no-override for curses.h
4519
4520 echo "$as_me:4520: checking if we have identified curses headers" >&5
4521 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
4522 if test "${cf_cv_ncurses_header+set}" = set; then
4523   echo $ECHO_N "(cached) $ECHO_C" >&6
4524 else
4525
4526 cf_cv_ncurses_header=none
4527 for cf_header in  \
4528     ncursesw/ncurses.h \
4529         ncursesw/curses.h \
4530         ncurses.h \
4531         curses.h
4532 do
4533 cat >conftest.$ac_ext <<_ACEOF
4534 #line 4534 "configure"
4535 #include "confdefs.h"
4536 #include <${cf_header}>
4537 int
4538 main ()
4539 {
4540 initscr(); tgoto("?", 0,0)
4541   ;
4542   return 0;
4543 }
4544 _ACEOF
4545 rm -f conftest.$ac_objext
4546 if { (eval echo "$as_me:4546: \"$ac_compile\"") >&5
4547   (eval $ac_compile) 2>&5
4548   ac_status=$?
4549   echo "$as_me:4549: \$? = $ac_status" >&5
4550   (exit $ac_status); } &&
4551          { ac_try='test -s conftest.$ac_objext'
4552   { (eval echo "$as_me:4552: \"$ac_try\"") >&5
4553   (eval $ac_try) 2>&5
4554   ac_status=$?
4555   echo "$as_me:4555: \$? = $ac_status" >&5
4556   (exit $ac_status); }; }; then
4557   cf_cv_ncurses_header=$cf_header; break
4558 else
4559   echo "$as_me: failed program was:" >&5
4560 cat conftest.$ac_ext >&5
4561 fi
4562 rm -f conftest.$ac_objext conftest.$ac_ext
4563 done
4564
4565 fi
4566 echo "$as_me:4566: result: $cf_cv_ncurses_header" >&5
4567 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
4568
4569 if test "$cf_cv_ncurses_header" = none ; then
4570         { { echo "$as_me:4570: error: No curses header-files found" >&5
4571 echo "$as_me: error: No curses header-files found" >&2;}
4572    { (exit 1); exit 1; }; }
4573 fi
4574
4575 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
4576
4577 for ac_header in $cf_cv_ncurses_header
4578 do
4579 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4580 echo "$as_me:4580: checking for $ac_header" >&5
4581 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4582 if eval "test \"\${$as_ac_Header+set}\" = set"; then
4583   echo $ECHO_N "(cached) $ECHO_C" >&6
4584 else
4585   cat >conftest.$ac_ext <<_ACEOF
4586 #line 4586 "configure"
4587 #include "confdefs.h"
4588 #include <$ac_header>
4589 _ACEOF
4590 if { (eval echo "$as_me:4590: \"$ac_cpp conftest.$ac_ext\"") >&5
4591   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4592   ac_status=$?
4593   egrep -v '^ *\+' conftest.er1 >conftest.err
4594   rm -f conftest.er1
4595   cat conftest.err >&5
4596   echo "$as_me:4596: \$? = $ac_status" >&5
4597   (exit $ac_status); } >/dev/null; then
4598   if test -s conftest.err; then
4599     ac_cpp_err=$ac_c_preproc_warn_flag
4600   else
4601     ac_cpp_err=
4602   fi
4603 else
4604   ac_cpp_err=yes
4605 fi
4606 if test -z "$ac_cpp_err"; then
4607   eval "$as_ac_Header=yes"
4608 else
4609   echo "$as_me: failed program was:" >&5
4610   cat conftest.$ac_ext >&5
4611   eval "$as_ac_Header=no"
4612 fi
4613 rm -f conftest.err conftest.$ac_ext
4614 fi
4615 echo "$as_me:4615: result: `eval echo '${'$as_ac_Header'}'`" >&5
4616 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4617 if test `eval echo '${'$as_ac_Header'}'` = yes; then
4618   cat >>confdefs.h <<EOF
4619 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4620 EOF
4621
4622 fi
4623 done
4624
4625 cat >>confdefs.h <<\EOF
4626 #define NCURSES 1
4627 EOF
4628
4629 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
4630
4631 cat >>confdefs.h <<EOF
4632 #define $cf_nculib_ROOT 1
4633 EOF
4634
4635 cf_cv_ncurses_version=`$NCURSES_CONFIG --version`
4636
4637 else
4638
4639 cf_ncuhdr_root=ncursesw
4640
4641 test -n "$cf_cv_curses_dir" && \
4642 test "$cf_cv_curses_dir" != "no" && { \
4643
4644 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
4645   for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
4646   do
4647         while test $cf_add_incdir != /usr/include
4648         do
4649           if test -d $cf_add_incdir
4650           then
4651                 cf_have_incdir=no
4652                 if test -n "$CFLAGS$CPPFLAGS" ; then
4653                   # a loop is needed to ensure we can add subdirs of existing dirs
4654                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
4655                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
4656                           cf_have_incdir=yes; break
4657                         fi
4658                   done
4659                 fi
4660
4661                 if test "$cf_have_incdir" = no ; then
4662                   if test "$cf_add_incdir" = /usr/local/include ; then
4663                         if test "$GCC" = yes
4664                         then
4665                           cf_save_CPPFLAGS=$CPPFLAGS
4666                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4667                           cat >conftest.$ac_ext <<_ACEOF
4668 #line 4668 "configure"
4669 #include "confdefs.h"
4670 #include <stdio.h>
4671 int
4672 main ()
4673 {
4674 printf("Hello")
4675   ;
4676   return 0;
4677 }
4678 _ACEOF
4679 rm -f conftest.$ac_objext
4680 if { (eval echo "$as_me:4680: \"$ac_compile\"") >&5
4681   (eval $ac_compile) 2>&5
4682   ac_status=$?
4683   echo "$as_me:4683: \$? = $ac_status" >&5
4684   (exit $ac_status); } &&
4685          { ac_try='test -s conftest.$ac_objext'
4686   { (eval echo "$as_me:4686: \"$ac_try\"") >&5
4687   (eval $ac_try) 2>&5
4688   ac_status=$?
4689   echo "$as_me:4689: \$? = $ac_status" >&5
4690   (exit $ac_status); }; }; then
4691   :
4692 else
4693   echo "$as_me: failed program was:" >&5
4694 cat conftest.$ac_ext >&5
4695 cf_have_incdir=yes
4696 fi
4697 rm -f conftest.$ac_objext conftest.$ac_ext
4698                           CPPFLAGS=$cf_save_CPPFLAGS
4699                         fi
4700                   fi
4701                 fi
4702
4703                 if test "$cf_have_incdir" = no ; then
4704                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
4705
4706 echo "${as_me:-configure}:4706: testing adding $cf_add_incdir to include-path ..." 1>&5
4707
4708                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4709
4710                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
4711                   test "$cf_top_incdir" = "$cf_add_incdir" && break
4712                   cf_add_incdir="$cf_top_incdir"
4713                 else
4714                   break
4715                 fi
4716           fi
4717         done
4718   done
4719 fi
4720
4721 }
4722
4723 echo "$as_me:4723: checking for $cf_ncuhdr_root header in include-path" >&5
4724 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
4725 if test "${cf_cv_ncurses_h+set}" = set; then
4726   echo $ECHO_N "(cached) $ECHO_C" >&6
4727 else
4728
4729         cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
4730         ( test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw ) && cf_header_list="$cf_header_list curses.h ncurses.h"
4731         for cf_header in $cf_header_list
4732         do
4733
4734         cat >conftest.$ac_ext <<_ACEOF
4735 #line 4735 "configure"
4736 #include "confdefs.h"
4737
4738 #define _XOPEN_SOURCE_EXTENDED
4739 #undef  HAVE_LIBUTF8_H  /* in case we used CF_UTF8_LIB */
4740 #define HAVE_LIBUTF8_H  /* to force ncurses' header file to use cchar_t */
4741
4742 #include <$cf_header>
4743 int
4744 main ()
4745 {
4746
4747 #ifdef NCURSES_VERSION
4748
4749 #ifndef WACS_BSSB
4750         make an error
4751 #endif
4752
4753 printf("%s\n", NCURSES_VERSION);
4754 #else
4755 #ifdef __NCURSES_H
4756 printf("old\n");
4757 #else
4758         make an error
4759 #endif
4760 #endif
4761
4762   ;
4763   return 0;
4764 }
4765 _ACEOF
4766 rm -f conftest.$ac_objext
4767 if { (eval echo "$as_me:4767: \"$ac_compile\"") >&5
4768   (eval $ac_compile) 2>&5
4769   ac_status=$?
4770   echo "$as_me:4770: \$? = $ac_status" >&5
4771   (exit $ac_status); } &&
4772          { ac_try='test -s conftest.$ac_objext'
4773   { (eval echo "$as_me:4773: \"$ac_try\"") >&5
4774   (eval $ac_try) 2>&5
4775   ac_status=$?
4776   echo "$as_me:4776: \$? = $ac_status" >&5
4777   (exit $ac_status); }; }; then
4778   cf_cv_ncurses_h=$cf_header
4779
4780 else
4781   echo "$as_me: failed program was:" >&5
4782 cat conftest.$ac_ext >&5
4783 cf_cv_ncurses_h=no
4784 fi
4785 rm -f conftest.$ac_objext conftest.$ac_ext
4786
4787                 test "$cf_cv_ncurses_h" != no && break
4788         done
4789
4790 fi
4791 echo "$as_me:4791: result: $cf_cv_ncurses_h" >&5
4792 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
4793
4794 if test "$cf_cv_ncurses_h" != no ; then
4795         cf_cv_ncurses_header=$cf_cv_ncurses_h
4796 else
4797
4798 echo "$as_me:4798: checking for $cf_ncuhdr_root include-path" >&5
4799 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
4800 if test "${cf_cv_ncurses_h2+set}" = set; then
4801   echo $ECHO_N "(cached) $ECHO_C" >&6
4802 else
4803
4804         test -n "$verbose" && echo
4805
4806 cf_search=
4807
4808 # collect the current set of include-directories from compiler flags
4809 cf_header_path_list=""
4810 if test -n "${CFLAGS}${CPPFLAGS}" ; then
4811         for cf_header_path in $CPPFLAGS $CFLAGS
4812         do
4813                 case $cf_header_path in #(vi
4814                 -I*)
4815                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
4816
4817 test "$cf_header_path" != "NONE" && \
4818 test -d "$cf_header_path" && \
4819  {
4820         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
4821         test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
4822         test -d $cf_header_path/include/$cf_ncuhdr_root &&       cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
4823         test -d $cf_header_path/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
4824         test -d $cf_header_path/$cf_ncuhdr_root/include &&       cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
4825         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"
4826 }
4827
4828                         cf_header_path_list="$cf_header_path_list $cf_search"
4829                         ;;
4830                 esac
4831         done
4832 fi
4833
4834 # add the variations for the package we are looking for
4835
4836 cf_search=
4837
4838 test "/usr" != "$prefix" && \
4839 test -d "/usr" && \
4840 (test $prefix = NONE || test "/usr" != "$prefix") && {
4841         test -n "$verbose" && echo "    ... testing for include-directories under /usr"
4842         test -d /usr/include &&          cf_search="$cf_search /usr/include"
4843         test -d /usr/include/$cf_ncuhdr_root &&       cf_search="$cf_search /usr/include/$cf_ncuhdr_root"
4844         test -d /usr/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search /usr/include/$cf_ncuhdr_root/include"
4845         test -d /usr/$cf_ncuhdr_root/include &&       cf_search="$cf_search /usr/$cf_ncuhdr_root/include"
4846         test -d /usr/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search /usr/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
4847 }
4848
4849 test "$prefix" != "NONE" && \
4850 test -d "$prefix" && \
4851  {
4852         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
4853         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
4854         test -d $prefix/include/$cf_ncuhdr_root &&       cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
4855         test -d $prefix/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
4856         test -d $prefix/$cf_ncuhdr_root/include &&       cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
4857         test -d $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
4858 }
4859
4860 test "/usr/local" != "$prefix" && \
4861 test -d "/usr/local" && \
4862 (test $prefix = NONE || test "/usr/local" != "$prefix") && {
4863         test -n "$verbose" && echo "    ... testing for include-directories under /usr/local"
4864         test -d /usr/local/include &&          cf_search="$cf_search /usr/local/include"
4865         test -d /usr/local/include/$cf_ncuhdr_root &&       cf_search="$cf_search /usr/local/include/$cf_ncuhdr_root"
4866         test -d /usr/local/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search /usr/local/include/$cf_ncuhdr_root/include"
4867         test -d /usr/local/$cf_ncuhdr_root/include &&       cf_search="$cf_search /usr/local/$cf_ncuhdr_root/include"
4868         test -d /usr/local/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search /usr/local/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
4869 }
4870
4871 test "/opt" != "$prefix" && \
4872 test -d "/opt" && \
4873 (test $prefix = NONE || test "/opt" != "$prefix") && {
4874         test -n "$verbose" && echo "    ... testing for include-directories under /opt"
4875         test -d /opt/include &&          cf_search="$cf_search /opt/include"
4876         test -d /opt/include/$cf_ncuhdr_root &&       cf_search="$cf_search /opt/include/$cf_ncuhdr_root"
4877         test -d /opt/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search /opt/include/$cf_ncuhdr_root/include"
4878         test -d /opt/$cf_ncuhdr_root/include &&       cf_search="$cf_search /opt/$cf_ncuhdr_root/include"
4879         test -d /opt/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search /opt/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
4880 }
4881
4882 test "$HOME" != "$prefix" && \
4883 test -d "$HOME" && \
4884 (test $prefix = NONE || test "$HOME" != "$prefix") && {
4885         test -n "$verbose" && echo "    ... testing for include-directories under $HOME"
4886         test -d $HOME/include &&          cf_search="$cf_search $HOME/include"
4887         test -d $HOME/include/$cf_ncuhdr_root &&       cf_search="$cf_search $HOME/include/$cf_ncuhdr_root"
4888         test -d $HOME/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search $HOME/include/$cf_ncuhdr_root/include"
4889         test -d $HOME/$cf_ncuhdr_root/include &&       cf_search="$cf_search $HOME/$cf_ncuhdr_root/include"
4890         test -d $HOME/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search $HOME/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
4891 }
4892
4893 test "$includedir" != NONE && \
4894 test "$includedir" != "/usr/include" && \
4895 test -d "$includedir" && {
4896         test -d $includedir &&    cf_search="$cf_search $includedir"
4897         test -d $includedir/$cf_ncuhdr_root && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
4898 }
4899
4900 test "$oldincludedir" != NONE && \
4901 test "$oldincludedir" != "/usr/include" && \
4902 test -d "$oldincludedir" && {
4903         test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
4904         test -d $oldincludedir/$cf_ncuhdr_root && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
4905 }
4906
4907 cf_search="$cf_search $cf_header_path_list"
4908
4909         test -n "$verbose" && echo search path $cf_search
4910         cf_save2_CPPFLAGS="$CPPFLAGS"
4911         for cf_incdir in $cf_search
4912         do
4913
4914 if test -n "$cf_incdir" ; then
4915   for cf_add_incdir in $cf_incdir
4916   do
4917         while test $cf_add_incdir != /usr/include
4918         do
4919           if test -d $cf_add_incdir
4920           then
4921                 cf_have_incdir=no
4922                 if test -n "$CFLAGS$CPPFLAGS" ; then
4923                   # a loop is needed to ensure we can add subdirs of existing dirs
4924                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
4925                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
4926                           cf_have_incdir=yes; break
4927                         fi
4928                   done
4929                 fi
4930
4931                 if test "$cf_have_incdir" = no ; then
4932                   if test "$cf_add_incdir" = /usr/local/include ; then
4933                         if test "$GCC" = yes
4934                         then
4935                           cf_save_CPPFLAGS=$CPPFLAGS
4936                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4937                           cat >conftest.$ac_ext <<_ACEOF
4938 #line 4938 "configure"
4939 #include "confdefs.h"
4940 #include <stdio.h>
4941 int
4942 main ()
4943 {
4944 printf("Hello")
4945   ;
4946   return 0;
4947 }
4948 _ACEOF
4949 rm -f conftest.$ac_objext
4950 if { (eval echo "$as_me:4950: \"$ac_compile\"") >&5
4951   (eval $ac_compile) 2>&5
4952   ac_status=$?
4953   echo "$as_me:4953: \$? = $ac_status" >&5
4954   (exit $ac_status); } &&
4955          { ac_try='test -s conftest.$ac_objext'
4956   { (eval echo "$as_me:4956: \"$ac_try\"") >&5
4957   (eval $ac_try) 2>&5
4958   ac_status=$?
4959   echo "$as_me:4959: \$? = $ac_status" >&5
4960   (exit $ac_status); }; }; then
4961   :
4962 else
4963   echo "$as_me: failed program was:" >&5
4964 cat conftest.$ac_ext >&5
4965 cf_have_incdir=yes
4966 fi
4967 rm -f conftest.$ac_objext conftest.$ac_ext
4968                           CPPFLAGS=$cf_save_CPPFLAGS
4969                         fi
4970                   fi
4971                 fi
4972
4973                 if test "$cf_have_incdir" = no ; then
4974                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
4975
4976 echo "${as_me:-configure}:4976: testing adding $cf_add_incdir to include-path ..." 1>&5
4977
4978                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4979
4980                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
4981                   test "$cf_top_incdir" = "$cf_add_incdir" && break
4982                   cf_add_incdir="$cf_top_incdir"
4983                 else
4984                   break
4985                 fi
4986           fi
4987         done
4988   done
4989 fi
4990
4991                 for cf_header in \
4992                         ncurses.h \
4993                         curses.h
4994                 do
4995
4996         cat >conftest.$ac_ext <<_ACEOF
4997 #line 4997 "configure"
4998 #include "confdefs.h"
4999
5000 #include <$cf_header>
5001 int
5002 main ()
5003 {
5004
5005 #ifdef NCURSES_VERSION
5006
5007 printf("%s\n", NCURSES_VERSION);
5008 #else
5009 #ifdef __NCURSES_H
5010 printf("old\n");
5011 #else
5012         make an error
5013 #endif
5014 #endif
5015
5016   ;
5017   return 0;
5018 }
5019 _ACEOF
5020 rm -f conftest.$ac_objext
5021 if { (eval echo "$as_me:5021: \"$ac_compile\"") >&5
5022   (eval $ac_compile) 2>&5
5023   ac_status=$?
5024   echo "$as_me:5024: \$? = $ac_status" >&5
5025   (exit $ac_status); } &&
5026          { ac_try='test -s conftest.$ac_objext'
5027   { (eval echo "$as_me:5027: \"$ac_try\"") >&5
5028   (eval $ac_try) 2>&5
5029   ac_status=$?
5030   echo "$as_me:5030: \$? = $ac_status" >&5
5031   (exit $ac_status); }; }; then
5032   cf_cv_ncurses_h2=$cf_header
5033
5034 else
5035   echo "$as_me: failed program was:" >&5
5036 cat conftest.$ac_ext >&5
5037 cf_cv_ncurses_h2=no
5038 fi
5039 rm -f conftest.$ac_objext conftest.$ac_ext
5040
5041                         if test "$cf_cv_ncurses_h2" != no ; then
5042                                 cf_cv_ncurses_h2=$cf_incdir/$cf_header
5043                                 test -n "$verbose" && echo $ac_n "      ... found $ac_c" 1>&6
5044                                 break
5045                         fi
5046                         test -n "$verbose" && echo "    ... tested $cf_incdir/$cf_header" 1>&6
5047                 done
5048                 CPPFLAGS="$cf_save2_CPPFLAGS"
5049                 test "$cf_cv_ncurses_h2" != no && break
5050         done
5051         test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:5051: error: not found" >&5
5052 echo "$as_me: error: not found" >&2;}
5053    { (exit 1); exit 1; }; }
5054
5055 fi
5056 echo "$as_me:5056: result: $cf_cv_ncurses_h2" >&5
5057 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
5058
5059         cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's%/[^/]*$%%'`
5060         cf_cv_ncurses_header=`basename $cf_cv_ncurses_h2`
5061         if test `basename $cf_1st_incdir` = $cf_ncuhdr_root ; then
5062                 cf_cv_ncurses_header=$cf_ncuhdr_root/$cf_cv_ncurses_header
5063         fi
5064
5065 if test -n "$cf_1st_incdir" ; then
5066   for cf_add_incdir in $cf_1st_incdir
5067   do
5068         while test $cf_add_incdir != /usr/include
5069         do
5070           if test -d $cf_add_incdir
5071           then
5072                 cf_have_incdir=no
5073                 if test -n "$CFLAGS$CPPFLAGS" ; then
5074                   # a loop is needed to ensure we can add subdirs of existing dirs
5075                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
5076                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
5077                           cf_have_incdir=yes; break
5078                         fi
5079                   done
5080                 fi
5081
5082                 if test "$cf_have_incdir" = no ; then
5083                   if test "$cf_add_incdir" = /usr/local/include ; then
5084                         if test "$GCC" = yes
5085                         then
5086                           cf_save_CPPFLAGS=$CPPFLAGS
5087                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
5088                           cat >conftest.$ac_ext <<_ACEOF
5089 #line 5089 "configure"
5090 #include "confdefs.h"
5091 #include <stdio.h>
5092 int
5093 main ()
5094 {
5095 printf("Hello")
5096   ;
5097   return 0;
5098 }
5099 _ACEOF
5100 rm -f conftest.$ac_objext
5101 if { (eval echo "$as_me:5101: \"$ac_compile\"") >&5
5102   (eval $ac_compile) 2>&5
5103   ac_status=$?
5104   echo "$as_me:5104: \$? = $ac_status" >&5
5105   (exit $ac_status); } &&
5106          { ac_try='test -s conftest.$ac_objext'
5107   { (eval echo "$as_me:5107: \"$ac_try\"") >&5
5108   (eval $ac_try) 2>&5
5109   ac_status=$?
5110   echo "$as_me:5110: \$? = $ac_status" >&5
5111   (exit $ac_status); }; }; then
5112   :
5113 else
5114   echo "$as_me: failed program was:" >&5
5115 cat conftest.$ac_ext >&5
5116 cf_have_incdir=yes
5117 fi
5118 rm -f conftest.$ac_objext conftest.$ac_ext
5119                           CPPFLAGS=$cf_save_CPPFLAGS
5120                         fi
5121                   fi
5122                 fi
5123
5124                 if test "$cf_have_incdir" = no ; then
5125                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
5126
5127 echo "${as_me:-configure}:5127: testing adding $cf_add_incdir to include-path ..." 1>&5
5128
5129                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
5130
5131                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
5132                   test "$cf_top_incdir" = "$cf_add_incdir" && break
5133                   cf_add_incdir="$cf_top_incdir"
5134                 else
5135                   break
5136                 fi
5137           fi
5138         done
5139   done
5140 fi
5141
5142 fi
5143
5144 # Set definitions to allow ifdef'ing for ncurses.h
5145
5146 case $cf_cv_ncurses_header in # (vi
5147 *ncurses.h)
5148         cat >>confdefs.h <<\EOF
5149 #define HAVE_NCURSES_H 1
5150 EOF
5151
5152         ;;
5153 esac
5154
5155 case $cf_cv_ncurses_header in # (vi
5156 ncurses/curses.h|ncurses/ncurses.h)
5157         cat >>confdefs.h <<\EOF
5158 #define HAVE_NCURSES_NCURSES_H 1
5159 EOF
5160
5161         ;;
5162 ncursesw/curses.h|ncursesw/ncurses.h)
5163         cat >>confdefs.h <<\EOF
5164 #define HAVE_NCURSESW_NCURSES_H 1
5165 EOF
5166
5167         ;;
5168 esac
5169
5170 echo "$as_me:5170: checking for terminfo header" >&5
5171 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
5172 if test "${cf_cv_term_header+set}" = set; then
5173   echo $ECHO_N "(cached) $ECHO_C" >&6
5174 else
5175
5176 case ${cf_cv_ncurses_header} in #(vi
5177 */ncurses.h|*/ncursesw.h) #(vi
5178         cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
5179         ;;
5180 *)
5181         cf_term_header=term.h
5182         ;;
5183 esac
5184
5185 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
5186 do
5187 cat >conftest.$ac_ext <<_ACEOF
5188 #line 5188 "configure"
5189 #include "confdefs.h"
5190 #include <stdio.h>
5191 #include <${cf_cv_ncurses_header:-curses.h}>
5192 #include <$cf_test>
5193
5194 int
5195 main ()
5196 {
5197 int x = auto_left_margin
5198   ;
5199   return 0;
5200 }
5201 _ACEOF
5202 rm -f conftest.$ac_objext
5203 if { (eval echo "$as_me:5203: \"$ac_compile\"") >&5
5204   (eval $ac_compile) 2>&5
5205   ac_status=$?
5206   echo "$as_me:5206: \$? = $ac_status" >&5
5207   (exit $ac_status); } &&
5208          { ac_try='test -s conftest.$ac_objext'
5209   { (eval echo "$as_me:5209: \"$ac_try\"") >&5
5210   (eval $ac_try) 2>&5
5211   ac_status=$?
5212   echo "$as_me:5212: \$? = $ac_status" >&5
5213   (exit $ac_status); }; }; then
5214
5215         cf_cv_term_header="$cf_test"
5216 else
5217   echo "$as_me: failed program was:" >&5
5218 cat conftest.$ac_ext >&5
5219
5220         cf_cv_term_header=unknown
5221
5222 fi
5223 rm -f conftest.$ac_objext conftest.$ac_ext
5224         test "$cf_cv_term_header" != unknown && break
5225 done
5226
5227 fi
5228 echo "$as_me:5228: result: $cf_cv_term_header" >&5
5229 echo "${ECHO_T}$cf_cv_term_header" >&6
5230
5231 # Set definitions to allow ifdef'ing to accommodate subdirectories
5232
5233 case $cf_cv_term_header in # (vi
5234 *term.h)
5235         cat >>confdefs.h <<\EOF
5236 #define HAVE_TERM_H 1
5237 EOF
5238
5239         ;;
5240 esac
5241
5242 case $cf_cv_term_header in # (vi
5243 ncurses/term.h) #(vi
5244         cat >>confdefs.h <<\EOF
5245 #define HAVE_NCURSES_TERM_H 1
5246 EOF
5247
5248         ;;
5249 ncursesw/term.h)
5250         cat >>confdefs.h <<\EOF
5251 #define HAVE_NCURSESW_TERM_H 1
5252 EOF
5253
5254         ;;
5255 esac
5256
5257 # some applications need this, but should check for NCURSES_VERSION
5258 cat >>confdefs.h <<\EOF
5259 #define NCURSES 1
5260 EOF
5261
5262 echo "$as_me:5262: checking for ncurses version" >&5
5263 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
5264 if test "${cf_cv_ncurses_version+set}" = set; then
5265   echo $ECHO_N "(cached) $ECHO_C" >&6
5266 else
5267
5268         cf_cv_ncurses_version=no
5269         cf_tempfile=out$$
5270         rm -f $cf_tempfile
5271         if test "$cross_compiling" = yes; then
5272
5273         # This will not work if the preprocessor splits the line after the
5274         # Autoconf token.  The 'unproto' program does that.
5275         cat > conftest.$ac_ext <<EOF
5276 #include <${cf_cv_ncurses_header:-curses.h}>
5277 #undef Autoconf
5278 #ifdef NCURSES_VERSION
5279 Autoconf NCURSES_VERSION
5280 #else
5281 #ifdef __NCURSES_H
5282 Autoconf "old"
5283 #endif
5284 ;
5285 #endif
5286 EOF
5287         cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
5288         { (eval echo "$as_me:5288: \"$cf_try\"") >&5
5289   (eval $cf_try) 2>&5
5290   ac_status=$?
5291   echo "$as_me:5291: \$? = $ac_status" >&5
5292   (exit $ac_status); }
5293         if test -f conftest.out ; then
5294                 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
5295                 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
5296                 rm -f conftest.out
5297         fi
5298
5299 else
5300   cat >conftest.$ac_ext <<_ACEOF
5301 #line 5301 "configure"
5302 #include "confdefs.h"
5303
5304 #include <${cf_cv_ncurses_header:-curses.h}>
5305 #include <stdio.h>
5306 int main()
5307 {
5308         FILE *fp = fopen("$cf_tempfile", "w");
5309 #ifdef NCURSES_VERSION
5310 # ifdef NCURSES_VERSION_PATCH
5311         fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
5312 # else
5313         fprintf(fp, "%s\n", NCURSES_VERSION);
5314 # endif
5315 #else
5316 # ifdef __NCURSES_H
5317         fprintf(fp, "old\n");
5318 # else
5319         make an error
5320 # endif
5321 #endif
5322         ${cf_cv_main_return:-return}(0);
5323 }
5324 _ACEOF
5325 rm -f conftest$ac_exeext
5326 if { (eval echo "$as_me:5326: \"$ac_link\"") >&5
5327   (eval $ac_link) 2>&5
5328   ac_status=$?
5329   echo "$as_me:5329: \$? = $ac_status" >&5
5330   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5331   { (eval echo "$as_me:5331: \"$ac_try\"") >&5
5332   (eval $ac_try) 2>&5
5333   ac_status=$?
5334   echo "$as_me:5334: \$? = $ac_status" >&5
5335   (exit $ac_status); }; }; then
5336
5337         cf_cv_ncurses_version=`cat $cf_tempfile`
5338 else
5339   echo "$as_me: program exited with status $ac_status" >&5
5340 echo "$as_me: failed program was:" >&5
5341 cat conftest.$ac_ext >&5
5342 fi
5343 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5344 fi
5345         rm -f $cf_tempfile
5346
5347 fi
5348 echo "$as_me:5348: result: $cf_cv_ncurses_version" >&5
5349 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
5350 test "$cf_cv_ncurses_version" = no || cat >>confdefs.h <<\EOF
5351 #define NCURSES 1
5352 EOF
5353
5354 cf_nculib_root=ncursesw
5355         # This works, except for the special case where we find gpm, but
5356         # ncurses is in a nonstandard location via $LIBS, and we really want
5357         # to link gpm.
5358 cf_ncurses_LIBS=""
5359 cf_ncurses_SAVE="$LIBS"
5360 echo "$as_me:5360: checking for Gpm_Open in -lgpm" >&5
5361 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
5362 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
5363   echo $ECHO_N "(cached) $ECHO_C" >&6
5364 else
5365   ac_check_lib_save_LIBS=$LIBS
5366 LIBS="-lgpm  $LIBS"
5367 cat >conftest.$ac_ext <<_ACEOF
5368 #line 5368 "configure"
5369 #include "confdefs.h"
5370
5371 /* Override any gcc2 internal prototype to avoid an error.  */
5372 #ifdef __cplusplus
5373 extern "C"
5374 #endif
5375 /* We use char because int might match the return type of a gcc2
5376    builtin and then its argument prototype would still apply.  */
5377 char Gpm_Open ();
5378 int
5379 main ()
5380 {
5381 Gpm_Open ();
5382   ;
5383   return 0;
5384 }
5385 _ACEOF
5386 rm -f conftest.$ac_objext conftest$ac_exeext
5387 if { (eval echo "$as_me:5387: \"$ac_link\"") >&5
5388   (eval $ac_link) 2>&5
5389   ac_status=$?
5390   echo "$as_me:5390: \$? = $ac_status" >&5
5391   (exit $ac_status); } &&
5392          { ac_try='test -s conftest$ac_exeext'
5393   { (eval echo "$as_me:5393: \"$ac_try\"") >&5
5394   (eval $ac_try) 2>&5
5395   ac_status=$?
5396   echo "$as_me:5396: \$? = $ac_status" >&5
5397   (exit $ac_status); }; }; then
5398   ac_cv_lib_gpm_Gpm_Open=yes
5399 else
5400   echo "$as_me: failed program was:" >&5
5401 cat conftest.$ac_ext >&5
5402 ac_cv_lib_gpm_Gpm_Open=no
5403 fi
5404 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5405 LIBS=$ac_check_lib_save_LIBS
5406 fi
5407 echo "$as_me:5407: result: $ac_cv_lib_gpm_Gpm_Open" >&5
5408 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
5409 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
5410   echo "$as_me:5410: checking for initscr in -lgpm" >&5
5411 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
5412 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
5413   echo $ECHO_N "(cached) $ECHO_C" >&6
5414 else
5415   ac_check_lib_save_LIBS=$LIBS
5416 LIBS="-lgpm  $LIBS"
5417 cat >conftest.$ac_ext <<_ACEOF
5418 #line 5418 "configure"
5419 #include "confdefs.h"
5420
5421 /* Override any gcc2 internal prototype to avoid an error.  */
5422 #ifdef __cplusplus
5423 extern "C"
5424 #endif
5425 /* We use char because int might match the return type of a gcc2
5426    builtin and then its argument prototype would still apply.  */
5427 char initscr ();
5428 int
5429 main ()
5430 {
5431 initscr ();
5432   ;
5433   return 0;
5434 }
5435 _ACEOF
5436 rm -f conftest.$ac_objext conftest$ac_exeext
5437 if { (eval echo "$as_me:5437: \"$ac_link\"") >&5
5438   (eval $ac_link) 2>&5
5439   ac_status=$?
5440   echo "$as_me:5440: \$? = $ac_status" >&5
5441   (exit $ac_status); } &&
5442          { ac_try='test -s conftest$ac_exeext'
5443   { (eval echo "$as_me:5443: \"$ac_try\"") >&5
5444   (eval $ac_try) 2>&5
5445   ac_status=$?
5446   echo "$as_me:5446: \$? = $ac_status" >&5
5447   (exit $ac_status); }; }; then
5448   ac_cv_lib_gpm_initscr=yes
5449 else
5450   echo "$as_me: failed program was:" >&5
5451 cat conftest.$ac_ext >&5
5452 ac_cv_lib_gpm_initscr=no
5453 fi
5454 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5455 LIBS=$ac_check_lib_save_LIBS
5456 fi
5457 echo "$as_me:5457: result: $ac_cv_lib_gpm_initscr" >&5
5458 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
5459 if test $ac_cv_lib_gpm_initscr = yes; then
5460   LIBS="$cf_ncurses_SAVE"
5461 else
5462   cf_ncurses_LIBS="-lgpm"
5463 fi
5464
5465 fi
5466
5467 case $host_os in #(vi
5468 freebsd*)
5469         # This is only necessary if you are linking against an obsolete
5470         # version of ncurses (but it should do no harm, since it's static).
5471         if test "$cf_nculib_root" = ncurses ; then
5472                 echo "$as_me:5472: checking for tgoto in -lmytinfo" >&5
5473 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
5474 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
5475   echo $ECHO_N "(cached) $ECHO_C" >&6
5476 else
5477   ac_check_lib_save_LIBS=$LIBS
5478 LIBS="-lmytinfo  $LIBS"
5479 cat >conftest.$ac_ext <<_ACEOF
5480 #line 5480 "configure"
5481 #include "confdefs.h"
5482
5483 /* Override any gcc2 internal prototype to avoid an error.  */
5484 #ifdef __cplusplus
5485 extern "C"
5486 #endif
5487 /* We use char because int might match the return type of a gcc2
5488    builtin and then its argument prototype would still apply.  */
5489 char tgoto ();
5490 int
5491 main ()
5492 {
5493 tgoto ();
5494   ;
5495   return 0;
5496 }
5497 _ACEOF
5498 rm -f conftest.$ac_objext conftest$ac_exeext
5499 if { (eval echo "$as_me:5499: \"$ac_link\"") >&5
5500   (eval $ac_link) 2>&5
5501   ac_status=$?
5502   echo "$as_me:5502: \$? = $ac_status" >&5
5503   (exit $ac_status); } &&
5504          { ac_try='test -s conftest$ac_exeext'
5505   { (eval echo "$as_me:5505: \"$ac_try\"") >&5
5506   (eval $ac_try) 2>&5
5507   ac_status=$?
5508   echo "$as_me:5508: \$? = $ac_status" >&5
5509   (exit $ac_status); }; }; then
5510   ac_cv_lib_mytinfo_tgoto=yes
5511 else
5512   echo "$as_me: failed program was:" >&5
5513 cat conftest.$ac_ext >&5
5514 ac_cv_lib_mytinfo_tgoto=no
5515 fi
5516 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5517 LIBS=$ac_check_lib_save_LIBS
5518 fi
5519 echo "$as_me:5519: result: $ac_cv_lib_mytinfo_tgoto" >&5
5520 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
5521 if test $ac_cv_lib_mytinfo_tgoto = yes; then
5522   cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
5523 fi
5524
5525         fi
5526         ;;
5527 esac
5528
5529 LIBS="$cf_ncurses_LIBS $LIBS"
5530
5531 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
5532 then
5533         LIBS="-l$cf_nculib_root $LIBS"
5534 else
5535
5536         eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
5537         cf_libdir=""
5538         echo "$as_me:5538: checking for initscr" >&5
5539 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
5540 if test "${ac_cv_func_initscr+set}" = set; then
5541   echo $ECHO_N "(cached) $ECHO_C" >&6
5542 else
5543   cat >conftest.$ac_ext <<_ACEOF
5544 #line 5544 "configure"
5545 #include "confdefs.h"
5546 /* System header to define __stub macros and hopefully few prototypes,
5547     which can conflict with char initscr (); below.  */
5548 #include <assert.h>
5549 /* Override any gcc2 internal prototype to avoid an error.  */
5550 #ifdef __cplusplus
5551 extern "C"
5552 #endif
5553 /* We use char because int might match the return type of a gcc2
5554    builtin and then its argument prototype would still apply.  */
5555 char initscr ();
5556 char (*f) ();
5557
5558 int
5559 main ()
5560 {
5561 /* The GNU C library defines this for functions which it implements
5562     to always fail with ENOSYS.  Some functions are actually named
5563     something starting with __ and the normal name is an alias.  */
5564 #if defined (__stub_initscr) || defined (__stub___initscr)
5565 choke me
5566 #else
5567 f = initscr; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
5568 #endif
5569
5570   ;
5571   return 0;
5572 }
5573 _ACEOF
5574 rm -f conftest.$ac_objext conftest$ac_exeext
5575 if { (eval echo "$as_me:5575: \"$ac_link\"") >&5
5576   (eval $ac_link) 2>&5
5577   ac_status=$?
5578   echo "$as_me:5578: \$? = $ac_status" >&5
5579   (exit $ac_status); } &&
5580          { ac_try='test -s conftest$ac_exeext'
5581   { (eval echo "$as_me:5581: \"$ac_try\"") >&5
5582   (eval $ac_try) 2>&5
5583   ac_status=$?
5584   echo "$as_me:5584: \$? = $ac_status" >&5
5585   (exit $ac_status); }; }; then
5586   ac_cv_func_initscr=yes
5587 else
5588   echo "$as_me: failed program was:" >&5
5589 cat conftest.$ac_ext >&5
5590 ac_cv_func_initscr=no
5591 fi
5592 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5593 fi
5594 echo "$as_me:5594: result: $ac_cv_func_initscr" >&5
5595 echo "${ECHO_T}$ac_cv_func_initscr" >&6
5596 if test $ac_cv_func_initscr = yes; then
5597   eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
5598 else
5599
5600                 cf_save_LIBS="$LIBS"
5601                 echo "$as_me:5601: checking for initscr in -l$cf_nculib_root" >&5
5602 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
5603                 LIBS="-l$cf_nculib_root $LIBS"
5604                 cat >conftest.$ac_ext <<_ACEOF
5605 #line 5605 "configure"
5606 #include "confdefs.h"
5607 #include <${cf_cv_ncurses_header:-curses.h}>
5608 int
5609 main ()
5610 {
5611 initscr()
5612   ;
5613   return 0;
5614 }
5615 _ACEOF
5616 rm -f conftest.$ac_objext conftest$ac_exeext
5617 if { (eval echo "$as_me:5617: \"$ac_link\"") >&5
5618   (eval $ac_link) 2>&5
5619   ac_status=$?
5620   echo "$as_me:5620: \$? = $ac_status" >&5
5621   (exit $ac_status); } &&
5622          { ac_try='test -s conftest$ac_exeext'
5623   { (eval echo "$as_me:5623: \"$ac_try\"") >&5
5624   (eval $ac_try) 2>&5
5625   ac_status=$?
5626   echo "$as_me:5626: \$? = $ac_status" >&5
5627   (exit $ac_status); }; }; then
5628   echo "$as_me:5628: result: yes" >&5
5629 echo "${ECHO_T}yes" >&6
5630                          eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
5631
5632 else
5633   echo "$as_me: failed program was:" >&5
5634 cat conftest.$ac_ext >&5
5635 echo "$as_me:5635: result: no" >&5
5636 echo "${ECHO_T}no" >&6
5637
5638 cf_search=
5639 cf_library_path_list=""
5640 if test -n "${LDFLAGS}${LIBS}" ; then
5641         for cf_library_path in $LDFLAGS $LIBS
5642         do
5643                 case $cf_library_path in #(vi
5644                 -L*)
5645                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
5646
5647 test "$cf_library_path" != "NONE" && \
5648 test -d "$cf_library_path" && \
5649  {
5650         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
5651         test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
5652         test -d $cf_library_path/lib/$cf_nculib_root &&       cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
5653         test -d $cf_library_path/lib/$cf_nculib_root/lib &&    cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
5654         test -d $cf_library_path/$cf_nculib_root/lib &&       cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
5655         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"
5656 }
5657
5658                         cf_library_path_list="$cf_library_path_list $cf_search"
5659                         ;;
5660                 esac
5661         done
5662 fi
5663
5664 cf_search=
5665
5666 test "/usr" != "$prefix" && \
5667 test -d "/usr" && \
5668 (test $prefix = NONE || test "/usr" != "$prefix") && {
5669         test -n "$verbose" && echo "    ... testing for lib-directories under /usr"
5670         test -d /usr/lib &&          cf_search="$cf_search /usr/lib"
5671         test -d /usr/lib/$cf_nculib_root &&       cf_search="$cf_search /usr/lib/$cf_nculib_root"
5672         test -d /usr/lib/$cf_nculib_root/lib &&    cf_search="$cf_search /usr/lib/$cf_nculib_root/lib"
5673         test -d /usr/$cf_nculib_root/lib &&       cf_search="$cf_search /usr/$cf_nculib_root/lib"
5674         test -d /usr/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search /usr/$cf_nculib_root/lib/$cf_nculib_root"
5675 }
5676
5677 test "$prefix" != "NONE" && \
5678 test -d "$prefix" && \
5679  {
5680         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
5681         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
5682         test -d $prefix/lib/$cf_nculib_root &&       cf_search="$cf_search $prefix/lib/$cf_nculib_root"
5683         test -d $prefix/lib/$cf_nculib_root/lib &&    cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
5684         test -d $prefix/$cf_nculib_root/lib &&       cf_search="$cf_search $prefix/$cf_nculib_root/lib"
5685         test -d $prefix/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
5686 }
5687
5688 test "/usr/local" != "$prefix" && \
5689 test -d "/usr/local" && \
5690 (test $prefix = NONE || test "/usr/local" != "$prefix") && {
5691         test -n "$verbose" && echo "    ... testing for lib-directories under /usr/local"
5692         test -d /usr/local/lib &&          cf_search="$cf_search /usr/local/lib"
5693         test -d /usr/local/lib/$cf_nculib_root &&       cf_search="$cf_search /usr/local/lib/$cf_nculib_root"
5694         test -d /usr/local/lib/$cf_nculib_root/lib &&    cf_search="$cf_search /usr/local/lib/$cf_nculib_root/lib"
5695         test -d /usr/local/$cf_nculib_root/lib &&       cf_search="$cf_search /usr/local/$cf_nculib_root/lib"
5696         test -d /usr/local/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search /usr/local/$cf_nculib_root/lib/$cf_nculib_root"
5697 }
5698
5699 test "/opt" != "$prefix" && \
5700 test -d "/opt" && \
5701 (test $prefix = NONE || test "/opt" != "$prefix") && {
5702         test -n "$verbose" && echo "    ... testing for lib-directories under /opt"
5703         test -d /opt/lib &&          cf_search="$cf_search /opt/lib"
5704         test -d /opt/lib/$cf_nculib_root &&       cf_search="$cf_search /opt/lib/$cf_nculib_root"
5705         test -d /opt/lib/$cf_nculib_root/lib &&    cf_search="$cf_search /opt/lib/$cf_nculib_root/lib"
5706         test -d /opt/$cf_nculib_root/lib &&       cf_search="$cf_search /opt/$cf_nculib_root/lib"
5707         test -d /opt/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search /opt/$cf_nculib_root/lib/$cf_nculib_root"
5708 }
5709
5710 test "$HOME" != "$prefix" && \
5711 test -d "$HOME" && \
5712 (test $prefix = NONE || test "$HOME" != "$prefix") && {
5713         test -n "$verbose" && echo "    ... testing for lib-directories under $HOME"
5714         test -d $HOME/lib &&          cf_search="$cf_search $HOME/lib"
5715         test -d $HOME/lib/$cf_nculib_root &&       cf_search="$cf_search $HOME/lib/$cf_nculib_root"
5716         test -d $HOME/lib/$cf_nculib_root/lib &&    cf_search="$cf_search $HOME/lib/$cf_nculib_root/lib"
5717         test -d $HOME/$cf_nculib_root/lib &&       cf_search="$cf_search $HOME/$cf_nculib_root/lib"
5718         test -d $HOME/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search $HOME/$cf_nculib_root/lib/$cf_nculib_root"
5719 }
5720
5721 cf_search="$cf_library_path_list $cf_search"
5722
5723                         for cf_libdir in $cf_search
5724                         do
5725                                 echo "$as_me:5725: checking for -l$cf_nculib_root in $cf_libdir" >&5
5726 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
5727                                 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
5728                                 cat >conftest.$ac_ext <<_ACEOF
5729 #line 5729 "configure"
5730 #include "confdefs.h"
5731 #include <${cf_cv_ncurses_header:-curses.h}>
5732 int
5733 main ()
5734 {
5735 initscr()
5736   ;
5737   return 0;
5738 }
5739 _ACEOF
5740 rm -f conftest.$ac_objext conftest$ac_exeext
5741 if { (eval echo "$as_me:5741: \"$ac_link\"") >&5
5742   (eval $ac_link) 2>&5
5743   ac_status=$?
5744   echo "$as_me:5744: \$? = $ac_status" >&5
5745   (exit $ac_status); } &&
5746          { ac_try='test -s conftest$ac_exeext'
5747   { (eval echo "$as_me:5747: \"$ac_try\"") >&5
5748   (eval $ac_try) 2>&5
5749   ac_status=$?
5750   echo "$as_me:5750: \$? = $ac_status" >&5
5751   (exit $ac_status); }; }; then
5752   echo "$as_me:5752: result: yes" >&5
5753 echo "${ECHO_T}yes" >&6
5754                                          eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
5755                                          break
5756 else
5757   echo "$as_me: failed program was:" >&5
5758 cat conftest.$ac_ext >&5
5759 echo "$as_me:5759: result: no" >&5
5760 echo "${ECHO_T}no" >&6
5761                                          LIBS="$cf_save_LIBS"
5762 fi
5763 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5764                         done
5765
5766 fi
5767 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5768
5769 fi
5770
5771 eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root
5772
5773 if test $cf_found_library = no ; then
5774         { { echo "$as_me:5774: error: Cannot link $cf_nculib_root library" >&5
5775 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
5776    { (exit 1); exit 1; }; }
5777 fi
5778
5779 fi
5780
5781 if test -n "$cf_ncurses_LIBS" ; then
5782         echo "$as_me:5782: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
5783 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
5784         cf_ncurses_SAVE="$LIBS"
5785         for p in $cf_ncurses_LIBS ; do
5786                 q=`echo $LIBS | sed -e "s%$p %%" -e "s%$p$%%"`
5787                 if test "$q" != "$LIBS" ; then
5788                         LIBS="$q"
5789                 fi
5790         done
5791         cat >conftest.$ac_ext <<_ACEOF
5792 #line 5792 "configure"
5793 #include "confdefs.h"
5794 #include <${cf_cv_ncurses_header:-curses.h}>
5795 int
5796 main ()
5797 {
5798 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
5799   ;
5800   return 0;
5801 }
5802 _ACEOF
5803 rm -f conftest.$ac_objext conftest$ac_exeext
5804 if { (eval echo "$as_me:5804: \"$ac_link\"") >&5
5805   (eval $ac_link) 2>&5
5806   ac_status=$?
5807   echo "$as_me:5807: \$? = $ac_status" >&5
5808   (exit $ac_status); } &&
5809          { ac_try='test -s conftest$ac_exeext'
5810   { (eval echo "$as_me:5810: \"$ac_try\"") >&5
5811   (eval $ac_try) 2>&5
5812   ac_status=$?
5813   echo "$as_me:5813: \$? = $ac_status" >&5
5814   (exit $ac_status); }; }; then
5815   echo "$as_me:5815: result: yes" >&5
5816 echo "${ECHO_T}yes" >&6
5817 else
5818   echo "$as_me: failed program was:" >&5
5819 cat conftest.$ac_ext >&5
5820 echo "$as_me:5820: result: no" >&5
5821 echo "${ECHO_T}no" >&6
5822                  LIBS="$cf_ncurses_SAVE"
5823 fi
5824 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5825 fi
5826
5827 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
5828
5829 cat >>confdefs.h <<EOF
5830 #define $cf_nculib_ROOT 1
5831 EOF
5832
5833 fi
5834
5835 else
5836
5837 cf_ncuconfig_root=ncurses
5838
5839 echo "Looking for ${cf_ncuconfig_root}-config"
5840
5841 if test -n "$ac_tool_prefix"; then
5842   for ac_prog in ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
5843   do
5844     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5845 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5846 echo "$as_me:5846: checking for $ac_word" >&5
5847 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5848 if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
5849   echo $ECHO_N "(cached) $ECHO_C" >&6
5850 else
5851   if test -n "$NCURSES_CONFIG"; then
5852   ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
5853 else
5854   ac_save_IFS=$IFS; IFS=$ac_path_separator
5855 ac_dummy="$PATH"
5856 for ac_dir in $ac_dummy; do
5857   IFS=$ac_save_IFS
5858   test -z "$ac_dir" && ac_dir=.
5859   $as_executable_p "$ac_dir/$ac_word" || continue
5860 ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
5861 echo "$as_me:5861: found $ac_dir/$ac_word" >&5
5862 break
5863 done
5864
5865 fi
5866 fi
5867 NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
5868 if test -n "$NCURSES_CONFIG"; then
5869   echo "$as_me:5869: result: $NCURSES_CONFIG" >&5
5870 echo "${ECHO_T}$NCURSES_CONFIG" >&6
5871 else
5872   echo "$as_me:5872: result: no" >&5
5873 echo "${ECHO_T}no" >&6
5874 fi
5875
5876     test -n "$NCURSES_CONFIG" && break
5877   done
5878 fi
5879 if test -z "$NCURSES_CONFIG"; then
5880   ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
5881   for ac_prog in ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
5882 do
5883   # Extract the first word of "$ac_prog", so it can be a program name with args.
5884 set dummy $ac_prog; ac_word=$2
5885 echo "$as_me:5885: checking for $ac_word" >&5
5886 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5887 if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
5888   echo $ECHO_N "(cached) $ECHO_C" >&6
5889 else
5890   if test -n "$ac_ct_NCURSES_CONFIG"; then
5891   ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
5892 else
5893   ac_save_IFS=$IFS; IFS=$ac_path_separator
5894 ac_dummy="$PATH"
5895 for ac_dir in $ac_dummy; do
5896   IFS=$ac_save_IFS
5897   test -z "$ac_dir" && ac_dir=.
5898   $as_executable_p "$ac_dir/$ac_word" || continue
5899 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
5900 echo "$as_me:5900: found $ac_dir/$ac_word" >&5
5901 break
5902 done
5903
5904 fi
5905 fi
5906 ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
5907 if test -n "$ac_ct_NCURSES_CONFIG"; then
5908   echo "$as_me:5908: result: $ac_ct_NCURSES_CONFIG" >&5
5909 echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
5910 else
5911   echo "$as_me:5911: result: no" >&5
5912 echo "${ECHO_T}no" >&6
5913 fi
5914
5915   test -n "$ac_ct_NCURSES_CONFIG" && break
5916 done
5917 test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
5918
5919   NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
5920 fi
5921
5922 if test "$NCURSES_CONFIG" != none ; then
5923
5924 CPPFLAGS="$CPPFLAGS `$NCURSES_CONFIG --cflags`"
5925 LIBS="`$NCURSES_CONFIG --libs` $LIBS"
5926
5927 # even with config script, some packages use no-override for curses.h
5928
5929 echo "$as_me:5929: checking if we have identified curses headers" >&5
5930 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
5931 if test "${cf_cv_ncurses_header+set}" = set; then
5932   echo $ECHO_N "(cached) $ECHO_C" >&6
5933 else
5934
5935 cf_cv_ncurses_header=none
5936 for cf_header in  \
5937     ncurses/ncurses.h \
5938         ncurses/curses.h \
5939         ncurses.h \
5940         curses.h
5941 do
5942 cat >conftest.$ac_ext <<_ACEOF
5943 #line 5943 "configure"
5944 #include "confdefs.h"
5945 #include <${cf_header}>
5946 int
5947 main ()
5948 {
5949 initscr(); tgoto("?", 0,0)
5950   ;
5951   return 0;
5952 }
5953 _ACEOF
5954 rm -f conftest.$ac_objext
5955 if { (eval echo "$as_me:5955: \"$ac_compile\"") >&5
5956   (eval $ac_compile) 2>&5
5957   ac_status=$?
5958   echo "$as_me:5958: \$? = $ac_status" >&5
5959   (exit $ac_status); } &&
5960          { ac_try='test -s conftest.$ac_objext'
5961   { (eval echo "$as_me:5961: \"$ac_try\"") >&5
5962   (eval $ac_try) 2>&5
5963   ac_status=$?
5964   echo "$as_me:5964: \$? = $ac_status" >&5
5965   (exit $ac_status); }; }; then
5966   cf_cv_ncurses_header=$cf_header; break
5967 else
5968   echo "$as_me: failed program was:" >&5
5969 cat conftest.$ac_ext >&5
5970 fi
5971 rm -f conftest.$ac_objext conftest.$ac_ext
5972 done
5973
5974 fi
5975 echo "$as_me:5975: result: $cf_cv_ncurses_header" >&5
5976 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
5977
5978 if test "$cf_cv_ncurses_header" = none ; then
5979         { { echo "$as_me:5979: error: No curses header-files found" >&5
5980 echo "$as_me: error: No curses header-files found" >&2;}
5981    { (exit 1); exit 1; }; }
5982 fi
5983
5984 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
5985
5986 for ac_header in $cf_cv_ncurses_header
5987 do
5988 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5989 echo "$as_me:5989: checking for $ac_header" >&5
5990 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5991 if eval "test \"\${$as_ac_Header+set}\" = set"; then
5992   echo $ECHO_N "(cached) $ECHO_C" >&6
5993 else
5994   cat >conftest.$ac_ext <<_ACEOF
5995 #line 5995 "configure"
5996 #include "confdefs.h"
5997 #include <$ac_header>
5998 _ACEOF
5999 if { (eval echo "$as_me:5999: \"$ac_cpp conftest.$ac_ext\"") >&5
6000   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6001   ac_status=$?
6002   egrep -v '^ *\+' conftest.er1 >conftest.err
6003   rm -f conftest.er1
6004   cat conftest.err >&5
6005   echo "$as_me:6005: \$? = $ac_status" >&5
6006   (exit $ac_status); } >/dev/null; then
6007   if test -s conftest.err; then
6008     ac_cpp_err=$ac_c_preproc_warn_flag
6009   else
6010     ac_cpp_err=
6011   fi
6012 else
6013   ac_cpp_err=yes
6014 fi
6015 if test -z "$ac_cpp_err"; then
6016   eval "$as_ac_Header=yes"
6017 else
6018   echo "$as_me: failed program was:" >&5
6019   cat conftest.$ac_ext >&5
6020   eval "$as_ac_Header=no"
6021 fi
6022 rm -f conftest.err conftest.$ac_ext
6023 fi
6024 echo "$as_me:6024: result: `eval echo '${'$as_ac_Header'}'`" >&5
6025 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
6026 if test `eval echo '${'$as_ac_Header'}'` = yes; then
6027   cat >>confdefs.h <<EOF
6028 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6029 EOF
6030
6031 fi
6032 done
6033
6034 cat >>confdefs.h <<\EOF
6035 #define NCURSES 1
6036 EOF
6037
6038 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
6039
6040 cat >>confdefs.h <<EOF
6041 #define $cf_nculib_ROOT 1
6042 EOF
6043
6044 cf_cv_ncurses_version=`$NCURSES_CONFIG --version`
6045
6046 else
6047
6048 cf_ncuhdr_root=ncurses
6049
6050 test -n "$cf_cv_curses_dir" && \
6051 test "$cf_cv_curses_dir" != "no" && { \
6052
6053 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
6054   for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
6055   do
6056         while test $cf_add_incdir != /usr/include
6057         do
6058           if test -d $cf_add_incdir
6059           then
6060                 cf_have_incdir=no
6061                 if test -n "$CFLAGS$CPPFLAGS" ; then
6062                   # a loop is needed to ensure we can add subdirs of existing dirs
6063                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
6064                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
6065                           cf_have_incdir=yes; break
6066                         fi
6067                   done
6068                 fi
6069
6070                 if test "$cf_have_incdir" = no ; then
6071                   if test "$cf_add_incdir" = /usr/local/include ; then
6072                         if test "$GCC" = yes
6073                         then
6074                           cf_save_CPPFLAGS=$CPPFLAGS
6075                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6076                           cat >conftest.$ac_ext <<_ACEOF
6077 #line 6077 "configure"
6078 #include "confdefs.h"
6079 #include <stdio.h>
6080 int
6081 main ()
6082 {
6083 printf("Hello")
6084   ;
6085   return 0;
6086 }
6087 _ACEOF
6088 rm -f conftest.$ac_objext
6089 if { (eval echo "$as_me:6089: \"$ac_compile\"") >&5
6090   (eval $ac_compile) 2>&5
6091   ac_status=$?
6092   echo "$as_me:6092: \$? = $ac_status" >&5
6093   (exit $ac_status); } &&
6094          { ac_try='test -s conftest.$ac_objext'
6095   { (eval echo "$as_me:6095: \"$ac_try\"") >&5
6096   (eval $ac_try) 2>&5
6097   ac_status=$?
6098   echo "$as_me:6098: \$? = $ac_status" >&5
6099   (exit $ac_status); }; }; then
6100   :
6101 else
6102   echo "$as_me: failed program was:" >&5
6103 cat conftest.$ac_ext >&5
6104 cf_have_incdir=yes
6105 fi
6106 rm -f conftest.$ac_objext conftest.$ac_ext
6107                           CPPFLAGS=$cf_save_CPPFLAGS
6108                         fi
6109                   fi
6110                 fi
6111
6112                 if test "$cf_have_incdir" = no ; then
6113                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
6114
6115 echo "${as_me:-configure}:6115: testing adding $cf_add_incdir to include-path ..." 1>&5
6116
6117                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6118
6119                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
6120                   test "$cf_top_incdir" = "$cf_add_incdir" && break
6121                   cf_add_incdir="$cf_top_incdir"
6122                 else
6123                   break
6124                 fi
6125           fi
6126         done
6127   done
6128 fi
6129
6130 }
6131
6132 echo "$as_me:6132: checking for $cf_ncuhdr_root header in include-path" >&5
6133 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
6134 if test "${cf_cv_ncurses_h+set}" = set; then
6135   echo $ECHO_N "(cached) $ECHO_C" >&6
6136 else
6137
6138         cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
6139         ( test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw ) && cf_header_list="$cf_header_list curses.h ncurses.h"
6140         for cf_header in $cf_header_list
6141         do
6142
6143         cat >conftest.$ac_ext <<_ACEOF
6144 #line 6144 "configure"
6145 #include "confdefs.h"
6146
6147 #include <$cf_header>
6148 int
6149 main ()
6150 {
6151
6152 #ifdef NCURSES_VERSION
6153
6154 printf("%s\n", NCURSES_VERSION);
6155 #else
6156 #ifdef __NCURSES_H
6157 printf("old\n");
6158 #else
6159         make an error
6160 #endif
6161 #endif
6162
6163   ;
6164   return 0;
6165 }
6166 _ACEOF
6167 rm -f conftest.$ac_objext
6168 if { (eval echo "$as_me:6168: \"$ac_compile\"") >&5
6169   (eval $ac_compile) 2>&5
6170   ac_status=$?
6171   echo "$as_me:6171: \$? = $ac_status" >&5
6172   (exit $ac_status); } &&
6173          { ac_try='test -s conftest.$ac_objext'
6174   { (eval echo "$as_me:6174: \"$ac_try\"") >&5
6175   (eval $ac_try) 2>&5
6176   ac_status=$?
6177   echo "$as_me:6177: \$? = $ac_status" >&5
6178   (exit $ac_status); }; }; then
6179   cf_cv_ncurses_h=$cf_header
6180
6181 else
6182   echo "$as_me: failed program was:" >&5
6183 cat conftest.$ac_ext >&5
6184 cf_cv_ncurses_h=no
6185 fi
6186 rm -f conftest.$ac_objext conftest.$ac_ext
6187
6188                 test "$cf_cv_ncurses_h" != no && break
6189         done
6190
6191 fi
6192 echo "$as_me:6192: result: $cf_cv_ncurses_h" >&5
6193 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
6194
6195 if test "$cf_cv_ncurses_h" != no ; then
6196         cf_cv_ncurses_header=$cf_cv_ncurses_h
6197 else
6198
6199 echo "$as_me:6199: checking for $cf_ncuhdr_root include-path" >&5
6200 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
6201 if test "${cf_cv_ncurses_h2+set}" = set; then
6202   echo $ECHO_N "(cached) $ECHO_C" >&6
6203 else
6204
6205         test -n "$verbose" && echo
6206
6207 cf_search=
6208
6209 # collect the current set of include-directories from compiler flags
6210 cf_header_path_list=""
6211 if test -n "${CFLAGS}${CPPFLAGS}" ; then
6212         for cf_header_path in $CPPFLAGS $CFLAGS
6213         do
6214                 case $cf_header_path in #(vi
6215                 -I*)
6216                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
6217
6218 test "$cf_header_path" != "NONE" && \
6219 test -d "$cf_header_path" && \
6220  {
6221         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
6222         test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
6223         test -d $cf_header_path/include/$cf_ncuhdr_root &&       cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
6224         test -d $cf_header_path/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
6225         test -d $cf_header_path/$cf_ncuhdr_root/include &&       cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
6226         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"
6227 }
6228
6229                         cf_header_path_list="$cf_header_path_list $cf_search"
6230                         ;;
6231                 esac
6232         done
6233 fi
6234
6235 # add the variations for the package we are looking for
6236
6237 cf_search=
6238
6239 test "/usr" != "$prefix" && \
6240 test -d "/usr" && \
6241 (test $prefix = NONE || test "/usr" != "$prefix") && {
6242         test -n "$verbose" && echo "    ... testing for include-directories under /usr"
6243         test -d /usr/include &&          cf_search="$cf_search /usr/include"
6244         test -d /usr/include/$cf_ncuhdr_root &&       cf_search="$cf_search /usr/include/$cf_ncuhdr_root"
6245         test -d /usr/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search /usr/include/$cf_ncuhdr_root/include"
6246         test -d /usr/$cf_ncuhdr_root/include &&       cf_search="$cf_search /usr/$cf_ncuhdr_root/include"
6247         test -d /usr/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search /usr/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
6248 }
6249
6250 test "$prefix" != "NONE" && \
6251 test -d "$prefix" && \
6252  {
6253         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
6254         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
6255         test -d $prefix/include/$cf_ncuhdr_root &&       cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
6256         test -d $prefix/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
6257         test -d $prefix/$cf_ncuhdr_root/include &&       cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
6258         test -d $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
6259 }
6260
6261 test "/usr/local" != "$prefix" && \
6262 test -d "/usr/local" && \
6263 (test $prefix = NONE || test "/usr/local" != "$prefix") && {
6264         test -n "$verbose" && echo "    ... testing for include-directories under /usr/local"
6265         test -d /usr/local/include &&          cf_search="$cf_search /usr/local/include"
6266         test -d /usr/local/include/$cf_ncuhdr_root &&       cf_search="$cf_search /usr/local/include/$cf_ncuhdr_root"
6267         test -d /usr/local/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search /usr/local/include/$cf_ncuhdr_root/include"
6268         test -d /usr/local/$cf_ncuhdr_root/include &&       cf_search="$cf_search /usr/local/$cf_ncuhdr_root/include"
6269         test -d /usr/local/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search /usr/local/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
6270 }
6271
6272 test "/opt" != "$prefix" && \
6273 test -d "/opt" && \
6274 (test $prefix = NONE || test "/opt" != "$prefix") && {
6275         test -n "$verbose" && echo "    ... testing for include-directories under /opt"
6276         test -d /opt/include &&          cf_search="$cf_search /opt/include"
6277         test -d /opt/include/$cf_ncuhdr_root &&       cf_search="$cf_search /opt/include/$cf_ncuhdr_root"
6278         test -d /opt/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search /opt/include/$cf_ncuhdr_root/include"
6279         test -d /opt/$cf_ncuhdr_root/include &&       cf_search="$cf_search /opt/$cf_ncuhdr_root/include"
6280         test -d /opt/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search /opt/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
6281 }
6282
6283 test "$HOME" != "$prefix" && \
6284 test -d "$HOME" && \
6285 (test $prefix = NONE || test "$HOME" != "$prefix") && {
6286         test -n "$verbose" && echo "    ... testing for include-directories under $HOME"
6287         test -d $HOME/include &&          cf_search="$cf_search $HOME/include"
6288         test -d $HOME/include/$cf_ncuhdr_root &&       cf_search="$cf_search $HOME/include/$cf_ncuhdr_root"
6289         test -d $HOME/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search $HOME/include/$cf_ncuhdr_root/include"
6290         test -d $HOME/$cf_ncuhdr_root/include &&       cf_search="$cf_search $HOME/$cf_ncuhdr_root/include"
6291         test -d $HOME/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search $HOME/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
6292 }
6293
6294 test "$includedir" != NONE && \
6295 test "$includedir" != "/usr/include" && \
6296 test -d "$includedir" && {
6297         test -d $includedir &&    cf_search="$cf_search $includedir"
6298         test -d $includedir/$cf_ncuhdr_root && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
6299 }
6300
6301 test "$oldincludedir" != NONE && \
6302 test "$oldincludedir" != "/usr/include" && \
6303 test -d "$oldincludedir" && {
6304         test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
6305         test -d $oldincludedir/$cf_ncuhdr_root && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
6306 }
6307
6308 cf_search="$cf_search $cf_header_path_list"
6309
6310         test -n "$verbose" && echo search path $cf_search
6311         cf_save2_CPPFLAGS="$CPPFLAGS"
6312         for cf_incdir in $cf_search
6313         do
6314
6315 if test -n "$cf_incdir" ; then
6316   for cf_add_incdir in $cf_incdir
6317   do
6318         while test $cf_add_incdir != /usr/include
6319         do
6320           if test -d $cf_add_incdir
6321           then
6322                 cf_have_incdir=no
6323                 if test -n "$CFLAGS$CPPFLAGS" ; then
6324                   # a loop is needed to ensure we can add subdirs of existing dirs
6325                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
6326                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
6327                           cf_have_incdir=yes; break
6328                         fi
6329                   done
6330                 fi
6331
6332                 if test "$cf_have_incdir" = no ; then
6333                   if test "$cf_add_incdir" = /usr/local/include ; then
6334                         if test "$GCC" = yes
6335                         then
6336                           cf_save_CPPFLAGS=$CPPFLAGS
6337                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6338                           cat >conftest.$ac_ext <<_ACEOF
6339 #line 6339 "configure"
6340 #include "confdefs.h"
6341 #include <stdio.h>
6342 int
6343 main ()
6344 {
6345 printf("Hello")
6346   ;
6347   return 0;
6348 }
6349 _ACEOF
6350 rm -f conftest.$ac_objext
6351 if { (eval echo "$as_me:6351: \"$ac_compile\"") >&5
6352   (eval $ac_compile) 2>&5
6353   ac_status=$?
6354   echo "$as_me:6354: \$? = $ac_status" >&5
6355   (exit $ac_status); } &&
6356          { ac_try='test -s conftest.$ac_objext'
6357   { (eval echo "$as_me:6357: \"$ac_try\"") >&5
6358   (eval $ac_try) 2>&5
6359   ac_status=$?
6360   echo "$as_me:6360: \$? = $ac_status" >&5
6361   (exit $ac_status); }; }; then
6362   :
6363 else
6364   echo "$as_me: failed program was:" >&5
6365 cat conftest.$ac_ext >&5
6366 cf_have_incdir=yes
6367 fi
6368 rm -f conftest.$ac_objext conftest.$ac_ext
6369                           CPPFLAGS=$cf_save_CPPFLAGS
6370                         fi
6371                   fi
6372                 fi
6373
6374                 if test "$cf_have_incdir" = no ; then
6375                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
6376
6377 echo "${as_me:-configure}:6377: testing adding $cf_add_incdir to include-path ..." 1>&5
6378
6379                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6380
6381                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
6382                   test "$cf_top_incdir" = "$cf_add_incdir" && break
6383                   cf_add_incdir="$cf_top_incdir"
6384                 else
6385                   break
6386                 fi
6387           fi
6388         done
6389   done
6390 fi
6391
6392                 for cf_header in \
6393                         ncurses.h \
6394                         curses.h
6395                 do
6396
6397         cat >conftest.$ac_ext <<_ACEOF
6398 #line 6398 "configure"
6399 #include "confdefs.h"
6400
6401 #include <$cf_header>
6402 int
6403 main ()
6404 {
6405
6406 #ifdef NCURSES_VERSION
6407
6408 printf("%s\n", NCURSES_VERSION);
6409 #else
6410 #ifdef __NCURSES_H
6411 printf("old\n");
6412 #else
6413         make an error
6414 #endif
6415 #endif
6416
6417   ;
6418   return 0;
6419 }
6420 _ACEOF
6421 rm -f conftest.$ac_objext
6422 if { (eval echo "$as_me:6422: \"$ac_compile\"") >&5
6423   (eval $ac_compile) 2>&5
6424   ac_status=$?
6425   echo "$as_me:6425: \$? = $ac_status" >&5
6426   (exit $ac_status); } &&
6427          { ac_try='test -s conftest.$ac_objext'
6428   { (eval echo "$as_me:6428: \"$ac_try\"") >&5
6429   (eval $ac_try) 2>&5
6430   ac_status=$?
6431   echo "$as_me:6431: \$? = $ac_status" >&5
6432   (exit $ac_status); }; }; then
6433   cf_cv_ncurses_h2=$cf_header
6434
6435 else
6436   echo "$as_me: failed program was:" >&5
6437 cat conftest.$ac_ext >&5
6438 cf_cv_ncurses_h2=no
6439 fi
6440 rm -f conftest.$ac_objext conftest.$ac_ext
6441
6442                         if test "$cf_cv_ncurses_h2" != no ; then
6443                                 cf_cv_ncurses_h2=$cf_incdir/$cf_header
6444                                 test -n "$verbose" && echo $ac_n "      ... found $ac_c" 1>&6
6445                                 break
6446                         fi
6447                         test -n "$verbose" && echo "    ... tested $cf_incdir/$cf_header" 1>&6
6448                 done
6449                 CPPFLAGS="$cf_save2_CPPFLAGS"
6450                 test "$cf_cv_ncurses_h2" != no && break
6451         done
6452         test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:6452: error: not found" >&5
6453 echo "$as_me: error: not found" >&2;}
6454    { (exit 1); exit 1; }; }
6455
6456 fi
6457 echo "$as_me:6457: result: $cf_cv_ncurses_h2" >&5
6458 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
6459
6460         cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's%/[^/]*$%%'`
6461         cf_cv_ncurses_header=`basename $cf_cv_ncurses_h2`
6462         if test `basename $cf_1st_incdir` = $cf_ncuhdr_root ; then
6463                 cf_cv_ncurses_header=$cf_ncuhdr_root/$cf_cv_ncurses_header
6464         fi
6465
6466 if test -n "$cf_1st_incdir" ; then
6467   for cf_add_incdir in $cf_1st_incdir
6468   do
6469         while test $cf_add_incdir != /usr/include
6470         do
6471           if test -d $cf_add_incdir
6472           then
6473                 cf_have_incdir=no
6474                 if test -n "$CFLAGS$CPPFLAGS" ; then
6475                   # a loop is needed to ensure we can add subdirs of existing dirs
6476                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
6477                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
6478                           cf_have_incdir=yes; break
6479                         fi
6480                   done
6481                 fi
6482
6483                 if test "$cf_have_incdir" = no ; then
6484                   if test "$cf_add_incdir" = /usr/local/include ; then
6485                         if test "$GCC" = yes
6486                         then
6487                           cf_save_CPPFLAGS=$CPPFLAGS
6488                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6489                           cat >conftest.$ac_ext <<_ACEOF
6490 #line 6490 "configure"
6491 #include "confdefs.h"
6492 #include <stdio.h>
6493 int
6494 main ()
6495 {
6496 printf("Hello")
6497   ;
6498   return 0;
6499 }
6500 _ACEOF
6501 rm -f conftest.$ac_objext
6502 if { (eval echo "$as_me:6502: \"$ac_compile\"") >&5
6503   (eval $ac_compile) 2>&5
6504   ac_status=$?
6505   echo "$as_me:6505: \$? = $ac_status" >&5
6506   (exit $ac_status); } &&
6507          { ac_try='test -s conftest.$ac_objext'
6508   { (eval echo "$as_me:6508: \"$ac_try\"") >&5
6509   (eval $ac_try) 2>&5
6510   ac_status=$?
6511   echo "$as_me:6511: \$? = $ac_status" >&5
6512   (exit $ac_status); }; }; then
6513   :
6514 else
6515   echo "$as_me: failed program was:" >&5
6516 cat conftest.$ac_ext >&5
6517 cf_have_incdir=yes
6518 fi
6519 rm -f conftest.$ac_objext conftest.$ac_ext
6520                           CPPFLAGS=$cf_save_CPPFLAGS
6521                         fi
6522                   fi
6523                 fi
6524
6525                 if test "$cf_have_incdir" = no ; then
6526                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
6527
6528 echo "${as_me:-configure}:6528: testing adding $cf_add_incdir to include-path ..." 1>&5
6529
6530                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6531
6532                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
6533                   test "$cf_top_incdir" = "$cf_add_incdir" && break
6534                   cf_add_incdir="$cf_top_incdir"
6535                 else
6536                   break
6537                 fi
6538           fi
6539         done
6540   done
6541 fi
6542
6543 fi
6544
6545 # Set definitions to allow ifdef'ing for ncurses.h
6546
6547 case $cf_cv_ncurses_header in # (vi
6548 *ncurses.h)
6549         cat >>confdefs.h <<\EOF
6550 #define HAVE_NCURSES_H 1
6551 EOF
6552
6553         ;;
6554 esac
6555
6556 case $cf_cv_ncurses_header in # (vi
6557 ncurses/curses.h|ncurses/ncurses.h)
6558         cat >>confdefs.h <<\EOF
6559 #define HAVE_NCURSES_NCURSES_H 1
6560 EOF
6561
6562         ;;
6563 ncursesw/curses.h|ncursesw/ncurses.h)
6564         cat >>confdefs.h <<\EOF
6565 #define HAVE_NCURSESW_NCURSES_H 1
6566 EOF
6567
6568         ;;
6569 esac
6570
6571 echo "$as_me:6571: checking for terminfo header" >&5
6572 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
6573 if test "${cf_cv_term_header+set}" = set; then
6574   echo $ECHO_N "(cached) $ECHO_C" >&6
6575 else
6576
6577 case ${cf_cv_ncurses_header} in #(vi
6578 */ncurses.h|*/ncursesw.h) #(vi
6579         cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
6580         ;;
6581 *)
6582         cf_term_header=term.h
6583         ;;
6584 esac
6585
6586 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
6587 do
6588 cat >conftest.$ac_ext <<_ACEOF
6589 #line 6589 "configure"
6590 #include "confdefs.h"
6591 #include <stdio.h>
6592 #include <${cf_cv_ncurses_header:-curses.h}>
6593 #include <$cf_test>
6594
6595 int
6596 main ()
6597 {
6598 int x = auto_left_margin
6599   ;
6600   return 0;
6601 }
6602 _ACEOF
6603 rm -f conftest.$ac_objext
6604 if { (eval echo "$as_me:6604: \"$ac_compile\"") >&5
6605   (eval $ac_compile) 2>&5
6606   ac_status=$?
6607   echo "$as_me:6607: \$? = $ac_status" >&5
6608   (exit $ac_status); } &&
6609          { ac_try='test -s conftest.$ac_objext'
6610   { (eval echo "$as_me:6610: \"$ac_try\"") >&5
6611   (eval $ac_try) 2>&5
6612   ac_status=$?
6613   echo "$as_me:6613: \$? = $ac_status" >&5
6614   (exit $ac_status); }; }; then
6615
6616         cf_cv_term_header="$cf_test"
6617 else
6618   echo "$as_me: failed program was:" >&5
6619 cat conftest.$ac_ext >&5
6620
6621         cf_cv_term_header=unknown
6622
6623 fi
6624 rm -f conftest.$ac_objext conftest.$ac_ext
6625         test "$cf_cv_term_header" != unknown && break
6626 done
6627
6628 fi
6629 echo "$as_me:6629: result: $cf_cv_term_header" >&5
6630 echo "${ECHO_T}$cf_cv_term_header" >&6
6631
6632 # Set definitions to allow ifdef'ing to accommodate subdirectories
6633
6634 case $cf_cv_term_header in # (vi
6635 *term.h)
6636         cat >>confdefs.h <<\EOF
6637 #define HAVE_TERM_H 1
6638 EOF
6639
6640         ;;
6641 esac
6642
6643 case $cf_cv_term_header in # (vi
6644 ncurses/term.h) #(vi
6645         cat >>confdefs.h <<\EOF
6646 #define HAVE_NCURSES_TERM_H 1
6647 EOF
6648
6649         ;;
6650 ncursesw/term.h)
6651         cat >>confdefs.h <<\EOF
6652 #define HAVE_NCURSESW_TERM_H 1
6653 EOF
6654
6655         ;;
6656 esac
6657
6658 # some applications need this, but should check for NCURSES_VERSION
6659 cat >>confdefs.h <<\EOF
6660 #define NCURSES 1
6661 EOF
6662
6663 echo "$as_me:6663: checking for ncurses version" >&5
6664 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
6665 if test "${cf_cv_ncurses_version+set}" = set; then
6666   echo $ECHO_N "(cached) $ECHO_C" >&6
6667 else
6668
6669         cf_cv_ncurses_version=no
6670         cf_tempfile=out$$
6671         rm -f $cf_tempfile
6672         if test "$cross_compiling" = yes; then
6673
6674         # This will not work if the preprocessor splits the line after the
6675         # Autoconf token.  The 'unproto' program does that.
6676         cat > conftest.$ac_ext <<EOF
6677 #include <${cf_cv_ncurses_header:-curses.h}>
6678 #undef Autoconf
6679 #ifdef NCURSES_VERSION
6680 Autoconf NCURSES_VERSION
6681 #else
6682 #ifdef __NCURSES_H
6683 Autoconf "old"
6684 #endif
6685 ;
6686 #endif
6687 EOF
6688         cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
6689         { (eval echo "$as_me:6689: \"$cf_try\"") >&5
6690   (eval $cf_try) 2>&5
6691   ac_status=$?
6692   echo "$as_me:6692: \$? = $ac_status" >&5
6693   (exit $ac_status); }
6694         if test -f conftest.out ; then
6695                 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
6696                 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
6697                 rm -f conftest.out
6698         fi
6699
6700 else
6701   cat >conftest.$ac_ext <<_ACEOF
6702 #line 6702 "configure"
6703 #include "confdefs.h"
6704
6705 #include <${cf_cv_ncurses_header:-curses.h}>
6706 #include <stdio.h>
6707 int main()
6708 {
6709         FILE *fp = fopen("$cf_tempfile", "w");
6710 #ifdef NCURSES_VERSION
6711 # ifdef NCURSES_VERSION_PATCH
6712         fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
6713 # else
6714         fprintf(fp, "%s\n", NCURSES_VERSION);
6715 # endif
6716 #else
6717 # ifdef __NCURSES_H
6718         fprintf(fp, "old\n");
6719 # else
6720         make an error
6721 # endif
6722 #endif
6723         ${cf_cv_main_return:-return}(0);
6724 }
6725 _ACEOF
6726 rm -f conftest$ac_exeext
6727 if { (eval echo "$as_me:6727: \"$ac_link\"") >&5
6728   (eval $ac_link) 2>&5
6729   ac_status=$?
6730   echo "$as_me:6730: \$? = $ac_status" >&5
6731   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6732   { (eval echo "$as_me:6732: \"$ac_try\"") >&5
6733   (eval $ac_try) 2>&5
6734   ac_status=$?
6735   echo "$as_me:6735: \$? = $ac_status" >&5
6736   (exit $ac_status); }; }; then
6737
6738         cf_cv_ncurses_version=`cat $cf_tempfile`
6739 else
6740   echo "$as_me: program exited with status $ac_status" >&5
6741 echo "$as_me: failed program was:" >&5
6742 cat conftest.$ac_ext >&5
6743 fi
6744 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6745 fi
6746         rm -f $cf_tempfile
6747
6748 fi
6749 echo "$as_me:6749: result: $cf_cv_ncurses_version" >&5
6750 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
6751 test "$cf_cv_ncurses_version" = no || cat >>confdefs.h <<\EOF
6752 #define NCURSES 1
6753 EOF
6754
6755 cf_nculib_root=ncurses
6756         # This works, except for the special case where we find gpm, but
6757         # ncurses is in a nonstandard location via $LIBS, and we really want
6758         # to link gpm.
6759 cf_ncurses_LIBS=""
6760 cf_ncurses_SAVE="$LIBS"
6761 echo "$as_me:6761: checking for Gpm_Open in -lgpm" >&5
6762 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
6763 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
6764   echo $ECHO_N "(cached) $ECHO_C" >&6
6765 else
6766   ac_check_lib_save_LIBS=$LIBS
6767 LIBS="-lgpm  $LIBS"
6768 cat >conftest.$ac_ext <<_ACEOF
6769 #line 6769 "configure"
6770 #include "confdefs.h"
6771
6772 /* Override any gcc2 internal prototype to avoid an error.  */
6773 #ifdef __cplusplus
6774 extern "C"
6775 #endif
6776 /* We use char because int might match the return type of a gcc2
6777    builtin and then its argument prototype would still apply.  */
6778 char Gpm_Open ();
6779 int
6780 main ()
6781 {
6782 Gpm_Open ();
6783   ;
6784   return 0;
6785 }
6786 _ACEOF
6787 rm -f conftest.$ac_objext conftest$ac_exeext
6788 if { (eval echo "$as_me:6788: \"$ac_link\"") >&5
6789   (eval $ac_link) 2>&5
6790   ac_status=$?
6791   echo "$as_me:6791: \$? = $ac_status" >&5
6792   (exit $ac_status); } &&
6793          { ac_try='test -s conftest$ac_exeext'
6794   { (eval echo "$as_me:6794: \"$ac_try\"") >&5
6795   (eval $ac_try) 2>&5
6796   ac_status=$?
6797   echo "$as_me:6797: \$? = $ac_status" >&5
6798   (exit $ac_status); }; }; then
6799   ac_cv_lib_gpm_Gpm_Open=yes
6800 else
6801   echo "$as_me: failed program was:" >&5
6802 cat conftest.$ac_ext >&5
6803 ac_cv_lib_gpm_Gpm_Open=no
6804 fi
6805 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6806 LIBS=$ac_check_lib_save_LIBS
6807 fi
6808 echo "$as_me:6808: result: $ac_cv_lib_gpm_Gpm_Open" >&5
6809 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
6810 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
6811   echo "$as_me:6811: checking for initscr in -lgpm" >&5
6812 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
6813 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
6814   echo $ECHO_N "(cached) $ECHO_C" >&6
6815 else
6816   ac_check_lib_save_LIBS=$LIBS
6817 LIBS="-lgpm  $LIBS"
6818 cat >conftest.$ac_ext <<_ACEOF
6819 #line 6819 "configure"
6820 #include "confdefs.h"
6821
6822 /* Override any gcc2 internal prototype to avoid an error.  */
6823 #ifdef __cplusplus
6824 extern "C"
6825 #endif
6826 /* We use char because int might match the return type of a gcc2
6827    builtin and then its argument prototype would still apply.  */
6828 char initscr ();
6829 int
6830 main ()
6831 {
6832 initscr ();
6833   ;
6834   return 0;
6835 }
6836 _ACEOF
6837 rm -f conftest.$ac_objext conftest$ac_exeext
6838 if { (eval echo "$as_me:6838: \"$ac_link\"") >&5
6839   (eval $ac_link) 2>&5
6840   ac_status=$?
6841   echo "$as_me:6841: \$? = $ac_status" >&5
6842   (exit $ac_status); } &&
6843          { ac_try='test -s conftest$ac_exeext'
6844   { (eval echo "$as_me:6844: \"$ac_try\"") >&5
6845   (eval $ac_try) 2>&5
6846   ac_status=$?
6847   echo "$as_me:6847: \$? = $ac_status" >&5
6848   (exit $ac_status); }; }; then
6849   ac_cv_lib_gpm_initscr=yes
6850 else
6851   echo "$as_me: failed program was:" >&5
6852 cat conftest.$ac_ext >&5
6853 ac_cv_lib_gpm_initscr=no
6854 fi
6855 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6856 LIBS=$ac_check_lib_save_LIBS
6857 fi
6858 echo "$as_me:6858: result: $ac_cv_lib_gpm_initscr" >&5
6859 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
6860 if test $ac_cv_lib_gpm_initscr = yes; then
6861   LIBS="$cf_ncurses_SAVE"
6862 else
6863   cf_ncurses_LIBS="-lgpm"
6864 fi
6865
6866 fi
6867
6868 case $host_os in #(vi
6869 freebsd*)
6870         # This is only necessary if you are linking against an obsolete
6871         # version of ncurses (but it should do no harm, since it's static).
6872         if test "$cf_nculib_root" = ncurses ; then
6873                 echo "$as_me:6873: checking for tgoto in -lmytinfo" >&5
6874 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
6875 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
6876   echo $ECHO_N "(cached) $ECHO_C" >&6
6877 else
6878   ac_check_lib_save_LIBS=$LIBS
6879 LIBS="-lmytinfo  $LIBS"
6880 cat >conftest.$ac_ext <<_ACEOF
6881 #line 6881 "configure"
6882 #include "confdefs.h"
6883
6884 /* Override any gcc2 internal prototype to avoid an error.  */
6885 #ifdef __cplusplus
6886 extern "C"
6887 #endif
6888 /* We use char because int might match the return type of a gcc2
6889    builtin and then its argument prototype would still apply.  */
6890 char tgoto ();
6891 int
6892 main ()
6893 {
6894 tgoto ();
6895   ;
6896   return 0;
6897 }
6898 _ACEOF
6899 rm -f conftest.$ac_objext conftest$ac_exeext
6900 if { (eval echo "$as_me:6900: \"$ac_link\"") >&5
6901   (eval $ac_link) 2>&5
6902   ac_status=$?
6903   echo "$as_me:6903: \$? = $ac_status" >&5
6904   (exit $ac_status); } &&
6905          { ac_try='test -s conftest$ac_exeext'
6906   { (eval echo "$as_me:6906: \"$ac_try\"") >&5
6907   (eval $ac_try) 2>&5
6908   ac_status=$?
6909   echo "$as_me:6909: \$? = $ac_status" >&5
6910   (exit $ac_status); }; }; then
6911   ac_cv_lib_mytinfo_tgoto=yes
6912 else
6913   echo "$as_me: failed program was:" >&5
6914 cat conftest.$ac_ext >&5
6915 ac_cv_lib_mytinfo_tgoto=no
6916 fi
6917 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6918 LIBS=$ac_check_lib_save_LIBS
6919 fi
6920 echo "$as_me:6920: result: $ac_cv_lib_mytinfo_tgoto" >&5
6921 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
6922 if test $ac_cv_lib_mytinfo_tgoto = yes; then
6923   cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
6924 fi
6925
6926         fi
6927         ;;
6928 esac
6929
6930 LIBS="$cf_ncurses_LIBS $LIBS"
6931
6932 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
6933 then
6934         LIBS="-l$cf_nculib_root $LIBS"
6935 else
6936
6937         eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
6938         cf_libdir=""
6939         echo "$as_me:6939: checking for initscr" >&5
6940 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
6941 if test "${ac_cv_func_initscr+set}" = set; then
6942   echo $ECHO_N "(cached) $ECHO_C" >&6
6943 else
6944   cat >conftest.$ac_ext <<_ACEOF
6945 #line 6945 "configure"
6946 #include "confdefs.h"
6947 /* System header to define __stub macros and hopefully few prototypes,
6948     which can conflict with char initscr (); below.  */
6949 #include <assert.h>
6950 /* Override any gcc2 internal prototype to avoid an error.  */
6951 #ifdef __cplusplus
6952 extern "C"
6953 #endif
6954 /* We use char because int might match the return type of a gcc2
6955    builtin and then its argument prototype would still apply.  */
6956 char initscr ();
6957 char (*f) ();
6958
6959 int
6960 main ()
6961 {
6962 /* The GNU C library defines this for functions which it implements
6963     to always fail with ENOSYS.  Some functions are actually named
6964     something starting with __ and the normal name is an alias.  */
6965 #if defined (__stub_initscr) || defined (__stub___initscr)
6966 choke me
6967 #else
6968 f = initscr; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
6969 #endif
6970
6971   ;
6972   return 0;
6973 }
6974 _ACEOF
6975 rm -f conftest.$ac_objext conftest$ac_exeext
6976 if { (eval echo "$as_me:6976: \"$ac_link\"") >&5
6977   (eval $ac_link) 2>&5
6978   ac_status=$?
6979   echo "$as_me:6979: \$? = $ac_status" >&5
6980   (exit $ac_status); } &&
6981          { ac_try='test -s conftest$ac_exeext'
6982   { (eval echo "$as_me:6982: \"$ac_try\"") >&5
6983   (eval $ac_try) 2>&5
6984   ac_status=$?
6985   echo "$as_me:6985: \$? = $ac_status" >&5
6986   (exit $ac_status); }; }; then
6987   ac_cv_func_initscr=yes
6988 else
6989   echo "$as_me: failed program was:" >&5
6990 cat conftest.$ac_ext >&5
6991 ac_cv_func_initscr=no
6992 fi
6993 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6994 fi
6995 echo "$as_me:6995: result: $ac_cv_func_initscr" >&5
6996 echo "${ECHO_T}$ac_cv_func_initscr" >&6
6997 if test $ac_cv_func_initscr = yes; then
6998   eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
6999 else
7000
7001                 cf_save_LIBS="$LIBS"
7002                 echo "$as_me:7002: checking for initscr in -l$cf_nculib_root" >&5
7003 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
7004                 LIBS="-l$cf_nculib_root $LIBS"
7005                 cat >conftest.$ac_ext <<_ACEOF
7006 #line 7006 "configure"
7007 #include "confdefs.h"
7008 #include <${cf_cv_ncurses_header:-curses.h}>
7009 int
7010 main ()
7011 {
7012 initscr()
7013   ;
7014   return 0;
7015 }
7016 _ACEOF
7017 rm -f conftest.$ac_objext conftest$ac_exeext
7018 if { (eval echo "$as_me:7018: \"$ac_link\"") >&5
7019   (eval $ac_link) 2>&5
7020   ac_status=$?
7021   echo "$as_me:7021: \$? = $ac_status" >&5
7022   (exit $ac_status); } &&
7023          { ac_try='test -s conftest$ac_exeext'
7024   { (eval echo "$as_me:7024: \"$ac_try\"") >&5
7025   (eval $ac_try) 2>&5
7026   ac_status=$?
7027   echo "$as_me:7027: \$? = $ac_status" >&5
7028   (exit $ac_status); }; }; then
7029   echo "$as_me:7029: result: yes" >&5
7030 echo "${ECHO_T}yes" >&6
7031                          eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
7032
7033 else
7034   echo "$as_me: failed program was:" >&5
7035 cat conftest.$ac_ext >&5
7036 echo "$as_me:7036: result: no" >&5
7037 echo "${ECHO_T}no" >&6
7038
7039 cf_search=
7040 cf_library_path_list=""
7041 if test -n "${LDFLAGS}${LIBS}" ; then
7042         for cf_library_path in $LDFLAGS $LIBS
7043         do
7044                 case $cf_library_path in #(vi
7045                 -L*)
7046                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
7047
7048 test "$cf_library_path" != "NONE" && \
7049 test -d "$cf_library_path" && \
7050  {
7051         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
7052         test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
7053         test -d $cf_library_path/lib/$cf_nculib_root &&       cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
7054         test -d $cf_library_path/lib/$cf_nculib_root/lib &&    cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
7055         test -d $cf_library_path/$cf_nculib_root/lib &&       cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
7056         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"
7057 }
7058
7059                         cf_library_path_list="$cf_library_path_list $cf_search"
7060                         ;;
7061                 esac
7062         done
7063 fi
7064
7065 cf_search=
7066
7067 test "/usr" != "$prefix" && \
7068 test -d "/usr" && \
7069 (test $prefix = NONE || test "/usr" != "$prefix") && {
7070         test -n "$verbose" && echo "    ... testing for lib-directories under /usr"
7071         test -d /usr/lib &&          cf_search="$cf_search /usr/lib"
7072         test -d /usr/lib/$cf_nculib_root &&       cf_search="$cf_search /usr/lib/$cf_nculib_root"
7073         test -d /usr/lib/$cf_nculib_root/lib &&    cf_search="$cf_search /usr/lib/$cf_nculib_root/lib"
7074         test -d /usr/$cf_nculib_root/lib &&       cf_search="$cf_search /usr/$cf_nculib_root/lib"
7075         test -d /usr/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search /usr/$cf_nculib_root/lib/$cf_nculib_root"
7076 }
7077
7078 test "$prefix" != "NONE" && \
7079 test -d "$prefix" && \
7080  {
7081         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
7082         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
7083         test -d $prefix/lib/$cf_nculib_root &&       cf_search="$cf_search $prefix/lib/$cf_nculib_root"
7084         test -d $prefix/lib/$cf_nculib_root/lib &&    cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
7085         test -d $prefix/$cf_nculib_root/lib &&       cf_search="$cf_search $prefix/$cf_nculib_root/lib"
7086         test -d $prefix/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
7087 }
7088
7089 test "/usr/local" != "$prefix" && \
7090 test -d "/usr/local" && \
7091 (test $prefix = NONE || test "/usr/local" != "$prefix") && {
7092         test -n "$verbose" && echo "    ... testing for lib-directories under /usr/local"
7093         test -d /usr/local/lib &&          cf_search="$cf_search /usr/local/lib"
7094         test -d /usr/local/lib/$cf_nculib_root &&       cf_search="$cf_search /usr/local/lib/$cf_nculib_root"
7095         test -d /usr/local/lib/$cf_nculib_root/lib &&    cf_search="$cf_search /usr/local/lib/$cf_nculib_root/lib"
7096         test -d /usr/local/$cf_nculib_root/lib &&       cf_search="$cf_search /usr/local/$cf_nculib_root/lib"
7097         test -d /usr/local/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search /usr/local/$cf_nculib_root/lib/$cf_nculib_root"
7098 }
7099
7100 test "/opt" != "$prefix" && \
7101 test -d "/opt" && \
7102 (test $prefix = NONE || test "/opt" != "$prefix") && {
7103         test -n "$verbose" && echo "    ... testing for lib-directories under /opt"
7104         test -d /opt/lib &&          cf_search="$cf_search /opt/lib"
7105         test -d /opt/lib/$cf_nculib_root &&       cf_search="$cf_search /opt/lib/$cf_nculib_root"
7106         test -d /opt/lib/$cf_nculib_root/lib &&    cf_search="$cf_search /opt/lib/$cf_nculib_root/lib"
7107         test -d /opt/$cf_nculib_root/lib &&       cf_search="$cf_search /opt/$cf_nculib_root/lib"
7108         test -d /opt/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search /opt/$cf_nculib_root/lib/$cf_nculib_root"
7109 }
7110
7111 test "$HOME" != "$prefix" && \
7112 test -d "$HOME" && \
7113 (test $prefix = NONE || test "$HOME" != "$prefix") && {
7114         test -n "$verbose" && echo "    ... testing for lib-directories under $HOME"
7115         test -d $HOME/lib &&          cf_search="$cf_search $HOME/lib"
7116         test -d $HOME/lib/$cf_nculib_root &&       cf_search="$cf_search $HOME/lib/$cf_nculib_root"
7117         test -d $HOME/lib/$cf_nculib_root/lib &&    cf_search="$cf_search $HOME/lib/$cf_nculib_root/lib"
7118         test -d $HOME/$cf_nculib_root/lib &&       cf_search="$cf_search $HOME/$cf_nculib_root/lib"
7119         test -d $HOME/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search $HOME/$cf_nculib_root/lib/$cf_nculib_root"
7120 }
7121
7122 cf_search="$cf_library_path_list $cf_search"
7123
7124                         for cf_libdir in $cf_search
7125                         do
7126                                 echo "$as_me:7126: checking for -l$cf_nculib_root in $cf_libdir" >&5
7127 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
7128                                 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
7129                                 cat >conftest.$ac_ext <<_ACEOF
7130 #line 7130 "configure"
7131 #include "confdefs.h"
7132 #include <${cf_cv_ncurses_header:-curses.h}>
7133 int
7134 main ()
7135 {
7136 initscr()
7137   ;
7138   return 0;
7139 }
7140 _ACEOF
7141 rm -f conftest.$ac_objext conftest$ac_exeext
7142 if { (eval echo "$as_me:7142: \"$ac_link\"") >&5
7143   (eval $ac_link) 2>&5
7144   ac_status=$?
7145   echo "$as_me:7145: \$? = $ac_status" >&5
7146   (exit $ac_status); } &&
7147          { ac_try='test -s conftest$ac_exeext'
7148   { (eval echo "$as_me:7148: \"$ac_try\"") >&5
7149   (eval $ac_try) 2>&5
7150   ac_status=$?
7151   echo "$as_me:7151: \$? = $ac_status" >&5
7152   (exit $ac_status); }; }; then
7153   echo "$as_me:7153: result: yes" >&5
7154 echo "${ECHO_T}yes" >&6
7155                                          eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
7156                                          break
7157 else
7158   echo "$as_me: failed program was:" >&5
7159 cat conftest.$ac_ext >&5
7160 echo "$as_me:7160: result: no" >&5
7161 echo "${ECHO_T}no" >&6
7162                                          LIBS="$cf_save_LIBS"
7163 fi
7164 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7165                         done
7166
7167 fi
7168 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7169
7170 fi
7171
7172 eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root
7173
7174 if test $cf_found_library = no ; then
7175         { { echo "$as_me:7175: error: Cannot link $cf_nculib_root library" >&5
7176 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
7177    { (exit 1); exit 1; }; }
7178 fi
7179
7180 fi
7181
7182 if test -n "$cf_ncurses_LIBS" ; then
7183         echo "$as_me:7183: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
7184 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
7185         cf_ncurses_SAVE="$LIBS"
7186         for p in $cf_ncurses_LIBS ; do
7187                 q=`echo $LIBS | sed -e "s%$p %%" -e "s%$p$%%"`
7188                 if test "$q" != "$LIBS" ; then
7189                         LIBS="$q"
7190                 fi
7191         done
7192         cat >conftest.$ac_ext <<_ACEOF
7193 #line 7193 "configure"
7194 #include "confdefs.h"
7195 #include <${cf_cv_ncurses_header:-curses.h}>
7196 int
7197 main ()
7198 {
7199 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
7200   ;
7201   return 0;
7202 }
7203 _ACEOF
7204 rm -f conftest.$ac_objext conftest$ac_exeext
7205 if { (eval echo "$as_me:7205: \"$ac_link\"") >&5
7206   (eval $ac_link) 2>&5
7207   ac_status=$?
7208   echo "$as_me:7208: \$? = $ac_status" >&5
7209   (exit $ac_status); } &&
7210          { ac_try='test -s conftest$ac_exeext'
7211   { (eval echo "$as_me:7211: \"$ac_try\"") >&5
7212   (eval $ac_try) 2>&5
7213   ac_status=$?
7214   echo "$as_me:7214: \$? = $ac_status" >&5
7215   (exit $ac_status); }; }; then
7216   echo "$as_me:7216: result: yes" >&5
7217 echo "${ECHO_T}yes" >&6
7218 else
7219   echo "$as_me: failed program was:" >&5
7220 cat conftest.$ac_ext >&5
7221 echo "$as_me:7221: result: no" >&5
7222 echo "${ECHO_T}no" >&6
7223                  LIBS="$cf_ncurses_SAVE"
7224 fi
7225 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7226 fi
7227
7228 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
7229
7230 cat >>confdefs.h <<EOF
7231 #define $cf_nculib_ROOT 1
7232 EOF
7233
7234 fi
7235
7236 fi
7237
7238 if test "$NCURSES_CONFIG" != none ; then
7239
7240 cf_version=`$NCURSES_CONFIG --version`
7241
7242 NCURSES_MAJOR=`echo "$cf_version" | sed -e 's/\..*//'`
7243 NCURSES_MINOR=`echo "$cf_version" | sed -e 's/^[0-9][0-9]*\.//' -e 's/\..*//'`
7244 NCURSES_PATCH=`echo "$cf_version" | sed -e 's/^[0-9][0-9]*\.[0-9][0-9]*\.//'`
7245
7246 # ABI version is not available from headers
7247 cf_cv_abi_version=`$NCURSES_CONFIG --abi-version`
7248
7249 else
7250
7251 for cf_name in MAJOR MINOR PATCH
7252 do
7253 cat >conftest.$ac_ext <<CF_EOF
7254 #include <${cf_cv_ncurses_header:-curses.h}>
7255 AUTOCONF_$cf_name NCURSES_VERSION_$cf_name
7256 CF_EOF
7257         cf_try="$ac_cpp conftest.$ac_ext 2>&5 | fgrep AUTOCONF_$cf_name >conftest.out"
7258         { (eval echo "$as_me:7258: \"$cf_try\"") >&5
7259   (eval $cf_try) 2>&5
7260   ac_status=$?
7261   echo "$as_me:7261: \$? = $ac_status" >&5
7262   (exit $ac_status); }
7263         if test -f conftest.out ; then
7264                 cf_result=`cat conftest.out | sed -e "s/^.*AUTOCONF_$cf_name[   ][      ]*//"`
7265                 eval NCURSES_$cf_name=\"$cf_result\"
7266                 # cat conftest.$ac_ext
7267                 # cat conftest.out
7268         fi
7269 done
7270
7271 cf_cv_abi_version=${NCURSES_MAJOR}
7272
7273 fi
7274
7275 cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
7276
7277 cf_cv_timestamp=`date`
7278
7279 echo "$as_me:7279: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&5
7280 echo "${ECHO_T}Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&6
7281
7282 echo "$as_me:7282: checking if you want to have a library-prefix" >&5
7283 echo $ECHO_N "checking if you want to have a library-prefix... $ECHO_C" >&6
7284
7285 # Check whether --with-lib-prefix or --without-lib-prefix was given.
7286 if test "${with_lib_prefix+set}" = set; then
7287   withval="$with_lib_prefix"
7288   with_lib_prefix=$withval
7289 else
7290   with_lib_prefix=auto
7291 fi;
7292 echo "$as_me:7292: result: $with_lib_prefix" >&5
7293 echo "${ECHO_T}$with_lib_prefix" >&6
7294
7295 if test $with_lib_prefix = auto
7296 then
7297
7298         case $cf_cv_system_name in #(vi
7299         OS/2*|os2*) #(vi
7300         LIB_PREFIX=''
7301         ;;
7302         *)      LIB_PREFIX='lib'
7303         ;;
7304         esac
7305 cf_prefix=$LIB_PREFIX
7306
7307 elif test $with_lib_prefix = no
7308 then
7309         LIB_PREFIX=
7310 else
7311         LIB_PREFIX=$with_lib_prefix
7312 fi
7313
7314 LIB_SUFFIX=
7315
7316 ###############################################################################
7317
7318 if test X"$CC_G_OPT" = X"" ; then
7319         CC_G_OPT='-g'
7320         test -n "$GCC" && test "${ac_cv_prog_cc_g}" != yes && CC_G_OPT=''
7321 fi
7322
7323 echo "$as_me:7323: checking for default loader flags" >&5
7324 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
7325 case $DFT_LWR_MODEL in
7326 normal)  LD_MODEL=''   ;;
7327 debug)   LD_MODEL=$CC_G_OPT ;;
7328 profile) LD_MODEL='-pg';;
7329 shared)  LD_MODEL=''   ;;
7330 esac
7331 echo "$as_me:7331: result: $LD_MODEL" >&5
7332 echo "${ECHO_T}$LD_MODEL" >&6
7333
7334 LD_RPATH_OPT=
7335 echo "$as_me:7335: checking for an rpath option" >&5
7336 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
7337 case $cf_cv_system_name in #(vi
7338 irix*) #(vi
7339         if test "$GCC" = yes; then
7340                 LD_RPATH_OPT="-Wl,-rpath,"
7341         else
7342                 LD_RPATH_OPT="-rpath "
7343         fi
7344         ;;
7345 linux*|gnu*|k*bsd*-gnu) #(vi
7346         LD_RPATH_OPT="-Wl,-rpath,"
7347         ;;
7348 openbsd[2-9].*|mirbsd*) #(vi
7349         LD_RPATH_OPT="-Wl,-rpath,"
7350         ;;
7351 dragonfly*|freebsd*) #(vi
7352         LD_RPATH_OPT="-rpath "
7353         ;;
7354 netbsd*) #(vi
7355         LD_RPATH_OPT="-Wl,-rpath,"
7356         ;;
7357 osf*|mls+*) #(vi
7358         LD_RPATH_OPT="-rpath "
7359         ;;
7360 solaris2*) #(vi
7361         LD_RPATH_OPT="-R"
7362         ;;
7363 *)
7364         ;;
7365 esac
7366 echo "$as_me:7366: result: $LD_RPATH_OPT" >&5
7367 echo "${ECHO_T}$LD_RPATH_OPT" >&6
7368
7369 case "x$LD_RPATH_OPT" in #(vi
7370 x-R*)
7371         echo "$as_me:7371: checking if we need a space after rpath option" >&5
7372 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
7373         cf_save_LIBS="$LIBS"
7374         LIBS="${LD_RPATH_OPT}$libdir $LIBS"
7375         cat >conftest.$ac_ext <<_ACEOF
7376 #line 7376 "configure"
7377 #include "confdefs.h"
7378
7379 int
7380 main ()
7381 {
7382
7383   ;
7384   return 0;
7385 }
7386 _ACEOF
7387 rm -f conftest.$ac_objext conftest$ac_exeext
7388 if { (eval echo "$as_me:7388: \"$ac_link\"") >&5
7389   (eval $ac_link) 2>&5
7390   ac_status=$?
7391   echo "$as_me:7391: \$? = $ac_status" >&5
7392   (exit $ac_status); } &&
7393          { ac_try='test -s conftest$ac_exeext'
7394   { (eval echo "$as_me:7394: \"$ac_try\"") >&5
7395   (eval $ac_try) 2>&5
7396   ac_status=$?
7397   echo "$as_me:7397: \$? = $ac_status" >&5
7398   (exit $ac_status); }; }; then
7399   cf_rpath_space=no
7400 else
7401   echo "$as_me: failed program was:" >&5
7402 cat conftest.$ac_ext >&5
7403 cf_rpath_space=yes
7404 fi
7405 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7406         LIBS="$cf_save_LIBS"
7407         echo "$as_me:7407: result: $cf_rpath_space" >&5
7408 echo "${ECHO_T}$cf_rpath_space" >&6
7409         test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
7410         ;;
7411 esac
7412
7413         LOCAL_LDFLAGS=
7414         LOCAL_LDFLAGS2=
7415         LD_SHARED_OPTS=
7416         INSTALL_LIB="-m 644"
7417
7418         cf_cv_do_symlinks=no
7419         cf_ld_rpath_opt=
7420         test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT"
7421
7422         echo "$as_me:7422: checking if release/abi version should be used for shared libs" >&5
7423 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
7424
7425 # Check whether --with-shlib-version or --without-shlib-version was given.
7426 if test "${with_shlib_version+set}" = set; then
7427   withval="$with_shlib_version"
7428   test -z "$withval" && withval=auto
7429         case $withval in #(vi
7430         yes) #(vi
7431                 cf_cv_shlib_version=auto
7432                 ;;
7433         rel|abi|auto|no) #(vi
7434                 cf_cv_shlib_version=$withval
7435                 ;;
7436         *)
7437                 { { echo "$as_me:7437: error: option value must be one of: rel, abi, auto or no" >&5
7438 echo "$as_me: error: option value must be one of: rel, abi, auto or no" >&2;}
7439    { (exit 1); exit 1; }; }
7440                 ;;
7441         esac
7442
7443 else
7444   cf_cv_shlib_version=auto
7445 fi;
7446         echo "$as_me:7446: result: $cf_cv_shlib_version" >&5
7447 echo "${ECHO_T}$cf_cv_shlib_version" >&6
7448
7449         cf_cv_rm_so_locs=no
7450
7451         # Some less-capable ports of gcc support only -fpic
7452         CC_SHARED_OPTS=
7453         if test "$GCC" = yes
7454         then
7455                 echo "$as_me:7455: checking which $CC option to use" >&5
7456 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
7457                 cf_save_CFLAGS="$CFLAGS"
7458                 for CC_SHARED_OPTS in -fPIC -fpic ''
7459                 do
7460                         CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
7461                         cat >conftest.$ac_ext <<_ACEOF
7462 #line 7462 "configure"
7463 #include "confdefs.h"
7464 #include <stdio.h>
7465 int
7466 main ()
7467 {
7468 int x = 1
7469   ;
7470   return 0;
7471 }
7472 _ACEOF
7473 rm -f conftest.$ac_objext
7474 if { (eval echo "$as_me:7474: \"$ac_compile\"") >&5
7475   (eval $ac_compile) 2>&5
7476   ac_status=$?
7477   echo "$as_me:7477: \$? = $ac_status" >&5
7478   (exit $ac_status); } &&
7479          { ac_try='test -s conftest.$ac_objext'
7480   { (eval echo "$as_me:7480: \"$ac_try\"") >&5
7481   (eval $ac_try) 2>&5
7482   ac_status=$?
7483   echo "$as_me:7483: \$? = $ac_status" >&5
7484   (exit $ac_status); }; }; then
7485   break
7486 else
7487   echo "$as_me: failed program was:" >&5
7488 cat conftest.$ac_ext >&5
7489 fi
7490 rm -f conftest.$ac_objext conftest.$ac_ext
7491                 done
7492                 echo "$as_me:7492: result: $CC_SHARED_OPTS" >&5
7493 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
7494                 CFLAGS="$cf_save_CFLAGS"
7495         fi
7496
7497         cf_cv_shlib_version_infix=no
7498
7499         case $cf_cv_system_name in #(vi
7500         aix4.3-9*|aix[5-7]*) #(vi
7501                 if test "$GCC" = yes; then
7502                         CC_SHARED_OPTS=
7503                         MK_SHARED_LIB='${CC} -shared -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
7504                 else
7505                         # CC_SHARED_OPTS='-qpic=large -G'
7506                         # perhaps "-bM:SRE -bnoentry -bexpall"
7507                         MK_SHARED_LIB='${CC} -G -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
7508                 fi
7509                 ;;
7510         beos*) #(vi
7511                 MK_SHARED_LIB='${CC} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
7512                 ;;
7513         cygwin*) #(vi
7514                 CC_SHARED_OPTS=
7515                 MK_SHARED_LIB='sh ../mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
7516                 cf_cv_shlib_version=cygdll
7517                 cf_cv_shlib_version_infix=cygdll
7518                 cat >mk_shared_lib.sh <<-CF_EOF
7519                 #!/bin/sh
7520                 SHARED_LIB=\$1
7521                 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
7522                 shift
7523                 cat <<-EOF
7524                 Linking shared library
7525                 ** SHARED_LIB \$SHARED_LIB
7526                 ** IMPORT_LIB \$IMPORT_LIB
7527 EOF
7528                 exec \$* -shared -Wl,--out-implib=../lib/\${IMPORT_LIB} -Wl,--export-all-symbols -o ../lib/\${SHARED_LIB}
7529 CF_EOF
7530                 chmod +x mk_shared_lib.sh
7531                 ;;
7532         darwin*) #(vi
7533                 EXTRA_CFLAGS="-no-cpp-precomp"
7534                 CC_SHARED_OPTS="-dynamic"
7535                 MK_SHARED_LIB='${CC} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
7536                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
7537                 cf_cv_shlib_version_infix=yes
7538                 echo "$as_me:7538: checking if ld -search_paths_first works" >&5
7539 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
7540 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
7541   echo $ECHO_N "(cached) $ECHO_C" >&6
7542 else
7543
7544                         cf_save_LDFLAGS=$LDFLAGS
7545                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
7546                         cat >conftest.$ac_ext <<_ACEOF
7547 #line 7547 "configure"
7548 #include "confdefs.h"
7549
7550 int
7551 main ()
7552 {
7553 int i;
7554   ;
7555   return 0;
7556 }
7557 _ACEOF
7558 rm -f conftest.$ac_objext conftest$ac_exeext
7559 if { (eval echo "$as_me:7559: \"$ac_link\"") >&5
7560   (eval $ac_link) 2>&5
7561   ac_status=$?
7562   echo "$as_me:7562: \$? = $ac_status" >&5
7563   (exit $ac_status); } &&
7564          { ac_try='test -s conftest$ac_exeext'
7565   { (eval echo "$as_me:7565: \"$ac_try\"") >&5
7566   (eval $ac_try) 2>&5
7567   ac_status=$?
7568   echo "$as_me:7568: \$? = $ac_status" >&5
7569   (exit $ac_status); }; }; then
7570   cf_cv_ldflags_search_paths_first=yes
7571 else
7572   echo "$as_me: failed program was:" >&5
7573 cat conftest.$ac_ext >&5
7574 cf_cv_ldflags_search_paths_first=no
7575 fi
7576 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7577                                 LDFLAGS=$cf_save_LDFLAGS
7578 fi
7579 echo "$as_me:7579: result: $cf_cv_ldflags_search_paths_first" >&5
7580 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
7581                 if test $cf_cv_ldflags_search_paths_first = yes; then
7582                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
7583                 fi
7584                 ;;
7585         hpux*) #(vi
7586                 # (tested with gcc 2.7.2 -- I don't have c89)
7587                 if test "$GCC" = yes; then
7588                         LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
7589                 else
7590                         CC_SHARED_OPTS='+Z'
7591                         LD_SHARED_OPTS='-Wl,+b,${libdir}'
7592                 fi
7593                 MK_SHARED_LIB='${LD} +b ${libdir} -b -o $@'
7594                 # HP-UX shared libraries must be executable, and should be
7595                 # readonly to exploit a quirk in the memory manager.
7596                 INSTALL_LIB="-m 555"
7597                 ;;
7598         interix*)
7599                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
7600                 if test "$cf_cv_shlib_version" = rel; then
7601                         cf_shared_soname='`basename  .${REL_VERSION}`.${ABI_VERSION}'
7602                 else
7603                         cf_shared_soname='`basename `'
7604                 fi
7605                 CC_SHARED_OPTS=
7606                 MK_SHARED_LIB='${CC} -shared -Wl,-rpath,${RPATH_LIST} -Wl,-h,'$cf_shared_soname' -o '
7607                 ;;
7608         irix*) #(vi
7609                 if test "$cf_cv_enable_rpath" = yes ; then
7610                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
7611                 fi
7612                 # tested with IRIX 5.2 and 'cc'.
7613                 if test "$GCC" != yes; then
7614                         CC_SHARED_OPTS='-KPIC'
7615                         MK_SHARED_LIB='${CC} -shared -rdata_shared -soname `basename $@` -o $@'
7616                 else
7617                         MK_SHARED_LIB='${CC} -shared -Wl,-soname,`basename $@` -o $@'
7618                 fi
7619                 cf_cv_rm_so_locs=yes
7620                 ;;
7621         linux*|gnu*|k*bsd*-gnu) #(vi
7622                 if test "$DFT_LWR_MODEL" = "shared" ; then
7623                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
7624                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
7625                 fi
7626                 if test "$cf_cv_enable_rpath" = yes ; then
7627                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
7628                 fi
7629
7630         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
7631         if test "$cf_cv_shlib_version" = rel; then
7632                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
7633         else
7634                 cf_cv_shared_soname='`basename $@`'
7635         fi
7636
7637                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
7638                 ;;
7639         mingw*) #(vi
7640                 cf_cv_shlib_version=mingw
7641                 cf_cv_shlib_version_infix=mingw
7642                 CC_SHARED_OPTS=
7643                 MK_SHARED_LIB='sh ../mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
7644                 #MK_SHARED_LIB='${CC} ${CFLAGS} -mdll -Wl,-soname,'$cf_cv_shared_soname',-stats -o $[@]'
7645                 #MK_SHARED_LIB='${DLLTOOL} --export-all-symbols --output-exp --output-lib $[@]'
7646                 cat >mk_shared_lib.sh <<-CF_EOF
7647                 #!/bin/sh
7648                 SHARED_LIB=\$1
7649                 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.a/'\`
7650                 shift
7651                 cat <<-EOF
7652                 Linking shared library
7653                 ** SHARED_LIB \$SHARED_LIB
7654                 ** IMPORT_LIB \$IMPORT_LIB
7655 EOF
7656                 exec \$* -shared -Wl,--out-implib=../lib/\${IMPORT_LIB} -Wl,--export-all-symbols -o ../lib/\${SHARED_LIB}
7657 CF_EOF
7658                 chmod +x mk_shared_lib.sh
7659                 ;;
7660         openbsd[2-9].*|mirbsd*) #(vi
7661                 if test "$DFT_LWR_MODEL" = "shared" ; then
7662                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
7663                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
7664                 fi
7665                 if test "$cf_cv_enable_rpath" = yes ; then
7666                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
7667                 fi
7668                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
7669
7670         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
7671         if test "$cf_cv_shlib_version" = rel; then
7672                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
7673         else
7674                 cf_cv_shared_soname='`basename $@`'
7675         fi
7676
7677                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
7678                 ;;
7679         nto-qnx*|openbsd*|freebsd[12].*) #(vi
7680                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
7681                 MK_SHARED_LIB='${LD} -Bshareable -o $@'
7682                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
7683                 ;;
7684         dragonfly*|freebsd*) #(vi
7685                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
7686                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
7687                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
7688                         LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${RPATH_LIST} $LOCAL_LDFLAGS"
7689                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
7690                 fi
7691
7692         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
7693         if test "$cf_cv_shlib_version" = rel; then
7694                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
7695         else
7696                 cf_cv_shared_soname='`basename $@`'
7697         fi
7698
7699                 MK_SHARED_LIB='${LD} -shared -Bshareable -soname=`basename $@` -o $@'
7700                 ;;
7701         netbsd*) #(vi
7702                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
7703                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
7704                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
7705                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
7706                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
7707                         if test "$cf_cv_shlib_version" = auto; then
7708                         if test -f /usr/libexec/ld.elf_so; then
7709                                 cf_cv_shlib_version=abi
7710                         else
7711                                 cf_cv_shlib_version=rel
7712                         fi
7713                         fi
7714
7715         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
7716         if test "$cf_cv_shlib_version" = rel; then
7717                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
7718         else
7719                 cf_cv_shared_soname='`basename $@`'
7720         fi
7721
7722                         MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
7723                 else
7724                         MK_SHARED_LIB='${LD} -shared -Bshareable -o $@'
7725                 fi
7726                 ;;
7727         osf*|mls+*) #(vi
7728                 # tested with OSF/1 V3.2 and 'cc'
7729                 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
7730                 # link with shared libs).
7731                 MK_SHARED_LIB='${LD} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
7732                 case $host_os in #(vi
7733                 osf4*)
7734                         MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
7735                         ;;
7736                 esac
7737                 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
7738                 if test "$DFT_LWR_MODEL" = "shared" ; then
7739                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
7740                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
7741                 fi
7742                 cf_cv_rm_so_locs=yes
7743                 ;;
7744         sco3.2v5*)  # (also uw2* and UW7: hops 13-Apr-98
7745                 # tested with osr5.0.5
7746                 if test "$GCC" != yes; then
7747                         CC_SHARED_OPTS='-belf -KPIC'
7748                 fi
7749                 MK_SHARED_LIB='${LD} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
7750                 if test "$cf_cv_enable_rpath" = yes ; then
7751                         # only way is to set LD_RUN_PATH but no switch for it
7752                         RUN_PATH=$libdir
7753                 fi
7754                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
7755                 LINK_PROGS='LD_RUN_PATH=${libdir}'
7756                 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
7757                 ;;
7758         sunos4*) #(vi
7759                 # tested with SunOS 4.1.1 and gcc 2.7.0
7760                 if test "$GCC" != yes; then
7761                         CC_SHARED_OPTS='-KPIC'
7762                 fi
7763                 MK_SHARED_LIB='${LD} -assert pure-text -o $@'
7764                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
7765                 ;;
7766         solaris2*) #(vi
7767                 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
7768                 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
7769                 if test "$DFT_LWR_MODEL" = "shared" ; then
7770                         LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
7771                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
7772                 fi
7773                 if test "$cf_cv_enable_rpath" = yes ; then
7774                         EXTRA_LDFLAGS="-R \${libdir} $EXTRA_LDFLAGS"
7775                 fi
7776
7777         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
7778         if test "$cf_cv_shlib_version" = rel; then
7779                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
7780         else
7781                 cf_cv_shared_soname='`basename $@`'
7782         fi
7783
7784                 if test "$GCC" != yes; then
7785                         cf_save_CFLAGS="$CFLAGS"
7786                         for cf_shared_opts in -xcode=pic32 -xcode=pic13 -KPIC -Kpic -O
7787                         do
7788                                 CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
7789                                 cat >conftest.$ac_ext <<_ACEOF
7790 #line 7790 "configure"
7791 #include "confdefs.h"
7792 #include <stdio.h>
7793 int
7794 main ()
7795 {
7796 printf("Hello\n");
7797   ;
7798   return 0;
7799 }
7800 _ACEOF
7801 rm -f conftest.$ac_objext
7802 if { (eval echo "$as_me:7802: \"$ac_compile\"") >&5
7803   (eval $ac_compile) 2>&5
7804   ac_status=$?
7805   echo "$as_me:7805: \$? = $ac_status" >&5
7806   (exit $ac_status); } &&
7807          { ac_try='test -s conftest.$ac_objext'
7808   { (eval echo "$as_me:7808: \"$ac_try\"") >&5
7809   (eval $ac_try) 2>&5
7810   ac_status=$?
7811   echo "$as_me:7811: \$? = $ac_status" >&5
7812   (exit $ac_status); }; }; then
7813   break
7814 else
7815   echo "$as_me: failed program was:" >&5
7816 cat conftest.$ac_ext >&5
7817 fi
7818 rm -f conftest.$ac_objext conftest.$ac_ext
7819                         done
7820                         CFLAGS="$cf_save_CFLAGS"
7821                         CC_SHARED_OPTS=$cf_shared_opts
7822                         MK_SHARED_LIB='${CC} -dy -G -h '$cf_cv_shared_soname' -o $@'
7823                 else
7824                         MK_SHARED_LIB='${CC} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
7825                 fi
7826                 ;;
7827         sysv5uw7*|unix_sv*) #(vi
7828                 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
7829                 if test "$GCC" != yes; then
7830                         CC_SHARED_OPTS='-KPIC'
7831                 fi
7832                 MK_SHARED_LIB='${LD} -d y -G -o $@'
7833                 ;;
7834         *)
7835                 CC_SHARED_OPTS='unknown'
7836                 MK_SHARED_LIB='echo unknown'
7837                 ;;
7838         esac
7839
7840         # This works if the last tokens in $MK_SHARED_LIB are the -o target.
7841         case "$cf_cv_shlib_version" in #(vi
7842         rel|abi)
7843                 case "$MK_SHARED_LIB" in #(vi
7844                 *'-o $@') #(vi
7845                         test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
7846                         ;;
7847                 *)
7848                         { echo "$as_me:7848: WARNING: ignored --with-shlib-version" >&5
7849 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
7850                         ;;
7851                 esac
7852                 ;;
7853         esac
7854
7855         # RPATH_LIST is a colon-separated list of directories
7856         test -n "$cf_ld_rpath_opt" && MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${RPATH_LIST}"
7857         test -z "$RPATH_LIST" && RPATH_LIST="\${libdir}"
7858
7859         test -n "$verbose" && echo "    CC_SHARED_OPTS: $CC_SHARED_OPTS" 1>&6
7860
7861 echo "${as_me:-configure}:7861: testing CC_SHARED_OPTS: $CC_SHARED_OPTS ..." 1>&5
7862
7863         test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
7864
7865 echo "${as_me:-configure}:7865: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
7866
7867 # The test/sample programs in the original tree link using rpath option.
7868 # Make it optional for packagers.
7869 if test -n "$LOCAL_LDFLAGS"
7870 then
7871         echo "$as_me:7871: checking if you want to link sample programs with rpath option" >&5
7872 echo $ECHO_N "checking if you want to link sample programs with rpath option... $ECHO_C" >&6
7873
7874 # Check whether --enable-rpath-link or --disable-rpath-link was given.
7875 if test "${enable_rpath_link+set}" = set; then
7876   enableval="$enable_rpath_link"
7877   with_rpath_link=$enableval
7878 else
7879   with_rpath_link=yes
7880 fi;
7881         echo "$as_me:7881: result: $with_rpath_link" >&5
7882 echo "${ECHO_T}$with_rpath_link" >&6
7883         if test "$with_rpath_link" = no
7884         then
7885                 LOCAL_LDFLAGS=
7886                 LOCAL_LDFLAGS2=
7887         fi
7888 fi
7889
7890 ###############################################################################
7891
7892 ###   use option --enable-broken-linker to force on use of broken-linker support
7893 echo "$as_me:7893: checking if you want broken-linker support code" >&5
7894 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
7895
7896 # Check whether --enable-broken_linker or --disable-broken_linker was given.
7897 if test "${enable_broken_linker+set}" = set; then
7898   enableval="$enable_broken_linker"
7899   with_broken_linker=$enableval
7900 else
7901   with_broken_linker=${BROKEN_LINKER:-no}
7902 fi;
7903 echo "$as_me:7903: result: $with_broken_linker" >&5
7904 echo "${ECHO_T}$with_broken_linker" >&6
7905
7906 BROKEN_LINKER=0
7907 if test "$with_broken_linker" = yes ; then
7908         cat >>confdefs.h <<\EOF
7909 #define BROKEN_LINKER 1
7910 EOF
7911
7912         BROKEN_LINKER=1
7913 elif test "$DFT_LWR_MODEL" = shared ; then
7914         case $cf_cv_system_name in #(vi
7915         cygwin*)
7916                 cat >>confdefs.h <<\EOF
7917 #define BROKEN_LINKER 1
7918 EOF
7919
7920                 BROKEN_LINKER=1
7921                 test -n "$verbose" && echo "    cygwin linker is broken anyway" 1>&6
7922
7923 echo "${as_me:-configure}:7923: testing cygwin linker is broken anyway ..." 1>&5
7924
7925                 ;;
7926         esac
7927 fi
7928
7929 # Check to define _XOPEN_SOURCE "automatically"
7930
7931 cf_XOPEN_SOURCE=500
7932 cf_POSIX_C_SOURCE=199506L
7933 cf_xopen_source=
7934
7935 case $host_os in #(vi
7936 aix[4-7]*) #(vi
7937         cf_xopen_source="-D_ALL_SOURCE"
7938         ;;
7939 cygwin) #(vi
7940         cf_XOPEN_SOURCE=600
7941         ;;
7942 darwin[0-8].*) #(vi
7943         cf_xopen_source="-D_APPLE_C_SOURCE"
7944         ;;
7945 darwin*) #(vi
7946         cf_xopen_source="-D_DARWIN_C_SOURCE"
7947         cf_XOPEN_SOURCE=
7948         ;;
7949 freebsd*|dragonfly*) #(vi
7950         # 5.x headers associate
7951         #       _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
7952         #       _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
7953         cf_POSIX_C_SOURCE=200112L
7954         cf_XOPEN_SOURCE=600
7955         cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
7956         ;;
7957 hpux11*) #(vi
7958         cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
7959         ;;
7960 hpux*) #(vi
7961         cf_xopen_source="-D_HPUX_SOURCE"
7962         ;;
7963 irix[56].*) #(vi
7964         cf_xopen_source="-D_SGI_SOURCE"
7965         cf_XOPEN_SOURCE=
7966         ;;
7967 linux*|gnu*|mint*|k*bsd*-gnu) #(vi
7968
7969 echo "$as_me:7969: checking if we must define _GNU_SOURCE" >&5
7970 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
7971 if test "${cf_cv_gnu_source+set}" = set; then
7972   echo $ECHO_N "(cached) $ECHO_C" >&6
7973 else
7974
7975 cat >conftest.$ac_ext <<_ACEOF
7976 #line 7976 "configure"
7977 #include "confdefs.h"
7978 #include <sys/types.h>
7979 int
7980 main ()
7981 {
7982
7983 #ifndef _XOPEN_SOURCE
7984 make an error
7985 #endif
7986   ;
7987   return 0;
7988 }
7989 _ACEOF
7990 rm -f conftest.$ac_objext
7991 if { (eval echo "$as_me:7991: \"$ac_compile\"") >&5
7992   (eval $ac_compile) 2>&5
7993   ac_status=$?
7994   echo "$as_me:7994: \$? = $ac_status" >&5
7995   (exit $ac_status); } &&
7996          { ac_try='test -s conftest.$ac_objext'
7997   { (eval echo "$as_me:7997: \"$ac_try\"") >&5
7998   (eval $ac_try) 2>&5
7999   ac_status=$?
8000   echo "$as_me:8000: \$? = $ac_status" >&5
8001   (exit $ac_status); }; }; then
8002   cf_cv_gnu_source=no
8003 else
8004   echo "$as_me: failed program was:" >&5
8005 cat conftest.$ac_ext >&5
8006 cf_save="$CPPFLAGS"
8007          CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
8008          cat >conftest.$ac_ext <<_ACEOF
8009 #line 8009 "configure"
8010 #include "confdefs.h"
8011 #include <sys/types.h>
8012 int
8013 main ()
8014 {
8015
8016 #ifdef _XOPEN_SOURCE
8017 make an error
8018 #endif
8019   ;
8020   return 0;
8021 }
8022 _ACEOF
8023 rm -f conftest.$ac_objext
8024 if { (eval echo "$as_me:8024: \"$ac_compile\"") >&5
8025   (eval $ac_compile) 2>&5
8026   ac_status=$?
8027   echo "$as_me:8027: \$? = $ac_status" >&5
8028   (exit $ac_status); } &&
8029          { ac_try='test -s conftest.$ac_objext'
8030   { (eval echo "$as_me:8030: \"$ac_try\"") >&5
8031   (eval $ac_try) 2>&5
8032   ac_status=$?
8033   echo "$as_me:8033: \$? = $ac_status" >&5
8034   (exit $ac_status); }; }; then
8035   cf_cv_gnu_source=no
8036 else
8037   echo "$as_me: failed program was:" >&5
8038 cat conftest.$ac_ext >&5
8039 cf_cv_gnu_source=yes
8040 fi
8041 rm -f conftest.$ac_objext conftest.$ac_ext
8042         CPPFLAGS="$cf_save"
8043
8044 fi
8045 rm -f conftest.$ac_objext conftest.$ac_ext
8046
8047 fi
8048 echo "$as_me:8048: result: $cf_cv_gnu_source" >&5
8049 echo "${ECHO_T}$cf_cv_gnu_source" >&6
8050 test "$cf_cv_gnu_source" = yes && CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
8051
8052         ;;
8053 mirbsd*) #(vi
8054         # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
8055         cf_XOPEN_SOURCE=
8056
8057 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
8058
8059 cf_save_CFLAGS="$CFLAGS"
8060 cf_save_CPPFLAGS="$CPPFLAGS"
8061
8062 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
8063         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
8064                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
8065
8066 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
8067         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
8068                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
8069
8070 echo "$as_me:8070: checking if we should define _POSIX_C_SOURCE" >&5
8071 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
8072 if test "${cf_cv_posix_c_source+set}" = set; then
8073   echo $ECHO_N "(cached) $ECHO_C" >&6
8074 else
8075
8076 echo "${as_me:-configure}:8076: testing if the symbol is already defined go no further ..." 1>&5
8077
8078         cat >conftest.$ac_ext <<_ACEOF
8079 #line 8079 "configure"
8080 #include "confdefs.h"
8081 #include <sys/types.h>
8082 int
8083 main ()
8084 {
8085
8086 #ifndef _POSIX_C_SOURCE
8087 make an error
8088 #endif
8089   ;
8090   return 0;
8091 }
8092 _ACEOF
8093 rm -f conftest.$ac_objext
8094 if { (eval echo "$as_me:8094: \"$ac_compile\"") >&5
8095   (eval $ac_compile) 2>&5
8096   ac_status=$?
8097   echo "$as_me:8097: \$? = $ac_status" >&5
8098   (exit $ac_status); } &&
8099          { ac_try='test -s conftest.$ac_objext'
8100   { (eval echo "$as_me:8100: \"$ac_try\"") >&5
8101   (eval $ac_try) 2>&5
8102   ac_status=$?
8103   echo "$as_me:8103: \$? = $ac_status" >&5
8104   (exit $ac_status); }; }; then
8105   cf_cv_posix_c_source=no
8106 else
8107   echo "$as_me: failed program was:" >&5
8108 cat conftest.$ac_ext >&5
8109 cf_want_posix_source=no
8110          case .$cf_POSIX_C_SOURCE in #(vi
8111          .[12]??*) #(vi
8112                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
8113                 ;;
8114          .2) #(vi
8115                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
8116                 cf_want_posix_source=yes
8117                 ;;
8118          .*)
8119                 cf_want_posix_source=yes
8120                 ;;
8121          esac
8122          if test "$cf_want_posix_source" = yes ; then
8123                 cat >conftest.$ac_ext <<_ACEOF
8124 #line 8124 "configure"
8125 #include "confdefs.h"
8126 #include <sys/types.h>
8127 int
8128 main ()
8129 {
8130
8131 #ifdef _POSIX_SOURCE
8132 make an error
8133 #endif
8134   ;
8135   return 0;
8136 }
8137 _ACEOF
8138 rm -f conftest.$ac_objext
8139 if { (eval echo "$as_me:8139: \"$ac_compile\"") >&5
8140   (eval $ac_compile) 2>&5
8141   ac_status=$?
8142   echo "$as_me:8142: \$? = $ac_status" >&5
8143   (exit $ac_status); } &&
8144          { ac_try='test -s conftest.$ac_objext'
8145   { (eval echo "$as_me:8145: \"$ac_try\"") >&5
8146   (eval $ac_try) 2>&5
8147   ac_status=$?
8148   echo "$as_me:8148: \$? = $ac_status" >&5
8149   (exit $ac_status); }; }; then
8150   :
8151 else
8152   echo "$as_me: failed program was:" >&5
8153 cat conftest.$ac_ext >&5
8154 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
8155 fi
8156 rm -f conftest.$ac_objext conftest.$ac_ext
8157          fi
8158
8159 echo "${as_me:-configure}:8159: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
8160
8161          CFLAGS="$cf_trim_CFLAGS"
8162          CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
8163
8164 echo "${as_me:-configure}:8164: testing if the second compile does not leave our definition intact error ..." 1>&5
8165
8166          cat >conftest.$ac_ext <<_ACEOF
8167 #line 8167 "configure"
8168 #include "confdefs.h"
8169 #include <sys/types.h>
8170 int
8171 main ()
8172 {
8173
8174 #ifndef _POSIX_C_SOURCE
8175 make an error
8176 #endif
8177   ;
8178   return 0;
8179 }
8180 _ACEOF
8181 rm -f conftest.$ac_objext
8182 if { (eval echo "$as_me:8182: \"$ac_compile\"") >&5
8183   (eval $ac_compile) 2>&5
8184   ac_status=$?
8185   echo "$as_me:8185: \$? = $ac_status" >&5
8186   (exit $ac_status); } &&
8187          { ac_try='test -s conftest.$ac_objext'
8188   { (eval echo "$as_me:8188: \"$ac_try\"") >&5
8189   (eval $ac_try) 2>&5
8190   ac_status=$?
8191   echo "$as_me:8191: \$? = $ac_status" >&5
8192   (exit $ac_status); }; }; then
8193   :
8194 else
8195   echo "$as_me: failed program was:" >&5
8196 cat conftest.$ac_ext >&5
8197 cf_cv_posix_c_source=no
8198 fi
8199 rm -f conftest.$ac_objext conftest.$ac_ext
8200          CFLAGS="$cf_save_CFLAGS"
8201          CPPFLAGS="$cf_save_CPPFLAGS"
8202
8203 fi
8204 rm -f conftest.$ac_objext conftest.$ac_ext
8205
8206 fi
8207 echo "$as_me:8207: result: $cf_cv_posix_c_source" >&5
8208 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
8209
8210 if test "$cf_cv_posix_c_source" != no ; then
8211         CFLAGS="$cf_trim_CFLAGS"
8212         CPPFLAGS="$cf_trim_CPPFLAGS"
8213
8214 cf_fix_cppflags=no
8215 cf_new_cflags=
8216 cf_new_cppflags=
8217 cf_new_extra_cppflags=
8218
8219 for cf_add_cflags in $cf_cv_posix_c_source
8220 do
8221 case $cf_fix_cppflags in
8222 no)
8223         case $cf_add_cflags in #(vi
8224         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
8225                 case $cf_add_cflags in
8226                 -D*)
8227                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8228
8229                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
8230                                 && test -z "${cf_tst_cflags}" \
8231                                 && cf_fix_cppflags=yes
8232
8233                         if test $cf_fix_cppflags = yes ; then
8234                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8235                                 continue
8236                         elif test "${cf_tst_cflags}" = "\"'" ; then
8237                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8238                                 continue
8239                         fi
8240                         ;;
8241                 esac
8242                 case "$CPPFLAGS" in
8243                 *$cf_add_cflags) #(vi
8244                         ;;
8245                 *) #(vi
8246                         case $cf_add_cflags in #(vi
8247                         -D*)
8248                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8249
8250 CPPFLAGS=`echo "$CPPFLAGS" | \
8251         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8252                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8253
8254                                 ;;
8255                         esac
8256                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8257                         ;;
8258                 esac
8259                 ;;
8260         *)
8261                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8262                 ;;
8263         esac
8264         ;;
8265 yes)
8266         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8267
8268         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8269
8270         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
8271                 && test -z "${cf_tst_cflags}" \
8272                 && cf_fix_cppflags=no
8273         ;;
8274 esac
8275 done
8276
8277 if test -n "$cf_new_cflags" ; then
8278
8279         CFLAGS="$CFLAGS $cf_new_cflags"
8280 fi
8281
8282 if test -n "$cf_new_cppflags" ; then
8283
8284         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8285 fi
8286
8287 if test -n "$cf_new_extra_cppflags" ; then
8288
8289         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8290 fi
8291
8292 fi
8293
8294         ;;
8295 netbsd*) #(vi
8296         cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
8297         ;;
8298 openbsd[4-9]*) #(vi
8299         # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
8300         cf_xopen_source="-D_BSD_SOURCE"
8301         cf_XOPEN_SOURCE=600
8302         ;;
8303 openbsd*) #(vi
8304         # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
8305         ;;
8306 osf[45]*) #(vi
8307         cf_xopen_source="-D_OSF_SOURCE"
8308         ;;
8309 nto-qnx*) #(vi
8310         cf_xopen_source="-D_QNX_SOURCE"
8311         ;;
8312 sco*) #(vi
8313         # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
8314         ;;
8315 solaris2.*) #(vi
8316         cf_xopen_source="-D__EXTENSIONS__"
8317         ;;
8318 *)
8319
8320 echo "$as_me:8320: checking if we should define _XOPEN_SOURCE" >&5
8321 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
8322 if test "${cf_cv_xopen_source+set}" = set; then
8323   echo $ECHO_N "(cached) $ECHO_C" >&6
8324 else
8325
8326         cat >conftest.$ac_ext <<_ACEOF
8327 #line 8327 "configure"
8328 #include "confdefs.h"
8329
8330 #include <stdlib.h>
8331 #include <string.h>
8332 #include <sys/types.h>
8333
8334 int
8335 main ()
8336 {
8337
8338 #ifndef _XOPEN_SOURCE
8339 make an error
8340 #endif
8341   ;
8342   return 0;
8343 }
8344 _ACEOF
8345 rm -f conftest.$ac_objext
8346 if { (eval echo "$as_me:8346: \"$ac_compile\"") >&5
8347   (eval $ac_compile) 2>&5
8348   ac_status=$?
8349   echo "$as_me:8349: \$? = $ac_status" >&5
8350   (exit $ac_status); } &&
8351          { ac_try='test -s conftest.$ac_objext'
8352   { (eval echo "$as_me:8352: \"$ac_try\"") >&5
8353   (eval $ac_try) 2>&5
8354   ac_status=$?
8355   echo "$as_me:8355: \$? = $ac_status" >&5
8356   (exit $ac_status); }; }; then
8357   cf_cv_xopen_source=no
8358 else
8359   echo "$as_me: failed program was:" >&5
8360 cat conftest.$ac_ext >&5
8361 cf_save="$CPPFLAGS"
8362          CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
8363          cat >conftest.$ac_ext <<_ACEOF
8364 #line 8364 "configure"
8365 #include "confdefs.h"
8366
8367 #include <stdlib.h>
8368 #include <string.h>
8369 #include <sys/types.h>
8370
8371 int
8372 main ()
8373 {
8374
8375 #ifdef _XOPEN_SOURCE
8376 make an error
8377 #endif
8378   ;
8379   return 0;
8380 }
8381 _ACEOF
8382 rm -f conftest.$ac_objext
8383 if { (eval echo "$as_me:8383: \"$ac_compile\"") >&5
8384   (eval $ac_compile) 2>&5
8385   ac_status=$?
8386   echo "$as_me:8386: \$? = $ac_status" >&5
8387   (exit $ac_status); } &&
8388          { ac_try='test -s conftest.$ac_objext'
8389   { (eval echo "$as_me:8389: \"$ac_try\"") >&5
8390   (eval $ac_try) 2>&5
8391   ac_status=$?
8392   echo "$as_me:8392: \$? = $ac_status" >&5
8393   (exit $ac_status); }; }; then
8394   cf_cv_xopen_source=no
8395 else
8396   echo "$as_me: failed program was:" >&5
8397 cat conftest.$ac_ext >&5
8398 cf_cv_xopen_source=$cf_XOPEN_SOURCE
8399 fi
8400 rm -f conftest.$ac_objext conftest.$ac_ext
8401         CPPFLAGS="$cf_save"
8402
8403 fi
8404 rm -f conftest.$ac_objext conftest.$ac_ext
8405
8406 fi
8407 echo "$as_me:8407: result: $cf_cv_xopen_source" >&5
8408 echo "${ECHO_T}$cf_cv_xopen_source" >&6
8409
8410 if test "$cf_cv_xopen_source" != no ; then
8411
8412 CFLAGS=`echo "$CFLAGS" | \
8413         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
8414                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
8415
8416 CPPFLAGS=`echo "$CPPFLAGS" | \
8417         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
8418                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
8419
8420         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
8421
8422 cf_fix_cppflags=no
8423 cf_new_cflags=
8424 cf_new_cppflags=
8425 cf_new_extra_cppflags=
8426
8427 for cf_add_cflags in $cf_temp_xopen_source
8428 do
8429 case $cf_fix_cppflags in
8430 no)
8431         case $cf_add_cflags in #(vi
8432         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
8433                 case $cf_add_cflags in
8434                 -D*)
8435                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8436
8437                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
8438                                 && test -z "${cf_tst_cflags}" \
8439                                 && cf_fix_cppflags=yes
8440
8441                         if test $cf_fix_cppflags = yes ; then
8442                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8443                                 continue
8444                         elif test "${cf_tst_cflags}" = "\"'" ; then
8445                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8446                                 continue
8447                         fi
8448                         ;;
8449                 esac
8450                 case "$CPPFLAGS" in
8451                 *$cf_add_cflags) #(vi
8452                         ;;
8453                 *) #(vi
8454                         case $cf_add_cflags in #(vi
8455                         -D*)
8456                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8457
8458 CPPFLAGS=`echo "$CPPFLAGS" | \
8459         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8460                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8461
8462                                 ;;
8463                         esac
8464                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8465                         ;;
8466                 esac
8467                 ;;
8468         *)
8469                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8470                 ;;
8471         esac
8472         ;;
8473 yes)
8474         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8475
8476         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8477
8478         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
8479                 && test -z "${cf_tst_cflags}" \
8480                 && cf_fix_cppflags=no
8481         ;;
8482 esac
8483 done
8484
8485 if test -n "$cf_new_cflags" ; then
8486
8487         CFLAGS="$CFLAGS $cf_new_cflags"
8488 fi
8489
8490 if test -n "$cf_new_cppflags" ; then
8491
8492         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8493 fi
8494
8495 if test -n "$cf_new_extra_cppflags" ; then
8496
8497         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8498 fi
8499
8500 fi
8501
8502 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
8503
8504 cf_save_CFLAGS="$CFLAGS"
8505 cf_save_CPPFLAGS="$CPPFLAGS"
8506
8507 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
8508         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
8509                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
8510
8511 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
8512         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
8513                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
8514
8515 echo "$as_me:8515: checking if we should define _POSIX_C_SOURCE" >&5
8516 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
8517 if test "${cf_cv_posix_c_source+set}" = set; then
8518   echo $ECHO_N "(cached) $ECHO_C" >&6
8519 else
8520
8521 echo "${as_me:-configure}:8521: testing if the symbol is already defined go no further ..." 1>&5
8522
8523         cat >conftest.$ac_ext <<_ACEOF
8524 #line 8524 "configure"
8525 #include "confdefs.h"
8526 #include <sys/types.h>
8527 int
8528 main ()
8529 {
8530
8531 #ifndef _POSIX_C_SOURCE
8532 make an error
8533 #endif
8534   ;
8535   return 0;
8536 }
8537 _ACEOF
8538 rm -f conftest.$ac_objext
8539 if { (eval echo "$as_me:8539: \"$ac_compile\"") >&5
8540   (eval $ac_compile) 2>&5
8541   ac_status=$?
8542   echo "$as_me:8542: \$? = $ac_status" >&5
8543   (exit $ac_status); } &&
8544          { ac_try='test -s conftest.$ac_objext'
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   cf_cv_posix_c_source=no
8551 else
8552   echo "$as_me: failed program was:" >&5
8553 cat conftest.$ac_ext >&5
8554 cf_want_posix_source=no
8555          case .$cf_POSIX_C_SOURCE in #(vi
8556          .[12]??*) #(vi
8557                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
8558                 ;;
8559          .2) #(vi
8560                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
8561                 cf_want_posix_source=yes
8562                 ;;
8563          .*)
8564                 cf_want_posix_source=yes
8565                 ;;
8566          esac
8567          if test "$cf_want_posix_source" = yes ; then
8568                 cat >conftest.$ac_ext <<_ACEOF
8569 #line 8569 "configure"
8570 #include "confdefs.h"
8571 #include <sys/types.h>
8572 int
8573 main ()
8574 {
8575
8576 #ifdef _POSIX_SOURCE
8577 make an error
8578 #endif
8579   ;
8580   return 0;
8581 }
8582 _ACEOF
8583 rm -f conftest.$ac_objext
8584 if { (eval echo "$as_me:8584: \"$ac_compile\"") >&5
8585   (eval $ac_compile) 2>&5
8586   ac_status=$?
8587   echo "$as_me:8587: \$? = $ac_status" >&5
8588   (exit $ac_status); } &&
8589          { ac_try='test -s conftest.$ac_objext'
8590   { (eval echo "$as_me:8590: \"$ac_try\"") >&5
8591   (eval $ac_try) 2>&5
8592   ac_status=$?
8593   echo "$as_me:8593: \$? = $ac_status" >&5
8594   (exit $ac_status); }; }; then
8595   :
8596 else
8597   echo "$as_me: failed program was:" >&5
8598 cat conftest.$ac_ext >&5
8599 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
8600 fi
8601 rm -f conftest.$ac_objext conftest.$ac_ext
8602          fi
8603
8604 echo "${as_me:-configure}:8604: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
8605
8606          CFLAGS="$cf_trim_CFLAGS"
8607          CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
8608
8609 echo "${as_me:-configure}:8609: testing if the second compile does not leave our definition intact error ..." 1>&5
8610
8611          cat >conftest.$ac_ext <<_ACEOF
8612 #line 8612 "configure"
8613 #include "confdefs.h"
8614 #include <sys/types.h>
8615 int
8616 main ()
8617 {
8618
8619 #ifndef _POSIX_C_SOURCE
8620 make an error
8621 #endif
8622   ;
8623   return 0;
8624 }
8625 _ACEOF
8626 rm -f conftest.$ac_objext
8627 if { (eval echo "$as_me:8627: \"$ac_compile\"") >&5
8628   (eval $ac_compile) 2>&5
8629   ac_status=$?
8630   echo "$as_me:8630: \$? = $ac_status" >&5
8631   (exit $ac_status); } &&
8632          { ac_try='test -s conftest.$ac_objext'
8633   { (eval echo "$as_me:8633: \"$ac_try\"") >&5
8634   (eval $ac_try) 2>&5
8635   ac_status=$?
8636   echo "$as_me:8636: \$? = $ac_status" >&5
8637   (exit $ac_status); }; }; then
8638   :
8639 else
8640   echo "$as_me: failed program was:" >&5
8641 cat conftest.$ac_ext >&5
8642 cf_cv_posix_c_source=no
8643 fi
8644 rm -f conftest.$ac_objext conftest.$ac_ext
8645          CFLAGS="$cf_save_CFLAGS"
8646          CPPFLAGS="$cf_save_CPPFLAGS"
8647
8648 fi
8649 rm -f conftest.$ac_objext conftest.$ac_ext
8650
8651 fi
8652 echo "$as_me:8652: result: $cf_cv_posix_c_source" >&5
8653 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
8654
8655 if test "$cf_cv_posix_c_source" != no ; then
8656         CFLAGS="$cf_trim_CFLAGS"
8657         CPPFLAGS="$cf_trim_CPPFLAGS"
8658
8659 cf_fix_cppflags=no
8660 cf_new_cflags=
8661 cf_new_cppflags=
8662 cf_new_extra_cppflags=
8663
8664 for cf_add_cflags in $cf_cv_posix_c_source
8665 do
8666 case $cf_fix_cppflags in
8667 no)
8668         case $cf_add_cflags in #(vi
8669         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
8670                 case $cf_add_cflags in
8671                 -D*)
8672                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8673
8674                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
8675                                 && test -z "${cf_tst_cflags}" \
8676                                 && cf_fix_cppflags=yes
8677
8678                         if test $cf_fix_cppflags = yes ; then
8679                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8680                                 continue
8681                         elif test "${cf_tst_cflags}" = "\"'" ; then
8682                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8683                                 continue
8684                         fi
8685                         ;;
8686                 esac
8687                 case "$CPPFLAGS" in
8688                 *$cf_add_cflags) #(vi
8689                         ;;
8690                 *) #(vi
8691                         case $cf_add_cflags in #(vi
8692                         -D*)
8693                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8694
8695 CPPFLAGS=`echo "$CPPFLAGS" | \
8696         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8697                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8698
8699                                 ;;
8700                         esac
8701                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8702                         ;;
8703                 esac
8704                 ;;
8705         *)
8706                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8707                 ;;
8708         esac
8709         ;;
8710 yes)
8711         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8712
8713         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8714
8715         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
8716                 && test -z "${cf_tst_cflags}" \
8717                 && cf_fix_cppflags=no
8718         ;;
8719 esac
8720 done
8721
8722 if test -n "$cf_new_cflags" ; then
8723
8724         CFLAGS="$CFLAGS $cf_new_cflags"
8725 fi
8726
8727 if test -n "$cf_new_cppflags" ; then
8728
8729         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8730 fi
8731
8732 if test -n "$cf_new_extra_cppflags" ; then
8733
8734         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8735 fi
8736
8737 fi
8738
8739         ;;
8740 esac
8741
8742 if test -n "$cf_xopen_source" ; then
8743
8744 cf_fix_cppflags=no
8745 cf_new_cflags=
8746 cf_new_cppflags=
8747 cf_new_extra_cppflags=
8748
8749 for cf_add_cflags in $cf_xopen_source
8750 do
8751 case $cf_fix_cppflags in
8752 no)
8753         case $cf_add_cflags in #(vi
8754         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
8755                 case $cf_add_cflags in
8756                 -D*)
8757                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8758
8759                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
8760                                 && test -z "${cf_tst_cflags}" \
8761                                 && cf_fix_cppflags=yes
8762
8763                         if test $cf_fix_cppflags = yes ; then
8764                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8765                                 continue
8766                         elif test "${cf_tst_cflags}" = "\"'" ; then
8767                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8768                                 continue
8769                         fi
8770                         ;;
8771                 esac
8772                 case "$CPPFLAGS" in
8773                 *$cf_add_cflags) #(vi
8774                         ;;
8775                 *) #(vi
8776                         case $cf_add_cflags in #(vi
8777                         -D*)
8778                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8779
8780 CPPFLAGS=`echo "$CPPFLAGS" | \
8781         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8782                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8783
8784                                 ;;
8785                         esac
8786                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8787                         ;;
8788                 esac
8789                 ;;
8790         *)
8791                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8792                 ;;
8793         esac
8794         ;;
8795 yes)
8796         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8797
8798         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8799
8800         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
8801                 && test -z "${cf_tst_cflags}" \
8802                 && cf_fix_cppflags=no
8803         ;;
8804 esac
8805 done
8806
8807 if test -n "$cf_new_cflags" ; then
8808
8809         CFLAGS="$CFLAGS $cf_new_cflags"
8810 fi
8811
8812 if test -n "$cf_new_cppflags" ; then
8813
8814         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8815 fi
8816
8817 if test -n "$cf_new_extra_cppflags" ; then
8818
8819         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8820 fi
8821
8822 fi
8823
8824 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
8825         echo "$as_me:8825: checking if _XOPEN_SOURCE really is set" >&5
8826 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
8827         cat >conftest.$ac_ext <<_ACEOF
8828 #line 8828 "configure"
8829 #include "confdefs.h"
8830 #include <stdlib.h>
8831 int
8832 main ()
8833 {
8834
8835 #ifndef _XOPEN_SOURCE
8836 make an error
8837 #endif
8838   ;
8839   return 0;
8840 }
8841 _ACEOF
8842 rm -f conftest.$ac_objext
8843 if { (eval echo "$as_me:8843: \"$ac_compile\"") >&5
8844   (eval $ac_compile) 2>&5
8845   ac_status=$?
8846   echo "$as_me:8846: \$? = $ac_status" >&5
8847   (exit $ac_status); } &&
8848          { ac_try='test -s conftest.$ac_objext'
8849   { (eval echo "$as_me:8849: \"$ac_try\"") >&5
8850   (eval $ac_try) 2>&5
8851   ac_status=$?
8852   echo "$as_me:8852: \$? = $ac_status" >&5
8853   (exit $ac_status); }; }; then
8854   cf_XOPEN_SOURCE_set=yes
8855 else
8856   echo "$as_me: failed program was:" >&5
8857 cat conftest.$ac_ext >&5
8858 cf_XOPEN_SOURCE_set=no
8859 fi
8860 rm -f conftest.$ac_objext conftest.$ac_ext
8861         echo "$as_me:8861: result: $cf_XOPEN_SOURCE_set" >&5
8862 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
8863         if test $cf_XOPEN_SOURCE_set = yes
8864         then
8865                 cat >conftest.$ac_ext <<_ACEOF
8866 #line 8866 "configure"
8867 #include "confdefs.h"
8868 #include <stdlib.h>
8869 int
8870 main ()
8871 {
8872
8873 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
8874 make an error
8875 #endif
8876   ;
8877   return 0;
8878 }
8879 _ACEOF
8880 rm -f conftest.$ac_objext
8881 if { (eval echo "$as_me:8881: \"$ac_compile\"") >&5
8882   (eval $ac_compile) 2>&5
8883   ac_status=$?
8884   echo "$as_me:8884: \$? = $ac_status" >&5
8885   (exit $ac_status); } &&
8886          { ac_try='test -s conftest.$ac_objext'
8887   { (eval echo "$as_me:8887: \"$ac_try\"") >&5
8888   (eval $ac_try) 2>&5
8889   ac_status=$?
8890   echo "$as_me:8890: \$? = $ac_status" >&5
8891   (exit $ac_status); }; }; then
8892   cf_XOPEN_SOURCE_set_ok=yes
8893 else
8894   echo "$as_me: failed program was:" >&5
8895 cat conftest.$ac_ext >&5
8896 cf_XOPEN_SOURCE_set_ok=no
8897 fi
8898 rm -f conftest.$ac_objext conftest.$ac_ext
8899                 if test $cf_XOPEN_SOURCE_set_ok = no
8900                 then
8901                         { echo "$as_me:8901: WARNING: _XOPEN_SOURCE is lower than requested" >&5
8902 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
8903                 fi
8904         else
8905
8906 echo "$as_me:8906: checking if we should define _XOPEN_SOURCE" >&5
8907 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
8908 if test "${cf_cv_xopen_source+set}" = set; then
8909   echo $ECHO_N "(cached) $ECHO_C" >&6
8910 else
8911
8912         cat >conftest.$ac_ext <<_ACEOF
8913 #line 8913 "configure"
8914 #include "confdefs.h"
8915
8916 #include <stdlib.h>
8917 #include <string.h>
8918 #include <sys/types.h>
8919
8920 int
8921 main ()
8922 {
8923
8924 #ifndef _XOPEN_SOURCE
8925 make an error
8926 #endif
8927   ;
8928   return 0;
8929 }
8930 _ACEOF
8931 rm -f conftest.$ac_objext
8932 if { (eval echo "$as_me:8932: \"$ac_compile\"") >&5
8933   (eval $ac_compile) 2>&5
8934   ac_status=$?
8935   echo "$as_me:8935: \$? = $ac_status" >&5
8936   (exit $ac_status); } &&
8937          { ac_try='test -s conftest.$ac_objext'
8938   { (eval echo "$as_me:8938: \"$ac_try\"") >&5
8939   (eval $ac_try) 2>&5
8940   ac_status=$?
8941   echo "$as_me:8941: \$? = $ac_status" >&5
8942   (exit $ac_status); }; }; then
8943   cf_cv_xopen_source=no
8944 else
8945   echo "$as_me: failed program was:" >&5
8946 cat conftest.$ac_ext >&5
8947 cf_save="$CPPFLAGS"
8948          CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
8949          cat >conftest.$ac_ext <<_ACEOF
8950 #line 8950 "configure"
8951 #include "confdefs.h"
8952
8953 #include <stdlib.h>
8954 #include <string.h>
8955 #include <sys/types.h>
8956
8957 int
8958 main ()
8959 {
8960
8961 #ifdef _XOPEN_SOURCE
8962 make an error
8963 #endif
8964   ;
8965   return 0;
8966 }
8967 _ACEOF
8968 rm -f conftest.$ac_objext
8969 if { (eval echo "$as_me:8969: \"$ac_compile\"") >&5
8970   (eval $ac_compile) 2>&5
8971   ac_status=$?
8972   echo "$as_me:8972: \$? = $ac_status" >&5
8973   (exit $ac_status); } &&
8974          { ac_try='test -s conftest.$ac_objext'
8975   { (eval echo "$as_me:8975: \"$ac_try\"") >&5
8976   (eval $ac_try) 2>&5
8977   ac_status=$?
8978   echo "$as_me:8978: \$? = $ac_status" >&5
8979   (exit $ac_status); }; }; then
8980   cf_cv_xopen_source=no
8981 else
8982   echo "$as_me: failed program was:" >&5
8983 cat conftest.$ac_ext >&5
8984 cf_cv_xopen_source=$cf_XOPEN_SOURCE
8985 fi
8986 rm -f conftest.$ac_objext conftest.$ac_ext
8987         CPPFLAGS="$cf_save"
8988
8989 fi
8990 rm -f conftest.$ac_objext conftest.$ac_ext
8991
8992 fi
8993 echo "$as_me:8993: result: $cf_cv_xopen_source" >&5
8994 echo "${ECHO_T}$cf_cv_xopen_source" >&6
8995
8996 if test "$cf_cv_xopen_source" != no ; then
8997
8998 CFLAGS=`echo "$CFLAGS" | \
8999         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
9000                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
9001
9002 CPPFLAGS=`echo "$CPPFLAGS" | \
9003         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
9004                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
9005
9006         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
9007
9008 cf_fix_cppflags=no
9009 cf_new_cflags=
9010 cf_new_cppflags=
9011 cf_new_extra_cppflags=
9012
9013 for cf_add_cflags in $cf_temp_xopen_source
9014 do
9015 case $cf_fix_cppflags in
9016 no)
9017         case $cf_add_cflags in #(vi
9018         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
9019                 case $cf_add_cflags in
9020                 -D*)
9021                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9022
9023                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
9024                                 && test -z "${cf_tst_cflags}" \
9025                                 && cf_fix_cppflags=yes
9026
9027                         if test $cf_fix_cppflags = yes ; then
9028                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9029                                 continue
9030                         elif test "${cf_tst_cflags}" = "\"'" ; then
9031                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9032                                 continue
9033                         fi
9034                         ;;
9035                 esac
9036                 case "$CPPFLAGS" in
9037                 *$cf_add_cflags) #(vi
9038                         ;;
9039                 *) #(vi
9040                         case $cf_add_cflags in #(vi
9041                         -D*)
9042                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9043
9044 CPPFLAGS=`echo "$CPPFLAGS" | \
9045         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
9046                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
9047
9048                                 ;;
9049                         esac
9050                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
9051                         ;;
9052                 esac
9053                 ;;
9054         *)
9055                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
9056                 ;;
9057         esac
9058         ;;
9059 yes)
9060         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9061
9062         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
9063
9064         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
9065                 && test -z "${cf_tst_cflags}" \
9066                 && cf_fix_cppflags=no
9067         ;;
9068 esac
9069 done
9070
9071 if test -n "$cf_new_cflags" ; then
9072
9073         CFLAGS="$CFLAGS $cf_new_cflags"
9074 fi
9075
9076 if test -n "$cf_new_cppflags" ; then
9077
9078         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
9079 fi
9080
9081 if test -n "$cf_new_extra_cppflags" ; then
9082
9083         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
9084 fi
9085
9086 fi
9087
9088         fi
9089 fi
9090
9091 # Check whether --enable-largefile or --disable-largefile was given.
9092 if test "${enable_largefile+set}" = set; then
9093   enableval="$enable_largefile"
9094
9095 fi;
9096 if test "$enable_largefile" != no; then
9097
9098   echo "$as_me:9098: checking for special C compiler options needed for large files" >&5
9099 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
9100 if test "${ac_cv_sys_largefile_CC+set}" = set; then
9101   echo $ECHO_N "(cached) $ECHO_C" >&6
9102 else
9103   ac_cv_sys_largefile_CC=no
9104      if test "$GCC" != yes; then
9105        ac_save_CC=$CC
9106        while :; do
9107          # IRIX 6.2 and later do not support large files by default,
9108          # so use the C compiler's -n32 option if that helps.
9109          cat >conftest.$ac_ext <<_ACEOF
9110 #line 9110 "configure"
9111 #include "confdefs.h"
9112 #include <sys/types.h>
9113  /* Check that off_t can represent 2**63 - 1 correctly.
9114     We can't simply define LARGE_OFF_T to be 9223372036854775807,
9115     since some C++ compilers masquerading as C compilers
9116     incorrectly reject 9223372036854775807.  */
9117 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9118   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9119                        && LARGE_OFF_T % 2147483647 == 1)
9120                       ? 1 : -1];
9121 int
9122 main ()
9123 {
9124
9125   ;
9126   return 0;
9127 }
9128 _ACEOF
9129          rm -f conftest.$ac_objext
9130 if { (eval echo "$as_me:9130: \"$ac_compile\"") >&5
9131   (eval $ac_compile) 2>&5
9132   ac_status=$?
9133   echo "$as_me:9133: \$? = $ac_status" >&5
9134   (exit $ac_status); } &&
9135          { ac_try='test -s conftest.$ac_objext'
9136   { (eval echo "$as_me:9136: \"$ac_try\"") >&5
9137   (eval $ac_try) 2>&5
9138   ac_status=$?
9139   echo "$as_me:9139: \$? = $ac_status" >&5
9140   (exit $ac_status); }; }; then
9141   break
9142 else
9143   echo "$as_me: failed program was:" >&5
9144 cat conftest.$ac_ext >&5
9145 fi
9146 rm -f conftest.$ac_objext
9147          CC="$CC -n32"
9148          rm -f conftest.$ac_objext
9149 if { (eval echo "$as_me:9149: \"$ac_compile\"") >&5
9150   (eval $ac_compile) 2>&5
9151   ac_status=$?
9152   echo "$as_me:9152: \$? = $ac_status" >&5
9153   (exit $ac_status); } &&
9154          { ac_try='test -s conftest.$ac_objext'
9155   { (eval echo "$as_me:9155: \"$ac_try\"") >&5
9156   (eval $ac_try) 2>&5
9157   ac_status=$?
9158   echo "$as_me:9158: \$? = $ac_status" >&5
9159   (exit $ac_status); }; }; then
9160   ac_cv_sys_largefile_CC=' -n32'; break
9161 else
9162   echo "$as_me: failed program was:" >&5
9163 cat conftest.$ac_ext >&5
9164 fi
9165 rm -f conftest.$ac_objext
9166          break
9167        done
9168        CC=$ac_save_CC
9169        rm -f conftest.$ac_ext
9170     fi
9171 fi
9172 echo "$as_me:9172: result: $ac_cv_sys_largefile_CC" >&5
9173 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
9174   if test "$ac_cv_sys_largefile_CC" != no; then
9175     CC=$CC$ac_cv_sys_largefile_CC
9176   fi
9177
9178   echo "$as_me:9178: checking for _FILE_OFFSET_BITS value needed for large files" >&5
9179 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
9180 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
9181   echo $ECHO_N "(cached) $ECHO_C" >&6
9182 else
9183   while :; do
9184   ac_cv_sys_file_offset_bits=no
9185   cat >conftest.$ac_ext <<_ACEOF
9186 #line 9186 "configure"
9187 #include "confdefs.h"
9188 #include <sys/types.h>
9189  /* Check that off_t can represent 2**63 - 1 correctly.
9190     We can't simply define LARGE_OFF_T to be 9223372036854775807,
9191     since some C++ compilers masquerading as C compilers
9192     incorrectly reject 9223372036854775807.  */
9193 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9194   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9195                        && LARGE_OFF_T % 2147483647 == 1)
9196                       ? 1 : -1];
9197 int
9198 main ()
9199 {
9200
9201   ;
9202   return 0;
9203 }
9204 _ACEOF
9205 rm -f conftest.$ac_objext
9206 if { (eval echo "$as_me:9206: \"$ac_compile\"") >&5
9207   (eval $ac_compile) 2>&5
9208   ac_status=$?
9209   echo "$as_me:9209: \$? = $ac_status" >&5
9210   (exit $ac_status); } &&
9211          { ac_try='test -s conftest.$ac_objext'
9212   { (eval echo "$as_me:9212: \"$ac_try\"") >&5
9213   (eval $ac_try) 2>&5
9214   ac_status=$?
9215   echo "$as_me:9215: \$? = $ac_status" >&5
9216   (exit $ac_status); }; }; then
9217   break
9218 else
9219   echo "$as_me: failed program was:" >&5
9220 cat conftest.$ac_ext >&5
9221 fi
9222 rm -f conftest.$ac_objext conftest.$ac_ext
9223   cat >conftest.$ac_ext <<_ACEOF
9224 #line 9224 "configure"
9225 #include "confdefs.h"
9226 #define _FILE_OFFSET_BITS 64
9227 #include <sys/types.h>
9228  /* Check that off_t can represent 2**63 - 1 correctly.
9229     We can't simply define LARGE_OFF_T to be 9223372036854775807,
9230     since some C++ compilers masquerading as C compilers
9231     incorrectly reject 9223372036854775807.  */
9232 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9233   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9234                        && LARGE_OFF_T % 2147483647 == 1)
9235                       ? 1 : -1];
9236 int
9237 main ()
9238 {
9239
9240   ;
9241   return 0;
9242 }
9243 _ACEOF
9244 rm -f conftest.$ac_objext
9245 if { (eval echo "$as_me:9245: \"$ac_compile\"") >&5
9246   (eval $ac_compile) 2>&5
9247   ac_status=$?
9248   echo "$as_me:9248: \$? = $ac_status" >&5
9249   (exit $ac_status); } &&
9250          { ac_try='test -s conftest.$ac_objext'
9251   { (eval echo "$as_me:9251: \"$ac_try\"") >&5
9252   (eval $ac_try) 2>&5
9253   ac_status=$?
9254   echo "$as_me:9254: \$? = $ac_status" >&5
9255   (exit $ac_status); }; }; then
9256   ac_cv_sys_file_offset_bits=64; break
9257 else
9258   echo "$as_me: failed program was:" >&5
9259 cat conftest.$ac_ext >&5
9260 fi
9261 rm -f conftest.$ac_objext conftest.$ac_ext
9262   break
9263 done
9264 fi
9265 echo "$as_me:9265: result: $ac_cv_sys_file_offset_bits" >&5
9266 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
9267 if test "$ac_cv_sys_file_offset_bits" != no; then
9268
9269 cat >>confdefs.h <<EOF
9270 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
9271 EOF
9272
9273 fi
9274 rm -rf conftest*
9275   echo "$as_me:9275: checking for _LARGE_FILES value needed for large files" >&5
9276 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
9277 if test "${ac_cv_sys_large_files+set}" = set; then
9278   echo $ECHO_N "(cached) $ECHO_C" >&6
9279 else
9280   while :; do
9281   ac_cv_sys_large_files=no
9282   cat >conftest.$ac_ext <<_ACEOF
9283 #line 9283 "configure"
9284 #include "confdefs.h"
9285 #include <sys/types.h>
9286  /* Check that off_t can represent 2**63 - 1 correctly.
9287     We can't simply define LARGE_OFF_T to be 9223372036854775807,
9288     since some C++ compilers masquerading as C compilers
9289     incorrectly reject 9223372036854775807.  */
9290 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9291   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9292                        && LARGE_OFF_T % 2147483647 == 1)
9293                       ? 1 : -1];
9294 int
9295 main ()
9296 {
9297
9298   ;
9299   return 0;
9300 }
9301 _ACEOF
9302 rm -f conftest.$ac_objext
9303 if { (eval echo "$as_me:9303: \"$ac_compile\"") >&5
9304   (eval $ac_compile) 2>&5
9305   ac_status=$?
9306   echo "$as_me:9306: \$? = $ac_status" >&5
9307   (exit $ac_status); } &&
9308          { ac_try='test -s conftest.$ac_objext'
9309   { (eval echo "$as_me:9309: \"$ac_try\"") >&5
9310   (eval $ac_try) 2>&5
9311   ac_status=$?
9312   echo "$as_me:9312: \$? = $ac_status" >&5
9313   (exit $ac_status); }; }; then
9314   break
9315 else
9316   echo "$as_me: failed program was:" >&5
9317 cat conftest.$ac_ext >&5
9318 fi
9319 rm -f conftest.$ac_objext conftest.$ac_ext
9320   cat >conftest.$ac_ext <<_ACEOF
9321 #line 9321 "configure"
9322 #include "confdefs.h"
9323 #define _LARGE_FILES 1
9324 #include <sys/types.h>
9325  /* Check that off_t can represent 2**63 - 1 correctly.
9326     We can't simply define LARGE_OFF_T to be 9223372036854775807,
9327     since some C++ compilers masquerading as C compilers
9328     incorrectly reject 9223372036854775807.  */
9329 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9330   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9331                        && LARGE_OFF_T % 2147483647 == 1)
9332                       ? 1 : -1];
9333 int
9334 main ()
9335 {
9336
9337   ;
9338   return 0;
9339 }
9340 _ACEOF
9341 rm -f conftest.$ac_objext
9342 if { (eval echo "$as_me:9342: \"$ac_compile\"") >&5
9343   (eval $ac_compile) 2>&5
9344   ac_status=$?
9345   echo "$as_me:9345: \$? = $ac_status" >&5
9346   (exit $ac_status); } &&
9347          { ac_try='test -s conftest.$ac_objext'
9348   { (eval echo "$as_me:9348: \"$ac_try\"") >&5
9349   (eval $ac_try) 2>&5
9350   ac_status=$?
9351   echo "$as_me:9351: \$? = $ac_status" >&5
9352   (exit $ac_status); }; }; then
9353   ac_cv_sys_large_files=1; break
9354 else
9355   echo "$as_me: failed program was:" >&5
9356 cat conftest.$ac_ext >&5
9357 fi
9358 rm -f conftest.$ac_objext conftest.$ac_ext
9359   break
9360 done
9361 fi
9362 echo "$as_me:9362: result: $ac_cv_sys_large_files" >&5
9363 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
9364 if test "$ac_cv_sys_large_files" != no; then
9365
9366 cat >>confdefs.h <<EOF
9367 #define _LARGE_FILES $ac_cv_sys_large_files
9368 EOF
9369
9370 fi
9371 rm -rf conftest*
9372 fi
9373
9374     if test "$enable_largefile" != no ; then
9375         echo "$as_me:9375: checking for _LARGEFILE_SOURCE value needed for large files" >&5
9376 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
9377 if test "${ac_cv_sys_largefile_source+set}" = set; then
9378   echo $ECHO_N "(cached) $ECHO_C" >&6
9379 else
9380   while :; do
9381   ac_cv_sys_largefile_source=no
9382   cat >conftest.$ac_ext <<_ACEOF
9383 #line 9383 "configure"
9384 #include "confdefs.h"
9385 #include <stdio.h>
9386 int
9387 main ()
9388 {
9389 return !fseeko;
9390   ;
9391   return 0;
9392 }
9393 _ACEOF
9394 rm -f conftest.$ac_objext
9395 if { (eval echo "$as_me:9395: \"$ac_compile\"") >&5
9396   (eval $ac_compile) 2>&5
9397   ac_status=$?
9398   echo "$as_me:9398: \$? = $ac_status" >&5
9399   (exit $ac_status); } &&
9400          { ac_try='test -s conftest.$ac_objext'
9401   { (eval echo "$as_me:9401: \"$ac_try\"") >&5
9402   (eval $ac_try) 2>&5
9403   ac_status=$?
9404   echo "$as_me:9404: \$? = $ac_status" >&5
9405   (exit $ac_status); }; }; then
9406   break
9407 else
9408   echo "$as_me: failed program was:" >&5
9409 cat conftest.$ac_ext >&5
9410 fi
9411 rm -f conftest.$ac_objext conftest.$ac_ext
9412   cat >conftest.$ac_ext <<_ACEOF
9413 #line 9413 "configure"
9414 #include "confdefs.h"
9415 #define _LARGEFILE_SOURCE 1
9416 #include <stdio.h>
9417 int
9418 main ()
9419 {
9420 return !fseeko;
9421   ;
9422   return 0;
9423 }
9424 _ACEOF
9425 rm -f conftest.$ac_objext
9426 if { (eval echo "$as_me:9426: \"$ac_compile\"") >&5
9427   (eval $ac_compile) 2>&5
9428   ac_status=$?
9429   echo "$as_me:9429: \$? = $ac_status" >&5
9430   (exit $ac_status); } &&
9431          { ac_try='test -s conftest.$ac_objext'
9432   { (eval echo "$as_me:9432: \"$ac_try\"") >&5
9433   (eval $ac_try) 2>&5
9434   ac_status=$?
9435   echo "$as_me:9435: \$? = $ac_status" >&5
9436   (exit $ac_status); }; }; then
9437   ac_cv_sys_largefile_source=1; break
9438 else
9439   echo "$as_me: failed program was:" >&5
9440 cat conftest.$ac_ext >&5
9441 fi
9442 rm -f conftest.$ac_objext conftest.$ac_ext
9443   break
9444 done
9445 fi
9446 echo "$as_me:9446: result: $ac_cv_sys_largefile_source" >&5
9447 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
9448 if test "$ac_cv_sys_largefile_source" != no; then
9449
9450 cat >>confdefs.h <<EOF
9451 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
9452 EOF
9453
9454 fi
9455 rm -rf conftest*
9456
9457 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
9458 # in glibc 2.1.3, but that breaks too many other things.
9459 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
9460 echo "$as_me:9460: checking for fseeko" >&5
9461 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
9462 if test "${ac_cv_func_fseeko+set}" = set; then
9463   echo $ECHO_N "(cached) $ECHO_C" >&6
9464 else
9465   cat >conftest.$ac_ext <<_ACEOF
9466 #line 9466 "configure"
9467 #include "confdefs.h"
9468 #include <stdio.h>
9469 int
9470 main ()
9471 {
9472 return fseeko && fseeko (stdin, 0, 0);
9473   ;
9474   return 0;
9475 }
9476 _ACEOF
9477 rm -f conftest.$ac_objext conftest$ac_exeext
9478 if { (eval echo "$as_me:9478: \"$ac_link\"") >&5
9479   (eval $ac_link) 2>&5
9480   ac_status=$?
9481   echo "$as_me:9481: \$? = $ac_status" >&5
9482   (exit $ac_status); } &&
9483          { ac_try='test -s conftest$ac_exeext'
9484   { (eval echo "$as_me:9484: \"$ac_try\"") >&5
9485   (eval $ac_try) 2>&5
9486   ac_status=$?
9487   echo "$as_me:9487: \$? = $ac_status" >&5
9488   (exit $ac_status); }; }; then
9489   ac_cv_func_fseeko=yes
9490 else
9491   echo "$as_me: failed program was:" >&5
9492 cat conftest.$ac_ext >&5
9493 ac_cv_func_fseeko=no
9494 fi
9495 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9496 fi
9497 echo "$as_me:9497: result: $ac_cv_func_fseeko" >&5
9498 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
9499 if test $ac_cv_func_fseeko = yes; then
9500
9501 cat >>confdefs.h <<\EOF
9502 #define HAVE_FSEEKO 1
9503 EOF
9504
9505 fi
9506
9507         # Normally we would collect these definitions in the config.h,
9508         # but (like _XOPEN_SOURCE), some environments rely on having these
9509         # defined before any of the system headers are included.  Another
9510         # case comes up with C++, e.g., on AIX the compiler compiles the
9511         # header files by themselves before looking at the body files it is
9512         # told to compile.  For ncurses, those header files do not include
9513         # the config.h
9514         test "$ac_cv_sys_large_files"      != no && CPPFLAGS="$CPPFLAGS -D_LARGE_FILES "
9515         test "$ac_cv_sys_largefile_source" != no && CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE "
9516         test "$ac_cv_sys_file_offset_bits" != no && CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits "
9517
9518         echo "$as_me:9518: checking whether to use struct dirent64" >&5
9519 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
9520 if test "${cf_cv_struct_dirent64+set}" = set; then
9521   echo $ECHO_N "(cached) $ECHO_C" >&6
9522 else
9523
9524                 cat >conftest.$ac_ext <<_ACEOF
9525 #line 9525 "configure"
9526 #include "confdefs.h"
9527
9528 #include <sys/types.h>
9529 #include <dirent.h>
9530
9531 int
9532 main ()
9533 {
9534
9535                 /* if transitional largefile support is setup, this is true */
9536                 extern struct dirent64 * readdir(DIR *);
9537                 struct dirent64 *x = readdir((DIR *)0);
9538                 struct dirent *y = readdir((DIR *)0);
9539                 int z = x - y;
9540
9541   ;
9542   return 0;
9543 }
9544 _ACEOF
9545 rm -f conftest.$ac_objext
9546 if { (eval echo "$as_me:9546: \"$ac_compile\"") >&5
9547   (eval $ac_compile) 2>&5
9548   ac_status=$?
9549   echo "$as_me:9549: \$? = $ac_status" >&5
9550   (exit $ac_status); } &&
9551          { ac_try='test -s conftest.$ac_objext'
9552   { (eval echo "$as_me:9552: \"$ac_try\"") >&5
9553   (eval $ac_try) 2>&5
9554   ac_status=$?
9555   echo "$as_me:9555: \$? = $ac_status" >&5
9556   (exit $ac_status); }; }; then
9557   cf_cv_struct_dirent64=yes
9558 else
9559   echo "$as_me: failed program was:" >&5
9560 cat conftest.$ac_ext >&5
9561 cf_cv_struct_dirent64=no
9562 fi
9563 rm -f conftest.$ac_objext conftest.$ac_ext
9564
9565 fi
9566 echo "$as_me:9566: result: $cf_cv_struct_dirent64" >&5
9567 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
9568         test "$cf_cv_struct_dirent64" = yes && cat >>confdefs.h <<\EOF
9569 #define HAVE_STRUCT_DIRENT64 1
9570 EOF
9571
9572     fi
9573
9574 ### Enable compiling-in rcs id's
9575 echo "$as_me:9575: checking if RCS identifiers should be compiled-in" >&5
9576 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
9577
9578 # Check whether --with-rcs-ids or --without-rcs-ids was given.
9579 if test "${with_rcs_ids+set}" = set; then
9580   withval="$with_rcs_ids"
9581   with_rcs_ids=$withval
9582 else
9583   with_rcs_ids=no
9584 fi;
9585 echo "$as_me:9585: result: $with_rcs_ids" >&5
9586 echo "${ECHO_T}$with_rcs_ids" >&6
9587 test "$with_rcs_ids" = yes && cat >>confdefs.h <<\EOF
9588 #define USE_RCS_IDS 1
9589 EOF
9590
9591 ###############################################################################
9592
9593 ### Note that some functions (such as const) are normally disabled anyway.
9594 echo "$as_me:9594: checking if you want to build with function extensions" >&5
9595 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
9596
9597 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
9598 if test "${enable_ext_funcs+set}" = set; then
9599   enableval="$enable_ext_funcs"
9600   with_ext_funcs=$enableval
9601 else
9602   with_ext_funcs=yes
9603 fi;
9604 echo "$as_me:9604: result: $with_ext_funcs" >&5
9605 echo "${ECHO_T}$with_ext_funcs" >&6
9606 if test "$with_ext_funcs" = yes ; then
9607         NCURSES_EXT_FUNCS=1
9608         cat >>confdefs.h <<\EOF
9609 #define HAVE_USE_DEFAULT_COLORS 1
9610 EOF
9611
9612         cat >>confdefs.h <<\EOF
9613 #define NCURSES_EXT_FUNCS 1
9614 EOF
9615
9616 else
9617         NCURSES_EXT_FUNCS=0
9618 fi
9619
9620 ###   use option --enable-const to turn on use of const beyond that in XSI.
9621 echo "$as_me:9621: checking for extended use of const keyword" >&5
9622 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
9623
9624 # Check whether --enable-const or --disable-const was given.
9625 if test "${enable_const+set}" = set; then
9626   enableval="$enable_const"
9627   with_ext_const=$enableval
9628 else
9629   with_ext_const=no
9630 fi;
9631 echo "$as_me:9631: result: $with_ext_const" >&5
9632 echo "${ECHO_T}$with_ext_const" >&6
9633 NCURSES_CONST='/*nothing*/'
9634 if test "$with_ext_const" = yes ; then
9635         NCURSES_CONST=const
9636 fi
9637
9638 ###############################################################################
9639 # These options are relatively safe to experiment with.
9640
9641 echo "$as_me:9641: checking if you want all development code" >&5
9642 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
9643
9644 # Check whether --with-develop or --without-develop was given.
9645 if test "${with_develop+set}" = set; then
9646   withval="$with_develop"
9647   with_develop=$withval
9648 else
9649   with_develop=no
9650 fi;
9651 echo "$as_me:9651: result: $with_develop" >&5
9652 echo "${ECHO_T}$with_develop" >&6
9653
9654 ###############################################################################
9655 # These are just experimental, probably should not be in a package:
9656
9657 # This is still experimental (20080329), but should ultimately be moved to
9658 # the script-block --with-normal, etc.
9659
9660 echo "$as_me:9660: checking if you want to link with the pthread library" >&5
9661 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
9662
9663 # Check whether --with-pthread or --without-pthread was given.
9664 if test "${with_pthread+set}" = set; then
9665   withval="$with_pthread"
9666   with_pthread=$withval
9667 else
9668   with_pthread=no
9669 fi;
9670 echo "$as_me:9670: result: $with_pthread" >&5
9671 echo "${ECHO_T}$with_pthread" >&6
9672
9673 if test "$with_pthread" != no ; then
9674     echo "$as_me:9674: checking for pthread.h" >&5
9675 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
9676 if test "${ac_cv_header_pthread_h+set}" = set; then
9677   echo $ECHO_N "(cached) $ECHO_C" >&6
9678 else
9679   cat >conftest.$ac_ext <<_ACEOF
9680 #line 9680 "configure"
9681 #include "confdefs.h"
9682 #include <pthread.h>
9683 _ACEOF
9684 if { (eval echo "$as_me:9684: \"$ac_cpp conftest.$ac_ext\"") >&5
9685   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9686   ac_status=$?
9687   egrep -v '^ *\+' conftest.er1 >conftest.err
9688   rm -f conftest.er1
9689   cat conftest.err >&5
9690   echo "$as_me:9690: \$? = $ac_status" >&5
9691   (exit $ac_status); } >/dev/null; then
9692   if test -s conftest.err; then
9693     ac_cpp_err=$ac_c_preproc_warn_flag
9694   else
9695     ac_cpp_err=
9696   fi
9697 else
9698   ac_cpp_err=yes
9699 fi
9700 if test -z "$ac_cpp_err"; then
9701   ac_cv_header_pthread_h=yes
9702 else
9703   echo "$as_me: failed program was:" >&5
9704   cat conftest.$ac_ext >&5
9705   ac_cv_header_pthread_h=no
9706 fi
9707 rm -f conftest.err conftest.$ac_ext
9708 fi
9709 echo "$as_me:9709: result: $ac_cv_header_pthread_h" >&5
9710 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
9711 if test $ac_cv_header_pthread_h = yes; then
9712
9713         cat >>confdefs.h <<\EOF
9714 #define HAVE_PTHREADS_H 1
9715 EOF
9716
9717         for cf_lib_pthread in pthread c_r
9718         do
9719             echo "$as_me:9719: checking if we can link with the $cf_lib_pthread library" >&5
9720 echo $ECHO_N "checking if we can link with the $cf_lib_pthread library... $ECHO_C" >&6
9721             cf_save_LIBS="$LIBS"
9722             LIBS="-l$cf_lib_pthread $LIBS"
9723             cat >conftest.$ac_ext <<_ACEOF
9724 #line 9724 "configure"
9725 #include "confdefs.h"
9726
9727 #include <pthread.h>
9728
9729 int
9730 main ()
9731 {
9732
9733                 int rc = pthread_create(0,0,0,0);
9734                 int r2 = pthread_mutexattr_settype(0, 0);
9735
9736   ;
9737   return 0;
9738 }
9739 _ACEOF
9740 rm -f conftest.$ac_objext conftest$ac_exeext
9741 if { (eval echo "$as_me:9741: \"$ac_link\"") >&5
9742   (eval $ac_link) 2>&5
9743   ac_status=$?
9744   echo "$as_me:9744: \$? = $ac_status" >&5
9745   (exit $ac_status); } &&
9746          { ac_try='test -s conftest$ac_exeext'
9747   { (eval echo "$as_me:9747: \"$ac_try\"") >&5
9748   (eval $ac_try) 2>&5
9749   ac_status=$?
9750   echo "$as_me:9750: \$? = $ac_status" >&5
9751   (exit $ac_status); }; }; then
9752   with_pthread=yes
9753 else
9754   echo "$as_me: failed program was:" >&5
9755 cat conftest.$ac_ext >&5
9756 with_pthread=no
9757 fi
9758 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9759             LIBS="$cf_save_LIBS"
9760             echo "$as_me:9760: result: $with_pthread" >&5
9761 echo "${ECHO_T}$with_pthread" >&6
9762             test "$with_pthread" = yes && break
9763         done
9764
9765         if test "$with_pthread" = yes ; then
9766             LIBS="-l$cf_lib_pthread $LIBS"
9767             cat >>confdefs.h <<\EOF
9768 #define HAVE_LIBPTHREADS 1
9769 EOF
9770
9771         else
9772             { { echo "$as_me:9772: error: Cannot link with pthread library" >&5
9773 echo "$as_me: error: Cannot link with pthread library" >&2;}
9774    { (exit 1); exit 1; }; }
9775         fi
9776
9777 fi
9778
9779 fi
9780
9781 echo "$as_me:9781: checking if you want to use weak-symbols for pthreads" >&5
9782 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
9783
9784 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
9785 if test "${enable_weak_symbols+set}" = set; then
9786   enableval="$enable_weak_symbols"
9787   use_weak_symbols=$withval
9788 else
9789   use_weak_symbols=no
9790 fi;
9791 echo "$as_me:9791: result: $use_weak_symbols" >&5
9792 echo "${ECHO_T}$use_weak_symbols" >&6
9793 if test "$use_weak_symbols" = yes ; then
9794
9795 echo "$as_me:9795: checking if $CC supports weak symbols" >&5
9796 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
9797 if test "${cf_cv_weak_symbols+set}" = set; then
9798   echo $ECHO_N "(cached) $ECHO_C" >&6
9799 else
9800
9801 cat >conftest.$ac_ext <<_ACEOF
9802 #line 9802 "configure"
9803 #include "confdefs.h"
9804
9805 #include <stdio.h>
9806 int
9807 main ()
9808 {
9809
9810 #if defined(__GNUC__)
9811 #  if defined __USE_ISOC99
9812 #    define _cat_pragma(exp)    _Pragma(#exp)
9813 #    define _weak_pragma(exp)   _cat_pragma(weak name)
9814 #  else
9815 #    define _weak_pragma(exp)
9816 #  endif
9817 #  define _declare(name)        __extension__ extern __typeof__(name) name
9818 #  define weak_symbol(name)     _weak_pragma(name) _declare(name) __attribute__((weak))
9819 #endif
9820
9821 weak_symbol(fopen);
9822
9823   ;
9824   return 0;
9825 }
9826 _ACEOF
9827 rm -f conftest.$ac_objext
9828 if { (eval echo "$as_me:9828: \"$ac_compile\"") >&5
9829   (eval $ac_compile) 2>&5
9830   ac_status=$?
9831   echo "$as_me:9831: \$? = $ac_status" >&5
9832   (exit $ac_status); } &&
9833          { ac_try='test -s conftest.$ac_objext'
9834   { (eval echo "$as_me:9834: \"$ac_try\"") >&5
9835   (eval $ac_try) 2>&5
9836   ac_status=$?
9837   echo "$as_me:9837: \$? = $ac_status" >&5
9838   (exit $ac_status); }; }; then
9839   cf_cv_weak_symbols=yes
9840 else
9841   echo "$as_me: failed program was:" >&5
9842 cat conftest.$ac_ext >&5
9843 cf_cv_weak_symbols=no
9844 fi
9845 rm -f conftest.$ac_objext conftest.$ac_ext
9846
9847 fi
9848 echo "$as_me:9848: result: $cf_cv_weak_symbols" >&5
9849 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
9850
9851 else
9852     cf_cv_weak_symbols=no
9853 fi
9854
9855 if test $cf_cv_weak_symbols = yes ; then
9856     cat >>confdefs.h <<\EOF
9857 #define USE_WEAK_SYMBOLS 1
9858 EOF
9859
9860 fi
9861
9862 PTHREAD=
9863 if test "$with_pthread" = "yes" ; then
9864     cat >>confdefs.h <<\EOF
9865 #define USE_PTHREADS 1
9866 EOF
9867
9868     enable_reentrant=yes
9869     if test $cf_cv_weak_symbols = yes ; then
9870         PTHREAD=-lpthread
9871     fi
9872 fi
9873
9874 # OpenSUSE is installing ncurses6, using reentrant option.
9875 echo "$as_me:9875: checking for _nc_TABSIZE" >&5
9876 echo $ECHO_N "checking for _nc_TABSIZE... $ECHO_C" >&6
9877 if test "${ac_cv_func__nc_TABSIZE+set}" = set; then
9878   echo $ECHO_N "(cached) $ECHO_C" >&6
9879 else
9880   cat >conftest.$ac_ext <<_ACEOF
9881 #line 9881 "configure"
9882 #include "confdefs.h"
9883 /* System header to define __stub macros and hopefully few prototypes,
9884     which can conflict with char _nc_TABSIZE (); below.  */
9885 #include <assert.h>
9886 /* Override any gcc2 internal prototype to avoid an error.  */
9887 #ifdef __cplusplus
9888 extern "C"
9889 #endif
9890 /* We use char because int might match the return type of a gcc2
9891    builtin and then its argument prototype would still apply.  */
9892 char _nc_TABSIZE ();
9893 char (*f) ();
9894
9895 int
9896 main ()
9897 {
9898 /* The GNU C library defines this for functions which it implements
9899     to always fail with ENOSYS.  Some functions are actually named
9900     something starting with __ and the normal name is an alias.  */
9901 #if defined (__stub__nc_TABSIZE) || defined (__stub____nc_TABSIZE)
9902 choke me
9903 #else
9904 f = _nc_TABSIZE; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
9905 #endif
9906
9907   ;
9908   return 0;
9909 }
9910 _ACEOF
9911 rm -f conftest.$ac_objext conftest$ac_exeext
9912 if { (eval echo "$as_me:9912: \"$ac_link\"") >&5
9913   (eval $ac_link) 2>&5
9914   ac_status=$?
9915   echo "$as_me:9915: \$? = $ac_status" >&5
9916   (exit $ac_status); } &&
9917          { ac_try='test -s conftest$ac_exeext'
9918   { (eval echo "$as_me:9918: \"$ac_try\"") >&5
9919   (eval $ac_try) 2>&5
9920   ac_status=$?
9921   echo "$as_me:9921: \$? = $ac_status" >&5
9922   (exit $ac_status); }; }; then
9923   ac_cv_func__nc_TABSIZE=yes
9924 else
9925   echo "$as_me: failed program was:" >&5
9926 cat conftest.$ac_ext >&5
9927 ac_cv_func__nc_TABSIZE=no
9928 fi
9929 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9930 fi
9931 echo "$as_me:9931: result: $ac_cv_func__nc_TABSIZE" >&5
9932 echo "${ECHO_T}$ac_cv_func__nc_TABSIZE" >&6
9933 if test $ac_cv_func__nc_TABSIZE = yes; then
9934   assume_reentrant=yes
9935 else
9936   assume_reentrant=no
9937 fi
9938
9939 # Reentrant code has to be opaque; there's little advantage to making ncurses
9940 # opaque outside of that, so there is no --enable-opaque option.  We can use
9941 # this option without --with-pthreads, but this will be always set for
9942 # pthreads.
9943 echo "$as_me:9943: checking if you want experimental reentrant code" >&5
9944 echo $ECHO_N "checking if you want experimental reentrant code... $ECHO_C" >&6
9945
9946 # Check whether --enable-reentrant or --disable-reentrant was given.
9947 if test "${enable_reentrant+set}" = set; then
9948   enableval="$enable_reentrant"
9949   with_reentrant=$enableval
9950 else
9951   with_reentrant=$assume_reentrant
9952 fi;
9953 echo "$as_me:9953: result: $with_reentrant" >&5
9954 echo "${ECHO_T}$with_reentrant" >&6
9955 if test "$with_reentrant" = yes ; then
9956         cf_cv_enable_reentrant=1
9957         if test $cf_cv_weak_symbols = yes ; then
9958
9959 # remove pthread library from $LIBS
9960 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[       ]//g' -e 's/-lpthread$//'`
9961
9962         elif test "$assume_reentrant" = no ; then
9963                 LIB_SUFFIX="t${LIB_SUFFIX}"
9964         fi
9965         cat >>confdefs.h <<\EOF
9966 #define USE_REENTRANT 1
9967 EOF
9968
9969 else
9970         cf_cv_enable_reentrant=0
9971 fi
9972
9973 ### Allow using a different wrap-prefix
9974 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
9975         echo "$as_me:9975: checking for prefix used to wrap public variables" >&5
9976 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
9977
9978 # Check whether --with-wrap-prefix or --without-wrap-prefix was given.
9979 if test "${with_wrap_prefix+set}" = set; then
9980   withval="$with_wrap_prefix"
9981   NCURSES_WRAP_PREFIX=$withval
9982 else
9983   NCURSES_WRAP_PREFIX=_nc_
9984 fi;
9985         echo "$as_me:9985: result: $NCURSES_WRAP_PREFIX" >&5
9986 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
9987 else
9988         NCURSES_WRAP_PREFIX=_nc_
9989 fi
9990
9991 cat >>confdefs.h <<EOF
9992 #define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
9993 EOF
9994
9995 ###############################################################################
9996
9997 ###     use option --disable-echo to suppress full display compiling commands
9998
9999 echo "$as_me:9999: checking if you want to see long compiling messages" >&5
10000 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
10001
10002 # Check whether --enable-echo or --disable-echo was given.
10003 if test "${enable_echo+set}" = set; then
10004   enableval="$enable_echo"
10005   test "$enableval" != no && enableval=yes
10006   if test "$enableval" != "yes" ; then
10007
10008     ECHO_LT='--silent'
10009     ECHO_LD='@echo linking $@;'
10010     RULE_CC='@echo compiling $<'
10011     SHOW_CC='@echo compiling $@'
10012     ECHO_CC='@'
10013
10014   else
10015
10016     ECHO_LT=''
10017     ECHO_LD=''
10018     RULE_CC=''
10019     SHOW_CC=''
10020     ECHO_CC=''
10021
10022   fi
10023 else
10024   enableval=yes
10025
10026     ECHO_LT=''
10027     ECHO_LD=''
10028     RULE_CC=''
10029     SHOW_CC=''
10030     ECHO_CC=''
10031
10032 fi;
10033 echo "$as_me:10033: result: $enableval" >&5
10034 echo "${ECHO_T}$enableval" >&6
10035
10036 ###     use option --enable-warnings to turn on all gcc warnings
10037 echo "$as_me:10037: checking if you want to see compiler warnings" >&5
10038 echo $ECHO_N "checking if you want to see compiler warnings... $ECHO_C" >&6
10039
10040 # Check whether --enable-warnings or --disable-warnings was given.
10041 if test "${enable_warnings+set}" = set; then
10042   enableval="$enable_warnings"
10043   with_warnings=$enableval
10044 fi;
10045 echo "$as_me:10045: result: $with_warnings" >&5
10046 echo "${ECHO_T}$with_warnings" >&6
10047
10048 if test "x$with_warnings" = "xyes"; then
10049
10050         ADAFLAGS="$ADAFLAGS -gnatg"
10051
10052 INTEL_COMPILER=no
10053
10054 if test "$GCC" = yes ; then
10055         case $host_os in
10056         linux*|gnu*)
10057                 echo "$as_me:10057: checking if this is really Intel C compiler" >&5
10058 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
10059                 cf_save_CFLAGS="$CFLAGS"
10060                 CFLAGS="$CFLAGS -no-gcc"
10061                 cat >conftest.$ac_ext <<_ACEOF
10062 #line 10062 "configure"
10063 #include "confdefs.h"
10064
10065 int
10066 main ()
10067 {
10068
10069 #ifdef __INTEL_COMPILER
10070 #else
10071 make an error
10072 #endif
10073
10074   ;
10075   return 0;
10076 }
10077 _ACEOF
10078 rm -f conftest.$ac_objext
10079 if { (eval echo "$as_me:10079: \"$ac_compile\"") >&5
10080   (eval $ac_compile) 2>&5
10081   ac_status=$?
10082   echo "$as_me:10082: \$? = $ac_status" >&5
10083   (exit $ac_status); } &&
10084          { ac_try='test -s conftest.$ac_objext'
10085   { (eval echo "$as_me:10085: \"$ac_try\"") >&5
10086   (eval $ac_try) 2>&5
10087   ac_status=$?
10088   echo "$as_me:10088: \$? = $ac_status" >&5
10089   (exit $ac_status); }; }; then
10090   INTEL_COMPILER=yes
10091 cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
10092
10093 else
10094   echo "$as_me: failed program was:" >&5
10095 cat conftest.$ac_ext >&5
10096 fi
10097 rm -f conftest.$ac_objext conftest.$ac_ext
10098                 CFLAGS="$cf_save_CFLAGS"
10099                 echo "$as_me:10099: result: $INTEL_COMPILER" >&5
10100 echo "${ECHO_T}$INTEL_COMPILER" >&6
10101                 ;;
10102         esac
10103 fi
10104
10105 CLANG_COMPILER=no
10106
10107 if test "$GCC" = yes ; then
10108         echo "$as_me:10108: checking if this is really Clang C compiler" >&5
10109 echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6
10110         cf_save_CFLAGS="$CFLAGS"
10111         CFLAGS="$CFLAGS -Qunused-arguments"
10112         cat >conftest.$ac_ext <<_ACEOF
10113 #line 10113 "configure"
10114 #include "confdefs.h"
10115
10116 int
10117 main ()
10118 {
10119
10120 #ifdef __clang__
10121 #else
10122 make an error
10123 #endif
10124
10125   ;
10126   return 0;
10127 }
10128 _ACEOF
10129 rm -f conftest.$ac_objext
10130 if { (eval echo "$as_me:10130: \"$ac_compile\"") >&5
10131   (eval $ac_compile) 2>&5
10132   ac_status=$?
10133   echo "$as_me:10133: \$? = $ac_status" >&5
10134   (exit $ac_status); } &&
10135          { ac_try='test -s conftest.$ac_objext'
10136   { (eval echo "$as_me:10136: \"$ac_try\"") >&5
10137   (eval $ac_try) 2>&5
10138   ac_status=$?
10139   echo "$as_me:10139: \$? = $ac_status" >&5
10140   (exit $ac_status); }; }; then
10141   CLANG_COMPILER=yes
10142 cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
10143
10144 else
10145   echo "$as_me: failed program was:" >&5
10146 cat conftest.$ac_ext >&5
10147 fi
10148 rm -f conftest.$ac_objext conftest.$ac_ext
10149         CFLAGS="$cf_save_CFLAGS"
10150         echo "$as_me:10150: result: $CLANG_COMPILER" >&5
10151 echo "${ECHO_T}$CLANG_COMPILER" >&6
10152 fi
10153
10154 cat > conftest.$ac_ext <<EOF
10155 #line 10155 "${as_me:-configure}"
10156 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
10157 EOF
10158
10159 if test "$INTEL_COMPILER" = yes
10160 then
10161 # The "-wdXXX" options suppress warnings:
10162 # remark #1419: external declaration in primary source file
10163 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
10164 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
10165 # remark #193: zero used for undefined preprocessing identifier
10166 # remark #593: variable "curs_sb_left_arrow" was set but never used
10167 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
10168 # remark #869: parameter "tw" was never referenced
10169 # remark #981: operands are evaluated in unspecified order
10170 # warning #279: controlling expression is constant
10171
10172         { echo "$as_me:10172: checking for $CC warning options..." >&5
10173 echo "$as_me: checking for $CC warning options..." >&6;}
10174         cf_save_CFLAGS="$CFLAGS"
10175         EXTRA_CFLAGS="-Wall"
10176         for cf_opt in \
10177                 wd1419 \
10178                 wd1683 \
10179                 wd1684 \
10180                 wd193 \
10181                 wd593 \
10182                 wd279 \
10183                 wd810 \
10184                 wd869 \
10185                 wd981
10186         do
10187                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
10188                 if { (eval echo "$as_me:10188: \"$ac_compile\"") >&5
10189   (eval $ac_compile) 2>&5
10190   ac_status=$?
10191   echo "$as_me:10191: \$? = $ac_status" >&5
10192   (exit $ac_status); }; then
10193                         test -n "$verbose" && echo "$as_me:10193: result: ... -$cf_opt" >&5
10194 echo "${ECHO_T}... -$cf_opt" >&6
10195                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
10196                 fi
10197         done
10198         CFLAGS="$cf_save_CFLAGS"
10199
10200 elif test "$GCC" = yes
10201 then
10202         { echo "$as_me:10202: checking for $CC warning options..." >&5
10203 echo "$as_me: checking for $CC warning options..." >&6;}
10204         cf_save_CFLAGS="$CFLAGS"
10205         EXTRA_CFLAGS=
10206         cf_warn_CONST=""
10207         test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
10208         for cf_opt in W Wall \
10209                 Wbad-function-cast \
10210                 Wcast-align \
10211                 Wcast-qual \
10212                 Winline \
10213                 Wmissing-declarations \
10214                 Wmissing-prototypes \
10215                 Wnested-externs \
10216                 Wpointer-arith \
10217                 Wshadow \
10218                 Wstrict-prototypes \
10219                 Wundef $cf_warn_CONST Wdeclaration-after-statement Wextra Wno-unknown-pragmas Wswitch-enum
10220         do
10221                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
10222                 if { (eval echo "$as_me:10222: \"$ac_compile\"") >&5
10223   (eval $ac_compile) 2>&5
10224   ac_status=$?
10225   echo "$as_me:10225: \$? = $ac_status" >&5
10226   (exit $ac_status); }; then
10227                         test -n "$verbose" && echo "$as_me:10227: result: ... -$cf_opt" >&5
10228 echo "${ECHO_T}... -$cf_opt" >&6
10229                         case $cf_opt in #(vi
10230                         Wcast-qual) #(vi
10231                                 CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
10232                                 ;;
10233                         Winline) #(vi
10234                                 case $GCC_VERSION in
10235                                 [34].*)
10236                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
10237
10238 echo "${as_me:-configure}:10238: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
10239
10240                                         continue;;
10241                                 esac
10242                                 ;;
10243                         Wpointer-arith) #(vi
10244                                 case $GCC_VERSION in
10245                                 [12].*)
10246                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
10247
10248 echo "${as_me:-configure}:10248: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
10249
10250                                         continue;;
10251                                 esac
10252                                 ;;
10253                         esac
10254                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
10255                 fi
10256         done
10257         CFLAGS="$cf_save_CFLAGS"
10258 fi
10259 rm -rf conftest*
10260
10261 fi
10262
10263 if test "$GCC" = yes
10264 then
10265 cat > conftest.i <<EOF
10266 #ifndef GCC_PRINTF
10267 #define GCC_PRINTF 0
10268 #endif
10269 #ifndef GCC_SCANF
10270 #define GCC_SCANF 0
10271 #endif
10272 #ifndef GCC_NORETURN
10273 #define GCC_NORETURN /* nothing */
10274 #endif
10275 #ifndef GCC_UNUSED
10276 #define GCC_UNUSED /* nothing */
10277 #endif
10278 EOF
10279 if test "$GCC" = yes
10280 then
10281         { echo "$as_me:10281: checking for $CC __attribute__ directives..." >&5
10282 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
10283 cat > conftest.$ac_ext <<EOF
10284 #line 10284 "${as_me:-configure}"
10285 #include "confdefs.h"
10286 #include "conftest.h"
10287 #include "conftest.i"
10288 #if     GCC_PRINTF
10289 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
10290 #else
10291 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
10292 #endif
10293 #if     GCC_SCANF
10294 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
10295 #else
10296 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
10297 #endif
10298 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
10299 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
10300 extern void foo(void) GCC_NORETURN;
10301 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
10302 EOF
10303         cf_printf_attribute=no
10304         cf_scanf_attribute=no
10305         for cf_attribute in scanf printf unused noreturn
10306         do
10307
10308 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
10309
10310                 cf_directive="__attribute__(($cf_attribute))"
10311                 echo "checking for $CC $cf_directive" 1>&5
10312
10313                 case $cf_attribute in #(vi
10314                 printf) #(vi
10315                         cf_printf_attribute=yes
10316                         cat >conftest.h <<EOF
10317 #define GCC_$cf_ATTRIBUTE 1
10318 EOF
10319                         ;;
10320                 scanf) #(vi
10321                         cf_scanf_attribute=yes
10322                         cat >conftest.h <<EOF
10323 #define GCC_$cf_ATTRIBUTE 1
10324 EOF
10325                         ;;
10326                 *) #(vi
10327                         cat >conftest.h <<EOF
10328 #define GCC_$cf_ATTRIBUTE $cf_directive
10329 EOF
10330                         ;;
10331                 esac
10332
10333                 if { (eval echo "$as_me:10333: \"$ac_compile\"") >&5
10334   (eval $ac_compile) 2>&5
10335   ac_status=$?
10336   echo "$as_me:10336: \$? = $ac_status" >&5
10337   (exit $ac_status); }; then
10338                         test -n "$verbose" && echo "$as_me:10338: result: ... $cf_attribute" >&5
10339 echo "${ECHO_T}... $cf_attribute" >&6
10340                         cat conftest.h >>confdefs.h
10341                         case $cf_attribute in #(vi
10342                         printf) #(vi
10343                                 if test "$cf_printf_attribute" = no ; then
10344                                         cat >>confdefs.h <<EOF
10345 #define GCC_PRINTFLIKE(fmt,var) /* nothing */
10346 EOF
10347                                 else
10348                                         cat >>confdefs.h <<EOF
10349 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
10350 EOF
10351                                 fi
10352                                 ;;
10353                         scanf) #(vi
10354                                 if test "$cf_scanf_attribute" = no ; then
10355                                         cat >>confdefs.h <<EOF
10356 #define GCC_SCANFLIKE(fmt,var) /* nothing */
10357 EOF
10358                                 else
10359                                         cat >>confdefs.h <<EOF
10360 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
10361 EOF
10362                                 fi
10363                                 ;;
10364                         esac
10365                 fi
10366         done
10367 else
10368         fgrep define conftest.i >>confdefs.h
10369 fi
10370 rm -rf conftest*
10371 fi
10372
10373 ###     use option --enable-assertions to turn on generation of assertion code
10374 echo "$as_me:10374: checking if you want to enable runtime assertions" >&5
10375 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
10376
10377 # Check whether --enable-assertions or --disable-assertions was given.
10378 if test "${enable_assertions+set}" = set; then
10379   enableval="$enable_assertions"
10380   with_assertions=$enableval
10381 else
10382   with_assertions=no
10383 fi;
10384 echo "$as_me:10384: result: $with_assertions" >&5
10385 echo "${ECHO_T}$with_assertions" >&6
10386 if test -n "$GCC"
10387 then
10388         if test "$with_assertions" = no
10389         then
10390                 CPPFLAGS="$CPPFLAGS -DNDEBUG"
10391         else
10392
10393         ADAFLAGS="$ADAFLAGS -gnata"
10394
10395         fi
10396 fi
10397
10398 ###     use option --disable-leaks to suppress "permanent" leaks, for testing
10399 cat >>confdefs.h <<\EOF
10400 #define HAVE_NC_ALLOC_H 1
10401 EOF
10402
10403 ###     use option --enable-expanded to generate certain macros as functions
10404
10405 # Check whether --enable-expanded or --disable-expanded was given.
10406 if test "${enable_expanded+set}" = set; then
10407   enableval="$enable_expanded"
10408   test "$enableval" = yes && cat >>confdefs.h <<\EOF
10409 #define NCURSES_EXPANDED 1
10410 EOF
10411
10412 fi;
10413
10414 ###     use option --disable-macros to suppress macros in favor of functions
10415
10416 # Check whether --enable-macros or --disable-macros was given.
10417 if test "${enable_macros+set}" = set; then
10418   enableval="$enable_macros"
10419   test "$enableval" = no && cat >>confdefs.h <<\EOF
10420 #define NCURSES_NOMACROS 1
10421 EOF
10422
10423 fi;
10424
10425 # Normally we only add trace() to the debug-library.  Allow this to be
10426 # extended to all models of the ncurses library:
10427 cf_all_traces=no
10428 case "$CFLAGS $CPPFLAGS" in
10429 *-DTRACE*)
10430         cf_all_traces=yes
10431         ;;
10432 esac
10433
10434 echo "$as_me:10434: checking whether to add trace feature to all models" >&5
10435 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
10436
10437 # Check whether --with-trace or --without-trace was given.
10438 if test "${with_trace+set}" = set; then
10439   withval="$with_trace"
10440   cf_with_trace=$withval
10441 else
10442   cf_with_trace=$cf_all_traces
10443 fi;
10444 echo "$as_me:10444: result: $cf_with_trace" >&5
10445 echo "${ECHO_T}$cf_with_trace" >&6
10446
10447 if test "$cf_with_trace" = yes ; then
10448         ADA_TRACE=TRUE
10449
10450 cf_fix_cppflags=no
10451 cf_new_cflags=
10452 cf_new_cppflags=
10453 cf_new_extra_cppflags=
10454
10455 for cf_add_cflags in -DTRACE
10456 do
10457 case $cf_fix_cppflags in
10458 no)
10459         case $cf_add_cflags in #(vi
10460         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
10461                 case $cf_add_cflags in
10462                 -D*)
10463                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10464
10465                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10466                                 && test -z "${cf_tst_cflags}" \
10467                                 && cf_fix_cppflags=yes
10468
10469                         if test $cf_fix_cppflags = yes ; then
10470                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10471                                 continue
10472                         elif test "${cf_tst_cflags}" = "\"'" ; then
10473                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10474                                 continue
10475                         fi
10476                         ;;
10477                 esac
10478                 case "$CPPFLAGS" in
10479                 *$cf_add_cflags) #(vi
10480                         ;;
10481                 *) #(vi
10482                         case $cf_add_cflags in #(vi
10483                         -D*)
10484                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10485
10486 CPPFLAGS=`echo "$CPPFLAGS" | \
10487         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10488                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10489
10490                                 ;;
10491                         esac
10492                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
10493                         ;;
10494                 esac
10495                 ;;
10496         *)
10497                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
10498                 ;;
10499         esac
10500         ;;
10501 yes)
10502         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10503
10504         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10505
10506         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10507                 && test -z "${cf_tst_cflags}" \
10508                 && cf_fix_cppflags=no
10509         ;;
10510 esac
10511 done
10512
10513 if test -n "$cf_new_cflags" ; then
10514
10515         CFLAGS="$CFLAGS $cf_new_cflags"
10516 fi
10517
10518 if test -n "$cf_new_cppflags" ; then
10519
10520         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
10521 fi
10522
10523 if test -n "$cf_new_extra_cppflags" ; then
10524
10525         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
10526 fi
10527
10528 else
10529         ADA_TRACE=FALSE
10530 fi
10531
10532 ###     Checks for libraries.
10533 case $cf_cv_system_name in #(vi
10534 *mingw32*) #(vi
10535         ;;
10536 *)
10537 echo "$as_me:10537: checking for gettimeofday" >&5
10538 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
10539 if test "${ac_cv_func_gettimeofday+set}" = set; then
10540   echo $ECHO_N "(cached) $ECHO_C" >&6
10541 else
10542   cat >conftest.$ac_ext <<_ACEOF
10543 #line 10543 "configure"
10544 #include "confdefs.h"
10545 /* System header to define __stub macros and hopefully few prototypes,
10546     which can conflict with char gettimeofday (); below.  */
10547 #include <assert.h>
10548 /* Override any gcc2 internal prototype to avoid an error.  */
10549 #ifdef __cplusplus
10550 extern "C"
10551 #endif
10552 /* We use char because int might match the return type of a gcc2
10553    builtin and then its argument prototype would still apply.  */
10554 char gettimeofday ();
10555 char (*f) ();
10556
10557 int
10558 main ()
10559 {
10560 /* The GNU C library defines this for functions which it implements
10561     to always fail with ENOSYS.  Some functions are actually named
10562     something starting with __ and the normal name is an alias.  */
10563 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
10564 choke me
10565 #else
10566 f = gettimeofday; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
10567 #endif
10568
10569   ;
10570   return 0;
10571 }
10572 _ACEOF
10573 rm -f conftest.$ac_objext conftest$ac_exeext
10574 if { (eval echo "$as_me:10574: \"$ac_link\"") >&5
10575   (eval $ac_link) 2>&5
10576   ac_status=$?
10577   echo "$as_me:10577: \$? = $ac_status" >&5
10578   (exit $ac_status); } &&
10579          { ac_try='test -s conftest$ac_exeext'
10580   { (eval echo "$as_me:10580: \"$ac_try\"") >&5
10581   (eval $ac_try) 2>&5
10582   ac_status=$?
10583   echo "$as_me:10583: \$? = $ac_status" >&5
10584   (exit $ac_status); }; }; then
10585   ac_cv_func_gettimeofday=yes
10586 else
10587   echo "$as_me: failed program was:" >&5
10588 cat conftest.$ac_ext >&5
10589 ac_cv_func_gettimeofday=no
10590 fi
10591 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10592 fi
10593 echo "$as_me:10593: result: $ac_cv_func_gettimeofday" >&5
10594 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
10595 if test $ac_cv_func_gettimeofday = yes; then
10596   cat >>confdefs.h <<\EOF
10597 #define HAVE_GETTIMEOFDAY 1
10598 EOF
10599
10600 else
10601
10602 echo "$as_me:10602: checking for gettimeofday in -lbsd" >&5
10603 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
10604 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
10605   echo $ECHO_N "(cached) $ECHO_C" >&6
10606 else
10607   ac_check_lib_save_LIBS=$LIBS
10608 LIBS="-lbsd  $LIBS"
10609 cat >conftest.$ac_ext <<_ACEOF
10610 #line 10610 "configure"
10611 #include "confdefs.h"
10612
10613 /* Override any gcc2 internal prototype to avoid an error.  */
10614 #ifdef __cplusplus
10615 extern "C"
10616 #endif
10617 /* We use char because int might match the return type of a gcc2
10618    builtin and then its argument prototype would still apply.  */
10619 char gettimeofday ();
10620 int
10621 main ()
10622 {
10623 gettimeofday ();
10624   ;
10625   return 0;
10626 }
10627 _ACEOF
10628 rm -f conftest.$ac_objext conftest$ac_exeext
10629 if { (eval echo "$as_me:10629: \"$ac_link\"") >&5
10630   (eval $ac_link) 2>&5
10631   ac_status=$?
10632   echo "$as_me:10632: \$? = $ac_status" >&5
10633   (exit $ac_status); } &&
10634          { ac_try='test -s conftest$ac_exeext'
10635   { (eval echo "$as_me:10635: \"$ac_try\"") >&5
10636   (eval $ac_try) 2>&5
10637   ac_status=$?
10638   echo "$as_me:10638: \$? = $ac_status" >&5
10639   (exit $ac_status); }; }; then
10640   ac_cv_lib_bsd_gettimeofday=yes
10641 else
10642   echo "$as_me: failed program was:" >&5
10643 cat conftest.$ac_ext >&5
10644 ac_cv_lib_bsd_gettimeofday=no
10645 fi
10646 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10647 LIBS=$ac_check_lib_save_LIBS
10648 fi
10649 echo "$as_me:10649: result: $ac_cv_lib_bsd_gettimeofday" >&5
10650 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
10651 if test $ac_cv_lib_bsd_gettimeofday = yes; then
10652   cat >>confdefs.h <<\EOF
10653 #define HAVE_GETTIMEOFDAY 1
10654 EOF
10655
10656         LIBS="$LIBS -lbsd"
10657 fi
10658
10659 fi
10660         ;;
10661 esac
10662
10663 ###     Checks for header files.
10664 echo "$as_me:10664: checking for ANSI C header files" >&5
10665 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
10666 if test "${ac_cv_header_stdc+set}" = set; then
10667   echo $ECHO_N "(cached) $ECHO_C" >&6
10668 else
10669   cat >conftest.$ac_ext <<_ACEOF
10670 #line 10670 "configure"
10671 #include "confdefs.h"
10672 #include <stdlib.h>
10673 #include <stdarg.h>
10674 #include <string.h>
10675 #include <float.h>
10676
10677 _ACEOF
10678 if { (eval echo "$as_me:10678: \"$ac_cpp conftest.$ac_ext\"") >&5
10679   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10680   ac_status=$?
10681   egrep -v '^ *\+' conftest.er1 >conftest.err
10682   rm -f conftest.er1
10683   cat conftest.err >&5
10684   echo "$as_me:10684: \$? = $ac_status" >&5
10685   (exit $ac_status); } >/dev/null; then
10686   if test -s conftest.err; then
10687     ac_cpp_err=$ac_c_preproc_warn_flag
10688   else
10689     ac_cpp_err=
10690   fi
10691 else
10692   ac_cpp_err=yes
10693 fi
10694 if test -z "$ac_cpp_err"; then
10695   ac_cv_header_stdc=yes
10696 else
10697   echo "$as_me: failed program was:" >&5
10698   cat conftest.$ac_ext >&5
10699   ac_cv_header_stdc=no
10700 fi
10701 rm -f conftest.err conftest.$ac_ext
10702
10703 if test $ac_cv_header_stdc = yes; then
10704   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
10705   cat >conftest.$ac_ext <<_ACEOF
10706 #line 10706 "configure"
10707 #include "confdefs.h"
10708 #include <string.h>
10709
10710 _ACEOF
10711 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10712   egrep "memchr" >/dev/null 2>&1; then
10713   :
10714 else
10715   ac_cv_header_stdc=no
10716 fi
10717 rm -rf conftest*
10718
10719 fi
10720
10721 if test $ac_cv_header_stdc = yes; then
10722   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
10723   cat >conftest.$ac_ext <<_ACEOF
10724 #line 10724 "configure"
10725 #include "confdefs.h"
10726 #include <stdlib.h>
10727
10728 _ACEOF
10729 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10730   egrep "free" >/dev/null 2>&1; then
10731   :
10732 else
10733   ac_cv_header_stdc=no
10734 fi
10735 rm -rf conftest*
10736
10737 fi
10738
10739 if test $ac_cv_header_stdc = yes; then
10740   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
10741   if test "$cross_compiling" = yes; then
10742   :
10743 else
10744   cat >conftest.$ac_ext <<_ACEOF
10745 #line 10745 "configure"
10746 #include "confdefs.h"
10747 #include <ctype.h>
10748 #if ((' ' & 0x0FF) == 0x020)
10749 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
10750 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
10751 #else
10752 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
10753                      || ('j' <= (c) && (c) <= 'r') \
10754                      || ('s' <= (c) && (c) <= 'z'))
10755 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
10756 #endif
10757
10758 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
10759 int
10760 main ()
10761 {
10762   int i;
10763   for (i = 0; i < 256; i++)
10764     if (XOR (islower (i), ISLOWER (i))
10765         || toupper (i) != TOUPPER (i))
10766       $ac_main_return(2);
10767   $ac_main_return (0);
10768 }
10769 _ACEOF
10770 rm -f conftest$ac_exeext
10771 if { (eval echo "$as_me:10771: \"$ac_link\"") >&5
10772   (eval $ac_link) 2>&5
10773   ac_status=$?
10774   echo "$as_me:10774: \$? = $ac_status" >&5
10775   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10776   { (eval echo "$as_me:10776: \"$ac_try\"") >&5
10777   (eval $ac_try) 2>&5
10778   ac_status=$?
10779   echo "$as_me:10779: \$? = $ac_status" >&5
10780   (exit $ac_status); }; }; then
10781   :
10782 else
10783   echo "$as_me: program exited with status $ac_status" >&5
10784 echo "$as_me: failed program was:" >&5
10785 cat conftest.$ac_ext >&5
10786 ac_cv_header_stdc=no
10787 fi
10788 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
10789 fi
10790 fi
10791 fi
10792 echo "$as_me:10792: result: $ac_cv_header_stdc" >&5
10793 echo "${ECHO_T}$ac_cv_header_stdc" >&6
10794 if test $ac_cv_header_stdc = yes; then
10795
10796 cat >>confdefs.h <<\EOF
10797 #define STDC_HEADERS 1
10798 EOF
10799
10800 fi
10801
10802 ac_header_dirent=no
10803 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
10804   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
10805 echo "$as_me:10805: checking for $ac_hdr that defines DIR" >&5
10806 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
10807 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10808   echo $ECHO_N "(cached) $ECHO_C" >&6
10809 else
10810   cat >conftest.$ac_ext <<_ACEOF
10811 #line 10811 "configure"
10812 #include "confdefs.h"
10813 #include <sys/types.h>
10814 #include <$ac_hdr>
10815
10816 int
10817 main ()
10818 {
10819 if ((DIR *) 0)
10820 return 0;
10821   ;
10822   return 0;
10823 }
10824 _ACEOF
10825 rm -f conftest.$ac_objext
10826 if { (eval echo "$as_me:10826: \"$ac_compile\"") >&5
10827   (eval $ac_compile) 2>&5
10828   ac_status=$?
10829   echo "$as_me:10829: \$? = $ac_status" >&5
10830   (exit $ac_status); } &&
10831          { ac_try='test -s conftest.$ac_objext'
10832   { (eval echo "$as_me:10832: \"$ac_try\"") >&5
10833   (eval $ac_try) 2>&5
10834   ac_status=$?
10835   echo "$as_me:10835: \$? = $ac_status" >&5
10836   (exit $ac_status); }; }; then
10837   eval "$as_ac_Header=yes"
10838 else
10839   echo "$as_me: failed program was:" >&5
10840 cat conftest.$ac_ext >&5
10841 eval "$as_ac_Header=no"
10842 fi
10843 rm -f conftest.$ac_objext conftest.$ac_ext
10844 fi
10845 echo "$as_me:10845: result: `eval echo '${'$as_ac_Header'}'`" >&5
10846 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10847 if test `eval echo '${'$as_ac_Header'}'` = yes; then
10848   cat >>confdefs.h <<EOF
10849 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
10850 EOF
10851
10852 ac_header_dirent=$ac_hdr; break
10853 fi
10854
10855 done
10856 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
10857 if test $ac_header_dirent = dirent.h; then
10858   echo "$as_me:10858: checking for opendir in -ldir" >&5
10859 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
10860 if test "${ac_cv_lib_dir_opendir+set}" = set; then
10861   echo $ECHO_N "(cached) $ECHO_C" >&6
10862 else
10863   ac_check_lib_save_LIBS=$LIBS
10864 LIBS="-ldir  $LIBS"
10865 cat >conftest.$ac_ext <<_ACEOF
10866 #line 10866 "configure"
10867 #include "confdefs.h"
10868
10869 /* Override any gcc2 internal prototype to avoid an error.  */
10870 #ifdef __cplusplus
10871 extern "C"
10872 #endif
10873 /* We use char because int might match the return type of a gcc2
10874    builtin and then its argument prototype would still apply.  */
10875 char opendir ();
10876 int
10877 main ()
10878 {
10879 opendir ();
10880   ;
10881   return 0;
10882 }
10883 _ACEOF
10884 rm -f conftest.$ac_objext conftest$ac_exeext
10885 if { (eval echo "$as_me:10885: \"$ac_link\"") >&5
10886   (eval $ac_link) 2>&5
10887   ac_status=$?
10888   echo "$as_me:10888: \$? = $ac_status" >&5
10889   (exit $ac_status); } &&
10890          { ac_try='test -s conftest$ac_exeext'
10891   { (eval echo "$as_me:10891: \"$ac_try\"") >&5
10892   (eval $ac_try) 2>&5
10893   ac_status=$?
10894   echo "$as_me:10894: \$? = $ac_status" >&5
10895   (exit $ac_status); }; }; then
10896   ac_cv_lib_dir_opendir=yes
10897 else
10898   echo "$as_me: failed program was:" >&5
10899 cat conftest.$ac_ext >&5
10900 ac_cv_lib_dir_opendir=no
10901 fi
10902 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10903 LIBS=$ac_check_lib_save_LIBS
10904 fi
10905 echo "$as_me:10905: result: $ac_cv_lib_dir_opendir" >&5
10906 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
10907 if test $ac_cv_lib_dir_opendir = yes; then
10908   LIBS="$LIBS -ldir"
10909 fi
10910
10911 else
10912   echo "$as_me:10912: checking for opendir in -lx" >&5
10913 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
10914 if test "${ac_cv_lib_x_opendir+set}" = set; then
10915   echo $ECHO_N "(cached) $ECHO_C" >&6
10916 else
10917   ac_check_lib_save_LIBS=$LIBS
10918 LIBS="-lx  $LIBS"
10919 cat >conftest.$ac_ext <<_ACEOF
10920 #line 10920 "configure"
10921 #include "confdefs.h"
10922
10923 /* Override any gcc2 internal prototype to avoid an error.  */
10924 #ifdef __cplusplus
10925 extern "C"
10926 #endif
10927 /* We use char because int might match the return type of a gcc2
10928    builtin and then its argument prototype would still apply.  */
10929 char opendir ();
10930 int
10931 main ()
10932 {
10933 opendir ();
10934   ;
10935   return 0;
10936 }
10937 _ACEOF
10938 rm -f conftest.$ac_objext conftest$ac_exeext
10939 if { (eval echo "$as_me:10939: \"$ac_link\"") >&5
10940   (eval $ac_link) 2>&5
10941   ac_status=$?
10942   echo "$as_me:10942: \$? = $ac_status" >&5
10943   (exit $ac_status); } &&
10944          { ac_try='test -s conftest$ac_exeext'
10945   { (eval echo "$as_me:10945: \"$ac_try\"") >&5
10946   (eval $ac_try) 2>&5
10947   ac_status=$?
10948   echo "$as_me:10948: \$? = $ac_status" >&5
10949   (exit $ac_status); }; }; then
10950   ac_cv_lib_x_opendir=yes
10951 else
10952   echo "$as_me: failed program was:" >&5
10953 cat conftest.$ac_ext >&5
10954 ac_cv_lib_x_opendir=no
10955 fi
10956 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10957 LIBS=$ac_check_lib_save_LIBS
10958 fi
10959 echo "$as_me:10959: result: $ac_cv_lib_x_opendir" >&5
10960 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
10961 if test $ac_cv_lib_x_opendir = yes; then
10962   LIBS="$LIBS -lx"
10963 fi
10964
10965 fi
10966
10967 echo "$as_me:10967: checking whether time.h and sys/time.h may both be included" >&5
10968 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
10969 if test "${ac_cv_header_time+set}" = set; then
10970   echo $ECHO_N "(cached) $ECHO_C" >&6
10971 else
10972   cat >conftest.$ac_ext <<_ACEOF
10973 #line 10973 "configure"
10974 #include "confdefs.h"
10975 #include <sys/types.h>
10976 #include <sys/time.h>
10977 #include <time.h>
10978
10979 int
10980 main ()
10981 {
10982 if ((struct tm *) 0)
10983 return 0;
10984   ;
10985   return 0;
10986 }
10987 _ACEOF
10988 rm -f conftest.$ac_objext
10989 if { (eval echo "$as_me:10989: \"$ac_compile\"") >&5
10990   (eval $ac_compile) 2>&5
10991   ac_status=$?
10992   echo "$as_me:10992: \$? = $ac_status" >&5
10993   (exit $ac_status); } &&
10994          { ac_try='test -s conftest.$ac_objext'
10995   { (eval echo "$as_me:10995: \"$ac_try\"") >&5
10996   (eval $ac_try) 2>&5
10997   ac_status=$?
10998   echo "$as_me:10998: \$? = $ac_status" >&5
10999   (exit $ac_status); }; }; then
11000   ac_cv_header_time=yes
11001 else
11002   echo "$as_me: failed program was:" >&5
11003 cat conftest.$ac_ext >&5
11004 ac_cv_header_time=no
11005 fi
11006 rm -f conftest.$ac_objext conftest.$ac_ext
11007 fi
11008 echo "$as_me:11008: result: $ac_cv_header_time" >&5
11009 echo "${ECHO_T}$ac_cv_header_time" >&6
11010 if test $ac_cv_header_time = yes; then
11011
11012 cat >>confdefs.h <<\EOF
11013 #define TIME_WITH_SYS_TIME 1
11014 EOF
11015
11016 fi
11017
11018 ###     checks for compiler characteristics
11019 ac_ext=c
11020 ac_cpp='$CPP $CPPFLAGS'
11021 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
11022 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
11023 ac_compiler_gnu=$ac_cv_c_compiler_gnu
11024 ac_main_return=return
11025
11026 echo "$as_me:11026: checking for $CC option to accept ANSI C" >&5
11027 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
11028 if test "${ac_cv_prog_cc_stdc+set}" = set; then
11029   echo $ECHO_N "(cached) $ECHO_C" >&6
11030 else
11031   ac_cv_prog_cc_stdc=no
11032 ac_save_CC=$CC
11033 cat >conftest.$ac_ext <<_ACEOF
11034 #line 11034 "configure"
11035 #include "confdefs.h"
11036 #include <stdarg.h>
11037 #include <stdio.h>
11038 #include <sys/types.h>
11039 #include <sys/stat.h>
11040 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
11041 struct buf { int x; };
11042 FILE * (*rcsopen) (struct buf *, struct stat *, int);
11043 static char *e (p, i)
11044      char **p;
11045      int i;
11046 {
11047   return p[i];
11048 }
11049 static char *f (char * (*g) (char **, int), char **p, ...)
11050 {
11051   char *s;
11052   va_list v;
11053   va_start (v,p);
11054   s = g (p, va_arg (v,int));
11055   va_end (v);
11056   return s;
11057 }
11058 int test (int i, double x);
11059 struct s1 {int (*f) (int a);};
11060 struct s2 {int (*f) (double a);};
11061 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
11062 int argc;
11063 char **argv;
11064 int
11065 main ()
11066 {
11067 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
11068   ;
11069   return 0;
11070 }
11071 _ACEOF
11072 # Don't try gcc -ansi; that turns off useful extensions and
11073 # breaks some systems' header files.
11074 # AIX                   -qlanglvl=ansi
11075 # Ultrix and OSF/1      -std1
11076 # HP-UX 10.20 and later -Ae
11077 # HP-UX older versions  -Aa -D_HPUX_SOURCE
11078 # SVR4                  -Xc -D__EXTENSIONS__
11079 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
11080 do
11081   CC="$ac_save_CC $ac_arg"
11082   rm -f conftest.$ac_objext
11083 if { (eval echo "$as_me:11083: \"$ac_compile\"") >&5
11084   (eval $ac_compile) 2>&5
11085   ac_status=$?
11086   echo "$as_me:11086: \$? = $ac_status" >&5
11087   (exit $ac_status); } &&
11088          { ac_try='test -s conftest.$ac_objext'
11089   { (eval echo "$as_me:11089: \"$ac_try\"") >&5
11090   (eval $ac_try) 2>&5
11091   ac_status=$?
11092   echo "$as_me:11092: \$? = $ac_status" >&5
11093   (exit $ac_status); }; }; then
11094   ac_cv_prog_cc_stdc=$ac_arg
11095 break
11096 else
11097   echo "$as_me: failed program was:" >&5
11098 cat conftest.$ac_ext >&5
11099 fi
11100 rm -f conftest.$ac_objext
11101 done
11102 rm -f conftest.$ac_ext conftest.$ac_objext
11103 CC=$ac_save_CC
11104
11105 fi
11106
11107 case "x$ac_cv_prog_cc_stdc" in
11108   x|xno)
11109     echo "$as_me:11109: result: none needed" >&5
11110 echo "${ECHO_T}none needed" >&6 ;;
11111   *)
11112     echo "$as_me:11112: result: $ac_cv_prog_cc_stdc" >&5
11113 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
11114     CC="$CC $ac_cv_prog_cc_stdc" ;;
11115 esac
11116
11117 echo "$as_me:11117: checking for an ANSI C-conforming const" >&5
11118 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
11119 if test "${ac_cv_c_const+set}" = set; then
11120   echo $ECHO_N "(cached) $ECHO_C" >&6
11121 else
11122   cat >conftest.$ac_ext <<_ACEOF
11123 #line 11123 "configure"
11124 #include "confdefs.h"
11125
11126 int
11127 main ()
11128 {
11129 /* FIXME: Include the comments suggested by Paul. */
11130 #ifndef __cplusplus
11131   /* Ultrix mips cc rejects this.  */
11132   typedef int charset[2];
11133   const charset x;
11134   /* SunOS 4.1.1 cc rejects this.  */
11135   char const *const *ccp;
11136   char **p;
11137   /* NEC SVR4.0.2 mips cc rejects this.  */
11138   struct point {int x, y;};
11139   static struct point const zero = {0,0};
11140   /* AIX XL C 1.02.0.0 rejects this.
11141      It does not let you subtract one const X* pointer from another in
11142      an arm of an if-expression whose if-part is not a constant
11143      expression */
11144   const char *g = "string";
11145   ccp = &g + (g ? g-g : 0);
11146   /* HPUX 7.0 cc rejects these. */
11147   ++ccp;
11148   p = (char**) ccp;
11149   ccp = (char const *const *) p;
11150   { /* SCO 3.2v4 cc rejects this.  */
11151     char *t;
11152     char const *s = 0 ? (char *) 0 : (char const *) 0;
11153
11154     *t++ = 0;
11155   }
11156   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
11157     int x[] = {25, 17};
11158     const int *foo = &x[0];
11159     ++foo;
11160   }
11161   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
11162     typedef const int *iptr;
11163     iptr p = 0;
11164     ++p;
11165   }
11166   { /* AIX XL C 1.02.0.0 rejects this saying
11167        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
11168     struct s { int j; const int *ap[3]; };
11169     struct s *b; b->j = 5;
11170   }
11171   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
11172     const int foo = 10;
11173   }
11174 #endif
11175
11176   ;
11177   return 0;
11178 }
11179 _ACEOF
11180 rm -f conftest.$ac_objext
11181 if { (eval echo "$as_me:11181: \"$ac_compile\"") >&5
11182   (eval $ac_compile) 2>&5
11183   ac_status=$?
11184   echo "$as_me:11184: \$? = $ac_status" >&5
11185   (exit $ac_status); } &&
11186          { ac_try='test -s conftest.$ac_objext'
11187   { (eval echo "$as_me:11187: \"$ac_try\"") >&5
11188   (eval $ac_try) 2>&5
11189   ac_status=$?
11190   echo "$as_me:11190: \$? = $ac_status" >&5
11191   (exit $ac_status); }; }; then
11192   ac_cv_c_const=yes
11193 else
11194   echo "$as_me: failed program was:" >&5
11195 cat conftest.$ac_ext >&5
11196 ac_cv_c_const=no
11197 fi
11198 rm -f conftest.$ac_objext conftest.$ac_ext
11199 fi
11200 echo "$as_me:11200: result: $ac_cv_c_const" >&5
11201 echo "${ECHO_T}$ac_cv_c_const" >&6
11202 if test $ac_cv_c_const = no; then
11203
11204 cat >>confdefs.h <<\EOF
11205 #define const
11206 EOF
11207
11208 fi
11209
11210 ###     Checks for external-data
11211
11212 echo "$as_me:11212: checking if data-only library module links" >&5
11213 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
11214 if test "${cf_cv_link_dataonly+set}" = set; then
11215   echo $ECHO_N "(cached) $ECHO_C" >&6
11216 else
11217
11218         rm -f conftest.a
11219         cat >conftest.$ac_ext <<EOF
11220 #line 11220 "configure"
11221 int     testdata[3] = { 123, 456, 789 };
11222 EOF
11223         if { (eval echo "$as_me:11223: \"$ac_compile\"") >&5
11224   (eval $ac_compile) 2>&5
11225   ac_status=$?
11226   echo "$as_me:11226: \$? = $ac_status" >&5
11227   (exit $ac_status); } ; then
11228                 mv conftest.o data.o && \
11229                 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
11230         fi
11231         rm -f conftest.$ac_ext data.o
11232         cat >conftest.$ac_ext <<EOF
11233 #line 11233 "configure"
11234 int     testfunc()
11235 {
11236 #if defined(NeXT)
11237         ${cf_cv_main_return:-return}(1);        /* I'm told this linker is broken */
11238 #else
11239         extern int testdata[3];
11240         return testdata[0] == 123
11241            &&  testdata[1] == 456
11242            &&  testdata[2] == 789;
11243 #endif
11244 }
11245 EOF
11246         if { (eval echo "$as_me:11246: \"$ac_compile\"") >&5
11247   (eval $ac_compile) 2>&5
11248   ac_status=$?
11249   echo "$as_me:11249: \$? = $ac_status" >&5
11250   (exit $ac_status); }; then
11251                 mv conftest.o func.o && \
11252                 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
11253         fi
11254         rm -f conftest.$ac_ext func.o
11255         ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
11256         cf_saveLIBS="$LIBS"
11257         LIBS="conftest.a $LIBS"
11258         if test "$cross_compiling" = yes; then
11259   cf_cv_link_dataonly=unknown
11260 else
11261   cat >conftest.$ac_ext <<_ACEOF
11262 #line 11262 "configure"
11263 #include "confdefs.h"
11264
11265         int main()
11266         {
11267                 extern int testfunc();
11268                 ${cf_cv_main_return:-return} (!testfunc());
11269         }
11270
11271 _ACEOF
11272 rm -f conftest$ac_exeext
11273 if { (eval echo "$as_me:11273: \"$ac_link\"") >&5
11274   (eval $ac_link) 2>&5
11275   ac_status=$?
11276   echo "$as_me:11276: \$? = $ac_status" >&5
11277   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11278   { (eval echo "$as_me:11278: \"$ac_try\"") >&5
11279   (eval $ac_try) 2>&5
11280   ac_status=$?
11281   echo "$as_me:11281: \$? = $ac_status" >&5
11282   (exit $ac_status); }; }; then
11283   cf_cv_link_dataonly=yes
11284 else
11285   echo "$as_me: program exited with status $ac_status" >&5
11286 echo "$as_me: failed program was:" >&5
11287 cat conftest.$ac_ext >&5
11288 cf_cv_link_dataonly=no
11289 fi
11290 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11291 fi
11292         LIBS="$cf_saveLIBS"
11293
11294 fi
11295
11296 echo "$as_me:11296: result: $cf_cv_link_dataonly" >&5
11297 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
11298
11299 if test "$cf_cv_link_dataonly" = no ; then
11300         cat >>confdefs.h <<\EOF
11301 #define BROKEN_LINKER 1
11302 EOF
11303
11304         BROKEN_LINKER=1
11305 fi
11306
11307 ###     Checks for library functions.
11308
11309 echo "$as_me:11309: checking for working mkstemp" >&5
11310 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
11311 if test "${cf_cv_func_mkstemp+set}" = set; then
11312   echo $ECHO_N "(cached) $ECHO_C" >&6
11313 else
11314
11315 rm -rf conftest*
11316 if test "$cross_compiling" = yes; then
11317   cf_cv_func_mkstemp=maybe
11318 else
11319   cat >conftest.$ac_ext <<_ACEOF
11320 #line 11320 "configure"
11321 #include "confdefs.h"
11322
11323 #include <sys/types.h>
11324 #include <stdlib.h>
11325 #include <stdio.h>
11326 #include <string.h>
11327 #include <sys/stat.h>
11328 int main()
11329 {
11330         char *tmpl = "conftestXXXXXX";
11331         char name[2][80];
11332         int n;
11333         int result = 0;
11334         int fd;
11335         struct stat sb;
11336
11337         umask(077);
11338         for (n = 0; n < 2; ++n) {
11339                 strcpy(name[n], tmpl);
11340                 if ((fd = mkstemp(name[n])) >= 0) {
11341                         if (!strcmp(name[n], tmpl)
11342                          || stat(name[n], &sb) != 0
11343                          || (sb.st_mode & S_IFMT) != S_IFREG
11344                          || (sb.st_mode & 077) != 0) {
11345                                 result = 1;
11346                         }
11347                         close(fd);
11348                 }
11349         }
11350         if (result == 0
11351          && !strcmp(name[0], name[1]))
11352                 result = 1;
11353         ${cf_cv_main_return:-return}(result);
11354 }
11355
11356 _ACEOF
11357 rm -f conftest$ac_exeext
11358 if { (eval echo "$as_me:11358: \"$ac_link\"") >&5
11359   (eval $ac_link) 2>&5
11360   ac_status=$?
11361   echo "$as_me:11361: \$? = $ac_status" >&5
11362   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11363   { (eval echo "$as_me:11363: \"$ac_try\"") >&5
11364   (eval $ac_try) 2>&5
11365   ac_status=$?
11366   echo "$as_me:11366: \$? = $ac_status" >&5
11367   (exit $ac_status); }; }; then
11368   cf_cv_func_mkstemp=yes
11369
11370 else
11371   echo "$as_me: program exited with status $ac_status" >&5
11372 echo "$as_me: failed program was:" >&5
11373 cat conftest.$ac_ext >&5
11374 cf_cv_func_mkstemp=no
11375
11376 fi
11377 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11378 fi
11379
11380 fi
11381 echo "$as_me:11381: result: $cf_cv_func_mkstemp" >&5
11382 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
11383 if test "x$cf_cv_func_mkstemp" = xmaybe ; then
11384         echo "$as_me:11384: checking for mkstemp" >&5
11385 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
11386 if test "${ac_cv_func_mkstemp+set}" = set; then
11387   echo $ECHO_N "(cached) $ECHO_C" >&6
11388 else
11389   cat >conftest.$ac_ext <<_ACEOF
11390 #line 11390 "configure"
11391 #include "confdefs.h"
11392 /* System header to define __stub macros and hopefully few prototypes,
11393     which can conflict with char mkstemp (); below.  */
11394 #include <assert.h>
11395 /* Override any gcc2 internal prototype to avoid an error.  */
11396 #ifdef __cplusplus
11397 extern "C"
11398 #endif
11399 /* We use char because int might match the return type of a gcc2
11400    builtin and then its argument prototype would still apply.  */
11401 char mkstemp ();
11402 char (*f) ();
11403
11404 int
11405 main ()
11406 {
11407 /* The GNU C library defines this for functions which it implements
11408     to always fail with ENOSYS.  Some functions are actually named
11409     something starting with __ and the normal name is an alias.  */
11410 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
11411 choke me
11412 #else
11413 f = mkstemp; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
11414 #endif
11415
11416   ;
11417   return 0;
11418 }
11419 _ACEOF
11420 rm -f conftest.$ac_objext conftest$ac_exeext
11421 if { (eval echo "$as_me:11421: \"$ac_link\"") >&5
11422   (eval $ac_link) 2>&5
11423   ac_status=$?
11424   echo "$as_me:11424: \$? = $ac_status" >&5
11425   (exit $ac_status); } &&
11426          { ac_try='test -s conftest$ac_exeext'
11427   { (eval echo "$as_me:11427: \"$ac_try\"") >&5
11428   (eval $ac_try) 2>&5
11429   ac_status=$?
11430   echo "$as_me:11430: \$? = $ac_status" >&5
11431   (exit $ac_status); }; }; then
11432   ac_cv_func_mkstemp=yes
11433 else
11434   echo "$as_me: failed program was:" >&5
11435 cat conftest.$ac_ext >&5
11436 ac_cv_func_mkstemp=no
11437 fi
11438 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11439 fi
11440 echo "$as_me:11440: result: $ac_cv_func_mkstemp" >&5
11441 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
11442
11443 fi
11444 if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
11445         cat >>confdefs.h <<\EOF
11446 #define HAVE_MKSTEMP 1
11447 EOF
11448
11449 fi
11450
11451 echo "$as_me:11451: checking return type of signal handlers" >&5
11452 echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
11453 if test "${ac_cv_type_signal+set}" = set; then
11454   echo $ECHO_N "(cached) $ECHO_C" >&6
11455 else
11456   cat >conftest.$ac_ext <<_ACEOF
11457 #line 11457 "configure"
11458 #include "confdefs.h"
11459 #include <sys/types.h>
11460 #include <signal.h>
11461 #ifdef signal
11462 # undef signal
11463 #endif
11464 #ifdef __cplusplus
11465 extern "C" void (*signal (int, void (*)(int)))(int);
11466 #else
11467 void (*signal ()) ();
11468 #endif
11469
11470 int
11471 main ()
11472 {
11473 int i;
11474   ;
11475   return 0;
11476 }
11477 _ACEOF
11478 rm -f conftest.$ac_objext
11479 if { (eval echo "$as_me:11479: \"$ac_compile\"") >&5
11480   (eval $ac_compile) 2>&5
11481   ac_status=$?
11482   echo "$as_me:11482: \$? = $ac_status" >&5
11483   (exit $ac_status); } &&
11484          { ac_try='test -s conftest.$ac_objext'
11485   { (eval echo "$as_me:11485: \"$ac_try\"") >&5
11486   (eval $ac_try) 2>&5
11487   ac_status=$?
11488   echo "$as_me:11488: \$? = $ac_status" >&5
11489   (exit $ac_status); }; }; then
11490   ac_cv_type_signal=void
11491 else
11492   echo "$as_me: failed program was:" >&5
11493 cat conftest.$ac_ext >&5
11494 ac_cv_type_signal=int
11495 fi
11496 rm -f conftest.$ac_objext conftest.$ac_ext
11497 fi
11498 echo "$as_me:11498: result: $ac_cv_type_signal" >&5
11499 echo "${ECHO_T}$ac_cv_type_signal" >&6
11500
11501 cat >>confdefs.h <<EOF
11502 #define RETSIGTYPE $ac_cv_type_signal
11503 EOF
11504
11505 if test -z "$cf_user_CFLAGS" && test "$with_no_leaks" = no ; then
11506         CFLAGS=`echo ${CFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
11507         CXXFLAGS=`echo ${CXXFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
11508 fi
11509
11510 cf_with_ada=yes
11511 if test "$cf_with_ada" != "no" ; then
11512
11513 cf_ada_make=gnatmake
11514 # Extract the first word of "$cf_ada_make", so it can be a program name with args.
11515 set dummy $cf_ada_make; ac_word=$2
11516 echo "$as_me:11516: checking for $ac_word" >&5
11517 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
11518 if test "${ac_cv_prog_gnat_exists+set}" = set; then
11519   echo $ECHO_N "(cached) $ECHO_C" >&6
11520 else
11521   if test -n "$gnat_exists"; then
11522   ac_cv_prog_gnat_exists="$gnat_exists" # Let the user override the test.
11523 else
11524   ac_save_IFS=$IFS; IFS=$ac_path_separator
11525 ac_dummy="$PATH"
11526 for ac_dir in $ac_dummy; do
11527   IFS=$ac_save_IFS
11528   test -z "$ac_dir" && ac_dir=.
11529   $as_executable_p "$ac_dir/$ac_word" || continue
11530 ac_cv_prog_gnat_exists="yes"
11531 echo "$as_me:11531: found $ac_dir/$ac_word" >&5
11532 break
11533 done
11534
11535   test -z "$ac_cv_prog_gnat_exists" && ac_cv_prog_gnat_exists="no"
11536 fi
11537 fi
11538 gnat_exists=$ac_cv_prog_gnat_exists
11539 if test -n "$gnat_exists"; then
11540   echo "$as_me:11540: result: $gnat_exists" >&5
11541 echo "${ECHO_T}$gnat_exists" >&6
11542 else
11543   echo "$as_me:11543: result: no" >&5
11544 echo "${ECHO_T}no" >&6
11545 fi
11546
11547 if test "$ac_cv_prog_gnat_exists" = no; then
11548    cf_ada_make=
11549    cf_cv_prog_gnat_correct=no
11550 else
11551
11552 echo "$as_me:11552: checking for gnat version" >&5
11553 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
11554 cf_gnat_version=`${cf_ada_make:-gnatmake} -v 2>&1 | \
11555         grep '[0-9].[0-9][0-9]*' |\
11556     sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
11557 echo "$as_me:11557: result: $cf_gnat_version" >&5
11558 echo "${ECHO_T}$cf_gnat_version" >&6
11559
11560 case $cf_gnat_version in #(vi
11561 3.1[1-9]*|3.[2-9]*|[4-9].*|20[0-9][0-9]) #(vi
11562         cf_cv_prog_gnat_correct=yes
11563         ;;
11564 *)
11565         { echo "$as_me:11565: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5
11566 echo "$as_me: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&2;}
11567         cf_cv_prog_gnat_correct=no
11568         ;;
11569 esac
11570
11571    # Extract the first word of "m4", so it can be a program name with args.
11572 set dummy m4; ac_word=$2
11573 echo "$as_me:11573: checking for $ac_word" >&5
11574 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
11575 if test "${ac_cv_prog_M4_exists+set}" = set; then
11576   echo $ECHO_N "(cached) $ECHO_C" >&6
11577 else
11578   if test -n "$M4_exists"; then
11579   ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
11580 else
11581   ac_save_IFS=$IFS; IFS=$ac_path_separator
11582 ac_dummy="$PATH"
11583 for ac_dir in $ac_dummy; do
11584   IFS=$ac_save_IFS
11585   test -z "$ac_dir" && ac_dir=.
11586   $as_executable_p "$ac_dir/$ac_word" || continue
11587 ac_cv_prog_M4_exists="yes"
11588 echo "$as_me:11588: found $ac_dir/$ac_word" >&5
11589 break
11590 done
11591
11592   test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
11593 fi
11594 fi
11595 M4_exists=$ac_cv_prog_M4_exists
11596 if test -n "$M4_exists"; then
11597   echo "$as_me:11597: result: $M4_exists" >&5
11598 echo "${ECHO_T}$M4_exists" >&6
11599 else
11600   echo "$as_me:11600: result: no" >&5
11601 echo "${ECHO_T}no" >&6
11602 fi
11603
11604    if test "$ac_cv_prog_M4_exists" = no; then
11605       cf_cv_prog_gnat_correct=no
11606       echo Ada95 binding required program m4 not found. Ada95 binding disabled.
11607    fi
11608    if test "$cf_cv_prog_gnat_correct" = yes; then
11609       echo "$as_me:11609: checking if GNAT works" >&5
11610 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
11611
11612 rm -rf conftest* *~conftest*
11613 cat >>conftest.ads <<CF_EOF
11614 procedure conftest;
11615 CF_EOF
11616 cat >>conftest.adb <<CF_EOF
11617 with Text_IO;
11618 with GNAT.OS_Lib;
11619 procedure conftest is
11620 begin
11621    Text_IO.Put ("Hello World");
11622    Text_IO.New_Line;
11623    GNAT.OS_Lib.OS_Exit (0);
11624 end conftest;
11625 CF_EOF
11626 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
11627    if ( ./conftest 1>&5 2>&1 ) ; then
11628       cf_cv_prog_gnat_correct=yes
11629    else
11630       cf_cv_prog_gnat_correct=no
11631    fi
11632 else
11633    cf_cv_prog_gnat_correct=no
11634 fi
11635 rm -rf conftest* *~conftest*
11636
11637       echo "$as_me:11637: result: $cf_cv_prog_gnat_correct" >&5
11638 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
11639    fi
11640 fi
11641
11642         if test "$cf_cv_prog_gnat_correct" = yes; then
11643
11644         echo "$as_me:11644: checking optimization options for ADAFLAGS" >&5
11645 echo $ECHO_N "checking optimization options for ADAFLAGS... $ECHO_C" >&6
11646         case "$CFLAGS" in
11647         *-g*)
11648
11649         ADAFLAGS="$ADAFLAGS -g"
11650
11651                 ;;
11652         esac
11653         case "$CFLAGS" in
11654         *-O*)
11655                 cf_O_flag=`echo "$CFLAGS" |sed -e 's/^.*-O/-O/' -e 's/[         ].*//'`
11656
11657         ADAFLAGS="$ADAFLAGS $cf_O_flag"
11658
11659                 ;;
11660         esac
11661         echo "$as_me:11661: result: $ADAFLAGS" >&5
11662 echo "${ECHO_T}$ADAFLAGS" >&6
11663
11664 echo "$as_me:11664: checking if GNAT supports generics" >&5
11665 echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6
11666 case $cf_gnat_version in #(vi
11667 3.[1-9]*|[4-9].*) #(vi
11668         cf_gnat_generics=yes
11669         ;;
11670 *)
11671         cf_gnat_generics=no
11672         ;;
11673 esac
11674 echo "$as_me:11674: result: $cf_gnat_generics" >&5
11675 echo "${ECHO_T}$cf_gnat_generics" >&6
11676
11677 if test "$cf_gnat_generics" = yes
11678 then
11679         cf_compile_generics=generics
11680         cf_generic_objects="\${GENOBJS}"
11681 else
11682         cf_compile_generics=
11683         cf_generic_objects=
11684 fi
11685
11686 echo "$as_me:11686: checking if GNAT supports SIGINT" >&5
11687 echo $ECHO_N "checking if GNAT supports SIGINT... $ECHO_C" >&6
11688 if test "${cf_cv_gnat_sigint+set}" = set; then
11689   echo $ECHO_N "(cached) $ECHO_C" >&6
11690 else
11691
11692 rm -rf conftest* *~conftest*
11693 cat >>conftest.ads <<CF_EOF
11694 with Ada.Interrupts.Names;
11695
11696 package ConfTest is
11697
11698    pragma Warnings (Off);  --  the next pragma exists since 3.11p
11699    pragma Unreserve_All_Interrupts;
11700    pragma Warnings (On);
11701
11702    protected Process is
11703       procedure Stop;
11704       function Continue return Boolean;
11705       pragma Attach_Handler (Stop, Ada.Interrupts.Names.SIGINT);
11706    private
11707       Done : Boolean := False;
11708    end Process;
11709
11710 end ConfTest;
11711 CF_EOF
11712 cat >>conftest.adb <<CF_EOF
11713 package body ConfTest is
11714    protected body Process is
11715       procedure Stop is
11716       begin
11717          Done := True;
11718       end Stop;
11719       function Continue return Boolean is
11720       begin
11721          return not Done;
11722       end Continue;
11723    end Process;
11724 end ConfTest;
11725 CF_EOF
11726 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
11727       cf_cv_gnat_sigint=yes
11728 else
11729    cf_cv_gnat_sigint=no
11730 fi
11731 rm -rf conftest* *~conftest*
11732
11733 fi
11734 echo "$as_me:11734: result: $cf_cv_gnat_sigint" >&5
11735 echo "${ECHO_T}$cf_cv_gnat_sigint" >&6
11736
11737 if test $cf_cv_gnat_sigint = yes ; then
11738         USE_GNAT_SIGINT=""
11739 else
11740         USE_GNAT_SIGINT="#"
11741 fi
11742
11743 echo "$as_me:11743: checking if GNAT pragma Unreferenced works" >&5
11744 echo $ECHO_N "checking if GNAT pragma Unreferenced works... $ECHO_C" >&6
11745 if test "${cf_cv_pragma_unreferenced+set}" = set; then
11746   echo $ECHO_N "(cached) $ECHO_C" >&6
11747 else
11748
11749 rm -rf conftest* *~conftest*
11750 cat >>conftest.ads <<CF_EOF
11751 procedure conftest;
11752 CF_EOF
11753 cat >>conftest.adb <<CF_EOF
11754 with Text_IO;
11755 with GNAT.OS_Lib;
11756 procedure conftest is
11757    test : Integer;
11758    pragma Unreferenced (test);
11759 begin
11760    test := 1;
11761    Text_IO.Put ("Hello World");
11762    Text_IO.New_Line;
11763    GNAT.OS_Lib.OS_Exit (0);
11764 end conftest;
11765 CF_EOF
11766 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
11767       cf_cv_pragma_unreferenced=yes
11768 else
11769    cf_cv_pragma_unreferenced=no
11770 fi
11771 rm -rf conftest* *~conftest*
11772
11773 fi
11774 echo "$as_me:11774: result: $cf_cv_pragma_unreferenced" >&5
11775 echo "${ECHO_T}$cf_cv_pragma_unreferenced" >&6
11776
11777 # if the pragma is supported, use it (needed in the Trace code).
11778 if test $cf_cv_pragma_unreferenced = yes ; then
11779         PRAGMA_UNREF=TRUE
11780 else
11781         PRAGMA_UNREF=FALSE
11782 fi
11783
11784 cf_gnat_libraries=no
11785 cf_gnat_projects=no
11786
11787 echo "$as_me:11787: checking if GNAT supports project files" >&5
11788 echo $ECHO_N "checking if GNAT supports project files... $ECHO_C" >&6
11789 case $cf_gnat_version in #(vi
11790 3.[0-9]*) #(vi
11791         ;;
11792 *)
11793         case $cf_cv_system_name in #(vi
11794         cygwin*) #(vi
11795                 ;;
11796         *)
11797                 mkdir conftest.src conftest.bin conftest.lib
11798                 cd conftest.src
11799                 rm -rf conftest* *~conftest*
11800                 cat >>library.gpr <<CF_EOF
11801 project Library is
11802   Kind := External ("LIB_KIND");
11803   for Library_Name use "ConfTest";
11804   for Object_Dir use ".";
11805   for Library_ALI_Dir use External("LIBRARY_DIR");
11806   for Library_Version use External ("SONAME");
11807   for Library_Kind use Kind;
11808   for Library_Dir use External("BUILD_DIR");
11809   Source_Dir := External ("SOURCE_DIR");
11810   for Source_Dirs use (Source_Dir);
11811   package Compiler is
11812      for Default_Switches ("Ada") use
11813        ("-g",
11814         "-O2",
11815         "-gnatafno",
11816         "-gnatVa",   -- All validity checks
11817         "-gnatwa");  -- Activate all optional errors
11818   end Compiler;
11819 end Library;
11820 CF_EOF
11821                 cat >>confpackage.ads <<CF_EOF
11822 package ConfPackage is
11823    procedure conftest;
11824 end ConfPackage;
11825 CF_EOF
11826                 cat >>confpackage.adb <<CF_EOF
11827 with Text_IO;
11828 package body ConfPackage is
11829    procedure conftest is
11830    begin
11831       Text_IO.Put ("Hello World");
11832       Text_IO.New_Line;
11833    end conftest;
11834 end ConfPackage;
11835 CF_EOF
11836                 if ( $cf_ada_make $ADAFLAGS \
11837                                 -Plibrary.gpr \
11838                                 -XBUILD_DIR=`cd ../conftest.bin;pwd` \
11839                                 -XLIBRARY_DIR=`cd ../conftest.lib;pwd` \
11840                                 -XSOURCE_DIR=`pwd` \
11841                                 -XSONAME=libConfTest.so.1 \
11842                                 -XLIB_KIND=static 1>&5 2>&1 ) ; then
11843                         cf_gnat_projects=yes
11844                 fi
11845                 cd ..
11846                 if test -f conftest.lib/confpackage.ali
11847                 then
11848                         cf_gnat_libraries=yes
11849                 fi
11850                 rm -rf conftest* *~conftest*
11851                 ;;
11852         esac
11853         ;;
11854 esac
11855 echo "$as_me:11855: result: $cf_gnat_projects" >&5
11856 echo "${ECHO_T}$cf_gnat_projects" >&6
11857
11858 if test $cf_gnat_projects = yes
11859 then
11860         echo "$as_me:11860: checking if GNAT supports libraries" >&5
11861 echo $ECHO_N "checking if GNAT supports libraries... $ECHO_C" >&6
11862         echo "$as_me:11862: result: $cf_gnat_libraries" >&5
11863 echo "${ECHO_T}$cf_gnat_libraries" >&6
11864 fi
11865
11866 if test "$cf_gnat_projects" = yes
11867 then
11868         USE_OLD_MAKERULES="#"
11869         USE_GNAT_PROJECTS=""
11870 else
11871         USE_OLD_MAKERULES=""
11872         USE_GNAT_PROJECTS="#"
11873 fi
11874
11875 if test "$cf_gnat_libraries" = yes
11876 then
11877         USE_GNAT_LIBRARIES=""
11878 else
11879         USE_GNAT_LIBRARIES="#"
11880 fi
11881
11882 echo "$as_me:11882: checking for ada-compiler" >&5
11883 echo $ECHO_N "checking for ada-compiler... $ECHO_C" >&6
11884
11885 # Check whether --with-ada-compiler or --without-ada-compiler was given.
11886 if test "${with_ada_compiler+set}" = set; then
11887   withval="$with_ada_compiler"
11888   cf_ada_compiler=$withval
11889 else
11890   cf_ada_compiler=gnatmake
11891 fi;
11892
11893 echo "$as_me:11893: result: $cf_ada_compiler" >&5
11894 echo "${ECHO_T}$cf_ada_compiler" >&6
11895
11896                 cf_ada_package=terminal_interface
11897
11898 echo "$as_me:11898: checking for ada-include" >&5
11899 echo $ECHO_N "checking for ada-include... $ECHO_C" >&6
11900
11901 # Check whether --with-ada-include or --without-ada-include was given.
11902 if test "${with_ada_include+set}" = set; then
11903   withval="$with_ada_include"
11904
11905 else
11906   withval="${ADA_INCLUDE:-$prefix/share/ada/adainclude}"
11907 fi; if test -n "$prefix/share/ada/adainclude" ; then
11908
11909 if test "x$prefix" != xNONE; then
11910   cf_path_syntax="$prefix"
11911 else
11912   cf_path_syntax="$ac_default_prefix"
11913 fi
11914
11915 case ".$withval" in #(vi
11916 .\$\(*\)*|.\'*\'*) #(vi
11917   ;;
11918 ..|./*|.\\*) #(vi
11919   ;;
11920 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
11921   ;;
11922 .\${*prefix}*|.\${*dir}*) #(vi
11923   eval withval="$withval"
11924   case ".$withval" in #(vi
11925   .NONE/*)
11926     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
11927     ;;
11928   esac
11929   ;; #(vi
11930 .no|.NONE/*)
11931   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
11932   ;;
11933 *)
11934   { { echo "$as_me:11934: error: expected a pathname, not \"$withval\"" >&5
11935 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
11936    { (exit 1); exit 1; }; }
11937   ;;
11938 esac
11939
11940 fi
11941 ADA_INCLUDE="$withval"
11942
11943 echo "$as_me:11943: result: $ADA_INCLUDE" >&5
11944 echo "${ECHO_T}$ADA_INCLUDE" >&6
11945
11946 echo "$as_me:11946: checking for ada-objects" >&5
11947 echo $ECHO_N "checking for ada-objects... $ECHO_C" >&6
11948
11949 # Check whether --with-ada-objects or --without-ada-objects was given.
11950 if test "${with_ada_objects+set}" = set; then
11951   withval="$with_ada_objects"
11952
11953 else
11954   withval="${ADA_OBJECTS:-$prefix/lib/ada/adalib}"
11955 fi; if test -n "$prefix/lib/ada/adalib" ; then
11956
11957 if test "x$prefix" != xNONE; then
11958   cf_path_syntax="$prefix"
11959 else
11960   cf_path_syntax="$ac_default_prefix"
11961 fi
11962
11963 case ".$withval" in #(vi
11964 .\$\(*\)*|.\'*\'*) #(vi
11965   ;;
11966 ..|./*|.\\*) #(vi
11967   ;;
11968 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
11969   ;;
11970 .\${*prefix}*|.\${*dir}*) #(vi
11971   eval withval="$withval"
11972   case ".$withval" in #(vi
11973   .NONE/*)
11974     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
11975     ;;
11976   esac
11977   ;; #(vi
11978 .no|.NONE/*)
11979   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
11980   ;;
11981 *)
11982   { { echo "$as_me:11982: error: expected a pathname, not \"$withval\"" >&5
11983 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
11984    { (exit 1); exit 1; }; }
11985   ;;
11986 esac
11987
11988 fi
11989 ADA_OBJECTS="$withval"
11990
11991 echo "$as_me:11991: result: $ADA_OBJECTS" >&5
11992 echo "${ECHO_T}$ADA_OBJECTS" >&6
11993
11994 echo "$as_me:11994: checking if an Ada95 shared-library should be built" >&5
11995 echo $ECHO_N "checking if an Ada95 shared-library should be built... $ECHO_C" >&6
11996
11997 # Check whether --with-ada-sharedlib or --without-ada-sharedlib was given.
11998 if test "${with_ada_sharedlib+set}" = set; then
11999   withval="$with_ada_sharedlib"
12000   with_ada_sharedlib=$withval
12001 else
12002   with_ada_sharedlib=no
12003 fi;
12004 echo "$as_me:12004: result: $with_ada_sharedlib" >&5
12005 echo "${ECHO_T}$with_ada_sharedlib" >&6
12006
12007 ADA_SHAREDLIB='lib$(LIB_NAME).so.1'
12008 MAKE_ADA_SHAREDLIB="#"
12009
12010 if test "x$with_ada_sharedlib" != xno
12011 then
12012         MAKE_ADA_SHAREDLIB=
12013         if test "x$with_ada_sharedlib" != xyes
12014         then
12015                 ADA_SHAREDLIB="$with_ada_sharedlib"
12016         fi
12017 fi
12018
12019         else
12020                 { { echo "$as_me:12020: error: No usable Ada compiler found" >&5
12021 echo "$as_me: error: No usable Ada compiler found" >&2;}
12022    { (exit 1); exit 1; }; }
12023         fi
12024 else
12025         { { echo "$as_me:12025: error: The Ada compiler is needed for this package" >&5
12026 echo "$as_me: error: The Ada compiler is needed for this package" >&2;}
12027    { (exit 1); exit 1; }; }
12028 fi
12029
12030 ################################################################################
12031
12032 # not needed
12033 TINFO_LDFLAGS2=
12034
12035 TINFO_LIBS=
12036
12037 ### Construct the list of include-directories to be generated
12038
12039 CPPFLAGS="$CPPFLAGS -I. -I../include"
12040 if test "$srcdir" != "."; then
12041         CPPFLAGS="$CPPFLAGS -I\${srcdir}/../include"
12042 fi
12043 if test "$GCC" != yes; then
12044         CPPFLAGS="$CPPFLAGS -I\${includedir}"
12045 elif test "$includedir" != "/usr/include"; then
12046         if test "$includedir" = '${prefix}/include' ; then
12047                 if test $prefix != /usr ; then
12048                         CPPFLAGS="$CPPFLAGS -I\${includedir}"
12049                 fi
12050         else
12051                 CPPFLAGS="$CPPFLAGS -I\${includedir}"
12052         fi
12053 fi
12054
12055 ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
12056 if test "$srcdir" != "."; then
12057         ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
12058 fi
12059 if test "$GCC" != yes; then
12060         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
12061 elif test "$includedir" != "/usr/include"; then
12062         if test "$includedir" = '${prefix}/include' ; then
12063                 if test $prefix != /usr ; then
12064                         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
12065                 fi
12066         else
12067                 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
12068         fi
12069 fi
12070
12071 ### Build up pieces for makefile rules
12072 echo "$as_me:12072: checking default library suffix" >&5
12073 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
12074
12075         case $DFT_LWR_MODEL in
12076         libtool) DFT_ARG_SUFFIX=''   ;;
12077         normal)  DFT_ARG_SUFFIX=''   ;;
12078         debug)   DFT_ARG_SUFFIX='_g' ;;
12079         profile) DFT_ARG_SUFFIX='_p' ;;
12080         shared)  DFT_ARG_SUFFIX=''   ;;
12081         esac
12082         test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
12083 echo "$as_me:12083: result: $DFT_ARG_SUFFIX" >&5
12084 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
12085
12086 echo "$as_me:12086: checking default library-dependency suffix" >&5
12087 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
12088
12089         case $DFT_LWR_MODEL in #(vi
12090         libtool) #(vi
12091                 DFT_LIB_SUFFIX='.la'
12092                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
12093                 ;;
12094         normal) #(vi
12095                 DFT_LIB_SUFFIX='.a'
12096                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
12097                 ;;
12098         debug) #(vi
12099                 DFT_LIB_SUFFIX='_g.a'
12100                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
12101                 ;;
12102         profile) #(vi
12103                 DFT_LIB_SUFFIX='_p.a'
12104                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
12105                 ;;
12106         shared) #(vi
12107                 case $cf_cv_system_name in
12108                 aix[5-7]*) #(vi
12109                         DFT_LIB_SUFFIX='.a'
12110                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
12111                         ;;
12112                 cygwin*|mingw*) #(vi
12113                         DFT_LIB_SUFFIX='.dll'
12114                         DFT_DEP_SUFFIX='.dll.a'
12115                         ;;
12116                 darwin*) #(vi
12117                         DFT_LIB_SUFFIX='.dylib'
12118                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
12119                         ;;
12120                 hpux*) #(vi
12121                         case $target in
12122                         ia64*) #(vi
12123                                 DFT_LIB_SUFFIX='.so'
12124                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
12125                                 ;;
12126                         *) #(vi
12127                                 DFT_LIB_SUFFIX='.sl'
12128                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
12129                                 ;;
12130                         esac
12131                         ;;
12132                 *)      DFT_LIB_SUFFIX='.so'
12133                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
12134                         ;;
12135                 esac
12136         esac
12137         test -n "$LIB_SUFFIX" && DFT_LIB_SUFFIX="${LIB_SUFFIX}${DFT_LIB_SUFFIX}"
12138         test -n "$LIB_SUFFIX" && DFT_DEP_SUFFIX="${LIB_SUFFIX}${DFT_DEP_SUFFIX}"
12139 echo "$as_me:12139: result: $DFT_DEP_SUFFIX" >&5
12140 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
12141
12142 echo "$as_me:12142: checking default object directory" >&5
12143 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
12144
12145         case $DFT_LWR_MODEL in
12146         libtool) DFT_OBJ_SUBDIR='obj_lo'  ;;
12147         normal)  DFT_OBJ_SUBDIR='objects' ;;
12148         debug)   DFT_OBJ_SUBDIR='obj_g' ;;
12149         profile) DFT_OBJ_SUBDIR='obj_p' ;;
12150         shared)
12151                 case $cf_cv_system_name in #(vi
12152                 cygwin) #(vi
12153                         DFT_OBJ_SUBDIR='objects' ;;
12154                 *)
12155                         DFT_OBJ_SUBDIR='obj_s' ;;
12156                 esac
12157         esac
12158 echo "$as_me:12158: result: $DFT_OBJ_SUBDIR" >&5
12159 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
12160
12161 ### Set up low-level terminfo dependencies for makefiles.
12162
12163 if test "$DFT_LWR_MODEL" = shared ; then
12164         case $cf_cv_system_name in #(vi
12165         cygwin*)
12166                 # "lib" files have ".dll.a" suffix, "cyg" files have ".dll"
12167                 ;;
12168         esac
12169 fi
12170
12171 ### Construct the list of subdirectories for which we'll customize makefiles
12172 ### with the appropriate compile-rules.
12173
12174 SUB_MAKEFILES="gen/adacurses${DFT_ARG_SUFFIX}-config:gen/adacurses-config.in"
12175
12176 cat >>confdefs.h <<EOF
12177 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
12178 EOF
12179
12180 ### Now that we're done running tests, add the compiler-warnings, if any
12181
12182 cf_fix_cppflags=no
12183 cf_new_cflags=
12184 cf_new_cppflags=
12185 cf_new_extra_cppflags=
12186
12187 for cf_add_cflags in $EXTRA_CFLAGS
12188 do
12189 case $cf_fix_cppflags in
12190 no)
12191         case $cf_add_cflags in #(vi
12192         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
12193                 case $cf_add_cflags in
12194                 -D*)
12195                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12196
12197                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12198                                 && test -z "${cf_tst_cflags}" \
12199                                 && cf_fix_cppflags=yes
12200
12201                         if test $cf_fix_cppflags = yes ; then
12202                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12203                                 continue
12204                         elif test "${cf_tst_cflags}" = "\"'" ; then
12205                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12206                                 continue
12207                         fi
12208                         ;;
12209                 esac
12210                 case "$CPPFLAGS" in
12211                 *$cf_add_cflags) #(vi
12212                         ;;
12213                 *) #(vi
12214                         case $cf_add_cflags in #(vi
12215                         -D*)
12216                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12217
12218 CPPFLAGS=`echo "$CPPFLAGS" | \
12219         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
12220                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
12221
12222                                 ;;
12223                         esac
12224                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
12225                         ;;
12226                 esac
12227                 ;;
12228         *)
12229                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
12230                 ;;
12231         esac
12232         ;;
12233 yes)
12234         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12235
12236         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12237
12238         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12239                 && test -z "${cf_tst_cflags}" \
12240                 && cf_fix_cppflags=no
12241         ;;
12242 esac
12243 done
12244
12245 if test -n "$cf_new_cflags" ; then
12246
12247         CFLAGS="$CFLAGS $cf_new_cflags"
12248 fi
12249
12250 if test -n "$cf_new_cppflags" ; then
12251
12252         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
12253 fi
12254
12255 if test -n "$cf_new_extra_cppflags" ; then
12256
12257         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
12258 fi
12259
12260 ################################################################################
12261
12262 if test x"$enable_pc_files" = xyes ; then \
12263 SUB_MAKEFILES="$SUB_MAKEFILES misc/gen-pkgconfig:misc/gen-pkgconfig.in"
12264 MAKE_PC_FILES=
12265 else
12266 MAKE_PC_FILES="#"
12267 fi
12268
12269 ################################################################################
12270
12271 TEST_ARG2=
12272
12273 TEST_LIBS2=
12274
12275 NCURSES_SHLIB2="sh -c"
12276
12277 ADA_SUBDIRS="include gen src doc"
12278 if test "x$cf_with_tests" != "xno" ; then
12279         ADA_SUBDIRS="$ADA_SUBDIRS samples"
12280 fi
12281 for cf_dir in $ADA_SUBDIRS
12282 do
12283         SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
12284 done
12285
12286 NCURSES_TREE="#"
12287
12288 EXTERNAL_TREE=
12289
12290 # match layout used by make-tar.sh
12291 ADAHTML_DIR=../doc/ada
12292
12293 ac_config_files="$ac_config_files $SUB_MAKEFILES doc/adacurses${DFT_ARG_SUFFIX}-config.1:doc/MKada_config.in Makefile"
12294 ac_config_commands="$ac_config_commands default"
12295 cat >confcache <<\_ACEOF
12296 # This file is a shell script that caches the results of configure
12297 # tests run on this system so they can be shared between configure
12298 # scripts and configure runs, see configure's option --config-cache.
12299 # It is not useful on other systems.  If it contains results you don't
12300 # want to keep, you may remove or edit it.
12301 #
12302 # config.status only pays attention to the cache file if you give it
12303 # the --recheck option to rerun configure.
12304 #
12305 # `ac_cv_env_foo' variables (set or unset) will be overriden when
12306 # loading this file, other *unset* `ac_cv_foo' will be assigned the
12307 # following values.
12308
12309 _ACEOF
12310
12311 # The following way of writing the cache mishandles newlines in values,
12312 # but we know of no workaround that is simple, portable, and efficient.
12313 # So, don't put newlines in cache variables' values.
12314 # Ultrix sh set writes to stderr and can't be redirected directly,
12315 # and sets the high bit in the cache file unless we assign to the vars.
12316 {
12317   (set) 2>&1 |
12318     case `(ac_space=' '; set | grep ac_space) 2>&1` in
12319     *ac_space=\ *)
12320       # `set' does not quote correctly, so add quotes (double-quote
12321       # substitution turns \\\\ into \\, and sed turns \\ into \).
12322       sed -n \
12323         "s/'/'\\\\''/g;
12324           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
12325       ;;
12326     *)
12327       # `set' quotes correctly as required by POSIX, so do not add quotes.
12328       sed -n \
12329         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
12330       ;;
12331     esac;
12332 } |
12333   sed '
12334      t clear
12335      : clear
12336      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
12337      t end
12338      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
12339      : end' >>confcache
12340 if cmp -s $cache_file confcache; then :; else
12341   if test -w $cache_file; then
12342     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
12343     cat confcache >$cache_file
12344   else
12345     echo "not updating unwritable cache $cache_file"
12346   fi
12347 fi
12348 rm -f confcache
12349
12350 test "x$prefix" = xNONE && prefix=$ac_default_prefix
12351 # Let make expand exec_prefix.
12352 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
12353
12354 # VPATH may cause trouble with some makes, so we remove $(srcdir),
12355 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
12356 # trailing colons and then remove the whole line if VPATH becomes empty
12357 # (actually we leave an empty line to preserve line numbers).
12358 if test "x$srcdir" = x.; then
12359   ac_vpsub='/^[         ]*VPATH[        ]*=/{
12360 s/:*\$(srcdir):*/:/;
12361 s/:*\${srcdir}:*/:/;
12362 s/:*@srcdir@:*/:/;
12363 s/^\([^=]*=[    ]*\):*/\1/;
12364 s/:*$//;
12365 s/^[^=]*=[      ]*$//;
12366 }'
12367 fi
12368
12369 DEFS=-DHAVE_CONFIG_H
12370
12371 : ${CONFIG_STATUS=./config.status}
12372 ac_clean_files_save=$ac_clean_files
12373 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
12374 { echo "$as_me:12374: creating $CONFIG_STATUS" >&5
12375 echo "$as_me: creating $CONFIG_STATUS" >&6;}
12376 cat >$CONFIG_STATUS <<_ACEOF
12377 #! $SHELL
12378 # Generated automatically by configure.
12379 # Run this file to recreate the current configuration.
12380 # Compiler output produced by configure, useful for debugging
12381 # configure, is in config.log if it exists.
12382
12383 debug=false
12384 SHELL=\${CONFIG_SHELL-$SHELL}
12385 ac_cs_invocation="\$0 \$@"
12386
12387 _ACEOF
12388
12389 cat >>$CONFIG_STATUS <<\_ACEOF
12390 # Be Bourne compatible
12391 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
12392   emulate sh
12393   NULLCMD=:
12394 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
12395   set -o posix
12396 fi
12397
12398 # Name of the executable.
12399 as_me=`echo "$0" |sed 's,.*[\\/],,'`
12400
12401 if expr a : '\(a\)' >/dev/null 2>&1; then
12402   as_expr=expr
12403 else
12404   as_expr=false
12405 fi
12406
12407 rm -f conf$$ conf$$.exe conf$$.file
12408 echo >conf$$.file
12409 if ln -s conf$$.file conf$$ 2>/dev/null; then
12410   # We could just check for DJGPP; but this test a) works b) is more generic
12411   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
12412   if test -f conf$$.exe; then
12413     # Don't use ln at all; we don't have any links
12414     as_ln_s='cp -p'
12415   else
12416     as_ln_s='ln -s'
12417   fi
12418 elif ln conf$$.file conf$$ 2>/dev/null; then
12419   as_ln_s=ln
12420 else
12421   as_ln_s='cp -p'
12422 fi
12423 rm -f conf$$ conf$$.exe conf$$.file
12424
12425 as_executable_p="test -f"
12426
12427 # Support unset when possible.
12428 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
12429   as_unset=unset
12430 else
12431   as_unset=false
12432 fi
12433
12434 # NLS nuisances.
12435 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
12436 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
12437 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
12438 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
12439 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
12440 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
12441 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
12442 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
12443
12444 # IFS
12445 # We need space, tab and new line, in precisely that order.
12446 as_nl='
12447 '
12448 IFS="   $as_nl"
12449
12450 # CDPATH.
12451 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
12452
12453 exec 6>&1
12454
12455 _ACEOF
12456
12457 # Files that config.status was made for.
12458 if test -n "$ac_config_files"; then
12459   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
12460 fi
12461
12462 if test -n "$ac_config_headers"; then
12463   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
12464 fi
12465
12466 if test -n "$ac_config_links"; then
12467   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
12468 fi
12469
12470 if test -n "$ac_config_commands"; then
12471   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
12472 fi
12473
12474 cat >>$CONFIG_STATUS <<\EOF
12475
12476 ac_cs_usage="\
12477 \`$as_me' instantiates files from templates according to the
12478 current configuration.
12479
12480 Usage: $0 [OPTIONS] [FILE]...
12481
12482   -h, --help       print this help, then exit
12483   -V, --version    print version number, then exit
12484   -d, --debug      don't remove temporary files
12485       --recheck    update $as_me by reconfiguring in the same conditions
12486   --file=FILE[:TEMPLATE]
12487                    instantiate the configuration file FILE
12488   --header=FILE[:TEMPLATE]
12489                    instantiate the configuration header FILE
12490
12491 Configuration files:
12492 $config_files
12493
12494 Configuration headers:
12495 $config_headers
12496
12497 Configuration commands:
12498 $config_commands
12499
12500 Report bugs to <dickey@invisible-island.net>."
12501 EOF
12502
12503 cat >>$CONFIG_STATUS <<EOF
12504 ac_cs_version="\\
12505 config.status
12506 configured by $0, generated by GNU Autoconf 2.52.20120310,
12507   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
12508
12509 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
12510 Free Software Foundation, Inc.
12511 This config.status script is free software; the Free Software Foundation
12512 gives unlimited permission to copy, distribute and modify it."
12513 srcdir=$srcdir
12514 INSTALL="$INSTALL"
12515 EOF
12516
12517 cat >>$CONFIG_STATUS <<\EOF
12518 # If no file are specified by the user, then we need to provide default
12519 # value.  By we need to know if files were specified by the user.
12520 ac_need_defaults=:
12521 while test $# != 0
12522 do
12523   case $1 in
12524   --*=*)
12525     ac_option=`expr "x$1" : 'x\([^=]*\)='`
12526     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
12527     shift
12528     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
12529     shift
12530     ;;
12531   -*);;
12532   *) # This is not an option, so the user has probably given explicit
12533      # arguments.
12534      ac_need_defaults=false;;
12535   esac
12536
12537   case $1 in
12538   # Handling of the options.
12539 EOF
12540 cat >>$CONFIG_STATUS <<EOF
12541   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
12542     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
12543     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
12544 EOF
12545 cat >>$CONFIG_STATUS <<\EOF
12546   --version | --vers* | -V )
12547     echo "$ac_cs_version"; exit 0 ;;
12548   --he | --h)
12549     # Conflict between --help and --header
12550     { { echo "$as_me:12550: error: ambiguous option: $1
12551 Try \`$0 --help' for more information." >&5
12552 echo "$as_me: error: ambiguous option: $1
12553 Try \`$0 --help' for more information." >&2;}
12554    { (exit 1); exit 1; }; };;
12555   --help | --hel | -h )
12556     echo "$ac_cs_usage"; exit 0 ;;
12557   --debug | --d* | -d )
12558     debug=: ;;
12559   --file | --fil | --fi | --f )
12560     shift
12561     CONFIG_FILES="$CONFIG_FILES $1"
12562     ac_need_defaults=false;;
12563   --header | --heade | --head | --hea )
12564     shift
12565     CONFIG_HEADERS="$CONFIG_HEADERS $1"
12566     ac_need_defaults=false;;
12567
12568   # This is an error.
12569   -*) { { echo "$as_me:12569: error: unrecognized option: $1
12570 Try \`$0 --help' for more information." >&5
12571 echo "$as_me: error: unrecognized option: $1
12572 Try \`$0 --help' for more information." >&2;}
12573    { (exit 1); exit 1; }; } ;;
12574
12575   *) ac_config_targets="$ac_config_targets $1" ;;
12576
12577   esac
12578   shift
12579 done
12580
12581 exec 5>>config.log
12582 cat >&5 << _ACEOF
12583
12584 ## ----------------------- ##
12585 ## Running config.status.  ##
12586 ## ----------------------- ##
12587
12588 This file was extended by $as_me 2.52.20120310, executed with
12589   CONFIG_FILES    = $CONFIG_FILES
12590   CONFIG_HEADERS  = $CONFIG_HEADERS
12591   CONFIG_LINKS    = $CONFIG_LINKS
12592   CONFIG_COMMANDS = $CONFIG_COMMANDS
12593   > $ac_cs_invocation
12594 on `(hostname || uname -n) 2>/dev/null | sed 1q`
12595
12596 _ACEOF
12597 EOF
12598
12599 cat >>$CONFIG_STATUS <<EOF
12600 #
12601 # INIT-COMMANDS section.
12602 #
12603
12604 ### Special initialization commands, used to pass information from the
12605 ### configuration-run into config.status
12606
12607 AWK="$AWK"
12608 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
12609 DFT_LWR_MODEL="$DFT_LWR_MODEL"
12610 LIB_NAME="$LIB_NAME"
12611 LIB_PREFIX="$LIB_PREFIX"
12612 LIB_SUFFIX="$LIB_SUFFIX"
12613 LN_S="$LN_S"
12614 NCURSES_MAJOR="$NCURSES_MAJOR"
12615 NCURSES_MINOR="$NCURSES_MINOR"
12616 NCURSES_PATCH="$NCURSES_PATCH"
12617 USE_OLD_MAKERULES="$USE_OLD_MAKERULES"
12618 cf_cv_abi_version="$cf_cv_abi_version"
12619 cf_cv_rel_version="$cf_cv_rel_version"
12620 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
12621 cf_cv_shared_soname='$cf_cv_shared_soname'
12622 cf_cv_shlib_version="$cf_cv_shlib_version"
12623 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
12624 cf_cv_system_name="$cf_cv_system_name"
12625 host="$host"
12626 target="$target"
12627
12628 EOF
12629
12630 cat >>$CONFIG_STATUS <<\EOF
12631 for ac_config_target in $ac_config_targets
12632 do
12633   case "$ac_config_target" in
12634   # Handling of arguments.
12635   "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
12636   "doc/adacurses${DFT_ARG_SUFFIX}-config.1" ) CONFIG_FILES="$CONFIG_FILES doc/adacurses${DFT_ARG_SUFFIX}-config.1:doc/MKada_config.in" ;;
12637   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
12638   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
12639   "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
12640   *) { { echo "$as_me:12640: error: invalid argument: $ac_config_target" >&5
12641 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
12642    { (exit 1); exit 1; }; };;
12643   esac
12644 done
12645
12646 # If the user did not use the arguments to specify the items to instantiate,
12647 # then the envvar interface is used.  Set only those that are not.
12648 # We use the long form for the default assignment because of an extremely
12649 # bizarre bug on SunOS 4.1.3.
12650 if $ac_need_defaults; then
12651   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
12652   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
12653   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
12654 fi
12655
12656 # Create a temporary directory, and hook for its removal unless debugging.
12657 $debug ||
12658 {
12659   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
12660   trap '{ (exit 1); exit 1; }' 1 2 13 15
12661 }
12662
12663 # Create a (secure) tmp directory for tmp files.
12664 : ${TMPDIR=/tmp}
12665 {
12666   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
12667   test -n "$tmp" && test -d "$tmp"
12668 }  ||
12669 {
12670   tmp=$TMPDIR/cs$$-$RANDOM
12671   (umask 077 && mkdir $tmp)
12672 } ||
12673 {
12674    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
12675    { (exit 1); exit 1; }
12676 }
12677
12678 EOF
12679
12680 cat >>$CONFIG_STATUS <<EOF
12681
12682 #
12683 # CONFIG_FILES section.
12684 #
12685
12686 # No need to generate the scripts if there are no CONFIG_FILES.
12687 # This happens for instance when ./config.status config.h
12688 if test -n "\$CONFIG_FILES"; then
12689   # Protect against being on the right side of a sed subst in config.status.
12690   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
12691    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
12692 s,@SHELL@,$SHELL,;t t
12693 s,@exec_prefix@,$exec_prefix,;t t
12694 s,@prefix@,$prefix,;t t
12695 s,@program_transform_name@,$program_transform_name,;t t
12696 s,@bindir@,$bindir,;t t
12697 s,@sbindir@,$sbindir,;t t
12698 s,@libexecdir@,$libexecdir,;t t
12699 s,@datadir@,$datadir,;t t
12700 s,@sysconfdir@,$sysconfdir,;t t
12701 s,@sharedstatedir@,$sharedstatedir,;t t
12702 s,@localstatedir@,$localstatedir,;t t
12703 s,@libdir@,$libdir,;t t
12704 s,@includedir@,$includedir,;t t
12705 s,@oldincludedir@,$oldincludedir,;t t
12706 s,@infodir@,$infodir,;t t
12707 s,@mandir@,$mandir,;t t
12708 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
12709 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
12710 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
12711 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
12712 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
12713 s,@build_alias@,$build_alias,;t t
12714 s,@host_alias@,$host_alias,;t t
12715 s,@target_alias@,$target_alias,;t t
12716 s,@ECHO_C@,$ECHO_C,;t t
12717 s,@ECHO_N@,$ECHO_N,;t t
12718 s,@ECHO_T@,$ECHO_T,;t t
12719 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
12720 s,@DEFS@,$DEFS,;t t
12721 s,@LIBS@,$LIBS,;t t
12722 s,@top_builddir@,$top_builddir,;t t
12723 s,@build@,$build,;t t
12724 s,@build_cpu@,$build_cpu,;t t
12725 s,@build_vendor@,$build_vendor,;t t
12726 s,@build_os@,$build_os,;t t
12727 s,@host@,$host,;t t
12728 s,@host_cpu@,$host_cpu,;t t
12729 s,@host_vendor@,$host_vendor,;t t
12730 s,@host_os@,$host_os,;t t
12731 s,@target@,$target,;t t
12732 s,@target_cpu@,$target_cpu,;t t
12733 s,@target_vendor@,$target_vendor,;t t
12734 s,@target_os@,$target_os,;t t
12735 s,@CC@,$CC,;t t
12736 s,@CFLAGS@,$CFLAGS,;t t
12737 s,@LDFLAGS@,$LDFLAGS,;t t
12738 s,@CPPFLAGS@,$CPPFLAGS,;t t
12739 s,@ac_ct_CC@,$ac_ct_CC,;t t
12740 s,@EXEEXT@,$EXEEXT,;t t
12741 s,@OBJEXT@,$OBJEXT,;t t
12742 s,@CPP@,$CPP,;t t
12743 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
12744 s,@PROG_EXT@,$PROG_EXT,;t t
12745 s,@AWK@,$AWK,;t t
12746 s,@EGREP@,$EGREP,;t t
12747 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
12748 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
12749 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
12750 s,@LN_S@,$LN_S,;t t
12751 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
12752 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
12753 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
12754 s,@SET_MAKE@,$SET_MAKE,;t t
12755 s,@CTAGS@,$CTAGS,;t t
12756 s,@ETAGS@,$ETAGS,;t t
12757 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
12758 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
12759 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
12760 s,@RANLIB@,$RANLIB,;t t
12761 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
12762 s,@LD@,$LD,;t t
12763 s,@ac_ct_LD@,$ac_ct_LD,;t t
12764 s,@AR@,$AR,;t t
12765 s,@ac_ct_AR@,$ac_ct_AR,;t t
12766 s,@ARFLAGS@,$ARFLAGS,;t t
12767 s,@DESTDIR@,$DESTDIR,;t t
12768 s,@BUILD_CC@,$BUILD_CC,;t t
12769 s,@BUILD_CPP@,$BUILD_CPP,;t t
12770 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
12771 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
12772 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
12773 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
12774 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
12775 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
12776 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
12777 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
12778 s,@NCURSES_CONFIG@,$NCURSES_CONFIG,;t t
12779 s,@ac_ct_NCURSES_CONFIG@,$ac_ct_NCURSES_CONFIG,;t t
12780 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
12781 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
12782 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
12783 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
12784 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
12785 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
12786 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
12787 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
12788 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
12789 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
12790 s,@CC_G_OPT@,$CC_G_OPT,;t t
12791 s,@LD_MODEL@,$LD_MODEL,;t t
12792 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
12793 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
12794 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
12795 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
12796 s,@LINK_PROGS@,$LINK_PROGS,;t t
12797 s,@LINK_TESTS@,$LINK_TESTS,;t t
12798 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
12799 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
12800 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
12801 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
12802 s,@RPATH_LIST@,$RPATH_LIST,;t t
12803 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
12804 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
12805 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
12806 s,@PTHREAD@,$PTHREAD,;t t
12807 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
12808 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
12809 s,@ECHO_LT@,$ECHO_LT,;t t
12810 s,@ECHO_LD@,$ECHO_LD,;t t
12811 s,@RULE_CC@,$RULE_CC,;t t
12812 s,@SHOW_CC@,$SHOW_CC,;t t
12813 s,@ECHO_CC@,$ECHO_CC,;t t
12814 s,@ADAFLAGS@,$ADAFLAGS,;t t
12815 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
12816 s,@ADA_TRACE@,$ADA_TRACE,;t t
12817 s,@gnat_exists@,$gnat_exists,;t t
12818 s,@M4_exists@,$M4_exists,;t t
12819 s,@cf_ada_make@,$cf_ada_make,;t t
12820 s,@cf_compile_generics@,$cf_compile_generics,;t t
12821 s,@cf_generic_objects@,$cf_generic_objects,;t t
12822 s,@USE_GNAT_SIGINT@,$USE_GNAT_SIGINT,;t t
12823 s,@PRAGMA_UNREF@,$PRAGMA_UNREF,;t t
12824 s,@USE_OLD_MAKERULES@,$USE_OLD_MAKERULES,;t t
12825 s,@USE_GNAT_PROJECTS@,$USE_GNAT_PROJECTS,;t t
12826 s,@USE_GNAT_LIBRARIES@,$USE_GNAT_LIBRARIES,;t t
12827 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
12828 s,@cf_ada_package@,$cf_ada_package,;t t
12829 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
12830 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
12831 s,@ADA_SHAREDLIB@,$ADA_SHAREDLIB,;t t
12832 s,@MAKE_ADA_SHAREDLIB@,$MAKE_ADA_SHAREDLIB,;t t
12833 s,@TINFO_LDFLAGS2@,$TINFO_LDFLAGS2,;t t
12834 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
12835 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
12836 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
12837 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
12838 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
12839 s,@MAKE_PC_FILES@,$MAKE_PC_FILES,;t t
12840 s,@cross_compiling@,$cross_compiling,;t t
12841 s,@TEST_ARG2@,$TEST_ARG2,;t t
12842 s,@TEST_LIBS2@,$TEST_LIBS2,;t t
12843 s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
12844 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
12845 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
12846 s,@EXTERNAL_TREE@,$EXTERNAL_TREE,;t t
12847 s,@ADAHTML_DIR@,$ADAHTML_DIR,;t t
12848 CEOF
12849
12850 EOF
12851
12852   cat >>$CONFIG_STATUS <<\EOF
12853   # Split the substitutions into bite-sized pieces for seds with
12854   # small command number limits, like on Digital OSF/1 and HP-UX.
12855   ac_max_sed_lines=48
12856   ac_sed_frag=1 # Number of current file.
12857   ac_beg=1 # First line for current file.
12858   ac_end=$ac_max_sed_lines # Line after last line for current file.
12859   ac_more_lines=:
12860   ac_sed_cmds=
12861   while $ac_more_lines; do
12862     if test $ac_beg -gt 1; then
12863       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
12864     else
12865       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
12866     fi
12867     if test ! -s $tmp/subs.frag; then
12868       ac_more_lines=false
12869     else
12870       # The purpose of the label and of the branching condition is to
12871       # speed up the sed processing (if there are no `@' at all, there
12872       # is no need to browse any of the substitutions).
12873       # These are the two extra sed commands mentioned above.
12874       (echo ':t
12875   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
12876       if test -z "$ac_sed_cmds"; then
12877         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
12878       else
12879         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
12880       fi
12881       ac_sed_frag=`expr $ac_sed_frag + 1`
12882       ac_beg=$ac_end
12883       ac_end=`expr $ac_end + $ac_max_sed_lines`
12884     fi
12885   done
12886   if test -z "$ac_sed_cmds"; then
12887     ac_sed_cmds=cat
12888   fi
12889 fi # test -n "$CONFIG_FILES"
12890
12891 EOF
12892 cat >>$CONFIG_STATUS <<\EOF
12893 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
12894   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
12895   case $ac_file in
12896   - | *:- | *:-:* ) # input from stdin
12897         cat >$tmp/stdin
12898         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
12899         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
12900   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
12901         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
12902   * )   ac_file_in=$ac_file.in ;;
12903   esac
12904
12905   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
12906   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
12907          X"$ac_file" : 'X\(//\)[^/]' \| \
12908          X"$ac_file" : 'X\(//\)$' \| \
12909          X"$ac_file" : 'X\(/\)' \| \
12910          .     : '\(.\)' 2>/dev/null ||
12911 echo X"$ac_file" |
12912     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
12913           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
12914           /^X\(\/\/\)$/{ s//\1/; q; }
12915           /^X\(\/\).*/{ s//\1/; q; }
12916           s/.*/./; q'`
12917   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
12918     { case "$ac_dir" in
12919   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
12920   *)                      as_incr_dir=.;;
12921 esac
12922 as_dummy="$ac_dir"
12923 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
12924   case $as_mkdir_dir in
12925     # Skip DOS drivespec
12926     ?:) as_incr_dir=$as_mkdir_dir ;;
12927     *)
12928       as_incr_dir=$as_incr_dir/$as_mkdir_dir
12929       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
12930     ;;
12931   esac
12932 done; }
12933
12934     ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
12935     # A "../" for each directory in $ac_dir_suffix.
12936     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
12937   else
12938     ac_dir_suffix= ac_dots=
12939   fi
12940
12941   case $srcdir in
12942   .)  ac_srcdir=.
12943       if test -z "$ac_dots"; then
12944          ac_top_srcdir=.
12945       else
12946          ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
12947       fi ;;
12948   [\\/]* | ?:[\\/]* )
12949       ac_srcdir=$srcdir$ac_dir_suffix;
12950       ac_top_srcdir=$srcdir ;;
12951   *) # Relative path.
12952     ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
12953     ac_top_srcdir=$ac_dots$srcdir ;;
12954   esac
12955
12956   case $INSTALL in
12957   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
12958   *) ac_INSTALL=$ac_dots$INSTALL ;;
12959   esac
12960
12961   if test x"$ac_file" != x-; then
12962     { echo "$as_me:12962: creating $ac_file" >&5
12963 echo "$as_me: creating $ac_file" >&6;}
12964     rm -f "$ac_file"
12965   fi
12966   # Let's still pretend it is `configure' which instantiates (i.e., don't
12967   # use $as_me), people would be surprised to read:
12968   #    /* config.h.  Generated automatically by config.status.  */
12969   configure_input="Generated automatically from `echo $ac_file_in |
12970                                                  sed 's,.*/,,'` by configure."
12971
12972   # First look for the input files in the build tree, otherwise in the
12973   # src tree.
12974   ac_file_inputs=`IFS=:
12975     for f in $ac_file_in; do
12976       case $f in
12977       -) echo $tmp/stdin ;;
12978       [\\/$]*)
12979          # Absolute (can't be DOS-style, as IFS=:)
12980          test -f "$f" || { { echo "$as_me:12980: error: cannot find input file: $f" >&5
12981 echo "$as_me: error: cannot find input file: $f" >&2;}
12982    { (exit 1); exit 1; }; }
12983          echo $f;;
12984       *) # Relative
12985          if test -f "$f"; then
12986            # Build tree
12987            echo $f
12988          elif test -f "$srcdir/$f"; then
12989            # Source tree
12990            echo $srcdir/$f
12991          else
12992            # /dev/null tree
12993            { { echo "$as_me:12993: error: cannot find input file: $f" >&5
12994 echo "$as_me: error: cannot find input file: $f" >&2;}
12995    { (exit 1); exit 1; }; }
12996          fi;;
12997       esac
12998     done` || { (exit 1); exit 1; }
12999 EOF
13000 cat >>$CONFIG_STATUS <<EOF
13001   sed "$ac_vpsub
13002 $extrasub
13003 EOF
13004 cat >>$CONFIG_STATUS <<\EOF
13005 :t
13006 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
13007 s,@configure_input@,$configure_input,;t t
13008 s,@srcdir@,$ac_srcdir,;t t
13009 s,@top_srcdir@,$ac_top_srcdir,;t t
13010 s,@INSTALL@,$ac_INSTALL,;t t
13011 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
13012   rm -f $tmp/stdin
13013   if test x"$ac_file" != x-; then
13014     mv $tmp/out $ac_file
13015   else
13016     cat $tmp/out
13017     rm -f $tmp/out
13018   fi
13019
13020 done
13021 EOF
13022 cat >>$CONFIG_STATUS <<\EOF
13023
13024 #
13025 # CONFIG_HEADER section.
13026 #
13027
13028 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
13029 # NAME is the cpp macro being defined and VALUE is the value it is being given.
13030 #
13031 # ac_d sets the value in "#define NAME VALUE" lines.
13032 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
13033 ac_dB='[        ].*$,\1#\2'
13034 ac_dC=' '
13035 ac_dD=',;t'
13036 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
13037 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
13038 ac_iB='\([      ]\),\1#\2define\3'
13039 ac_iC=' '
13040 ac_iD='\4,;t'
13041 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
13042 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
13043 ac_uB='$,\1#\2define\3'
13044 ac_uC=' '
13045 ac_uD=',;t'
13046
13047 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
13048   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
13049   case $ac_file in
13050   - | *:- | *:-:* ) # input from stdin
13051         cat >$tmp/stdin
13052         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
13053         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
13054   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
13055         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
13056   * )   ac_file_in=$ac_file.in ;;
13057   esac
13058
13059   test x"$ac_file" != x- && { echo "$as_me:13059: creating $ac_file" >&5
13060 echo "$as_me: creating $ac_file" >&6;}
13061
13062   # First look for the input files in the build tree, otherwise in the
13063   # src tree.
13064   ac_file_inputs=`IFS=:
13065     for f in $ac_file_in; do
13066       case $f in
13067       -) echo $tmp/stdin ;;
13068       [\\/$]*)
13069          # Absolute (can't be DOS-style, as IFS=:)
13070          test -f "$f" || { { echo "$as_me:13070: error: cannot find input file: $f" >&5
13071 echo "$as_me: error: cannot find input file: $f" >&2;}
13072    { (exit 1); exit 1; }; }
13073          echo $f;;
13074       *) # Relative
13075          if test -f "$f"; then
13076            # Build tree
13077            echo $f
13078          elif test -f "$srcdir/$f"; then
13079            # Source tree
13080            echo $srcdir/$f
13081          else
13082            # /dev/null tree
13083            { { echo "$as_me:13083: error: cannot find input file: $f" >&5
13084 echo "$as_me: error: cannot find input file: $f" >&2;}
13085    { (exit 1); exit 1; }; }
13086          fi;;
13087       esac
13088     done` || { (exit 1); exit 1; }
13089   # Remove the trailing spaces.
13090   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
13091
13092 EOF
13093
13094 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
13095 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
13096 # be either 'cat' or 'sort'.
13097 cat confdefs.h | uniq >conftest.vals
13098
13099 # Break up conftest.vals because some shells have a limit on
13100 # the size of here documents, and old seds have small limits too.
13101
13102 rm -f conftest.tail
13103 echo '  rm -f conftest.frag' >> $CONFIG_STATUS
13104 while grep . conftest.vals >/dev/null
13105 do
13106   # Write chunks of a limited-size here document to conftest.frag.
13107   echo '  cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
13108   sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
13109   echo 'CEOF' >> $CONFIG_STATUS
13110   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
13111   rm -f conftest.vals
13112   mv conftest.tail conftest.vals
13113 done
13114 rm -f conftest.vals
13115
13116 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
13117 # marker @DEFS@.
13118 echo '  cat >> conftest.edit <<CEOF
13119 /@DEFS@/r conftest.frag
13120 /@DEFS@/d
13121 CEOF
13122 sed -f conftest.edit $tmp/in > $tmp/out
13123 rm -f $tmp/in
13124 mv $tmp/out $tmp/in
13125 rm -f conftest.edit conftest.frag
13126 ' >> $CONFIG_STATUS
13127
13128 cat >>$CONFIG_STATUS <<\EOF
13129   # Let's still pretend it is `configure' which instantiates (i.e., don't
13130   # use $as_me), people would be surprised to read:
13131   #    /* config.h.  Generated automatically by config.status.  */
13132   if test x"$ac_file" = x-; then
13133     echo "/* Generated automatically by configure.  */" >$tmp/config.h
13134   else
13135     echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
13136   fi
13137   cat $tmp/in >>$tmp/config.h
13138   rm -f $tmp/in
13139   if test x"$ac_file" != x-; then
13140     if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
13141       { echo "$as_me:13141: $ac_file is unchanged" >&5
13142 echo "$as_me: $ac_file is unchanged" >&6;}
13143     else
13144       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
13145          X"$ac_file" : 'X\(//\)[^/]' \| \
13146          X"$ac_file" : 'X\(//\)$' \| \
13147          X"$ac_file" : 'X\(/\)' \| \
13148          .     : '\(.\)' 2>/dev/null ||
13149 echo X"$ac_file" |
13150     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
13151           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
13152           /^X\(\/\/\)$/{ s//\1/; q; }
13153           /^X\(\/\).*/{ s//\1/; q; }
13154           s/.*/./; q'`
13155       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
13156         { case "$ac_dir" in
13157   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
13158   *)                      as_incr_dir=.;;
13159 esac
13160 as_dummy="$ac_dir"
13161 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
13162   case $as_mkdir_dir in
13163     # Skip DOS drivespec
13164     ?:) as_incr_dir=$as_mkdir_dir ;;
13165     *)
13166       as_incr_dir=$as_incr_dir/$as_mkdir_dir
13167       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
13168     ;;
13169   esac
13170 done; }
13171
13172       fi
13173       rm -f $ac_file
13174       mv $tmp/config.h $ac_file
13175     fi
13176   else
13177     cat $tmp/config.h
13178     rm -f $tmp/config.h
13179   fi
13180 done
13181 EOF
13182 cat >>$CONFIG_STATUS <<\EOF
13183 #
13184 # CONFIG_COMMANDS section.
13185 #
13186 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
13187   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
13188   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
13189
13190   case $ac_dest in
13191     default )
13192 if test -z "$USE_OLD_MAKERULES" ; then
13193         $AWK -f $srcdir/mk-1st.awk <$srcdir/src/modules >>src/Makefile
13194 fi
13195  ;;
13196   esac
13197 done
13198 EOF
13199
13200 cat >>$CONFIG_STATUS <<\EOF
13201
13202 { (exit 0); exit 0; }
13203 EOF
13204 chmod +x $CONFIG_STATUS
13205 ac_clean_files=$ac_clean_files_save
13206
13207 # configure is writing to config.log, and then calls config.status.
13208 # config.status does its own redirection, appending to config.log.
13209 # Unfortunately, on DOS this fails, as config.log is still kept open
13210 # by configure, so config.status won't be able to write to it; its
13211 # output is simply discarded.  So we exec the FD to /dev/null,
13212 # effectively closing config.log, so it can be properly (re)opened and
13213 # appended to by config.status.  When coming back to configure, we
13214 # need to make the FD available again.
13215 if test "$no_create" != yes; then
13216   ac_cs_success=:
13217   exec 5>/dev/null
13218   $SHELL $CONFIG_STATUS || ac_cs_success=false
13219   exec 5>>config.log
13220   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
13221   # would make configure fail if this is the last instruction.
13222   $ac_cs_success || { (exit 1); exit 1; }
13223 fi
13224 ${MAKE:-make} preinstall