Check-in Lasker-2.2.3 tar ball from samba.org
[capablanca.git] / lasker-2.2.3 / src / configure
1 #! /bin/sh
2
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated automatically using autoconf version 2.13 
5 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
6 #
7 # This configure script is free software; the Free Software Foundation
8 # gives unlimited permission to copy, distribute and modify it.
9
10 # Defaults:
11 ac_help=
12 ac_default_prefix=/usr/local
13 # Any additions from configure.in:
14
15 # Initialize some variables set by options.
16 # The variables have the same names as the options, with
17 # dashes changed to underlines.
18 build=NONE
19 cache_file=./config.cache
20 exec_prefix=NONE
21 host=NONE
22 no_create=
23 nonopt=NONE
24 no_recursion=
25 prefix=NONE
26 program_prefix=NONE
27 program_suffix=NONE
28 program_transform_name=s,x,x,
29 silent=
30 site=
31 srcdir=
32 target=NONE
33 verbose=
34 x_includes=NONE
35 x_libraries=NONE
36 bindir='${exec_prefix}/bin'
37 sbindir='${exec_prefix}/sbin'
38 libexecdir='${exec_prefix}/libexec'
39 datadir='${prefix}/share'
40 sysconfdir='${prefix}/etc'
41 sharedstatedir='${prefix}/com'
42 localstatedir='${prefix}/var'
43 libdir='${exec_prefix}/lib'
44 includedir='${prefix}/include'
45 oldincludedir='/usr/include'
46 infodir='${prefix}/info'
47 mandir='${prefix}/man'
48
49 # Initialize some other variables.
50 subdirs=
51 MFLAGS= MAKEFLAGS=
52 SHELL=${CONFIG_SHELL-/bin/sh}
53 # Maximum number of lines to put in a shell here document.
54 ac_max_here_lines=12
55
56 ac_prev=
57 for ac_option
58 do
59
60   # If the previous option needs an argument, assign it.
61   if test -n "$ac_prev"; then
62     eval "$ac_prev=\$ac_option"
63     ac_prev=
64     continue
65   fi
66
67   case "$ac_option" in
68   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
69   *) ac_optarg= ;;
70   esac
71
72   # Accept the important Cygnus configure options, so we can diagnose typos.
73
74   case "$ac_option" in
75
76   -bindir | --bindir | --bindi | --bind | --bin | --bi)
77     ac_prev=bindir ;;
78   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
79     bindir="$ac_optarg" ;;
80
81   -build | --build | --buil | --bui | --bu)
82     ac_prev=build ;;
83   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
84     build="$ac_optarg" ;;
85
86   -cache-file | --cache-file | --cache-fil | --cache-fi \
87   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
88     ac_prev=cache_file ;;
89   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
90   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
91     cache_file="$ac_optarg" ;;
92
93   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
94     ac_prev=datadir ;;
95   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
96   | --da=*)
97     datadir="$ac_optarg" ;;
98
99   -disable-* | --disable-*)
100     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
101     # Reject names that are not valid shell variable names.
102     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
103       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
104     fi
105     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
106     eval "enable_${ac_feature}=no" ;;
107
108   -enable-* | --enable-*)
109     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
110     # Reject names that are not valid shell variable names.
111     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
112       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
113     fi
114     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
115     case "$ac_option" in
116       *=*) ;;
117       *) ac_optarg=yes ;;
118     esac
119     eval "enable_${ac_feature}='$ac_optarg'" ;;
120
121   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
122   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
123   | --exec | --exe | --ex)
124     ac_prev=exec_prefix ;;
125   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
126   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
127   | --exec=* | --exe=* | --ex=*)
128     exec_prefix="$ac_optarg" ;;
129
130   -gas | --gas | --ga | --g)
131     # Obsolete; use --with-gas.
132     with_gas=yes ;;
133
134   -help | --help | --hel | --he)
135     # Omit some internal or obsolete options to make the list less imposing.
136     # This message is too long to be a string in the A/UX 3.1 sh.
137     cat << EOF
138 Usage: configure [options] [host]
139 Options: [defaults in brackets after descriptions]
140 Configuration:
141   --cache-file=FILE       cache test results in FILE
142   --help                  print this message
143   --no-create             do not create output files
144   --quiet, --silent       do not print \`checking...' messages
145   --version               print the version of autoconf that created configure
146 Directory and file names:
147   --prefix=PREFIX         install architecture-independent files in PREFIX
148                           [$ac_default_prefix]
149   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
150                           [same as prefix]
151   --bindir=DIR            user executables in DIR [EPREFIX/bin]
152   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
153   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
154   --datadir=DIR           read-only architecture-independent data in DIR
155                           [PREFIX/share]
156   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
157   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
158                           [PREFIX/com]
159   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
160   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
161   --includedir=DIR        C header files in DIR [PREFIX/include]
162   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
163   --infodir=DIR           info documentation in DIR [PREFIX/info]
164   --mandir=DIR            man documentation in DIR [PREFIX/man]
165   --srcdir=DIR            find the sources in DIR [configure dir or ..]
166   --program-prefix=PREFIX prepend PREFIX to installed program names
167   --program-suffix=SUFFIX append SUFFIX to installed program names
168   --program-transform-name=PROGRAM
169                           run sed PROGRAM on installed program names
170 EOF
171     cat << EOF
172 Host type:
173   --build=BUILD           configure for building on BUILD [BUILD=HOST]
174   --host=HOST             configure for HOST [guessed]
175   --target=TARGET         configure for TARGET [TARGET=HOST]
176 Features and packages:
177   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
178   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
179   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
180   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
181   --x-includes=DIR        X include files are in DIR
182   --x-libraries=DIR       X library files are in DIR
183 EOF
184     if test -n "$ac_help"; then
185       echo "--enable and --with options recognized:$ac_help"
186     fi
187     exit 0 ;;
188
189   -host | --host | --hos | --ho)
190     ac_prev=host ;;
191   -host=* | --host=* | --hos=* | --ho=*)
192     host="$ac_optarg" ;;
193
194   -includedir | --includedir | --includedi | --included | --include \
195   | --includ | --inclu | --incl | --inc)
196     ac_prev=includedir ;;
197   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
198   | --includ=* | --inclu=* | --incl=* | --inc=*)
199     includedir="$ac_optarg" ;;
200
201   -infodir | --infodir | --infodi | --infod | --info | --inf)
202     ac_prev=infodir ;;
203   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
204     infodir="$ac_optarg" ;;
205
206   -libdir | --libdir | --libdi | --libd)
207     ac_prev=libdir ;;
208   -libdir=* | --libdir=* | --libdi=* | --libd=*)
209     libdir="$ac_optarg" ;;
210
211   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
212   | --libexe | --libex | --libe)
213     ac_prev=libexecdir ;;
214   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
215   | --libexe=* | --libex=* | --libe=*)
216     libexecdir="$ac_optarg" ;;
217
218   -localstatedir | --localstatedir | --localstatedi | --localstated \
219   | --localstate | --localstat | --localsta | --localst \
220   | --locals | --local | --loca | --loc | --lo)
221     ac_prev=localstatedir ;;
222   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
223   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
224   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
225     localstatedir="$ac_optarg" ;;
226
227   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
228     ac_prev=mandir ;;
229   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
230     mandir="$ac_optarg" ;;
231
232   -nfp | --nfp | --nf)
233     # Obsolete; use --without-fp.
234     with_fp=no ;;
235
236   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
237   | --no-cr | --no-c)
238     no_create=yes ;;
239
240   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
241   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
242     no_recursion=yes ;;
243
244   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
245   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
246   | --oldin | --oldi | --old | --ol | --o)
247     ac_prev=oldincludedir ;;
248   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
249   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
250   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
251     oldincludedir="$ac_optarg" ;;
252
253   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
254     ac_prev=prefix ;;
255   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
256     prefix="$ac_optarg" ;;
257
258   -program-prefix | --program-prefix | --program-prefi | --program-pref \
259   | --program-pre | --program-pr | --program-p)
260     ac_prev=program_prefix ;;
261   -program-prefix=* | --program-prefix=* | --program-prefi=* \
262   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
263     program_prefix="$ac_optarg" ;;
264
265   -program-suffix | --program-suffix | --program-suffi | --program-suff \
266   | --program-suf | --program-su | --program-s)
267     ac_prev=program_suffix ;;
268   -program-suffix=* | --program-suffix=* | --program-suffi=* \
269   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
270     program_suffix="$ac_optarg" ;;
271
272   -program-transform-name | --program-transform-name \
273   | --program-transform-nam | --program-transform-na \
274   | --program-transform-n | --program-transform- \
275   | --program-transform | --program-transfor \
276   | --program-transfo | --program-transf \
277   | --program-trans | --program-tran \
278   | --progr-tra | --program-tr | --program-t)
279     ac_prev=program_transform_name ;;
280   -program-transform-name=* | --program-transform-name=* \
281   | --program-transform-nam=* | --program-transform-na=* \
282   | --program-transform-n=* | --program-transform-=* \
283   | --program-transform=* | --program-transfor=* \
284   | --program-transfo=* | --program-transf=* \
285   | --program-trans=* | --program-tran=* \
286   | --progr-tra=* | --program-tr=* | --program-t=*)
287     program_transform_name="$ac_optarg" ;;
288
289   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
290   | -silent | --silent | --silen | --sile | --sil)
291     silent=yes ;;
292
293   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
294     ac_prev=sbindir ;;
295   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
296   | --sbi=* | --sb=*)
297     sbindir="$ac_optarg" ;;
298
299   -sharedstatedir | --sharedstatedir | --sharedstatedi \
300   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
301   | --sharedst | --shareds | --shared | --share | --shar \
302   | --sha | --sh)
303     ac_prev=sharedstatedir ;;
304   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
305   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
306   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
307   | --sha=* | --sh=*)
308     sharedstatedir="$ac_optarg" ;;
309
310   -site | --site | --sit)
311     ac_prev=site ;;
312   -site=* | --site=* | --sit=*)
313     site="$ac_optarg" ;;
314
315   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
316     ac_prev=srcdir ;;
317   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
318     srcdir="$ac_optarg" ;;
319
320   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
321   | --syscon | --sysco | --sysc | --sys | --sy)
322     ac_prev=sysconfdir ;;
323   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
324   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
325     sysconfdir="$ac_optarg" ;;
326
327   -target | --target | --targe | --targ | --tar | --ta | --t)
328     ac_prev=target ;;
329   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
330     target="$ac_optarg" ;;
331
332   -v | -verbose | --verbose | --verbos | --verbo | --verb)
333     verbose=yes ;;
334
335   -version | --version | --versio | --versi | --vers)
336     echo "configure generated by autoconf version 2.13"
337     exit 0 ;;
338
339   -with-* | --with-*)
340     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
341     # Reject names that are not valid shell variable names.
342     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
343       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
344     fi
345     ac_package=`echo $ac_package| sed 's/-/_/g'`
346     case "$ac_option" in
347       *=*) ;;
348       *) ac_optarg=yes ;;
349     esac
350     eval "with_${ac_package}='$ac_optarg'" ;;
351
352   -without-* | --without-*)
353     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
354     # Reject names that are not valid shell variable names.
355     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
356       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
357     fi
358     ac_package=`echo $ac_package| sed 's/-/_/g'`
359     eval "with_${ac_package}=no" ;;
360
361   --x)
362     # Obsolete; use --with-x.
363     with_x=yes ;;
364
365   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
366   | --x-incl | --x-inc | --x-in | --x-i)
367     ac_prev=x_includes ;;
368   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
369   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
370     x_includes="$ac_optarg" ;;
371
372   -x-libraries | --x-libraries | --x-librarie | --x-librari \
373   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
374     ac_prev=x_libraries ;;
375   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
376   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
377     x_libraries="$ac_optarg" ;;
378
379   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
380     ;;
381
382   *)
383     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
384       echo "configure: warning: $ac_option: invalid host type" 1>&2
385     fi
386     if test "x$nonopt" != xNONE; then
387       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
388     fi
389     nonopt="$ac_option"
390     ;;
391
392   esac
393 done
394
395 if test -n "$ac_prev"; then
396   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
397 fi
398
399 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
400
401 # File descriptor usage:
402 # 0 standard input
403 # 1 file creation
404 # 2 errors and warnings
405 # 3 some systems may open it to /dev/tty
406 # 4 used on the Kubota Titan
407 # 6 checking for... messages and results
408 # 5 compiler messages saved in config.log
409 if test "$silent" = yes; then
410   exec 6>/dev/null
411 else
412   exec 6>&1
413 fi
414 exec 5>./config.log
415
416 echo "\
417 This file contains any messages produced by compilers while
418 running configure, to aid debugging if configure makes a mistake.
419 " 1>&5
420
421 # Strip out --no-create and --no-recursion so they do not pile up.
422 # Also quote any args containing shell metacharacters.
423 ac_configure_args=
424 for ac_arg
425 do
426   case "$ac_arg" in
427   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
428   | --no-cr | --no-c) ;;
429   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
430   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
431   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
432   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
433   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
434   esac
435 done
436
437 # NLS nuisances.
438 # Only set these to C if already set.  These must not be set unconditionally
439 # because not all systems understand e.g. LANG=C (notably SCO).
440 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
441 # Non-C LC_CTYPE values break the ctype check.
442 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
443 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
444 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
445 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
446
447 # confdefs.h avoids OS command line length limits that DEFS can exceed.
448 rm -rf conftest* confdefs.h
449 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
450 echo > confdefs.h
451
452 # A filename unique to this package, relative to the directory that
453 # configure is in, which we can look for to find out if srcdir is correct.
454 ac_unique_file=acconfig.h
455
456 # Find the source files, if location was not specified.
457 if test -z "$srcdir"; then
458   ac_srcdir_defaulted=yes
459   # Try the directory containing this script, then its parent.
460   ac_prog=$0
461   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
462   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
463   srcdir=$ac_confdir
464   if test ! -r $srcdir/$ac_unique_file; then
465     srcdir=..
466   fi
467 else
468   ac_srcdir_defaulted=no
469 fi
470 if test ! -r $srcdir/$ac_unique_file; then
471   if test "$ac_srcdir_defaulted" = yes; then
472     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
473   else
474     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
475   fi
476 fi
477 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
478
479 # Prefer explicitly selected file to automatically selected ones.
480 if test -z "$CONFIG_SITE"; then
481   if test "x$prefix" != xNONE; then
482     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
483   else
484     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
485   fi
486 fi
487 for ac_site_file in $CONFIG_SITE; do
488   if test -r "$ac_site_file"; then
489     echo "loading site script $ac_site_file"
490     . "$ac_site_file"
491   fi
492 done
493
494 if test -r "$cache_file"; then
495   echo "loading cache $cache_file"
496   . $cache_file
497 else
498   echo "creating cache $cache_file"
499   > $cache_file
500 fi
501
502 ac_ext=c
503 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
504 ac_cpp='$CPP $CPPFLAGS'
505 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
506 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
507 cross_compiling=$ac_cv_prog_cc_cross
508
509 ac_exeext=
510 ac_objext=o
511 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
512   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
513   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
514     ac_n= ac_c='
515 ' ac_t='        '
516   else
517     ac_n=-n ac_c= ac_t=
518   fi
519 else
520   ac_n= ac_c='\c' ac_t=
521 fi
522
523
524
525
526
527 CHESSD_CFLAGS=""
528
529 # Extract the first word of "gcc", so it can be a program name with args.
530 set dummy gcc; ac_word=$2
531 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
532 echo "configure:533: checking for $ac_word" >&5
533 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
534   echo $ac_n "(cached) $ac_c" 1>&6
535 else
536   if test -n "$CC"; then
537   ac_cv_prog_CC="$CC" # Let the user override the test.
538 else
539   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
540   ac_dummy="$PATH"
541   for ac_dir in $ac_dummy; do
542     test -z "$ac_dir" && ac_dir=.
543     if test -f $ac_dir/$ac_word; then
544       ac_cv_prog_CC="gcc"
545       break
546     fi
547   done
548   IFS="$ac_save_ifs"
549 fi
550 fi
551 CC="$ac_cv_prog_CC"
552 if test -n "$CC"; then
553   echo "$ac_t""$CC" 1>&6
554 else
555   echo "$ac_t""no" 1>&6
556 fi
557
558 if test -z "$CC"; then
559   # Extract the first word of "cc", so it can be a program name with args.
560 set dummy cc; ac_word=$2
561 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
562 echo "configure:563: checking for $ac_word" >&5
563 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
564   echo $ac_n "(cached) $ac_c" 1>&6
565 else
566   if test -n "$CC"; then
567   ac_cv_prog_CC="$CC" # Let the user override the test.
568 else
569   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
570   ac_prog_rejected=no
571   ac_dummy="$PATH"
572   for ac_dir in $ac_dummy; do
573     test -z "$ac_dir" && ac_dir=.
574     if test -f $ac_dir/$ac_word; then
575       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
576         ac_prog_rejected=yes
577         continue
578       fi
579       ac_cv_prog_CC="cc"
580       break
581     fi
582   done
583   IFS="$ac_save_ifs"
584 if test $ac_prog_rejected = yes; then
585   # We found a bogon in the path, so make sure we never use it.
586   set dummy $ac_cv_prog_CC
587   shift
588   if test $# -gt 0; then
589     # We chose a different compiler from the bogus one.
590     # However, it has the same basename, so the bogon will be chosen
591     # first if we set CC to just the basename; use the full file name.
592     shift
593     set dummy "$ac_dir/$ac_word" "$@"
594     shift
595     ac_cv_prog_CC="$@"
596   fi
597 fi
598 fi
599 fi
600 CC="$ac_cv_prog_CC"
601 if test -n "$CC"; then
602   echo "$ac_t""$CC" 1>&6
603 else
604   echo "$ac_t""no" 1>&6
605 fi
606
607   if test -z "$CC"; then
608     case "`uname -s`" in
609     *win32* | *WIN32*)
610       # Extract the first word of "cl", so it can be a program name with args.
611 set dummy cl; ac_word=$2
612 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
613 echo "configure:614: checking for $ac_word" >&5
614 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
615   echo $ac_n "(cached) $ac_c" 1>&6
616 else
617   if test -n "$CC"; then
618   ac_cv_prog_CC="$CC" # Let the user override the test.
619 else
620   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
621   ac_dummy="$PATH"
622   for ac_dir in $ac_dummy; do
623     test -z "$ac_dir" && ac_dir=.
624     if test -f $ac_dir/$ac_word; then
625       ac_cv_prog_CC="cl"
626       break
627     fi
628   done
629   IFS="$ac_save_ifs"
630 fi
631 fi
632 CC="$ac_cv_prog_CC"
633 if test -n "$CC"; then
634   echo "$ac_t""$CC" 1>&6
635 else
636   echo "$ac_t""no" 1>&6
637 fi
638  ;;
639     esac
640   fi
641   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
642 fi
643
644 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
645 echo "configure:646: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
646
647 ac_ext=c
648 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
649 ac_cpp='$CPP $CPPFLAGS'
650 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
651 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
652 cross_compiling=$ac_cv_prog_cc_cross
653
654 cat > conftest.$ac_ext << EOF
655
656 #line 657 "configure"
657 #include "confdefs.h"
658
659 main(){return(0);}
660 EOF
661 if { (eval echo configure:662: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
662   ac_cv_prog_cc_works=yes
663   # If we can't run a trivial program, we are probably using a cross compiler.
664   if (./conftest; exit) 2>/dev/null; then
665     ac_cv_prog_cc_cross=no
666   else
667     ac_cv_prog_cc_cross=yes
668   fi
669 else
670   echo "configure: failed program was:" >&5
671   cat conftest.$ac_ext >&5
672   ac_cv_prog_cc_works=no
673 fi
674 rm -fr conftest*
675 ac_ext=c
676 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
677 ac_cpp='$CPP $CPPFLAGS'
678 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
679 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
680 cross_compiling=$ac_cv_prog_cc_cross
681
682 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
683 if test $ac_cv_prog_cc_works = no; then
684   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
685 fi
686 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
687 echo "configure:688: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
688 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
689 cross_compiling=$ac_cv_prog_cc_cross
690
691 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
692 echo "configure:693: checking whether we are using GNU C" >&5
693 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
694   echo $ac_n "(cached) $ac_c" 1>&6
695 else
696   cat > conftest.c <<EOF
697 #ifdef __GNUC__
698   yes;
699 #endif
700 EOF
701 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:702: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
702   ac_cv_prog_gcc=yes
703 else
704   ac_cv_prog_gcc=no
705 fi
706 fi
707
708 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
709
710 if test $ac_cv_prog_gcc = yes; then
711   GCC=yes
712 else
713   GCC=
714 fi
715
716 ac_test_CFLAGS="${CFLAGS+set}"
717 ac_save_CFLAGS="$CFLAGS"
718 CFLAGS=
719 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
720 echo "configure:721: checking whether ${CC-cc} accepts -g" >&5
721 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
722   echo $ac_n "(cached) $ac_c" 1>&6
723 else
724   echo 'void f(){}' > conftest.c
725 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
726   ac_cv_prog_cc_g=yes
727 else
728   ac_cv_prog_cc_g=no
729 fi
730 rm -f conftest*
731
732 fi
733
734 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
735 if test "$ac_test_CFLAGS" = set; then
736   CFLAGS="$ac_save_CFLAGS"
737 elif test $ac_cv_prog_cc_g = yes; then
738   if test "$GCC" = yes; then
739     CFLAGS="-g -O2"
740   else
741     CFLAGS="-g"
742   fi
743 else
744   if test "$GCC" = yes; then
745     CFLAGS="-O2"
746   else
747     CFLAGS=
748   fi
749 fi
750
751 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
752 echo "configure:753: checking whether ln -s works" >&5
753 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
754   echo $ac_n "(cached) $ac_c" 1>&6
755 else
756   rm -f conftestdata
757 if ln -s X conftestdata 2>/dev/null
758 then
759   rm -f conftestdata
760   ac_cv_prog_LN_S="ln -s"
761 else
762   ac_cv_prog_LN_S=ln
763 fi
764 fi
765 LN_S="$ac_cv_prog_LN_S"
766 if test "$ac_cv_prog_LN_S" = "ln -s"; then
767   echo "$ac_t""yes" 1>&6
768 else
769   echo "$ac_t""no" 1>&6
770 fi
771
772 ac_aux_dir=
773 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
774   if test -f $ac_dir/install-sh; then
775     ac_aux_dir=$ac_dir
776     ac_install_sh="$ac_aux_dir/install-sh -c"
777     break
778   elif test -f $ac_dir/install.sh; then
779     ac_aux_dir=$ac_dir
780     ac_install_sh="$ac_aux_dir/install.sh -c"
781     break
782   fi
783 done
784 if test -z "$ac_aux_dir"; then
785   { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
786 fi
787 ac_config_guess=$ac_aux_dir/config.guess
788 ac_config_sub=$ac_aux_dir/config.sub
789 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
790
791 # Find a good install program.  We prefer a C program (faster),
792 # so one script is as good as another.  But avoid the broken or
793 # incompatible versions:
794 # SysV /etc/install, /usr/sbin/install
795 # SunOS /usr/etc/install
796 # IRIX /sbin/install
797 # AIX /bin/install
798 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
799 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
800 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
801 # ./install, which can be erroneously created by make from ./install.sh.
802 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
803 echo "configure:804: checking for a BSD compatible install" >&5
804 if test -z "$INSTALL"; then
805 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
806   echo $ac_n "(cached) $ac_c" 1>&6
807 else
808     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
809   for ac_dir in $PATH; do
810     # Account for people who put trailing slashes in PATH elements.
811     case "$ac_dir/" in
812     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
813     *)
814       # OSF1 and SCO ODT 3.0 have their own names for install.
815       # Don't use installbsd from OSF since it installs stuff as root
816       # by default.
817       for ac_prog in ginstall scoinst install; do
818         if test -f $ac_dir/$ac_prog; then
819           if test $ac_prog = install &&
820             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
821             # AIX install.  It has an incompatible calling convention.
822             :
823           else
824             ac_cv_path_install="$ac_dir/$ac_prog -c"
825             break 2
826           fi
827         fi
828       done
829       ;;
830     esac
831   done
832   IFS="$ac_save_IFS"
833
834 fi
835   if test "${ac_cv_path_install+set}" = set; then
836     INSTALL="$ac_cv_path_install"
837   else
838     # As a last resort, use the slow shell script.  We don't cache a
839     # path for INSTALL within a source directory, because that will
840     # break other packages using the cache if that directory is
841     # removed, or if the path is relative.
842     INSTALL="$ac_install_sh"
843   fi
844 fi
845 echo "$ac_t""$INSTALL" 1>&6
846
847 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
848 # It thinks the first close brace ends the variable substitution.
849 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
850
851 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
852
853 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
854
855
856 echo $ac_n "checking for main in -lm""... $ac_c" 1>&6
857 echo "configure:858: checking for main in -lm" >&5
858 ac_lib_var=`echo m'_'main | sed 'y%./+-%__p_%'`
859 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
860   echo $ac_n "(cached) $ac_c" 1>&6
861 else
862   ac_save_LIBS="$LIBS"
863 LIBS="-lm  $LIBS"
864 cat > conftest.$ac_ext <<EOF
865 #line 866 "configure"
866 #include "confdefs.h"
867
868 int main() {
869 main()
870 ; return 0; }
871 EOF
872 if { (eval echo configure:873: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
873   rm -rf conftest*
874   eval "ac_cv_lib_$ac_lib_var=yes"
875 else
876   echo "configure: failed program was:" >&5
877   cat conftest.$ac_ext >&5
878   rm -rf conftest*
879   eval "ac_cv_lib_$ac_lib_var=no"
880 fi
881 rm -f conftest*
882 LIBS="$ac_save_LIBS"
883
884 fi
885 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
886   echo "$ac_t""yes" 1>&6
887     ac_tr_lib=HAVE_LIB`echo m | sed -e 's/[^a-zA-Z0-9_]/_/g' \
888     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
889   cat >> confdefs.h <<EOF
890 #define $ac_tr_lib 1
891 EOF
892
893   LIBS="-lm $LIBS"
894
895 else
896   echo "$ac_t""no" 1>&6
897 fi
898
899
900 ac_header_dirent=no
901 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
902 do
903 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
904 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
905 echo "configure:906: checking for $ac_hdr that defines DIR" >&5
906 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
907   echo $ac_n "(cached) $ac_c" 1>&6
908 else
909   cat > conftest.$ac_ext <<EOF
910 #line 911 "configure"
911 #include "confdefs.h"
912 #include <sys/types.h>
913 #include <$ac_hdr>
914 int main() {
915 DIR *dirp = 0;
916 ; return 0; }
917 EOF
918 if { (eval echo configure:919: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
919   rm -rf conftest*
920   eval "ac_cv_header_dirent_$ac_safe=yes"
921 else
922   echo "configure: failed program was:" >&5
923   cat conftest.$ac_ext >&5
924   rm -rf conftest*
925   eval "ac_cv_header_dirent_$ac_safe=no"
926 fi
927 rm -f conftest*
928 fi
929 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
930   echo "$ac_t""yes" 1>&6
931     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
932   cat >> confdefs.h <<EOF
933 #define $ac_tr_hdr 1
934 EOF
935  ac_header_dirent=$ac_hdr; break
936 else
937   echo "$ac_t""no" 1>&6
938 fi
939 done
940 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
941 if test $ac_header_dirent = dirent.h; then
942 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
943 echo "configure:944: checking for opendir in -ldir" >&5
944 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
945 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
946   echo $ac_n "(cached) $ac_c" 1>&6
947 else
948   ac_save_LIBS="$LIBS"
949 LIBS="-ldir  $LIBS"
950 cat > conftest.$ac_ext <<EOF
951 #line 952 "configure"
952 #include "confdefs.h"
953 /* Override any gcc2 internal prototype to avoid an error.  */
954 /* We use char because int might match the return type of a gcc2
955     builtin and then its argument prototype would still apply.  */
956 char opendir();
957
958 int main() {
959 opendir()
960 ; return 0; }
961 EOF
962 if { (eval echo configure:963: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
963   rm -rf conftest*
964   eval "ac_cv_lib_$ac_lib_var=yes"
965 else
966   echo "configure: failed program was:" >&5
967   cat conftest.$ac_ext >&5
968   rm -rf conftest*
969   eval "ac_cv_lib_$ac_lib_var=no"
970 fi
971 rm -f conftest*
972 LIBS="$ac_save_LIBS"
973
974 fi
975 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
976   echo "$ac_t""yes" 1>&6
977   LIBS="$LIBS -ldir"
978 else
979   echo "$ac_t""no" 1>&6
980 fi
981
982 else
983 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
984 echo "configure:985: checking for opendir in -lx" >&5
985 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
986 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
987   echo $ac_n "(cached) $ac_c" 1>&6
988 else
989   ac_save_LIBS="$LIBS"
990 LIBS="-lx  $LIBS"
991 cat > conftest.$ac_ext <<EOF
992 #line 993 "configure"
993 #include "confdefs.h"
994 /* Override any gcc2 internal prototype to avoid an error.  */
995 /* We use char because int might match the return type of a gcc2
996     builtin and then its argument prototype would still apply.  */
997 char opendir();
998
999 int main() {
1000 opendir()
1001 ; return 0; }
1002 EOF
1003 if { (eval echo configure:1004: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1004   rm -rf conftest*
1005   eval "ac_cv_lib_$ac_lib_var=yes"
1006 else
1007   echo "configure: failed program was:" >&5
1008   cat conftest.$ac_ext >&5
1009   rm -rf conftest*
1010   eval "ac_cv_lib_$ac_lib_var=no"
1011 fi
1012 rm -f conftest*
1013 LIBS="$ac_save_LIBS"
1014
1015 fi
1016 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1017   echo "$ac_t""yes" 1>&6
1018   LIBS="$LIBS -lx"
1019 else
1020   echo "$ac_t""no" 1>&6
1021 fi
1022
1023 fi
1024
1025 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
1026 echo "configure:1027: checking how to run the C preprocessor" >&5
1027 # On Suns, sometimes $CPP names a directory.
1028 if test -n "$CPP" && test -d "$CPP"; then
1029   CPP=
1030 fi
1031 if test -z "$CPP"; then
1032 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1033   echo $ac_n "(cached) $ac_c" 1>&6
1034 else
1035     # This must be in double quotes, not single quotes, because CPP may get
1036   # substituted into the Makefile and "${CC-cc}" will confuse make.
1037   CPP="${CC-cc} -E"
1038   # On the NeXT, cc -E runs the code through the compiler's parser,
1039   # not just through cpp.
1040   cat > conftest.$ac_ext <<EOF
1041 #line 1042 "configure"
1042 #include "confdefs.h"
1043 #include <assert.h>
1044 Syntax Error
1045 EOF
1046 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1047 { (eval echo configure:1048: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1048 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1049 if test -z "$ac_err"; then
1050   :
1051 else
1052   echo "$ac_err" >&5
1053   echo "configure: failed program was:" >&5
1054   cat conftest.$ac_ext >&5
1055   rm -rf conftest*
1056   CPP="${CC-cc} -E -traditional-cpp"
1057   cat > conftest.$ac_ext <<EOF
1058 #line 1059 "configure"
1059 #include "confdefs.h"
1060 #include <assert.h>
1061 Syntax Error
1062 EOF
1063 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1064 { (eval echo configure:1065: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1065 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1066 if test -z "$ac_err"; then
1067   :
1068 else
1069   echo "$ac_err" >&5
1070   echo "configure: failed program was:" >&5
1071   cat conftest.$ac_ext >&5
1072   rm -rf conftest*
1073   CPP="${CC-cc} -nologo -E"
1074   cat > conftest.$ac_ext <<EOF
1075 #line 1076 "configure"
1076 #include "confdefs.h"
1077 #include <assert.h>
1078 Syntax Error
1079 EOF
1080 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1081 { (eval echo configure:1082: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1082 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1083 if test -z "$ac_err"; then
1084   :
1085 else
1086   echo "$ac_err" >&5
1087   echo "configure: failed program was:" >&5
1088   cat conftest.$ac_ext >&5
1089   rm -rf conftest*
1090   CPP=/lib/cpp
1091 fi
1092 rm -f conftest*
1093 fi
1094 rm -f conftest*
1095 fi
1096 rm -f conftest*
1097   ac_cv_prog_CPP="$CPP"
1098 fi
1099   CPP="$ac_cv_prog_CPP"
1100 else
1101   ac_cv_prog_CPP="$CPP"
1102 fi
1103 echo "$ac_t""$CPP" 1>&6
1104
1105 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
1106 echo "configure:1107: checking for ANSI C header files" >&5
1107 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1108   echo $ac_n "(cached) $ac_c" 1>&6
1109 else
1110   cat > conftest.$ac_ext <<EOF
1111 #line 1112 "configure"
1112 #include "confdefs.h"
1113 #include <stdlib.h>
1114 #include <stdarg.h>
1115 #include <string.h>
1116 #include <float.h>
1117 EOF
1118 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1119 { (eval echo configure:1120: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1120 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1121 if test -z "$ac_err"; then
1122   rm -rf conftest*
1123   ac_cv_header_stdc=yes
1124 else
1125   echo "$ac_err" >&5
1126   echo "configure: failed program was:" >&5
1127   cat conftest.$ac_ext >&5
1128   rm -rf conftest*
1129   ac_cv_header_stdc=no
1130 fi
1131 rm -f conftest*
1132
1133 if test $ac_cv_header_stdc = yes; then
1134   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1135 cat > conftest.$ac_ext <<EOF
1136 #line 1137 "configure"
1137 #include "confdefs.h"
1138 #include <string.h>
1139 EOF
1140 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1141   egrep "memchr" >/dev/null 2>&1; then
1142   :
1143 else
1144   rm -rf conftest*
1145   ac_cv_header_stdc=no
1146 fi
1147 rm -f conftest*
1148
1149 fi
1150
1151 if test $ac_cv_header_stdc = yes; then
1152   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1153 cat > conftest.$ac_ext <<EOF
1154 #line 1155 "configure"
1155 #include "confdefs.h"
1156 #include <stdlib.h>
1157 EOF
1158 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1159   egrep "free" >/dev/null 2>&1; then
1160   :
1161 else
1162   rm -rf conftest*
1163   ac_cv_header_stdc=no
1164 fi
1165 rm -f conftest*
1166
1167 fi
1168
1169 if test $ac_cv_header_stdc = yes; then
1170   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1171 if test "$cross_compiling" = yes; then
1172   :
1173 else
1174   cat > conftest.$ac_ext <<EOF
1175 #line 1176 "configure"
1176 #include "confdefs.h"
1177 #include <ctype.h>
1178 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1179 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
1180 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
1181 int main () { int i; for (i = 0; i < 256; i++)
1182 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1183 exit (0); }
1184
1185 EOF
1186 if { (eval echo configure:1187: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1187 then
1188   :
1189 else
1190   echo "configure: failed program was:" >&5
1191   cat conftest.$ac_ext >&5
1192   rm -fr conftest*
1193   ac_cv_header_stdc=no
1194 fi
1195 rm -fr conftest*
1196 fi
1197
1198 fi
1199 fi
1200
1201 echo "$ac_t""$ac_cv_header_stdc" 1>&6
1202 if test $ac_cv_header_stdc = yes; then
1203   cat >> confdefs.h <<\EOF
1204 #define STDC_HEADERS 1
1205 EOF
1206
1207 fi
1208
1209 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
1210 echo "configure:1211: checking for sys/wait.h that is POSIX.1 compatible" >&5
1211 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
1212   echo $ac_n "(cached) $ac_c" 1>&6
1213 else
1214   cat > conftest.$ac_ext <<EOF
1215 #line 1216 "configure"
1216 #include "confdefs.h"
1217 #include <sys/types.h>
1218 #include <sys/wait.h>
1219 #ifndef WEXITSTATUS
1220 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
1221 #endif
1222 #ifndef WIFEXITED
1223 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
1224 #endif
1225 int main() {
1226 int s;
1227 wait (&s);
1228 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
1229 ; return 0; }
1230 EOF
1231 if { (eval echo configure:1232: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1232   rm -rf conftest*
1233   ac_cv_header_sys_wait_h=yes
1234 else
1235   echo "configure: failed program was:" >&5
1236   cat conftest.$ac_ext >&5
1237   rm -rf conftest*
1238   ac_cv_header_sys_wait_h=no
1239 fi
1240 rm -f conftest*
1241 fi
1242
1243 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
1244 if test $ac_cv_header_sys_wait_h = yes; then
1245   cat >> confdefs.h <<\EOF
1246 #define HAVE_SYS_WAIT_H 1
1247 EOF
1248
1249 fi
1250
1251 for ac_hdr in fcntl.h strings.h sys/file.h sys/ioctl.h sys/md5.h sys/time.h unistd.h
1252 do
1253 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1254 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1255 echo "configure:1256: checking for $ac_hdr" >&5
1256 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1257   echo $ac_n "(cached) $ac_c" 1>&6
1258 else
1259   cat > conftest.$ac_ext <<EOF
1260 #line 1261 "configure"
1261 #include "confdefs.h"
1262 #include <$ac_hdr>
1263 EOF
1264 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1265 { (eval echo configure:1266: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1266 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1267 if test -z "$ac_err"; then
1268   rm -rf conftest*
1269   eval "ac_cv_header_$ac_safe=yes"
1270 else
1271   echo "$ac_err" >&5
1272   echo "configure: failed program was:" >&5
1273   cat conftest.$ac_ext >&5
1274   rm -rf conftest*
1275   eval "ac_cv_header_$ac_safe=no"
1276 fi
1277 rm -f conftest*
1278 fi
1279 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1280   echo "$ac_t""yes" 1>&6
1281     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1282   cat >> confdefs.h <<EOF
1283 #define $ac_tr_hdr 1
1284 EOF
1285  
1286 else
1287   echo "$ac_t""no" 1>&6
1288 fi
1289 done
1290
1291
1292 echo $ac_n "checking for working const""... $ac_c" 1>&6
1293 echo "configure:1294: checking for working const" >&5
1294 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
1295   echo $ac_n "(cached) $ac_c" 1>&6
1296 else
1297   cat > conftest.$ac_ext <<EOF
1298 #line 1299 "configure"
1299 #include "confdefs.h"
1300
1301 int main() {
1302
1303 /* Ultrix mips cc rejects this.  */
1304 typedef int charset[2]; const charset x;
1305 /* SunOS 4.1.1 cc rejects this.  */
1306 char const *const *ccp;
1307 char **p;
1308 /* NEC SVR4.0.2 mips cc rejects this.  */
1309 struct point {int x, y;};
1310 static struct point const zero = {0,0};
1311 /* AIX XL C 1.02.0.0 rejects this.
1312    It does not let you subtract one const X* pointer from another in an arm
1313    of an if-expression whose if-part is not a constant expression */
1314 const char *g = "string";
1315 ccp = &g + (g ? g-g : 0);
1316 /* HPUX 7.0 cc rejects these. */
1317 ++ccp;
1318 p = (char**) ccp;
1319 ccp = (char const *const *) p;
1320 { /* SCO 3.2v4 cc rejects this.  */
1321   char *t;
1322   char const *s = 0 ? (char *) 0 : (char const *) 0;
1323
1324   *t++ = 0;
1325 }
1326 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
1327   int x[] = {25, 17};
1328   const int *foo = &x[0];
1329   ++foo;
1330 }
1331 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
1332   typedef const int *iptr;
1333   iptr p = 0;
1334   ++p;
1335 }
1336 { /* AIX XL C 1.02.0.0 rejects this saying
1337      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
1338   struct s { int j; const int *ap[3]; };
1339   struct s *b; b->j = 5;
1340 }
1341 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
1342   const int foo = 10;
1343 }
1344
1345 ; return 0; }
1346 EOF
1347 if { (eval echo configure:1348: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1348   rm -rf conftest*
1349   ac_cv_c_const=yes
1350 else
1351   echo "configure: failed program was:" >&5
1352   cat conftest.$ac_ext >&5
1353   rm -rf conftest*
1354   ac_cv_c_const=no
1355 fi
1356 rm -f conftest*
1357 fi
1358
1359 echo "$ac_t""$ac_cv_c_const" 1>&6
1360 if test $ac_cv_c_const = no; then
1361   cat >> confdefs.h <<\EOF
1362 #define const 
1363 EOF
1364
1365 fi
1366
1367 echo $ac_n "checking for size_t""... $ac_c" 1>&6
1368 echo "configure:1369: checking for size_t" >&5
1369 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
1370   echo $ac_n "(cached) $ac_c" 1>&6
1371 else
1372   cat > conftest.$ac_ext <<EOF
1373 #line 1374 "configure"
1374 #include "confdefs.h"
1375 #include <sys/types.h>
1376 #if STDC_HEADERS
1377 #include <stdlib.h>
1378 #include <stddef.h>
1379 #endif
1380 EOF
1381 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1382   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
1383   rm -rf conftest*
1384   ac_cv_type_size_t=yes
1385 else
1386   rm -rf conftest*
1387   ac_cv_type_size_t=no
1388 fi
1389 rm -f conftest*
1390
1391 fi
1392 echo "$ac_t""$ac_cv_type_size_t" 1>&6
1393 if test $ac_cv_type_size_t = no; then
1394   cat >> confdefs.h <<\EOF
1395 #define size_t unsigned
1396 EOF
1397
1398 fi
1399
1400 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
1401 echo "configure:1402: checking whether time.h and sys/time.h may both be included" >&5
1402 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
1403   echo $ac_n "(cached) $ac_c" 1>&6
1404 else
1405   cat > conftest.$ac_ext <<EOF
1406 #line 1407 "configure"
1407 #include "confdefs.h"
1408 #include <sys/types.h>
1409 #include <sys/time.h>
1410 #include <time.h>
1411 int main() {
1412 struct tm *tp;
1413 ; return 0; }
1414 EOF
1415 if { (eval echo configure:1416: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1416   rm -rf conftest*
1417   ac_cv_header_time=yes
1418 else
1419   echo "configure: failed program was:" >&5
1420   cat conftest.$ac_ext >&5
1421   rm -rf conftest*
1422   ac_cv_header_time=no
1423 fi
1424 rm -f conftest*
1425 fi
1426
1427 echo "$ac_t""$ac_cv_header_time" 1>&6
1428 if test $ac_cv_header_time = yes; then
1429   cat >> confdefs.h <<\EOF
1430 #define TIME_WITH_SYS_TIME 1
1431 EOF
1432
1433 fi
1434
1435 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
1436 echo "configure:1437: checking whether struct tm is in sys/time.h or time.h" >&5
1437 if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
1438   echo $ac_n "(cached) $ac_c" 1>&6
1439 else
1440   cat > conftest.$ac_ext <<EOF
1441 #line 1442 "configure"
1442 #include "confdefs.h"
1443 #include <sys/types.h>
1444 #include <time.h>
1445 int main() {
1446 struct tm *tp; tp->tm_sec;
1447 ; return 0; }
1448 EOF
1449 if { (eval echo configure:1450: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1450   rm -rf conftest*
1451   ac_cv_struct_tm=time.h
1452 else
1453   echo "configure: failed program was:" >&5
1454   cat conftest.$ac_ext >&5
1455   rm -rf conftest*
1456   ac_cv_struct_tm=sys/time.h
1457 fi
1458 rm -f conftest*
1459 fi
1460
1461 echo "$ac_t""$ac_cv_struct_tm" 1>&6
1462 if test $ac_cv_struct_tm = sys/time.h; then
1463   cat >> confdefs.h <<\EOF
1464 #define TM_IN_SYS_TIME 1
1465 EOF
1466
1467 fi
1468
1469
1470 for ac_func in dlopen
1471 do
1472 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1473 echo "configure:1474: checking for $ac_func" >&5
1474 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1475   echo $ac_n "(cached) $ac_c" 1>&6
1476 else
1477   cat > conftest.$ac_ext <<EOF
1478 #line 1479 "configure"
1479 #include "confdefs.h"
1480 /* System header to define __stub macros and hopefully few prototypes,
1481     which can conflict with char $ac_func(); below.  */
1482 #include <assert.h>
1483 /* Override any gcc2 internal prototype to avoid an error.  */
1484 /* We use char because int might match the return type of a gcc2
1485     builtin and then its argument prototype would still apply.  */
1486 char $ac_func();
1487
1488 int main() {
1489
1490 /* The GNU C library defines this for functions which it implements
1491     to always fail with ENOSYS.  Some functions are actually named
1492     something starting with __ and the normal name is an alias.  */
1493 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1494 choke me
1495 #else
1496 $ac_func();
1497 #endif
1498
1499 ; return 0; }
1500 EOF
1501 if { (eval echo configure:1502: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1502   rm -rf conftest*
1503   eval "ac_cv_func_$ac_func=yes"
1504 else
1505   echo "configure: failed program was:" >&5
1506   cat conftest.$ac_ext >&5
1507   rm -rf conftest*
1508   eval "ac_cv_func_$ac_func=no"
1509 fi
1510 rm -f conftest*
1511 fi
1512
1513 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1514   echo "$ac_t""yes" 1>&6
1515     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1516   cat >> confdefs.h <<EOF
1517 #define $ac_tr_func 1
1518 EOF
1519  
1520 else
1521   echo "$ac_t""no" 1>&6
1522 fi
1523 done
1524
1525 if test x"$ac_cv_func_dlopen" = x"no"; then
1526     echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
1527 echo "configure:1528: checking for dlopen in -ldl" >&5
1528 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
1529 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1530   echo $ac_n "(cached) $ac_c" 1>&6
1531 else
1532   ac_save_LIBS="$LIBS"
1533 LIBS="-ldl  $LIBS"
1534 cat > conftest.$ac_ext <<EOF
1535 #line 1536 "configure"
1536 #include "confdefs.h"
1537 /* Override any gcc2 internal prototype to avoid an error.  */
1538 /* We use char because int might match the return type of a gcc2
1539     builtin and then its argument prototype would still apply.  */
1540 char dlopen();
1541
1542 int main() {
1543 dlopen()
1544 ; return 0; }
1545 EOF
1546 if { (eval echo configure:1547: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1547   rm -rf conftest*
1548   eval "ac_cv_lib_$ac_lib_var=yes"
1549 else
1550   echo "configure: failed program was:" >&5
1551   cat conftest.$ac_ext >&5
1552   rm -rf conftest*
1553   eval "ac_cv_lib_$ac_lib_var=no"
1554 fi
1555 rm -f conftest*
1556 LIBS="$ac_save_LIBS"
1557
1558 fi
1559 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1560   echo "$ac_t""yes" 1>&6
1561   LIBS="$LIBS -ldl";
1562         cat >> confdefs.h <<\EOF
1563 #define HAVE_DLOPEN 1
1564 EOF
1565
1566 else
1567   echo "$ac_t""no" 1>&6
1568 fi
1569
1570 fi
1571
1572 echo $ac_n "checking for compar_fn_t in stdlib.h""... $ac_c" 1>&6
1573 echo "configure:1574: checking for compar_fn_t in stdlib.h" >&5
1574 if eval "test \"`echo '$''{'ccache_cv_COMPAR_FN_T'+set}'`\" = set"; then
1575   echo $ac_n "(cached) $ac_c" 1>&6
1576 else
1577   
1578     cat > conftest.$ac_ext <<EOF
1579 #line 1580 "configure"
1580 #include "confdefs.h"
1581 #include <stdlib.h>
1582 int main() {
1583
1584 void test_fn(void) { qsort(NULL, 0, 0, (__compar_fn_t)NULL); }
1585
1586 ; return 0; }
1587 EOF
1588 if { (eval echo configure:1589: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1589   rm -rf conftest*
1590   ccache_cv_COMPAR_FN_T=yes
1591 else
1592   echo "configure: failed program was:" >&5
1593   cat conftest.$ac_ext >&5
1594   rm -rf conftest*
1595   ccache_cv_COMPAR_FN_T=no
1596 fi
1597 rm -f conftest*
1598 fi
1599
1600 echo "$ac_t""$ccache_cv_COMPAR_FN_T" 1>&6
1601 if test x"$ccache_cv_COMPAR_FN_T" = x"yes"; then
1602    cat >> confdefs.h <<\EOF
1603 #define HAVE_COMPAR_FN_T 1
1604 EOF
1605
1606 fi
1607
1608 if test $ac_cv_prog_gcc = yes; then
1609     echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6
1610 echo "configure:1611: checking whether ${CC-cc} needs -traditional" >&5
1611 if eval "test \"`echo '$''{'ac_cv_prog_gcc_traditional'+set}'`\" = set"; then
1612   echo $ac_n "(cached) $ac_c" 1>&6
1613 else
1614     ac_pattern="Autoconf.*'x'"
1615   cat > conftest.$ac_ext <<EOF
1616 #line 1617 "configure"
1617 #include "confdefs.h"
1618 #include <sgtty.h>
1619 Autoconf TIOCGETP
1620 EOF
1621 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1622   egrep "$ac_pattern" >/dev/null 2>&1; then
1623   rm -rf conftest*
1624   ac_cv_prog_gcc_traditional=yes
1625 else
1626   rm -rf conftest*
1627   ac_cv_prog_gcc_traditional=no
1628 fi
1629 rm -f conftest*
1630
1631
1632   if test $ac_cv_prog_gcc_traditional = no; then
1633     cat > conftest.$ac_ext <<EOF
1634 #line 1635 "configure"
1635 #include "confdefs.h"
1636 #include <termio.h>
1637 Autoconf TCGETA
1638 EOF
1639 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1640   egrep "$ac_pattern" >/dev/null 2>&1; then
1641   rm -rf conftest*
1642   ac_cv_prog_gcc_traditional=yes
1643 fi
1644 rm -f conftest*
1645
1646   fi
1647 fi
1648
1649 echo "$ac_t""$ac_cv_prog_gcc_traditional" 1>&6
1650   if test $ac_cv_prog_gcc_traditional = yes; then
1651     CC="$CC -traditional"
1652   fi
1653 fi
1654
1655 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
1656 echo "configure:1657: checking return type of signal handlers" >&5
1657 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
1658   echo $ac_n "(cached) $ac_c" 1>&6
1659 else
1660   cat > conftest.$ac_ext <<EOF
1661 #line 1662 "configure"
1662 #include "confdefs.h"
1663 #include <sys/types.h>
1664 #include <signal.h>
1665 #ifdef signal
1666 #undef signal
1667 #endif
1668 #ifdef __cplusplus
1669 extern "C" void (*signal (int, void (*)(int)))(int);
1670 #else
1671 void (*signal ()) ();
1672 #endif
1673
1674 int main() {
1675 int i;
1676 ; return 0; }
1677 EOF
1678 if { (eval echo configure:1679: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1679   rm -rf conftest*
1680   ac_cv_type_signal=void
1681 else
1682   echo "configure: failed program was:" >&5
1683   cat conftest.$ac_ext >&5
1684   rm -rf conftest*
1685   ac_cv_type_signal=int
1686 fi
1687 rm -f conftest*
1688 fi
1689
1690 echo "$ac_t""$ac_cv_type_signal" 1>&6
1691 cat >> confdefs.h <<EOF
1692 #define RETSIGTYPE $ac_cv_type_signal
1693 EOF
1694
1695
1696 echo $ac_n "checking for strftime""... $ac_c" 1>&6
1697 echo "configure:1698: checking for strftime" >&5
1698 if eval "test \"`echo '$''{'ac_cv_func_strftime'+set}'`\" = set"; then
1699   echo $ac_n "(cached) $ac_c" 1>&6
1700 else
1701   cat > conftest.$ac_ext <<EOF
1702 #line 1703 "configure"
1703 #include "confdefs.h"
1704 /* System header to define __stub macros and hopefully few prototypes,
1705     which can conflict with char strftime(); below.  */
1706 #include <assert.h>
1707 /* Override any gcc2 internal prototype to avoid an error.  */
1708 /* We use char because int might match the return type of a gcc2
1709     builtin and then its argument prototype would still apply.  */
1710 char strftime();
1711
1712 int main() {
1713
1714 /* The GNU C library defines this for functions which it implements
1715     to always fail with ENOSYS.  Some functions are actually named
1716     something starting with __ and the normal name is an alias.  */
1717 #if defined (__stub_strftime) || defined (__stub___strftime)
1718 choke me
1719 #else
1720 strftime();
1721 #endif
1722
1723 ; return 0; }
1724 EOF
1725 if { (eval echo configure:1726: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1726   rm -rf conftest*
1727   eval "ac_cv_func_strftime=yes"
1728 else
1729   echo "configure: failed program was:" >&5
1730   cat conftest.$ac_ext >&5
1731   rm -rf conftest*
1732   eval "ac_cv_func_strftime=no"
1733 fi
1734 rm -f conftest*
1735 fi
1736
1737 if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
1738   echo "$ac_t""yes" 1>&6
1739   cat >> confdefs.h <<\EOF
1740 #define HAVE_STRFTIME 1
1741 EOF
1742
1743 else
1744   echo "$ac_t""no" 1>&6
1745 # strftime is in -lintl on SCO UNIX.
1746 echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
1747 echo "configure:1748: checking for strftime in -lintl" >&5
1748 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-%__p_%'`
1749 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1750   echo $ac_n "(cached) $ac_c" 1>&6
1751 else
1752   ac_save_LIBS="$LIBS"
1753 LIBS="-lintl  $LIBS"
1754 cat > conftest.$ac_ext <<EOF
1755 #line 1756 "configure"
1756 #include "confdefs.h"
1757 /* Override any gcc2 internal prototype to avoid an error.  */
1758 /* We use char because int might match the return type of a gcc2
1759     builtin and then its argument prototype would still apply.  */
1760 char strftime();
1761
1762 int main() {
1763 strftime()
1764 ; return 0; }
1765 EOF
1766 if { (eval echo configure:1767: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1767   rm -rf conftest*
1768   eval "ac_cv_lib_$ac_lib_var=yes"
1769 else
1770   echo "configure: failed program was:" >&5
1771   cat conftest.$ac_ext >&5
1772   rm -rf conftest*
1773   eval "ac_cv_lib_$ac_lib_var=no"
1774 fi
1775 rm -f conftest*
1776 LIBS="$ac_save_LIBS"
1777
1778 fi
1779 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1780   echo "$ac_t""yes" 1>&6
1781   cat >> confdefs.h <<\EOF
1782 #define HAVE_STRFTIME 1
1783 EOF
1784
1785 LIBS="-lintl $LIBS"
1786 else
1787   echo "$ac_t""no" 1>&6
1788 fi
1789
1790 fi
1791
1792 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
1793 echo "configure:1794: checking for vprintf" >&5
1794 if eval "test \"`echo '$''{'ac_cv_func_vprintf'+set}'`\" = set"; then
1795   echo $ac_n "(cached) $ac_c" 1>&6
1796 else
1797   cat > conftest.$ac_ext <<EOF
1798 #line 1799 "configure"
1799 #include "confdefs.h"
1800 /* System header to define __stub macros and hopefully few prototypes,
1801     which can conflict with char vprintf(); below.  */
1802 #include <assert.h>
1803 /* Override any gcc2 internal prototype to avoid an error.  */
1804 /* We use char because int might match the return type of a gcc2
1805     builtin and then its argument prototype would still apply.  */
1806 char vprintf();
1807
1808 int main() {
1809
1810 /* The GNU C library defines this for functions which it implements
1811     to always fail with ENOSYS.  Some functions are actually named
1812     something starting with __ and the normal name is an alias.  */
1813 #if defined (__stub_vprintf) || defined (__stub___vprintf)
1814 choke me
1815 #else
1816 vprintf();
1817 #endif
1818
1819 ; return 0; }
1820 EOF
1821 if { (eval echo configure:1822: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1822   rm -rf conftest*
1823   eval "ac_cv_func_vprintf=yes"
1824 else
1825   echo "configure: failed program was:" >&5
1826   cat conftest.$ac_ext >&5
1827   rm -rf conftest*
1828   eval "ac_cv_func_vprintf=no"
1829 fi
1830 rm -f conftest*
1831 fi
1832
1833 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
1834   echo "$ac_t""yes" 1>&6
1835   cat >> confdefs.h <<\EOF
1836 #define HAVE_VPRINTF 1
1837 EOF
1838
1839 else
1840   echo "$ac_t""no" 1>&6
1841 fi
1842
1843 if test "$ac_cv_func_vprintf" != yes; then
1844 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
1845 echo "configure:1846: checking for _doprnt" >&5
1846 if eval "test \"`echo '$''{'ac_cv_func__doprnt'+set}'`\" = set"; then
1847   echo $ac_n "(cached) $ac_c" 1>&6
1848 else
1849   cat > conftest.$ac_ext <<EOF
1850 #line 1851 "configure"
1851 #include "confdefs.h"
1852 /* System header to define __stub macros and hopefully few prototypes,
1853     which can conflict with char _doprnt(); below.  */
1854 #include <assert.h>
1855 /* Override any gcc2 internal prototype to avoid an error.  */
1856 /* We use char because int might match the return type of a gcc2
1857     builtin and then its argument prototype would still apply.  */
1858 char _doprnt();
1859
1860 int main() {
1861
1862 /* The GNU C library defines this for functions which it implements
1863     to always fail with ENOSYS.  Some functions are actually named
1864     something starting with __ and the normal name is an alias.  */
1865 #if defined (__stub__doprnt) || defined (__stub____doprnt)
1866 choke me
1867 #else
1868 _doprnt();
1869 #endif
1870
1871 ; return 0; }
1872 EOF
1873 if { (eval echo configure:1874: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1874   rm -rf conftest*
1875   eval "ac_cv_func__doprnt=yes"
1876 else
1877   echo "configure: failed program was:" >&5
1878   cat conftest.$ac_ext >&5
1879   rm -rf conftest*
1880   eval "ac_cv_func__doprnt=no"
1881 fi
1882 rm -f conftest*
1883 fi
1884
1885 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
1886   echo "$ac_t""yes" 1>&6
1887   cat >> confdefs.h <<\EOF
1888 #define HAVE_DOPRNT 1
1889 EOF
1890
1891 else
1892   echo "$ac_t""no" 1>&6
1893 fi
1894
1895 fi
1896
1897 echo $ac_n "checking for wait3 that fills in rusage""... $ac_c" 1>&6
1898 echo "configure:1899: checking for wait3 that fills in rusage" >&5
1899 if eval "test \"`echo '$''{'ac_cv_func_wait3_rusage'+set}'`\" = set"; then
1900   echo $ac_n "(cached) $ac_c" 1>&6
1901 else
1902   if test "$cross_compiling" = yes; then
1903   ac_cv_func_wait3_rusage=no
1904 else
1905   cat > conftest.$ac_ext <<EOF
1906 #line 1907 "configure"
1907 #include "confdefs.h"
1908 #include <sys/types.h>
1909 #include <sys/time.h>
1910 #include <sys/resource.h>
1911 #include <stdio.h>
1912 /* HP-UX has wait3 but does not fill in rusage at all.  */
1913 main() {
1914   struct rusage r;
1915   int i;
1916   /* Use a field that we can force nonzero --
1917      voluntary context switches.
1918      For systems like NeXT and OSF/1 that don't set it,
1919      also use the system CPU time.  And page faults (I/O) for Linux.  */
1920   r.ru_nvcsw = 0;
1921   r.ru_stime.tv_sec = 0;
1922   r.ru_stime.tv_usec = 0;
1923   r.ru_majflt = r.ru_minflt = 0;
1924   switch (fork()) {
1925   case 0: /* Child.  */
1926     /* Unless we actually _do_ something, the kernel sometimes doesn't chalk up any system time to this process. */
1927     if(fork()) { i = 123; wait(NULL); } else { i = 234; exit(0); }
1928     sleep(1); /* Give up the CPU.  */
1929     _exit(0);
1930   case -1: _exit(0); /* What can we do?  */
1931   default: /* Parent.  */
1932     wait3(&i, 0, &r);
1933     sleep(2); /* Avoid "text file busy" from rm on fast HP-UX machines.  */
1934     exit(r.ru_nvcsw == 0 && r.ru_majflt == 0 && r.ru_minflt == 0
1935          && r.ru_stime.tv_sec == 0 && r.ru_stime.tv_usec == 0);
1936   }
1937 }
1938 EOF
1939 if { (eval echo configure:1940: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1940 then
1941   ac_cv_func_wait3_rusage=yes
1942 else
1943   echo "configure: failed program was:" >&5
1944   cat conftest.$ac_ext >&5
1945   rm -fr conftest*
1946   ac_cv_func_wait3_rusage=no
1947 fi
1948 rm -fr conftest*
1949 fi
1950
1951 fi
1952
1953 echo "$ac_t""$ac_cv_func_wait3_rusage" 1>&6
1954 if test $ac_cv_func_wait3_rusage = yes; then
1955   cat >> confdefs.h <<\EOF
1956 #define HAVE_WAIT3 1
1957 EOF
1958
1959 fi
1960
1961 for ac_func in gethostname gettimeofday select socket strcspn strdup strstr dprintf
1962 do
1963 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1964 echo "configure:1965: checking for $ac_func" >&5
1965 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1966   echo $ac_n "(cached) $ac_c" 1>&6
1967 else
1968   cat > conftest.$ac_ext <<EOF
1969 #line 1970 "configure"
1970 #include "confdefs.h"
1971 /* System header to define __stub macros and hopefully few prototypes,
1972     which can conflict with char $ac_func(); below.  */
1973 #include <assert.h>
1974 /* Override any gcc2 internal prototype to avoid an error.  */
1975 /* We use char because int might match the return type of a gcc2
1976     builtin and then its argument prototype would still apply.  */
1977 char $ac_func();
1978
1979 int main() {
1980
1981 /* The GNU C library defines this for functions which it implements
1982     to always fail with ENOSYS.  Some functions are actually named
1983     something starting with __ and the normal name is an alias.  */
1984 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1985 choke me
1986 #else
1987 $ac_func();
1988 #endif
1989
1990 ; return 0; }
1991 EOF
1992 if { (eval echo configure:1993: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1993   rm -rf conftest*
1994   eval "ac_cv_func_$ac_func=yes"
1995 else
1996   echo "configure: failed program was:" >&5
1997   cat conftest.$ac_ext >&5
1998   rm -rf conftest*
1999   eval "ac_cv_func_$ac_func=no"
2000 fi
2001 rm -f conftest*
2002 fi
2003
2004 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2005   echo "$ac_t""yes" 1>&6
2006     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2007   cat >> confdefs.h <<EOF
2008 #define $ac_tr_func 1
2009 EOF
2010  
2011 else
2012   echo "$ac_t""no" 1>&6
2013 fi
2014 done
2015
2016 for ac_func in strnlen strlcpy strlcat
2017 do
2018 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2019 echo "configure:2020: checking for $ac_func" >&5
2020 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2021   echo $ac_n "(cached) $ac_c" 1>&6
2022 else
2023   cat > conftest.$ac_ext <<EOF
2024 #line 2025 "configure"
2025 #include "confdefs.h"
2026 /* System header to define __stub macros and hopefully few prototypes,
2027     which can conflict with char $ac_func(); below.  */
2028 #include <assert.h>
2029 /* Override any gcc2 internal prototype to avoid an error.  */
2030 /* We use char because int might match the return type of a gcc2
2031     builtin and then its argument prototype would still apply.  */
2032 char $ac_func();
2033
2034 int main() {
2035
2036 /* The GNU C library defines this for functions which it implements
2037     to always fail with ENOSYS.  Some functions are actually named
2038     something starting with __ and the normal name is an alias.  */
2039 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2040 choke me
2041 #else
2042 $ac_func();
2043 #endif
2044
2045 ; return 0; }
2046 EOF
2047 if { (eval echo configure:2048: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2048   rm -rf conftest*
2049   eval "ac_cv_func_$ac_func=yes"
2050 else
2051   echo "configure: failed program was:" >&5
2052   cat conftest.$ac_ext >&5
2053   rm -rf conftest*
2054   eval "ac_cv_func_$ac_func=no"
2055 fi
2056 rm -f conftest*
2057 fi
2058
2059 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2060   echo "$ac_t""yes" 1>&6
2061     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2062   cat >> confdefs.h <<EOF
2063 #define $ac_tr_func 1
2064 EOF
2065  
2066 else
2067   echo "$ac_t""no" 1>&6
2068 fi
2069 done
2070
2071
2072
2073
2074 trap '' 1 2 15
2075 cat > confcache <<\EOF
2076 # This file is a shell script that caches the results of configure
2077 # tests run on this system so they can be shared between configure
2078 # scripts and configure runs.  It is not useful on other systems.
2079 # If it contains results you don't want to keep, you may remove or edit it.
2080 #
2081 # By default, configure uses ./config.cache as the cache file,
2082 # creating it if it does not exist already.  You can give configure
2083 # the --cache-file=FILE option to use a different cache file; that is
2084 # what configure does when it calls configure scripts in
2085 # subdirectories, so they share the cache.
2086 # Giving --cache-file=/dev/null disables caching, for debugging configure.
2087 # config.status only pays attention to the cache file if you give it the
2088 # --recheck option to rerun configure.
2089 #
2090 EOF
2091 # The following way of writing the cache mishandles newlines in values,
2092 # but we know of no workaround that is simple, portable, and efficient.
2093 # So, don't put newlines in cache variables' values.
2094 # Ultrix sh set writes to stderr and can't be redirected directly,
2095 # and sets the high bit in the cache file unless we assign to the vars.
2096 (set) 2>&1 |
2097   case `(ac_space=' '; set | grep ac_space) 2>&1` in
2098   *ac_space=\ *)
2099     # `set' does not quote correctly, so add quotes (double-quote substitution
2100     # turns \\\\ into \\, and sed turns \\ into \).
2101     sed -n \
2102       -e "s/'/'\\\\''/g" \
2103       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
2104     ;;
2105   *)
2106     # `set' quotes correctly as required by POSIX, so do not add quotes.
2107     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
2108     ;;
2109   esac >> confcache
2110 if cmp -s $cache_file confcache; then
2111   :
2112 else
2113   if test -w $cache_file; then
2114     echo "updating cache $cache_file"
2115     cat confcache > $cache_file
2116   else
2117     echo "not updating unwritable cache $cache_file"
2118   fi
2119 fi
2120 rm -f confcache
2121
2122 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
2123
2124 test "x$prefix" = xNONE && prefix=$ac_default_prefix
2125 # Let make expand exec_prefix.
2126 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
2127
2128 # Any assignment to VPATH causes Sun make to only execute
2129 # the first set of double-colon rules, so remove it if not needed.
2130 # If there is a colon in the path, we need to keep it.
2131 if test "x$srcdir" = x.; then
2132   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
2133 fi
2134
2135 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
2136
2137 DEFS=-DHAVE_CONFIG_H
2138
2139 # Without the "./", some shells look in PATH for config.status.
2140 : ${CONFIG_STATUS=./config.status}
2141
2142 echo creating $CONFIG_STATUS
2143 rm -f $CONFIG_STATUS
2144 cat > $CONFIG_STATUS <<EOF
2145 #! /bin/sh
2146 # Generated automatically by configure.
2147 # Run this file to recreate the current configuration.
2148 # This directory was configured as follows,
2149 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
2150 #
2151 # $0 $ac_configure_args
2152 #
2153 # Compiler output produced by configure, useful for debugging
2154 # configure, is in ./config.log if it exists.
2155
2156 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
2157 for ac_option
2158 do
2159   case "\$ac_option" in
2160   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
2161     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
2162     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
2163   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
2164     echo "$CONFIG_STATUS generated by autoconf version 2.13"
2165     exit 0 ;;
2166   -help | --help | --hel | --he | --h)
2167     echo "\$ac_cs_usage"; exit 0 ;;
2168   *) echo "\$ac_cs_usage"; exit 1 ;;
2169   esac
2170 done
2171
2172 ac_given_srcdir=$srcdir
2173 ac_given_INSTALL="$INSTALL"
2174
2175 trap 'rm -fr `echo "Makefile autoconfig.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
2176 EOF
2177 cat >> $CONFIG_STATUS <<EOF
2178
2179 # Protect against being on the right side of a sed subst in config.status.
2180 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
2181  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
2182 $ac_vpsub
2183 $extrasub
2184 s%@SHELL@%$SHELL%g
2185 s%@CFLAGS@%$CFLAGS%g
2186 s%@CPPFLAGS@%$CPPFLAGS%g
2187 s%@CXXFLAGS@%$CXXFLAGS%g
2188 s%@FFLAGS@%$FFLAGS%g
2189 s%@DEFS@%$DEFS%g
2190 s%@LDFLAGS@%$LDFLAGS%g
2191 s%@LIBS@%$LIBS%g
2192 s%@exec_prefix@%$exec_prefix%g
2193 s%@prefix@%$prefix%g
2194 s%@program_transform_name@%$program_transform_name%g
2195 s%@bindir@%$bindir%g
2196 s%@sbindir@%$sbindir%g
2197 s%@libexecdir@%$libexecdir%g
2198 s%@datadir@%$datadir%g
2199 s%@sysconfdir@%$sysconfdir%g
2200 s%@sharedstatedir@%$sharedstatedir%g
2201 s%@localstatedir@%$localstatedir%g
2202 s%@libdir@%$libdir%g
2203 s%@includedir@%$includedir%g
2204 s%@oldincludedir@%$oldincludedir%g
2205 s%@infodir@%$infodir%g
2206 s%@mandir@%$mandir%g
2207 s%@CC@%$CC%g
2208 s%@LN_S@%$LN_S%g
2209 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
2210 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
2211 s%@INSTALL_DATA@%$INSTALL_DATA%g
2212 s%@CPP@%$CPP%g
2213 s%@CHESSD_CFLAGS@%$CHESSD_CFLAGS%g
2214
2215 CEOF
2216 EOF
2217
2218 cat >> $CONFIG_STATUS <<\EOF
2219
2220 # Split the substitutions into bite-sized pieces for seds with
2221 # small command number limits, like on Digital OSF/1 and HP-UX.
2222 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
2223 ac_file=1 # Number of current file.
2224 ac_beg=1 # First line for current file.
2225 ac_end=$ac_max_sed_cmds # Line after last line for current file.
2226 ac_more_lines=:
2227 ac_sed_cmds=""
2228 while $ac_more_lines; do
2229   if test $ac_beg -gt 1; then
2230     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
2231   else
2232     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
2233   fi
2234   if test ! -s conftest.s$ac_file; then
2235     ac_more_lines=false
2236     rm -f conftest.s$ac_file
2237   else
2238     if test -z "$ac_sed_cmds"; then
2239       ac_sed_cmds="sed -f conftest.s$ac_file"
2240     else
2241       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
2242     fi
2243     ac_file=`expr $ac_file + 1`
2244     ac_beg=$ac_end
2245     ac_end=`expr $ac_end + $ac_max_sed_cmds`
2246   fi
2247 done
2248 if test -z "$ac_sed_cmds"; then
2249   ac_sed_cmds=cat
2250 fi
2251 EOF
2252
2253 cat >> $CONFIG_STATUS <<EOF
2254
2255 CONFIG_FILES=\${CONFIG_FILES-"Makefile"}
2256 EOF
2257 cat >> $CONFIG_STATUS <<\EOF
2258 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
2259   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
2260   case "$ac_file" in
2261   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
2262        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
2263   *) ac_file_in="${ac_file}.in" ;;
2264   esac
2265
2266   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
2267
2268   # Remove last slash and all that follows it.  Not all systems have dirname.
2269   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
2270   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
2271     # The file is in a subdirectory.
2272     test ! -d "$ac_dir" && mkdir "$ac_dir"
2273     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
2274     # A "../" for each directory in $ac_dir_suffix.
2275     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
2276   else
2277     ac_dir_suffix= ac_dots=
2278   fi
2279
2280   case "$ac_given_srcdir" in
2281   .)  srcdir=.
2282       if test -z "$ac_dots"; then top_srcdir=.
2283       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
2284   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
2285   *) # Relative path.
2286     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
2287     top_srcdir="$ac_dots$ac_given_srcdir" ;;
2288   esac
2289
2290   case "$ac_given_INSTALL" in
2291   [/$]*) INSTALL="$ac_given_INSTALL" ;;
2292   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
2293   esac
2294
2295   echo creating "$ac_file"
2296   rm -f "$ac_file"
2297   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
2298   case "$ac_file" in
2299   *Makefile*) ac_comsub="1i\\
2300 # $configure_input" ;;
2301   *) ac_comsub= ;;
2302   esac
2303
2304   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
2305   sed -e "$ac_comsub
2306 s%@configure_input@%$configure_input%g
2307 s%@srcdir@%$srcdir%g
2308 s%@top_srcdir@%$top_srcdir%g
2309 s%@INSTALL@%$INSTALL%g
2310 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
2311 fi; done
2312 rm -f conftest.s*
2313
2314 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
2315 # NAME is the cpp macro being defined and VALUE is the value it is being given.
2316 #
2317 # ac_d sets the value in "#define NAME VALUE" lines.
2318 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
2319 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
2320 ac_dC='\3'
2321 ac_dD='%g'
2322 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
2323 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
2324 ac_uB='\([      ]\)%\1#\2define\3'
2325 ac_uC=' '
2326 ac_uD='\4%g'
2327 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
2328 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
2329 ac_eB='$%\1#\2define\3'
2330 ac_eC=' '
2331 ac_eD='%g'
2332
2333 if test "${CONFIG_HEADERS+set}" != set; then
2334 EOF
2335 cat >> $CONFIG_STATUS <<EOF
2336   CONFIG_HEADERS="autoconfig.h"
2337 EOF
2338 cat >> $CONFIG_STATUS <<\EOF
2339 fi
2340 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
2341   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
2342   case "$ac_file" in
2343   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
2344        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
2345   *) ac_file_in="${ac_file}.in" ;;
2346   esac
2347
2348   echo creating $ac_file
2349
2350   rm -f conftest.frag conftest.in conftest.out
2351   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
2352   cat $ac_file_inputs > conftest.in
2353
2354 EOF
2355
2356 # Transform confdefs.h into a sed script conftest.vals that substitutes
2357 # the proper values into config.h.in to produce config.h.  And first:
2358 # Protect against being on the right side of a sed subst in config.status.
2359 # Protect against being in an unquoted here document in config.status.
2360 rm -f conftest.vals
2361 cat > conftest.hdr <<\EOF
2362 s/[\\&%]/\\&/g
2363 s%[\\$`]%\\&%g
2364 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
2365 s%ac_d%ac_u%gp
2366 s%ac_u%ac_e%gp
2367 EOF
2368 sed -n -f conftest.hdr confdefs.h > conftest.vals
2369 rm -f conftest.hdr
2370
2371 # This sed command replaces #undef with comments.  This is necessary, for
2372 # example, in the case of _POSIX_SOURCE, which is predefined and required
2373 # on some systems where configure will not decide to define it.
2374 cat >> conftest.vals <<\EOF
2375 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
2376 EOF
2377
2378 # Break up conftest.vals because some shells have a limit on
2379 # the size of here documents, and old seds have small limits too.
2380
2381 rm -f conftest.tail
2382 while :
2383 do
2384   ac_lines=`grep -c . conftest.vals`
2385   # grep -c gives empty output for an empty file on some AIX systems.
2386   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
2387   # Write a limited-size here document to conftest.frag.
2388   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
2389   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
2390   echo 'CEOF
2391   sed -f conftest.frag conftest.in > conftest.out
2392   rm -f conftest.in
2393   mv conftest.out conftest.in
2394 ' >> $CONFIG_STATUS
2395   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
2396   rm -f conftest.vals
2397   mv conftest.tail conftest.vals
2398 done
2399 rm -f conftest.vals
2400
2401 cat >> $CONFIG_STATUS <<\EOF
2402   rm -f conftest.frag conftest.h
2403   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
2404   cat conftest.in >> conftest.h
2405   rm -f conftest.in
2406   if cmp -s $ac_file conftest.h 2>/dev/null; then
2407     echo "$ac_file is unchanged"
2408     rm -f conftest.h
2409   else
2410     # Remove last slash and all that follows it.  Not all systems have dirname.
2411       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
2412       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
2413       # The file is in a subdirectory.
2414       test ! -d "$ac_dir" && mkdir "$ac_dir"
2415     fi
2416     rm -f $ac_file
2417     mv conftest.h $ac_file
2418   fi
2419 fi; done
2420
2421 EOF
2422 cat >> $CONFIG_STATUS <<EOF
2423
2424 EOF
2425 cat >> $CONFIG_STATUS <<\EOF
2426
2427 exit 0
2428 EOF
2429 chmod +x $CONFIG_STATUS
2430 rm -fr confdefs* $ac_clean_files
2431 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
2432