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