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