* aclocal.m4: Fixes for building with coop threads in a
[bpt/guile.git] / configure
CommitLineData
0f2d19dd
JB
1#! /bin/sh
2
3# Guess values for system-dependent variables and create Makefiles.
733943b9 4# Generated automatically using autoconf version 2.12
087d2a6f 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:
15ae1bee
MD
14ac_help="$ac_help
15 --enable-maintainer-mode enable make rules and dependencies not useful
16 (and sometimes confusing) to the casual installer"
3a629497
JB
17ac_help="$ac_help
18 --disable-debug Don't include debugging support"
19ac_help="$ac_help
20 --enable-dynamic-linking Include support for dynamic linking"
21ac_help="$ac_help
22 --enable-guile-debug Include internal debugging functions"
23ac_help="$ac_help
24 --enable-shared build shared libraries [default=yes]"
25ac_help="$ac_help
26 --with-threads thread interface"
0f2d19dd
JB
27
28# Initialize some variables set by options.
29# The variables have the same names as the options, with
30# dashes changed to underlines.
31build=NONE
32cache_file=./config.cache
33exec_prefix=NONE
34host=NONE
35no_create=
36nonopt=NONE
37no_recursion=
38prefix=NONE
39program_prefix=NONE
40program_suffix=NONE
41program_transform_name=s,x,x,
42silent=
43site=
44srcdir=
45target=NONE
46verbose=
47x_includes=NONE
48x_libraries=NONE
49bindir='${exec_prefix}/bin'
50sbindir='${exec_prefix}/sbin'
51libexecdir='${exec_prefix}/libexec'
52datadir='${prefix}/share'
53sysconfdir='${prefix}/etc'
54sharedstatedir='${prefix}/com'
55localstatedir='${prefix}/var'
56libdir='${exec_prefix}/lib'
57includedir='${prefix}/include'
58oldincludedir='/usr/include'
59infodir='${prefix}/info'
60mandir='${prefix}/man'
61
62# Initialize some other variables.
63subdirs=
64MFLAGS= MAKEFLAGS=
733943b9
TT
65# Maximum number of lines to put in a shell here document.
66ac_max_here_lines=12
0f2d19dd
JB
67
68ac_prev=
69for ac_option
70do
71
72 # If the previous option needs an argument, assign it.
73 if test -n "$ac_prev"; then
74 eval "$ac_prev=\$ac_option"
75 ac_prev=
76 continue
77 fi
78
79 case "$ac_option" in
80 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
81 *) ac_optarg= ;;
82 esac
83
84 # Accept the important Cygnus configure options, so we can diagnose typos.
85
86 case "$ac_option" in
87
88 -bindir | --bindir | --bindi | --bind | --bin | --bi)
89 ac_prev=bindir ;;
90 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
91 bindir="$ac_optarg" ;;
92
93 -build | --build | --buil | --bui | --bu)
94 ac_prev=build ;;
95 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
96 build="$ac_optarg" ;;
97
98 -cache-file | --cache-file | --cache-fil | --cache-fi \
99 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
100 ac_prev=cache_file ;;
101 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
102 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
103 cache_file="$ac_optarg" ;;
104
105 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
106 ac_prev=datadir ;;
107 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
108 | --da=*)
109 datadir="$ac_optarg" ;;
110
111 -disable-* | --disable-*)
112 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
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 eval "enable_${ac_feature}=no" ;;
119
120 -enable-* | --enable-*)
121 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
122 # Reject names that are not valid shell variable names.
123 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
124 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
125 fi
126 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
127 case "$ac_option" in
128 *=*) ;;
129 *) ac_optarg=yes ;;
130 esac
131 eval "enable_${ac_feature}='$ac_optarg'" ;;
132
133 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
134 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
135 | --exec | --exe | --ex)
136 ac_prev=exec_prefix ;;
137 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
138 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
139 | --exec=* | --exe=* | --ex=*)
140 exec_prefix="$ac_optarg" ;;
141
142 -gas | --gas | --ga | --g)
143 # Obsolete; use --with-gas.
144 with_gas=yes ;;
145
146 -help | --help | --hel | --he)
147 # Omit some internal or obsolete options to make the list less imposing.
148 # This message is too long to be a string in the A/UX 3.1 sh.
149 cat << EOF
150Usage: configure [options] [host]
151Options: [defaults in brackets after descriptions]
152Configuration:
153 --cache-file=FILE cache test results in FILE
154 --help print this message
155 --no-create do not create output files
156 --quiet, --silent do not print \`checking...' messages
157 --version print the version of autoconf that created configure
158Directory and file names:
159 --prefix=PREFIX install architecture-independent files in PREFIX
160 [$ac_default_prefix]
161 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
162 [same as prefix]
163 --bindir=DIR user executables in DIR [EPREFIX/bin]
164 --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
165 --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
166 --datadir=DIR read-only architecture-independent data in DIR
167 [PREFIX/share]
168 --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
169 --sharedstatedir=DIR modifiable architecture-independent data in DIR
170 [PREFIX/com]
171 --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
172 --libdir=DIR object code libraries in DIR [EPREFIX/lib]
173 --includedir=DIR C header files in DIR [PREFIX/include]
174 --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
175 --infodir=DIR info documentation in DIR [PREFIX/info]
176 --mandir=DIR man documentation in DIR [PREFIX/man]
177 --srcdir=DIR find the sources in DIR [configure dir or ..]
178 --program-prefix=PREFIX prepend PREFIX to installed program names
179 --program-suffix=SUFFIX append SUFFIX to installed program names
180 --program-transform-name=PROGRAM
181 run sed PROGRAM on installed program names
182EOF
183 cat << EOF
184Host type:
185 --build=BUILD configure for building on BUILD [BUILD=HOST]
186 --host=HOST configure for HOST [guessed]
187 --target=TARGET configure for TARGET [TARGET=HOST]
188Features and packages:
189 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
190 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
191 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
192 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
193 --x-includes=DIR X include files are in DIR
194 --x-libraries=DIR X library files are in DIR
195EOF
196 if test -n "$ac_help"; then
197 echo "--enable and --with options recognized:$ac_help"
198 fi
199 exit 0 ;;
200
201 -host | --host | --hos | --ho)
202 ac_prev=host ;;
203 -host=* | --host=* | --hos=* | --ho=*)
204 host="$ac_optarg" ;;
205
206 -includedir | --includedir | --includedi | --included | --include \
207 | --includ | --inclu | --incl | --inc)
208 ac_prev=includedir ;;
209 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
210 | --includ=* | --inclu=* | --incl=* | --inc=*)
211 includedir="$ac_optarg" ;;
212
213 -infodir | --infodir | --infodi | --infod | --info | --inf)
214 ac_prev=infodir ;;
215 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
216 infodir="$ac_optarg" ;;
217
218 -libdir | --libdir | --libdi | --libd)
219 ac_prev=libdir ;;
220 -libdir=* | --libdir=* | --libdi=* | --libd=*)
221 libdir="$ac_optarg" ;;
222
223 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
224 | --libexe | --libex | --libe)
225 ac_prev=libexecdir ;;
226 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
227 | --libexe=* | --libex=* | --libe=*)
228 libexecdir="$ac_optarg" ;;
229
230 -localstatedir | --localstatedir | --localstatedi | --localstated \
231 | --localstate | --localstat | --localsta | --localst \
232 | --locals | --local | --loca | --loc | --lo)
233 ac_prev=localstatedir ;;
234 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
235 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
236 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
237 localstatedir="$ac_optarg" ;;
238
239 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
240 ac_prev=mandir ;;
241 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
242 mandir="$ac_optarg" ;;
243
244 -nfp | --nfp | --nf)
245 # Obsolete; use --without-fp.
246 with_fp=no ;;
247
248 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
249 | --no-cr | --no-c)
250 no_create=yes ;;
251
252 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
253 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
254 no_recursion=yes ;;
255
256 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
257 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
258 | --oldin | --oldi | --old | --ol | --o)
259 ac_prev=oldincludedir ;;
260 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
261 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
262 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
263 oldincludedir="$ac_optarg" ;;
264
265 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
266 ac_prev=prefix ;;
267 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
268 prefix="$ac_optarg" ;;
269
270 -program-prefix | --program-prefix | --program-prefi | --program-pref \
271 | --program-pre | --program-pr | --program-p)
272 ac_prev=program_prefix ;;
273 -program-prefix=* | --program-prefix=* | --program-prefi=* \
274 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
275 program_prefix="$ac_optarg" ;;
276
277 -program-suffix | --program-suffix | --program-suffi | --program-suff \
278 | --program-suf | --program-su | --program-s)
279 ac_prev=program_suffix ;;
280 -program-suffix=* | --program-suffix=* | --program-suffi=* \
281 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
282 program_suffix="$ac_optarg" ;;
283
284 -program-transform-name | --program-transform-name \
285 | --program-transform-nam | --program-transform-na \
286 | --program-transform-n | --program-transform- \
287 | --program-transform | --program-transfor \
288 | --program-transfo | --program-transf \
289 | --program-trans | --program-tran \
290 | --progr-tra | --program-tr | --program-t)
291 ac_prev=program_transform_name ;;
292 -program-transform-name=* | --program-transform-name=* \
293 | --program-transform-nam=* | --program-transform-na=* \
294 | --program-transform-n=* | --program-transform-=* \
295 | --program-transform=* | --program-transfor=* \
296 | --program-transfo=* | --program-transf=* \
297 | --program-trans=* | --program-tran=* \
298 | --progr-tra=* | --program-tr=* | --program-t=*)
299 program_transform_name="$ac_optarg" ;;
300
301 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
302 | -silent | --silent | --silen | --sile | --sil)
303 silent=yes ;;
304
305 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
306 ac_prev=sbindir ;;
307 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
308 | --sbi=* | --sb=*)
309 sbindir="$ac_optarg" ;;
310
311 -sharedstatedir | --sharedstatedir | --sharedstatedi \
312 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
313 | --sharedst | --shareds | --shared | --share | --shar \
314 | --sha | --sh)
315 ac_prev=sharedstatedir ;;
316 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
317 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
318 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
319 | --sha=* | --sh=*)
320 sharedstatedir="$ac_optarg" ;;
321
322 -site | --site | --sit)
323 ac_prev=site ;;
324 -site=* | --site=* | --sit=*)
325 site="$ac_optarg" ;;
326
327 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
328 ac_prev=srcdir ;;
329 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
330 srcdir="$ac_optarg" ;;
331
332 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
333 | --syscon | --sysco | --sysc | --sys | --sy)
334 ac_prev=sysconfdir ;;
335 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
336 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
337 sysconfdir="$ac_optarg" ;;
338
339 -target | --target | --targe | --targ | --tar | --ta | --t)
340 ac_prev=target ;;
341 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
342 target="$ac_optarg" ;;
343
344 -v | -verbose | --verbose | --verbos | --verbo | --verb)
345 verbose=yes ;;
346
347 -version | --version | --versio | --versi | --vers)
733943b9 348 echo "configure generated by autoconf version 2.12"
0f2d19dd
JB
349 exit 0 ;;
350
351 -with-* | --with-*)
352 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
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 case "$ac_option" in
359 *=*) ;;
360 *) ac_optarg=yes ;;
361 esac
362 eval "with_${ac_package}='$ac_optarg'" ;;
363
364 -without-* | --without-*)
365 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
366 # Reject names that are not valid shell variable names.
367 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
368 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
369 fi
370 ac_package=`echo $ac_package| sed 's/-/_/g'`
371 eval "with_${ac_package}=no" ;;
372
373 --x)
374 # Obsolete; use --with-x.
375 with_x=yes ;;
376
377 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
378 | --x-incl | --x-inc | --x-in | --x-i)
379 ac_prev=x_includes ;;
380 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
381 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
382 x_includes="$ac_optarg" ;;
383
384 -x-libraries | --x-libraries | --x-librarie | --x-librari \
385 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
386 ac_prev=x_libraries ;;
387 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
388 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
389 x_libraries="$ac_optarg" ;;
390
391 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
392 ;;
393
394 *)
395 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
396 echo "configure: warning: $ac_option: invalid host type" 1>&2
397 fi
398 if test "x$nonopt" != xNONE; then
399 { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
400 fi
401 nonopt="$ac_option"
402 ;;
403
404 esac
405done
406
407if test -n "$ac_prev"; then
408 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
409fi
410
411trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
412
413# File descriptor usage:
414# 0 standard input
415# 1 file creation
416# 2 errors and warnings
417# 3 some systems may open it to /dev/tty
418# 4 used on the Kubota Titan
419# 6 checking for... messages and results
420# 5 compiler messages saved in config.log
421if test "$silent" = yes; then
422 exec 6>/dev/null
423else
424 exec 6>&1
425fi
426exec 5>./config.log
427
428echo "\
429This file contains any messages produced by compilers while
430running configure, to aid debugging if configure makes a mistake.
431" 1>&5
432
433# Strip out --no-create and --no-recursion so they do not pile up.
434# Also quote any args containing shell metacharacters.
435ac_configure_args=
436for ac_arg
437do
438 case "$ac_arg" in
439 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
440 | --no-cr | --no-c) ;;
441 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
442 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
443 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
444 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
445 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
446 esac
447done
448
449# NLS nuisances.
733943b9
TT
450# Only set these to C if already set. These must not be set unconditionally
451# because not all systems understand e.g. LANG=C (notably SCO).
452# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
453# Non-C LC_CTYPE values break the ctype check.
0f2d19dd 454if test "${LANG+set}" = set; then LANG=C; export LANG; fi
733943b9
TT
455if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
456if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
457if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
0f2d19dd
JB
458
459# confdefs.h avoids OS command line length limits that DEFS can exceed.
460rm -rf conftest* confdefs.h
461# AIX cpp loses on an empty file, so make sure it contains at least a newline.
462echo > confdefs.h
463
464# A filename unique to this package, relative to the directory that
465# configure is in, which we can look for to find out if srcdir is correct.
466ac_unique_file=Makefile.in
467
468# Find the source files, if location was not specified.
469if test -z "$srcdir"; then
470 ac_srcdir_defaulted=yes
471 # Try the directory containing this script, then its parent.
472 ac_prog=$0
473 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
474 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
475 srcdir=$ac_confdir
476 if test ! -r $srcdir/$ac_unique_file; then
477 srcdir=..
478 fi
479else
480 ac_srcdir_defaulted=no
481fi
482if test ! -r $srcdir/$ac_unique_file; then
483 if test "$ac_srcdir_defaulted" = yes; then
484 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
485 else
486 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
487 fi
488fi
489srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
490
491# Prefer explicitly selected file to automatically selected ones.
492if test -z "$CONFIG_SITE"; then
493 if test "x$prefix" != xNONE; then
494 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
495 else
496 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
497 fi
498fi
499for ac_site_file in $CONFIG_SITE; do
500 if test -r "$ac_site_file"; then
501 echo "loading site script $ac_site_file"
502 . "$ac_site_file"
503 fi
504done
505
506if test -r "$cache_file"; then
507 echo "loading cache $cache_file"
508 . $cache_file
509else
510 echo "creating cache $cache_file"
511 > $cache_file
512fi
513
514ac_ext=c
515# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
087d2a6f
JB
516ac_cpp='$CPP $CPPFLAGS'
517ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
518ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
733943b9 519cross_compiling=$ac_cv_prog_cc_cross
0f2d19dd
JB
520
521if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
522 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
523 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
524 ac_n= ac_c='
525' ac_t=' '
526 else
527 ac_n=-n ac_c= ac_t=
528 fi
529else
530 ac_n= ac_c='\c' ac_t=
531fi
532
533
2d26def0 534. $srcdir/GUILE-VERSION
e63710da
JB
535ac_aux_dir=
536for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
537 if test -f $ac_dir/install-sh; then
538 ac_aux_dir=$ac_dir
539 ac_install_sh="$ac_aux_dir/install-sh -c"
540 break
541 elif test -f $ac_dir/install.sh; then
542 ac_aux_dir=$ac_dir
543 ac_install_sh="$ac_aux_dir/install.sh -c"
544 break
545 fi
546done
547if test -z "$ac_aux_dir"; then
548 { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
549fi
550ac_config_guess=$ac_aux_dir/config.guess
551ac_config_sub=$ac_aux_dir/config.sub
552ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
553
733943b9
TT
554# Find a good install program. We prefer a C program (faster),
555# so one script is as good as another. But avoid the broken or
556# incompatible versions:
557# SysV /etc/install, /usr/sbin/install
558# SunOS /usr/etc/install
559# IRIX /sbin/install
560# AIX /bin/install
561# AFS /usr/afsws/bin/install, which mishandles nonexistent args
562# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
563# ./install, which can be erroneously created by make from ./install.sh.
564echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
3a629497 565echo "configure:566: checking for a BSD compatible install" >&5
733943b9
TT
566if test -z "$INSTALL"; then
567if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
86789f9b
JB
568 echo $ac_n "(cached) $ac_c" 1>&6
569else
733943b9 570 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="${IFS}:"
86789f9b 571 for ac_dir in $PATH; do
733943b9
TT
572 # Account for people who put trailing slashes in PATH elements.
573 case "$ac_dir/" in
574 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
575 *)
576 # OSF1 and SCO ODT 3.0 have their own names for install.
577 for ac_prog in ginstall installbsd scoinst install; do
578 if test -f $ac_dir/$ac_prog; then
579 if test $ac_prog = install &&
580 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
581 # AIX install. It has an incompatible calling convention.
582 # OSF/1 installbsd also uses dspmsg, but is usable.
583 :
584 else
585 ac_cv_path_install="$ac_dir/$ac_prog -c"
586 break 2
587 fi
588 fi
589 done
590 ;;
591 esac
86789f9b 592 done
733943b9 593 IFS="$ac_save_IFS"
86789f9b 594
087d2a6f 595fi
733943b9
TT
596 if test "${ac_cv_path_install+set}" = set; then
597 INSTALL="$ac_cv_path_install"
598 else
599 # As a last resort, use the slow shell script. We don't cache a
600 # path for INSTALL within a source directory, because that will
601 # break other packages using the cache if that directory is
602 # removed, or if the path is relative.
603 INSTALL="$ac_install_sh"
604 fi
087d2a6f 605fi
733943b9 606echo "$ac_t""$INSTALL" 1>&6
087d2a6f 607
733943b9
TT
608# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
609# It thinks the first close brace ends the variable substitution.
610test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
86789f9b 611
733943b9 612test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
86789f9b 613
86789f9b 614
733943b9 615test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
86789f9b 616
86789f9b 617
733943b9 618PACKAGE=$PACKAGE
86789f9b 619
1dc9c5b0
JB
620VERSION=$VERSION
621
5ffdd374 622
733943b9 623echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
3a629497 624echo "configure:625: checking whether build environment is sane" >&5
1dc9c5b0
JB
625# Just in case
626sleep 1
733943b9 627echo timestamp > conftestfile
1dc9c5b0
JB
628# Do `set' in a subshell so we don't clobber the current shell's
629# arguments. Must try -L first in case configure is actually a
630# symlink; some systems play weird games with the mod time of symlinks
631# (eg FreeBSD returns the mod time of the symlink's containing
632# directory).
633if (
634 set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
635 if test "" = "X"; then
636 # -L didn't work.
637 set X `ls -t $srcdir/configure conftestfile`
638 fi
639 test "$2" = conftestfile
640 )
733943b9
TT
641then
642 # Ok.
643 :
5ffdd374 644else
733943b9
TT
645 { echo "configure: error: newly created file is older than distributed files!
646Check your system clock" 1>&2; exit 1; }
5ffdd374 647fi
733943b9
TT
648rm -f conftest*
649echo "$ac_t""yes" 1>&6
650if test "$program_transform_name" = s,x,x,; then
651 program_transform_name=
652else
653 # Double any \ or $. echo might interpret backslashes.
654 cat <<\EOF_SED > conftestsed
655s,\\,\\\\,g; s,\$,$$,g
656EOF_SED
657 program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
658 rm -f conftestsed
659fi
660test "$program_prefix" != NONE &&
661 program_transform_name="s,^,${program_prefix},; $program_transform_name"
662# Use a double $ so make ignores it.
663test "$program_suffix" != NONE &&
664 program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
665
666# sed with no file args requires a program.
667test "$program_transform_name" = "" && program_transform_name="s,x,x,"
668
1dc9c5b0
JB
669missing_dir=`cd $ac_aux_dir && pwd`
670echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
3a629497 671echo "configure:672: checking for working aclocal" >&5
1dc9c5b0
JB
672# Run test in a subshell; some versions of sh will print an error if
673# an executable is not found, even if stderr is redirected.
674if (aclocal --version) > /dev/null 2>&1; then
675 ACLOCAL=aclocal
676 echo "$ac_t""found" 1>&6
677else
678 ACLOCAL="$missing_dir/missing aclocal"
679 echo "$ac_t""missing" 1>&6
680fi
681
682echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
3a629497 683echo "configure:684: checking for working autoconf" >&5
1dc9c5b0
JB
684# Run test in a subshell; some versions of sh will print an error if
685# an executable is not found, even if stderr is redirected.
686if (autoconf --version) > /dev/null 2>&1; then
687 AUTOCONF=autoconf
688 echo "$ac_t""found" 1>&6
689else
690 AUTOCONF="$missing_dir/missing autoconf"
691 echo "$ac_t""missing" 1>&6
692fi
693
694echo $ac_n "checking for working automake""... $ac_c" 1>&6
3a629497 695echo "configure:696: checking for working automake" >&5
1dc9c5b0
JB
696# Run test in a subshell; some versions of sh will print an error if
697# an executable is not found, even if stderr is redirected.
698if (automake --version) > /dev/null 2>&1; then
699 AUTOMAKE=automake
700 echo "$ac_t""found" 1>&6
701else
702 AUTOMAKE="$missing_dir/missing automake"
703 echo "$ac_t""missing" 1>&6
704fi
705
706echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
3a629497 707echo "configure:708: checking for working autoheader" >&5
1dc9c5b0
JB
708# Run test in a subshell; some versions of sh will print an error if
709# an executable is not found, even if stderr is redirected.
710if (autoheader --version) > /dev/null 2>&1; then
711 AUTOHEADER=autoheader
712 echo "$ac_t""found" 1>&6
713else
714 AUTOHEADER="$missing_dir/missing autoheader"
715 echo "$ac_t""missing" 1>&6
716fi
717
718echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
3a629497 719echo "configure:720: checking for working makeinfo" >&5
1dc9c5b0
JB
720# Run test in a subshell; some versions of sh will print an error if
721# an executable is not found, even if stderr is redirected.
722if (makeinfo --version) > /dev/null 2>&1; then
723 MAKEINFO=makeinfo
724 echo "$ac_t""found" 1>&6
725else
726 MAKEINFO="$missing_dir/missing makeinfo"
727 echo "$ac_t""missing" 1>&6
728fi
729
733943b9 730echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
3a629497 731echo "configure:732: checking whether ${MAKE-make} sets \${MAKE}" >&5
733943b9
TT
732set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
733if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
86789f9b
JB
734 echo $ac_n "(cached) $ac_c" 1>&6
735else
733943b9
TT
736 cat > conftestmake <<\EOF
737all:
738 @echo 'ac_maketemp="${MAKE}"'
86789f9b 739EOF
733943b9
TT
740# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
741eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
742if test -n "$ac_maketemp"; then
743 eval ac_cv_prog_make_${ac_make}_set=yes
86789f9b 744else
733943b9 745 eval ac_cv_prog_make_${ac_make}_set=no
86789f9b 746fi
733943b9 747rm -f conftestmake
86789f9b 748fi
733943b9 749if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
86789f9b 750 echo "$ac_t""yes" 1>&6
733943b9 751 SET_MAKE=
86789f9b
JB
752else
753 echo "$ac_t""no" 1>&6
733943b9 754 SET_MAKE="MAKE=${MAKE-make}"
86789f9b
JB
755fi
756
15ae1bee 757echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
3a629497 758echo "configure:759: checking whether to enable maintainer-specific portions of Makefiles" >&5
15ae1bee
MD
759 # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
760if test "${enable_maintainer_mode+set}" = set; then
761 enableval="$enable_maintainer_mode"
762 USE_MAINTAINER_MODE=$enableval
763else
764 USE_MAINTAINER_MODE=no
765fi
766
767 echo "$ac_t""$USE_MAINTAINER_MODE" 1>&6
768 if test $USE_MAINTAINER_MODE = yes; then
769 MAINT=
770 else
771 MAINT='#M#'
772 fi
773
774
86789f9b 775
733943b9 776
2d26def0 777
e63710da 778
3a629497 779#--------------------------------------------------------------------
0f2d19dd 780#
3a629497 781# User options
0f2d19dd 782#
3a629497
JB
783#--------------------------------------------------------------------
784
785# Check whether --enable-debug or --disable-debug was given.
786if test "${enable_debug+set}" = set; then
787 enableval="$enable_debug"
0f2d19dd 788 :
0f2d19dd 789fi
0f2d19dd 790
3a629497
JB
791if test "$enableval" != n && test "$enableval" != no; then
792 cat >> confdefs.h <<\EOF
793#define DEBUG_EXTENSIONS 1
794EOF
0f2d19dd 795
3a629497
JB
796 cat >> confdefs.h <<\EOF
797#define READER_EXTENSIONS 1
798EOF
0f2d19dd 799
3a629497 800 LIBOBJS="backtrace.o stacks.o debug.o srcprop.o $LIBOBJS"
0f2d19dd
JB
801fi
802
3a629497
JB
803# Check whether --enable-dynamic-linking or --disable-dynamic-linking was given.
804if test "${enable_dynamic_linking+set}" = set; then
805 enableval="$enable_dynamic_linking"
806 :
807fi
0f2d19dd 808
0f2d19dd 809
3a629497
JB
810# Check whether --enable-guile-debug or --disable-guile-debug was given.
811if test "${enable_guile_debug+set}" = set; then
812 enableval="$enable_guile_debug"
813 :
814fi
0f2d19dd 815
3a629497
JB
816if test "$enableval" = y || test "$enableval" = yes; then
817 cat >> confdefs.h <<\EOF
818#define GUILE_DEBUG 1
819EOF
0f2d19dd 820
3a629497 821fi
0f2d19dd 822
3a629497 823#--------------------------------------------------------------------
0f2d19dd 824
3a629497
JB
825# Extract the first word of "gcc", so it can be a program name with args.
826set dummy gcc; ac_word=$2
827echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
828echo "configure:829: checking for $ac_word" >&5
829if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
830 echo $ac_n "(cached) $ac_c" 1>&6
831else
832 if test -n "$CC"; then
833 ac_cv_prog_CC="$CC" # Let the user override the test.
834else
835 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
836 for ac_dir in $PATH; do
837 test -z "$ac_dir" && ac_dir=.
838 if test -f $ac_dir/$ac_word; then
839 ac_cv_prog_CC="gcc"
840 break
841 fi
842 done
843 IFS="$ac_save_ifs"
844fi
845fi
846CC="$ac_cv_prog_CC"
847if test -n "$CC"; then
848 echo "$ac_t""$CC" 1>&6
849else
850 echo "$ac_t""no" 1>&6
851fi
0f2d19dd 852
3a629497
JB
853if test -z "$CC"; then
854 # Extract the first word of "cc", so it can be a program name with args.
855set dummy cc; ac_word=$2
856echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
857echo "configure:858: checking for $ac_word" >&5
858if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
859 echo $ac_n "(cached) $ac_c" 1>&6
860else
861 if test -n "$CC"; then
862 ac_cv_prog_CC="$CC" # Let the user override the test.
863else
864 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
865 ac_prog_rejected=no
866 for ac_dir in $PATH; do
867 test -z "$ac_dir" && ac_dir=.
868 if test -f $ac_dir/$ac_word; then
869 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
870 ac_prog_rejected=yes
871 continue
872 fi
873 ac_cv_prog_CC="cc"
874 break
875 fi
876 done
877 IFS="$ac_save_ifs"
878if test $ac_prog_rejected = yes; then
879 # We found a bogon in the path, so make sure we never use it.
880 set dummy $ac_cv_prog_CC
881 shift
882 if test $# -gt 0; then
883 # We chose a different compiler from the bogus one.
884 # However, it has the same basename, so the bogon will be chosen
885 # first if we set CC to just the basename; use the full file name.
886 shift
887 set dummy "$ac_dir/$ac_word" "$@"
888 shift
889 ac_cv_prog_CC="$@"
890 fi
891fi
892fi
893fi
894CC="$ac_cv_prog_CC"
895if test -n "$CC"; then
896 echo "$ac_t""$CC" 1>&6
897else
898 echo "$ac_t""no" 1>&6
899fi
0f2d19dd 900
3a629497
JB
901 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
902fi
0f2d19dd 903
3a629497
JB
904echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
905echo "configure:906: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
733943b9 906
3a629497
JB
907ac_ext=c
908# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
909ac_cpp='$CPP $CPPFLAGS'
910ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
911ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
912cross_compiling=$ac_cv_prog_cc_cross
733943b9 913
3a629497
JB
914cat > conftest.$ac_ext <<EOF
915#line 916 "configure"
916#include "confdefs.h"
917main(){return(0);}
918EOF
919if { (eval echo configure:920: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
920 ac_cv_prog_cc_works=yes
921 # If we can't run a trivial program, we are probably using a cross compiler.
922 if (./conftest; exit) 2>/dev/null; then
923 ac_cv_prog_cc_cross=no
733943b9 924 else
3a629497 925 ac_cv_prog_cc_cross=yes
733943b9 926 fi
3a629497
JB
927else
928 echo "configure: failed program was:" >&5
929 cat conftest.$ac_ext >&5
930 ac_cv_prog_cc_works=no
733943b9 931fi
3a629497 932rm -fr conftest*
733943b9 933
3a629497
JB
934echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
935if test $ac_cv_prog_cc_works = no; then
936 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
937fi
938echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
939echo "configure:940: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
940echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
941cross_compiling=$ac_cv_prog_cc_cross
0f2d19dd 942
3a629497
JB
943echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
944echo "configure:945: checking whether we are using GNU C" >&5
945if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
946 echo $ac_n "(cached) $ac_c" 1>&6
947else
948 cat > conftest.c <<EOF
949#ifdef __GNUC__
950 yes;
951#endif
0f2d19dd 952EOF
3a629497
JB
953if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:954: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
954 ac_cv_prog_gcc=yes
955else
956 ac_cv_prog_gcc=no
957fi
958fi
0f2d19dd 959
3a629497 960echo "$ac_t""$ac_cv_prog_gcc" 1>&6
0f2d19dd 961
3a629497
JB
962if test $ac_cv_prog_gcc = yes; then
963 GCC=yes
964 ac_test_CFLAGS="${CFLAGS+set}"
965 ac_save_CFLAGS="$CFLAGS"
966 CFLAGS=
967 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
968echo "configure:969: checking whether ${CC-cc} accepts -g" >&5
969if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
970 echo $ac_n "(cached) $ac_c" 1>&6
971else
972 echo 'void f(){}' > conftest.c
973if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
974 ac_cv_prog_cc_g=yes
975else
976 ac_cv_prog_cc_g=no
977fi
978rm -f conftest*
979
980fi
981
982echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
983 if test "$ac_test_CFLAGS" = set; then
984 CFLAGS="$ac_save_CFLAGS"
985 elif test $ac_cv_prog_cc_g = yes; then
986 CFLAGS="-g -O2"
0f2d19dd 987 else
3a629497 988 CFLAGS="-O2"
0f2d19dd 989 fi
3a629497
JB
990else
991 GCC=
992 test "${CFLAGS+set}" = set || CFLAGS="-g"
993fi
0f2d19dd 994
3a629497
JB
995echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
996echo "configure:997: checking how to run the C preprocessor" >&5
997# On Suns, sometimes $CPP names a directory.
998if test -n "$CPP" && test -d "$CPP"; then
999 CPP=
1000fi
1001if test -z "$CPP"; then
1002if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1003 echo $ac_n "(cached) $ac_c" 1>&6
1004else
1005 # This must be in double quotes, not single quotes, because CPP may get
1006 # substituted into the Makefile and "${CC-cc}" will confuse make.
1007 CPP="${CC-cc} -E"
1008 # On the NeXT, cc -E runs the code through the compiler's parser,
1009 # not just through cpp.
1010 cat > conftest.$ac_ext <<EOF
1011#line 1012 "configure"
1012#include "confdefs.h"
1013#include <assert.h>
1014Syntax Error
1015EOF
1016ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1017{ (eval echo configure:1018: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1018ac_err=`grep -v '^ *+' conftest.out`
1019if test -z "$ac_err"; then
1020 :
1021else
1022 echo "$ac_err" >&5
1023 echo "configure: failed program was:" >&5
1024 cat conftest.$ac_ext >&5
1025 rm -rf conftest*
1026 CPP="${CC-cc} -E -traditional-cpp"
1027 cat > conftest.$ac_ext <<EOF
1028#line 1029 "configure"
1029#include "confdefs.h"
1030#include <assert.h>
1031Syntax Error
1032EOF
1033ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1034{ (eval echo configure:1035: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1035ac_err=`grep -v '^ *+' conftest.out`
1036if test -z "$ac_err"; then
1037 :
1038else
1039 echo "$ac_err" >&5
1040 echo "configure: failed program was:" >&5
1041 cat conftest.$ac_ext >&5
1042 rm -rf conftest*
1043 CPP=/lib/cpp
1044fi
1045rm -f conftest*
1046fi
1047rm -f conftest*
1048 ac_cv_prog_CPP="$CPP"
1049fi
1050 CPP="$ac_cv_prog_CPP"
1051else
1052 ac_cv_prog_CPP="$CPP"
1053fi
1054echo "$ac_t""$CPP" 1>&6
1055
1056
1057# Make sure we can run config.sub.
1058if $ac_config_sub sun4 >/dev/null 2>&1; then :
1059else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
1060fi
1061
1062echo $ac_n "checking host system type""... $ac_c" 1>&6
1063echo "configure:1064: checking host system type" >&5
1064
1065host_alias=$host
1066case "$host_alias" in
1067NONE)
1068 case $nonopt in
1069 NONE)
1070 if host_alias=`$ac_config_guess`; then :
1071 else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
1072 fi ;;
1073 *) host_alias=$nonopt ;;
1074 esac ;;
1075esac
1076
1077host=`$ac_config_sub $host_alias`
1078host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1079host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1080host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1081echo "$ac_t""$host" 1>&6
1082
1083# Extract the first word of "ranlib", so it can be a program name with args.
1084set dummy ranlib; ac_word=$2
1085echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1086echo "configure:1087: checking for $ac_word" >&5
1087if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1088 echo $ac_n "(cached) $ac_c" 1>&6
1089else
1090 if test -n "$RANLIB"; then
1091 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1092else
1093 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1094 for ac_dir in $PATH; do
1095 test -z "$ac_dir" && ac_dir=.
1096 if test -f $ac_dir/$ac_word; then
1097 ac_cv_prog_RANLIB="ranlib"
1098 break
1099 fi
1100 done
1101 IFS="$ac_save_ifs"
1102 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1103fi
1104fi
1105RANLIB="$ac_cv_prog_RANLIB"
1106if test -n "$RANLIB"; then
1107 echo "$ac_t""$RANLIB" 1>&6
1108else
1109 echo "$ac_t""no" 1>&6
1110fi
1111
1112
1113
1114
1115
1116# Always use our own libtool.
1117LIBTOOL='$(top_builddir)/libtool'
1118
1119
1120# Check whether --enable-shared or --disable-shared was given.
1121if test "${enable_shared+set}" = set; then
1122 enableval="$enable_shared"
1123 test "$enableval" = no && libtool_shared=" --disable-shared"
1124else
1125 libtool_shared=
1126fi
1127
1128
1129libtool_flags="$libtool_shared"
1130test "$silent" = yes && libtool_flags="$libtool_flags --silent"
1131test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
1132
1133case "$host" in
1134*-*-irix6*)
1135 # For IRIX 6, ld needs -n32 if cc uses it.
1136 if echo " $CC $CFLAGS " | egrep -e '[ ]-n32[ ]' > /dev/null; then
1137 LD="${LD-ld} -n32"
1138 fi
1139 ;;
1140
1141*-*-sco3.2v5*)
1142 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
1143 CFLAGS="$CFLAGS -belf"
1144 ;;
1145esac
1146
1147# Actually configure libtool. ac_aux_dir is where install-sh is found.
1148CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" LD="$LD" RANLIB="$RANLIB" \
1149${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig \
1150$libtool_flags --no-verify $ac_aux_dir/ltmain.sh $host \
1151|| { echo "configure: error: libtool configure failed" 1>&2; exit 1; }
1152
1153
1154echo $ac_n "checking for AIX""... $ac_c" 1>&6
1155echo "configure:1156: checking for AIX" >&5
1156cat > conftest.$ac_ext <<EOF
1157#line 1158 "configure"
1158#include "confdefs.h"
1159#ifdef _AIX
1160 yes
1161#endif
1162
1163EOF
1164if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1165 egrep "yes" >/dev/null 2>&1; then
1166 rm -rf conftest*
1167 echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
1168#define _ALL_SOURCE 1
1169EOF
1170
1171else
1172 rm -rf conftest*
1173 echo "$ac_t""no" 1>&6
1174fi
1175rm -f conftest*
1176
1177
1178echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
1179echo "configure:1180: checking for POSIXized ISC" >&5
1180if test -d /etc/conf/kconfig.d &&
1181 grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
1182then
1183 echo "$ac_t""yes" 1>&6
1184 ISC=yes # If later tests want to check for ISC.
1185 cat >> confdefs.h <<\EOF
1186#define _POSIX_SOURCE 1
1187EOF
1188
1189 if test "$GCC" = yes; then
1190 CC="$CC -posix"
1191 else
1192 CC="$CC -Xp"
1193 fi
1194else
1195 echo "$ac_t""no" 1>&6
1196 ISC=
1197fi
1198
1199ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'`
1200echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6
1201echo "configure:1202: checking for minix/config.h" >&5
1202if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1203 echo $ac_n "(cached) $ac_c" 1>&6
1204else
1205 cat > conftest.$ac_ext <<EOF
1206#line 1207 "configure"
1207#include "confdefs.h"
1208#include <minix/config.h>
1209EOF
1210ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1211{ (eval echo configure:1212: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1212ac_err=`grep -v '^ *+' conftest.out`
1213if test -z "$ac_err"; then
1214 rm -rf conftest*
1215 eval "ac_cv_header_$ac_safe=yes"
1216else
1217 echo "$ac_err" >&5
1218 echo "configure: failed program was:" >&5
1219 cat conftest.$ac_ext >&5
1220 rm -rf conftest*
1221 eval "ac_cv_header_$ac_safe=no"
1222fi
1223rm -f conftest*
1224fi
1225if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1226 echo "$ac_t""yes" 1>&6
1227 MINIX=yes
1228else
1229 echo "$ac_t""no" 1>&6
1230MINIX=
1231fi
1232
1233if test "$MINIX" = yes; then
1234 cat >> confdefs.h <<\EOF
1235#define _POSIX_SOURCE 1
1236EOF
1237
1238 cat >> confdefs.h <<\EOF
1239#define _POSIX_1_SOURCE 2
1240EOF
1241
1242 cat >> confdefs.h <<\EOF
1243#define _MINIX 1
1244EOF
1245
1246fi
1247
1248
1249echo $ac_n "checking for working const""... $ac_c" 1>&6
1250echo "configure:1251: checking for working const" >&5
1251if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
1252 echo $ac_n "(cached) $ac_c" 1>&6
1253else
1254 cat > conftest.$ac_ext <<EOF
1255#line 1256 "configure"
1256#include "confdefs.h"
1257
1258int main() {
1259
1260/* Ultrix mips cc rejects this. */
1261typedef int charset[2]; const charset x;
1262/* SunOS 4.1.1 cc rejects this. */
1263char const *const *ccp;
1264char **p;
1265/* NEC SVR4.0.2 mips cc rejects this. */
1266struct point {int x, y;};
1267static struct point const zero = {0,0};
1268/* AIX XL C 1.02.0.0 rejects this.
1269 It does not let you subtract one const X* pointer from another in an arm
1270 of an if-expression whose if-part is not a constant expression */
1271const char *g = "string";
1272ccp = &g + (g ? g-g : 0);
1273/* HPUX 7.0 cc rejects these. */
1274++ccp;
1275p = (char**) ccp;
1276ccp = (char const *const *) p;
1277{ /* SCO 3.2v4 cc rejects this. */
1278 char *t;
1279 char const *s = 0 ? (char *) 0 : (char const *) 0;
1280
1281 *t++ = 0;
1282}
1283{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
1284 int x[] = {25, 17};
1285 const int *foo = &x[0];
1286 ++foo;
1287}
1288{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
1289 typedef const int *iptr;
1290 iptr p = 0;
1291 ++p;
1292}
1293{ /* AIX XL C 1.02.0.0 rejects this saying
1294 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
1295 struct s { int j; const int *ap[3]; };
1296 struct s *b; b->j = 5;
1297}
1298{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
1299 const int foo = 10;
1300}
1301
1302; return 0; }
1303EOF
1304if { (eval echo configure:1305: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1305 rm -rf conftest*
1306 ac_cv_c_const=yes
1307else
1308 echo "configure: failed program was:" >&5
1309 cat conftest.$ac_ext >&5
1310 rm -rf conftest*
1311 ac_cv_c_const=no
1312fi
1313rm -f conftest*
1314fi
1315
1316echo "$ac_t""$ac_cv_c_const" 1>&6
1317if test $ac_cv_c_const = no; then
1318 cat >> confdefs.h <<\EOF
1319#define const
1320EOF
1321
1322fi
1323
1324
1325echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
1326echo "configure:1327: checking for ANSI C header files" >&5
1327if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1328 echo $ac_n "(cached) $ac_c" 1>&6
1329else
1330 cat > conftest.$ac_ext <<EOF
1331#line 1332 "configure"
1332#include "confdefs.h"
1333#include <stdlib.h>
1334#include <stdarg.h>
1335#include <string.h>
1336#include <float.h>
1337EOF
1338ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1339{ (eval echo configure:1340: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1340ac_err=`grep -v '^ *+' conftest.out`
1341if test -z "$ac_err"; then
1342 rm -rf conftest*
1343 ac_cv_header_stdc=yes
1344else
1345 echo "$ac_err" >&5
1346 echo "configure: failed program was:" >&5
1347 cat conftest.$ac_ext >&5
1348 rm -rf conftest*
1349 ac_cv_header_stdc=no
1350fi
1351rm -f conftest*
1352
1353if test $ac_cv_header_stdc = yes; then
1354 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1355cat > conftest.$ac_ext <<EOF
1356#line 1357 "configure"
1357#include "confdefs.h"
1358#include <string.h>
1359EOF
1360if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1361 egrep "memchr" >/dev/null 2>&1; then
1362 :
1363else
1364 rm -rf conftest*
1365 ac_cv_header_stdc=no
1366fi
1367rm -f conftest*
1368
1369fi
1370
1371if test $ac_cv_header_stdc = yes; then
1372 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1373cat > conftest.$ac_ext <<EOF
1374#line 1375 "configure"
1375#include "confdefs.h"
1376#include <stdlib.h>
1377EOF
1378if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1379 egrep "free" >/dev/null 2>&1; then
1380 :
1381else
1382 rm -rf conftest*
1383 ac_cv_header_stdc=no
1384fi
1385rm -f conftest*
1386
1387fi
1388
1389if test $ac_cv_header_stdc = yes; then
1390 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1391if test "$cross_compiling" = yes; then
1392 :
1393else
1394 cat > conftest.$ac_ext <<EOF
1395#line 1396 "configure"
1396#include "confdefs.h"
1397#include <ctype.h>
1398#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1399#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
1400#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
1401int main () { int i; for (i = 0; i < 256; i++)
1402if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1403exit (0); }
1404
1405EOF
1406if { (eval echo configure:1407: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
1407then
1408 :
1409else
1410 echo "configure: failed program was:" >&5
1411 cat conftest.$ac_ext >&5
1412 rm -fr conftest*
1413 ac_cv_header_stdc=no
1414fi
1415rm -fr conftest*
1416fi
1417
1418fi
1419fi
1420
1421echo "$ac_t""$ac_cv_header_stdc" 1>&6
1422if test $ac_cv_header_stdc = yes; then
1423 cat >> confdefs.h <<\EOF
1424#define STDC_HEADERS 1
1425EOF
1426
1427fi
1428
1429ac_header_dirent=no
1430for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
1431do
1432ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1433echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
1434echo "configure:1435: checking for $ac_hdr that defines DIR" >&5
1435if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
1436 echo $ac_n "(cached) $ac_c" 1>&6
1437else
1438 cat > conftest.$ac_ext <<EOF
1439#line 1440 "configure"
1440#include "confdefs.h"
1441#include <sys/types.h>
1442#include <$ac_hdr>
1443int main() {
1444DIR *dirp = 0;
1445; return 0; }
1446EOF
1447if { (eval echo configure:1448: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1448 rm -rf conftest*
1449 eval "ac_cv_header_dirent_$ac_safe=yes"
1450else
1451 echo "configure: failed program was:" >&5
1452 cat conftest.$ac_ext >&5
1453 rm -rf conftest*
1454 eval "ac_cv_header_dirent_$ac_safe=no"
1455fi
1456rm -f conftest*
1457fi
1458if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
1459 echo "$ac_t""yes" 1>&6
1460 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1461 cat >> confdefs.h <<EOF
1462#define $ac_tr_hdr 1
1463EOF
1464 ac_header_dirent=$ac_hdr; break
1465else
1466 echo "$ac_t""no" 1>&6
1467fi
1468done
1469# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
1470if test $ac_header_dirent = dirent.h; then
1471echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
1472echo "configure:1473: checking for opendir in -ldir" >&5
1473ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
1474if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1475 echo $ac_n "(cached) $ac_c" 1>&6
1476else
1477 ac_save_LIBS="$LIBS"
1478LIBS="-ldir $LIBS"
1479cat > conftest.$ac_ext <<EOF
1480#line 1481 "configure"
1481#include "confdefs.h"
1482/* Override any gcc2 internal prototype to avoid an error. */
1483/* We use char because int might match the return type of a gcc2
1484 builtin and then its argument prototype would still apply. */
1485char opendir();
1486
1487int main() {
1488opendir()
1489; return 0; }
1490EOF
1491if { (eval echo configure:1492: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1492 rm -rf conftest*
1493 eval "ac_cv_lib_$ac_lib_var=yes"
1494else
1495 echo "configure: failed program was:" >&5
1496 cat conftest.$ac_ext >&5
1497 rm -rf conftest*
1498 eval "ac_cv_lib_$ac_lib_var=no"
1499fi
1500rm -f conftest*
1501LIBS="$ac_save_LIBS"
1502
1503fi
1504if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1505 echo "$ac_t""yes" 1>&6
1506 LIBS="$LIBS -ldir"
1507else
1508 echo "$ac_t""no" 1>&6
1509fi
1510
1511else
1512echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
1513echo "configure:1514: checking for opendir in -lx" >&5
1514ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
1515if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1516 echo $ac_n "(cached) $ac_c" 1>&6
1517else
1518 ac_save_LIBS="$LIBS"
1519LIBS="-lx $LIBS"
1520cat > conftest.$ac_ext <<EOF
1521#line 1522 "configure"
1522#include "confdefs.h"
1523/* Override any gcc2 internal prototype to avoid an error. */
1524/* We use char because int might match the return type of a gcc2
1525 builtin and then its argument prototype would still apply. */
1526char opendir();
1527
1528int main() {
1529opendir()
1530; return 0; }
1531EOF
1532if { (eval echo configure:1533: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1533 rm -rf conftest*
1534 eval "ac_cv_lib_$ac_lib_var=yes"
1535else
1536 echo "configure: failed program was:" >&5
1537 cat conftest.$ac_ext >&5
1538 rm -rf conftest*
1539 eval "ac_cv_lib_$ac_lib_var=no"
1540fi
1541rm -f conftest*
1542LIBS="$ac_save_LIBS"
1543
1544fi
1545if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1546 echo "$ac_t""yes" 1>&6
1547 LIBS="$LIBS -lx"
1548else
1549 echo "$ac_t""no" 1>&6
1550fi
1551
1552fi
1553
1554echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
1555echo "configure:1556: checking whether time.h and sys/time.h may both be included" >&5
1556if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
1557 echo $ac_n "(cached) $ac_c" 1>&6
1558else
1559 cat > conftest.$ac_ext <<EOF
1560#line 1561 "configure"
1561#include "confdefs.h"
1562#include <sys/types.h>
1563#include <sys/time.h>
1564#include <time.h>
1565int main() {
1566struct tm *tp;
1567; return 0; }
1568EOF
1569if { (eval echo configure:1570: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1570 rm -rf conftest*
1571 ac_cv_header_time=yes
1572else
1573 echo "configure: failed program was:" >&5
1574 cat conftest.$ac_ext >&5
1575 rm -rf conftest*
1576 ac_cv_header_time=no
1577fi
1578rm -f conftest*
1579fi
1580
1581echo "$ac_t""$ac_cv_header_time" 1>&6
1582if test $ac_cv_header_time = yes; then
1583 cat >> confdefs.h <<\EOF
1584#define TIME_WITH_SYS_TIME 1
1585EOF
1586
1587fi
1588
1589echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
1590echo "configure:1591: checking for sys/wait.h that is POSIX.1 compatible" >&5
1591if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
1592 echo $ac_n "(cached) $ac_c" 1>&6
1593else
1594 cat > conftest.$ac_ext <<EOF
1595#line 1596 "configure"
1596#include "confdefs.h"
1597#include <sys/types.h>
1598#include <sys/wait.h>
1599#ifndef WEXITSTATUS
1600#define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
1601#endif
1602#ifndef WIFEXITED
1603#define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
1604#endif
1605int main() {
1606int s;
1607wait (&s);
1608s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
1609; return 0; }
1610EOF
1611if { (eval echo configure:1612: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1612 rm -rf conftest*
1613 ac_cv_header_sys_wait_h=yes
1614else
1615 echo "configure: failed program was:" >&5
1616 cat conftest.$ac_ext >&5
1617 rm -rf conftest*
1618 ac_cv_header_sys_wait_h=no
1619fi
1620rm -f conftest*
1621fi
1622
1623echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
1624if test $ac_cv_header_sys_wait_h = yes; then
1625 cat >> confdefs.h <<\EOF
1626#define HAVE_SYS_WAIT_H 1
1627EOF
1628
1629fi
1630
1631for 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
1632do
1633ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1634echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1635echo "configure:1636: checking for $ac_hdr" >&5
1636if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1637 echo $ac_n "(cached) $ac_c" 1>&6
1638else
1639 cat > conftest.$ac_ext <<EOF
1640#line 1641 "configure"
1641#include "confdefs.h"
1642#include <$ac_hdr>
1643EOF
1644ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1645{ (eval echo configure:1646: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1646ac_err=`grep -v '^ *+' conftest.out`
1647if test -z "$ac_err"; then
1648 rm -rf conftest*
1649 eval "ac_cv_header_$ac_safe=yes"
1650else
1651 echo "$ac_err" >&5
1652 echo "configure: failed program was:" >&5
1653 cat conftest.$ac_ext >&5
1654 rm -rf conftest*
1655 eval "ac_cv_header_$ac_safe=no"
1656fi
1657rm -f conftest*
1658fi
1659if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1660 echo "$ac_t""yes" 1>&6
1661 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1662 cat >> confdefs.h <<EOF
1663#define $ac_tr_hdr 1
1664EOF
1665
1666else
1667 echo "$ac_t""no" 1>&6
1668fi
1669done
1670
1671
1672 for ac_hdr in libc.h unistd.h
1673do
1674ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1675echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1676echo "configure:1677: checking for $ac_hdr" >&5
1677if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1678 echo $ac_n "(cached) $ac_c" 1>&6
1679else
1680 cat > conftest.$ac_ext <<EOF
1681#line 1682 "configure"
1682#include "confdefs.h"
1683#include <$ac_hdr>
1684EOF
1685ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1686{ (eval echo configure:1687: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1687ac_err=`grep -v '^ *+' conftest.out`
1688if test -z "$ac_err"; then
1689 rm -rf conftest*
1690 eval "ac_cv_header_$ac_safe=yes"
1691else
1692 echo "$ac_err" >&5
1693 echo "configure: failed program was:" >&5
1694 cat conftest.$ac_ext >&5
1695 rm -rf conftest*
1696 eval "ac_cv_header_$ac_safe=no"
1697fi
1698rm -f conftest*
1699fi
1700if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1701 echo "$ac_t""yes" 1>&6
1702 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1703 cat >> confdefs.h <<EOF
1704#define $ac_tr_hdr 1
1705EOF
1706
1707else
1708 echo "$ac_t""no" 1>&6
1709fi
1710done
1711
1712 echo $ac_n "checking "whether libc.h and unistd.h can be included together"""... $ac_c" 1>&6
1713echo "configure:1714: checking "whether libc.h and unistd.h can be included together"" >&5
1714if eval "test \"`echo '$''{'guile_cv_header_libc_with_unistd'+set}'`\" = set"; then
1715 echo $ac_n "(cached) $ac_c" 1>&6
1716else
1717
1718 if test "$ac_cv_header_libc_h" = "no"; then
1719 guile_cv_header_libc_with_unistd="no"
1720 elif test "$ac_cv_header_unistd.h" = "no"; then
1721 guile_cv_header_libc_with_unistd="yes"
1722 else
1723 cat > conftest.$ac_ext <<EOF
1724#line 1725 "configure"
1725#include "confdefs.h"
1726
1727# include <libc.h>
1728# include <unistd.h>
1729
1730int main() {
1731
1732; return 0; }
1733EOF
1734if { (eval echo configure:1735: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1735 rm -rf conftest*
1736 guile_cv_header_libc_with_unistd=yes
1737else
1738 echo "configure: failed program was:" >&5
1739 cat conftest.$ac_ext >&5
1740 rm -rf conftest*
1741 guile_cv_header_libc_with_unistd=no
1742
1743fi
1744rm -f conftest*
1745 fi
1746
1747
1748fi
1749
1750echo "$ac_t""$guile_cv_header_libc_with_unistd" 1>&6
1751 if test "$guile_cv_header_libc_with_unistd" = yes; then
1752 cat >> confdefs.h <<\EOF
1753#define LIBC_H_WITH_UNISTD_H 1
1754EOF
1755
1756 fi
1757
1758
1759
1760echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
1761echo "configure:1762: checking for uid_t in sys/types.h" >&5
1762if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
1763 echo $ac_n "(cached) $ac_c" 1>&6
1764else
1765 cat > conftest.$ac_ext <<EOF
1766#line 1767 "configure"
1767#include "confdefs.h"
1768#include <sys/types.h>
1769EOF
1770if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1771 egrep "uid_t" >/dev/null 2>&1; then
1772 rm -rf conftest*
1773 ac_cv_type_uid_t=yes
1774else
1775 rm -rf conftest*
1776 ac_cv_type_uid_t=no
1777fi
1778rm -f conftest*
1779
1780fi
1781
1782echo "$ac_t""$ac_cv_type_uid_t" 1>&6
1783if test $ac_cv_type_uid_t = no; then
1784 cat >> confdefs.h <<\EOF
1785#define uid_t int
1786EOF
1787
1788 cat >> confdefs.h <<\EOF
1789#define gid_t int
1790EOF
1791
1792fi
1793
1794echo $ac_n "checking type of array argument to getgroups""... $ac_c" 1>&6
1795echo "configure:1796: checking type of array argument to getgroups" >&5
1796if eval "test \"`echo '$''{'ac_cv_type_getgroups'+set}'`\" = set"; then
1797 echo $ac_n "(cached) $ac_c" 1>&6
1798else
1799 if test "$cross_compiling" = yes; then
1800 ac_cv_type_getgroups=cross
1801else
1802 cat > conftest.$ac_ext <<EOF
1803#line 1804 "configure"
1804#include "confdefs.h"
1805
1806/* Thanks to Mike Rendell for this test. */
1807#include <sys/types.h>
1808#define NGID 256
1809#undef MAX
1810#define MAX(x, y) ((x) > (y) ? (x) : (y))
1811main()
1812{
1813 gid_t gidset[NGID];
1814 int i, n;
1815 union { gid_t gval; long lval; } val;
1816
1817 val.lval = -1;
1818 for (i = 0; i < NGID; i++)
1819 gidset[i] = val.gval;
1820 n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1,
1821 gidset);
1822 /* Exit non-zero if getgroups seems to require an array of ints. This
1823 happens when gid_t is short but getgroups modifies an array of ints. */
1824 exit ((n > 0 && gidset[n] != val.gval) ? 1 : 0);
1825}
1826
1827EOF
1828if { (eval echo configure:1829: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
1829then
1830 ac_cv_type_getgroups=gid_t
1831else
1832 echo "configure: failed program was:" >&5
1833 cat conftest.$ac_ext >&5
1834 rm -fr conftest*
1835 ac_cv_type_getgroups=int
1836fi
1837rm -fr conftest*
1838fi
1839
1840if test $ac_cv_type_getgroups = cross; then
1841 cat > conftest.$ac_ext <<EOF
1842#line 1843 "configure"
1843#include "confdefs.h"
1844#include <unistd.h>
1845EOF
1846if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1847 egrep "getgroups.*int.*gid_t" >/dev/null 2>&1; then
1848 rm -rf conftest*
1849 ac_cv_type_getgroups=gid_t
1850else
1851 rm -rf conftest*
1852 ac_cv_type_getgroups=int
1853fi
1854rm -f conftest*
1855
1856fi
1857fi
1858
1859echo "$ac_t""$ac_cv_type_getgroups" 1>&6
1860cat >> confdefs.h <<EOF
1861#define GETGROUPS_T $ac_cv_type_getgroups
1862EOF
1863
1864
1865echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
1866echo "configure:1867: checking return type of signal handlers" >&5
1867if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
1868 echo $ac_n "(cached) $ac_c" 1>&6
1869else
1870 cat > conftest.$ac_ext <<EOF
1871#line 1872 "configure"
1872#include "confdefs.h"
1873#include <sys/types.h>
1874#include <signal.h>
1875#ifdef signal
1876#undef signal
1877#endif
1878#ifdef __cplusplus
1879extern "C" void (*signal (int, void (*)(int)))(int);
1880#else
1881void (*signal ()) ();
1882#endif
1883
1884int main() {
1885int i;
1886; return 0; }
1887EOF
1888if { (eval echo configure:1889: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1889 rm -rf conftest*
1890 ac_cv_type_signal=void
1891else
1892 echo "configure: failed program was:" >&5
1893 cat conftest.$ac_ext >&5
1894 rm -rf conftest*
1895 ac_cv_type_signal=int
1896fi
1897rm -f conftest*
1898fi
1899
1900echo "$ac_t""$ac_cv_type_signal" 1>&6
1901cat >> confdefs.h <<EOF
1902#define RETSIGTYPE $ac_cv_type_signal
1903EOF
1904
1905
1906echo $ac_n "checking for mode_t""... $ac_c" 1>&6
1907echo "configure:1908: checking for mode_t" >&5
1908if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
1909 echo $ac_n "(cached) $ac_c" 1>&6
1910else
1911 cat > conftest.$ac_ext <<EOF
1912#line 1913 "configure"
1913#include "confdefs.h"
1914#include <sys/types.h>
1915#if STDC_HEADERS
1916#include <stdlib.h>
1917#include <stddef.h>
1918#endif
1919EOF
1920if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1921 egrep "mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
1922 rm -rf conftest*
1923 ac_cv_type_mode_t=yes
1924else
1925 rm -rf conftest*
1926 ac_cv_type_mode_t=no
1927fi
1928rm -f conftest*
1929
1930fi
1931echo "$ac_t""$ac_cv_type_mode_t" 1>&6
1932if test $ac_cv_type_mode_t = no; then
1933 cat >> confdefs.h <<\EOF
1934#define mode_t int
1935EOF
1936
1937fi
1938
1939
1940for ac_func in ctermid ftime getcwd geteuid gethostent gettimeofday lstat mkdir mknod nice readlink rename rmdir select setegid seteuid setlocale setpgid setsid strftime strptime symlink sync tcgetpgrp tcsetpgrp times uname waitpid
1941do
1942echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1943echo "configure:1944: checking for $ac_func" >&5
1944if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1945 echo $ac_n "(cached) $ac_c" 1>&6
1946else
1947 cat > conftest.$ac_ext <<EOF
1948#line 1949 "configure"
1949#include "confdefs.h"
1950/* System header to define __stub macros and hopefully few prototypes,
1951 which can conflict with char $ac_func(); below. */
1952#include <assert.h>
1953/* Override any gcc2 internal prototype to avoid an error. */
1954/* We use char because int might match the return type of a gcc2
1955 builtin and then its argument prototype would still apply. */
1956char $ac_func();
1957
1958int main() {
1959
1960/* The GNU C library defines this for functions which it implements
1961 to always fail with ENOSYS. Some functions are actually named
1962 something starting with __ and the normal name is an alias. */
1963#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1964choke me
1965#else
1966$ac_func();
1967#endif
1968
1969; return 0; }
1970EOF
1971if { (eval echo configure:1972: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1972 rm -rf conftest*
1973 eval "ac_cv_func_$ac_func=yes"
1974else
1975 echo "configure: failed program was:" >&5
1976 cat conftest.$ac_ext >&5
1977 rm -rf conftest*
1978 eval "ac_cv_func_$ac_func=no"
1979fi
1980rm -f conftest*
1981fi
1982
1983if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1984 echo "$ac_t""yes" 1>&6
1985 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1986 cat >> confdefs.h <<EOF
1987#define $ac_tr_func 1
1988EOF
1989
1990else
1991 echo "$ac_t""no" 1>&6
1992fi
1993done
1994
1995
1996for ac_func in inet_aton putenv strerror
1997do
1998echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1999echo "configure:2000: checking for $ac_func" >&5
2000if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2001 echo $ac_n "(cached) $ac_c" 1>&6
2002else
2003 cat > conftest.$ac_ext <<EOF
2004#line 2005 "configure"
2005#include "confdefs.h"
2006/* System header to define __stub macros and hopefully few prototypes,
2007 which can conflict with char $ac_func(); below. */
2008#include <assert.h>
2009/* Override any gcc2 internal prototype to avoid an error. */
2010/* We use char because int might match the return type of a gcc2
2011 builtin and then its argument prototype would still apply. */
2012char $ac_func();
2013
2014int main() {
2015
2016/* The GNU C library defines this for functions which it implements
2017 to always fail with ENOSYS. Some functions are actually named
2018 something starting with __ and the normal name is an alias. */
2019#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2020choke me
2021#else
2022$ac_func();
2023#endif
2024
2025; return 0; }
2026EOF
2027if { (eval echo configure:2028: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2028 rm -rf conftest*
2029 eval "ac_cv_func_$ac_func=yes"
2030else
2031 echo "configure: failed program was:" >&5
2032 cat conftest.$ac_ext >&5
2033 rm -rf conftest*
2034 eval "ac_cv_func_$ac_func=no"
2035fi
2036rm -f conftest*
2037fi
2038
2039if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2040 echo "$ac_t""yes" 1>&6
2041 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2042 cat >> confdefs.h <<EOF
2043#define $ac_tr_func 1
2044EOF
2045
2046else
2047 echo "$ac_t""no" 1>&6
2048LIBOBJS="$LIBOBJS ${ac_func}.o"
2049fi
2050done
2051
2052
2053
2054# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
2055# for constant arguments. Useless!
2056echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
2057echo "configure:2058: checking for working alloca.h" >&5
2058if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
2059 echo $ac_n "(cached) $ac_c" 1>&6
2060else
2061 cat > conftest.$ac_ext <<EOF
2062#line 2063 "configure"
2063#include "confdefs.h"
2064#include <alloca.h>
2065int main() {
2066char *p = alloca(2 * sizeof(int));
2067; return 0; }
2068EOF
2069if { (eval echo configure:2070: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2070 rm -rf conftest*
2071 ac_cv_header_alloca_h=yes
2072else
2073 echo "configure: failed program was:" >&5
2074 cat conftest.$ac_ext >&5
2075 rm -rf conftest*
2076 ac_cv_header_alloca_h=no
2077fi
2078rm -f conftest*
2079fi
2080
2081echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
2082if test $ac_cv_header_alloca_h = yes; then
2083 cat >> confdefs.h <<\EOF
2084#define HAVE_ALLOCA_H 1
2085EOF
2086
2087fi
2088
2089echo $ac_n "checking for alloca""... $ac_c" 1>&6
2090echo "configure:2091: checking for alloca" >&5
2091if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
2092 echo $ac_n "(cached) $ac_c" 1>&6
2093else
2094 cat > conftest.$ac_ext <<EOF
2095#line 2096 "configure"
2096#include "confdefs.h"
2097
2098#ifdef __GNUC__
2099# define alloca __builtin_alloca
2100#else
2101# if HAVE_ALLOCA_H
2102# include <alloca.h>
2103# else
2104# ifdef _AIX
2105 #pragma alloca
2106# else
2107# ifndef alloca /* predefined by HP cc +Olibcalls */
2108char *alloca ();
2109# endif
2110# endif
2111# endif
2112#endif
2113
2114int main() {
2115char *p = (char *) alloca(1);
2116; return 0; }
2117EOF
2118if { (eval echo configure:2119: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2119 rm -rf conftest*
2120 ac_cv_func_alloca_works=yes
2121else
2122 echo "configure: failed program was:" >&5
2123 cat conftest.$ac_ext >&5
2124 rm -rf conftest*
2125 ac_cv_func_alloca_works=no
2126fi
2127rm -f conftest*
2128fi
2129
2130echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
2131if test $ac_cv_func_alloca_works = yes; then
2132 cat >> confdefs.h <<\EOF
2133#define HAVE_ALLOCA 1
2134EOF
2135
2136fi
2137
2138if test $ac_cv_func_alloca_works = no; then
2139 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
2140 # that cause trouble. Some versions do not even contain alloca or
2141 # contain a buggy version. If you still want to use their alloca,
2142 # use ar to extract alloca.o from them instead of compiling alloca.c.
2143 ALLOCA=alloca.o
2144 cat >> confdefs.h <<\EOF
2145#define C_ALLOCA 1
2146EOF
2147
2148
2149echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
2150echo "configure:2151: checking whether alloca needs Cray hooks" >&5
2151if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
2152 echo $ac_n "(cached) $ac_c" 1>&6
2153else
2154 cat > conftest.$ac_ext <<EOF
2155#line 2156 "configure"
2156#include "confdefs.h"
2157#if defined(CRAY) && ! defined(CRAY2)
2158webecray
2159#else
2160wenotbecray
2161#endif
2162
2163EOF
2164if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2165 egrep "webecray" >/dev/null 2>&1; then
2166 rm -rf conftest*
2167 ac_cv_os_cray=yes
2168else
2169 rm -rf conftest*
2170 ac_cv_os_cray=no
2171fi
2172rm -f conftest*
2173
2174fi
2175
2176echo "$ac_t""$ac_cv_os_cray" 1>&6
2177if test $ac_cv_os_cray = yes; then
2178for ac_func in _getb67 GETB67 getb67; do
2179 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2180echo "configure:2181: checking for $ac_func" >&5
2181if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2182 echo $ac_n "(cached) $ac_c" 1>&6
2183else
2184 cat > conftest.$ac_ext <<EOF
2185#line 2186 "configure"
2186#include "confdefs.h"
2187/* System header to define __stub macros and hopefully few prototypes,
2188 which can conflict with char $ac_func(); below. */
2189#include <assert.h>
2190/* Override any gcc2 internal prototype to avoid an error. */
2191/* We use char because int might match the return type of a gcc2
2192 builtin and then its argument prototype would still apply. */
2193char $ac_func();
2194
2195int main() {
2196
2197/* The GNU C library defines this for functions which it implements
2198 to always fail with ENOSYS. Some functions are actually named
2199 something starting with __ and the normal name is an alias. */
2200#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2201choke me
2202#else
2203$ac_func();
2204#endif
2205
2206; return 0; }
2207EOF
2208if { (eval echo configure:2209: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2209 rm -rf conftest*
2210 eval "ac_cv_func_$ac_func=yes"
2211else
2212 echo "configure: failed program was:" >&5
2213 cat conftest.$ac_ext >&5
2214 rm -rf conftest*
2215 eval "ac_cv_func_$ac_func=no"
2216fi
2217rm -f conftest*
2218fi
2219
2220if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2221 echo "$ac_t""yes" 1>&6
2222 cat >> confdefs.h <<EOF
2223#define CRAY_STACKSEG_END $ac_func
2224EOF
2225
2226 break
2227else
2228 echo "$ac_t""no" 1>&6
2229fi
2230
2231done
2232fi
2233
2234echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
2235echo "configure:2236: checking stack direction for C alloca" >&5
2236if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
2237 echo $ac_n "(cached) $ac_c" 1>&6
2238else
2239 if test "$cross_compiling" = yes; then
2240 ac_cv_c_stack_direction=0
2241else
2242 cat > conftest.$ac_ext <<EOF
2243#line 2244 "configure"
2244#include "confdefs.h"
2245find_stack_direction ()
2246{
2247 static char *addr = 0;
2248 auto char dummy;
2249 if (addr == 0)
2250 {
2251 addr = &dummy;
2252 return find_stack_direction ();
2253 }
2254 else
2255 return (&dummy > addr) ? 1 : -1;
2256}
2257main ()
2258{
2259 exit (find_stack_direction() < 0);
2260}
2261EOF
2262if { (eval echo configure:2263: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
2263then
2264 ac_cv_c_stack_direction=1
2265else
2266 echo "configure: failed program was:" >&5
2267 cat conftest.$ac_ext >&5
2268 rm -fr conftest*
2269 ac_cv_c_stack_direction=-1
2270fi
2271rm -fr conftest*
2272fi
2273
2274fi
2275
2276echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
2277cat >> confdefs.h <<EOF
2278#define STACK_DIRECTION $ac_cv_c_stack_direction
2279EOF
2280
2281fi
2282
2283
2284echo $ac_n "checking for st_rdev in struct stat""... $ac_c" 1>&6
2285echo "configure:2286: checking for st_rdev in struct stat" >&5
2286if eval "test \"`echo '$''{'ac_cv_struct_st_rdev'+set}'`\" = set"; then
2287 echo $ac_n "(cached) $ac_c" 1>&6
2288else
2289 cat > conftest.$ac_ext <<EOF
2290#line 2291 "configure"
2291#include "confdefs.h"
2292#include <sys/types.h>
2293#include <sys/stat.h>
2294int main() {
2295struct stat s; s.st_rdev;
2296; return 0; }
2297EOF
2298if { (eval echo configure:2299: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2299 rm -rf conftest*
2300 ac_cv_struct_st_rdev=yes
2301else
2302 echo "configure: failed program was:" >&5
2303 cat conftest.$ac_ext >&5
2304 rm -rf conftest*
2305 ac_cv_struct_st_rdev=no
2306fi
2307rm -f conftest*
2308fi
2309
2310echo "$ac_t""$ac_cv_struct_st_rdev" 1>&6
2311if test $ac_cv_struct_st_rdev = yes; then
2312 cat >> confdefs.h <<\EOF
2313#define HAVE_ST_RDEV 1
2314EOF
2315
2316fi
2317
2318echo $ac_n "checking for st_blksize in struct stat""... $ac_c" 1>&6
2319echo "configure:2320: checking for st_blksize in struct stat" >&5
2320if eval "test \"`echo '$''{'ac_cv_struct_st_blksize'+set}'`\" = set"; then
2321 echo $ac_n "(cached) $ac_c" 1>&6
2322else
2323 cat > conftest.$ac_ext <<EOF
2324#line 2325 "configure"
2325#include "confdefs.h"
2326#include <sys/types.h>
2327#include <sys/stat.h>
2328int main() {
2329struct stat s; s.st_blksize;
2330; return 0; }
2331EOF
2332if { (eval echo configure:2333: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2333 rm -rf conftest*
2334 ac_cv_struct_st_blksize=yes
2335else
2336 echo "configure: failed program was:" >&5
2337 cat conftest.$ac_ext >&5
2338 rm -rf conftest*
2339 ac_cv_struct_st_blksize=no
2340fi
2341rm -f conftest*
2342fi
2343
2344echo "$ac_t""$ac_cv_struct_st_blksize" 1>&6
2345if test $ac_cv_struct_st_blksize = yes; then
2346 cat >> confdefs.h <<\EOF
2347#define HAVE_ST_BLKSIZE 1
2348EOF
2349
2350fi
2351
2352echo $ac_n "checking for st_blocks in struct stat""... $ac_c" 1>&6
2353echo "configure:2354: checking for st_blocks in struct stat" >&5
2354if eval "test \"`echo '$''{'ac_cv_struct_st_blocks'+set}'`\" = set"; then
2355 echo $ac_n "(cached) $ac_c" 1>&6
2356else
2357 cat > conftest.$ac_ext <<EOF
2358#line 2359 "configure"
2359#include "confdefs.h"
2360#include <sys/types.h>
2361#include <sys/stat.h>
2362int main() {
2363struct stat s; s.st_blocks;
2364; return 0; }
2365EOF
2366if { (eval echo configure:2367: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2367 rm -rf conftest*
2368 ac_cv_struct_st_blocks=yes
2369else
2370 echo "configure: failed program was:" >&5
2371 cat conftest.$ac_ext >&5
2372 rm -rf conftest*
2373 ac_cv_struct_st_blocks=no
2374fi
2375rm -f conftest*
2376fi
2377
2378echo "$ac_t""$ac_cv_struct_st_blocks" 1>&6
2379if test $ac_cv_struct_st_blocks = yes; then
2380 cat >> confdefs.h <<\EOF
2381#define HAVE_ST_BLOCKS 1
2382EOF
2383
2384else
2385 LIBOBJS="$LIBOBJS fileblocks.o"
2386fi
2387
2388echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
2389echo "configure:2390: checking whether struct tm is in sys/time.h or time.h" >&5
2390if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
2391 echo $ac_n "(cached) $ac_c" 1>&6
2392else
2393 cat > conftest.$ac_ext <<EOF
2394#line 2395 "configure"
2395#include "confdefs.h"
2396#include <sys/types.h>
2397#include <time.h>
2398int main() {
2399struct tm *tp; tp->tm_sec;
2400; return 0; }
2401EOF
2402if { (eval echo configure:2403: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2403 rm -rf conftest*
2404 ac_cv_struct_tm=time.h
2405else
2406 echo "configure: failed program was:" >&5
2407 cat conftest.$ac_ext >&5
2408 rm -rf conftest*
2409 ac_cv_struct_tm=sys/time.h
2410fi
2411rm -f conftest*
2412fi
2413
2414echo "$ac_t""$ac_cv_struct_tm" 1>&6
2415if test $ac_cv_struct_tm = sys/time.h; then
2416 cat >> confdefs.h <<\EOF
2417#define TM_IN_SYS_TIME 1
2418EOF
2419
2420fi
2421
2422echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6
2423echo "configure:2424: checking for tm_zone in struct tm" >&5
2424if eval "test \"`echo '$''{'ac_cv_struct_tm_zone'+set}'`\" = set"; then
2425 echo $ac_n "(cached) $ac_c" 1>&6
2426else
2427 cat > conftest.$ac_ext <<EOF
2428#line 2429 "configure"
2429#include "confdefs.h"
2430#include <sys/types.h>
2431#include <$ac_cv_struct_tm>
2432int main() {
2433struct tm tm; tm.tm_zone;
2434; return 0; }
2435EOF
2436if { (eval echo configure:2437: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2437 rm -rf conftest*
2438 ac_cv_struct_tm_zone=yes
2439else
2440 echo "configure: failed program was:" >&5
2441 cat conftest.$ac_ext >&5
2442 rm -rf conftest*
2443 ac_cv_struct_tm_zone=no
2444fi
2445rm -f conftest*
2446fi
2447
2448echo "$ac_t""$ac_cv_struct_tm_zone" 1>&6
2449if test "$ac_cv_struct_tm_zone" = yes; then
2450 cat >> confdefs.h <<\EOF
2451#define HAVE_TM_ZONE 1
2452EOF
2453
2454else
2455 echo $ac_n "checking for tzname""... $ac_c" 1>&6
2456echo "configure:2457: checking for tzname" >&5
2457if eval "test \"`echo '$''{'ac_cv_var_tzname'+set}'`\" = set"; then
2458 echo $ac_n "(cached) $ac_c" 1>&6
2459else
2460 cat > conftest.$ac_ext <<EOF
2461#line 2462 "configure"
2462#include "confdefs.h"
2463#include <time.h>
2464#ifndef tzname /* For SGI. */
2465extern char *tzname[]; /* RS6000 and others reject char **tzname. */
2466#endif
2467int main() {
2468atoi(*tzname);
2469; return 0; }
2470EOF
2471if { (eval echo configure:2472: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2472 rm -rf conftest*
2473 ac_cv_var_tzname=yes
2474else
2475 echo "configure: failed program was:" >&5
2476 cat conftest.$ac_ext >&5
2477 rm -rf conftest*
2478 ac_cv_var_tzname=no
2479fi
2480rm -f conftest*
2481fi
2482
2483echo "$ac_t""$ac_cv_var_tzname" 1>&6
2484 if test $ac_cv_var_tzname = yes; then
2485 cat >> confdefs.h <<\EOF
2486#define HAVE_TZNAME 1
2487EOF
2488
2489 fi
2490fi
2491
2492
2493 echo $ac_n "checking whether we need POSIX to get struct utimbuf""... $ac_c" 1>&6
2494echo "configure:2495: checking whether we need POSIX to get struct utimbuf" >&5
2495if eval "test \"`echo '$''{'guile_cv_struct_utimbuf_needs_posix'+set}'`\" = set"; then
2496 echo $ac_n "(cached) $ac_c" 1>&6
2497else
2498 cat > conftest.$ac_ext <<EOF
2499#line 2500 "configure"
2500#include "confdefs.h"
2501
2502#ifdef __EMX__
2503#include <sys/utime.h>
2504#else
2505#include <utime.h>
2506#endif
2507struct utime blah;
2508
2509EOF
2510ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2511{ (eval echo configure:2512: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2512ac_err=`grep -v '^ *+' conftest.out`
2513if test -z "$ac_err"; then
2514 rm -rf conftest*
2515 guile_cv_struct_utimbuf_needs_posix=no
2516else
2517 echo "$ac_err" >&5
2518 echo "configure: failed program was:" >&5
2519 cat conftest.$ac_ext >&5
2520 rm -rf conftest*
2521 guile_cv_struct_utimbuf_needs_posix=yes
2522fi
2523rm -f conftest*
2524fi
2525
2526echo "$ac_t""$guile_cv_struct_utimbuf_needs_posix" 1>&6
2527 if test "$guile_cv_struct_utimbuf_needs_posix" = yes; then
2528 cat >> confdefs.h <<\EOF
2529#define UTIMBUF_NEEDS_POSIX 1
2530EOF
2531
2532 fi
2533
2534# Checks for dynamic linking
2535
2536xtra_PLUGIN_guile_libs=""
2537
2538
2539echo $ac_n "checking for main in -lm""... $ac_c" 1>&6
2540echo "configure:2541: checking for main in -lm" >&5
2541ac_lib_var=`echo m'_'main | sed 'y%./+-%__p_%'`
2542if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2543 echo $ac_n "(cached) $ac_c" 1>&6
2544else
2545 ac_save_LIBS="$LIBS"
2546LIBS="-lm $LIBS"
2547cat > conftest.$ac_ext <<EOF
2548#line 2549 "configure"
2549#include "confdefs.h"
2550
2551int main() {
2552main()
2553; return 0; }
2554EOF
2555if { (eval echo configure:2556: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2556 rm -rf conftest*
2557 eval "ac_cv_lib_$ac_lib_var=yes"
2558else
2559 echo "configure: failed program was:" >&5
2560 cat conftest.$ac_ext >&5
2561 rm -rf conftest*
2562 eval "ac_cv_lib_$ac_lib_var=no"
2563fi
2564rm -f conftest*
2565LIBS="$ac_save_LIBS"
2566
2567fi
2568if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2569 echo "$ac_t""yes" 1>&6
2570 ac_tr_lib=HAVE_LIB`echo m | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2571 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2572 cat >> confdefs.h <<EOF
2573#define $ac_tr_lib 1
2574EOF
2575
2576 LIBS="-lm $LIBS"
2577
2578else
2579 echo "$ac_t""no" 1>&6
2580fi
2581
2582echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
2583echo "configure:2584: checking for main in -lsocket" >&5
2584ac_lib_var=`echo socket'_'main | sed 'y%./+-%__p_%'`
2585if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2586 echo $ac_n "(cached) $ac_c" 1>&6
2587else
2588 ac_save_LIBS="$LIBS"
2589LIBS="-lsocket $LIBS"
2590cat > conftest.$ac_ext <<EOF
2591#line 2592 "configure"
2592#include "confdefs.h"
2593
2594int main() {
2595main()
2596; return 0; }
2597EOF
2598if { (eval echo configure:2599: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2599 rm -rf conftest*
2600 eval "ac_cv_lib_$ac_lib_var=yes"
2601else
2602 echo "configure: failed program was:" >&5
2603 cat conftest.$ac_ext >&5
2604 rm -rf conftest*
2605 eval "ac_cv_lib_$ac_lib_var=no"
2606fi
2607rm -f conftest*
2608LIBS="$ac_save_LIBS"
2609
2610fi
2611if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2612 echo "$ac_t""yes" 1>&6
2613 ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2614 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2615 cat >> confdefs.h <<EOF
2616#define $ac_tr_lib 1
2617EOF
2618
2619 LIBS="-lsocket $LIBS"
2620
2621else
2622 echo "$ac_t""no" 1>&6
2623fi
2624
2625echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
2626echo "configure:2627: checking for main in -lnsl" >&5
2627ac_lib_var=`echo nsl'_'main | sed 'y%./+-%__p_%'`
2628if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2629 echo $ac_n "(cached) $ac_c" 1>&6
2630else
2631 ac_save_LIBS="$LIBS"
2632LIBS="-lnsl $LIBS"
2633cat > conftest.$ac_ext <<EOF
2634#line 2635 "configure"
2635#include "confdefs.h"
2636
2637int main() {
2638main()
2639; return 0; }
2640EOF
2641if { (eval echo configure:2642: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2642 rm -rf conftest*
2643 eval "ac_cv_lib_$ac_lib_var=yes"
2644else
2645 echo "configure: failed program was:" >&5
2646 cat conftest.$ac_ext >&5
2647 rm -rf conftest*
2648 eval "ac_cv_lib_$ac_lib_var=no"
2649fi
2650rm -f conftest*
2651LIBS="$ac_save_LIBS"
2652
2653fi
2654if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2655 echo "$ac_t""yes" 1>&6
2656 ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2657 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2658 cat >> confdefs.h <<EOF
2659#define $ac_tr_lib 1
2660EOF
2661
2662 LIBS="-lnsl $LIBS"
2663
2664else
2665 echo "$ac_t""no" 1>&6
2666fi
2667
2668
2669if test "$enable_dynamic_linking" = "yes"; then
2670
2671echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
2672echo "configure:2673: checking for dlopen in -ldl" >&5
2673ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
2674if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2675 echo $ac_n "(cached) $ac_c" 1>&6
2676else
2677 ac_save_LIBS="$LIBS"
2678LIBS="-ldl $LIBS"
2679cat > conftest.$ac_ext <<EOF
2680#line 2681 "configure"
2681#include "confdefs.h"
2682/* Override any gcc2 internal prototype to avoid an error. */
2683/* We use char because int might match the return type of a gcc2
2684 builtin and then its argument prototype would still apply. */
2685char dlopen();
2686
2687int main() {
2688dlopen()
2689; return 0; }
2690EOF
2691if { (eval echo configure:2692: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2692 rm -rf conftest*
2693 eval "ac_cv_lib_$ac_lib_var=yes"
2694else
2695 echo "configure: failed program was:" >&5
2696 cat conftest.$ac_ext >&5
2697 rm -rf conftest*
2698 eval "ac_cv_lib_$ac_lib_var=no"
2699fi
2700rm -f conftest*
2701LIBS="$ac_save_LIBS"
2702
2703fi
2704if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2705 echo "$ac_t""yes" 1>&6
2706 ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2707 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2708 cat >> confdefs.h <<EOF
2709#define $ac_tr_lib 1
2710EOF
2711
2712 LIBS="-ldl $LIBS"
2713
2714else
2715 echo "$ac_t""no" 1>&6
2716fi
2717
2718if test "$ac_cv_lib_dl_dlopen" = "yes"; then
2719 xtra_PLUGIN_guile_libs="-lguile -ldl"
2720 cat >> confdefs.h <<\EOF
2721#define DYNAMIC_LINKING 1
2722EOF
2723
2724else
2725echo $ac_n "checking for dld_link in -ldld""... $ac_c" 1>&6
2726echo "configure:2727: checking for dld_link in -ldld" >&5
2727ac_lib_var=`echo dld'_'dld_link | sed 'y%./+-%__p_%'`
2728if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2729 echo $ac_n "(cached) $ac_c" 1>&6
2730else
2731 ac_save_LIBS="$LIBS"
2732LIBS="-ldld $LIBS"
2733cat > conftest.$ac_ext <<EOF
2734#line 2735 "configure"
2735#include "confdefs.h"
2736/* Override any gcc2 internal prototype to avoid an error. */
2737/* We use char because int might match the return type of a gcc2
2738 builtin and then its argument prototype would still apply. */
2739char dld_link();
2740
2741int main() {
2742dld_link()
2743; return 0; }
2744EOF
2745if { (eval echo configure:2746: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2746 rm -rf conftest*
2747 eval "ac_cv_lib_$ac_lib_var=yes"
2748else
2749 echo "configure: failed program was:" >&5
2750 cat conftest.$ac_ext >&5
2751 rm -rf conftest*
2752 eval "ac_cv_lib_$ac_lib_var=no"
2753fi
2754rm -f conftest*
2755LIBS="$ac_save_LIBS"
2756
2757fi
2758if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2759 echo "$ac_t""yes" 1>&6
2760 ac_tr_lib=HAVE_LIB`echo dld | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2761 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2762 cat >> confdefs.h <<EOF
2763#define $ac_tr_lib 1
2764EOF
2765
2766 LIBS="-ldld $LIBS"
2767
2768else
2769 echo "$ac_t""no" 1>&6
2770fi
2771
2772if test "$ac_cv_lib_dld_dld_link" = "yes"; then
2773 xtra_PLUGIN_guile_libs="-lguile -ldld"
2774 cat >> confdefs.h <<\EOF
2775#define DYNAMIC_LINKING 1
2776EOF
2777
2778else
2779for ac_func in shl_load
2780do
2781echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2782echo "configure:2783: checking for $ac_func" >&5
2783if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2784 echo $ac_n "(cached) $ac_c" 1>&6
2785else
2786 cat > conftest.$ac_ext <<EOF
2787#line 2788 "configure"
2788#include "confdefs.h"
2789/* System header to define __stub macros and hopefully few prototypes,
2790 which can conflict with char $ac_func(); below. */
2791#include <assert.h>
2792/* Override any gcc2 internal prototype to avoid an error. */
2793/* We use char because int might match the return type of a gcc2
2794 builtin and then its argument prototype would still apply. */
2795char $ac_func();
2796
2797int main() {
2798
2799/* The GNU C library defines this for functions which it implements
2800 to always fail with ENOSYS. Some functions are actually named
2801 something starting with __ and the normal name is an alias. */
2802#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2803choke me
2804#else
2805$ac_func();
2806#endif
2807
2808; return 0; }
2809EOF
2810if { (eval echo configure:2811: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2811 rm -rf conftest*
2812 eval "ac_cv_func_$ac_func=yes"
2813else
2814 echo "configure: failed program was:" >&5
2815 cat conftest.$ac_ext >&5
2816 rm -rf conftest*
2817 eval "ac_cv_func_$ac_func=no"
2818fi
2819rm -f conftest*
2820fi
2821
2822if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2823 echo "$ac_t""yes" 1>&6
2824 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2825 cat >> confdefs.h <<EOF
2826#define $ac_tr_func 1
2827EOF
2828
2829else
2830 echo "$ac_t""no" 1>&6
2831fi
2832done
2833
2834if test "$ac_cv_func_shl_load" = "yes"; then
2835 cat >> confdefs.h <<\EOF
2836#define DYNAMIC_LINKING 1
2837EOF
2838
2839fi
2840fi
2841fi
2842
2843fi
2844
2845#--------------------------------------------------------------------
2846#
2847# Which way does the stack grow?
2848#
2849#--------------------------------------------------------------------
2850
2851if test "$cross_compiling" = yes; then
2852 echo "configure: warning: Guessing that stack grows down -- see scmconfig.h.in" 1>&2
2853else
2854 cat > conftest.$ac_ext <<EOF
2855#line 2856 "configure"
2856#include "confdefs.h"
2857aux (l) unsigned long l;
2858 { int x; exit (l >= ((unsigned long)&x)); }
2859 main () { int q; aux((unsigned long)&q); }
2860EOF
2861if { (eval echo configure:2862: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
2862then
2863 cat >> confdefs.h <<\EOF
2864#define SCM_STACK_GROWS_UP 1
2865EOF
2866
2867else
2868 echo "configure: failed program was:" >&5
2869 cat conftest.$ac_ext >&5
2870fi
2871rm -fr conftest*
2872fi
2873
2874
2875
2876if test "$cross_compiling" = yes; then
2877 cat >> confdefs.h <<\EOF
2878#define SCM_SINGLES 1
2879EOF
2880
2881 echo "configure: warning: Guessing that sizeof(long) == sizeof(float) -- see scmconfig.h.in" 1>&2
2882else
2883 cat > conftest.$ac_ext <<EOF
2884#line 2885 "configure"
2885#include "confdefs.h"
2886main () { exit (sizeof(float) != sizeof(long)); }
2887EOF
2888if { (eval echo configure:2889: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
2889then
2890 cat >> confdefs.h <<\EOF
2891#define SCM_SINGLES 1
2892EOF
2893
2894else
2895 echo "configure: failed program was:" >&5
2896 cat conftest.$ac_ext >&5
2897fi
2898rm -fr conftest*
2899fi
2900
2901
2902echo $ac_n "checking for struct linger""... $ac_c" 1>&6
2903echo "configure:2904: checking for struct linger" >&5
2904if eval "test \"`echo '$''{'scm_cv_struct_linger'+set}'`\" = set"; then
2905 echo $ac_n "(cached) $ac_c" 1>&6
2906else
2907 cat > conftest.$ac_ext <<EOF
2908#line 2909 "configure"
2909#include "confdefs.h"
2910
2911#include <sys/types.h>
2912#include <sys/socket.h>
2913int main() {
2914struct linger lgr; lgr.l_linger = 100
2915; return 0; }
2916EOF
2917if { (eval echo configure:2918: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2918 rm -rf conftest*
2919 scm_cv_struct_linger="yes"
2920else
2921 echo "configure: failed program was:" >&5
2922 cat conftest.$ac_ext >&5
2923 rm -rf conftest*
2924 scm_cv_struct_linger="no"
2925fi
2926rm -f conftest*
2927fi
2928
2929echo "$ac_t""$scm_cv_struct_linger" 1>&6
2930if test $scm_cv_struct_linger = yes; then
2931 cat >> confdefs.h <<\EOF
2932#define HAVE_STRUCT_LINGER 1
2933EOF
2934
2935fi
2936
2937#--------------------------------------------------------------------
2938#
2939# How can you violate a stdio abstraction by setting a stream's fd?
2940#
2941#--------------------------------------------------------------------
2942
2943echo $ac_n "checking how to set a stream file descriptor""... $ac_c" 1>&6
2944echo "configure:2945: checking how to set a stream file descriptor" >&5
2945if eval "test \"`echo '$''{'scm_cv_fd_setter'+set}'`\" = set"; then
2946 echo $ac_n "(cached) $ac_c" 1>&6
2947else
2948 cat > conftest.$ac_ext <<EOF
2949#line 2950 "configure"
2950#include "confdefs.h"
2951#include <stdio.h>
2952int main() {
2953stdout->_file = 1
2954; return 0; }
2955EOF
2956if { (eval echo configure:2957: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2957 rm -rf conftest*
2958 scm_cv_fd_setter="_file"
2959else
2960 echo "configure: failed program was:" >&5
2961 cat conftest.$ac_ext >&5
2962 rm -rf conftest*
2963 cat > conftest.$ac_ext <<EOF
2964#line 2965 "configure"
2965#include "confdefs.h"
2966#include <stdio.h>
2967int main() {
2968stdout->_fileno = 1
2969; return 0; }
2970EOF
2971if { (eval echo configure:2972: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2972 rm -rf conftest*
2973 scm_cv_fd_setter="_fileno"
2974else
2975 echo "configure: failed program was:" >&5
2976 cat conftest.$ac_ext >&5
2977 rm -rf conftest*
2978 scm_cv_fd_setter=""
2979fi
2980rm -f conftest*
2981fi
2982rm -f conftest*
2983fi
2984
2985
2986if test "$scm_cv_fd_setter"; then
2987 echo "$ac_t""$scm_cv_fd_setter" 1>&6
2988 cat >> confdefs.h <<EOF
2989#define FD_SETTER $scm_cv_fd_setter
2990EOF
2991
2992else
2993 echo "$ac_t""we couldn't do it!" 1>&6
2994fi
2995
2996#--------------------------------------------------------------------
2997# How to find out whether a FILE structure contains buffered data.
2998# From Tk we have the following list:
2999# _cnt: Most UNIX systems
3000# __cnt: HPUX
3001# _r: BSD
3002# readCount: Sprite
3003# Or, in GNU libc there are two fields, _gptr and _egptr, which
3004# have to be compared.
3005# These can also be known as _IO_read_ptr and _IO_read_end.
3006#--------------------------------------------------------------------
3007
3008echo $ac_n "checking how to get buffer char count from FILE structure""... $ac_c" 1>&6
3009echo "configure:3010: checking how to get buffer char count from FILE structure" >&5
3010if eval "test \"`echo '$''{'scm_cv_struct_file_count'+set}'`\" = set"; then
3011 echo $ac_n "(cached) $ac_c" 1>&6
3012else
3013 cat > conftest.$ac_ext <<EOF
3014#line 3015 "configure"
3015#include "confdefs.h"
3016#include <stdio.h>
3017int main() {
3018FILE *f = stdin; f->_cnt = 0
3019; return 0; }
3020EOF
3021if { (eval echo configure:3022: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3022 rm -rf conftest*
3023 scm_cv_struct_file_count="_cnt"
3024else
3025 echo "configure: failed program was:" >&5
3026 cat conftest.$ac_ext >&5
3027 rm -rf conftest*
3028 cat > conftest.$ac_ext <<EOF
3029#line 3030 "configure"
3030#include "confdefs.h"
3031#include <stdio.h>
3032int main() {
3033FILE *f = stdin; f->_r = 0
3034; return 0; }
3035EOF
3036if { (eval echo configure:3037: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3037 rm -rf conftest*
3038 scm_cv_struct_file_count="_r"
3039else
3040 echo "configure: failed program was:" >&5
3041 cat conftest.$ac_ext >&5
3042 rm -rf conftest*
3043 cat > conftest.$ac_ext <<EOF
3044#line 3045 "configure"
3045#include "confdefs.h"
3046#include <stdio.h>
3047int main() {
3048FILE *f = stdin; f->readCount = 0
3049; return 0; }
3050EOF
3051if { (eval echo configure:3052: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3052 rm -rf conftest*
3053 scm_cv_struct_file_count="readCount"
3054else
3055 echo "configure: failed program was:" >&5
3056 cat conftest.$ac_ext >&5
3057 rm -rf conftest*
3058 scm_cv_struct_file_count=""
3059fi
3060rm -f conftest*
3061fi
3062rm -f conftest*
3063fi
3064rm -f conftest*
3065fi
3066
3067if test "$scm_cv_struct_file_count"; then
3068 echo "$ac_t""$scm_cv_struct_file_count" 1>&6
3069 cat >> confdefs.h <<EOF
3070#define FILE_CNT_FIELD $scm_cv_struct_file_count
3071EOF
3072
3073else
3074if eval "test \"`echo '$''{'scm_cv_struct_file_gptr'+set}'`\" = set"; then
3075 echo $ac_n "(cached) $ac_c" 1>&6
3076else
3077 cat > conftest.$ac_ext <<EOF
3078#line 3079 "configure"
3079#include "confdefs.h"
3080#include <stdio.h>
3081int main() {
3082FILE *f = stdin; f->_gptr = f->egptr;
3083; return 0; }
3084EOF
3085if { (eval echo configure:3086: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3086 rm -rf conftest*
3087 scm_cv_struct_file_gptr=1
3088else
3089 echo "configure: failed program was:" >&5
3090 cat conftest.$ac_ext >&5
3091 rm -rf conftest*
3092 scm_cv_struct_file_gptr=""
3093fi
3094rm -f conftest*
3095fi
3096
3097if test "$scm_cv_struct_gptr"; then
3098 echo "$ac_t""gptr" 1>&6
3099 cat >> confdefs.h <<EOF
3100#define FILE_CNT_GPTR $scm_cv_struct_file_gptr
3101EOF
3102
3103else
3104if eval "test \"`echo '$''{'scm_cv_struct_file_readptr'+set}'`\" = set"; then
3105 echo $ac_n "(cached) $ac_c" 1>&6
3106else
3107 cat > conftest.$ac_ext <<EOF
3108#line 3109 "configure"
3109#include "confdefs.h"
3110#include <stdio.h>
3111int main() {
3112FILE *f = stdin; f->_IO_read_ptr = f->_IO_read_end;
3113; return 0; }
3114EOF
3115if { (eval echo configure:3116: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3116 rm -rf conftest*
3117 scm_cv_struct_file_readptr=1
3118else
3119 echo "configure: failed program was:" >&5
3120 cat conftest.$ac_ext >&5
3121fi
3122rm -f conftest*
3123fi
3124
3125if test "$scm_cv_struct_file_readptr"; then
3126 echo "$ac_t""read_ptr" 1>&6
3127 cat >> confdefs.h <<EOF
3128#define FILE_CNT_READPTR $scm_cv_struct_file_readptr
3129EOF
3130
3131else
3132 echo "$ac_t""we couldn't do it!" 1>&6
3133fi
3134fi
3135fi
3136
3137#--------------------------------------------------------------------
3138#
3139# Flags for thread support
3140#
3141#--------------------------------------------------------------------
3142
3143
3144echo $ac_n "checking "threads package type"""... $ac_c" 1>&6
3145echo "configure:3146: checking "threads package type"" >&5
3146if eval "test \"`echo '$''{'cy_cv_threads_package'+set}'`\" = set"; then
3147 echo $ac_n "(cached) $ac_c" 1>&6
3148else
3149
3150if eval "test \"`echo '$''{'cy_cv_threads_cflags'+set}'`\" = set"; then
3151 echo $ac_n "(cached) $ac_c" 1>&6
3152else
3153
3154if eval "test \"`echo '$''{'cy_cv_threads_libs'+set}'`\" = set"; then
3155 echo $ac_n "(cached) $ac_c" 1>&6
3156else
3157
3158use_threads=no;
3159# Check whether --with-threads or --without-threads was given.
3160if test "${with_threads+set}" = set; then
3161 withval="$with_threads"
3162 use_threads=$withval
3163else
3164 use_threads=no
3165fi
3166
3167test -n "$use_threads" || use_threads=qt
3168threads_package=unknown
3169if test "$use_threads" != no; then
3170 if test "$use_threads" = yes || test "$use_threads" = qt; then
ec06dd30
AG
3171 # Look for qt in source directory.
3172 if test -f $srcdir/qt/qt.c; then
3173 qtsrcdir="`(cd $srcdir; pwd)`/qt"
3a629497 3174 threads_package=COOP
ec06dd30 3175 cy_cv_threads_cflags="-I$qtsrcdir -I../qt"
42d5fe64 3176 cy_cv_threads_libs="../qt/libqt.a"
3a629497
JB
3177 fi
3178 else
3179 if test -f $use_threads/qt.c; then
3180 # FIXME seems as though we should try to use an installed qt here.
3181 threads_package=COOP
3182 cy_cv_threads_cflags="-I$use_threads -I../qt"
42d5fe64 3183 cy_cv_threads_libs="../qt/libqt.a"
3a629497
JB
3184 fi
3185 fi
3186 if test "$use_threads" = pthreads; then
3187 # Look for pthreads in srcdir. See above to understand why
3188 # we always set threads_package.
3189 if test -f $srcdir/../../pthreads/pthreads/queue.c \
3190 || test -f $srcdir/../pthreads/pthreads/queue.c; then
3191 threads_package=MIT
3192 cy_cv_threads_cflags="-I$srcdir/../../pthreads/include"
3193 cy_cv_threads_libs="-L../../pthreads/lib -lpthread"
3194 fi
3195 fi
3196 saved_CPP="$CPPFLAGS"
3197 saved_LD="$LDFLAGS"
3198 saved_LIBS="$LIBS"
3199 if test "$threads_package" = unknown; then
3200 CPPFLAGS="-I$use_threads/include"
3201 LDFLAGS="-L$use_threads/lib"
3202 LIBS="-lgthreads -lmalloc"
3203 cat > conftest.$ac_ext <<EOF
3204#line 3205 "configure"
3205#include "confdefs.h"
3206#include <pthread.h>
3207int main() {
3208
3209pthread_equal(NULL,NULL);
3210
3211; return 0; }
3212EOF
3213if { (eval echo configure:3214: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3214 rm -rf conftest*
3215 threads_package=FSU
3216else
3217 echo "configure: failed program was:" >&5
3218 cat conftest.$ac_ext >&5
3219fi
3220rm -f conftest*
3221 fi
3222 if test "$threads_package" = unknown; then
3223 LIBS="-lpthread"
3224 cat > conftest.$ac_ext <<EOF
3225#line 3226 "configure"
3226#include "confdefs.h"
3227#include <pthread.h>
3228int main() {
3229
3230pthread_equal(NULL,NULL);
3231
3232; return 0; }
3233EOF
3234if { (eval echo configure:3235: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3235 rm -rf conftest*
3236 threads_package=MIT
3237else
3238 echo "configure: failed program was:" >&5
3239 cat conftest.$ac_ext >&5
3240fi
3241rm -f conftest*
3242 fi
3243 if test "$threads_package" = unknown; then
3244 LIBS="-lpthreads"
3245 cat > conftest.$ac_ext <<EOF
3246#line 3247 "configure"
3247#include "confdefs.h"
3248#include <pthread.h>
3249int main() {
3250
3251pthread_equal(NULL,NULL);
3252
3253; return 0; }
3254EOF
3255if { (eval echo configure:3256: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3256 rm -rf conftest*
3257 threads_package=PCthreads
3258else
3259 echo "configure: failed program was:" >&5
3260 cat conftest.$ac_ext >&5
3261fi
3262rm -f conftest*
3263 fi
3264 cy_cv_threads_cflags="$CPPFLAGS $cy_cv_threads_cflags"
3265 cy_cv_threads_libs="$LDFLAGS $LIBS $cy_cv_threads_libs"
3266 cy_cv_threads_package=$threads_package
3267 CPPFLAGS="$saved_CPP"
3268 LDFLAGS="$saved_LD"
3269 LIBS="$saved_LIBS"
3270 if test "$threads_package" = unknown; then
3271 { echo "configure: error: "cannot find thread library installation"" 1>&2; exit 1; }
3272 fi
3273fi
3274
3275fi
3276
3277
3278fi
3279
3280
3281fi
3282
3283echo "$ac_t""$cy_cv_threads_package" 1>&6
3284
3285CFLAGS="$CFLAGS $cy_cv_threads_cflags"
3286THREAD_LIBS="$cy_cv_threads_libs"
3287
3288
3289if test "$cy_cv_threads_package" = FSU; then
3290 cat >> confdefs.h <<\EOF
3291#define USE_FSU_PTHREADS 1
3292EOF
3293
3294 else if test "$cy_cv_threads_package" = COOP; then
3295 cat >> confdefs.h <<\EOF
3296#define USE_COOP_THREADS 1
3297EOF
3298
3299 else if test "$cy_cv_threads_package" = MIT; then
3300 cat >> confdefs.h <<\EOF
3301#define USE_MIT_PTHREADS 1
3302EOF
3303
3304 else if test "$cy_cv_threads_package" = PCthreads; then
3305 cat >> confdefs.h <<\EOF
3306#define USE_PCTHREADS_PTHREADS 1
3307EOF
3308
3309 else if test "$cy_cv_threads_package" = unknown; then
3310 { echo "configure: error: "cannot find threads installation"" 1>&2; exit 1; }
3311 fi
3312 fi
3313 fi
3314 fi
3315fi
3316
3317if test "$cy_cv_threads_package" != ""; then
3318 cat >> confdefs.h <<\EOF
3319#define USE_THREADS 1
3320EOF
3321
3322 LIBOBJS="$LIBOBJS threads.o"
3323fi
3324
3325## If we're using GCC, ask for aggressive warnings.
3326case "$GCC" in
3327 yes ) CFLAGS="$CFLAGS -Wall -Wpointer-arith" ;;
3328esac
3329
3330for ac_prog in mawk gawk nawk awk
3331do
3332# Extract the first word of "$ac_prog", so it can be a program name with args.
3333set dummy $ac_prog; ac_word=$2
3334echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3335echo "configure:3336: checking for $ac_word" >&5
3336if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
3337 echo $ac_n "(cached) $ac_c" 1>&6
3338else
3339 if test -n "$AWK"; then
3340 ac_cv_prog_AWK="$AWK" # Let the user override the test.
3341else
3342 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
3343 for ac_dir in $PATH; do
3344 test -z "$ac_dir" && ac_dir=.
3345 if test -f $ac_dir/$ac_word; then
3346 ac_cv_prog_AWK="$ac_prog"
3347 break
3348 fi
3349 done
3350 IFS="$ac_save_ifs"
3351fi
3352fi
3353AWK="$ac_cv_prog_AWK"
3354if test -n "$AWK"; then
3355 echo "$ac_t""$AWK" 1>&6
3356else
3357 echo "$ac_t""no" 1>&6
3358fi
3359
3360test -n "$AWK" && break
3361done
3362
3363
3364## If we're creating a shared library (using libtool!), then we'll
3365## need to generate a list of .lo files corresponding to the .o files
3366## given in LIBOBJS. We'll call it LIBLOBJS.
3367LIBLOBJS="`echo ${LIBOBJS} | sed 's/\.o/.lo/g'`"
3368
3369cat >> confdefs.h <<EOF
3370#define GUILE_MAJOR_VERSION "$GUILE_MAJOR_VERSION"
3371EOF
3372
3373cat >> confdefs.h <<EOF
3374#define GUILE_MINOR_VERSION "$GUILE_MINOR_VERSION"
3375EOF
3376
3377cat >> confdefs.h <<EOF
3378#define GUILE_VERSION "$GUILE_VERSION"
3379EOF
3380
3381
3382
3383
3384
3385
3386
3387threads_enabled=false
3388if test "$cy_cv_threads_package" = COOP; then
3389 threads_enabled=true
3390fi
3391
3392# Determine the host we are working on
3393
3394# Make sure we can run config.sub.
3395if $ac_config_sub sun4 >/dev/null 2>&1; then :
3396else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
3397fi
3398
3399echo $ac_n "checking host system type""... $ac_c" 1>&6
3400echo "configure:3401: checking host system type" >&5
3401
3402host_alias=$host
3403case "$host_alias" in
3404NONE)
3405 case $nonopt in
3406 NONE)
3407 if host_alias=`$ac_config_guess`; then :
3408 else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
3409 fi ;;
3410 *) host_alias=$nonopt ;;
3411 esac ;;
3412esac
3413
3414host=`$ac_config_sub $host_alias`
3415host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
3416host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
3417host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
3418echo "$ac_t""$host" 1>&6
3419
3420
77c7a433
JB
3421# How can we refer to the qt source directory from within the qt build
3422# directory? For headers, we can rely on the fact that the qt src
3423# directory appears in the #include path.
3424
3425qtsrcdir="`(cd $srcdir; pwd)`/qt"
3426
3a629497
JB
3427case "$host" in
3428i[3456]86-*-*)
77c7a433
JB
3429 qtmds_s=$qtsrcdir/md/i386.s
3430 qtmd_h=md/i386.h
3431 qtmdc_c=$qtsrcdir/md/null.c
3a629497
JB
3432 ;;
3433mips-sgi-irix5*)
77c7a433
JB
3434 qtmds_s=$qtsrcdir/md/mips-irix5.s
3435 qtmd_h=md/mips.h
3436 qtmdc_c=$qtsrcdir/md/null.c
3437 qtdmdb_s=$qtsrcdir/md/mips_b.s
3a629497
JB
3438 ;;
3439mips-*-*)
77c7a433
JB
3440 qtmds_s=$qtsrcdir/md/mips.s
3441 qtmd_h=md/mips.h
3442 qtmdc_c=$qtsrcdir/md/null.c
3443 qtdmdb_s=$qtsrcdir/md/mips_b.s
3a629497 3444 ;;
2a18e748 3445sparc-*-sunos*)
77c7a433
JB
3446 qtmd_h=md/sparc.h
3447 qtmdc_c=$qtsrcdir/md/null.c
2a18e748
JB
3448 qtmds_s=$qtsrcdir/md/_sparc.s
3449 qtdmdb_s=$qtsrcdir/md/_sparc_b.s
3a629497
JB
3450 ;;
3451sparc-*-*)
77c7a433
JB
3452 qtmd_h=md/sparc.h
3453 qtmdc_c=$qtsrcdir/md/null.c
2a18e748
JB
3454 qtmds_s=$qtsrcdir/md/sparc.s
3455 qtdmdb_s=$qtsrcdir/md/sparc_b.s
3a629497
JB
3456 ;;
3457*)
3458 echo "Unknown configuration; threads package disabled"
3459 threads_enabled=false
3460 ;;
3461esac
3462
3463
3464
3465if $threads_enabled; then
3466 target_libs=libqt.a
3467else
3468 target_libs=
3469fi
3470
3471# Give the Makefile the names of the object files that will be
3472# generated by compiling $qtmdc_c and $qtmds_s.
3473qtmdc_o="`echo ${qtmdc_c} | sed -e 's:^.*/::' | sed -e 's:\.c$:\.o:'`"
3474qtmds_o="`echo ${qtmds_s} | sed -e 's:^.*/::' | sed -e 's:\.s$:\.o:'`"
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484trap '' 1 2 15
3485cat > confcache <<\EOF
3486# This file is a shell script that caches the results of configure
3487# tests run on this system so they can be shared between configure
3488# scripts and configure runs. It is not useful on other systems.
3489# If it contains results you don't want to keep, you may remove or edit it.
3490#
3491# By default, configure uses ./config.cache as the cache file,
3492# creating it if it does not exist already. You can give configure
3493# the --cache-file=FILE option to use a different cache file; that is
3494# what configure does when it calls configure scripts in
3495# subdirectories, so they share the cache.
3496# Giving --cache-file=/dev/null disables caching, for debugging configure.
3497# config.status only pays attention to the cache file if you give it the
3498# --recheck option to rerun configure.
3499#
3500EOF
3501# The following way of writing the cache mishandles newlines in values,
3502# but we know of no workaround that is simple, portable, and efficient.
3503# So, don't put newlines in cache variables' values.
3504# Ultrix sh set writes to stderr and can't be redirected directly,
3505# and sets the high bit in the cache file unless we assign to the vars.
3506(set) 2>&1 |
3507 case `(ac_space=' '; set) 2>&1` in
3508 *ac_space=\ *)
3509 # `set' does not quote correctly, so add quotes (double-quote substitution
3510 # turns \\\\ into \\, and sed turns \\ into \).
3511 sed -n \
3512 -e "s/'/'\\\\''/g" \
3513 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
3514 ;;
3515 *)
3516 # `set' quotes correctly as required by POSIX, so do not add quotes.
3517 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
3518 ;;
3519 esac >> confcache
3520if cmp -s $cache_file confcache; then
3521 :
3522else
3523 if test -w $cache_file; then
3524 echo "updating cache $cache_file"
3525 cat confcache > $cache_file
3526 else
3527 echo "not updating unwritable cache $cache_file"
3528 fi
3529fi
3530rm -f confcache
3531
3532trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
3533
3534test "x$prefix" = xNONE && prefix=$ac_default_prefix
3535# Let make expand exec_prefix.
3536test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
3537
3538# Any assignment to VPATH causes Sun make to only execute
3539# the first set of double-colon rules, so remove it if not needed.
3540# If there is a colon in the path, we need to keep it.
3541if test "x$srcdir" = x.; then
3542 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
3543fi
3544
3545trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
3546
3547DEFS=-DHAVE_CONFIG_H
3548
3549# Without the "./", some shells look in PATH for config.status.
3550: ${CONFIG_STATUS=./config.status}
3551
3552echo creating $CONFIG_STATUS
3553rm -f $CONFIG_STATUS
3554cat > $CONFIG_STATUS <<EOF
3555#! /bin/sh
3556# Generated automatically by configure.
3557# Run this file to recreate the current configuration.
3558# This directory was configured as follows,
3559# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
3560#
3561# $0 $ac_configure_args
3562#
3563# Compiler output produced by configure, useful for debugging
3564# configure, is in ./config.log if it exists.
3565
3566ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
3567for ac_option
3568do
3569 case "\$ac_option" in
3570 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
3571 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
3572 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
3573 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
3574 echo "$CONFIG_STATUS generated by autoconf version 2.12"
3575 exit 0 ;;
3576 -help | --help | --hel | --he | --h)
3577 echo "\$ac_cs_usage"; exit 0 ;;
3578 *) echo "\$ac_cs_usage"; exit 1 ;;
3579 esac
3580done
3581
3582ac_given_srcdir=$srcdir
3583ac_given_INSTALL="$INSTALL"
3584
3585trap 'rm -fr `echo "Makefile libguile/Makefile libguile/guile-snarf ice-9/Makefile qt/Makefile qt/qt.h qt/md/Makefile qt/time/Makefile libguile/scmconfig.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
3586EOF
3587cat >> $CONFIG_STATUS <<EOF
3588
3589# Protect against being on the right side of a sed subst in config.status.
3590sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
3591 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
3592$ac_vpsub
3593$extrasub
3594s%@CFLAGS@%$CFLAGS%g
3595s%@CPPFLAGS@%$CPPFLAGS%g
3596s%@CXXFLAGS@%$CXXFLAGS%g
3597s%@DEFS@%$DEFS%g
3598s%@LDFLAGS@%$LDFLAGS%g
3599s%@LIBS@%$LIBS%g
3600s%@exec_prefix@%$exec_prefix%g
3601s%@prefix@%$prefix%g
3602s%@program_transform_name@%$program_transform_name%g
3603s%@bindir@%$bindir%g
3604s%@sbindir@%$sbindir%g
3605s%@libexecdir@%$libexecdir%g
3606s%@datadir@%$datadir%g
3607s%@sysconfdir@%$sysconfdir%g
3608s%@sharedstatedir@%$sharedstatedir%g
3609s%@localstatedir@%$localstatedir%g
3610s%@libdir@%$libdir%g
3611s%@includedir@%$includedir%g
3612s%@oldincludedir@%$oldincludedir%g
3613s%@infodir@%$infodir%g
3614s%@mandir@%$mandir%g
3615s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
3616s%@INSTALL_DATA@%$INSTALL_DATA%g
3617s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
3618s%@PACKAGE@%$PACKAGE%g
3619s%@VERSION@%$VERSION%g
3620s%@ACLOCAL@%$ACLOCAL%g
3621s%@AUTOCONF@%$AUTOCONF%g
3622s%@AUTOMAKE@%$AUTOMAKE%g
3623s%@AUTOHEADER@%$AUTOHEADER%g
3624s%@MAKEINFO@%$MAKEINFO%g
3625s%@SET_MAKE@%$SET_MAKE%g
3626s%@MAINT@%$MAINT%g
3627s%@CC@%$CC%g
3628s%@CPP@%$CPP%g
3629s%@host@%$host%g
3630s%@host_alias@%$host_alias%g
3631s%@host_cpu@%$host_cpu%g
3632s%@host_vendor@%$host_vendor%g
3633s%@host_os@%$host_os%g
3634s%@RANLIB@%$RANLIB%g
3635s%@LIBTOOL@%$LIBTOOL%g
3636s%@LIBOBJS@%$LIBOBJS%g
3637s%@ALLOCA@%$ALLOCA%g
3638s%@xtra_PLUGIN_guile_libs@%$xtra_PLUGIN_guile_libs%g
3639s%@THREAD_LIBS@%$THREAD_LIBS%g
3640s%@AWK@%$AWK%g
3641s%@LIBLOBJS@%$LIBLOBJS%g
3642s%@target_libs@%$target_libs%g
3643s%@qtmd_h@%$qtmd_h%g
3644s%@qtmdc_c@%$qtmdc_c%g
3645s%@qtmdc_o@%$qtmdc_o%g
3646s%@qtmds_s@%$qtmds_s%g
3647s%@qtmds_o@%$qtmds_o%g
3648s%@qtmdb_s@%$qtmdb_s%g
3649
3650CEOF
3651EOF
3652
3653cat >> $CONFIG_STATUS <<\EOF
3654
3655# Split the substitutions into bite-sized pieces for seds with
3656# small command number limits, like on Digital OSF/1 and HP-UX.
3657ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
3658ac_file=1 # Number of current file.
3659ac_beg=1 # First line for current file.
3660ac_end=$ac_max_sed_cmds # Line after last line for current file.
3661ac_more_lines=:
3662ac_sed_cmds=""
3663while $ac_more_lines; do
3664 if test $ac_beg -gt 1; then
3665 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
3666 else
3667 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
3668 fi
3669 if test ! -s conftest.s$ac_file; then
3670 ac_more_lines=false
3671 rm -f conftest.s$ac_file
3672 else
3673 if test -z "$ac_sed_cmds"; then
3674 ac_sed_cmds="sed -f conftest.s$ac_file"
3675 else
3676 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
3677 fi
3678 ac_file=`expr $ac_file + 1`
3679 ac_beg=$ac_end
3680 ac_end=`expr $ac_end + $ac_max_sed_cmds`
3681 fi
3682done
3683if test -z "$ac_sed_cmds"; then
3684 ac_sed_cmds=cat
3685fi
3686EOF
3687
3688cat >> $CONFIG_STATUS <<EOF
3689
3690CONFIG_FILES=\${CONFIG_FILES-"Makefile libguile/Makefile libguile/guile-snarf ice-9/Makefile qt/Makefile qt/qt.h qt/md/Makefile qt/time/Makefile"}
3691EOF
3692cat >> $CONFIG_STATUS <<\EOF
3693for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
3694 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
3695 case "$ac_file" in
3696 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
3697 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
3698 *) ac_file_in="${ac_file}.in" ;;
3699 esac
3700
3701 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
3702
3703 # Remove last slash and all that follows it. Not all systems have dirname.
3704 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
3705 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
3706 # The file is in a subdirectory.
3707 test ! -d "$ac_dir" && mkdir "$ac_dir"
3708 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
3709 # A "../" for each directory in $ac_dir_suffix.
3710 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
3711 else
3712 ac_dir_suffix= ac_dots=
3713 fi
3714
3715 case "$ac_given_srcdir" in
3716 .) srcdir=.
3717 if test -z "$ac_dots"; then top_srcdir=.
3718 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
0f2d19dd
JB
3719 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
3720 *) # Relative path.
3721 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
3722 top_srcdir="$ac_dots$ac_given_srcdir" ;;
3723 esac
3724
733943b9
TT
3725 case "$ac_given_INSTALL" in
3726 [/$]*) INSTALL="$ac_given_INSTALL" ;;
3727 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
3728 esac
3729
0f2d19dd
JB
3730 echo creating "$ac_file"
3731 rm -f "$ac_file"
3732 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
3733 case "$ac_file" in
3734 *Makefile*) ac_comsub="1i\\
3735# $configure_input" ;;
3736 *) ac_comsub= ;;
3737 esac
733943b9
TT
3738
3739 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
0f2d19dd
JB
3740 sed -e "$ac_comsub
3741s%@configure_input@%$configure_input%g
3742s%@srcdir@%$srcdir%g
3743s%@top_srcdir@%$top_srcdir%g
733943b9
TT
3744s%@INSTALL@%$INSTALL%g
3745" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
0f2d19dd 3746fi; done
733943b9 3747rm -f conftest.s*
0f2d19dd 3748
3a629497
JB
3749# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
3750# NAME is the cpp macro being defined and VALUE is the value it is being given.
3751#
3752# ac_d sets the value in "#define NAME VALUE" lines.
3753ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
3754ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
3755ac_dC='\3'
3756ac_dD='%g'
3757# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
3758ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
3759ac_uB='\([ ]\)%\1#\2define\3'
3760ac_uC=' '
3761ac_uD='\4%g'
3762# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
3763ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
3764ac_eB='$%\1#\2define\3'
3765ac_eC=' '
3766ac_eD='%g'
3767
3768if test "${CONFIG_HEADERS+set}" != set; then
733943b9
TT
3769EOF
3770cat >> $CONFIG_STATUS <<EOF
3a629497 3771 CONFIG_HEADERS="libguile/scmconfig.h"
733943b9
TT
3772EOF
3773cat >> $CONFIG_STATUS <<\EOF
3a629497
JB
3774fi
3775for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
3776 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
3777 case "$ac_file" in
3778 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
3779 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
3780 *) ac_file_in="${ac_file}.in" ;;
3781 esac
0f2d19dd 3782
3a629497 3783 echo creating $ac_file
0f2d19dd 3784
3a629497
JB
3785 rm -f conftest.frag conftest.in conftest.out
3786 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
3787 cat $ac_file_inputs > conftest.in
0f2d19dd 3788
3a629497 3789EOF
0f2d19dd 3790
3a629497
JB
3791# Transform confdefs.h into a sed script conftest.vals that substitutes
3792# the proper values into config.h.in to produce config.h. And first:
3793# Protect against being on the right side of a sed subst in config.status.
3794# Protect against being in an unquoted here document in config.status.
3795rm -f conftest.vals
3796cat > conftest.hdr <<\EOF
3797s/[\\&%]/\\&/g
3798s%[\\$`]%\\&%g
3799s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
3800s%ac_d%ac_u%gp
3801s%ac_u%ac_e%gp
3802EOF
3803sed -n -f conftest.hdr confdefs.h > conftest.vals
3804rm -f conftest.hdr
3805
3806# This sed command replaces #undef with comments. This is necessary, for
3807# example, in the case of _POSIX_SOURCE, which is predefined and required
3808# on some systems where configure will not decide to define it.
3809cat >> conftest.vals <<\EOF
3810s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
3811EOF
0f2d19dd 3812
3a629497
JB
3813# Break up conftest.vals because some shells have a limit on
3814# the size of here documents, and old seds have small limits too.
733943b9 3815
3a629497
JB
3816rm -f conftest.tail
3817while :
3818do
3819 ac_lines=`grep -c . conftest.vals`
3820 # grep -c gives empty output for an empty file on some AIX systems.
3821 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
3822 # Write a limited-size here document to conftest.frag.
3823 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
3824 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
3825 echo 'CEOF
3826 sed -f conftest.frag conftest.in > conftest.out
3827 rm -f conftest.in
3828 mv conftest.out conftest.in
3829' >> $CONFIG_STATUS
3830 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
3831 rm -f conftest.vals
3832 mv conftest.tail conftest.vals
3833done
3834rm -f conftest.vals
0f2d19dd 3835
3a629497
JB
3836cat >> $CONFIG_STATUS <<\EOF
3837 rm -f conftest.frag conftest.h
3838 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
3839 cat conftest.in >> conftest.h
3840 rm -f conftest.in
3841 if cmp -s $ac_file conftest.h 2>/dev/null; then
3842 echo "$ac_file is unchanged"
3843 rm -f conftest.h
3844 else
3845 # Remove last slash and all that follows it. Not all systems have dirname.
3846 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
3847 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
3848 # The file is in a subdirectory.
3849 test ! -d "$ac_dir" && mkdir "$ac_dir"
0f2d19dd 3850 fi
3a629497
JB
3851 rm -f $ac_file
3852 mv conftest.h $ac_file
3853 fi
3854fi; done
0f2d19dd 3855
3a629497
JB
3856EOF
3857cat >> $CONFIG_STATUS <<EOF
0f2d19dd 3858
0f2d19dd 3859
3a629497
JB
3860EOF
3861cat >> $CONFIG_STATUS <<\EOF
3862test -z "$CONFIG_HEADERS" || echo timestamp > libguile/stamp-h
3863chmod +x libguile/guile-snarf
3864exit 0
3865EOF
3866chmod +x $CONFIG_STATUS
3867rm -fr confdefs* $ac_clean_files
3868test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
3869
0f2d19dd 3870