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