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