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