]> ncurses.scripts.mit.edu Git - ncurses.git/blob - test/configure
ncurses 6.0 - patch 20170225
[ncurses.git] / test / configure
1 #! /bin/sh
2 # Guess values for system-dependent variables and create Makefiles.
3 # Generated by Autoconf 2.52.20150926.
4 #
5 # Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
6 # Free Software Foundation, Inc.
7 # This configure script is free software; the Free Software Foundation
8 # gives unlimited permission to copy, distribute and modify it.
9
10 # Avoid depending upon Character Ranges.
11 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
12 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
13 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
14 as_cr_digits='0123456789'
15 as_cr_alnum=$as_cr_Letters$as_cr_digits
16
17 # Sed expression to map a string onto a valid variable name.
18 as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
19
20 # Sed expression to map a string onto a valid CPP name.
21 as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
22
23 # Be Bourne compatible
24 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
25   emulate sh
26   NULLCMD=:
27 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
28   set -o posix
29 fi
30
31 # Name of the executable.
32 as_me=`echo "$0" |sed 's,.*[\\/],,'`
33
34 if expr a : '\(a\)' >/dev/null 2>&1; then
35   as_expr=expr
36 else
37   as_expr=false
38 fi
39
40 rm -f conf$$ conf$$.exe conf$$.file
41 echo >conf$$.file
42 if ln -s conf$$.file conf$$ 2>/dev/null; then
43   # We could just check for DJGPP; but this test a) works b) is more generic
44   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
45   if test -f conf$$.exe; then
46     # Don't use ln at all; we don't have any links
47     as_ln_s='cp -p'
48   else
49     as_ln_s='ln -s'
50   fi
51 elif ln conf$$.file conf$$ 2>/dev/null; then
52   as_ln_s=ln
53 else
54   as_ln_s='cp -p'
55 fi
56 rm -f conf$$ conf$$.exe conf$$.file
57
58 as_executable_p="test -f"
59
60 # Support unset when possible.
61 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
62   as_unset=unset
63 else
64   as_unset=false
65 fi
66
67 # NLS nuisances.
68 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
69 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
70 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
71 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
72 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
73 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
74 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
75 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
76
77 # IFS
78 # We need space, tab and new line, in precisely that order.
79 as_nl='
80 '
81 IFS="   $as_nl"
82
83 # CDPATH.
84 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
85
86 # Name of the host.
87 # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
88 # so uname gets run too.
89 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
90
91 exec 6>&1
92
93 #
94 # Initializations.
95 #
96 ac_default_prefix=/usr/local
97 cross_compiling=no
98 subdirs=
99 MFLAGS= MAKEFLAGS=
100 SHELL=${CONFIG_SHELL-/bin/sh}
101
102 # Maximum number of lines to put in a shell here document.
103 # This variable seems obsolete.  It should probably be removed, and
104 # only ac_max_sed_lines should be used.
105 : ${ac_max_here_lines=38}
106
107 ac_unique_file="ncurses.c"
108
109 # Initialize some variables set by options.
110 ac_init_help=
111 ac_init_version=false
112 # The variables have the same names as the options, with
113 # dashes changed to underlines.
114 cache_file=/dev/null
115 exec_prefix=NONE
116 no_create=
117 no_recursion=
118 prefix=NONE
119 program_prefix=NONE
120 program_suffix=NONE
121 program_transform_name=s,x,x,
122 silent=
123 site=
124 srcdir=
125 verbose=
126 x_includes=NONE
127 x_libraries=NONE
128
129 # Installation directory options.
130 # These are left unexpanded so users can "make install exec_prefix=/foo"
131 # and all the variables that are supposed to be based on exec_prefix
132 # by default will actually change.
133 # Use braces instead of parens because sh, perl, etc. also accept them.
134 bindir='${exec_prefix}/bin'
135 sbindir='${exec_prefix}/sbin'
136 libexecdir='${exec_prefix}/libexec'
137 datarootdir='${prefix}/share'
138 datadir='${datarootdir}'
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='${datarootdir}/info'
146 mandir='${datarootdir}/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   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
198   | --dataroo | --dataro | --datar)
199     ac_prev=datarootdir ;;
200   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
201   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
202     datarootdir=$ac_optarg ;;
203
204   -disable-* | --disable-*)
205     ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
206     # Reject names that are not valid shell variable names.
207     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
208       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
209    { (exit 1); exit 1; }; }
210     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
211     eval "enable_$ac_feature=no" ;;
212
213   -enable-* | --enable-*)
214     ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
215     # Reject names that are not valid shell variable names.
216     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
217       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
218    { (exit 1); exit 1; }; }
219     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
220     case $ac_option in
221       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
222       *) ac_optarg=yes ;;
223     esac
224     eval "enable_$ac_feature='$ac_optarg'" ;;
225
226   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
227   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
228   | --exec | --exe | --ex)
229     ac_prev=exec_prefix ;;
230   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
231   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
232   | --exec=* | --exe=* | --ex=*)
233     exec_prefix=$ac_optarg ;;
234
235   -gas | --gas | --ga | --g)
236     # Obsolete; use --with-gas.
237     with_gas=yes ;;
238
239   -help | --help | --hel | --he | -h)
240     ac_init_help=long ;;
241   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
242     ac_init_help=recursive ;;
243   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
244     ac_init_help=short ;;
245
246   -host | --host | --hos | --ho)
247     ac_prev=host_alias ;;
248   -host=* | --host=* | --hos=* | --ho=*)
249     host_alias=$ac_optarg ;;
250
251   -includedir | --includedir | --includedi | --included | --include \
252   | --includ | --inclu | --incl | --inc)
253     ac_prev=includedir ;;
254   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
255   | --includ=* | --inclu=* | --incl=* | --inc=*)
256     includedir=$ac_optarg ;;
257
258   -infodir | --infodir | --infodi | --infod | --info | --inf)
259     ac_prev=infodir ;;
260   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
261     infodir=$ac_optarg ;;
262
263   -libdir | --libdir | --libdi | --libd)
264     ac_prev=libdir ;;
265   -libdir=* | --libdir=* | --libdi=* | --libd=*)
266     libdir=$ac_optarg ;;
267
268   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
269   | --libexe | --libex | --libe)
270     ac_prev=libexecdir ;;
271   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
272   | --libexe=* | --libex=* | --libe=*)
273     libexecdir=$ac_optarg ;;
274
275   -localstatedir | --localstatedir | --localstatedi | --localstated \
276   | --localstate | --localstat | --localsta | --localst \
277   | --locals | --local | --loca | --loc | --lo)
278     ac_prev=localstatedir ;;
279   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
280   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
281   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
282     localstatedir=$ac_optarg ;;
283
284   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
285     ac_prev=mandir ;;
286   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
287     mandir=$ac_optarg ;;
288
289   -nfp | --nfp | --nf)
290     # Obsolete; use --without-fp.
291     with_fp=no ;;
292
293   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
294   | --no-cr | --no-c)
295     no_create=yes ;;
296
297   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
298   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
299     no_recursion=yes ;;
300
301   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
302   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
303   | --oldin | --oldi | --old | --ol | --o)
304     ac_prev=oldincludedir ;;
305   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
306   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
307   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
308     oldincludedir=$ac_optarg ;;
309
310   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
311     ac_prev=prefix ;;
312   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
313     prefix=$ac_optarg ;;
314
315   -program-prefix | --program-prefix | --program-prefi | --program-pref \
316   | --program-pre | --program-pr | --program-p)
317     ac_prev=program_prefix ;;
318   -program-prefix=* | --program-prefix=* | --program-prefi=* \
319   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
320     program_prefix=$ac_optarg ;;
321
322   -program-suffix | --program-suffix | --program-suffi | --program-suff \
323   | --program-suf | --program-su | --program-s)
324     ac_prev=program_suffix ;;
325   -program-suffix=* | --program-suffix=* | --program-suffi=* \
326   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
327     program_suffix=$ac_optarg ;;
328
329   -program-transform-name | --program-transform-name \
330   | --program-transform-nam | --program-transform-na \
331   | --program-transform-n | --program-transform- \
332   | --program-transform | --program-transfor \
333   | --program-transfo | --program-transf \
334   | --program-trans | --program-tran \
335   | --progr-tra | --program-tr | --program-t)
336     ac_prev=program_transform_name ;;
337   -program-transform-name=* | --program-transform-name=* \
338   | --program-transform-nam=* | --program-transform-na=* \
339   | --program-transform-n=* | --program-transform-=* \
340   | --program-transform=* | --program-transfor=* \
341   | --program-transfo=* | --program-transf=* \
342   | --program-trans=* | --program-tran=* \
343   | --progr-tra=* | --program-tr=* | --program-t=*)
344     program_transform_name=$ac_optarg ;;
345
346   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
347   | -silent | --silent | --silen | --sile | --sil)
348     silent=yes ;;
349
350   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
351     ac_prev=sbindir ;;
352   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
353   | --sbi=* | --sb=*)
354     sbindir=$ac_optarg ;;
355
356   -sharedstatedir | --sharedstatedir | --sharedstatedi \
357   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
358   | --sharedst | --shareds | --shared | --share | --shar \
359   | --sha | --sh)
360     ac_prev=sharedstatedir ;;
361   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
362   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
363   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
364   | --sha=* | --sh=*)
365     sharedstatedir=$ac_optarg ;;
366
367   -site | --site | --sit)
368     ac_prev=site ;;
369   -site=* | --site=* | --sit=*)
370     site=$ac_optarg ;;
371
372   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
373     ac_prev=srcdir ;;
374   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
375     srcdir=$ac_optarg ;;
376
377   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
378   | --syscon | --sysco | --sysc | --sys | --sy)
379     ac_prev=sysconfdir ;;
380   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
381   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
382     sysconfdir=$ac_optarg ;;
383
384   -target | --target | --targe | --targ | --tar | --ta | --t)
385     ac_prev=target_alias ;;
386   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
387     target_alias=$ac_optarg ;;
388
389   -v | -verbose | --verbose | --verbos | --verbo | --verb)
390     verbose=yes ;;
391
392   -version | --version | --versio | --versi | --vers | -V)
393     ac_init_version=: ;;
394
395   -with-* | --with-*)
396     ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
397     # Reject names that are not valid shell variable names.
398     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
399       { echo "$as_me: error: invalid package name: $ac_package" >&2
400    { (exit 1); exit 1; }; }
401     ac_package=`echo $ac_package| sed 's/-/_/g'`
402     case $ac_option in
403       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
404       *) ac_optarg=yes ;;
405     esac
406     eval "with_$ac_package='$ac_optarg'" ;;
407
408   -without-* | --without-*)
409     ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
410     # Reject names that are not valid shell variable names.
411     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
412       { echo "$as_me: error: invalid package name: $ac_package" >&2
413    { (exit 1); exit 1; }; }
414     ac_package=`echo $ac_package | sed 's/-/_/g'`
415     eval "with_$ac_package=no" ;;
416
417   --x)
418     # Obsolete; use --with-x.
419     with_x=yes ;;
420
421   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
422   | --x-incl | --x-inc | --x-in | --x-i)
423     ac_prev=x_includes ;;
424   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
425   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
426     x_includes=$ac_optarg ;;
427
428   -x-libraries | --x-libraries | --x-librarie | --x-librari \
429   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
430     ac_prev=x_libraries ;;
431   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
432   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
433     x_libraries=$ac_optarg ;;
434
435   -*) { echo "$as_me: error: unrecognized option: $ac_option
436 Try \`$0 --help' for more information." >&2
437    { (exit 1); exit 1; }; }
438     ;;
439
440   *=*)
441     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
442     # Reject names that are not valid shell variable names.
443     expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
444       { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
445    { (exit 1); exit 1; }; }
446     ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
447     eval "$ac_envvar='$ac_optarg'"
448     export $ac_envvar ;;
449
450   *)
451     # FIXME: should be removed in autoconf 3.0.
452     echo "$as_me: WARNING: you should use --build, --host, --target" >&2
453     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
454       echo "$as_me: WARNING: invalid host type: $ac_option" >&2
455     : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
456     ;;
457
458   esac
459 done
460
461 if test -n "$ac_prev"; then
462   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
463   { echo "$as_me: error: missing argument to $ac_option" >&2
464    { (exit 1); exit 1; }; }
465 fi
466
467 # Be sure to have absolute paths.
468 for ac_var in exec_prefix prefix
469 do
470   eval ac_val=$`echo $ac_var`
471   case $ac_val in
472     [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
473     *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
474    { (exit 1); exit 1; }; };;
475   esac
476 done
477
478 # Be sure to have absolute paths.
479 for ac_var in bindir sbindir libexecdir datarootdir datadir sysconfdir sharedstatedir \
480               localstatedir libdir includedir oldincludedir infodir mandir
481 do
482   eval ac_val=$`echo $ac_var`
483   case $ac_val in
484     [\\/$]* | ?:[\\/]* ) ;;
485     *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
486    { (exit 1); exit 1; }; };;
487   esac
488 done
489
490 # There might be people who depend on the old broken behavior: `$host'
491 # used to hold the argument of --host etc.
492 build=$build_alias
493 host=$host_alias
494 target=$target_alias
495
496 # FIXME: should be removed in autoconf 3.0.
497 if test "x$host_alias" != x; then
498   if test "x$build_alias" = x; then
499     cross_compiling=maybe
500     echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
501     If a cross compiler is detected then cross compile mode will be used." >&2
502   elif test "x$build_alias" != "x$host_alias"; then
503     cross_compiling=yes
504   fi
505 fi
506
507 ac_tool_prefix=
508 test -n "$host_alias" && ac_tool_prefix=$host_alias-
509
510 test "$silent" = yes && exec 6>/dev/null
511
512 # Find the source files, if location was not specified.
513 if test -z "$srcdir"; then
514   ac_srcdir_defaulted=yes
515   # Try the directory containing this script, then its parent.
516   ac_prog=$0
517   ac_confdir=`echo "$ac_prog" | sed 's%[\\/][^\\/][^\\/]*$%%'`
518   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
519   srcdir=$ac_confdir
520   if test ! -r $srcdir/$ac_unique_file; then
521     srcdir=..
522   fi
523 else
524   ac_srcdir_defaulted=no
525 fi
526 if test ! -r $srcdir/$ac_unique_file; then
527   if test "$ac_srcdir_defaulted" = yes; then
528     { echo "$as_me: error: cannot find sources in $ac_confdir or .." >&2
529    { (exit 1); exit 1; }; }
530   else
531     { echo "$as_me: error: cannot find sources in $srcdir" >&2
532    { (exit 1); exit 1; }; }
533   fi
534 fi
535 srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
536 ac_env_build_alias_set=${build_alias+set}
537 ac_env_build_alias_value=$build_alias
538 ac_cv_env_build_alias_set=${build_alias+set}
539 ac_cv_env_build_alias_value=$build_alias
540 ac_env_host_alias_set=${host_alias+set}
541 ac_env_host_alias_value=$host_alias
542 ac_cv_env_host_alias_set=${host_alias+set}
543 ac_cv_env_host_alias_value=$host_alias
544 ac_env_target_alias_set=${target_alias+set}
545 ac_env_target_alias_value=$target_alias
546 ac_cv_env_target_alias_set=${target_alias+set}
547 ac_cv_env_target_alias_value=$target_alias
548 ac_env_CC_set=${CC+set}
549 ac_env_CC_value=$CC
550 ac_cv_env_CC_set=${CC+set}
551 ac_cv_env_CC_value=$CC
552 ac_env_CFLAGS_set=${CFLAGS+set}
553 ac_env_CFLAGS_value=$CFLAGS
554 ac_cv_env_CFLAGS_set=${CFLAGS+set}
555 ac_cv_env_CFLAGS_value=$CFLAGS
556 ac_env_LDFLAGS_set=${LDFLAGS+set}
557 ac_env_LDFLAGS_value=$LDFLAGS
558 ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
559 ac_cv_env_LDFLAGS_value=$LDFLAGS
560 ac_env_CPPFLAGS_set=${CPPFLAGS+set}
561 ac_env_CPPFLAGS_value=$CPPFLAGS
562 ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
563 ac_cv_env_CPPFLAGS_value=$CPPFLAGS
564 ac_env_CPP_set=${CPP+set}
565 ac_env_CPP_value=$CPP
566 ac_cv_env_CPP_set=${CPP+set}
567 ac_cv_env_CPP_value=$CPP
568
569 #
570 # Report the --help message.
571 #
572 if test "$ac_init_help" = "long"; then
573   # Omit some internal or obsolete options to make the list less imposing.
574   # This message is too long to be a string in the A/UX 3.1 sh.
575   cat <<EOF
576 \`configure' configures this package to adapt to many kinds of systems.
577
578 Usage: $0 [OPTION]... [VAR=VALUE]...
579
580 To assign environment variables (e.g., CC, CFLAGS...), specify them as
581 VAR=VALUE.  See below for descriptions of some of the useful variables.
582
583 Defaults for the options are specified in brackets.
584
585 Configuration:
586   -h, --help              display this help and exit
587       --help=short        display options specific to this package
588       --help=recursive    display the short help of all the included packages
589   -V, --version           display version information and exit
590   -q, --quiet, --silent   do not print \`checking...' messages
591       --cache-file=FILE   cache test results in FILE [disabled]
592   -C, --config-cache      alias for \`--cache-file=config.cache'
593   -n, --no-create         do not create output files
594       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
595
596 EOF
597
598   cat <<EOF
599 Installation directories:
600   --prefix=PREFIX         install architecture-independent files in PREFIX
601                           [$ac_default_prefix]
602   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
603                           [PREFIX]
604
605 By default, \`make install' will install all the files in
606 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
607 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
608 for instance \`--prefix=\$HOME'.
609
610 For better control, use the options below.
611
612 Fine tuning of the installation directories:
613   --bindir=DIR            user executables [EPREFIX/bin]
614   --sbindir=DIR           system admin executables [EPREFIX/sbin]
615   --libexecdir=DIR        program executables [EPREFIX/libexec]
616   --datarootdir=DIR       read-only architecture-independent data [PREFIX/share]
617   --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
618   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
619   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
620   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
621   --libdir=DIR            object code libraries [EPREFIX/lib]
622   --includedir=DIR        C header files [PREFIX/include]
623   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
624   --infodir=DIR           info documentation [DATAROOTDIR/info]
625   --mandir=DIR            man documentation [DATAROOTDIR/man]
626 EOF
627
628   cat <<\EOF
629
630 Program names:
631   --program-prefix=PREFIX            prepend PREFIX to installed program names
632   --program-suffix=SUFFIX            append SUFFIX to installed program names
633   --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
634
635 X features:
636   --x-includes=DIR    X include files are in DIR
637   --x-libraries=DIR   X library files are in DIR
638
639 System types:
640   --build=BUILD           configure for building on BUILD [guessed]
641   --host=HOST       build programs to run on HOST [BUILD]
642 EOF
643 fi
644
645 if test -n "$ac_init_help"; then
646
647   cat <<\EOF
648
649 Optional Features:
650   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
651   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
652
653 Optional Packages:
654   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
655   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
656
657   --enable-string-hacks   work around bogus compiler/loader warnings
658 General Options:
659   --with-pkg-config{=path} enable/disable use of pkg-config
660   --disable-echo          do not display "compiling" commands
661 Curses Version-dependent Options:
662   --with-ncurses-wrap-prefix naming-prefix for ncurses wrapped-variables
663   --disable-widec         disable checks for wide-character functions
664   --with-curses-dir=DIR   directory in which (n)curses is installed
665   --with-screen=XXX       use specified curses-libraries
666   --with-ncursesw         use wide ncurses-libraries
667   --with-ncurses          use ncurses-libraries
668   --with-pdcurses         compile/link with pdcurses X11 library
669   --with-curses-colr      compile/link with HPUX 10.x color-curses
670   --with-curses-5lib      compile/link with SunOS 5lib curses
671   --with-Xaw3d            link with Xaw 3d library
672   --with-Xaw3dxft         link with Xaw 3d xft library
673   --with-neXtaw           link with neXT Athena library
674   --with-XawPlus          link with Athena-Plus library
675   --with-x                use the X Window System
676 Testing/development Options:
677   --enable-warnings       test: turn on gcc compiler warnings
678   --with-dmalloc          test: use Gray Watson's dmalloc library
679   --with-dbmalloc         test: use Conor Cahill's dbmalloc library
680   --with-valgrind         test: use valgrind
681   --disable-leaks         test: free permanent memory, analyze leaks
682   --disable-rpath-hack    don't add rpath options for additional libraries
683
684 Some influential environment variables:
685   CC          C compiler command
686   CFLAGS      C compiler flags
687   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
688               nonstandard directory <lib dir>
689   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
690               headers in a nonstandard directory <include dir>
691   CPP         C preprocessor
692
693 Use these variables to override the choices made by `configure' or to help
694 it to find libraries and programs with nonstandard names/locations.
695
696 EOF
697 fi
698
699 if test "$ac_init_help" = "recursive"; then
700   # If there are subdirs, report their specific --help.
701   ac_popdir=`pwd`
702   for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
703     cd $ac_subdir
704     # A "../" for each directory in /$ac_subdir.
705     ac_dots=`echo $ac_subdir |
706              sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
707
708     case $srcdir in
709     .) # No --srcdir option.  We are building in place.
710       ac_sub_srcdir=$srcdir ;;
711     [\\/]* | ?:[\\/]* ) # Absolute path.
712       ac_sub_srcdir=$srcdir/$ac_subdir ;;
713     *) # Relative path.
714       ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;;
715     esac
716
717     # Check for guested configure; otherwise get Cygnus style configure.
718     if test -f $ac_sub_srcdir/configure.gnu; then
719       echo
720       $SHELL $ac_sub_srcdir/configure.gnu  --help=recursive
721     elif test -f $ac_sub_srcdir/configure; then
722       echo
723       $SHELL $ac_sub_srcdir/configure  --help=recursive
724     elif test -f $ac_sub_srcdir/configure.ac ||
725            test -f $ac_sub_srcdir/configure.in; then
726       echo
727       $ac_configure --help
728     else
729       echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
730     fi
731     cd $ac_popdir
732   done
733 fi
734
735 test -n "$ac_init_help" && exit 0
736 if $ac_init_version; then
737   cat <<\EOF
738
739 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
740 Free Software Foundation, Inc.
741 This configure script is free software; the Free Software Foundation
742 gives unlimited permission to copy, distribute and modify it.
743 EOF
744   exit 0
745 fi
746 exec 5>config.log
747 cat >&5 <<EOF
748 This file contains any messages produced by compilers while
749 running configure, to aid debugging if configure makes a mistake.
750
751 It was created by $as_me, which was
752 generated by GNU Autoconf 2.52.20150926.  Invocation command line was
753
754   $ $0 $@
755
756 EOF
757 {
758 cat <<_ASUNAME
759 ## ---------- ##
760 ## Platform.  ##
761 ## ---------- ##
762
763 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
764 uname -m = `(uname -m) 2>/dev/null || echo unknown`
765 uname -r = `(uname -r) 2>/dev/null || echo unknown`
766 uname -s = `(uname -s) 2>/dev/null || echo unknown`
767 uname -v = `(uname -v) 2>/dev/null || echo unknown`
768
769 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
770 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
771
772 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
773 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
774 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
775 hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
776 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
777 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
778 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
779
780 PATH = $PATH
781
782 _ASUNAME
783 } >&5
784
785 cat >&5 <<EOF
786 ## ------------ ##
787 ## Core tests.  ##
788 ## ------------ ##
789
790 EOF
791
792 # Keep a trace of the command line.
793 # Strip out --no-create and --no-recursion so they do not pile up.
794 # Also quote any args containing shell meta-characters.
795 ac_configure_args=
796 ac_sep=
797 for ac_arg
798 do
799   case $ac_arg in
800   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
801   | --no-cr | --no-c) ;;
802   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
803   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
804   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
805     ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
806     ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
807     ac_sep=" " ;;
808   *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
809      ac_sep=" " ;;
810   esac
811   # Get rid of the leading space.
812 done
813
814 # When interrupted or exit'd, cleanup temporary files, and complete
815 # config.log.  We remove comments because anyway the quotes in there
816 # would cause problems or look ugly.
817 trap 'exit_status=$?
818   # Save into config.log some information that might help in debugging.
819   echo >&5
820   echo "## ----------------- ##" >&5
821   echo "## Cache variables.  ##" >&5
822   echo "## ----------------- ##" >&5
823   echo >&5
824   # The following way of writing the cache mishandles newlines in values,
825 {
826   (set) 2>&1 |
827     case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
828     *ac_space=\ *)
829       sed -n \
830         "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
831           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
832       ;;
833     *)
834       sed -n \
835         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
836       ;;
837     esac;
838 } >&5
839   sed "/^$/d" confdefs.h >conftest.log
840   if test -s conftest.log; then
841     echo >&5
842     echo "## ------------ ##" >&5
843     echo "## confdefs.h.  ##" >&5
844     echo "## ------------ ##" >&5
845     echo >&5
846     cat conftest.log >&5
847   fi
848   (echo; echo) >&5
849   test "$ac_signal" != 0 &&
850     echo "$as_me: caught signal $ac_signal" >&5
851   echo "$as_me: exit $exit_status" >&5
852   rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
853     exit $exit_status
854      ' 0
855 for ac_signal in 1 2 13 15; do
856   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
857 done
858 ac_signal=0
859
860 # confdefs.h avoids OS command line length limits that DEFS can exceed.
861 rm -rf conftest* confdefs.h
862 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
863 echo >confdefs.h
864
865 # Let the site file select an alternate cache file if it wants to.
866 # Prefer explicitly selected file to automatically selected ones.
867 if test -z "$CONFIG_SITE"; then
868   if test "x$prefix" != xNONE; then
869     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
870   else
871     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
872   fi
873 fi
874 for ac_site_file in $CONFIG_SITE; do
875   if test -r "$ac_site_file"; then
876     { echo "$as_me:876: loading site script $ac_site_file" >&5
877 echo "$as_me: loading site script $ac_site_file" >&6;}
878     cat "$ac_site_file" >&5
879     . "$ac_site_file"
880   fi
881 done
882
883 if test -r "$cache_file"; then
884   # Some versions of bash will fail to source /dev/null (special
885   # files actually), so we avoid doing that.
886   if test -f "$cache_file"; then
887     { echo "$as_me:887: loading cache $cache_file" >&5
888 echo "$as_me: loading cache $cache_file" >&6;}
889     case $cache_file in
890       [\\/]* | ?:[\\/]* ) . $cache_file;;
891       *)                      . ./$cache_file;;
892     esac
893   fi
894 else
895   { echo "$as_me:895: creating cache $cache_file" >&5
896 echo "$as_me: creating cache $cache_file" >&6;}
897   >$cache_file
898 fi
899
900 # Check that the precious variables saved in the cache have kept the same
901 # value.
902 ac_cache_corrupted=false
903 for ac_var in `(set) 2>&1 |
904                sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
905   eval ac_old_set=\$ac_cv_env_${ac_var}_set
906   eval ac_new_set=\$ac_env_${ac_var}_set
907   eval ac_old_val="\$ac_cv_env_${ac_var}_value"
908   eval ac_new_val="\$ac_env_${ac_var}_value"
909   case $ac_old_set,$ac_new_set in
910     set,)
911       { echo "$as_me:911: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
912 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
913       ac_cache_corrupted=: ;;
914     ,set)
915       { echo "$as_me:915: error: \`$ac_var' was not set in the previous run" >&5
916 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
917       ac_cache_corrupted=: ;;
918     ,);;
919     *)
920       if test "x$ac_old_val" != "x$ac_new_val"; then
921         { echo "$as_me:921: error: \`$ac_var' has changed since the previous run:" >&5
922 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
923         { echo "$as_me:923:   former value:  $ac_old_val" >&5
924 echo "$as_me:   former value:  $ac_old_val" >&2;}
925         { echo "$as_me:925:   current value: $ac_new_val" >&5
926 echo "$as_me:   current value: $ac_new_val" >&2;}
927         ac_cache_corrupted=:
928       fi;;
929   esac
930   # Pass precious variables to config.status.  It doesn't matter if
931   # we pass some twice (in addition to the command line arguments).
932   if test "$ac_new_set" = set; then
933     case $ac_new_val in
934     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
935       ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
936       ac_configure_args="$ac_configure_args '$ac_arg'"
937       ;;
938     *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
939        ;;
940     esac
941   fi
942 done
943 if $ac_cache_corrupted; then
944   { echo "$as_me:944: error: changes in the environment can compromise the build" >&5
945 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
946   { { echo "$as_me:946: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
947 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
948    { (exit 1); exit 1; }; }
949 fi
950
951 ac_ext=c
952 ac_cpp='$CPP $CPPFLAGS'
953 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
954 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
955 ac_compiler_gnu=$ac_cv_c_compiler_gnu
956 ac_main_return=return
957
958 case `echo "testing\c" 2>/dev/null; echo 1,2,3`,`echo -n testing 2>/dev/null; echo 1,2,3` in
959   *c*,-n*) ECHO_N= ECHO_C=      # newlines do not sed ;-) only broken shells would use this case anyway
960                    ECHO_T='     ' ;;
961   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
962   *)      ECHO_N= ECHO_C='\c' ECHO_T= ;;
963 esac
964 echo "#! $SHELL" >conftest.sh
965 echo  "exit 0"   >>conftest.sh
966 chmod +x conftest.sh
967 if { (echo "$as_me:967: PATH=\".;.\"; conftest.sh") >&5
968   (PATH=".;."; conftest.sh) 2>&5
969   ac_status=$?
970   echo "$as_me:970: \$? = $ac_status" >&5
971   (exit $ac_status); }; then
972   ac_path_separator=';'
973 else
974   ac_path_separator=:
975 fi
976 PATH_SEPARATOR="$ac_path_separator"
977 rm -f conftest.sh
978
979 ac_config_headers="$ac_config_headers ncurses_cfg.h:ncurses_tst.hin"
980
981 test -f config.guess || ( test -f ../config.guess && cp ../config.guess ./ )
982
983 test -f config.sub || ( test -f ../config.sub && cp ../config.sub ./ )
984
985 ac_aux_dir=
986 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
987   if test -f $ac_dir/install-sh; then
988     ac_aux_dir=$ac_dir
989     ac_install_sh="$ac_aux_dir/install-sh -c"
990     break
991   elif test -f $ac_dir/install.sh; then
992     ac_aux_dir=$ac_dir
993     ac_install_sh="$ac_aux_dir/install.sh -c"
994     break
995   elif test -f $ac_dir/shtool; then
996     ac_aux_dir=$ac_dir
997     ac_install_sh="$ac_aux_dir/shtool install -c"
998     break
999   fi
1000 done
1001 if test -z "$ac_aux_dir"; then
1002   { { echo "$as_me:1002: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1003 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1004    { (exit 1); exit 1; }; }
1005 fi
1006 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1007 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1008 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1009
1010 # Make sure we can run config.sub.
1011 $ac_config_sub sun4 >/dev/null 2>&1 ||
1012   { { echo "$as_me:1012: error: cannot run $ac_config_sub" >&5
1013 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1014    { (exit 1); exit 1; }; }
1015
1016 echo "$as_me:1016: checking build system type" >&5
1017 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1018 if test "${ac_cv_build+set}" = set; then
1019   echo $ECHO_N "(cached) $ECHO_C" >&6
1020 else
1021   ac_cv_build_alias=$build_alias
1022 test -z "$ac_cv_build_alias" &&
1023   ac_cv_build_alias=`$ac_config_guess`
1024 test -z "$ac_cv_build_alias" &&
1025   { { echo "$as_me:1025: error: cannot guess build type; you must specify one" >&5
1026 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1027    { (exit 1); exit 1; }; }
1028 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1029   { { echo "$as_me:1029: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1030 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1031    { (exit 1); exit 1; }; }
1032
1033 fi
1034 echo "$as_me:1034: result: $ac_cv_build" >&5
1035 echo "${ECHO_T}$ac_cv_build" >&6
1036 build=$ac_cv_build
1037 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1038 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1039 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1040
1041 if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then
1042         echo "$as_me:1042: checking host system type" >&5
1043 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1044 if test "${ac_cv_host+set}" = set; then
1045   echo $ECHO_N "(cached) $ECHO_C" >&6
1046 else
1047   ac_cv_host_alias=$host_alias
1048 test -z "$ac_cv_host_alias" &&
1049   ac_cv_host_alias=$ac_cv_build_alias
1050 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1051   { { echo "$as_me:1051: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1052 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1053    { (exit 1); exit 1; }; }
1054
1055 fi
1056 echo "$as_me:1056: result: $ac_cv_host" >&5
1057 echo "${ECHO_T}$ac_cv_host" >&6
1058 host=$ac_cv_host
1059 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1060 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1061 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1062
1063         system_name="$host_os"
1064 else
1065         system_name="`(uname -s -r) 2>/dev/null`"
1066         if test -z "$system_name" ; then
1067                 system_name="`(hostname) 2>/dev/null`"
1068         fi
1069 fi
1070 test -n "$system_name" &&
1071 cat >>confdefs.h <<EOF
1072 #define SYSTEM_NAME "$system_name"
1073 EOF
1074
1075 if test "${cf_cv_system_name+set}" = set; then
1076   echo $ECHO_N "(cached) $ECHO_C" >&6
1077 else
1078   cf_cv_system_name="$system_name"
1079 fi
1080
1081 test -z "$system_name" && system_name="$cf_cv_system_name"
1082 test -n "$cf_cv_system_name" && echo "$as_me:1082: result: Configuring for $cf_cv_system_name" >&5
1083 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1084
1085 if test ".$system_name" != ".$cf_cv_system_name" ; then
1086         echo "$as_me:1086: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1087 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1088         { { echo "$as_me:1088: error: \"Please remove config.cache and try again.\"" >&5
1089 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1090    { (exit 1); exit 1; }; }
1091 fi
1092
1093 test "$program_prefix" != NONE &&
1094   program_transform_name="s,^,$program_prefix,;$program_transform_name"
1095 # Use a double $ so make ignores it.
1096 test "$program_suffix" != NONE &&
1097   program_transform_name="s,\$,$program_suffix,;$program_transform_name"
1098 # Double any \ or $.  echo might interpret backslashes.
1099 # By default was `s,x,x', remove it if useless.
1100 cat <<\_ACEOF >conftest.sed
1101 s/[\\$]/&&/g;s/;s,x,x,$//
1102 _ACEOF
1103 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
1104 rm conftest.sed
1105
1106 echo "$as_me:1106: checking whether ${MAKE-make} sets \${MAKE}" >&5
1107 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
1108 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
1109 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
1110   echo $ECHO_N "(cached) $ECHO_C" >&6
1111 else
1112   cat >conftest.make <<\EOF
1113 all:
1114         @echo 'ac_maketemp="${MAKE}"'
1115 EOF
1116 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1117 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
1118 if test -n "$ac_maketemp"; then
1119   eval ac_cv_prog_make_${ac_make}_set=yes
1120 else
1121   eval ac_cv_prog_make_${ac_make}_set=no
1122 fi
1123 rm -f conftest.make
1124 fi
1125 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1126   echo "$as_me:1126: result: yes" >&5
1127 echo "${ECHO_T}yes" >&6
1128   SET_MAKE=
1129 else
1130   echo "$as_me:1130: result: no" >&5
1131 echo "${ECHO_T}no" >&6
1132   SET_MAKE="MAKE=${MAKE-make}"
1133 fi
1134
1135 ac_ext=c
1136 ac_cpp='$CPP $CPPFLAGS'
1137 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1138 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1139 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1140 ac_main_return=return
1141 if test -n "$ac_tool_prefix"; then
1142   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1143 set dummy ${ac_tool_prefix}gcc; ac_word=$2
1144 echo "$as_me:1144: checking for $ac_word" >&5
1145 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1146 if test "${ac_cv_prog_CC+set}" = set; then
1147   echo $ECHO_N "(cached) $ECHO_C" >&6
1148 else
1149   if test -n "$CC"; then
1150   ac_cv_prog_CC="$CC" # Let the user override the test.
1151 else
1152   ac_save_IFS=$IFS; IFS=$ac_path_separator
1153 ac_dummy="$PATH"
1154 for ac_dir in $ac_dummy; do
1155   IFS=$ac_save_IFS
1156   test -z "$ac_dir" && ac_dir=.
1157   $as_executable_p "$ac_dir/$ac_word" || continue
1158 ac_cv_prog_CC="${ac_tool_prefix}gcc"
1159 echo "$as_me:1159: found $ac_dir/$ac_word" >&5
1160 break
1161 done
1162
1163 fi
1164 fi
1165 CC=$ac_cv_prog_CC
1166 if test -n "$CC"; then
1167   echo "$as_me:1167: result: $CC" >&5
1168 echo "${ECHO_T}$CC" >&6
1169 else
1170   echo "$as_me:1170: result: no" >&5
1171 echo "${ECHO_T}no" >&6
1172 fi
1173
1174 fi
1175 if test -z "$ac_cv_prog_CC"; then
1176   ac_ct_CC=$CC
1177   # Extract the first word of "gcc", so it can be a program name with args.
1178 set dummy gcc; ac_word=$2
1179 echo "$as_me:1179: checking for $ac_word" >&5
1180 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1181 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1182   echo $ECHO_N "(cached) $ECHO_C" >&6
1183 else
1184   if test -n "$ac_ct_CC"; then
1185   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1186 else
1187   ac_save_IFS=$IFS; IFS=$ac_path_separator
1188 ac_dummy="$PATH"
1189 for ac_dir in $ac_dummy; do
1190   IFS=$ac_save_IFS
1191   test -z "$ac_dir" && ac_dir=.
1192   $as_executable_p "$ac_dir/$ac_word" || continue
1193 ac_cv_prog_ac_ct_CC="gcc"
1194 echo "$as_me:1194: found $ac_dir/$ac_word" >&5
1195 break
1196 done
1197
1198 fi
1199 fi
1200 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1201 if test -n "$ac_ct_CC"; then
1202   echo "$as_me:1202: result: $ac_ct_CC" >&5
1203 echo "${ECHO_T}$ac_ct_CC" >&6
1204 else
1205   echo "$as_me:1205: result: no" >&5
1206 echo "${ECHO_T}no" >&6
1207 fi
1208
1209   CC=$ac_ct_CC
1210 else
1211   CC="$ac_cv_prog_CC"
1212 fi
1213
1214 if test -z "$CC"; then
1215   if test -n "$ac_tool_prefix"; then
1216   # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1217 set dummy ${ac_tool_prefix}cc; ac_word=$2
1218 echo "$as_me:1218: checking for $ac_word" >&5
1219 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1220 if test "${ac_cv_prog_CC+set}" = set; then
1221   echo $ECHO_N "(cached) $ECHO_C" >&6
1222 else
1223   if test -n "$CC"; then
1224   ac_cv_prog_CC="$CC" # Let the user override the test.
1225 else
1226   ac_save_IFS=$IFS; IFS=$ac_path_separator
1227 ac_dummy="$PATH"
1228 for ac_dir in $ac_dummy; do
1229   IFS=$ac_save_IFS
1230   test -z "$ac_dir" && ac_dir=.
1231   $as_executable_p "$ac_dir/$ac_word" || continue
1232 ac_cv_prog_CC="${ac_tool_prefix}cc"
1233 echo "$as_me:1233: found $ac_dir/$ac_word" >&5
1234 break
1235 done
1236
1237 fi
1238 fi
1239 CC=$ac_cv_prog_CC
1240 if test -n "$CC"; then
1241   echo "$as_me:1241: result: $CC" >&5
1242 echo "${ECHO_T}$CC" >&6
1243 else
1244   echo "$as_me:1244: result: no" >&5
1245 echo "${ECHO_T}no" >&6
1246 fi
1247
1248 fi
1249 if test -z "$ac_cv_prog_CC"; then
1250   ac_ct_CC=$CC
1251   # Extract the first word of "cc", so it can be a program name with args.
1252 set dummy cc; ac_word=$2
1253 echo "$as_me:1253: checking for $ac_word" >&5
1254 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1255 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1256   echo $ECHO_N "(cached) $ECHO_C" >&6
1257 else
1258   if test -n "$ac_ct_CC"; then
1259   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1260 else
1261   ac_save_IFS=$IFS; IFS=$ac_path_separator
1262 ac_dummy="$PATH"
1263 for ac_dir in $ac_dummy; do
1264   IFS=$ac_save_IFS
1265   test -z "$ac_dir" && ac_dir=.
1266   $as_executable_p "$ac_dir/$ac_word" || continue
1267 ac_cv_prog_ac_ct_CC="cc"
1268 echo "$as_me:1268: found $ac_dir/$ac_word" >&5
1269 break
1270 done
1271
1272 fi
1273 fi
1274 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1275 if test -n "$ac_ct_CC"; then
1276   echo "$as_me:1276: result: $ac_ct_CC" >&5
1277 echo "${ECHO_T}$ac_ct_CC" >&6
1278 else
1279   echo "$as_me:1279: result: no" >&5
1280 echo "${ECHO_T}no" >&6
1281 fi
1282
1283   CC=$ac_ct_CC
1284 else
1285   CC="$ac_cv_prog_CC"
1286 fi
1287
1288 fi
1289 if test -z "$CC"; then
1290   # Extract the first word of "cc", so it can be a program name with args.
1291 set dummy cc; ac_word=$2
1292 echo "$as_me:1292: checking for $ac_word" >&5
1293 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1294 if test "${ac_cv_prog_CC+set}" = set; then
1295   echo $ECHO_N "(cached) $ECHO_C" >&6
1296 else
1297   if test -n "$CC"; then
1298   ac_cv_prog_CC="$CC" # Let the user override the test.
1299 else
1300   ac_prog_rejected=no
1301   ac_save_IFS=$IFS; IFS=$ac_path_separator
1302 ac_dummy="$PATH"
1303 for ac_dir in $ac_dummy; do
1304   IFS=$ac_save_IFS
1305   test -z "$ac_dir" && ac_dir=.
1306   $as_executable_p "$ac_dir/$ac_word" || continue
1307 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1308   ac_prog_rejected=yes
1309   continue
1310 fi
1311 ac_cv_prog_CC="cc"
1312 echo "$as_me:1312: found $ac_dir/$ac_word" >&5
1313 break
1314 done
1315
1316 if test $ac_prog_rejected = yes; then
1317   # We found a bogon in the path, so make sure we never use it.
1318   set dummy $ac_cv_prog_CC
1319   shift
1320   if test $# != 0; then
1321     # We chose a different compiler from the bogus one.
1322     # However, it has the same basename, so the bogon will be chosen
1323     # first if we set CC to just the basename; use the full file name.
1324     shift
1325     set dummy "$ac_dir/$ac_word" ${1+"$@"}
1326     shift
1327     ac_cv_prog_CC="$@"
1328   fi
1329 fi
1330 fi
1331 fi
1332 CC=$ac_cv_prog_CC
1333 if test -n "$CC"; then
1334   echo "$as_me:1334: result: $CC" >&5
1335 echo "${ECHO_T}$CC" >&6
1336 else
1337   echo "$as_me:1337: result: no" >&5
1338 echo "${ECHO_T}no" >&6
1339 fi
1340
1341 fi
1342 if test -z "$CC"; then
1343   if test -n "$ac_tool_prefix"; then
1344   for ac_prog in cl
1345   do
1346     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1347 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1348 echo "$as_me:1348: checking for $ac_word" >&5
1349 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1350 if test "${ac_cv_prog_CC+set}" = set; then
1351   echo $ECHO_N "(cached) $ECHO_C" >&6
1352 else
1353   if test -n "$CC"; then
1354   ac_cv_prog_CC="$CC" # Let the user override the test.
1355 else
1356   ac_save_IFS=$IFS; IFS=$ac_path_separator
1357 ac_dummy="$PATH"
1358 for ac_dir in $ac_dummy; do
1359   IFS=$ac_save_IFS
1360   test -z "$ac_dir" && ac_dir=.
1361   $as_executable_p "$ac_dir/$ac_word" || continue
1362 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1363 echo "$as_me:1363: found $ac_dir/$ac_word" >&5
1364 break
1365 done
1366
1367 fi
1368 fi
1369 CC=$ac_cv_prog_CC
1370 if test -n "$CC"; then
1371   echo "$as_me:1371: result: $CC" >&5
1372 echo "${ECHO_T}$CC" >&6
1373 else
1374   echo "$as_me:1374: result: no" >&5
1375 echo "${ECHO_T}no" >&6
1376 fi
1377
1378     test -n "$CC" && break
1379   done
1380 fi
1381 if test -z "$CC"; then
1382   ac_ct_CC=$CC
1383   for ac_prog in cl
1384 do
1385   # Extract the first word of "$ac_prog", so it can be a program name with args.
1386 set dummy $ac_prog; ac_word=$2
1387 echo "$as_me:1387: checking for $ac_word" >&5
1388 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1389 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1390   echo $ECHO_N "(cached) $ECHO_C" >&6
1391 else
1392   if test -n "$ac_ct_CC"; then
1393   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1394 else
1395   ac_save_IFS=$IFS; IFS=$ac_path_separator
1396 ac_dummy="$PATH"
1397 for ac_dir in $ac_dummy; do
1398   IFS=$ac_save_IFS
1399   test -z "$ac_dir" && ac_dir=.
1400   $as_executable_p "$ac_dir/$ac_word" || continue
1401 ac_cv_prog_ac_ct_CC="$ac_prog"
1402 echo "$as_me:1402: found $ac_dir/$ac_word" >&5
1403 break
1404 done
1405
1406 fi
1407 fi
1408 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1409 if test -n "$ac_ct_CC"; then
1410   echo "$as_me:1410: result: $ac_ct_CC" >&5
1411 echo "${ECHO_T}$ac_ct_CC" >&6
1412 else
1413   echo "$as_me:1413: result: no" >&5
1414 echo "${ECHO_T}no" >&6
1415 fi
1416
1417   test -n "$ac_ct_CC" && break
1418 done
1419
1420   CC=$ac_ct_CC
1421 fi
1422
1423 fi
1424
1425 test -z "$CC" && { { echo "$as_me:1425: error: no acceptable cc found in \$PATH" >&5
1426 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1427    { (exit 1); exit 1; }; }
1428
1429 # Provide some information about the compiler.
1430 echo "$as_me:1430:" \
1431      "checking for C compiler version" >&5
1432 ac_compiler=`set X $ac_compile; echo $2`
1433 { (eval echo "$as_me:1433: \"$ac_compiler --version </dev/null >&5\"") >&5
1434   (eval $ac_compiler --version </dev/null >&5) 2>&5
1435   ac_status=$?
1436   echo "$as_me:1436: \$? = $ac_status" >&5
1437   (exit $ac_status); }
1438 { (eval echo "$as_me:1438: \"$ac_compiler -v </dev/null >&5\"") >&5
1439   (eval $ac_compiler -v </dev/null >&5) 2>&5
1440   ac_status=$?
1441   echo "$as_me:1441: \$? = $ac_status" >&5
1442   (exit $ac_status); }
1443 { (eval echo "$as_me:1443: \"$ac_compiler -V </dev/null >&5\"") >&5
1444   (eval $ac_compiler -V </dev/null >&5) 2>&5
1445   ac_status=$?
1446   echo "$as_me:1446: \$? = $ac_status" >&5
1447   (exit $ac_status); }
1448
1449 cat >conftest.$ac_ext <<_ACEOF
1450 #line 1450 "configure"
1451 #include "confdefs.h"
1452
1453 int
1454 main ()
1455 {
1456
1457   ;
1458   return 0;
1459 }
1460 _ACEOF
1461 ac_clean_files_save=$ac_clean_files
1462 ac_clean_files="$ac_clean_files a.out a.exe"
1463 # Try to create an executable without -o first, disregard a.out.
1464 # It will help us diagnose broken compilers, and finding out an intuition
1465 # of exeext.
1466 echo "$as_me:1466: checking for C compiler default output" >&5
1467 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1468 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1469 if { (eval echo "$as_me:1469: \"$ac_link_default\"") >&5
1470   (eval $ac_link_default) 2>&5
1471   ac_status=$?
1472   echo "$as_me:1472: \$? = $ac_status" >&5
1473   (exit $ac_status); }; then
1474   # Find the output, starting from the most likely.  This scheme is
1475 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1476 # resort.
1477 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1478                 ls a.out conftest 2>/dev/null;
1479                 ls a.* conftest.* 2>/dev/null`; do
1480   case $ac_file in
1481     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1482     a.out ) # We found the default executable, but exeext='' is most
1483             # certainly right.
1484             break;;
1485     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1486           # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1487           export ac_cv_exeext
1488           break;;
1489     * ) break;;
1490   esac
1491 done
1492 else
1493   echo "$as_me: failed program was:" >&5
1494 cat conftest.$ac_ext >&5
1495 { { echo "$as_me:1495: error: C compiler cannot create executables" >&5
1496 echo "$as_me: error: C compiler cannot create executables" >&2;}
1497    { (exit 77); exit 77; }; }
1498 fi
1499
1500 ac_exeext=$ac_cv_exeext
1501 echo "$as_me:1501: result: $ac_file" >&5
1502 echo "${ECHO_T}$ac_file" >&6
1503
1504 # Check the compiler produces executables we can run.  If not, either
1505 # the compiler is broken, or we cross compile.
1506 echo "$as_me:1506: checking whether the C compiler works" >&5
1507 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1508 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1509 # If not cross compiling, check that we can run a simple program.
1510 if test "$cross_compiling" != yes; then
1511   if { ac_try='./$ac_file'
1512   { (eval echo "$as_me:1512: \"$ac_try\"") >&5
1513   (eval $ac_try) 2>&5
1514   ac_status=$?
1515   echo "$as_me:1515: \$? = $ac_status" >&5
1516   (exit $ac_status); }; }; then
1517     cross_compiling=no
1518   else
1519     if test "$cross_compiling" = maybe; then
1520         cross_compiling=yes
1521     else
1522         { { echo "$as_me:1522: error: cannot run C compiled programs.
1523 If you meant to cross compile, use \`--host'." >&5
1524 echo "$as_me: error: cannot run C compiled programs.
1525 If you meant to cross compile, use \`--host'." >&2;}
1526    { (exit 1); exit 1; }; }
1527     fi
1528   fi
1529 fi
1530 echo "$as_me:1530: result: yes" >&5
1531 echo "${ECHO_T}yes" >&6
1532
1533 rm -f a.out a.exe conftest$ac_cv_exeext
1534 ac_clean_files=$ac_clean_files_save
1535 # Check the compiler produces executables we can run.  If not, either
1536 # the compiler is broken, or we cross compile.
1537 echo "$as_me:1537: checking whether we are cross compiling" >&5
1538 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1539 echo "$as_me:1539: result: $cross_compiling" >&5
1540 echo "${ECHO_T}$cross_compiling" >&6
1541
1542 echo "$as_me:1542: checking for executable suffix" >&5
1543 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1544 if { (eval echo "$as_me:1544: \"$ac_link\"") >&5
1545   (eval $ac_link) 2>&5
1546   ac_status=$?
1547   echo "$as_me:1547: \$? = $ac_status" >&5
1548   (exit $ac_status); }; then
1549   # If both `conftest.exe' and `conftest' are `present' (well, observable)
1550 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
1551 # work properly (i.e., refer to `conftest.exe'), while it won't with
1552 # `rm'.
1553 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1554   case $ac_file in
1555     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1556     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1557           export ac_cv_exeext
1558           break;;
1559     * ) break;;
1560   esac
1561 done
1562 else
1563   { { echo "$as_me:1563: error: cannot compute EXEEXT: cannot compile and link" >&5
1564 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1565    { (exit 1); exit 1; }; }
1566 fi
1567
1568 rm -f conftest$ac_cv_exeext
1569 echo "$as_me:1569: result: $ac_cv_exeext" >&5
1570 echo "${ECHO_T}$ac_cv_exeext" >&6
1571
1572 rm -f conftest.$ac_ext
1573 EXEEXT=$ac_cv_exeext
1574 ac_exeext=$EXEEXT
1575 echo "$as_me:1575: checking for object suffix" >&5
1576 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1577 if test "${ac_cv_objext+set}" = set; then
1578   echo $ECHO_N "(cached) $ECHO_C" >&6
1579 else
1580   cat >conftest.$ac_ext <<_ACEOF
1581 #line 1581 "configure"
1582 #include "confdefs.h"
1583
1584 int
1585 main ()
1586 {
1587
1588   ;
1589   return 0;
1590 }
1591 _ACEOF
1592 rm -f conftest.o conftest.obj
1593 if { (eval echo "$as_me:1593: \"$ac_compile\"") >&5
1594   (eval $ac_compile) 2>&5
1595   ac_status=$?
1596   echo "$as_me:1596: \$? = $ac_status" >&5
1597   (exit $ac_status); }; then
1598   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1599   case $ac_file in
1600     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
1601     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1602        break;;
1603   esac
1604 done
1605 else
1606   echo "$as_me: failed program was:" >&5
1607 cat conftest.$ac_ext >&5
1608 { { echo "$as_me:1608: error: cannot compute OBJEXT: cannot compile" >&5
1609 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1610    { (exit 1); exit 1; }; }
1611 fi
1612
1613 rm -f conftest.$ac_cv_objext conftest.$ac_ext
1614 fi
1615 echo "$as_me:1615: result: $ac_cv_objext" >&5
1616 echo "${ECHO_T}$ac_cv_objext" >&6
1617 OBJEXT=$ac_cv_objext
1618 ac_objext=$OBJEXT
1619 echo "$as_me:1619: checking whether we are using the GNU C compiler" >&5
1620 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1621 if test "${ac_cv_c_compiler_gnu+set}" = set; then
1622   echo $ECHO_N "(cached) $ECHO_C" >&6
1623 else
1624   cat >conftest.$ac_ext <<_ACEOF
1625 #line 1625 "configure"
1626 #include "confdefs.h"
1627
1628 int
1629 main ()
1630 {
1631 #ifndef __GNUC__
1632        choke me
1633 #endif
1634
1635   ;
1636   return 0;
1637 }
1638 _ACEOF
1639 rm -f conftest.$ac_objext
1640 if { (eval echo "$as_me:1640: \"$ac_compile\"") >&5
1641   (eval $ac_compile) 2>&5
1642   ac_status=$?
1643   echo "$as_me:1643: \$? = $ac_status" >&5
1644   (exit $ac_status); } &&
1645          { ac_try='test -s conftest.$ac_objext'
1646   { (eval echo "$as_me:1646: \"$ac_try\"") >&5
1647   (eval $ac_try) 2>&5
1648   ac_status=$?
1649   echo "$as_me:1649: \$? = $ac_status" >&5
1650   (exit $ac_status); }; }; then
1651   ac_compiler_gnu=yes
1652 else
1653   echo "$as_me: failed program was:" >&5
1654 cat conftest.$ac_ext >&5
1655 ac_compiler_gnu=no
1656 fi
1657 rm -f conftest.$ac_objext conftest.$ac_ext
1658 ac_cv_c_compiler_gnu=$ac_compiler_gnu
1659
1660 fi
1661 echo "$as_me:1661: result: $ac_cv_c_compiler_gnu" >&5
1662 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1663 GCC=`test $ac_compiler_gnu = yes && echo yes`
1664 ac_test_CFLAGS=${CFLAGS+set}
1665 ac_save_CFLAGS=$CFLAGS
1666 CFLAGS="-g"
1667 echo "$as_me:1667: checking whether $CC accepts -g" >&5
1668 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1669 if test "${ac_cv_prog_cc_g+set}" = set; then
1670   echo $ECHO_N "(cached) $ECHO_C" >&6
1671 else
1672   cat >conftest.$ac_ext <<_ACEOF
1673 #line 1673 "configure"
1674 #include "confdefs.h"
1675
1676 int
1677 main ()
1678 {
1679
1680   ;
1681   return 0;
1682 }
1683 _ACEOF
1684 rm -f conftest.$ac_objext
1685 if { (eval echo "$as_me:1685: \"$ac_compile\"") >&5
1686   (eval $ac_compile) 2>&5
1687   ac_status=$?
1688   echo "$as_me:1688: \$? = $ac_status" >&5
1689   (exit $ac_status); } &&
1690          { ac_try='test -s conftest.$ac_objext'
1691   { (eval echo "$as_me:1691: \"$ac_try\"") >&5
1692   (eval $ac_try) 2>&5
1693   ac_status=$?
1694   echo "$as_me:1694: \$? = $ac_status" >&5
1695   (exit $ac_status); }; }; then
1696   ac_cv_prog_cc_g=yes
1697 else
1698   echo "$as_me: failed program was:" >&5
1699 cat conftest.$ac_ext >&5
1700 ac_cv_prog_cc_g=no
1701 fi
1702 rm -f conftest.$ac_objext conftest.$ac_ext
1703 fi
1704 echo "$as_me:1704: result: $ac_cv_prog_cc_g" >&5
1705 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1706 if test "$ac_test_CFLAGS" = set; then
1707   CFLAGS=$ac_save_CFLAGS
1708 elif test $ac_cv_prog_cc_g = yes; then
1709   if test "$GCC" = yes; then
1710     CFLAGS="-g -O2"
1711   else
1712     CFLAGS="-g"
1713   fi
1714 else
1715   if test "$GCC" = yes; then
1716     CFLAGS="-O2"
1717   else
1718     CFLAGS=
1719   fi
1720 fi
1721 # Some people use a C++ compiler to compile C.  Since we use `exit',
1722 # in C++ we need to declare it.  In case someone uses the same compiler
1723 # for both compiling C and C++ we need to have the C++ compiler decide
1724 # the declaration of exit, since it's the most demanding environment.
1725 cat >conftest.$ac_ext <<_ACEOF
1726 #ifndef __cplusplus
1727   choke me
1728 #endif
1729 _ACEOF
1730 rm -f conftest.$ac_objext
1731 if { (eval echo "$as_me:1731: \"$ac_compile\"") >&5
1732   (eval $ac_compile) 2>&5
1733   ac_status=$?
1734   echo "$as_me:1734: \$? = $ac_status" >&5
1735   (exit $ac_status); } &&
1736          { ac_try='test -s conftest.$ac_objext'
1737   { (eval echo "$as_me:1737: \"$ac_try\"") >&5
1738   (eval $ac_try) 2>&5
1739   ac_status=$?
1740   echo "$as_me:1740: \$? = $ac_status" >&5
1741   (exit $ac_status); }; }; then
1742   for ac_declaration in \
1743    ''\
1744    '#include <stdlib.h>' \
1745    'extern "C" void std::exit (int) throw (); using std::exit;' \
1746    'extern "C" void std::exit (int); using std::exit;' \
1747    'extern "C" void exit (int) throw ();' \
1748    'extern "C" void exit (int);' \
1749    'void exit (int);'
1750 do
1751   cat >conftest.$ac_ext <<_ACEOF
1752 #line 1752 "configure"
1753 #include "confdefs.h"
1754 #include <stdlib.h>
1755 $ac_declaration
1756 int
1757 main ()
1758 {
1759 exit (42);
1760   ;
1761   return 0;
1762 }
1763 _ACEOF
1764 rm -f conftest.$ac_objext
1765 if { (eval echo "$as_me:1765: \"$ac_compile\"") >&5
1766   (eval $ac_compile) 2>&5
1767   ac_status=$?
1768   echo "$as_me:1768: \$? = $ac_status" >&5
1769   (exit $ac_status); } &&
1770          { ac_try='test -s conftest.$ac_objext'
1771   { (eval echo "$as_me:1771: \"$ac_try\"") >&5
1772   (eval $ac_try) 2>&5
1773   ac_status=$?
1774   echo "$as_me:1774: \$? = $ac_status" >&5
1775   (exit $ac_status); }; }; then
1776   :
1777 else
1778   echo "$as_me: failed program was:" >&5
1779 cat conftest.$ac_ext >&5
1780 continue
1781 fi
1782 rm -f conftest.$ac_objext conftest.$ac_ext
1783   cat >conftest.$ac_ext <<_ACEOF
1784 #line 1784 "configure"
1785 #include "confdefs.h"
1786 $ac_declaration
1787 int
1788 main ()
1789 {
1790 exit (42);
1791   ;
1792   return 0;
1793 }
1794 _ACEOF
1795 rm -f conftest.$ac_objext
1796 if { (eval echo "$as_me:1796: \"$ac_compile\"") >&5
1797   (eval $ac_compile) 2>&5
1798   ac_status=$?
1799   echo "$as_me:1799: \$? = $ac_status" >&5
1800   (exit $ac_status); } &&
1801          { ac_try='test -s conftest.$ac_objext'
1802   { (eval echo "$as_me:1802: \"$ac_try\"") >&5
1803   (eval $ac_try) 2>&5
1804   ac_status=$?
1805   echo "$as_me:1805: \$? = $ac_status" >&5
1806   (exit $ac_status); }; }; then
1807   break
1808 else
1809   echo "$as_me: failed program was:" >&5
1810 cat conftest.$ac_ext >&5
1811 fi
1812 rm -f conftest.$ac_objext conftest.$ac_ext
1813 done
1814 rm -rf conftest*
1815 if test -n "$ac_declaration"; then
1816   echo '#ifdef __cplusplus' >>confdefs.h
1817   echo $ac_declaration      >>confdefs.h
1818   echo '#endif'             >>confdefs.h
1819 fi
1820
1821 else
1822   echo "$as_me: failed program was:" >&5
1823 cat conftest.$ac_ext >&5
1824 fi
1825 rm -f conftest.$ac_objext conftest.$ac_ext
1826 ac_ext=c
1827 ac_cpp='$CPP $CPPFLAGS'
1828 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1829 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1830 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1831 ac_main_return=return
1832
1833 GCC_VERSION=none
1834 if test "$GCC" = yes ; then
1835         echo "$as_me:1835: checking version of $CC" >&5
1836 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
1837         GCC_VERSION="`${CC} --version 2>/dev/null | sed -e '2,$d' -e 's/^.*(GCC[^)]*) //' -e 's/^.*(Debian[^)]*) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
1838         test -z "$GCC_VERSION" && GCC_VERSION=unknown
1839         echo "$as_me:1839: result: $GCC_VERSION" >&5
1840 echo "${ECHO_T}$GCC_VERSION" >&6
1841 fi
1842
1843 echo "$as_me:1843: checking for $CC option to accept ANSI C" >&5
1844 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
1845 if test "${ac_cv_prog_cc_stdc+set}" = set; then
1846   echo $ECHO_N "(cached) $ECHO_C" >&6
1847 else
1848   ac_cv_prog_cc_stdc=no
1849 ac_save_CC=$CC
1850 cat >conftest.$ac_ext <<_ACEOF
1851 #line 1851 "configure"
1852 #include "confdefs.h"
1853 #include <stdarg.h>
1854 #include <stdio.h>
1855 #include <sys/types.h>
1856 #include <sys/stat.h>
1857 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
1858 struct buf { int x; };
1859 FILE * (*rcsopen) (struct buf *, struct stat *, int);
1860 static char *e (p, i)
1861      char **p;
1862      int i;
1863 {
1864   return p[i];
1865 }
1866 static char *f (char * (*g) (char **, int), char **p, ...)
1867 {
1868   char *s;
1869   va_list v;
1870   va_start (v,p);
1871   s = g (p, va_arg (v,int));
1872   va_end (v);
1873   return s;
1874 }
1875 int test (int i, double x);
1876 struct s1 {int (*f) (int a);};
1877 struct s2 {int (*f) (double a);};
1878 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
1879 int argc;
1880 char **argv;
1881 int
1882 main ()
1883 {
1884 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
1885   ;
1886   return 0;
1887 }
1888 _ACEOF
1889 # Don't try gcc -ansi; that turns off useful extensions and
1890 # breaks some systems' header files.
1891 # AIX                   -qlanglvl=ansi
1892 # Ultrix and OSF/1      -std1
1893 # HP-UX 10.20 and later -Ae
1894 # HP-UX older versions  -Aa -D_HPUX_SOURCE
1895 # SVR4                  -Xc -D__EXTENSIONS__
1896 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
1897 do
1898   CC="$ac_save_CC $ac_arg"
1899   rm -f conftest.$ac_objext
1900 if { (eval echo "$as_me:1900: \"$ac_compile\"") >&5
1901   (eval $ac_compile) 2>&5
1902   ac_status=$?
1903   echo "$as_me:1903: \$? = $ac_status" >&5
1904   (exit $ac_status); } &&
1905          { ac_try='test -s conftest.$ac_objext'
1906   { (eval echo "$as_me:1906: \"$ac_try\"") >&5
1907   (eval $ac_try) 2>&5
1908   ac_status=$?
1909   echo "$as_me:1909: \$? = $ac_status" >&5
1910   (exit $ac_status); }; }; then
1911   ac_cv_prog_cc_stdc=$ac_arg
1912 break
1913 else
1914   echo "$as_me: failed program was:" >&5
1915 cat conftest.$ac_ext >&5
1916 fi
1917 rm -f conftest.$ac_objext
1918 done
1919 rm -f conftest.$ac_ext conftest.$ac_objext
1920 CC=$ac_save_CC
1921
1922 fi
1923
1924 case "x$ac_cv_prog_cc_stdc" in
1925   x|xno)
1926     echo "$as_me:1926: result: none needed" >&5
1927 echo "${ECHO_T}none needed" >&6 ;;
1928   *)
1929     echo "$as_me:1929: result: $ac_cv_prog_cc_stdc" >&5
1930 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
1931     CC="$CC $ac_cv_prog_cc_stdc" ;;
1932 esac
1933
1934 # This should have been defined by AC_PROG_CC
1935 : ${CC:=cc}
1936
1937 echo "$as_me:1937: checking \$CC variable" >&5
1938 echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
1939 case "$CC" in
1940 (*[\ \  ]-*)
1941         echo "$as_me:1941: result: broken" >&5
1942 echo "${ECHO_T}broken" >&6
1943         { echo "$as_me:1943: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
1944 echo "$as_me: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
1945         # humor him...
1946         cf_prog=`echo "$CC" | sed -e 's/        / /g' -e 's/[ ]* / /g' -e 's/[ ]*[ ]-[^ ].*//'`
1947         cf_flags=`echo "$CC" | ${AWK:-awk} -v prog="$cf_prog" '{ printf("%s", substr($0,1+length(prog))); }'`
1948         CC="$cf_prog"
1949         for cf_arg in $cf_flags
1950         do
1951                 case "x$cf_arg" in
1952                 (x-[IUDfgOW]*)
1953
1954 cf_fix_cppflags=no
1955 cf_new_cflags=
1956 cf_new_cppflags=
1957 cf_new_extra_cppflags=
1958
1959 for cf_add_cflags in $cf_arg
1960 do
1961 case $cf_fix_cppflags in
1962 (no)
1963         case $cf_add_cflags in
1964         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
1965                 case $cf_add_cflags in
1966                 (-D*)
1967                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
1968
1969                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
1970                                 && test -z "${cf_tst_cflags}" \
1971                                 && cf_fix_cppflags=yes
1972
1973                         if test $cf_fix_cppflags = yes ; then
1974
1975         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
1976         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
1977
1978                                 continue
1979                         elif test "${cf_tst_cflags}" = "\"'" ; then
1980
1981         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
1982         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
1983
1984                                 continue
1985                         fi
1986                         ;;
1987                 esac
1988                 case "$CPPFLAGS" in
1989                 (*$cf_add_cflags)
1990                         ;;
1991                 (*)
1992                         case $cf_add_cflags in
1993                         (-D*)
1994                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
1995
1996 CPPFLAGS=`echo "$CPPFLAGS" | \
1997         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
1998                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
1999
2000                                 ;;
2001                         esac
2002
2003         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2004         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2005
2006                         ;;
2007                 esac
2008                 ;;
2009         (*)
2010
2011         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2012         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2013
2014                 ;;
2015         esac
2016         ;;
2017 (yes)
2018
2019         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2020         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2021
2022         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2023
2024         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2025                 && test -z "${cf_tst_cflags}" \
2026                 && cf_fix_cppflags=no
2027         ;;
2028 esac
2029 done
2030
2031 if test -n "$cf_new_cflags" ; then
2032
2033         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2034         CFLAGS="${CFLAGS}$cf_new_cflags"
2035
2036 fi
2037
2038 if test -n "$cf_new_cppflags" ; then
2039
2040         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2041         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2042
2043 fi
2044
2045 if test -n "$cf_new_extra_cppflags" ; then
2046
2047         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2048         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2049
2050 fi
2051
2052                         ;;
2053                 (*)
2054                         CC="$CC $cf_arg"
2055                         ;;
2056                 esac
2057         done
2058         test -n "$verbose" && echo "    resulting CC: '$CC'" 1>&6
2059
2060 echo "${as_me:-configure}:2060: testing resulting CC: '$CC' ..." 1>&5
2061
2062         test -n "$verbose" && echo "    resulting CFLAGS: '$CFLAGS'" 1>&6
2063
2064 echo "${as_me:-configure}:2064: testing resulting CFLAGS: '$CFLAGS' ..." 1>&5
2065
2066         test -n "$verbose" && echo "    resulting CPPFLAGS: '$CPPFLAGS'" 1>&6
2067
2068 echo "${as_me:-configure}:2068: testing resulting CPPFLAGS: '$CPPFLAGS' ..." 1>&5
2069
2070         ;;
2071 (*)
2072         echo "$as_me:2072: result: ok" >&5
2073 echo "${ECHO_T}ok" >&6
2074         ;;
2075 esac
2076
2077 ac_ext=c
2078 ac_cpp='$CPP $CPPFLAGS'
2079 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2080 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2081 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2082 ac_main_return=return
2083 echo "$as_me:2083: checking how to run the C preprocessor" >&5
2084 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2085 # On Suns, sometimes $CPP names a directory.
2086 if test -n "$CPP" && test -d "$CPP"; then
2087   CPP=
2088 fi
2089 if test -z "$CPP"; then
2090   if test "${ac_cv_prog_CPP+set}" = set; then
2091   echo $ECHO_N "(cached) $ECHO_C" >&6
2092 else
2093       # Double quotes because CPP needs to be expanded
2094     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2095     do
2096       ac_preproc_ok=false
2097 for ac_c_preproc_warn_flag in '' yes
2098 do
2099   # Use a header file that comes with gcc, so configuring glibc
2100   # with a fresh cross-compiler works.
2101   # On the NeXT, cc -E runs the code through the compiler's parser,
2102   # not just through cpp. "Syntax error" is here to catch this case.
2103   cat >conftest.$ac_ext <<_ACEOF
2104 #line 2104 "configure"
2105 #include "confdefs.h"
2106 #include <assert.h>
2107                      Syntax error
2108 _ACEOF
2109 if { (eval echo "$as_me:2109: \"$ac_cpp conftest.$ac_ext\"") >&5
2110   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2111   ac_status=$?
2112   egrep -v '^ *\+' conftest.er1 >conftest.err
2113   rm -f conftest.er1
2114   cat conftest.err >&5
2115   echo "$as_me:2115: \$? = $ac_status" >&5
2116   (exit $ac_status); } >/dev/null; then
2117   if test -s conftest.err; then
2118     ac_cpp_err=$ac_c_preproc_warn_flag
2119   else
2120     ac_cpp_err=
2121   fi
2122 else
2123   ac_cpp_err=yes
2124 fi
2125 if test -z "$ac_cpp_err"; then
2126   :
2127 else
2128   echo "$as_me: failed program was:" >&5
2129   cat conftest.$ac_ext >&5
2130   # Broken: fails on valid input.
2131 continue
2132 fi
2133 rm -f conftest.err conftest.$ac_ext
2134
2135   # OK, works on sane cases.  Now check whether non-existent headers
2136   # can be detected and how.
2137   cat >conftest.$ac_ext <<_ACEOF
2138 #line 2138 "configure"
2139 #include "confdefs.h"
2140 #include <ac_nonexistent.h>
2141 _ACEOF
2142 if { (eval echo "$as_me:2142: \"$ac_cpp conftest.$ac_ext\"") >&5
2143   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2144   ac_status=$?
2145   egrep -v '^ *\+' conftest.er1 >conftest.err
2146   rm -f conftest.er1
2147   cat conftest.err >&5
2148   echo "$as_me:2148: \$? = $ac_status" >&5
2149   (exit $ac_status); } >/dev/null; then
2150   if test -s conftest.err; then
2151     ac_cpp_err=$ac_c_preproc_warn_flag
2152   else
2153     ac_cpp_err=
2154   fi
2155 else
2156   ac_cpp_err=yes
2157 fi
2158 if test -z "$ac_cpp_err"; then
2159   # Broken: success on invalid input.
2160 continue
2161 else
2162   echo "$as_me: failed program was:" >&5
2163   cat conftest.$ac_ext >&5
2164   # Passes both tests.
2165 ac_preproc_ok=:
2166 break
2167 fi
2168 rm -f conftest.err conftest.$ac_ext
2169
2170 done
2171 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2172 rm -f conftest.err conftest.$ac_ext
2173 if $ac_preproc_ok; then
2174   break
2175 fi
2176
2177     done
2178     ac_cv_prog_CPP=$CPP
2179
2180 fi
2181   CPP=$ac_cv_prog_CPP
2182 else
2183   ac_cv_prog_CPP=$CPP
2184 fi
2185 echo "$as_me:2185: result: $CPP" >&5
2186 echo "${ECHO_T}$CPP" >&6
2187 ac_preproc_ok=false
2188 for ac_c_preproc_warn_flag in '' yes
2189 do
2190   # Use a header file that comes with gcc, so configuring glibc
2191   # with a fresh cross-compiler works.
2192   # On the NeXT, cc -E runs the code through the compiler's parser,
2193   # not just through cpp. "Syntax error" is here to catch this case.
2194   cat >conftest.$ac_ext <<_ACEOF
2195 #line 2195 "configure"
2196 #include "confdefs.h"
2197 #include <assert.h>
2198                      Syntax error
2199 _ACEOF
2200 if { (eval echo "$as_me:2200: \"$ac_cpp conftest.$ac_ext\"") >&5
2201   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2202   ac_status=$?
2203   egrep -v '^ *\+' conftest.er1 >conftest.err
2204   rm -f conftest.er1
2205   cat conftest.err >&5
2206   echo "$as_me:2206: \$? = $ac_status" >&5
2207   (exit $ac_status); } >/dev/null; then
2208   if test -s conftest.err; then
2209     ac_cpp_err=$ac_c_preproc_warn_flag
2210   else
2211     ac_cpp_err=
2212   fi
2213 else
2214   ac_cpp_err=yes
2215 fi
2216 if test -z "$ac_cpp_err"; then
2217   :
2218 else
2219   echo "$as_me: failed program was:" >&5
2220   cat conftest.$ac_ext >&5
2221   # Broken: fails on valid input.
2222 continue
2223 fi
2224 rm -f conftest.err conftest.$ac_ext
2225
2226   # OK, works on sane cases.  Now check whether non-existent headers
2227   # can be detected and how.
2228   cat >conftest.$ac_ext <<_ACEOF
2229 #line 2229 "configure"
2230 #include "confdefs.h"
2231 #include <ac_nonexistent.h>
2232 _ACEOF
2233 if { (eval echo "$as_me:2233: \"$ac_cpp conftest.$ac_ext\"") >&5
2234   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2235   ac_status=$?
2236   egrep -v '^ *\+' conftest.er1 >conftest.err
2237   rm -f conftest.er1
2238   cat conftest.err >&5
2239   echo "$as_me:2239: \$? = $ac_status" >&5
2240   (exit $ac_status); } >/dev/null; then
2241   if test -s conftest.err; then
2242     ac_cpp_err=$ac_c_preproc_warn_flag
2243   else
2244     ac_cpp_err=
2245   fi
2246 else
2247   ac_cpp_err=yes
2248 fi
2249 if test -z "$ac_cpp_err"; then
2250   # Broken: success on invalid input.
2251 continue
2252 else
2253   echo "$as_me: failed program was:" >&5
2254   cat conftest.$ac_ext >&5
2255   # Passes both tests.
2256 ac_preproc_ok=:
2257 break
2258 fi
2259 rm -f conftest.err conftest.$ac_ext
2260
2261 done
2262 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2263 rm -f conftest.err conftest.$ac_ext
2264 if $ac_preproc_ok; then
2265   :
2266 else
2267   { { echo "$as_me:2267: error: C preprocessor \"$CPP\" fails sanity check" >&5
2268 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2269    { (exit 1); exit 1; }; }
2270 fi
2271
2272 ac_ext=c
2273 ac_cpp='$CPP $CPPFLAGS'
2274 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2275 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2276 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2277 ac_main_return=return
2278
2279 for ac_prog in mawk gawk nawk awk
2280 do
2281   # Extract the first word of "$ac_prog", so it can be a program name with args.
2282 set dummy $ac_prog; ac_word=$2
2283 echo "$as_me:2283: checking for $ac_word" >&5
2284 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2285 if test "${ac_cv_prog_AWK+set}" = set; then
2286   echo $ECHO_N "(cached) $ECHO_C" >&6
2287 else
2288   if test -n "$AWK"; then
2289   ac_cv_prog_AWK="$AWK" # Let the user override the test.
2290 else
2291   ac_save_IFS=$IFS; IFS=$ac_path_separator
2292 ac_dummy="$PATH"
2293 for ac_dir in $ac_dummy; do
2294   IFS=$ac_save_IFS
2295   test -z "$ac_dir" && ac_dir=.
2296   $as_executable_p "$ac_dir/$ac_word" || continue
2297 ac_cv_prog_AWK="$ac_prog"
2298 echo "$as_me:2298: found $ac_dir/$ac_word" >&5
2299 break
2300 done
2301
2302 fi
2303 fi
2304 AWK=$ac_cv_prog_AWK
2305 if test -n "$AWK"; then
2306   echo "$as_me:2306: result: $AWK" >&5
2307 echo "${ECHO_T}$AWK" >&6
2308 else
2309   echo "$as_me:2309: result: no" >&5
2310 echo "${ECHO_T}no" >&6
2311 fi
2312
2313   test -n "$AWK" && break
2314 done
2315
2316 # Find a good install program.  We prefer a C program (faster),
2317 # so one script is as good as another.  But avoid the broken or
2318 # incompatible versions:
2319 # SysV /etc/install, /usr/sbin/install
2320 # SunOS /usr/etc/install
2321 # IRIX /sbin/install
2322 # AIX /bin/install
2323 # AmigaOS /C/install, which installs bootblocks on floppy discs
2324 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2325 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2326 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2327 # ./install, which can be erroneously created by make from ./install.sh.
2328 echo "$as_me:2328: checking for a BSD compatible install" >&5
2329 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
2330 if test -z "$INSTALL"; then
2331 if test "${ac_cv_path_install+set}" = set; then
2332   echo $ECHO_N "(cached) $ECHO_C" >&6
2333 else
2334     ac_save_IFS=$IFS; IFS=$ac_path_separator
2335   for ac_dir in $PATH; do
2336     IFS=$ac_save_IFS
2337     # Account for people who put trailing slashes in PATH elements.
2338     case $ac_dir/ in
2339     / | ./ | .// | /cC/* \
2340     | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
2341     | /usr/ucb/* ) ;;
2342     *)
2343       # OSF1 and SCO ODT 3.0 have their own names for install.
2344       # Don't use installbsd from OSF since it installs stuff as root
2345       # by default.
2346       for ac_prog in ginstall scoinst install; do
2347         if $as_executable_p "$ac_dir/$ac_prog"; then
2348           if test $ac_prog = install &&
2349             grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2350             # AIX install.  It has an incompatible calling convention.
2351             :
2352           elif test $ac_prog = install &&
2353             grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2354             # program-specific install script used by HP pwplus--don't use.
2355             :
2356           else
2357             ac_cv_path_install="$ac_dir/$ac_prog -c"
2358             break 2
2359           fi
2360         fi
2361       done
2362       ;;
2363     esac
2364   done
2365
2366 fi
2367   if test "${ac_cv_path_install+set}" = set; then
2368     INSTALL=$ac_cv_path_install
2369   else
2370     # As a last resort, use the slow shell script.  We don't cache a
2371     # path for INSTALL within a source directory, because that will
2372     # break other packages using the cache if that directory is
2373     # removed, or if the path is relative.
2374     INSTALL=$ac_install_sh
2375   fi
2376 fi
2377 echo "$as_me:2377: result: $INSTALL" >&5
2378 echo "${ECHO_T}$INSTALL" >&6
2379
2380 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2381 # It thinks the first close brace ends the variable substitution.
2382 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2383
2384 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
2385
2386 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2387
2388 case $INSTALL in
2389 (/*)
2390         ;;
2391 (*)
2392         cf_dir=`echo $INSTALL | sed -e 's%/[^/]*$%%'`
2393         test -z "$cf_dir" && cf_dir=.
2394         INSTALL=`cd $cf_dir && pwd`/`echo $INSTALL | sed -e 's%^.*/%%'`
2395         ;;
2396 esac
2397
2398 for ac_prog in lint cppcheck splint
2399 do
2400   # Extract the first word of "$ac_prog", so it can be a program name with args.
2401 set dummy $ac_prog; ac_word=$2
2402 echo "$as_me:2402: checking for $ac_word" >&5
2403 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2404 if test "${ac_cv_prog_LINT+set}" = set; then
2405   echo $ECHO_N "(cached) $ECHO_C" >&6
2406 else
2407   if test -n "$LINT"; then
2408   ac_cv_prog_LINT="$LINT" # Let the user override the test.
2409 else
2410   ac_save_IFS=$IFS; IFS=$ac_path_separator
2411 ac_dummy="$PATH"
2412 for ac_dir in $ac_dummy; do
2413   IFS=$ac_save_IFS
2414   test -z "$ac_dir" && ac_dir=.
2415   $as_executable_p "$ac_dir/$ac_word" || continue
2416 ac_cv_prog_LINT="$ac_prog"
2417 echo "$as_me:2417: found $ac_dir/$ac_word" >&5
2418 break
2419 done
2420
2421 fi
2422 fi
2423 LINT=$ac_cv_prog_LINT
2424 if test -n "$LINT"; then
2425   echo "$as_me:2425: result: $LINT" >&5
2426 echo "${ECHO_T}$LINT" >&6
2427 else
2428   echo "$as_me:2428: result: no" >&5
2429 echo "${ECHO_T}no" >&6
2430 fi
2431
2432   test -n "$LINT" && break
2433 done
2434
2435 echo "$as_me:2435: checking if filesystem supports mixed-case filenames" >&5
2436 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
2437 if test "${cf_cv_mixedcase+set}" = set; then
2438   echo $ECHO_N "(cached) $ECHO_C" >&6
2439 else
2440
2441 if test "$cross_compiling" = yes ; then
2442         case $target_alias in
2443         (*-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-msys*|*-mingw*|*-uwin*)
2444                 cf_cv_mixedcase=no
2445                 ;;
2446         (*)
2447                 cf_cv_mixedcase=yes
2448                 ;;
2449         esac
2450 else
2451         rm -f conftest CONFTEST
2452         echo test >conftest
2453         if test -f CONFTEST ; then
2454                 cf_cv_mixedcase=no
2455         else
2456                 cf_cv_mixedcase=yes
2457         fi
2458         rm -f conftest CONFTEST
2459 fi
2460
2461 fi
2462 echo "$as_me:2462: result: $cf_cv_mixedcase" >&5
2463 echo "${ECHO_T}$cf_cv_mixedcase" >&6
2464 test "$cf_cv_mixedcase" = yes &&
2465 cat >>confdefs.h <<\EOF
2466 #define MIXEDCASE_FILENAMES 1
2467 EOF
2468
2469 for ac_prog in exctags ctags
2470 do
2471   # Extract the first word of "$ac_prog", so it can be a program name with args.
2472 set dummy $ac_prog; ac_word=$2
2473 echo "$as_me:2473: checking for $ac_word" >&5
2474 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2475 if test "${ac_cv_prog_CTAGS+set}" = set; then
2476   echo $ECHO_N "(cached) $ECHO_C" >&6
2477 else
2478   if test -n "$CTAGS"; then
2479   ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
2480 else
2481   ac_save_IFS=$IFS; IFS=$ac_path_separator
2482 ac_dummy="$PATH"
2483 for ac_dir in $ac_dummy; do
2484   IFS=$ac_save_IFS
2485   test -z "$ac_dir" && ac_dir=.
2486   $as_executable_p "$ac_dir/$ac_word" || continue
2487 ac_cv_prog_CTAGS="$ac_prog"
2488 echo "$as_me:2488: found $ac_dir/$ac_word" >&5
2489 break
2490 done
2491
2492 fi
2493 fi
2494 CTAGS=$ac_cv_prog_CTAGS
2495 if test -n "$CTAGS"; then
2496   echo "$as_me:2496: result: $CTAGS" >&5
2497 echo "${ECHO_T}$CTAGS" >&6
2498 else
2499   echo "$as_me:2499: result: no" >&5
2500 echo "${ECHO_T}no" >&6
2501 fi
2502
2503   test -n "$CTAGS" && break
2504 done
2505
2506 for ac_prog in exetags etags
2507 do
2508   # Extract the first word of "$ac_prog", so it can be a program name with args.
2509 set dummy $ac_prog; ac_word=$2
2510 echo "$as_me:2510: checking for $ac_word" >&5
2511 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2512 if test "${ac_cv_prog_ETAGS+set}" = set; then
2513   echo $ECHO_N "(cached) $ECHO_C" >&6
2514 else
2515   if test -n "$ETAGS"; then
2516   ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
2517 else
2518   ac_save_IFS=$IFS; IFS=$ac_path_separator
2519 ac_dummy="$PATH"
2520 for ac_dir in $ac_dummy; do
2521   IFS=$ac_save_IFS
2522   test -z "$ac_dir" && ac_dir=.
2523   $as_executable_p "$ac_dir/$ac_word" || continue
2524 ac_cv_prog_ETAGS="$ac_prog"
2525 echo "$as_me:2525: found $ac_dir/$ac_word" >&5
2526 break
2527 done
2528
2529 fi
2530 fi
2531 ETAGS=$ac_cv_prog_ETAGS
2532 if test -n "$ETAGS"; then
2533   echo "$as_me:2533: result: $ETAGS" >&5
2534 echo "${ECHO_T}$ETAGS" >&6
2535 else
2536   echo "$as_me:2536: result: no" >&5
2537 echo "${ECHO_T}no" >&6
2538 fi
2539
2540   test -n "$ETAGS" && break
2541 done
2542
2543 # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
2544 set dummy ${CTAGS:-ctags}; ac_word=$2
2545 echo "$as_me:2545: checking for $ac_word" >&5
2546 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2547 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
2548   echo $ECHO_N "(cached) $ECHO_C" >&6
2549 else
2550   if test -n "$MAKE_LOWER_TAGS"; then
2551   ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
2552 else
2553   ac_save_IFS=$IFS; IFS=$ac_path_separator
2554 ac_dummy="$PATH"
2555 for ac_dir in $ac_dummy; do
2556   IFS=$ac_save_IFS
2557   test -z "$ac_dir" && ac_dir=.
2558   $as_executable_p "$ac_dir/$ac_word" || continue
2559 ac_cv_prog_MAKE_LOWER_TAGS="yes"
2560 echo "$as_me:2560: found $ac_dir/$ac_word" >&5
2561 break
2562 done
2563
2564   test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
2565 fi
2566 fi
2567 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
2568 if test -n "$MAKE_LOWER_TAGS"; then
2569   echo "$as_me:2569: result: $MAKE_LOWER_TAGS" >&5
2570 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
2571 else
2572   echo "$as_me:2572: result: no" >&5
2573 echo "${ECHO_T}no" >&6
2574 fi
2575
2576 if test "$cf_cv_mixedcase" = yes ; then
2577         # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
2578 set dummy ${ETAGS:-etags}; ac_word=$2
2579 echo "$as_me:2579: checking for $ac_word" >&5
2580 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2581 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
2582   echo $ECHO_N "(cached) $ECHO_C" >&6
2583 else
2584   if test -n "$MAKE_UPPER_TAGS"; then
2585   ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
2586 else
2587   ac_save_IFS=$IFS; IFS=$ac_path_separator
2588 ac_dummy="$PATH"
2589 for ac_dir in $ac_dummy; do
2590   IFS=$ac_save_IFS
2591   test -z "$ac_dir" && ac_dir=.
2592   $as_executable_p "$ac_dir/$ac_word" || continue
2593 ac_cv_prog_MAKE_UPPER_TAGS="yes"
2594 echo "$as_me:2594: found $ac_dir/$ac_word" >&5
2595 break
2596 done
2597
2598   test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
2599 fi
2600 fi
2601 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
2602 if test -n "$MAKE_UPPER_TAGS"; then
2603   echo "$as_me:2603: result: $MAKE_UPPER_TAGS" >&5
2604 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
2605 else
2606   echo "$as_me:2606: result: no" >&5
2607 echo "${ECHO_T}no" >&6
2608 fi
2609
2610 else
2611         MAKE_UPPER_TAGS=no
2612 fi
2613
2614 if test "$MAKE_UPPER_TAGS" = yes ; then
2615         MAKE_UPPER_TAGS=
2616 else
2617         MAKE_UPPER_TAGS="#"
2618 fi
2619
2620 if test "$MAKE_LOWER_TAGS" = yes ; then
2621         MAKE_LOWER_TAGS=
2622 else
2623         MAKE_LOWER_TAGS="#"
2624 fi
2625
2626 echo "$as_me:2626: checking if -lm needed for math functions" >&5
2627 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
2628 if test "${cf_cv_need_libm+set}" = set; then
2629   echo $ECHO_N "(cached) $ECHO_C" >&6
2630 else
2631
2632         cat >conftest.$ac_ext <<_ACEOF
2633 #line 2633 "configure"
2634 #include "confdefs.h"
2635
2636         #include <stdio.h>
2637         #include <stdlib.h>
2638         #include <math.h>
2639
2640 int
2641 main ()
2642 {
2643 double x = rand(); printf("result = %g\n", pow(sin(x),x))
2644   ;
2645   return 0;
2646 }
2647 _ACEOF
2648 rm -f conftest.$ac_objext conftest$ac_exeext
2649 if { (eval echo "$as_me:2649: \"$ac_link\"") >&5
2650   (eval $ac_link) 2>&5
2651   ac_status=$?
2652   echo "$as_me:2652: \$? = $ac_status" >&5
2653   (exit $ac_status); } &&
2654          { ac_try='test -s conftest$ac_exeext'
2655   { (eval echo "$as_me:2655: \"$ac_try\"") >&5
2656   (eval $ac_try) 2>&5
2657   ac_status=$?
2658   echo "$as_me:2658: \$? = $ac_status" >&5
2659   (exit $ac_status); }; }; then
2660   cf_cv_need_libm=no
2661 else
2662   echo "$as_me: failed program was:" >&5
2663 cat conftest.$ac_ext >&5
2664 cf_cv_need_libm=yes
2665 fi
2666 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
2667 fi
2668 echo "$as_me:2668: result: $cf_cv_need_libm" >&5
2669 echo "${ECHO_T}$cf_cv_need_libm" >&6
2670 if test "$cf_cv_need_libm" = yes
2671 then
2672 MATH_LIB=-lm
2673 fi
2674
2675 top_builddir=`pwd`
2676
2677 CC_G_OPT="-g"
2678 CC_SHARED_OPTS=unknown
2679 CPPFLAGS="$CPPFLAGS"
2680 DFT_DEP_SUFFIX=""
2681 DFT_OBJ_SUBDIR=`pwd|sed -e's:.*/::'`
2682 DFT_UPR_MODEL="NORMAL"
2683 LD="ld"
2684 LDFLAGS_SHARED=""
2685 LDFLAGS_STATIC=""
2686 LD_MODEL=""
2687 LD_SHARED_OPTS=""
2688 LIBTOOL=""
2689 LIBTOOL_OPTS=""
2690 LIB_CLEAN=""
2691 LIB_COMPILE=""
2692 LIB_LINK='${CC}'
2693 LINK_TESTS=""
2694 LOCAL_LDFLAGS=""
2695 PACKAGE="ncurses-examples"
2696 PTHREAD="-lm"
2697 TEST_ARGS=""
2698 TEST_DEPS=""
2699 TEST_LIBS=""
2700 TINFO_LDFLAGS=''
2701 TINFO_LIBS='$(LIBS_CURSES)'
2702 cf_cv_abi_version=""
2703 cf_cv_rel_version=""
2704 includesubdir=""
2705
2706 cf_cv_screen=curses
2707 cf_cv_libtype=
2708
2709 if test "$GCC" = yes
2710 then
2711 cat > conftest.i <<EOF
2712 #ifndef GCC_PRINTF
2713 #define GCC_PRINTF 0
2714 #endif
2715 #ifndef GCC_SCANF
2716 #define GCC_SCANF 0
2717 #endif
2718 #ifndef GCC_NORETURN
2719 #define GCC_NORETURN /* nothing */
2720 #endif
2721 #ifndef GCC_UNUSED
2722 #define GCC_UNUSED /* nothing */
2723 #endif
2724 EOF
2725 if test "$GCC" = yes
2726 then
2727         { echo "$as_me:2727: checking for $CC __attribute__ directives..." >&5
2728 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
2729 cat > conftest.$ac_ext <<EOF
2730 #line 2730 "${as_me:-configure}"
2731 #include "confdefs.h"
2732 #include "conftest.h"
2733 #include "conftest.i"
2734 #if     GCC_PRINTF
2735 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
2736 #else
2737 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
2738 #endif
2739 #if     GCC_SCANF
2740 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
2741 #else
2742 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
2743 #endif
2744 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
2745 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
2746 extern void foo(void) GCC_NORETURN;
2747 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
2748 EOF
2749         cf_printf_attribute=no
2750         cf_scanf_attribute=no
2751         for cf_attribute in scanf printf unused noreturn
2752         do
2753
2754 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
2755
2756                 cf_directive="__attribute__(($cf_attribute))"
2757                 echo "checking for $CC $cf_directive" 1>&5
2758
2759                 case $cf_attribute in
2760                 (printf)
2761                         cf_printf_attribute=yes
2762                         cat >conftest.h <<EOF
2763 #define GCC_$cf_ATTRIBUTE 1
2764 EOF
2765                         ;;
2766                 (scanf)
2767                         cf_scanf_attribute=yes
2768                         cat >conftest.h <<EOF
2769 #define GCC_$cf_ATTRIBUTE 1
2770 EOF
2771                         ;;
2772                 (*)
2773                         cat >conftest.h <<EOF
2774 #define GCC_$cf_ATTRIBUTE $cf_directive
2775 EOF
2776                         ;;
2777                 esac
2778
2779                 if { (eval echo "$as_me:2779: \"$ac_compile\"") >&5
2780   (eval $ac_compile) 2>&5
2781   ac_status=$?
2782   echo "$as_me:2782: \$? = $ac_status" >&5
2783   (exit $ac_status); }; then
2784                         test -n "$verbose" && echo "$as_me:2784: result: ... $cf_attribute" >&5
2785 echo "${ECHO_T}... $cf_attribute" >&6
2786                         cat conftest.h >>confdefs.h
2787                         case $cf_attribute in
2788                         (noreturn)
2789
2790 cat >>confdefs.h <<EOF
2791 #define GCC_NORETURN $cf_directive
2792 EOF
2793
2794                                 ;;
2795                         (printf)
2796                                 cf_value='/* nothing */'
2797                                 if test "$cf_printf_attribute" != no ; then
2798                                         cf_value='__attribute__((format(printf,fmt,var)))'
2799
2800 cat >>confdefs.h <<\EOF
2801 #define GCC_PRINTF 1
2802 EOF
2803
2804                                 fi
2805
2806 cat >>confdefs.h <<EOF
2807 #define GCC_PRINTFLIKE(fmt,var) $cf_value
2808 EOF
2809
2810                                 ;;
2811                         (scanf)
2812                                 cf_value='/* nothing */'
2813                                 if test "$cf_scanf_attribute" != no ; then
2814                                         cf_value='__attribute__((format(scanf,fmt,var)))'
2815
2816 cat >>confdefs.h <<\EOF
2817 #define GCC_SCANF 1
2818 EOF
2819
2820                                 fi
2821
2822 cat >>confdefs.h <<EOF
2823 #define GCC_SCANFLIKE(fmt,var) $cf_value
2824 EOF
2825
2826                                 ;;
2827                         (unused)
2828
2829 cat >>confdefs.h <<EOF
2830 #define GCC_UNUSED $cf_directive
2831 EOF
2832
2833                                 ;;
2834                         esac
2835                 fi
2836         done
2837 else
2838         fgrep define conftest.i >>confdefs.h
2839 fi
2840 rm -rf conftest*
2841 fi
2842
2843 echo "$as_me:2843: checking if you want to work around bogus compiler/loader warnings" >&5
2844 echo $ECHO_N "checking if you want to work around bogus compiler/loader warnings... $ECHO_C" >&6
2845
2846 # Check whether --enable-string-hacks or --disable-string-hacks was given.
2847 if test "${enable_string_hacks+set}" = set; then
2848   enableval="$enable_string_hacks"
2849   with_string_hacks=$enableval
2850 else
2851   with_string_hacks=no
2852 fi;
2853 echo "$as_me:2853: result: $with_string_hacks" >&5
2854 echo "${ECHO_T}$with_string_hacks" >&6
2855
2856 if test "x$with_string_hacks" = "xyes"; then
2857
2858 cat >>confdefs.h <<\EOF
2859 #define USE_STRING_HACKS 1
2860 EOF
2861
2862         { echo "$as_me:2862: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&5
2863 echo "$as_me: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&2;}
2864         echo "$as_me:2864: checking for strlcat" >&5
2865 echo $ECHO_N "checking for strlcat... $ECHO_C" >&6
2866 if test "${ac_cv_func_strlcat+set}" = set; then
2867   echo $ECHO_N "(cached) $ECHO_C" >&6
2868 else
2869   cat >conftest.$ac_ext <<_ACEOF
2870 #line 2870 "configure"
2871 #include "confdefs.h"
2872 /* System header to define __stub macros and hopefully few prototypes,
2873     which can conflict with char strlcat (); below.  */
2874 #include <assert.h>
2875 /* Override any gcc2 internal prototype to avoid an error.  */
2876 #ifdef __cplusplus
2877 extern "C"
2878 #endif
2879 /* We use char because int might match the return type of a gcc2
2880    builtin and then its argument prototype would still apply.  */
2881 char strlcat ();
2882 char (*f) ();
2883
2884 int
2885 main ()
2886 {
2887 /* The GNU C library defines this for functions which it implements
2888     to always fail with ENOSYS.  Some functions are actually named
2889     something starting with __ and the normal name is an alias.  */
2890 #if defined (__stub_strlcat) || defined (__stub___strlcat)
2891 choke me
2892 #else
2893 f = strlcat; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
2894 #endif
2895
2896   ;
2897   return 0;
2898 }
2899 _ACEOF
2900 rm -f conftest.$ac_objext conftest$ac_exeext
2901 if { (eval echo "$as_me:2901: \"$ac_link\"") >&5
2902   (eval $ac_link) 2>&5
2903   ac_status=$?
2904   echo "$as_me:2904: \$? = $ac_status" >&5
2905   (exit $ac_status); } &&
2906          { ac_try='test -s conftest$ac_exeext'
2907   { (eval echo "$as_me:2907: \"$ac_try\"") >&5
2908   (eval $ac_try) 2>&5
2909   ac_status=$?
2910   echo "$as_me:2910: \$? = $ac_status" >&5
2911   (exit $ac_status); }; }; then
2912   ac_cv_func_strlcat=yes
2913 else
2914   echo "$as_me: failed program was:" >&5
2915 cat conftest.$ac_ext >&5
2916 ac_cv_func_strlcat=no
2917 fi
2918 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
2919 fi
2920 echo "$as_me:2920: result: $ac_cv_func_strlcat" >&5
2921 echo "${ECHO_T}$ac_cv_func_strlcat" >&6
2922 if test $ac_cv_func_strlcat = yes; then
2923
2924 cat >>confdefs.h <<\EOF
2925 #define HAVE_STRLCAT 1
2926 EOF
2927
2928 else
2929
2930                 echo "$as_me:2930: checking for strlcat in -lbsd" >&5
2931 echo $ECHO_N "checking for strlcat in -lbsd... $ECHO_C" >&6
2932 if test "${ac_cv_lib_bsd_strlcat+set}" = set; then
2933   echo $ECHO_N "(cached) $ECHO_C" >&6
2934 else
2935   ac_check_lib_save_LIBS=$LIBS
2936 LIBS="-lbsd  $LIBS"
2937 cat >conftest.$ac_ext <<_ACEOF
2938 #line 2938 "configure"
2939 #include "confdefs.h"
2940
2941 /* Override any gcc2 internal prototype to avoid an error.  */
2942 #ifdef __cplusplus
2943 extern "C"
2944 #endif
2945 /* We use char because int might match the return type of a gcc2
2946    builtin and then its argument prototype would still apply.  */
2947 char strlcat ();
2948 int
2949 main ()
2950 {
2951 strlcat ();
2952   ;
2953   return 0;
2954 }
2955 _ACEOF
2956 rm -f conftest.$ac_objext conftest$ac_exeext
2957 if { (eval echo "$as_me:2957: \"$ac_link\"") >&5
2958   (eval $ac_link) 2>&5
2959   ac_status=$?
2960   echo "$as_me:2960: \$? = $ac_status" >&5
2961   (exit $ac_status); } &&
2962          { ac_try='test -s conftest$ac_exeext'
2963   { (eval echo "$as_me:2963: \"$ac_try\"") >&5
2964   (eval $ac_try) 2>&5
2965   ac_status=$?
2966   echo "$as_me:2966: \$? = $ac_status" >&5
2967   (exit $ac_status); }; }; then
2968   ac_cv_lib_bsd_strlcat=yes
2969 else
2970   echo "$as_me: failed program was:" >&5
2971 cat conftest.$ac_ext >&5
2972 ac_cv_lib_bsd_strlcat=no
2973 fi
2974 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
2975 LIBS=$ac_check_lib_save_LIBS
2976 fi
2977 echo "$as_me:2977: result: $ac_cv_lib_bsd_strlcat" >&5
2978 echo "${ECHO_T}$ac_cv_lib_bsd_strlcat" >&6
2979 if test $ac_cv_lib_bsd_strlcat = yes; then
2980
2981 cf_add_libs="-lbsd"
2982 # Filter out duplicates - this happens with badly-designed ".pc" files...
2983 for cf_add_1lib in $LIBS
2984 do
2985         for cf_add_2lib in $cf_add_libs
2986         do
2987                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
2988                 then
2989                         cf_add_1lib=
2990                         break
2991                 fi
2992         done
2993         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
2994 done
2995 LIBS="$cf_add_libs"
2996
2997 for ac_header in bsd/string.h
2998 do
2999 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
3000 echo "$as_me:3000: checking for $ac_header" >&5
3001 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3002 if eval "test \"\${$as_ac_Header+set}\" = set"; then
3003   echo $ECHO_N "(cached) $ECHO_C" >&6
3004 else
3005   cat >conftest.$ac_ext <<_ACEOF
3006 #line 3006 "configure"
3007 #include "confdefs.h"
3008 #include <$ac_header>
3009 _ACEOF
3010 if { (eval echo "$as_me:3010: \"$ac_cpp conftest.$ac_ext\"") >&5
3011   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3012   ac_status=$?
3013   egrep -v '^ *\+' conftest.er1 >conftest.err
3014   rm -f conftest.er1
3015   cat conftest.err >&5
3016   echo "$as_me:3016: \$? = $ac_status" >&5
3017   (exit $ac_status); } >/dev/null; then
3018   if test -s conftest.err; then
3019     ac_cpp_err=$ac_c_preproc_warn_flag
3020   else
3021     ac_cpp_err=
3022   fi
3023 else
3024   ac_cpp_err=yes
3025 fi
3026 if test -z "$ac_cpp_err"; then
3027   eval "$as_ac_Header=yes"
3028 else
3029   echo "$as_me: failed program was:" >&5
3030   cat conftest.$ac_ext >&5
3031   eval "$as_ac_Header=no"
3032 fi
3033 rm -f conftest.err conftest.$ac_ext
3034 fi
3035 echo "$as_me:3035: result: `eval echo '${'$as_ac_Header'}'`" >&5
3036 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
3037 if test `eval echo '${'$as_ac_Header'}'` = yes; then
3038   cat >>confdefs.h <<EOF
3039 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
3040 EOF
3041
3042 fi
3043 done
3044
3045 cat >>confdefs.h <<\EOF
3046 #define HAVE_STRLCAT 1
3047 EOF
3048
3049 fi
3050
3051 fi
3052
3053 for ac_func in strlcpy snprintf
3054 do
3055 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
3056 echo "$as_me:3056: checking for $ac_func" >&5
3057 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
3058 if eval "test \"\${$as_ac_var+set}\" = set"; then
3059   echo $ECHO_N "(cached) $ECHO_C" >&6
3060 else
3061   cat >conftest.$ac_ext <<_ACEOF
3062 #line 3062 "configure"
3063 #include "confdefs.h"
3064 /* System header to define __stub macros and hopefully few prototypes,
3065     which can conflict with char $ac_func (); below.  */
3066 #include <assert.h>
3067 /* Override any gcc2 internal prototype to avoid an error.  */
3068 #ifdef __cplusplus
3069 extern "C"
3070 #endif
3071 /* We use char because int might match the return type of a gcc2
3072    builtin and then its argument prototype would still apply.  */
3073 char $ac_func ();
3074 char (*f) ();
3075
3076 int
3077 main ()
3078 {
3079 /* The GNU C library defines this for functions which it implements
3080     to always fail with ENOSYS.  Some functions are actually named
3081     something starting with __ and the normal name is an alias.  */
3082 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3083 choke me
3084 #else
3085 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
3086 #endif
3087
3088   ;
3089   return 0;
3090 }
3091 _ACEOF
3092 rm -f conftest.$ac_objext conftest$ac_exeext
3093 if { (eval echo "$as_me:3093: \"$ac_link\"") >&5
3094   (eval $ac_link) 2>&5
3095   ac_status=$?
3096   echo "$as_me:3096: \$? = $ac_status" >&5
3097   (exit $ac_status); } &&
3098          { ac_try='test -s conftest$ac_exeext'
3099   { (eval echo "$as_me:3099: \"$ac_try\"") >&5
3100   (eval $ac_try) 2>&5
3101   ac_status=$?
3102   echo "$as_me:3102: \$? = $ac_status" >&5
3103   (exit $ac_status); }; }; then
3104   eval "$as_ac_var=yes"
3105 else
3106   echo "$as_me: failed program was:" >&5
3107 cat conftest.$ac_ext >&5
3108 eval "$as_ac_var=no"
3109 fi
3110 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
3111 fi
3112 echo "$as_me:3112: result: `eval echo '${'$as_ac_var'}'`" >&5
3113 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
3114 if test `eval echo '${'$as_ac_var'}'` = yes; then
3115   cat >>confdefs.h <<EOF
3116 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
3117 EOF
3118
3119 fi
3120 done
3121
3122 fi
3123
3124 cf_XOPEN_SOURCE=500
3125 cf_POSIX_C_SOURCE=199506L
3126 cf_xopen_source=
3127
3128 case $host_os in
3129 (aix[4-7]*)
3130         cf_xopen_source="-D_ALL_SOURCE"
3131         ;;
3132 (msys)
3133         cf_XOPEN_SOURCE=600
3134         ;;
3135 (darwin[0-8].*)
3136         cf_xopen_source="-D_APPLE_C_SOURCE"
3137         ;;
3138 (darwin*)
3139         cf_xopen_source="-D_DARWIN_C_SOURCE"
3140         cf_XOPEN_SOURCE=
3141         ;;
3142 (freebsd*|dragonfly*)
3143         # 5.x headers associate
3144         #       _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
3145         #       _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
3146         cf_POSIX_C_SOURCE=200112L
3147         cf_XOPEN_SOURCE=600
3148         cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
3149         ;;
3150 (hpux11*)
3151         cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
3152         ;;
3153 (hpux*)
3154         cf_xopen_source="-D_HPUX_SOURCE"
3155         ;;
3156 (irix[56].*)
3157         cf_xopen_source="-D_SGI_SOURCE"
3158         cf_XOPEN_SOURCE=
3159         ;;
3160 (linux*|uclinux*|gnu*|mint*|k*bsd*-gnu|cygwin)
3161
3162 echo "$as_me:3162: checking if we must define _GNU_SOURCE" >&5
3163 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
3164 if test "${cf_cv_gnu_source+set}" = set; then
3165   echo $ECHO_N "(cached) $ECHO_C" >&6
3166 else
3167
3168 cat >conftest.$ac_ext <<_ACEOF
3169 #line 3169 "configure"
3170 #include "confdefs.h"
3171 #include <sys/types.h>
3172 int
3173 main ()
3174 {
3175
3176 #ifndef _XOPEN_SOURCE
3177 make an error
3178 #endif
3179   ;
3180   return 0;
3181 }
3182 _ACEOF
3183 rm -f conftest.$ac_objext
3184 if { (eval echo "$as_me:3184: \"$ac_compile\"") >&5
3185   (eval $ac_compile) 2>&5
3186   ac_status=$?
3187   echo "$as_me:3187: \$? = $ac_status" >&5
3188   (exit $ac_status); } &&
3189          { ac_try='test -s conftest.$ac_objext'
3190   { (eval echo "$as_me:3190: \"$ac_try\"") >&5
3191   (eval $ac_try) 2>&5
3192   ac_status=$?
3193   echo "$as_me:3193: \$? = $ac_status" >&5
3194   (exit $ac_status); }; }; then
3195   cf_cv_gnu_source=no
3196 else
3197   echo "$as_me: failed program was:" >&5
3198 cat conftest.$ac_ext >&5
3199 cf_save="$CPPFLAGS"
3200          CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
3201          cat >conftest.$ac_ext <<_ACEOF
3202 #line 3202 "configure"
3203 #include "confdefs.h"
3204 #include <sys/types.h>
3205 int
3206 main ()
3207 {
3208
3209 #ifdef _XOPEN_SOURCE
3210 make an error
3211 #endif
3212   ;
3213   return 0;
3214 }
3215 _ACEOF
3216 rm -f conftest.$ac_objext
3217 if { (eval echo "$as_me:3217: \"$ac_compile\"") >&5
3218   (eval $ac_compile) 2>&5
3219   ac_status=$?
3220   echo "$as_me:3220: \$? = $ac_status" >&5
3221   (exit $ac_status); } &&
3222          { ac_try='test -s conftest.$ac_objext'
3223   { (eval echo "$as_me:3223: \"$ac_try\"") >&5
3224   (eval $ac_try) 2>&5
3225   ac_status=$?
3226   echo "$as_me:3226: \$? = $ac_status" >&5
3227   (exit $ac_status); }; }; then
3228   cf_cv_gnu_source=no
3229 else
3230   echo "$as_me: failed program was:" >&5
3231 cat conftest.$ac_ext >&5
3232 cf_cv_gnu_source=yes
3233 fi
3234 rm -f conftest.$ac_objext conftest.$ac_ext
3235         CPPFLAGS="$cf_save"
3236
3237 fi
3238 rm -f conftest.$ac_objext conftest.$ac_ext
3239
3240 fi
3241 echo "$as_me:3241: result: $cf_cv_gnu_source" >&5
3242 echo "${ECHO_T}$cf_cv_gnu_source" >&6
3243
3244 if test "$cf_cv_gnu_source" = yes
3245 then
3246 echo "$as_me:3246: checking if we should also define _DEFAULT_SOURCE" >&5
3247 echo $ECHO_N "checking if we should also define _DEFAULT_SOURCE... $ECHO_C" >&6
3248 if test "${cf_cv_default_source+set}" = set; then
3249   echo $ECHO_N "(cached) $ECHO_C" >&6
3250 else
3251
3252 CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
3253         cat >conftest.$ac_ext <<_ACEOF
3254 #line 3254 "configure"
3255 #include "confdefs.h"
3256 #include <sys/types.h>
3257 int
3258 main ()
3259 {
3260
3261 #ifdef _DEFAULT_SOURCE
3262 make an error
3263 #endif
3264   ;
3265   return 0;
3266 }
3267 _ACEOF
3268 rm -f conftest.$ac_objext
3269 if { (eval echo "$as_me:3269: \"$ac_compile\"") >&5
3270   (eval $ac_compile) 2>&5
3271   ac_status=$?
3272   echo "$as_me:3272: \$? = $ac_status" >&5
3273   (exit $ac_status); } &&
3274          { ac_try='test -s conftest.$ac_objext'
3275   { (eval echo "$as_me:3275: \"$ac_try\"") >&5
3276   (eval $ac_try) 2>&5
3277   ac_status=$?
3278   echo "$as_me:3278: \$? = $ac_status" >&5
3279   (exit $ac_status); }; }; then
3280   cf_cv_default_source=no
3281 else
3282   echo "$as_me: failed program was:" >&5
3283 cat conftest.$ac_ext >&5
3284 cf_cv_default_source=yes
3285 fi
3286 rm -f conftest.$ac_objext conftest.$ac_ext
3287
3288 fi
3289 echo "$as_me:3289: result: $cf_cv_default_source" >&5
3290 echo "${ECHO_T}$cf_cv_default_source" >&6
3291 test "$cf_cv_default_source" = yes && CPPFLAGS="$CPPFLAGS -D_DEFAULT_SOURCE"
3292 fi
3293
3294         ;;
3295 (minix*)
3296         cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this...
3297         ;;
3298 (mirbsd*)
3299         # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
3300         cf_XOPEN_SOURCE=
3301
3302 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
3303
3304 cf_save_CFLAGS="$CFLAGS"
3305 cf_save_CPPFLAGS="$CPPFLAGS"
3306
3307 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
3308         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
3309                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
3310
3311 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
3312         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
3313                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
3314
3315 echo "$as_me:3315: checking if we should define _POSIX_C_SOURCE" >&5
3316 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
3317 if test "${cf_cv_posix_c_source+set}" = set; then
3318   echo $ECHO_N "(cached) $ECHO_C" >&6
3319 else
3320
3321 echo "${as_me:-configure}:3321: testing if the symbol is already defined go no further ..." 1>&5
3322
3323         cat >conftest.$ac_ext <<_ACEOF
3324 #line 3324 "configure"
3325 #include "confdefs.h"
3326 #include <sys/types.h>
3327 int
3328 main ()
3329 {
3330
3331 #ifndef _POSIX_C_SOURCE
3332 make an error
3333 #endif
3334   ;
3335   return 0;
3336 }
3337 _ACEOF
3338 rm -f conftest.$ac_objext
3339 if { (eval echo "$as_me:3339: \"$ac_compile\"") >&5
3340   (eval $ac_compile) 2>&5
3341   ac_status=$?
3342   echo "$as_me:3342: \$? = $ac_status" >&5
3343   (exit $ac_status); } &&
3344          { ac_try='test -s conftest.$ac_objext'
3345   { (eval echo "$as_me:3345: \"$ac_try\"") >&5
3346   (eval $ac_try) 2>&5
3347   ac_status=$?
3348   echo "$as_me:3348: \$? = $ac_status" >&5
3349   (exit $ac_status); }; }; then
3350   cf_cv_posix_c_source=no
3351 else
3352   echo "$as_me: failed program was:" >&5
3353 cat conftest.$ac_ext >&5
3354 cf_want_posix_source=no
3355          case .$cf_POSIX_C_SOURCE in
3356          (.[12]??*)
3357                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
3358                 ;;
3359          (.2)
3360                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
3361                 cf_want_posix_source=yes
3362                 ;;
3363          (.*)
3364                 cf_want_posix_source=yes
3365                 ;;
3366          esac
3367          if test "$cf_want_posix_source" = yes ; then
3368                 cat >conftest.$ac_ext <<_ACEOF
3369 #line 3369 "configure"
3370 #include "confdefs.h"
3371 #include <sys/types.h>
3372 int
3373 main ()
3374 {
3375
3376 #ifdef _POSIX_SOURCE
3377 make an error
3378 #endif
3379   ;
3380   return 0;
3381 }
3382 _ACEOF
3383 rm -f conftest.$ac_objext
3384 if { (eval echo "$as_me:3384: \"$ac_compile\"") >&5
3385   (eval $ac_compile) 2>&5
3386   ac_status=$?
3387   echo "$as_me:3387: \$? = $ac_status" >&5
3388   (exit $ac_status); } &&
3389          { ac_try='test -s conftest.$ac_objext'
3390   { (eval echo "$as_me:3390: \"$ac_try\"") >&5
3391   (eval $ac_try) 2>&5
3392   ac_status=$?
3393   echo "$as_me:3393: \$? = $ac_status" >&5
3394   (exit $ac_status); }; }; then
3395   :
3396 else
3397   echo "$as_me: failed program was:" >&5
3398 cat conftest.$ac_ext >&5
3399 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
3400 fi
3401 rm -f conftest.$ac_objext conftest.$ac_ext
3402          fi
3403
3404 echo "${as_me:-configure}:3404: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
3405
3406          CFLAGS="$cf_trim_CFLAGS"
3407          CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
3408
3409 echo "${as_me:-configure}:3409: testing if the second compile does not leave our definition intact error ..." 1>&5
3410
3411          cat >conftest.$ac_ext <<_ACEOF
3412 #line 3412 "configure"
3413 #include "confdefs.h"
3414 #include <sys/types.h>
3415 int
3416 main ()
3417 {
3418
3419 #ifndef _POSIX_C_SOURCE
3420 make an error
3421 #endif
3422   ;
3423   return 0;
3424 }
3425 _ACEOF
3426 rm -f conftest.$ac_objext
3427 if { (eval echo "$as_me:3427: \"$ac_compile\"") >&5
3428   (eval $ac_compile) 2>&5
3429   ac_status=$?
3430   echo "$as_me:3430: \$? = $ac_status" >&5
3431   (exit $ac_status); } &&
3432          { ac_try='test -s conftest.$ac_objext'
3433   { (eval echo "$as_me:3433: \"$ac_try\"") >&5
3434   (eval $ac_try) 2>&5
3435   ac_status=$?
3436   echo "$as_me:3436: \$? = $ac_status" >&5
3437   (exit $ac_status); }; }; then
3438   :
3439 else
3440   echo "$as_me: failed program was:" >&5
3441 cat conftest.$ac_ext >&5
3442 cf_cv_posix_c_source=no
3443 fi
3444 rm -f conftest.$ac_objext conftest.$ac_ext
3445          CFLAGS="$cf_save_CFLAGS"
3446          CPPFLAGS="$cf_save_CPPFLAGS"
3447
3448 fi
3449 rm -f conftest.$ac_objext conftest.$ac_ext
3450
3451 fi
3452 echo "$as_me:3452: result: $cf_cv_posix_c_source" >&5
3453 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
3454
3455 if test "$cf_cv_posix_c_source" != no ; then
3456         CFLAGS="$cf_trim_CFLAGS"
3457         CPPFLAGS="$cf_trim_CPPFLAGS"
3458
3459 cf_fix_cppflags=no
3460 cf_new_cflags=
3461 cf_new_cppflags=
3462 cf_new_extra_cppflags=
3463
3464 for cf_add_cflags in $cf_cv_posix_c_source
3465 do
3466 case $cf_fix_cppflags in
3467 (no)
3468         case $cf_add_cflags in
3469         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
3470                 case $cf_add_cflags in
3471                 (-D*)
3472                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
3473
3474                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3475                                 && test -z "${cf_tst_cflags}" \
3476                                 && cf_fix_cppflags=yes
3477
3478                         if test $cf_fix_cppflags = yes ; then
3479
3480         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
3481         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
3482
3483                                 continue
3484                         elif test "${cf_tst_cflags}" = "\"'" ; then
3485
3486         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
3487         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
3488
3489                                 continue
3490                         fi
3491                         ;;
3492                 esac
3493                 case "$CPPFLAGS" in
3494                 (*$cf_add_cflags)
3495                         ;;
3496                 (*)
3497                         case $cf_add_cflags in
3498                         (-D*)
3499                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
3500
3501 CPPFLAGS=`echo "$CPPFLAGS" | \
3502         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
3503                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
3504
3505                                 ;;
3506                         esac
3507
3508         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
3509         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
3510
3511                         ;;
3512                 esac
3513                 ;;
3514         (*)
3515
3516         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
3517         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
3518
3519                 ;;
3520         esac
3521         ;;
3522 (yes)
3523
3524         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
3525         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
3526
3527         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
3528
3529         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3530                 && test -z "${cf_tst_cflags}" \
3531                 && cf_fix_cppflags=no
3532         ;;
3533 esac
3534 done
3535
3536 if test -n "$cf_new_cflags" ; then
3537
3538         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
3539         CFLAGS="${CFLAGS}$cf_new_cflags"
3540
3541 fi
3542
3543 if test -n "$cf_new_cppflags" ; then
3544
3545         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
3546         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
3547
3548 fi
3549
3550 if test -n "$cf_new_extra_cppflags" ; then
3551
3552         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
3553         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
3554
3555 fi
3556
3557 fi
3558
3559         ;;
3560 (netbsd*)
3561         cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
3562         ;;
3563 (openbsd[4-9]*)
3564         # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
3565         cf_xopen_source="-D_BSD_SOURCE"
3566         cf_XOPEN_SOURCE=600
3567         ;;
3568 (openbsd*)
3569         # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
3570         ;;
3571 (osf[45]*)
3572         cf_xopen_source="-D_OSF_SOURCE"
3573         ;;
3574 (nto-qnx*)
3575         cf_xopen_source="-D_QNX_SOURCE"
3576         ;;
3577 (sco*)
3578         # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
3579         ;;
3580 (solaris2.*)
3581         cf_xopen_source="-D__EXTENSIONS__"
3582         cf_cv_xopen_source=broken
3583         ;;
3584 (sysv4.2uw2.*) # Novell/SCO UnixWare 2.x (tested on 2.1.2)
3585         cf_XOPEN_SOURCE=
3586         cf_POSIX_C_SOURCE=
3587         ;;
3588 (*)
3589
3590 echo "$as_me:3590: checking if we should define _XOPEN_SOURCE" >&5
3591 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
3592 if test "${cf_cv_xopen_source+set}" = set; then
3593   echo $ECHO_N "(cached) $ECHO_C" >&6
3594 else
3595
3596         cat >conftest.$ac_ext <<_ACEOF
3597 #line 3597 "configure"
3598 #include "confdefs.h"
3599
3600 #include <stdlib.h>
3601 #include <string.h>
3602 #include <sys/types.h>
3603
3604 int
3605 main ()
3606 {
3607
3608 #ifndef _XOPEN_SOURCE
3609 make an error
3610 #endif
3611   ;
3612   return 0;
3613 }
3614 _ACEOF
3615 rm -f conftest.$ac_objext
3616 if { (eval echo "$as_me:3616: \"$ac_compile\"") >&5
3617   (eval $ac_compile) 2>&5
3618   ac_status=$?
3619   echo "$as_me:3619: \$? = $ac_status" >&5
3620   (exit $ac_status); } &&
3621          { ac_try='test -s conftest.$ac_objext'
3622   { (eval echo "$as_me:3622: \"$ac_try\"") >&5
3623   (eval $ac_try) 2>&5
3624   ac_status=$?
3625   echo "$as_me:3625: \$? = $ac_status" >&5
3626   (exit $ac_status); }; }; then
3627   cf_cv_xopen_source=no
3628 else
3629   echo "$as_me: failed program was:" >&5
3630 cat conftest.$ac_ext >&5
3631 cf_save="$CPPFLAGS"
3632          CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
3633          cat >conftest.$ac_ext <<_ACEOF
3634 #line 3634 "configure"
3635 #include "confdefs.h"
3636
3637 #include <stdlib.h>
3638 #include <string.h>
3639 #include <sys/types.h>
3640
3641 int
3642 main ()
3643 {
3644
3645 #ifdef _XOPEN_SOURCE
3646 make an error
3647 #endif
3648   ;
3649   return 0;
3650 }
3651 _ACEOF
3652 rm -f conftest.$ac_objext
3653 if { (eval echo "$as_me:3653: \"$ac_compile\"") >&5
3654   (eval $ac_compile) 2>&5
3655   ac_status=$?
3656   echo "$as_me:3656: \$? = $ac_status" >&5
3657   (exit $ac_status); } &&
3658          { ac_try='test -s conftest.$ac_objext'
3659   { (eval echo "$as_me:3659: \"$ac_try\"") >&5
3660   (eval $ac_try) 2>&5
3661   ac_status=$?
3662   echo "$as_me:3662: \$? = $ac_status" >&5
3663   (exit $ac_status); }; }; then
3664   cf_cv_xopen_source=no
3665 else
3666   echo "$as_me: failed program was:" >&5
3667 cat conftest.$ac_ext >&5
3668 cf_cv_xopen_source=$cf_XOPEN_SOURCE
3669 fi
3670 rm -f conftest.$ac_objext conftest.$ac_ext
3671         CPPFLAGS="$cf_save"
3672
3673 fi
3674 rm -f conftest.$ac_objext conftest.$ac_ext
3675
3676 fi
3677 echo "$as_me:3677: result: $cf_cv_xopen_source" >&5
3678 echo "${ECHO_T}$cf_cv_xopen_source" >&6
3679
3680 if test "$cf_cv_xopen_source" != no ; then
3681
3682 CFLAGS=`echo "$CFLAGS" | \
3683         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
3684                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
3685
3686 CPPFLAGS=`echo "$CPPFLAGS" | \
3687         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
3688                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
3689
3690         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
3691
3692 cf_fix_cppflags=no
3693 cf_new_cflags=
3694 cf_new_cppflags=
3695 cf_new_extra_cppflags=
3696
3697 for cf_add_cflags in $cf_temp_xopen_source
3698 do
3699 case $cf_fix_cppflags in
3700 (no)
3701         case $cf_add_cflags in
3702         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
3703                 case $cf_add_cflags in
3704                 (-D*)
3705                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
3706
3707                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3708                                 && test -z "${cf_tst_cflags}" \
3709                                 && cf_fix_cppflags=yes
3710
3711                         if test $cf_fix_cppflags = yes ; then
3712
3713         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
3714         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
3715
3716                                 continue
3717                         elif test "${cf_tst_cflags}" = "\"'" ; then
3718
3719         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
3720         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
3721
3722                                 continue
3723                         fi
3724                         ;;
3725                 esac
3726                 case "$CPPFLAGS" in
3727                 (*$cf_add_cflags)
3728                         ;;
3729                 (*)
3730                         case $cf_add_cflags in
3731                         (-D*)
3732                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
3733
3734 CPPFLAGS=`echo "$CPPFLAGS" | \
3735         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
3736                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
3737
3738                                 ;;
3739                         esac
3740
3741         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
3742         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
3743
3744                         ;;
3745                 esac
3746                 ;;
3747         (*)
3748
3749         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
3750         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
3751
3752                 ;;
3753         esac
3754         ;;
3755 (yes)
3756
3757         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
3758         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
3759
3760         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
3761
3762         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3763                 && test -z "${cf_tst_cflags}" \
3764                 && cf_fix_cppflags=no
3765         ;;
3766 esac
3767 done
3768
3769 if test -n "$cf_new_cflags" ; then
3770
3771         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
3772         CFLAGS="${CFLAGS}$cf_new_cflags"
3773
3774 fi
3775
3776 if test -n "$cf_new_cppflags" ; then
3777
3778         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
3779         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
3780
3781 fi
3782
3783 if test -n "$cf_new_extra_cppflags" ; then
3784
3785         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
3786         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
3787
3788 fi
3789
3790 fi
3791
3792 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
3793
3794 cf_save_CFLAGS="$CFLAGS"
3795 cf_save_CPPFLAGS="$CPPFLAGS"
3796
3797 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
3798         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
3799                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
3800
3801 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
3802         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
3803                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
3804
3805 echo "$as_me:3805: checking if we should define _POSIX_C_SOURCE" >&5
3806 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
3807 if test "${cf_cv_posix_c_source+set}" = set; then
3808   echo $ECHO_N "(cached) $ECHO_C" >&6
3809 else
3810
3811 echo "${as_me:-configure}:3811: testing if the symbol is already defined go no further ..." 1>&5
3812
3813         cat >conftest.$ac_ext <<_ACEOF
3814 #line 3814 "configure"
3815 #include "confdefs.h"
3816 #include <sys/types.h>
3817 int
3818 main ()
3819 {
3820
3821 #ifndef _POSIX_C_SOURCE
3822 make an error
3823 #endif
3824   ;
3825   return 0;
3826 }
3827 _ACEOF
3828 rm -f conftest.$ac_objext
3829 if { (eval echo "$as_me:3829: \"$ac_compile\"") >&5
3830   (eval $ac_compile) 2>&5
3831   ac_status=$?
3832   echo "$as_me:3832: \$? = $ac_status" >&5
3833   (exit $ac_status); } &&
3834          { ac_try='test -s conftest.$ac_objext'
3835   { (eval echo "$as_me:3835: \"$ac_try\"") >&5
3836   (eval $ac_try) 2>&5
3837   ac_status=$?
3838   echo "$as_me:3838: \$? = $ac_status" >&5
3839   (exit $ac_status); }; }; then
3840   cf_cv_posix_c_source=no
3841 else
3842   echo "$as_me: failed program was:" >&5
3843 cat conftest.$ac_ext >&5
3844 cf_want_posix_source=no
3845          case .$cf_POSIX_C_SOURCE in
3846          (.[12]??*)
3847                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
3848                 ;;
3849          (.2)
3850                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
3851                 cf_want_posix_source=yes
3852                 ;;
3853          (.*)
3854                 cf_want_posix_source=yes
3855                 ;;
3856          esac
3857          if test "$cf_want_posix_source" = yes ; then
3858                 cat >conftest.$ac_ext <<_ACEOF
3859 #line 3859 "configure"
3860 #include "confdefs.h"
3861 #include <sys/types.h>
3862 int
3863 main ()
3864 {
3865
3866 #ifdef _POSIX_SOURCE
3867 make an error
3868 #endif
3869   ;
3870   return 0;
3871 }
3872 _ACEOF
3873 rm -f conftest.$ac_objext
3874 if { (eval echo "$as_me:3874: \"$ac_compile\"") >&5
3875   (eval $ac_compile) 2>&5
3876   ac_status=$?
3877   echo "$as_me:3877: \$? = $ac_status" >&5
3878   (exit $ac_status); } &&
3879          { ac_try='test -s conftest.$ac_objext'
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   :
3886 else
3887   echo "$as_me: failed program was:" >&5
3888 cat conftest.$ac_ext >&5
3889 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
3890 fi
3891 rm -f conftest.$ac_objext conftest.$ac_ext
3892          fi
3893
3894 echo "${as_me:-configure}:3894: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
3895
3896          CFLAGS="$cf_trim_CFLAGS"
3897          CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
3898
3899 echo "${as_me:-configure}:3899: testing if the second compile does not leave our definition intact error ..." 1>&5
3900
3901          cat >conftest.$ac_ext <<_ACEOF
3902 #line 3902 "configure"
3903 #include "confdefs.h"
3904 #include <sys/types.h>
3905 int
3906 main ()
3907 {
3908
3909 #ifndef _POSIX_C_SOURCE
3910 make an error
3911 #endif
3912   ;
3913   return 0;
3914 }
3915 _ACEOF
3916 rm -f conftest.$ac_objext
3917 if { (eval echo "$as_me:3917: \"$ac_compile\"") >&5
3918   (eval $ac_compile) 2>&5
3919   ac_status=$?
3920   echo "$as_me:3920: \$? = $ac_status" >&5
3921   (exit $ac_status); } &&
3922          { ac_try='test -s conftest.$ac_objext'
3923   { (eval echo "$as_me:3923: \"$ac_try\"") >&5
3924   (eval $ac_try) 2>&5
3925   ac_status=$?
3926   echo "$as_me:3926: \$? = $ac_status" >&5
3927   (exit $ac_status); }; }; then
3928   :
3929 else
3930   echo "$as_me: failed program was:" >&5
3931 cat conftest.$ac_ext >&5
3932 cf_cv_posix_c_source=no
3933 fi
3934 rm -f conftest.$ac_objext conftest.$ac_ext
3935          CFLAGS="$cf_save_CFLAGS"
3936          CPPFLAGS="$cf_save_CPPFLAGS"
3937
3938 fi
3939 rm -f conftest.$ac_objext conftest.$ac_ext
3940
3941 fi
3942 echo "$as_me:3942: result: $cf_cv_posix_c_source" >&5
3943 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
3944
3945 if test "$cf_cv_posix_c_source" != no ; then
3946         CFLAGS="$cf_trim_CFLAGS"
3947         CPPFLAGS="$cf_trim_CPPFLAGS"
3948
3949 cf_fix_cppflags=no
3950 cf_new_cflags=
3951 cf_new_cppflags=
3952 cf_new_extra_cppflags=
3953
3954 for cf_add_cflags in $cf_cv_posix_c_source
3955 do
3956 case $cf_fix_cppflags in
3957 (no)
3958         case $cf_add_cflags in
3959         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
3960                 case $cf_add_cflags in
3961                 (-D*)
3962                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
3963
3964                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3965                                 && test -z "${cf_tst_cflags}" \
3966                                 && cf_fix_cppflags=yes
3967
3968                         if test $cf_fix_cppflags = yes ; then
3969
3970         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
3971         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
3972
3973                                 continue
3974                         elif test "${cf_tst_cflags}" = "\"'" ; then
3975
3976         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
3977         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
3978
3979                                 continue
3980                         fi
3981                         ;;
3982                 esac
3983                 case "$CPPFLAGS" in
3984                 (*$cf_add_cflags)
3985                         ;;
3986                 (*)
3987                         case $cf_add_cflags in
3988                         (-D*)
3989                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
3990
3991 CPPFLAGS=`echo "$CPPFLAGS" | \
3992         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \