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