* posix.c: Doc fixes.
[bpt/guile.git] / libguile / configure
CommitLineData
0f2d19dd
JB
1#! /bin/sh
2
3# Guess values for system-dependent variables and create Makefiles.
087d2a6f
JB
4# Generated automatically using autoconf version 2.10
5# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
0f2d19dd
JB
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:
11ac_help=
12ac_default_prefix=/usr/local
13# Any additions from configure.in:
074657b0
MD
14ac_help="$ac_help
15 --disable-debug Don't include debugging support"
0f2d19dd
JB
16
17# Initialize some variables set by options.
18# The variables have the same names as the options, with
19# dashes changed to underlines.
20build=NONE
21cache_file=./config.cache
22exec_prefix=NONE
23host=NONE
24no_create=
25nonopt=NONE
26no_recursion=
27prefix=NONE
28program_prefix=NONE
29program_suffix=NONE
30program_transform_name=s,x,x,
31silent=
32site=
33srcdir=
34target=NONE
35verbose=
36x_includes=NONE
37x_libraries=NONE
38bindir='${exec_prefix}/bin'
39sbindir='${exec_prefix}/sbin'
40libexecdir='${exec_prefix}/libexec'
41datadir='${prefix}/share'
42sysconfdir='${prefix}/etc'
43sharedstatedir='${prefix}/com'
44localstatedir='${prefix}/var'
45libdir='${exec_prefix}/lib'
46includedir='${prefix}/include'
47oldincludedir='/usr/include'
48infodir='${prefix}/info'
49mandir='${prefix}/man'
50
51# Initialize some other variables.
52subdirs=
53MFLAGS= MAKEFLAGS=
54
55ac_prev=
56for ac_option
57do
58
59 # If the previous option needs an argument, assign it.
60 if test -n "$ac_prev"; then
61 eval "$ac_prev=\$ac_option"
62 ac_prev=
63 continue
64 fi
65
66 case "$ac_option" in
67 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
68 *) ac_optarg= ;;
69 esac
70
71 # Accept the important Cygnus configure options, so we can diagnose typos.
72
73 case "$ac_option" in
74
75 -bindir | --bindir | --bindi | --bind | --bin | --bi)
76 ac_prev=bindir ;;
77 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
78 bindir="$ac_optarg" ;;
79
80 -build | --build | --buil | --bui | --bu)
81 ac_prev=build ;;
82 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
83 build="$ac_optarg" ;;
84
85 -cache-file | --cache-file | --cache-fil | --cache-fi \
86 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
87 ac_prev=cache_file ;;
88 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
89 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
90 cache_file="$ac_optarg" ;;
91
92 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
93 ac_prev=datadir ;;
94 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
95 | --da=*)
96 datadir="$ac_optarg" ;;
97
98 -disable-* | --disable-*)
99 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
100 # Reject names that are not valid shell variable names.
101 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
102 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
103 fi
104 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
105 eval "enable_${ac_feature}=no" ;;
106
107 -enable-* | --enable-*)
108 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
109 # Reject names that are not valid shell variable names.
110 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
111 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
112 fi
113 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
114 case "$ac_option" in
115 *=*) ;;
116 *) ac_optarg=yes ;;
117 esac
118 eval "enable_${ac_feature}='$ac_optarg'" ;;
119
120 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
121 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
122 | --exec | --exe | --ex)
123 ac_prev=exec_prefix ;;
124 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
125 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
126 | --exec=* | --exe=* | --ex=*)
127 exec_prefix="$ac_optarg" ;;
128
129 -gas | --gas | --ga | --g)
130 # Obsolete; use --with-gas.
131 with_gas=yes ;;
132
133 -help | --help | --hel | --he)
134 # Omit some internal or obsolete options to make the list less imposing.
135 # This message is too long to be a string in the A/UX 3.1 sh.
136 cat << EOF
137Usage: configure [options] [host]
138Options: [defaults in brackets after descriptions]
139Configuration:
140 --cache-file=FILE cache test results in FILE
141 --help print this message
142 --no-create do not create output files
143 --quiet, --silent do not print \`checking...' messages
144 --version print the version of autoconf that created configure
145Directory and file names:
146 --prefix=PREFIX install architecture-independent files in PREFIX
147 [$ac_default_prefix]
148 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
149 [same as prefix]
150 --bindir=DIR user executables in DIR [EPREFIX/bin]
151 --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
152 --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
153 --datadir=DIR read-only architecture-independent data in DIR
154 [PREFIX/share]
155 --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
156 --sharedstatedir=DIR modifiable architecture-independent data in DIR
157 [PREFIX/com]
158 --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
159 --libdir=DIR object code libraries in DIR [EPREFIX/lib]
160 --includedir=DIR C header files in DIR [PREFIX/include]
161 --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
162 --infodir=DIR info documentation in DIR [PREFIX/info]
163 --mandir=DIR man documentation in DIR [PREFIX/man]
164 --srcdir=DIR find the sources in DIR [configure dir or ..]
165 --program-prefix=PREFIX prepend PREFIX to installed program names
166 --program-suffix=SUFFIX append SUFFIX to installed program names
167 --program-transform-name=PROGRAM
168 run sed PROGRAM on installed program names
169EOF
170 cat << EOF
171Host type:
172 --build=BUILD configure for building on BUILD [BUILD=HOST]
173 --host=HOST configure for HOST [guessed]
174 --target=TARGET configure for TARGET [TARGET=HOST]
175Features and packages:
176 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
177 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
178 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
179 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
180 --x-includes=DIR X include files are in DIR
181 --x-libraries=DIR X library files are in DIR
182EOF
183 if test -n "$ac_help"; then
184 echo "--enable and --with options recognized:$ac_help"
185 fi
186 exit 0 ;;
187
188 -host | --host | --hos | --ho)
189 ac_prev=host ;;
190 -host=* | --host=* | --hos=* | --ho=*)
191 host="$ac_optarg" ;;
192
193 -includedir | --includedir | --includedi | --included | --include \
194 | --includ | --inclu | --incl | --inc)
195 ac_prev=includedir ;;
196 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
197 | --includ=* | --inclu=* | --incl=* | --inc=*)
198 includedir="$ac_optarg" ;;
199
200 -infodir | --infodir | --infodi | --infod | --info | --inf)
201 ac_prev=infodir ;;
202 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
203 infodir="$ac_optarg" ;;
204
205 -libdir | --libdir | --libdi | --libd)
206 ac_prev=libdir ;;
207 -libdir=* | --libdir=* | --libdi=* | --libd=*)
208 libdir="$ac_optarg" ;;
209
210 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
211 | --libexe | --libex | --libe)
212 ac_prev=libexecdir ;;
213 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
214 | --libexe=* | --libex=* | --libe=*)
215 libexecdir="$ac_optarg" ;;
216
217 -localstatedir | --localstatedir | --localstatedi | --localstated \
218 | --localstate | --localstat | --localsta | --localst \
219 | --locals | --local | --loca | --loc | --lo)
220 ac_prev=localstatedir ;;
221 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
222 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
223 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
224 localstatedir="$ac_optarg" ;;
225
226 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
227 ac_prev=mandir ;;
228 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
229 mandir="$ac_optarg" ;;
230
231 -nfp | --nfp | --nf)
232 # Obsolete; use --without-fp.
233 with_fp=no ;;
234
235 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
236 | --no-cr | --no-c)
237 no_create=yes ;;
238
239 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
240 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
241 no_recursion=yes ;;
242
243 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
244 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
245 | --oldin | --oldi | --old | --ol | --o)
246 ac_prev=oldincludedir ;;
247 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
248 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
249 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
250 oldincludedir="$ac_optarg" ;;
251
252 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
253 ac_prev=prefix ;;
254 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
255 prefix="$ac_optarg" ;;
256
257 -program-prefix | --program-prefix | --program-prefi | --program-pref \
258 | --program-pre | --program-pr | --program-p)
259 ac_prev=program_prefix ;;
260 -program-prefix=* | --program-prefix=* | --program-prefi=* \
261 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
262 program_prefix="$ac_optarg" ;;
263
264 -program-suffix | --program-suffix | --program-suffi | --program-suff \
265 | --program-suf | --program-su | --program-s)
266 ac_prev=program_suffix ;;
267 -program-suffix=* | --program-suffix=* | --program-suffi=* \
268 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
269 program_suffix="$ac_optarg" ;;
270
271 -program-transform-name | --program-transform-name \
272 | --program-transform-nam | --program-transform-na \
273 | --program-transform-n | --program-transform- \
274 | --program-transform | --program-transfor \
275 | --program-transfo | --program-transf \
276 | --program-trans | --program-tran \
277 | --progr-tra | --program-tr | --program-t)
278 ac_prev=program_transform_name ;;
279 -program-transform-name=* | --program-transform-name=* \
280 | --program-transform-nam=* | --program-transform-na=* \
281 | --program-transform-n=* | --program-transform-=* \
282 | --program-transform=* | --program-transfor=* \
283 | --program-transfo=* | --program-transf=* \
284 | --program-trans=* | --program-tran=* \
285 | --progr-tra=* | --program-tr=* | --program-t=*)
286 program_transform_name="$ac_optarg" ;;
287
288 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
289 | -silent | --silent | --silen | --sile | --sil)
290 silent=yes ;;
291
292 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
293 ac_prev=sbindir ;;
294 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
295 | --sbi=* | --sb=*)
296 sbindir="$ac_optarg" ;;
297
298 -sharedstatedir | --sharedstatedir | --sharedstatedi \
299 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
300 | --sharedst | --shareds | --shared | --share | --shar \
301 | --sha | --sh)
302 ac_prev=sharedstatedir ;;
303 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
304 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
305 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
306 | --sha=* | --sh=*)
307 sharedstatedir="$ac_optarg" ;;
308
309 -site | --site | --sit)
310 ac_prev=site ;;
311 -site=* | --site=* | --sit=*)
312 site="$ac_optarg" ;;
313
314 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
315 ac_prev=srcdir ;;
316 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
317 srcdir="$ac_optarg" ;;
318
319 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
320 | --syscon | --sysco | --sysc | --sys | --sy)
321 ac_prev=sysconfdir ;;
322 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
323 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
324 sysconfdir="$ac_optarg" ;;
325
326 -target | --target | --targe | --targ | --tar | --ta | --t)
327 ac_prev=target ;;
328 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
329 target="$ac_optarg" ;;
330
331 -v | -verbose | --verbose | --verbos | --verbo | --verb)
332 verbose=yes ;;
333
334 -version | --version | --versio | --versi | --vers)
087d2a6f 335 echo "configure generated by autoconf version 2.10"
0f2d19dd
JB
336 exit 0 ;;
337
338 -with-* | --with-*)
339 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
340 # Reject names that are not valid shell variable names.
341 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
342 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
343 fi
344 ac_package=`echo $ac_package| sed 's/-/_/g'`
345 case "$ac_option" in
346 *=*) ;;
347 *) ac_optarg=yes ;;
348 esac
349 eval "with_${ac_package}='$ac_optarg'" ;;
350
351 -without-* | --without-*)
352 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
353 # Reject names that are not valid shell variable names.
354 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
355 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
356 fi
357 ac_package=`echo $ac_package| sed 's/-/_/g'`
358 eval "with_${ac_package}=no" ;;
359
360 --x)
361 # Obsolete; use --with-x.
362 with_x=yes ;;
363
364 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
365 | --x-incl | --x-inc | --x-in | --x-i)
366 ac_prev=x_includes ;;
367 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
368 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
369 x_includes="$ac_optarg" ;;
370
371 -x-libraries | --x-libraries | --x-librarie | --x-librari \
372 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
373 ac_prev=x_libraries ;;
374 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
375 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
376 x_libraries="$ac_optarg" ;;
377
378 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
379 ;;
380
381 *)
382 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
383 echo "configure: warning: $ac_option: invalid host type" 1>&2
384 fi
385 if test "x$nonopt" != xNONE; then
386 { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
387 fi
388 nonopt="$ac_option"
389 ;;
390
391 esac
392done
393
394if test -n "$ac_prev"; then
395 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
396fi
397
398trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
399
400# File descriptor usage:
401# 0 standard input
402# 1 file creation
403# 2 errors and warnings
404# 3 some systems may open it to /dev/tty
405# 4 used on the Kubota Titan
406# 6 checking for... messages and results
407# 5 compiler messages saved in config.log
408if test "$silent" = yes; then
409 exec 6>/dev/null
410else
411 exec 6>&1
412fi
413exec 5>./config.log
414
415echo "\
416This file contains any messages produced by compilers while
417running configure, to aid debugging if configure makes a mistake.
418" 1>&5
419
420# Strip out --no-create and --no-recursion so they do not pile up.
421# Also quote any args containing shell metacharacters.
422ac_configure_args=
423for ac_arg
424do
425 case "$ac_arg" in
426 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
427 | --no-cr | --no-c) ;;
428 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
429 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
430 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
431 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
432 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
433 esac
434done
435
436# NLS nuisances.
437# Only set LANG and LC_ALL to C if already set.
438# These must not be set unconditionally because not all systems understand
439# e.g. LANG=C (notably SCO).
440if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
441if test "${LANG+set}" = set; then LANG=C; export LANG; fi
442
443# confdefs.h avoids OS command line length limits that DEFS can exceed.
444rm -rf conftest* confdefs.h
445# AIX cpp loses on an empty file, so make sure it contains at least a newline.
446echo > confdefs.h
447
448# A filename unique to this package, relative to the directory that
449# configure is in, which we can look for to find out if srcdir is correct.
450ac_unique_file=eval.c
451
452# Find the source files, if location was not specified.
453if test -z "$srcdir"; then
454 ac_srcdir_defaulted=yes
455 # Try the directory containing this script, then its parent.
456 ac_prog=$0
457 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
458 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
459 srcdir=$ac_confdir
460 if test ! -r $srcdir/$ac_unique_file; then
461 srcdir=..
462 fi
463else
464 ac_srcdir_defaulted=no
465fi
466if test ! -r $srcdir/$ac_unique_file; then
467 if test "$ac_srcdir_defaulted" = yes; then
468 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
469 else
470 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
471 fi
472fi
473srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
474
475# Prefer explicitly selected file to automatically selected ones.
476if test -z "$CONFIG_SITE"; then
477 if test "x$prefix" != xNONE; then
478 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
479 else
480 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
481 fi
482fi
483for ac_site_file in $CONFIG_SITE; do
484 if test -r "$ac_site_file"; then
485 echo "loading site script $ac_site_file"
486 . "$ac_site_file"
487 fi
488done
489
490if test -r "$cache_file"; then
491 echo "loading cache $cache_file"
492 . $cache_file
493else
494 echo "creating cache $cache_file"
495 > $cache_file
496fi
497
498ac_ext=c
499# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
087d2a6f
JB
500ac_cpp='$CPP $CPPFLAGS'
501ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
502ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
0f2d19dd
JB
503
504if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
505 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
506 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
507 ac_n= ac_c='
508' ac_t=' '
509 else
510 ac_n=-n ac_c= ac_t=
511 fi
512else
513 ac_n= ac_c='\c' ac_t=
514fi
515
516
517
518
519. $srcdir/../GUILE-VERSION
520
074657b0
MD
521#--------------------------------------------------------------------
522#
523# User options
524#
525#--------------------------------------------------------------------
526
527# Check whether --enable-debug or --disable-debug was given.
528if test "${enable_debug+set}" = set; then
529 enableval="$enable_debug"
530 :
531fi
532
533if test "$enableval" != n && test "$enableval" != no; then
534 cat >> confdefs.h <<\EOF
535#define DEBUG_EXTENSIONS 1
536EOF
537
538 cat >> confdefs.h <<\EOF
539#define READER_EXTENSIONS 1
540EOF
541
542 LIBOBJS="debug.o srcprop.o $LIBOBJS"
543fi
544
545#--------------------------------------------------------------------
546
0f2d19dd
JB
547test -z "$CFLAGS" && CFLAGS=-g
548test -z "$LDFLAGS" && LDFLAGS=-g
549
550# Extract the first word of "gcc", so it can be a program name with args.
551set dummy gcc; ac_word=$2
552echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
553if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
554 echo $ac_n "(cached) $ac_c" 1>&6
555else
556 if test -n "$CC"; then
557 ac_cv_prog_CC="$CC" # Let the user override the test.
558else
559 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
560 for ac_dir in $PATH; do
561 test -z "$ac_dir" && ac_dir=.
562 if test -f $ac_dir/$ac_word; then
563 ac_cv_prog_CC="gcc"
564 break
565 fi
566 done
567 IFS="$ac_save_ifs"
568fi
569fi
570CC="$ac_cv_prog_CC"
571if test -n "$CC"; then
572 echo "$ac_t""$CC" 1>&6
573else
574 echo "$ac_t""no" 1>&6
575fi
576
087d2a6f
JB
577if test -z "$CC"; then
578 # Extract the first word of "cc", so it can be a program name with args.
579set dummy cc; ac_word=$2
580echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
581if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
582 echo $ac_n "(cached) $ac_c" 1>&6
583else
584 if test -n "$CC"; then
585 ac_cv_prog_CC="$CC" # Let the user override the test.
586else
587 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
588 ac_prog_rejected=no
589 for ac_dir in $PATH; do
590 test -z "$ac_dir" && ac_dir=.
591 if test -f $ac_dir/$ac_word; then
592 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
593 ac_prog_rejected=yes
594 continue
595 fi
596 ac_cv_prog_CC="cc"
597 break
598 fi
599 done
600 IFS="$ac_save_ifs"
601if test $ac_prog_rejected = yes; then
602 # We found a bogon in the path, so make sure we never use it.
603 set dummy $ac_cv_prog_CC
604 shift
605 if test $# -gt 0; then
606 # We chose a different compiler from the bogus one.
607 # However, it has the same basename, so the bogon will be chosen
608 # first if we set CC to just the basename; use the full file name.
609 shift
610 set dummy "$ac_dir/$ac_word" "$@"
611 shift
612 ac_cv_prog_CC="$@"
613 fi
614fi
615fi
616fi
617CC="$ac_cv_prog_CC"
618if test -n "$CC"; then
619 echo "$ac_t""$CC" 1>&6
620else
621 echo "$ac_t""no" 1>&6
622fi
623
624 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
625fi
0f2d19dd
JB
626
627echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
628if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
629 echo $ac_n "(cached) $ac_c" 1>&6
630else
631 cat > conftest.c <<EOF
632#ifdef __GNUC__
633 yes;
634#endif
635EOF
087d2a6f 636if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:637: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
0f2d19dd
JB
637 ac_cv_prog_gcc=yes
638else
639 ac_cv_prog_gcc=no
640fi
641fi
642
643echo "$ac_t""$ac_cv_prog_gcc" 1>&6
644if test $ac_cv_prog_gcc = yes; then
645 GCC=yes
646 if test "${CFLAGS+set}" != set; then
647 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
648if eval "test \"`echo '$''{'ac_cv_prog_gcc_g'+set}'`\" = set"; then
649 echo $ac_n "(cached) $ac_c" 1>&6
650else
651 echo 'void f(){}' > conftest.c
652if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
653 ac_cv_prog_gcc_g=yes
654else
655 ac_cv_prog_gcc_g=no
656fi
657rm -f conftest*
658
659fi
660
661echo "$ac_t""$ac_cv_prog_gcc_g" 1>&6
662 if test $ac_cv_prog_gcc_g = yes; then
663 CFLAGS="-g -O"
664 else
665 CFLAGS="-O"
666 fi
667 fi
668else
669 GCC=
670 test "${CFLAGS+set}" = set || CFLAGS="-g"
671fi
672
673echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
674# On Suns, sometimes $CPP names a directory.
675if test -n "$CPP" && test -d "$CPP"; then
676 CPP=
677fi
678if test -z "$CPP"; then
679if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
680 echo $ac_n "(cached) $ac_c" 1>&6
681else
682 # This must be in double quotes, not single quotes, because CPP may get
683 # substituted into the Makefile and "${CC-cc}" will confuse make.
684 CPP="${CC-cc} -E"
685 # On the NeXT, cc -E runs the code through the compiler's parser,
686 # not just through cpp.
687 cat > conftest.$ac_ext <<EOF
087d2a6f 688#line 689 "configure"
0f2d19dd
JB
689#include "confdefs.h"
690#include <assert.h>
691Syntax Error
692EOF
087d2a6f
JB
693ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
694{ (eval echo configure:695: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
0f2d19dd
JB
695ac_err=`grep -v '^ *+' conftest.out`
696if test -z "$ac_err"; then
697 :
698else
699 echo "$ac_err" >&5
700 rm -rf conftest*
701 CPP="${CC-cc} -E -traditional-cpp"
702 cat > conftest.$ac_ext <<EOF
087d2a6f 703#line 704 "configure"
0f2d19dd
JB
704#include "confdefs.h"
705#include <assert.h>
706Syntax Error
707EOF
087d2a6f
JB
708ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
709{ (eval echo configure:710: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
0f2d19dd
JB
710ac_err=`grep -v '^ *+' conftest.out`
711if test -z "$ac_err"; then
712 :
713else
714 echo "$ac_err" >&5
715 rm -rf conftest*
716 CPP=/lib/cpp
717fi
718rm -f conftest*
719fi
720rm -f conftest*
721 ac_cv_prog_CPP="$CPP"
722fi
723 CPP="$ac_cv_prog_CPP"
724else
725 ac_cv_prog_CPP="$CPP"
726fi
727echo "$ac_t""$CPP" 1>&6
728
729# Extract the first word of "ranlib", so it can be a program name with args.
730set dummy ranlib; ac_word=$2
731echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
732if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
733 echo $ac_n "(cached) $ac_c" 1>&6
734else
735 if test -n "$RANLIB"; then
736 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
737else
738 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
739 for ac_dir in $PATH; do
740 test -z "$ac_dir" && ac_dir=.
741 if test -f $ac_dir/$ac_word; then
742 ac_cv_prog_RANLIB="ranlib"
743 break
744 fi
745 done
746 IFS="$ac_save_ifs"
747 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
748fi
749fi
750RANLIB="$ac_cv_prog_RANLIB"
751if test -n "$RANLIB"; then
752 echo "$ac_t""$RANLIB" 1>&6
753else
754 echo "$ac_t""no" 1>&6
755fi
756
757
758echo $ac_n "checking for AIX""... $ac_c" 1>&6
759cat > conftest.$ac_ext <<EOF
087d2a6f 760#line 761 "configure"
0f2d19dd
JB
761#include "confdefs.h"
762#ifdef _AIX
763 yes
764#endif
765
766EOF
767if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
768 egrep "yes" >/dev/null 2>&1; then
769 rm -rf conftest*
770 echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
771#define _ALL_SOURCE 1
772EOF
773
774else
775 rm -rf conftest*
776 echo "$ac_t""no" 1>&6
777fi
778rm -f conftest*
779
780
781echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
782if test -d /etc/conf/kconfig.d &&
783 grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
784then
785 echo "$ac_t""yes" 1>&6
786 ISC=yes # If later tests want to check for ISC.
787 cat >> confdefs.h <<\EOF
788#define _POSIX_SOURCE 1
789EOF
790
791 if test "$GCC" = yes; then
792 CC="$CC -posix"
793 else
794 CC="$CC -Xp"
795 fi
796else
797 echo "$ac_t""no" 1>&6
798 ISC=
799fi
800
801ac_safe=`echo "minix/config.h" | tr './\055' '___'`
802echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6
803if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
804 echo $ac_n "(cached) $ac_c" 1>&6
805else
806 cat > conftest.$ac_ext <<EOF
087d2a6f 807#line 808 "configure"
0f2d19dd
JB
808#include "confdefs.h"
809#include <minix/config.h>
810EOF
087d2a6f
JB
811ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
812{ (eval echo configure:813: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
0f2d19dd
JB
813ac_err=`grep -v '^ *+' conftest.out`
814if test -z "$ac_err"; then
815 rm -rf conftest*
816 eval "ac_cv_header_$ac_safe=yes"
817else
818 echo "$ac_err" >&5
819 rm -rf conftest*
820 eval "ac_cv_header_$ac_safe=no"
821fi
822rm -f conftest*
823fi
824if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
825 echo "$ac_t""yes" 1>&6
826 MINIX=yes
827else
828 echo "$ac_t""no" 1>&6
829MINIX=
830fi
831
832if test "$MINIX" = yes; then
833 cat >> confdefs.h <<\EOF
834#define _POSIX_SOURCE 1
835EOF
836
837 cat >> confdefs.h <<\EOF
838#define _POSIX_1_SOURCE 2
839EOF
840
841 cat >> confdefs.h <<\EOF
842#define _MINIX 1
843EOF
844
845fi
846
847
848echo $ac_n "checking for working const""... $ac_c" 1>&6
849if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
850 echo $ac_n "(cached) $ac_c" 1>&6
851else
852 cat > conftest.$ac_ext <<EOF
087d2a6f 853#line 854 "configure"
0f2d19dd
JB
854#include "confdefs.h"
855
856int main() { return 0; }
857int t() {
858
859/* Ultrix mips cc rejects this. */
860typedef int charset[2]; const charset x;
861/* SunOS 4.1.1 cc rejects this. */
862char const *const *ccp;
863char **p;
864/* NEC SVR4.0.2 mips cc rejects this. */
865struct point {int x, y;};
866static struct point const zero = {0,0};
867/* AIX XL C 1.02.0.0 rejects this.
868 It does not let you subtract one const X* pointer from another in an arm
869 of an if-expression whose if-part is not a constant expression */
870const char *g = "string";
871ccp = &g + (g ? g-g : 0);
872/* HPUX 7.0 cc rejects these. */
873++ccp;
874p = (char**) ccp;
875ccp = (char const *const *) p;
876{ /* SCO 3.2v4 cc rejects this. */
877 char *t;
878 char const *s = 0 ? (char *) 0 : (char const *) 0;
879
880 *t++ = 0;
881}
882{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
883 int x[] = {25, 17};
884 const int *foo = &x[0];
885 ++foo;
886}
887{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
888 typedef const int *iptr;
889 iptr p = 0;
890 ++p;
891}
892{ /* AIX XL C 1.02.0.0 rejects this saying
893 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
894 struct s { int j; const int *ap[3]; };
895 struct s *b; b->j = 5;
896}
897{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
898 const int foo = 10;
899}
900
901; return 0; }
902EOF
087d2a6f 903if { (eval echo configure:904: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
0f2d19dd
JB
904 rm -rf conftest*
905 ac_cv_c_const=yes
906else
907 rm -rf conftest*
908 ac_cv_c_const=no
909fi
910rm -f conftest*
911
912fi
913
914echo "$ac_t""$ac_cv_c_const" 1>&6
915if test $ac_cv_c_const = no; then
916 cat >> confdefs.h <<\EOF
917#define const
918EOF
919
920fi
921
922
923# If we cannot run a trivial program, we must be cross compiling.
924echo $ac_n "checking whether cross-compiling""... $ac_c" 1>&6
925if eval "test \"`echo '$''{'ac_cv_c_cross'+set}'`\" = set"; then
926 echo $ac_n "(cached) $ac_c" 1>&6
927else
928 if test "$cross_compiling" = yes; then
929 ac_cv_c_cross=yes
930else
931cat > conftest.$ac_ext <<EOF
087d2a6f 932#line 933 "configure"
0f2d19dd
JB
933#include "confdefs.h"
934main(){return(0);}
935EOF
087d2a6f 936{ (eval echo configure:937: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
0f2d19dd
JB
937if test -s conftest && (./conftest; exit) 2>/dev/null; then
938 ac_cv_c_cross=no
939else
940 ac_cv_c_cross=yes
941fi
942fi
943rm -fr conftest*
944fi
945
946echo "$ac_t""$ac_cv_c_cross" 1>&6
947cross_compiling=$ac_cv_c_cross
948
949echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
950if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
951 echo $ac_n "(cached) $ac_c" 1>&6
952else
953 cat > conftest.$ac_ext <<EOF
087d2a6f 954#line 955 "configure"
0f2d19dd
JB
955#include "confdefs.h"
956#include <stdlib.h>
957#include <stdarg.h>
958#include <string.h>
959#include <float.h>
960EOF
087d2a6f
JB
961ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
962{ (eval echo configure:963: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
0f2d19dd
JB
963ac_err=`grep -v '^ *+' conftest.out`
964if test -z "$ac_err"; then
965 rm -rf conftest*
966 ac_cv_header_stdc=yes
967else
968 echo "$ac_err" >&5
969 rm -rf conftest*
970 ac_cv_header_stdc=no
971fi
972rm -f conftest*
973
974if test $ac_cv_header_stdc = yes; then
975 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
976cat > conftest.$ac_ext <<EOF
087d2a6f 977#line 978 "configure"
0f2d19dd
JB
978#include "confdefs.h"
979#include <string.h>
980EOF
981if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
982 egrep "memchr" >/dev/null 2>&1; then
983 :
984else
985 rm -rf conftest*
986 ac_cv_header_stdc=no
987fi
988rm -f conftest*
989
990fi
991
992if test $ac_cv_header_stdc = yes; then
993 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
994cat > conftest.$ac_ext <<EOF
087d2a6f 995#line 996 "configure"
0f2d19dd
JB
996#include "confdefs.h"
997#include <stdlib.h>
998EOF
999if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1000 egrep "free" >/dev/null 2>&1; then
1001 :
1002else
1003 rm -rf conftest*
1004 ac_cv_header_stdc=no
1005fi
1006rm -f conftest*
1007
1008fi
1009
1010if test $ac_cv_header_stdc = yes; then
1011 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1012if test "$cross_compiling" = yes; then
1013 :
1014else
1015cat > conftest.$ac_ext <<EOF
087d2a6f 1016#line 1017 "configure"
0f2d19dd
JB
1017#include "confdefs.h"
1018#include <ctype.h>
1019#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1020#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
1021#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
1022int main () { int i; for (i = 0; i < 256; i++)
1023if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1024exit (0); }
1025
1026EOF
087d2a6f 1027{ (eval echo configure:1028: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
0f2d19dd
JB
1028if test -s conftest && (./conftest; exit) 2>/dev/null; then
1029 :
1030else
1031 ac_cv_header_stdc=no
1032fi
1033fi
1034rm -fr conftest*
1035fi
1036fi
1037
1038echo "$ac_t""$ac_cv_header_stdc" 1>&6
1039if test $ac_cv_header_stdc = yes; then
1040 cat >> confdefs.h <<\EOF
1041#define STDC_HEADERS 1
1042EOF
1043
1044fi
1045
1046ac_header_dirent=no
1047for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
1048do
1049ac_safe=`echo "$ac_hdr" | tr './\055' '___'`
1050echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
1051if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
1052 echo $ac_n "(cached) $ac_c" 1>&6
1053else
1054 cat > conftest.$ac_ext <<EOF
087d2a6f 1055#line 1056 "configure"
0f2d19dd
JB
1056#include "confdefs.h"
1057#include <sys/types.h>
1058#include <$ac_hdr>
1059int main() { return 0; }
1060int t() {
1061DIR *dirp = 0;
1062; return 0; }
1063EOF
087d2a6f 1064if { (eval echo configure:1065: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
0f2d19dd
JB
1065 rm -rf conftest*
1066 eval "ac_cv_header_dirent_$ac_safe=yes"
1067else
1068 rm -rf conftest*
1069 eval "ac_cv_header_dirent_$ac_safe=no"
1070fi
1071rm -f conftest*
1072
1073fi
1074if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
1075 echo "$ac_t""yes" 1>&6
1076 ac_tr_hdr=HAVE_`echo $ac_hdr | tr 'abcdedfghijklmnopqrstuvwxyz./\055' 'ABCDEDFGHIJKLMNOPQRSTUVWXYZ___'`
1077 cat >> confdefs.h <<EOF
1078#define $ac_tr_hdr 1
1079EOF
1080 ac_header_dirent=$ac_hdr; break
1081else
1082 echo "$ac_t""no" 1>&6
1083fi
1084done
1085# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
1086if test $ac_header_dirent = dirent.h; then
1087echo $ac_n "checking for -ldir""... $ac_c" 1>&6
087d2a6f 1088ac_lib_var=`echo dir'_'opendir | tr './+\055' '__p_'`
0f2d19dd
JB
1089if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1090 echo $ac_n "(cached) $ac_c" 1>&6
1091else
1092 ac_save_LIBS="$LIBS"
1093LIBS="-ldir $LIBS"
1094cat > conftest.$ac_ext <<EOF
087d2a6f 1095#line 1096 "configure"
0f2d19dd 1096#include "confdefs.h"
087d2a6f
JB
1097/* Override any gcc2 internal prototype to avoid an error. */
1098/* We use char because int might match the return type of a gcc2
1099 builtin and then its argument prototype would still apply. */
1100char opendir();
0f2d19dd
JB
1101
1102int main() { return 0; }
1103int t() {
1104opendir()
1105; return 0; }
1106EOF
087d2a6f 1107if { (eval echo configure:1108: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
0f2d19dd
JB
1108 rm -rf conftest*
1109 eval "ac_cv_lib_$ac_lib_var=yes"
1110else
1111 rm -rf conftest*
1112 eval "ac_cv_lib_$ac_lib_var=no"
1113fi
1114rm -f conftest*
1115LIBS="$ac_save_LIBS"
1116
1117fi
1118if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1119 echo "$ac_t""yes" 1>&6
1120 LIBS="$LIBS -ldir"
1121else
1122 echo "$ac_t""no" 1>&6
1123fi
1124
1125else
1126echo $ac_n "checking for -lx""... $ac_c" 1>&6
087d2a6f 1127ac_lib_var=`echo x'_'opendir | tr './+\055' '__p_'`
0f2d19dd
JB
1128if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1129 echo $ac_n "(cached) $ac_c" 1>&6
1130else
1131 ac_save_LIBS="$LIBS"
1132LIBS="-lx $LIBS"
1133cat > conftest.$ac_ext <<EOF
087d2a6f 1134#line 1135 "configure"
0f2d19dd 1135#include "confdefs.h"
087d2a6f
JB
1136/* Override any gcc2 internal prototype to avoid an error. */
1137/* We use char because int might match the return type of a gcc2
1138 builtin and then its argument prototype would still apply. */
1139char opendir();
0f2d19dd
JB
1140
1141int main() { return 0; }
1142int t() {
1143opendir()
1144; return 0; }
1145EOF
087d2a6f 1146if { (eval echo configure:1147: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
0f2d19dd
JB
1147 rm -rf conftest*
1148 eval "ac_cv_lib_$ac_lib_var=yes"
1149else
1150 rm -rf conftest*
1151 eval "ac_cv_lib_$ac_lib_var=no"
1152fi
1153rm -f conftest*
1154LIBS="$ac_save_LIBS"
1155
1156fi
1157if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1158 echo "$ac_t""yes" 1>&6
1159 LIBS="$LIBS -lx"
1160else
1161 echo "$ac_t""no" 1>&6
1162fi
1163
1164fi
1165
1166echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
1167if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
1168 echo $ac_n "(cached) $ac_c" 1>&6
1169else
1170 cat > conftest.$ac_ext <<EOF
087d2a6f 1171#line 1172 "configure"
0f2d19dd
JB
1172#include "confdefs.h"
1173#include <sys/types.h>
1174#include <sys/time.h>
1175#include <time.h>
1176int main() { return 0; }
1177int t() {
1178struct tm *tp;
1179; return 0; }
1180EOF
087d2a6f 1181if { (eval echo configure:1182: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
0f2d19dd
JB
1182 rm -rf conftest*
1183 ac_cv_header_time=yes
1184else
1185 rm -rf conftest*
1186 ac_cv_header_time=no
1187fi
1188rm -f conftest*
1189
1190fi
1191
1192echo "$ac_t""$ac_cv_header_time" 1>&6
1193if test $ac_cv_header_time = yes; then
1194 cat >> confdefs.h <<\EOF
1195#define TIME_WITH_SYS_TIME 1
1196EOF
1197
1198fi
1199
1200echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
1201if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
1202 echo $ac_n "(cached) $ac_c" 1>&6
1203else
1204 cat > conftest.$ac_ext <<EOF
087d2a6f 1205#line 1206 "configure"
0f2d19dd
JB
1206#include "confdefs.h"
1207#include <sys/types.h>
1208#include <sys/wait.h>
1209#ifndef WEXITSTATUS
1210#define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
1211#endif
1212#ifndef WIFEXITED
1213#define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
1214#endif
1215int main() { return 0; }
1216int t() {
1217int s;
1218wait (&s);
1219s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
1220; return 0; }
1221EOF
087d2a6f 1222if { (eval echo configure:1223: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
0f2d19dd
JB
1223 rm -rf conftest*
1224 ac_cv_header_sys_wait_h=yes
1225else
1226 rm -rf conftest*
1227 ac_cv_header_sys_wait_h=no
1228fi
1229rm -f conftest*
1230
1231fi
1232
1233echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
1234if test $ac_cv_header_sys_wait_h = yes; then
1235 cat >> confdefs.h <<\EOF
1236#define HAVE_SYS_WAIT_H 1
1237EOF
1238
1239fi
1240
087d2a6f 1241for ac_hdr in libc.h limits.h malloc.h memory.h string.h sys/ioctl.h sys/select.h sys/time.h sys/timeb.h sys/times.h sys/types.h sys/utime.h time.h unistd.h utime.h
0f2d19dd
JB
1242do
1243ac_safe=`echo "$ac_hdr" | tr './\055' '___'`
1244echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1245if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1246 echo $ac_n "(cached) $ac_c" 1>&6
1247else
1248 cat > conftest.$ac_ext <<EOF
087d2a6f 1249#line 1250 "configure"
0f2d19dd
JB
1250#include "confdefs.h"
1251#include <$ac_hdr>
1252EOF
087d2a6f
JB
1253ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1254{ (eval echo configure:1255: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
0f2d19dd
JB
1255ac_err=`grep -v '^ *+' conftest.out`
1256if test -z "$ac_err"; then
1257 rm -rf conftest*
1258 eval "ac_cv_header_$ac_safe=yes"
1259else
1260 echo "$ac_err" >&5
1261 rm -rf conftest*
1262 eval "ac_cv_header_$ac_safe=no"
1263fi
1264rm -f conftest*
1265fi
1266if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1267 echo "$ac_t""yes" 1>&6
1268 ac_tr_hdr=HAVE_`echo $ac_hdr | tr 'abcdefghijklmnopqrstuvwxyz./\055' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ___'`
1269 cat >> confdefs.h <<EOF
1270#define $ac_tr_hdr 1
1271EOF
1272
1273else
1274 echo "$ac_t""no" 1>&6
1275fi
1276done
1277
1278
1279echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
1280if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
1281 echo $ac_n "(cached) $ac_c" 1>&6
1282else
1283 cat > conftest.$ac_ext <<EOF
087d2a6f 1284#line 1285 "configure"
0f2d19dd
JB
1285#include "confdefs.h"
1286#include <sys/types.h>
1287EOF
1288if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1289 egrep "uid_t" >/dev/null 2>&1; then
1290 rm -rf conftest*
1291 ac_cv_type_uid_t=yes
1292else
1293 rm -rf conftest*
1294 ac_cv_type_uid_t=no
1295fi
1296rm -f conftest*
1297
1298fi
1299
1300echo "$ac_t""$ac_cv_type_uid_t" 1>&6
1301if test $ac_cv_type_uid_t = no; then
1302 cat >> confdefs.h <<\EOF
1303#define uid_t int
1304EOF
1305
1306 cat >> confdefs.h <<\EOF
1307#define gid_t int
1308EOF
1309
1310fi
1311
1312echo $ac_n "checking type of array argument to getgroups""... $ac_c" 1>&6
1313if eval "test \"`echo '$''{'ac_cv_type_getgroups'+set}'`\" = set"; then
1314 echo $ac_n "(cached) $ac_c" 1>&6
1315else
1316 if test "$cross_compiling" = yes; then
1317 ac_cv_type_getgroups=cross
1318else
1319cat > conftest.$ac_ext <<EOF
087d2a6f 1320#line 1321 "configure"
0f2d19dd
JB
1321#include "confdefs.h"
1322
1323/* Thanks to Mike Rendell for this test. */
1324#include <sys/types.h>
1325#define NGID 256
1326#undef MAX
1327#define MAX(x, y) ((x) > (y) ? (x) : (y))
1328main()
1329{
1330 gid_t gidset[NGID];
1331 int i, n;
1332 union { gid_t gval; long lval; } val;
1333
1334 val.lval = -1;
1335 for (i = 0; i < NGID; i++)
1336 gidset[i] = val.gval;
1337 n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1,
1338 gidset);
1339 /* Exit non-zero if getgroups seems to require an array of ints. This
1340 happens when gid_t is short but getgroups modifies an array of ints. */
1341 exit ((n > 0 && gidset[n] != val.gval) ? 1 : 0);
1342}
1343
1344EOF
087d2a6f 1345{ (eval echo configure:1346: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
0f2d19dd
JB
1346if test -s conftest && (./conftest; exit) 2>/dev/null; then
1347 ac_cv_type_getgroups=gid_t
1348else
1349 ac_cv_type_getgroups=int
1350fi
1351fi
1352rm -fr conftest*
1353if test $ac_cv_type_getgroups = cross; then
1354 cat > conftest.$ac_ext <<EOF
087d2a6f 1355#line 1356 "configure"
0f2d19dd
JB
1356#include "confdefs.h"
1357#include <unistd.h>
1358EOF
1359if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1360 egrep "getgroups.*int.*gid_t" >/dev/null 2>&1; then
1361 rm -rf conftest*
1362 ac_cv_type_getgroups=gid_t
1363else
1364 rm -rf conftest*
1365 ac_cv_type_getgroups=int
1366fi
1367rm -f conftest*
1368
1369fi
1370fi
1371
1372echo "$ac_t""$ac_cv_type_getgroups" 1>&6
1373cat >> confdefs.h <<EOF
1374#define GETGROUPS_T $ac_cv_type_getgroups
1375EOF
1376
1377
1378echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
1379if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
1380 echo $ac_n "(cached) $ac_c" 1>&6
1381else
1382 cat > conftest.$ac_ext <<EOF
087d2a6f 1383#line 1384 "configure"
0f2d19dd
JB
1384#include "confdefs.h"
1385#include <sys/types.h>
1386#include <signal.h>
1387#ifdef signal
1388#undef signal
1389#endif
1390#ifdef __cplusplus
1391extern "C" void (*signal (int, void (*)(int)))(int);
1392#else
1393void (*signal ()) ();
1394#endif
1395
1396int main() { return 0; }
1397int t() {
1398int i;
1399; return 0; }
1400EOF
087d2a6f 1401if { (eval echo configure:1402: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
0f2d19dd
JB
1402 rm -rf conftest*
1403 ac_cv_type_signal=void
1404else
1405 rm -rf conftest*
1406 ac_cv_type_signal=int
1407fi
1408rm -f conftest*
1409
1410fi
1411
1412echo "$ac_t""$ac_cv_type_signal" 1>&6
1413cat >> confdefs.h <<EOF
1414#define RETSIGTYPE $ac_cv_type_signal
1415EOF
1416
1417
b09ca643
JB
1418echo $ac_n "checking for mode_t""... $ac_c" 1>&6
1419if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
1420 echo $ac_n "(cached) $ac_c" 1>&6
1421else
1422 cat > conftest.$ac_ext <<EOF
087d2a6f 1423#line 1424 "configure"
b09ca643
JB
1424#include "confdefs.h"
1425#include <sys/types.h>
1426#if STDC_HEADERS
1427#include <stdlib.h>
1428#endif
1429EOF
1430if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1431 egrep "mode_t" >/dev/null 2>&1; then
1432 rm -rf conftest*
1433 ac_cv_type_mode_t=yes
1434else
1435 rm -rf conftest*
1436 ac_cv_type_mode_t=no
1437fi
1438rm -f conftest*
1439
1440fi
1441echo "$ac_t""$ac_cv_type_mode_t" 1>&6
1442if test $ac_cv_type_mode_t = no; then
1443 cat >> confdefs.h <<\EOF
1444#define mode_t int
1445EOF
1446
1447fi
1448
0f2d19dd 1449
1fd838af 1450for ac_func in ctermid ftime getcwd geteuid lstat mkdir mknod nice putenv readlink rename rmdir select setegid seteuid setlocale setpgid setsid strftime strptime symlink sync tcgetpgrp tcsetpgrp times uname waitpid
0f2d19dd
JB
1451do
1452echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1453if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1454 echo $ac_n "(cached) $ac_c" 1>&6
1455else
1456 cat > conftest.$ac_ext <<EOF
087d2a6f 1457#line 1458 "configure"
0f2d19dd
JB
1458#include "confdefs.h"
1459/* System header to define __stub macros and hopefully few prototypes,
1460 which can conflict with char $ac_func(); below. */
1461#include <assert.h>
1462/* Override any gcc2 internal prototype to avoid an error. */
087d2a6f
JB
1463/* We use char because int might match the return type of a gcc2
1464 builtin and then its argument prototype would still apply. */
0f2d19dd
JB
1465char $ac_func();
1466
1467int main() { return 0; }
1468int t() {
1469
1470/* The GNU C library defines this for functions which it implements
1471 to always fail with ENOSYS. Some functions are actually named
1472 something starting with __ and the normal name is an alias. */
1473#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1474choke me
1475#else
1476$ac_func();
1477#endif
1478
1479; return 0; }
1480EOF
087d2a6f 1481if { (eval echo configure:1482: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
0f2d19dd
JB
1482 rm -rf conftest*
1483 eval "ac_cv_func_$ac_func=yes"
1484else
1485 rm -rf conftest*
1486 eval "ac_cv_func_$ac_func=no"
1487fi
1488rm -f conftest*
1489
1490fi
1491if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1492 echo "$ac_t""yes" 1>&6
1493 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1494 cat >> confdefs.h <<EOF
1495#define $ac_tr_func 1
1496EOF
1497
1498else
1499 echo "$ac_t""no" 1>&6
1500fi
1501done
1502
1503
14a7e04c 1504for ac_func in inet_aton strerror
0f2d19dd
JB
1505do
1506echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1507if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1508 echo $ac_n "(cached) $ac_c" 1>&6
1509else
1510 cat > conftest.$ac_ext <<EOF
087d2a6f 1511#line 1512 "configure"
0f2d19dd
JB
1512#include "confdefs.h"
1513/* System header to define __stub macros and hopefully few prototypes,
1514 which can conflict with char $ac_func(); below. */
1515#include <assert.h>
1516/* Override any gcc2 internal prototype to avoid an error. */
087d2a6f
JB
1517/* We use char because int might match the return type of a gcc2
1518 builtin and then its argument prototype would still apply. */
0f2d19dd
JB
1519char $ac_func();
1520
1521int main() { return 0; }
1522int t() {
1523
1524/* The GNU C library defines this for functions which it implements
1525 to always fail with ENOSYS. Some functions are actually named
1526 something starting with __ and the normal name is an alias. */
1527#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1528choke me
1529#else
1530$ac_func();
1531#endif
1532
1533; return 0; }
1534EOF
087d2a6f 1535if { (eval echo configure:1536: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
0f2d19dd
JB
1536 rm -rf conftest*
1537 eval "ac_cv_func_$ac_func=yes"
1538else
1539 rm -rf conftest*
1540 eval "ac_cv_func_$ac_func=no"
1541fi
1542rm -f conftest*
1543
1544fi
1545if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1546 echo "$ac_t""yes" 1>&6
1547 :
1548else
1549 echo "$ac_t""no" 1>&6
1550LIBOBJS="$LIBOBJS ${ac_func}.o"
1551fi
1552
1553done
1554
1555
1556echo $ac_n "checking for st_rdev in struct stat""... $ac_c" 1>&6
1557if eval "test \"`echo '$''{'ac_cv_struct_st_rdev'+set}'`\" = set"; then
1558 echo $ac_n "(cached) $ac_c" 1>&6
1559else
1560 cat > conftest.$ac_ext <<EOF
087d2a6f 1561#line 1562 "configure"
0f2d19dd
JB
1562#include "confdefs.h"
1563#include <sys/types.h>
1564#include <sys/stat.h>
1565int main() { return 0; }
1566int t() {
1567struct stat s; s.st_rdev;
1568; return 0; }
1569EOF
087d2a6f 1570if { (eval echo configure:1571: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
0f2d19dd
JB
1571 rm -rf conftest*
1572 ac_cv_struct_st_rdev=yes
1573else
1574 rm -rf conftest*
1575 ac_cv_struct_st_rdev=no
1576fi
1577rm -f conftest*
1578
1579fi
1580
1581echo "$ac_t""$ac_cv_struct_st_rdev" 1>&6
1582if test $ac_cv_struct_st_rdev = yes; then
1583 cat >> confdefs.h <<\EOF
1584#define HAVE_ST_RDEV 1
1585EOF
1586
1587fi
1588
1589echo $ac_n "checking for st_blksize in struct stat""... $ac_c" 1>&6
1590if eval "test \"`echo '$''{'ac_cv_struct_st_blksize'+set}'`\" = set"; then
1591 echo $ac_n "(cached) $ac_c" 1>&6
1592else
1593 cat > conftest.$ac_ext <<EOF
087d2a6f 1594#line 1595 "configure"
0f2d19dd
JB
1595#include "confdefs.h"
1596#include <sys/types.h>
1597#include <sys/stat.h>
1598int main() { return 0; }
1599int t() {
1600struct stat s; s.st_blksize;
1601; return 0; }
1602EOF
087d2a6f 1603if { (eval echo configure:1604: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
0f2d19dd
JB
1604 rm -rf conftest*
1605 ac_cv_struct_st_blksize=yes
1606else
1607 rm -rf conftest*
1608 ac_cv_struct_st_blksize=no
1609fi
1610rm -f conftest*
1611
1612fi
1613
1614echo "$ac_t""$ac_cv_struct_st_blksize" 1>&6
1615if test $ac_cv_struct_st_blksize = yes; then
1616 cat >> confdefs.h <<\EOF
1617#define HAVE_ST_BLKSIZE 1
1618EOF
1619
1620fi
1621
1622echo $ac_n "checking for st_blocks in struct stat""... $ac_c" 1>&6
1623if eval "test \"`echo '$''{'ac_cv_struct_st_blocks'+set}'`\" = set"; then
1624 echo $ac_n "(cached) $ac_c" 1>&6
1625else
1626 cat > conftest.$ac_ext <<EOF
087d2a6f 1627#line 1628 "configure"
0f2d19dd
JB
1628#include "confdefs.h"
1629#include <sys/types.h>
1630#include <sys/stat.h>
1631int main() { return 0; }
1632int t() {
1633struct stat s; s.st_blocks;
1634; return 0; }
1635EOF
087d2a6f 1636if { (eval echo configure:1637: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
0f2d19dd
JB
1637 rm -rf conftest*
1638 ac_cv_struct_st_blocks=yes
1639else
1640 rm -rf conftest*
1641 ac_cv_struct_st_blocks=no
1642fi
1643rm -f conftest*
1644
1645fi
1646
1647echo "$ac_t""$ac_cv_struct_st_blocks" 1>&6
1648if test $ac_cv_struct_st_blocks = yes; then
1649 cat >> confdefs.h <<\EOF
1650#define HAVE_ST_BLOCKS 1
1651EOF
1652
1653else
1654 LIBOBJS="$LIBOBJS fileblocks.o"
1655fi
1656
1657
087d2a6f
JB
1658 echo $ac_n "checking whether we need POSIX to get struct utimbuf""... $ac_c" 1>&6
1659 if eval "test \"`echo '$''{'guile_cv_struct_utimbuf_needs_posix'+set}'`\" = set"; then
1660 echo $ac_n "(cached) $ac_c" 1>&6
1661else
1662 cat > conftest.$ac_ext <<EOF
1663#line 1664 "configure"
1664#include "confdefs.h"
1665
1666#ifdef __EMX__
1667#include <sys/utime.h>
1668#else
1669#include <utime.h>
1670#endif
1671struct utime blah;
1672
1673EOF
1674ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1675{ (eval echo configure:1676: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1676ac_err=`grep -v '^ *+' conftest.out`
1677if test -z "$ac_err"; then
1678 rm -rf conftest*
1679 guile_cv_struct_utimbuf_needs_posix=no
1680else
1681 echo "$ac_err" >&5
1682 rm -rf conftest*
1683 guile_cv_struct_utimbuf_needs_posix=yes
1684 cat >> confdefs.h <<\EOF
1685#define UTIMBUF_NEEDS_POSIX 1
1686EOF
1687
1688fi
1689rm -f conftest*
1690fi
1691
1692 echo "$ac_t""$guile_cv_struct_utimbuf_needs_posix" 1>&6
1693
0f2d19dd
JB
1694#--------------------------------------------------------------------
1695#
1696# Which way does the stack grow?
1697#
1698#--------------------------------------------------------------------
1699
1700if test "$cross_compiling" = yes; then
1701 echo "configure: warning: Guessing that stack grows down -- see scmconfig.h.in" 1>&2
1702else
1703cat > conftest.$ac_ext <<EOF
087d2a6f 1704#line 1705 "configure"
0f2d19dd
JB
1705#include "confdefs.h"
1706aux (l) unsigned long l;
1707 { int x; exit (l >= ((unsigned long)&x)); }
1708 main () { int q; aux((unsigned long)&q); }
1709EOF
087d2a6f 1710{ (eval echo configure:1711: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
0f2d19dd
JB
1711if test -s conftest && (./conftest; exit) 2>/dev/null; then
1712 cat >> confdefs.h <<\EOF
1713#define SCM_STACK_GROWS_UP 1
1714EOF
1715
1716fi
1717fi
1718rm -fr conftest*
1719
1720
1721if test "$cross_compiling" = yes; then
1722 cat >> confdefs.h <<\EOF
1723#define SCM_SINGLES 1
1724EOF
1725
1726 echo "configure: warning: Guessing that sizeof(long) == sizeof(float) -- see scmconfig.h.in" 1>&2
1727else
1728cat > conftest.$ac_ext <<EOF
087d2a6f 1729#line 1730 "configure"
0f2d19dd
JB
1730#include "confdefs.h"
1731main () { exit (sizeof(float) != sizeof(long)); }
1732EOF
087d2a6f 1733{ (eval echo configure:1734: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
0f2d19dd
JB
1734if test -s conftest && (./conftest; exit) 2>/dev/null; then
1735 cat >> confdefs.h <<\EOF
1736#define SCM_SINGLES 1
1737EOF
1738
1739fi
1740fi
1741rm -fr conftest*
1742
2e18892a
GH
1743echo $ac_n "checking for struct linger""... $ac_c" 1>&6
1744if eval "test \"`echo '$''{'scm_cv_struct_linger'+set}'`\" = set"; then
1745 echo $ac_n "(cached) $ac_c" 1>&6
1746else
1747 cat > conftest.$ac_ext <<EOF
087d2a6f 1748#line 1749 "configure"
2e18892a
GH
1749#include "confdefs.h"
1750#include <sys/socket.h>
1751int main() { return 0; }
1752int t() {
1753struct linger lgr; lgr.l_linger = 100
1754; return 0; }
1755EOF
087d2a6f 1756if { (eval echo configure:1757: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2e18892a
GH
1757 rm -rf conftest*
1758 scm_cv_struct_linger="yes"
1759else
1760 rm -rf conftest*
1761 scm_cv_struct_linger="no"
1762fi
1763rm -f conftest*
0f2d19dd 1764
2e18892a 1765fi
0f2d19dd 1766
2e18892a
GH
1767echo "$ac_t""$scm_cv_struct_linger" 1>&6
1768if test $scm_cv_struct_linger = yes; then
1769 cat >> confdefs.h <<\EOF
1770#define HAVE_STRUCT_LINGER 1
1771EOF
0f2d19dd 1772
2e18892a
GH
1773fi
1774
0f2d19dd
JB
1775#--------------------------------------------------------------------
1776#
1777# How can you violate a stdio abstraction by setting a stream's fd?
1778#
1779#--------------------------------------------------------------------
1780
1781FD_SETTER=""
1782
1783if test "x$FD_SETTER" = x; then
1784 cat > conftest.$ac_ext <<EOF
087d2a6f 1785#line 1786 "configure"
0f2d19dd
JB
1786#include "confdefs.h"
1787#include <stdio.h>
1788
1789int main() { return 0; }
1790int t() {
1791stdout->_file = 1
1792; return 0; }
1793EOF
087d2a6f 1794if { (eval echo configure:1795: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
0f2d19dd
JB
1795 rm -rf conftest*
1796 FD_SETTER="((F)->_file = (D))"
1797fi
1798rm -f conftest*
1799
1800fi
1801
1802if test "x$FD_SETTER" = x; then
1803 cat > conftest.$ac_ext <<EOF
087d2a6f 1804#line 1805 "configure"
0f2d19dd
JB
1805#include "confdefs.h"
1806#include <stdio.h>
1807
1808int main() { return 0; }
1809int t() {
1810stdout->_fileno
1811; return 0; }
1812EOF
087d2a6f 1813if { (eval echo configure:1814: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
0f2d19dd
JB
1814 rm -rf conftest*
1815 FD_SETTER="((F)->_fileno = (D))"
1816fi
1817rm -f conftest*
1818
1819fi
1820
1821
1822test "x$FD_SETTER" != x && cat >> confdefs.h <<\EOF
1823#define HAVE_FD_SETTER 1
1824EOF
1825
1826
1827
9d7e1edf
JB
1828cat >> confdefs.h <<EOF
1829#define GUILE_MAJOR_VERSION "$GUILE_MAJOR_VERSION"
1830EOF
1831
1832cat >> confdefs.h <<EOF
1833#define GUILE_MINOR_VERSION "$GUILE_MINOR_VERSION"
1834EOF
1835
1836cat >> confdefs.h <<EOF
1837#define GUILE_VERSION "$GUILE_VERSION"
1838EOF
1839
0f2d19dd
JB
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851trap '' 1 2 15
1852cat > confcache <<\EOF
1853# This file is a shell script that caches the results of configure
1854# tests run on this system so they can be shared between configure
1855# scripts and configure runs. It is not useful on other systems.
1856# If it contains results you don't want to keep, you may remove or edit it.
1857#
1858# By default, configure uses ./config.cache as the cache file,
1859# creating it if it does not exist already. You can give configure
1860# the --cache-file=FILE option to use a different cache file; that is
1861# what configure does when it calls configure scripts in
1862# subdirectories, so they share the cache.
1863# Giving --cache-file=/dev/null disables caching, for debugging configure.
1864# config.status only pays attention to the cache file if you give it the
1865# --recheck option to rerun configure.
1866#
1867EOF
1868# Ultrix sh set writes to stderr and can't be redirected directly,
1869# and sets the high bit in the cache file unless we assign to the vars.
1870(set) 2>&1 |
1871 sed -n "s/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=\${\1='\2'}/p" \
1872 >> confcache
1873if cmp -s $cache_file confcache; then
1874 :
1875else
1876 if test -w $cache_file; then
1877 echo "updating cache $cache_file"
1878 cat confcache > $cache_file
1879 else
1880 echo "not updating unwritable cache $cache_file"
1881 fi
1882fi
1883rm -f confcache
1884
1885trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
1886
1887test "x$prefix" = xNONE && prefix=$ac_default_prefix
1888# Let make expand exec_prefix.
1889test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
1890
1891# Any assignment to VPATH causes Sun make to only execute
1892# the first set of double-colon rules, so remove it if not needed.
1893# If there is a colon in the path, we need to keep it.
1894if test "x$srcdir" = x.; then
1895 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
1896fi
1897
1898trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
1899
1900DEFS=-DHAVE_CONFIG_H
1901
1902# Without the "./", some shells look in PATH for config.status.
1903: ${CONFIG_STATUS=./config.status}
1904
1905echo creating $CONFIG_STATUS
1906rm -f $CONFIG_STATUS
1907cat > $CONFIG_STATUS <<EOF
1908#! /bin/sh
1909# Generated automatically by configure.
1910# Run this file to recreate the current configuration.
1911# This directory was configured as follows,
1912# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
1913#
1914# $0 $ac_configure_args
1915#
1916# Compiler output produced by configure, useful for debugging
1917# configure, is in ./config.log if it exists.
1918
1919ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
1920for ac_option
1921do
1922 case "\$ac_option" in
1923 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
1924 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
1925 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
1926 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
087d2a6f 1927 echo "$CONFIG_STATUS generated by autoconf version 2.10"
0f2d19dd
JB
1928 exit 0 ;;
1929 -help | --help | --hel | --he | --h)
1930 echo "\$ac_cs_usage"; exit 0 ;;
1931 *) echo "\$ac_cs_usage"; exit 1 ;;
1932 esac
1933done
1934
1935ac_given_srcdir=$srcdir
1936
1937trap 'rm -fr `echo "Makefile fd.h scmconfig.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
1938EOF
1939cat >> $CONFIG_STATUS <<EOF
1940
1941# Protect against being on the right side of a sed subst in config.status.
1942sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
1943 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
1944$ac_vpsub
1945$extrasub
1946s%@CFLAGS@%$CFLAGS%g
1947s%@CPPFLAGS@%$CPPFLAGS%g
1948s%@CXXFLAGS@%$CXXFLAGS%g
1949s%@DEFS@%$DEFS%g
1950s%@LDFLAGS@%$LDFLAGS%g
1951s%@LIBS@%$LIBS%g
1952s%@exec_prefix@%$exec_prefix%g
1953s%@prefix@%$prefix%g
1954s%@program_transform_name@%$program_transform_name%g
1955s%@bindir@%$bindir%g
1956s%@sbindir@%$sbindir%g
1957s%@libexecdir@%$libexecdir%g
1958s%@datadir@%$datadir%g
1959s%@sysconfdir@%$sysconfdir%g
1960s%@sharedstatedir@%$sharedstatedir%g
1961s%@localstatedir@%$localstatedir%g
1962s%@libdir@%$libdir%g
1963s%@includedir@%$includedir%g
1964s%@oldincludedir@%$oldincludedir%g
1965s%@infodir@%$infodir%g
1966s%@mandir@%$mandir%g
1967s%@CC@%$CC%g
1968s%@CPP@%$CPP%g
1969s%@RANLIB@%$RANLIB%g
1970s%@LIBOBJS@%$LIBOBJS%g
1971s%@FD_SETTER@%$FD_SETTER%g
1972s%@TCL_SRC_DIR@%$TCL_SRC_DIR%g
1973s%@TK_SRC_DIR@%$TK_SRC_DIR%g
1974s%@XINCLUDES@%$XINCLUDES%g
1975s%@GUILE_MAJOR_VERSION@%$GUILE_MAJOR_VERSION%g
1976s%@GUILE_MINOR_VERSION@%$GUILE_MINOR_VERSION%g
1977s%@GUILE_VERSION@%$GUILE_VERSION%g
1978
1979CEOF
1980EOF
1981cat >> $CONFIG_STATUS <<EOF
1982
1983CONFIG_FILES=\${CONFIG_FILES-"Makefile fd.h"}
1984EOF
1985cat >> $CONFIG_STATUS <<\EOF
1986for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
1987 # Support "outfile[:infile]", defaulting infile="outfile.in".
1988 case "$ac_file" in
1989 *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'`
1990 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
1991 *) ac_file_in="${ac_file}.in" ;;
1992 esac
1993
1994 # Adjust relative srcdir, etc. for subdirectories.
1995
1996 # Remove last slash and all that follows it. Not all systems have dirname.
1997 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
1998 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
1999 # The file is in a subdirectory.
2000 test ! -d "$ac_dir" && mkdir "$ac_dir"
2001 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
2002 # A "../" for each directory in $ac_dir_suffix.
2003 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
2004 else
2005 ac_dir_suffix= ac_dots=
2006 fi
2007
2008 case "$ac_given_srcdir" in
2009 .) srcdir=.
2010 if test -z "$ac_dots"; then top_srcdir=.
2011 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
2012 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
2013 *) # Relative path.
2014 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
2015 top_srcdir="$ac_dots$ac_given_srcdir" ;;
2016 esac
2017
2018 echo creating "$ac_file"
2019 rm -f "$ac_file"
2020 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
2021 case "$ac_file" in
2022 *Makefile*) ac_comsub="1i\\
2023# $configure_input" ;;
2024 *) ac_comsub= ;;
2025 esac
2026 sed -e "$ac_comsub
2027s%@configure_input@%$configure_input%g
2028s%@srcdir@%$srcdir%g
2029s%@top_srcdir@%$top_srcdir%g
2030" -f conftest.subs $ac_given_srcdir/$ac_file_in > $ac_file
2031fi; done
2032rm -f conftest.subs
2033
2034# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
2035# NAME is the cpp macro being defined and VALUE is the value it is being given.
2036#
2037# ac_d sets the value in "#define NAME VALUE" lines.
2038ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
2039ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
2040ac_dC='\3'
2041ac_dD='%g'
2042# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
2043ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
2044ac_uB='\([ ]\)%\1#\2define\3'
2045ac_uC=' '
2046ac_uD='\4%g'
2047# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
2048ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
2049ac_eB='$%\1#\2define\3'
2050ac_eC=' '
2051ac_eD='%g'
2052
2053CONFIG_HEADERS=${CONFIG_HEADERS-"scmconfig.h"}
2054for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
2055 # Support "outfile[:infile]", defaulting infile="outfile.in".
2056 case "$ac_file" in
2057 *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'`
2058 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
2059 *) ac_file_in="${ac_file}.in" ;;
2060 esac
2061
2062 echo creating $ac_file
2063
2064 rm -f conftest.frag conftest.in conftest.out
2065 cp $ac_given_srcdir/$ac_file_in conftest.in
2066
2067EOF
2068
2069# Transform confdefs.h into a sed script conftest.vals that substitutes
2070# the proper values into config.h.in to produce config.h. And first:
2071# Protect against being on the right side of a sed subst in config.status.
2072# Protect against being in an unquoted here document in config.status.
2073rm -f conftest.vals
2074cat > conftest.hdr <<\EOF
2075s/[\\&%]/\\&/g
2076s%[\\$`]%\\&%g
087d2a6f 2077s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
0f2d19dd
JB
2078s%ac_d%ac_u%gp
2079s%ac_u%ac_e%gp
2080EOF
2081sed -n -f conftest.hdr confdefs.h > conftest.vals
2082rm -f conftest.hdr
2083
2084# This sed command replaces #undef with comments. This is necessary, for
2085# example, in the case of _POSIX_SOURCE, which is predefined and required
2086# on some systems where configure will not decide to define it.
2087cat >> conftest.vals <<\EOF
2088s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
2089EOF
2090
2091# Break up conftest.vals because some shells have a limit on
2092# the size of here documents, and old seds have small limits too.
2093# Maximum number of lines to put in a single here document.
2094ac_max_here_lines=12
2095
2096rm -f conftest.tail
2097while :
2098do
2099 ac_lines=`grep -c . conftest.vals`
2100 # grep -c gives empty output for an empty file on some AIX systems.
2101 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
2102 # Write a limited-size here document to conftest.frag.
2103 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
2104 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
2105 echo 'CEOF
2106 sed -f conftest.frag conftest.in > conftest.out
2107 rm -f conftest.in
2108 mv conftest.out conftest.in
2109' >> $CONFIG_STATUS
2110 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
2111 rm -f conftest.vals
2112 mv conftest.tail conftest.vals
2113done
2114rm -f conftest.vals
2115
2116cat >> $CONFIG_STATUS <<\EOF
2117 rm -f conftest.frag conftest.h
2118 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
2119 cat conftest.in >> conftest.h
2120 rm -f conftest.in
2121 if cmp -s $ac_file conftest.h 2>/dev/null; then
2122 echo "$ac_file is unchanged"
2123 rm -f conftest.h
2124 else
087d2a6f
JB
2125 # Remove last slash and all that follows it. Not all systems have dirname.
2126 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
2127 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
2128 # The file is in a subdirectory.
2129 test ! -d "$ac_dir" && mkdir "$ac_dir"
2130 fi
0f2d19dd
JB
2131 rm -f $ac_file
2132 mv conftest.h $ac_file
2133 fi
2134fi; done
2135
2136
2137
2138exit 0
2139EOF
2140chmod +x $CONFIG_STATUS
2141rm -fr confdefs* $ac_clean_files
2142test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
2143
2144