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