automake/autoconf fixes
[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
641 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
642
643 echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
644 echo "configure:645: checking whether build environment is sane" >&5
645 # Just in case
646 sleep 1
647 echo timestamp > conftestfile
648 # Do `set' in a subshell so we don't clobber the current shell's
649 # arguments.  Must try -L first in case configure is actually a
650 # symlink; some systems play weird games with the mod time of symlinks
651 # (eg FreeBSD returns the mod time of the symlink's containing
652 # directory).
653 if (
654    set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
655    if test "$*" = "X"; then
656       # -L didn't work.
657       set X `ls -t $srcdir/configure conftestfile`
658    fi
659    if test "$*" != "X $srcdir/configure conftestfile" \
660       && test "$*" != "X conftestfile $srcdir/configure"; then
661
662       # If neither matched, then we have a broken ls.  This can happen
663       # if, for instance, CONFIG_SHELL is bash and it inherits a
664       # broken ls alias from the environment.  This has actually
665       # happened.  Such a system could not be considered "sane".
666       { echo "configure: error: ls -t appears to fail.  Make sure there is not a broken
667 alias in your environment" 1>&2; exit 1; }
668    fi
669
670    test "$2" = conftestfile
671    )
672 then
673    # Ok.
674    :
675 else
676    { echo "configure: error: newly created file is older than distributed files!
677 Check your system clock" 1>&2; exit 1; }
678 fi
679 rm -f conftest*
680 echo "$ac_t""yes" 1>&6
681 if test "$program_transform_name" = s,x,x,; then
682   program_transform_name=
683 else
684   # Double any \ or $.  echo might interpret backslashes.
685   cat <<\EOF_SED > conftestsed
686 s,\\,\\\\,g; s,\$,$$,g
687 EOF_SED
688   program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
689   rm -f conftestsed
690 fi
691 test "$program_prefix" != NONE &&
692   program_transform_name="s,^,${program_prefix},; $program_transform_name"
693 # Use a double $ so make ignores it.
694 test "$program_suffix" != NONE &&
695   program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
696
697 # sed with no file args requires a program.
698 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
699
700 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
701 echo "configure:702: checking whether ${MAKE-make} sets \${MAKE}" >&5
702 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
703 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
704   echo $ac_n "(cached) $ac_c" 1>&6
705 else
706   cat > conftestmake <<\EOF
707 all:
708         @echo 'ac_maketemp="${MAKE}"'
709 EOF
710 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
711 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
712 if test -n "$ac_maketemp"; then
713   eval ac_cv_prog_make_${ac_make}_set=yes
714 else
715   eval ac_cv_prog_make_${ac_make}_set=no
716 fi
717 rm -f conftestmake
718 fi
719 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
720   echo "$ac_t""yes" 1>&6
721   SET_MAKE=
722 else
723   echo "$ac_t""no" 1>&6
724   SET_MAKE="MAKE=${MAKE-make}"
725 fi
726
727
728 PACKAGE=cacao
729
730 VERSION=0.40
731
732 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
733   { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
734 fi
735 cat >> confdefs.h <<EOF
736 #define PACKAGE "$PACKAGE"
737 EOF
738
739 cat >> confdefs.h <<EOF
740 #define VERSION "$VERSION"
741 EOF
742
743
744
745 missing_dir=`cd $ac_aux_dir && pwd`
746 echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
747 echo "configure:748: checking for working aclocal" >&5
748 # Run test in a subshell; some versions of sh will print an error if
749 # an executable is not found, even if stderr is redirected.
750 # Redirect stdin to placate older versions of autoconf.  Sigh.
751 if (aclocal --version) < /dev/null > /dev/null 2>&1; then
752    ACLOCAL=aclocal
753    echo "$ac_t""found" 1>&6
754 else
755    ACLOCAL="$missing_dir/missing aclocal"
756    echo "$ac_t""missing" 1>&6
757 fi
758
759 echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
760 echo "configure:761: checking for working autoconf" >&5
761 # Run test in a subshell; some versions of sh will print an error if
762 # an executable is not found, even if stderr is redirected.
763 # Redirect stdin to placate older versions of autoconf.  Sigh.
764 if (autoconf --version) < /dev/null > /dev/null 2>&1; then
765    AUTOCONF=autoconf
766    echo "$ac_t""found" 1>&6
767 else
768    AUTOCONF="$missing_dir/missing autoconf"
769    echo "$ac_t""missing" 1>&6
770 fi
771
772 echo $ac_n "checking for working automake""... $ac_c" 1>&6
773 echo "configure:774: checking for working automake" >&5
774 # Run test in a subshell; some versions of sh will print an error if
775 # an executable is not found, even if stderr is redirected.
776 # Redirect stdin to placate older versions of autoconf.  Sigh.
777 if (automake --version) < /dev/null > /dev/null 2>&1; then
778    AUTOMAKE=automake
779    echo "$ac_t""found" 1>&6
780 else
781    AUTOMAKE="$missing_dir/missing automake"
782    echo "$ac_t""missing" 1>&6
783 fi
784
785 echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
786 echo "configure:787: checking for working autoheader" >&5
787 # Run test in a subshell; some versions of sh will print an error if
788 # an executable is not found, even if stderr is redirected.
789 # Redirect stdin to placate older versions of autoconf.  Sigh.
790 if (autoheader --version) < /dev/null > /dev/null 2>&1; then
791    AUTOHEADER=autoheader
792    echo "$ac_t""found" 1>&6
793 else
794    AUTOHEADER="$missing_dir/missing autoheader"
795    echo "$ac_t""missing" 1>&6
796 fi
797
798 echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
799 echo "configure:800: checking for working makeinfo" >&5
800 # Run test in a subshell; some versions of sh will print an error if
801 # an executable is not found, even if stderr is redirected.
802 # Redirect stdin to placate older versions of autoconf.  Sigh.
803 if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
804    MAKEINFO=makeinfo
805    echo "$ac_t""found" 1>&6
806 else
807    MAKEINFO="$missing_dir/missing makeinfo"
808    echo "$ac_t""missing" 1>&6
809 fi
810
811
812
813
814
815
816
817
818
819 case "$host_cpu" in
820 alpha* )
821         SYSDEP_DIR="alpha" 
822         CFLAGS="-ieee -O2 -g3"
823         COMPILER_SOURCES="compiler.h compiler.c" 
824         COMPILER_OBJECTS="compiler.o"
825         cat >> confdefs.h <<\EOF
826 #define OLD_COMPILER 1
827 EOF
828
829         ;;
830
831 mips* )
832         SYSDEP_DIR="mips" 
833         CFLAGS="-64 -g -DMAP_ANONYMOUS=0 -woff 1048,1110,1164,1515"
834         LIBS="-lelfutil" 
835         COMPILER_SOURCES=""
836         COMPILER_OBJECTS=""
837         ;;
838
839 sparc* | powerpc* | ppc* | * )
840         { echo "configure: error: $host-cpu systems are not supported at this time" 1>&2; exit 1; } ;;
841
842 esac
843
844
845
846
847 cat >> confdefs.h <<EOF
848 #define SYSDEP_DIR "$SYSDEP_DIR"
849 EOF
850
851
852
853 # Extract the first word of "gcc", so it can be a program name with args.
854 set dummy gcc; ac_word=$2
855 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
856 echo "configure:857: checking for $ac_word" >&5
857 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
858   echo $ac_n "(cached) $ac_c" 1>&6
859 else
860   if test -n "$CC"; then
861   ac_cv_prog_CC="$CC" # Let the user override the test.
862 else
863   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
864   ac_dummy="$PATH"
865   for ac_dir in $ac_dummy; do
866     test -z "$ac_dir" && ac_dir=.
867     if test -f $ac_dir/$ac_word; then
868       ac_cv_prog_CC="gcc"
869       break
870     fi
871   done
872   IFS="$ac_save_ifs"
873 fi
874 fi
875 CC="$ac_cv_prog_CC"
876 if test -n "$CC"; then
877   echo "$ac_t""$CC" 1>&6
878 else
879   echo "$ac_t""no" 1>&6
880 fi
881
882 if test -z "$CC"; then
883   # Extract the first word of "cc", so it can be a program name with args.
884 set dummy cc; ac_word=$2
885 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
886 echo "configure:887: checking for $ac_word" >&5
887 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
888   echo $ac_n "(cached) $ac_c" 1>&6
889 else
890   if test -n "$CC"; then
891   ac_cv_prog_CC="$CC" # Let the user override the test.
892 else
893   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
894   ac_prog_rejected=no
895   ac_dummy="$PATH"
896   for ac_dir in $ac_dummy; do
897     test -z "$ac_dir" && ac_dir=.
898     if test -f $ac_dir/$ac_word; then
899       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
900         ac_prog_rejected=yes
901         continue
902       fi
903       ac_cv_prog_CC="cc"
904       break
905     fi
906   done
907   IFS="$ac_save_ifs"
908 if test $ac_prog_rejected = yes; then
909   # We found a bogon in the path, so make sure we never use it.
910   set dummy $ac_cv_prog_CC
911   shift
912   if test $# -gt 0; then
913     # We chose a different compiler from the bogus one.
914     # However, it has the same basename, so the bogon will be chosen
915     # first if we set CC to just the basename; use the full file name.
916     shift
917     set dummy "$ac_dir/$ac_word" "$@"
918     shift
919     ac_cv_prog_CC="$@"
920   fi
921 fi
922 fi
923 fi
924 CC="$ac_cv_prog_CC"
925 if test -n "$CC"; then
926   echo "$ac_t""$CC" 1>&6
927 else
928   echo "$ac_t""no" 1>&6
929 fi
930
931   if test -z "$CC"; then
932     case "`uname -s`" in
933     *win32* | *WIN32*)
934       # Extract the first word of "cl", so it can be a program name with args.
935 set dummy cl; ac_word=$2
936 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
937 echo "configure:938: checking for $ac_word" >&5
938 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
939   echo $ac_n "(cached) $ac_c" 1>&6
940 else
941   if test -n "$CC"; then
942   ac_cv_prog_CC="$CC" # Let the user override the test.
943 else
944   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
945   ac_dummy="$PATH"
946   for ac_dir in $ac_dummy; do
947     test -z "$ac_dir" && ac_dir=.
948     if test -f $ac_dir/$ac_word; then
949       ac_cv_prog_CC="cl"
950       break
951     fi
952   done
953   IFS="$ac_save_ifs"
954 fi
955 fi
956 CC="$ac_cv_prog_CC"
957 if test -n "$CC"; then
958   echo "$ac_t""$CC" 1>&6
959 else
960   echo "$ac_t""no" 1>&6
961 fi
962  ;;
963     esac
964   fi
965   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
966 fi
967
968 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
969 echo "configure:970: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
970
971 ac_ext=c
972 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
973 ac_cpp='$CPP $CPPFLAGS'
974 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
975 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
976 cross_compiling=$ac_cv_prog_cc_cross
977
978 cat > conftest.$ac_ext << EOF
979
980 #line 981 "configure"
981 #include "confdefs.h"
982
983 main(){return(0);}
984 EOF
985 if { (eval echo configure:986: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
986   ac_cv_prog_cc_works=yes
987   # If we can't run a trivial program, we are probably using a cross compiler.
988   if (./conftest; exit) 2>/dev/null; then
989     ac_cv_prog_cc_cross=no
990   else
991     ac_cv_prog_cc_cross=yes
992   fi
993 else
994   echo "configure: failed program was:" >&5
995   cat conftest.$ac_ext >&5
996   ac_cv_prog_cc_works=no
997 fi
998 rm -fr conftest*
999 ac_ext=c
1000 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1001 ac_cpp='$CPP $CPPFLAGS'
1002 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1003 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1004 cross_compiling=$ac_cv_prog_cc_cross
1005
1006 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1007 if test $ac_cv_prog_cc_works = no; then
1008   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1009 fi
1010 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1011 echo "configure:1012: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1012 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1013 cross_compiling=$ac_cv_prog_cc_cross
1014
1015 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1016 echo "configure:1017: checking whether we are using GNU C" >&5
1017 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
1018   echo $ac_n "(cached) $ac_c" 1>&6
1019 else
1020   cat > conftest.c <<EOF
1021 #ifdef __GNUC__
1022   yes;
1023 #endif
1024 EOF
1025 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1026: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1026   ac_cv_prog_gcc=yes
1027 else
1028   ac_cv_prog_gcc=no
1029 fi
1030 fi
1031
1032 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1033
1034 if test $ac_cv_prog_gcc = yes; then
1035   GCC=yes
1036 else
1037   GCC=
1038 fi
1039
1040 ac_test_CFLAGS="${CFLAGS+set}"
1041 ac_save_CFLAGS="$CFLAGS"
1042 CFLAGS=
1043 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1044 echo "configure:1045: checking whether ${CC-cc} accepts -g" >&5
1045 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
1046   echo $ac_n "(cached) $ac_c" 1>&6
1047 else
1048   echo 'void f(){}' > conftest.c
1049 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1050   ac_cv_prog_cc_g=yes
1051 else
1052   ac_cv_prog_cc_g=no
1053 fi
1054 rm -f conftest*
1055
1056 fi
1057
1058 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1059 if test "$ac_test_CFLAGS" = set; then
1060   CFLAGS="$ac_save_CFLAGS"
1061 elif test $ac_cv_prog_cc_g = yes; then
1062   if test "$GCC" = yes; then
1063     CFLAGS="-g -O2"
1064   else
1065     CFLAGS="-g"
1066   fi
1067 else
1068   if test "$GCC" = yes; then
1069     CFLAGS="-O2"
1070   else
1071     CFLAGS=
1072   fi
1073 fi
1074
1075 # Extract the first word of "ranlib", so it can be a program name with args.
1076 set dummy ranlib; ac_word=$2
1077 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1078 echo "configure:1079: checking for $ac_word" >&5
1079 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1080   echo $ac_n "(cached) $ac_c" 1>&6
1081 else
1082   if test -n "$RANLIB"; then
1083   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1084 else
1085   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1086   ac_dummy="$PATH"
1087   for ac_dir in $ac_dummy; do
1088     test -z "$ac_dir" && ac_dir=.
1089     if test -f $ac_dir/$ac_word; then
1090       ac_cv_prog_RANLIB="ranlib"
1091       break
1092     fi
1093   done
1094   IFS="$ac_save_ifs"
1095   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1096 fi
1097 fi
1098 RANLIB="$ac_cv_prog_RANLIB"
1099 if test -n "$RANLIB"; then
1100   echo "$ac_t""$RANLIB" 1>&6
1101 else
1102   echo "$ac_t""no" 1>&6
1103 fi
1104
1105
1106 echo $ac_n "checking for sin in -lm""... $ac_c" 1>&6
1107 echo "configure:1108: checking for sin in -lm" >&5
1108 ac_lib_var=`echo m'_'sin | sed 'y%./+-%__p_%'`
1109 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1110   echo $ac_n "(cached) $ac_c" 1>&6
1111 else
1112   ac_save_LIBS="$LIBS"
1113 LIBS="-lm  $LIBS"
1114 cat > conftest.$ac_ext <<EOF
1115 #line 1116 "configure"
1116 #include "confdefs.h"
1117 /* Override any gcc2 internal prototype to avoid an error.  */
1118 /* We use char because int might match the return type of a gcc2
1119     builtin and then its argument prototype would still apply.  */
1120 char sin();
1121
1122 int main() {
1123 sin()
1124 ; return 0; }
1125 EOF
1126 if { (eval echo configure:1127: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1127   rm -rf conftest*
1128   eval "ac_cv_lib_$ac_lib_var=yes"
1129 else
1130   echo "configure: failed program was:" >&5
1131   cat conftest.$ac_ext >&5
1132   rm -rf conftest*
1133   eval "ac_cv_lib_$ac_lib_var=no"
1134 fi
1135 rm -f conftest*
1136 LIBS="$ac_save_LIBS"
1137
1138 fi
1139 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1140   echo "$ac_t""yes" 1>&6
1141     ac_tr_lib=HAVE_LIB`echo m | sed -e 's/[^a-zA-Z0-9_]/_/g' \
1142     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
1143   cat >> confdefs.h <<EOF
1144 #define $ac_tr_lib 1
1145 EOF
1146
1147   LIBS="-lm $LIBS"
1148
1149 else
1150   echo "$ac_t""no" 1>&6
1151 fi
1152
1153
1154 ac_header_dirent=no
1155 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
1156 do
1157 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1158 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
1159 echo "configure:1160: checking for $ac_hdr that defines DIR" >&5
1160 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
1161   echo $ac_n "(cached) $ac_c" 1>&6
1162 else
1163   cat > conftest.$ac_ext <<EOF
1164 #line 1165 "configure"
1165 #include "confdefs.h"
1166 #include <sys/types.h>
1167 #include <$ac_hdr>
1168 int main() {
1169 DIR *dirp = 0;
1170 ; return 0; }
1171 EOF
1172 if { (eval echo configure:1173: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1173   rm -rf conftest*
1174   eval "ac_cv_header_dirent_$ac_safe=yes"
1175 else
1176   echo "configure: failed program was:" >&5
1177   cat conftest.$ac_ext >&5
1178   rm -rf conftest*
1179   eval "ac_cv_header_dirent_$ac_safe=no"
1180 fi
1181 rm -f conftest*
1182 fi
1183 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
1184   echo "$ac_t""yes" 1>&6
1185     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1186   cat >> confdefs.h <<EOF
1187 #define $ac_tr_hdr 1
1188 EOF
1189  ac_header_dirent=$ac_hdr; break
1190 else
1191   echo "$ac_t""no" 1>&6
1192 fi
1193 done
1194 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
1195 if test $ac_header_dirent = dirent.h; then
1196 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
1197 echo "configure:1198: checking for opendir in -ldir" >&5
1198 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
1199 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1200   echo $ac_n "(cached) $ac_c" 1>&6
1201 else
1202   ac_save_LIBS="$LIBS"
1203 LIBS="-ldir  $LIBS"
1204 cat > conftest.$ac_ext <<EOF
1205 #line 1206 "configure"
1206 #include "confdefs.h"
1207 /* Override any gcc2 internal prototype to avoid an error.  */
1208 /* We use char because int might match the return type of a gcc2
1209     builtin and then its argument prototype would still apply.  */
1210 char opendir();
1211
1212 int main() {
1213 opendir()
1214 ; return 0; }
1215 EOF
1216 if { (eval echo configure:1217: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1217   rm -rf conftest*
1218   eval "ac_cv_lib_$ac_lib_var=yes"
1219 else
1220   echo "configure: failed program was:" >&5
1221   cat conftest.$ac_ext >&5
1222   rm -rf conftest*
1223   eval "ac_cv_lib_$ac_lib_var=no"
1224 fi
1225 rm -f conftest*
1226 LIBS="$ac_save_LIBS"
1227
1228 fi
1229 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1230   echo "$ac_t""yes" 1>&6
1231   LIBS="$LIBS -ldir"
1232 else
1233   echo "$ac_t""no" 1>&6
1234 fi
1235
1236 else
1237 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
1238 echo "configure:1239: checking for opendir in -lx" >&5
1239 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
1240 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1241   echo $ac_n "(cached) $ac_c" 1>&6
1242 else
1243   ac_save_LIBS="$LIBS"
1244 LIBS="-lx  $LIBS"
1245 cat > conftest.$ac_ext <<EOF
1246 #line 1247 "configure"
1247 #include "confdefs.h"
1248 /* Override any gcc2 internal prototype to avoid an error.  */
1249 /* We use char because int might match the return type of a gcc2
1250     builtin and then its argument prototype would still apply.  */
1251 char opendir();
1252
1253 int main() {
1254 opendir()
1255 ; return 0; }
1256 EOF
1257 if { (eval echo configure:1258: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1258   rm -rf conftest*
1259   eval "ac_cv_lib_$ac_lib_var=yes"
1260 else
1261   echo "configure: failed program was:" >&5
1262   cat conftest.$ac_ext >&5
1263   rm -rf conftest*
1264   eval "ac_cv_lib_$ac_lib_var=no"
1265 fi
1266 rm -f conftest*
1267 LIBS="$ac_save_LIBS"
1268
1269 fi
1270 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1271   echo "$ac_t""yes" 1>&6
1272   LIBS="$LIBS -lx"
1273 else
1274   echo "$ac_t""no" 1>&6
1275 fi
1276
1277 fi
1278
1279 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
1280 echo "configure:1281: checking how to run the C preprocessor" >&5
1281 # On Suns, sometimes $CPP names a directory.
1282 if test -n "$CPP" && test -d "$CPP"; then
1283   CPP=
1284 fi
1285 if test -z "$CPP"; then
1286 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1287   echo $ac_n "(cached) $ac_c" 1>&6
1288 else
1289     # This must be in double quotes, not single quotes, because CPP may get
1290   # substituted into the Makefile and "${CC-cc}" will confuse make.
1291   CPP="${CC-cc} -E"
1292   # On the NeXT, cc -E runs the code through the compiler's parser,
1293   # not just through cpp.
1294   cat > conftest.$ac_ext <<EOF
1295 #line 1296 "configure"
1296 #include "confdefs.h"
1297 #include <assert.h>
1298 Syntax Error
1299 EOF
1300 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1301 { (eval echo configure:1302: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1302 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1303 if test -z "$ac_err"; then
1304   :
1305 else
1306   echo "$ac_err" >&5
1307   echo "configure: failed program was:" >&5
1308   cat conftest.$ac_ext >&5
1309   rm -rf conftest*
1310   CPP="${CC-cc} -E -traditional-cpp"
1311   cat > conftest.$ac_ext <<EOF
1312 #line 1313 "configure"
1313 #include "confdefs.h"
1314 #include <assert.h>
1315 Syntax Error
1316 EOF
1317 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1318 { (eval echo configure:1319: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1319 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1320 if test -z "$ac_err"; then
1321   :
1322 else
1323   echo "$ac_err" >&5
1324   echo "configure: failed program was:" >&5
1325   cat conftest.$ac_ext >&5
1326   rm -rf conftest*
1327   CPP="${CC-cc} -nologo -E"
1328   cat > conftest.$ac_ext <<EOF
1329 #line 1330 "configure"
1330 #include "confdefs.h"
1331 #include <assert.h>
1332 Syntax Error
1333 EOF
1334 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1335 { (eval echo configure:1336: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1336 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1337 if test -z "$ac_err"; then
1338   :
1339 else
1340   echo "$ac_err" >&5
1341   echo "configure: failed program was:" >&5
1342   cat conftest.$ac_ext >&5
1343   rm -rf conftest*
1344   CPP=/lib/cpp
1345 fi
1346 rm -f conftest*
1347 fi
1348 rm -f conftest*
1349 fi
1350 rm -f conftest*
1351   ac_cv_prog_CPP="$CPP"
1352 fi
1353   CPP="$ac_cv_prog_CPP"
1354 else
1355   ac_cv_prog_CPP="$CPP"
1356 fi
1357 echo "$ac_t""$CPP" 1>&6
1358
1359 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
1360 echo "configure:1361: checking for ANSI C header files" >&5
1361 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1362   echo $ac_n "(cached) $ac_c" 1>&6
1363 else
1364   cat > conftest.$ac_ext <<EOF
1365 #line 1366 "configure"
1366 #include "confdefs.h"
1367 #include <stdlib.h>
1368 #include <stdarg.h>
1369 #include <string.h>
1370 #include <float.h>
1371 EOF
1372 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1373 { (eval echo configure:1374: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1374 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1375 if test -z "$ac_err"; then
1376   rm -rf conftest*
1377   ac_cv_header_stdc=yes
1378 else
1379   echo "$ac_err" >&5
1380   echo "configure: failed program was:" >&5
1381   cat conftest.$ac_ext >&5
1382   rm -rf conftest*
1383   ac_cv_header_stdc=no
1384 fi
1385 rm -f conftest*
1386
1387 if test $ac_cv_header_stdc = yes; then
1388   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1389 cat > conftest.$ac_ext <<EOF
1390 #line 1391 "configure"
1391 #include "confdefs.h"
1392 #include <string.h>
1393 EOF
1394 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1395   egrep "memchr" >/dev/null 2>&1; then
1396   :
1397 else
1398   rm -rf conftest*
1399   ac_cv_header_stdc=no
1400 fi
1401 rm -f conftest*
1402
1403 fi
1404
1405 if test $ac_cv_header_stdc = yes; then
1406   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1407 cat > conftest.$ac_ext <<EOF
1408 #line 1409 "configure"
1409 #include "confdefs.h"
1410 #include <stdlib.h>
1411 EOF
1412 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1413   egrep "free" >/dev/null 2>&1; then
1414   :
1415 else
1416   rm -rf conftest*
1417   ac_cv_header_stdc=no
1418 fi
1419 rm -f conftest*
1420
1421 fi
1422
1423 if test $ac_cv_header_stdc = yes; then
1424   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1425 if test "$cross_compiling" = yes; then
1426   :
1427 else
1428   cat > conftest.$ac_ext <<EOF
1429 #line 1430 "configure"
1430 #include "confdefs.h"
1431 #include <ctype.h>
1432 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1433 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
1434 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
1435 int main () { int i; for (i = 0; i < 256; i++)
1436 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1437 exit (0); }
1438
1439 EOF
1440 if { (eval echo configure:1441: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1441 then
1442   :
1443 else
1444   echo "configure: failed program was:" >&5
1445   cat conftest.$ac_ext >&5
1446   rm -fr conftest*
1447   ac_cv_header_stdc=no
1448 fi
1449 rm -fr conftest*
1450 fi
1451
1452 fi
1453 fi
1454
1455 echo "$ac_t""$ac_cv_header_stdc" 1>&6
1456 if test $ac_cv_header_stdc = yes; then
1457   cat >> confdefs.h <<\EOF
1458 #define STDC_HEADERS 1
1459 EOF
1460
1461 fi
1462
1463 for ac_hdr in fcntl.h sys/time.h unistd.h
1464 do
1465 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1466 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1467 echo "configure:1468: checking for $ac_hdr" >&5
1468 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1469   echo $ac_n "(cached) $ac_c" 1>&6
1470 else
1471   cat > conftest.$ac_ext <<EOF
1472 #line 1473 "configure"
1473 #include "confdefs.h"
1474 #include <$ac_hdr>
1475 EOF
1476 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1477 { (eval echo configure:1478: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1478 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1479 if test -z "$ac_err"; then
1480   rm -rf conftest*
1481   eval "ac_cv_header_$ac_safe=yes"
1482 else
1483   echo "$ac_err" >&5
1484   echo "configure: failed program was:" >&5
1485   cat conftest.$ac_ext >&5
1486   rm -rf conftest*
1487   eval "ac_cv_header_$ac_safe=no"
1488 fi
1489 rm -f conftest*
1490 fi
1491 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1492   echo "$ac_t""yes" 1>&6
1493     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1494   cat >> confdefs.h <<EOF
1495 #define $ac_tr_hdr 1
1496 EOF
1497  
1498 else
1499   echo "$ac_t""no" 1>&6
1500 fi
1501 done
1502
1503
1504 echo $ac_n "checking for working const""... $ac_c" 1>&6
1505 echo "configure:1506: checking for working const" >&5
1506 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
1507   echo $ac_n "(cached) $ac_c" 1>&6
1508 else
1509   cat > conftest.$ac_ext <<EOF
1510 #line 1511 "configure"
1511 #include "confdefs.h"
1512
1513 int main() {
1514
1515 /* Ultrix mips cc rejects this.  */
1516 typedef int charset[2]; const charset x;
1517 /* SunOS 4.1.1 cc rejects this.  */
1518 char const *const *ccp;
1519 char **p;
1520 /* NEC SVR4.0.2 mips cc rejects this.  */
1521 struct point {int x, y;};
1522 static struct point const zero = {0,0};
1523 /* AIX XL C 1.02.0.0 rejects this.
1524    It does not let you subtract one const X* pointer from another in an arm
1525    of an if-expression whose if-part is not a constant expression */
1526 const char *g = "string";
1527 ccp = &g + (g ? g-g : 0);
1528 /* HPUX 7.0 cc rejects these. */
1529 ++ccp;
1530 p = (char**) ccp;
1531 ccp = (char const *const *) p;
1532 { /* SCO 3.2v4 cc rejects this.  */
1533   char *t;
1534   char const *s = 0 ? (char *) 0 : (char const *) 0;
1535
1536   *t++ = 0;
1537 }
1538 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
1539   int x[] = {25, 17};
1540   const int *foo = &x[0];
1541   ++foo;
1542 }
1543 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
1544   typedef const int *iptr;
1545   iptr p = 0;
1546   ++p;
1547 }
1548 { /* AIX XL C 1.02.0.0 rejects this saying
1549      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
1550   struct s { int j; const int *ap[3]; };
1551   struct s *b; b->j = 5;
1552 }
1553 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
1554   const int foo = 10;
1555 }
1556
1557 ; return 0; }
1558 EOF
1559 if { (eval echo configure:1560: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1560   rm -rf conftest*
1561   ac_cv_c_const=yes
1562 else
1563   echo "configure: failed program was:" >&5
1564   cat conftest.$ac_ext >&5
1565   rm -rf conftest*
1566   ac_cv_c_const=no
1567 fi
1568 rm -f conftest*
1569 fi
1570
1571 echo "$ac_t""$ac_cv_c_const" 1>&6
1572 if test $ac_cv_c_const = no; then
1573   cat >> confdefs.h <<\EOF
1574 #define const 
1575 EOF
1576
1577 fi
1578
1579 echo $ac_n "checking for inline""... $ac_c" 1>&6
1580 echo "configure:1581: checking for inline" >&5
1581 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
1582   echo $ac_n "(cached) $ac_c" 1>&6
1583 else
1584   ac_cv_c_inline=no
1585 for ac_kw in inline __inline__ __inline; do
1586   cat > conftest.$ac_ext <<EOF
1587 #line 1588 "configure"
1588 #include "confdefs.h"
1589
1590 int main() {
1591 } $ac_kw foo() {
1592 ; return 0; }
1593 EOF
1594 if { (eval echo configure:1595: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1595   rm -rf conftest*
1596   ac_cv_c_inline=$ac_kw; break
1597 else
1598   echo "configure: failed program was:" >&5
1599   cat conftest.$ac_ext >&5
1600 fi
1601 rm -f conftest*
1602 done
1603
1604 fi
1605
1606 echo "$ac_t""$ac_cv_c_inline" 1>&6
1607 case "$ac_cv_c_inline" in
1608   inline | yes) ;;
1609   no) cat >> confdefs.h <<\EOF
1610 #define inline 
1611 EOF
1612  ;;
1613   *)  cat >> confdefs.h <<EOF
1614 #define inline $ac_cv_c_inline
1615 EOF
1616  ;;
1617 esac
1618
1619 echo $ac_n "checking for off_t""... $ac_c" 1>&6
1620 echo "configure:1621: checking for off_t" >&5
1621 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
1622   echo $ac_n "(cached) $ac_c" 1>&6
1623 else
1624   cat > conftest.$ac_ext <<EOF
1625 #line 1626 "configure"
1626 #include "confdefs.h"
1627 #include <sys/types.h>
1628 #if STDC_HEADERS
1629 #include <stdlib.h>
1630 #include <stddef.h>
1631 #endif
1632 EOF
1633 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1634   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
1635   rm -rf conftest*
1636   ac_cv_type_off_t=yes
1637 else
1638   rm -rf conftest*
1639   ac_cv_type_off_t=no
1640 fi
1641 rm -f conftest*
1642
1643 fi
1644 echo "$ac_t""$ac_cv_type_off_t" 1>&6
1645 if test $ac_cv_type_off_t = no; then
1646   cat >> confdefs.h <<\EOF
1647 #define off_t long
1648 EOF
1649
1650 fi
1651
1652 echo $ac_n "checking for size_t""... $ac_c" 1>&6
1653 echo "configure:1654: checking for size_t" >&5
1654 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
1655   echo $ac_n "(cached) $ac_c" 1>&6
1656 else
1657   cat > conftest.$ac_ext <<EOF
1658 #line 1659 "configure"
1659 #include "confdefs.h"
1660 #include <sys/types.h>
1661 #if STDC_HEADERS
1662 #include <stdlib.h>
1663 #include <stddef.h>
1664 #endif
1665 EOF
1666 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1667   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
1668   rm -rf conftest*
1669   ac_cv_type_size_t=yes
1670 else
1671   rm -rf conftest*
1672   ac_cv_type_size_t=no
1673 fi
1674 rm -f conftest*
1675
1676 fi
1677 echo "$ac_t""$ac_cv_type_size_t" 1>&6
1678 if test $ac_cv_type_size_t = no; then
1679   cat >> confdefs.h <<\EOF
1680 #define size_t unsigned
1681 EOF
1682
1683 fi
1684
1685 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
1686 echo "configure:1687: checking whether time.h and sys/time.h may both be included" >&5
1687 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
1688   echo $ac_n "(cached) $ac_c" 1>&6
1689 else
1690   cat > conftest.$ac_ext <<EOF
1691 #line 1692 "configure"
1692 #include "confdefs.h"
1693 #include <sys/types.h>
1694 #include <sys/time.h>
1695 #include <time.h>
1696 int main() {
1697 struct tm *tp;
1698 ; return 0; }
1699 EOF
1700 if { (eval echo configure:1701: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1701   rm -rf conftest*
1702   ac_cv_header_time=yes
1703 else
1704   echo "configure: failed program was:" >&5
1705   cat conftest.$ac_ext >&5
1706   rm -rf conftest*
1707   ac_cv_header_time=no
1708 fi
1709 rm -f conftest*
1710 fi
1711
1712 echo "$ac_t""$ac_cv_header_time" 1>&6
1713 if test $ac_cv_header_time = yes; then
1714   cat >> confdefs.h <<\EOF
1715 #define TIME_WITH_SYS_TIME 1
1716 EOF
1717
1718 fi
1719
1720 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
1721 echo "configure:1722: checking whether struct tm is in sys/time.h or time.h" >&5
1722 if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
1723   echo $ac_n "(cached) $ac_c" 1>&6
1724 else
1725   cat > conftest.$ac_ext <<EOF
1726 #line 1727 "configure"
1727 #include "confdefs.h"
1728 #include <sys/types.h>
1729 #include <time.h>
1730 int main() {
1731 struct tm *tp; tp->tm_sec;
1732 ; return 0; }
1733 EOF
1734 if { (eval echo configure:1735: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1735   rm -rf conftest*
1736   ac_cv_struct_tm=time.h
1737 else
1738   echo "configure: failed program was:" >&5
1739   cat conftest.$ac_ext >&5
1740   rm -rf conftest*
1741   ac_cv_struct_tm=sys/time.h
1742 fi
1743 rm -f conftest*
1744 fi
1745
1746 echo "$ac_t""$ac_cv_struct_tm" 1>&6
1747 if test $ac_cv_struct_tm = sys/time.h; then
1748   cat >> confdefs.h <<\EOF
1749 #define TM_IN_SYS_TIME 1
1750 EOF
1751
1752 fi
1753
1754
1755 if test $ac_cv_prog_gcc = yes; then
1756     echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6
1757 echo "configure:1758: checking whether ${CC-cc} needs -traditional" >&5
1758 if eval "test \"`echo '$''{'ac_cv_prog_gcc_traditional'+set}'`\" = set"; then
1759   echo $ac_n "(cached) $ac_c" 1>&6
1760 else
1761     ac_pattern="Autoconf.*'x'"
1762   cat > conftest.$ac_ext <<EOF
1763 #line 1764 "configure"
1764 #include "confdefs.h"
1765 #include <sgtty.h>
1766 Autoconf TIOCGETP
1767 EOF
1768 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1769   egrep "$ac_pattern" >/dev/null 2>&1; then
1770   rm -rf conftest*
1771   ac_cv_prog_gcc_traditional=yes
1772 else
1773   rm -rf conftest*
1774   ac_cv_prog_gcc_traditional=no
1775 fi
1776 rm -f conftest*
1777
1778
1779   if test $ac_cv_prog_gcc_traditional = no; then
1780     cat > conftest.$ac_ext <<EOF
1781 #line 1782 "configure"
1782 #include "confdefs.h"
1783 #include <termio.h>
1784 Autoconf TCGETA
1785 EOF
1786 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1787   egrep "$ac_pattern" >/dev/null 2>&1; then
1788   rm -rf conftest*
1789   ac_cv_prog_gcc_traditional=yes
1790 fi
1791 rm -f conftest*
1792
1793   fi
1794 fi
1795
1796 echo "$ac_t""$ac_cv_prog_gcc_traditional" 1>&6
1797   if test $ac_cv_prog_gcc_traditional = yes; then
1798     CC="$CC -traditional"
1799   fi
1800 fi
1801
1802 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
1803 echo "configure:1804: checking for 8-bit clean memcmp" >&5
1804 if eval "test \"`echo '$''{'ac_cv_func_memcmp_clean'+set}'`\" = set"; then
1805   echo $ac_n "(cached) $ac_c" 1>&6
1806 else
1807   if test "$cross_compiling" = yes; then
1808   ac_cv_func_memcmp_clean=no
1809 else
1810   cat > conftest.$ac_ext <<EOF
1811 #line 1812 "configure"
1812 #include "confdefs.h"
1813
1814 main()
1815 {
1816   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
1817   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
1818 }
1819
1820 EOF
1821 if { (eval echo configure:1822: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1822 then
1823   ac_cv_func_memcmp_clean=yes
1824 else
1825   echo "configure: failed program was:" >&5
1826   cat conftest.$ac_ext >&5
1827   rm -fr conftest*
1828   ac_cv_func_memcmp_clean=no
1829 fi
1830 rm -fr conftest*
1831 fi
1832
1833 fi
1834
1835 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
1836 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
1837
1838 for ac_hdr in unistd.h
1839 do
1840 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1841 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1842 echo "configure:1843: checking for $ac_hdr" >&5
1843 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1844   echo $ac_n "(cached) $ac_c" 1>&6
1845 else
1846   cat > conftest.$ac_ext <<EOF
1847 #line 1848 "configure"
1848 #include "confdefs.h"
1849 #include <$ac_hdr>
1850 EOF
1851 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1852 { (eval echo configure:1853: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1853 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1854 if test -z "$ac_err"; then
1855   rm -rf conftest*
1856   eval "ac_cv_header_$ac_safe=yes"
1857 else
1858   echo "$ac_err" >&5
1859   echo "configure: failed program was:" >&5
1860   cat conftest.$ac_ext >&5
1861   rm -rf conftest*
1862   eval "ac_cv_header_$ac_safe=no"
1863 fi
1864 rm -f conftest*
1865 fi
1866 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1867   echo "$ac_t""yes" 1>&6
1868     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1869   cat >> confdefs.h <<EOF
1870 #define $ac_tr_hdr 1
1871 EOF
1872  
1873 else
1874   echo "$ac_t""no" 1>&6
1875 fi
1876 done
1877
1878 for ac_func in getpagesize
1879 do
1880 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1881 echo "configure:1882: checking for $ac_func" >&5
1882 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1883   echo $ac_n "(cached) $ac_c" 1>&6
1884 else
1885   cat > conftest.$ac_ext <<EOF
1886 #line 1887 "configure"
1887 #include "confdefs.h"
1888 /* System header to define __stub macros and hopefully few prototypes,
1889     which can conflict with char $ac_func(); below.  */
1890 #include <assert.h>
1891 /* Override any gcc2 internal prototype to avoid an error.  */
1892 /* We use char because int might match the return type of a gcc2
1893     builtin and then its argument prototype would still apply.  */
1894 char $ac_func();
1895
1896 int main() {
1897
1898 /* The GNU C library defines this for functions which it implements
1899     to always fail with ENOSYS.  Some functions are actually named
1900     something starting with __ and the normal name is an alias.  */
1901 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1902 choke me
1903 #else
1904 $ac_func();
1905 #endif
1906
1907 ; return 0; }
1908 EOF
1909 if { (eval echo configure:1910: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1910   rm -rf conftest*
1911   eval "ac_cv_func_$ac_func=yes"
1912 else
1913   echo "configure: failed program was:" >&5
1914   cat conftest.$ac_ext >&5
1915   rm -rf conftest*
1916   eval "ac_cv_func_$ac_func=no"
1917 fi
1918 rm -f conftest*
1919 fi
1920
1921 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1922   echo "$ac_t""yes" 1>&6
1923     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1924   cat >> confdefs.h <<EOF
1925 #define $ac_tr_func 1
1926 EOF
1927  
1928 else
1929   echo "$ac_t""no" 1>&6
1930 fi
1931 done
1932
1933 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
1934 echo "configure:1935: checking for working mmap" >&5
1935 if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
1936   echo $ac_n "(cached) $ac_c" 1>&6
1937 else
1938   if test "$cross_compiling" = yes; then
1939   ac_cv_func_mmap_fixed_mapped=no
1940 else
1941   cat > conftest.$ac_ext <<EOF
1942 #line 1943 "configure"
1943 #include "confdefs.h"
1944
1945 /* Thanks to Mike Haertel and Jim Avera for this test.
1946    Here is a matrix of mmap possibilities:
1947         mmap private not fixed
1948         mmap private fixed at somewhere currently unmapped
1949         mmap private fixed at somewhere already mapped
1950         mmap shared not fixed
1951         mmap shared fixed at somewhere currently unmapped
1952         mmap shared fixed at somewhere already mapped
1953    For private mappings, we should verify that changes cannot be read()
1954    back from the file, nor mmap's back from the file at a different
1955    address.  (There have been systems where private was not correctly
1956    implemented like the infamous i386 svr4.0, and systems where the
1957    VM page cache was not coherent with the filesystem buffer cache
1958    like early versions of FreeBSD and possibly contemporary NetBSD.)
1959    For shared mappings, we should conversely verify that changes get
1960    propogated back to all the places they're supposed to be.
1961
1962    Grep wants private fixed already mapped.
1963    The main things grep needs to know about mmap are:
1964    * does it exist and is it safe to write into the mmap'd area
1965    * how to use it (BSD variants)  */
1966 #include <sys/types.h>
1967 #include <fcntl.h>
1968 #include <sys/mman.h>
1969
1970 /* This mess was copied from the GNU getpagesize.h.  */
1971 #ifndef HAVE_GETPAGESIZE
1972 # ifdef HAVE_UNISTD_H
1973 #  include <unistd.h>
1974 # endif
1975
1976 /* Assume that all systems that can run configure have sys/param.h.  */
1977 # ifndef HAVE_SYS_PARAM_H
1978 #  define HAVE_SYS_PARAM_H 1
1979 # endif
1980
1981 # ifdef _SC_PAGESIZE
1982 #  define getpagesize() sysconf(_SC_PAGESIZE)
1983 # else /* no _SC_PAGESIZE */
1984 #  ifdef HAVE_SYS_PARAM_H
1985 #   include <sys/param.h>
1986 #   ifdef EXEC_PAGESIZE
1987 #    define getpagesize() EXEC_PAGESIZE
1988 #   else /* no EXEC_PAGESIZE */
1989 #    ifdef NBPG
1990 #     define getpagesize() NBPG * CLSIZE
1991 #     ifndef CLSIZE
1992 #      define CLSIZE 1
1993 #     endif /* no CLSIZE */
1994 #    else /* no NBPG */
1995 #     ifdef NBPC
1996 #      define getpagesize() NBPC
1997 #     else /* no NBPC */
1998 #      ifdef PAGESIZE
1999 #       define getpagesize() PAGESIZE
2000 #      endif /* PAGESIZE */
2001 #     endif /* no NBPC */
2002 #    endif /* no NBPG */
2003 #   endif /* no EXEC_PAGESIZE */
2004 #  else /* no HAVE_SYS_PARAM_H */
2005 #   define getpagesize() 8192   /* punt totally */
2006 #  endif /* no HAVE_SYS_PARAM_H */
2007 # endif /* no _SC_PAGESIZE */
2008
2009 #endif /* no HAVE_GETPAGESIZE */
2010
2011 #ifdef __cplusplus
2012 extern "C" { void *malloc(unsigned); }
2013 #else
2014 char *malloc();
2015 #endif
2016
2017 int
2018 main()
2019 {
2020         char *data, *data2, *data3;
2021         int i, pagesize;
2022         int fd;
2023
2024         pagesize = getpagesize();
2025
2026         /*
2027          * First, make a file with some known garbage in it.
2028          */
2029         data = malloc(pagesize);
2030         if (!data)
2031                 exit(1);
2032         for (i = 0; i < pagesize; ++i)
2033                 *(data + i) = rand();
2034         umask(0);
2035         fd = creat("conftestmmap", 0600);
2036         if (fd < 0)
2037                 exit(1);
2038         if (write(fd, data, pagesize) != pagesize)
2039                 exit(1);
2040         close(fd);
2041
2042         /*
2043          * Next, try to mmap the file at a fixed address which
2044          * already has something else allocated at it.  If we can,
2045          * also make sure that we see the same garbage.
2046          */
2047         fd = open("conftestmmap", O_RDWR);
2048         if (fd < 0)
2049                 exit(1);
2050         data2 = malloc(2 * pagesize);
2051         if (!data2)
2052                 exit(1);
2053         data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
2054         if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
2055             MAP_PRIVATE | MAP_FIXED, fd, 0L))
2056                 exit(1);
2057         for (i = 0; i < pagesize; ++i)
2058                 if (*(data + i) != *(data2 + i))
2059                         exit(1);
2060
2061         /*
2062          * Finally, make sure that changes to the mapped area
2063          * do not percolate back to the file as seen by read().
2064          * (This is a bug on some variants of i386 svr4.0.)
2065          */
2066         for (i = 0; i < pagesize; ++i)
2067                 *(data2 + i) = *(data2 + i) + 1;
2068         data3 = malloc(pagesize);
2069         if (!data3)
2070                 exit(1);
2071         if (read(fd, data3, pagesize) != pagesize)
2072                 exit(1);
2073         for (i = 0; i < pagesize; ++i)
2074                 if (*(data + i) != *(data3 + i))
2075                         exit(1);
2076         close(fd);
2077         unlink("conftestmmap");
2078         exit(0);
2079 }
2080
2081 EOF
2082 if { (eval echo configure:2083: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2083 then
2084   ac_cv_func_mmap_fixed_mapped=yes
2085 else
2086   echo "configure: failed program was:" >&5
2087   cat conftest.$ac_ext >&5
2088   rm -fr conftest*
2089   ac_cv_func_mmap_fixed_mapped=no
2090 fi
2091 rm -fr conftest*
2092 fi
2093
2094 fi
2095
2096 echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
2097 if test $ac_cv_func_mmap_fixed_mapped = yes; then
2098   cat >> confdefs.h <<\EOF
2099 #define HAVE_MMAP 1
2100 EOF
2101
2102 fi
2103
2104 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
2105 echo "configure:2106: checking return type of signal handlers" >&5
2106 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
2107   echo $ac_n "(cached) $ac_c" 1>&6
2108 else
2109   cat > conftest.$ac_ext <<EOF
2110 #line 2111 "configure"
2111 #include "confdefs.h"
2112 #include <sys/types.h>
2113 #include <signal.h>
2114 #ifdef signal
2115 #undef signal
2116 #endif
2117 #ifdef __cplusplus
2118 extern "C" void (*signal (int, void (*)(int)))(int);
2119 #else
2120 void (*signal ()) ();
2121 #endif
2122
2123 int main() {
2124 int i;
2125 ; return 0; }
2126 EOF
2127 if { (eval echo configure:2128: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2128   rm -rf conftest*
2129   ac_cv_type_signal=void
2130 else
2131   echo "configure: failed program was:" >&5
2132   cat conftest.$ac_ext >&5
2133   rm -rf conftest*
2134   ac_cv_type_signal=int
2135 fi
2136 rm -f conftest*
2137 fi
2138
2139 echo "$ac_t""$ac_cv_type_signal" 1>&6
2140 cat >> confdefs.h <<EOF
2141 #define RETSIGTYPE $ac_cv_type_signal
2142 EOF
2143
2144
2145 for ac_func in getcwd gettimeofday mkdir mktime select socket
2146 do
2147 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2148 echo "configure:2149: checking for $ac_func" >&5
2149 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2150   echo $ac_n "(cached) $ac_c" 1>&6
2151 else
2152   cat > conftest.$ac_ext <<EOF
2153 #line 2154 "configure"
2154 #include "confdefs.h"
2155 /* System header to define __stub macros and hopefully few prototypes,
2156     which can conflict with char $ac_func(); below.  */
2157 #include <assert.h>
2158 /* Override any gcc2 internal prototype to avoid an error.  */
2159 /* We use char because int might match the return type of a gcc2
2160     builtin and then its argument prototype would still apply.  */
2161 char $ac_func();
2162
2163 int main() {
2164
2165 /* The GNU C library defines this for functions which it implements
2166     to always fail with ENOSYS.  Some functions are actually named
2167     something starting with __ and the normal name is an alias.  */
2168 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2169 choke me
2170 #else
2171 $ac_func();
2172 #endif
2173
2174 ; return 0; }
2175 EOF
2176 if { (eval echo configure:2177: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2177   rm -rf conftest*
2178   eval "ac_cv_func_$ac_func=yes"
2179 else
2180   echo "configure: failed program was:" >&5
2181   cat conftest.$ac_ext >&5
2182   rm -rf conftest*
2183   eval "ac_cv_func_$ac_func=no"
2184 fi
2185 rm -f conftest*
2186 fi
2187
2188 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2189   echo "$ac_t""yes" 1>&6
2190     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2191   cat >> confdefs.h <<EOF
2192 #define $ac_tr_func 1
2193 EOF
2194  
2195 else
2196   echo "$ac_t""no" 1>&6
2197 fi
2198 done
2199
2200
2201 if test $ac_cv_func_mmap_fixed_mapped = yes; then
2202         echo $ac_n "checking whether MAP_FAILED is defined""... $ac_c" 1>&6
2203 echo "configure:2204: checking whether MAP_FAILED is defined" >&5
2204 if eval "test \"`echo '$''{'ac_cv_map_failed'+set}'`\" = set"; then
2205   echo $ac_n "(cached) $ac_c" 1>&6
2206 else
2207   cat > conftest.$ac_ext <<EOF
2208 #line 2209 "configure"
2209 #include "confdefs.h"
2210 #include <sys/mman.h>
2211                                      #ifdef MAP_FAILED
2212                                         yes
2213                                      #endif
2214 EOF
2215 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2216   egrep "yes" >/dev/null 2>&1; then
2217   rm -rf conftest*
2218   ac_cv_map_failed=yes
2219 else
2220   rm -rf conftest*
2221   ac_cv_map_failed=no
2222 fi
2223 rm -f conftest*
2224
2225 fi
2226
2227 echo "$ac_t""$ac_cv_map_failed" 1>&6
2228
2229         echo $ac_n "checking whether MAP_ANONYMOUS is defined""... $ac_c" 1>&6
2230 echo "configure:2231: checking whether MAP_ANONYMOUS is defined" >&5
2231 if eval "test \"`echo '$''{'ac_cv_map_anonymous'+set}'`\" = set"; then
2232   echo $ac_n "(cached) $ac_c" 1>&6
2233 else
2234   cat > conftest.$ac_ext <<EOF
2235 #line 2236 "configure"
2236 #include "confdefs.h"
2237 #include <sys/mman.h>
2238                                      #ifdef MAP_ANONYMOUS
2239                                         yes
2240                                      #endif
2241 EOF
2242 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2243   egrep "yes" >/dev/null 2>&1; then
2244   rm -rf conftest*
2245   ac_cv_map_anonymous=yes
2246 else
2247   rm -rf conftest*
2248   ac_cv_map_anonymous=no
2249 fi
2250 rm -f conftest*
2251
2252 fi
2253
2254 echo "$ac_t""$ac_cv_map_anonymous" 1>&6
2255
2256         if test $ac_cv_map_failed = yes; then
2257                 cat >> confdefs.h <<\EOF
2258 #define HAVE_MAP_FAILED 1
2259 EOF
2260  
2261         fi
2262
2263         if test $ac_cv_map_anonymous = yes; then
2264                 cat >> confdefs.h <<\EOF
2265 #define HAVE_MAP_ANONYMOUS 1
2266 EOF
2267  
2268         fi
2269 fi
2270
2271
2272
2273 # Check whether --enable-threads or --disable-threads was given.
2274 if test "${enable_threads+set}" = set; then
2275   enableval="$enable_threads"
2276   :
2277 fi
2278
2279 # Check whether --enable-gc2 or --disable-gc2 was given.
2280 if test "${enable_gc2+set}" = set; then
2281   enableval="$enable_gc2"
2282   :
2283 fi
2284
2285
2286 echo $ac_n "checking whether to include threads support""... $ac_c" 1>&6
2287 echo "configure:2288: checking whether to include threads support" >&5
2288 if test x"$enable_threads" = "xno"; then
2289         echo "$ac_t""no" 1>&6
2290 else
2291         echo "$ac_t""yes" 1>&6
2292
2293         cat >> confdefs.h <<\EOF
2294 #define USE_THREADS 1
2295 EOF
2296
2297         cat >> confdefs.h <<\EOF
2298 #define EXTERNAL_OVERFLOW 1
2299 EOF
2300
2301         cat >> confdefs.h <<\EOF
2302 #define DONT_FREE_FIRST 1
2303 EOF
2304
2305
2306         LIBTHREAD="libthreads.a"
2307         THREAD_OBJ="threads/libthreads.a"
2308         
2309         
2310 fi
2311
2312 echo $ac_n "checking which garbage collector to use""... $ac_c" 1>&6
2313 echo "configure:2314: checking which garbage collector to use" >&5
2314 if test x"$enable_gc2" = "xno"; then
2315         echo "$ac_t""old garbage collector" 1>&6
2316         GC_OBJ="mm/libmm_old.a"
2317 else
2318         echo "$ac_t""new garbage collector" 1>&6
2319         GC_OBJ="mm/libmm_new.a"
2320 fi
2321
2322
2323
2324 trap '' 1 2 15
2325 cat > confcache <<\EOF
2326 # This file is a shell script that caches the results of configure
2327 # tests run on this system so they can be shared between configure
2328 # scripts and configure runs.  It is not useful on other systems.
2329 # If it contains results you don't want to keep, you may remove or edit it.
2330 #
2331 # By default, configure uses ./config.cache as the cache file,
2332 # creating it if it does not exist already.  You can give configure
2333 # the --cache-file=FILE option to use a different cache file; that is
2334 # what configure does when it calls configure scripts in
2335 # subdirectories, so they share the cache.
2336 # Giving --cache-file=/dev/null disables caching, for debugging configure.
2337 # config.status only pays attention to the cache file if you give it the
2338 # --recheck option to rerun configure.
2339 #
2340 EOF
2341 # The following way of writing the cache mishandles newlines in values,
2342 # but we know of no workaround that is simple, portable, and efficient.
2343 # So, don't put newlines in cache variables' values.
2344 # Ultrix sh set writes to stderr and can't be redirected directly,
2345 # and sets the high bit in the cache file unless we assign to the vars.
2346 (set) 2>&1 |
2347   case `(ac_space=' '; set | grep ac_space) 2>&1` in
2348   *ac_space=\ *)
2349     # `set' does not quote correctly, so add quotes (double-quote substitution
2350     # turns \\\\ into \\, and sed turns \\ into \).
2351     sed -n \
2352       -e "s/'/'\\\\''/g" \
2353       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
2354     ;;
2355   *)
2356     # `set' quotes correctly as required by POSIX, so do not add quotes.
2357     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
2358     ;;
2359   esac >> confcache
2360 if cmp -s $cache_file confcache; then
2361   :
2362 else
2363   if test -w $cache_file; then
2364     echo "updating cache $cache_file"
2365     cat confcache > $cache_file
2366   else
2367     echo "not updating unwritable cache $cache_file"
2368   fi
2369 fi
2370 rm -f confcache
2371
2372 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
2373
2374 test "x$prefix" = xNONE && prefix=$ac_default_prefix
2375 # Let make expand exec_prefix.
2376 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
2377
2378 # Any assignment to VPATH causes Sun make to only execute
2379 # the first set of double-colon rules, so remove it if not needed.
2380 # If there is a colon in the path, we need to keep it.
2381 if test "x$srcdir" = x.; then
2382   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
2383 fi
2384
2385 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
2386
2387 DEFS=-DHAVE_CONFIG_H
2388
2389 # Without the "./", some shells look in PATH for config.status.
2390 : ${CONFIG_STATUS=./config.status}
2391
2392 echo creating $CONFIG_STATUS
2393 rm -f $CONFIG_STATUS
2394 cat > $CONFIG_STATUS <<EOF
2395 #! /bin/sh
2396 # Generated automatically by configure.
2397 # Run this file to recreate the current configuration.
2398 # This directory was configured as follows,
2399 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
2400 #
2401 # $0 $ac_configure_args
2402 #
2403 # Compiler output produced by configure, useful for debugging
2404 # configure, is in ./config.log if it exists.
2405
2406 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
2407 for ac_option
2408 do
2409   case "\$ac_option" in
2410   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
2411     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
2412     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
2413   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
2414     echo "$CONFIG_STATUS generated by autoconf version 2.13"
2415     exit 0 ;;
2416   -help | --help | --hel | --he | --h)
2417     echo "\$ac_cs_usage"; exit 0 ;;
2418   *) echo "\$ac_cs_usage"; exit 1 ;;
2419   esac
2420 done
2421
2422 ac_given_srcdir=$srcdir
2423 ac_given_INSTALL="$INSTALL"
2424
2425 trap 'rm -fr `echo "Makefile \
2426           toolbox/Makefile \
2427           mm/Makefile \
2428           threads/Makefile \
2429           jit/Makefile \
2430           alpha/Makefile \
2431           mips/Makefile \
2432           nat/Makefile \
2433           comp/Makefile  config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
2434 EOF
2435 cat >> $CONFIG_STATUS <<EOF
2436
2437 # Protect against being on the right side of a sed subst in config.status.
2438 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
2439  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
2440 $ac_vpsub
2441 $extrasub
2442 s%@SHELL@%$SHELL%g
2443 s%@CFLAGS@%$CFLAGS%g
2444 s%@CPPFLAGS@%$CPPFLAGS%g
2445 s%@CXXFLAGS@%$CXXFLAGS%g
2446 s%@FFLAGS@%$FFLAGS%g
2447 s%@DEFS@%$DEFS%g
2448 s%@LDFLAGS@%$LDFLAGS%g
2449 s%@LIBS@%$LIBS%g
2450 s%@exec_prefix@%$exec_prefix%g
2451 s%@prefix@%$prefix%g
2452 s%@program_transform_name@%$program_transform_name%g
2453 s%@bindir@%$bindir%g
2454 s%@sbindir@%$sbindir%g
2455 s%@libexecdir@%$libexecdir%g
2456 s%@datadir@%$datadir%g
2457 s%@sysconfdir@%$sysconfdir%g
2458 s%@sharedstatedir@%$sharedstatedir%g
2459 s%@localstatedir@%$localstatedir%g
2460 s%@libdir@%$libdir%g
2461 s%@includedir@%$includedir%g
2462 s%@oldincludedir@%$oldincludedir%g
2463 s%@infodir@%$infodir%g
2464 s%@mandir@%$mandir%g
2465 s%@host@%$host%g
2466 s%@host_alias@%$host_alias%g
2467 s%@host_cpu@%$host_cpu%g
2468 s%@host_vendor@%$host_vendor%g
2469 s%@host_os@%$host_os%g
2470 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
2471 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
2472 s%@INSTALL_DATA@%$INSTALL_DATA%g
2473 s%@PACKAGE@%$PACKAGE%g
2474 s%@VERSION@%$VERSION%g
2475 s%@ACLOCAL@%$ACLOCAL%g
2476 s%@AUTOCONF@%$AUTOCONF%g
2477 s%@AUTOMAKE@%$AUTOMAKE%g
2478 s%@AUTOHEADER@%$AUTOHEADER%g
2479 s%@MAKEINFO@%$MAKEINFO%g
2480 s%@SET_MAKE@%$SET_MAKE%g
2481 s%@COMPILER_SOURCES@%$COMPILER_SOURCES%g
2482 s%@COMPILER_OBJECTS@%$COMPILER_OBJECTS%g
2483 s%@SYSDEP_DIR@%$SYSDEP_DIR%g
2484 s%@CC@%$CC%g
2485 s%@RANLIB@%$RANLIB%g
2486 s%@CPP@%$CPP%g
2487 s%@LIBOBJS@%$LIBOBJS%g
2488 s%@LIBTHREAD@%$LIBTHREAD%g
2489 s%@THREAD_OBJ@%$THREAD_OBJ%g
2490 s%@GC_OBJ@%$GC_OBJ%g
2491
2492 CEOF
2493 EOF
2494
2495 cat >> $CONFIG_STATUS <<\EOF
2496
2497 # Split the substitutions into bite-sized pieces for seds with
2498 # small command number limits, like on Digital OSF/1 and HP-UX.
2499 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
2500 ac_file=1 # Number of current file.
2501 ac_beg=1 # First line for current file.
2502 ac_end=$ac_max_sed_cmds # Line after last line for current file.
2503 ac_more_lines=:
2504 ac_sed_cmds=""
2505 while $ac_more_lines; do
2506   if test $ac_beg -gt 1; then
2507     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
2508   else
2509     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
2510   fi
2511   if test ! -s conftest.s$ac_file; then
2512     ac_more_lines=false
2513     rm -f conftest.s$ac_file
2514   else
2515     if test -z "$ac_sed_cmds"; then
2516       ac_sed_cmds="sed -f conftest.s$ac_file"
2517     else
2518       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
2519     fi
2520     ac_file=`expr $ac_file + 1`
2521     ac_beg=$ac_end
2522     ac_end=`expr $ac_end + $ac_max_sed_cmds`
2523   fi
2524 done
2525 if test -z "$ac_sed_cmds"; then
2526   ac_sed_cmds=cat
2527 fi
2528 EOF
2529
2530 cat >> $CONFIG_STATUS <<EOF
2531
2532 CONFIG_FILES=\${CONFIG_FILES-"Makefile \
2533           toolbox/Makefile \
2534           mm/Makefile \
2535           threads/Makefile \
2536           jit/Makefile \
2537           alpha/Makefile \
2538           mips/Makefile \
2539           nat/Makefile \
2540           comp/Makefile "}
2541 EOF
2542 cat >> $CONFIG_STATUS <<\EOF
2543 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
2544   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
2545   case "$ac_file" in
2546   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
2547        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
2548   *) ac_file_in="${ac_file}.in" ;;
2549   esac
2550
2551   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
2552
2553   # Remove last slash and all that follows it.  Not all systems have dirname.
2554   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
2555   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
2556     # The file is in a subdirectory.
2557     test ! -d "$ac_dir" && mkdir "$ac_dir"
2558     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
2559     # A "../" for each directory in $ac_dir_suffix.
2560     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
2561   else
2562     ac_dir_suffix= ac_dots=
2563   fi
2564
2565   case "$ac_given_srcdir" in
2566   .)  srcdir=.
2567       if test -z "$ac_dots"; then top_srcdir=.
2568       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
2569   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
2570   *) # Relative path.
2571     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
2572     top_srcdir="$ac_dots$ac_given_srcdir" ;;
2573   esac
2574
2575   case "$ac_given_INSTALL" in
2576   [/$]*) INSTALL="$ac_given_INSTALL" ;;
2577   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
2578   esac
2579
2580   echo creating "$ac_file"
2581   rm -f "$ac_file"
2582   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
2583   case "$ac_file" in
2584   *Makefile*) ac_comsub="1i\\
2585 # $configure_input" ;;
2586   *) ac_comsub= ;;
2587   esac
2588
2589   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
2590   sed -e "$ac_comsub
2591 s%@configure_input@%$configure_input%g
2592 s%@srcdir@%$srcdir%g
2593 s%@top_srcdir@%$top_srcdir%g
2594 s%@INSTALL@%$INSTALL%g
2595 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
2596 fi; done
2597 rm -f conftest.s*
2598
2599 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
2600 # NAME is the cpp macro being defined and VALUE is the value it is being given.
2601 #
2602 # ac_d sets the value in "#define NAME VALUE" lines.
2603 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
2604 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
2605 ac_dC='\3'
2606 ac_dD='%g'
2607 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
2608 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
2609 ac_uB='\([      ]\)%\1#\2define\3'
2610 ac_uC=' '
2611 ac_uD='\4%g'
2612 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
2613 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
2614 ac_eB='$%\1#\2define\3'
2615 ac_eC=' '
2616 ac_eD='%g'
2617
2618 if test "${CONFIG_HEADERS+set}" != set; then
2619 EOF
2620 cat >> $CONFIG_STATUS <<EOF
2621   CONFIG_HEADERS="config.h"
2622 EOF
2623 cat >> $CONFIG_STATUS <<\EOF
2624 fi
2625 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
2626   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
2627   case "$ac_file" in
2628   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
2629        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
2630   *) ac_file_in="${ac_file}.in" ;;
2631   esac
2632
2633   echo creating $ac_file
2634
2635   rm -f conftest.frag conftest.in conftest.out
2636   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
2637   cat $ac_file_inputs > conftest.in
2638
2639 EOF
2640
2641 # Transform confdefs.h into a sed script conftest.vals that substitutes
2642 # the proper values into config.h.in to produce config.h.  And first:
2643 # Protect against being on the right side of a sed subst in config.status.
2644 # Protect against being in an unquoted here document in config.status.
2645 rm -f conftest.vals
2646 cat > conftest.hdr <<\EOF
2647 s/[\\&%]/\\&/g
2648 s%[\\$`]%\\&%g
2649 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
2650 s%ac_d%ac_u%gp
2651 s%ac_u%ac_e%gp
2652 EOF
2653 sed -n -f conftest.hdr confdefs.h > conftest.vals
2654 rm -f conftest.hdr
2655
2656 # This sed command replaces #undef with comments.  This is necessary, for
2657 # example, in the case of _POSIX_SOURCE, which is predefined and required
2658 # on some systems where configure will not decide to define it.
2659 cat >> conftest.vals <<\EOF
2660 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
2661 EOF
2662
2663 # Break up conftest.vals because some shells have a limit on
2664 # the size of here documents, and old seds have small limits too.
2665
2666 rm -f conftest.tail
2667 while :
2668 do
2669   ac_lines=`grep -c . conftest.vals`
2670   # grep -c gives empty output for an empty file on some AIX systems.
2671   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
2672   # Write a limited-size here document to conftest.frag.
2673   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
2674   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
2675   echo 'CEOF
2676   sed -f conftest.frag conftest.in > conftest.out
2677   rm -f conftest.in
2678   mv conftest.out conftest.in
2679 ' >> $CONFIG_STATUS
2680   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
2681   rm -f conftest.vals
2682   mv conftest.tail conftest.vals
2683 done
2684 rm -f conftest.vals
2685
2686 cat >> $CONFIG_STATUS <<\EOF
2687   rm -f conftest.frag conftest.h
2688   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
2689   cat conftest.in >> conftest.h
2690   rm -f conftest.in
2691   if cmp -s $ac_file conftest.h 2>/dev/null; then
2692     echo "$ac_file is unchanged"
2693     rm -f conftest.h
2694   else
2695     # Remove last slash and all that follows it.  Not all systems have dirname.
2696       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
2697       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
2698       # The file is in a subdirectory.
2699       test ! -d "$ac_dir" && mkdir "$ac_dir"
2700     fi
2701     rm -f $ac_file
2702     mv conftest.h $ac_file
2703   fi
2704 fi; done
2705
2706 EOF
2707 cat >> $CONFIG_STATUS <<EOF
2708
2709
2710 EOF
2711 cat >> $CONFIG_STATUS <<\EOF
2712 test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h
2713
2714 exit 0
2715 EOF
2716 chmod +x $CONFIG_STATUS
2717 rm -fr confdefs* $ac_clean_files
2718 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
2719