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