*** empty log message ***
[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
abb2a7d0 1011echo "configure:1012: checking for AIX" >&5
0f2d19dd 1012cat > conftest.$ac_ext <<EOF
abb2a7d0 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
abb2a7d0 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
abb2a7d0 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
abb2a7d0 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"
abb2a7d0 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
abb2a7d0 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
abb2a7d0 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
abb2a7d0 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
abb2a7d0 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
abb2a7d0 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
abb2a7d0 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
abb2a7d0 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
abb2a7d0 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
abb2a7d0 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
abb2a7d0 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
abb2a7d0 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
abb2a7d0 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"
abb2a7d0 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
abb2a7d0 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
abb2a7d0 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
abb2a7d0 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
abb2a7d0 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
abb2a7d0 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
abb2a7d0 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
abb2a7d0 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
abb2a7d0 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
abb2a7d0 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
abb2a7d0 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
abb2a7d0 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
abb2a7d0 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
abb2a7d0 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
abb2a7d0 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
abb2a7d0 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
abb2a7d0 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
abb2a7d0 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
abb2a7d0 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
abb2a7d0 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
abb2a7d0 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
abb2a7d0 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"
abb2a7d0 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
abb2a7d0 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
abb2a7d0 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"
abb2a7d0 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
abb2a7d0 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
abb2a7d0 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
abb2a7d0 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
abb2a7d0 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
abb2a7d0 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
abb2a7d0 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
abb2a7d0 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
abb2a7d0 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
abb2a7d0 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
abb2a7d0 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
abb2a7d0 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
abb2a7d0 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
abb2a7d0 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
abb2a7d0 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
abb2a7d0 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
abb2a7d0 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
abb2a7d0 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
abb2a7d0 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
abb2a7d0 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
abb2a7d0 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
abb2a7d0 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
abb2a7d0 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
abb2a7d0 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
abb2a7d0 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
abb2a7d0 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
abb2a7d0 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
abb2a7d0 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
abb2a7d0 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
abb2a7d0 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
abb2a7d0 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
abb2a7d0 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"
abb2a7d0 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
MV
2199# Checks for dynamic linking
2200echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
2201echo "configure:2202: checking for dlopen in -ldl" >&5
2202ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
2203if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2204 echo $ac_n "(cached) $ac_c" 1>&6
2205else
2206 ac_save_LIBS="$LIBS"
2207LIBS="-ldl $LIBS"
2208cat > conftest.$ac_ext <<EOF
2209#line 2210 "configure"
2210#include "confdefs.h"
2211/* Override any gcc2 internal prototype to avoid an error. */
2212/* We use char because int might match the return type of a gcc2
2213 builtin and then its argument prototype would still apply. */
2214char dlopen();
2215
2216int main() {
2217dlopen()
2218; return 0; }
2219EOF
2220if { (eval echo configure:2221: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2221 rm -rf conftest*
2222 eval "ac_cv_lib_$ac_lib_var=yes"
2223else
2224 echo "configure: failed program was:" >&5
2225 cat conftest.$ac_ext >&5
2226 rm -rf conftest*
2227 eval "ac_cv_lib_$ac_lib_var=no"
2228fi
2229rm -f conftest*
2230LIBS="$ac_save_LIBS"
2231
2232fi
2233if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2234 echo "$ac_t""yes" 1>&6
2235 ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2236 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2237 cat >> confdefs.h <<EOF
2238#define $ac_tr_lib 1
2239EOF
2240
2241 LIBS="-ldl $LIBS"
2242
2243else
2244 echo "$ac_t""no" 1>&6
2245fi
2246
2247echo $ac_n "checking for dld_link in -ldld""... $ac_c" 1>&6
2248echo "configure:2249: checking for dld_link in -ldld" >&5
2249ac_lib_var=`echo dld'_'dld_link | sed 'y%./+-%__p_%'`
2250if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2251 echo $ac_n "(cached) $ac_c" 1>&6
2252else
2253 ac_save_LIBS="$LIBS"
2254LIBS="-ldld $LIBS"
2255cat > conftest.$ac_ext <<EOF
2256#line 2257 "configure"
2257#include "confdefs.h"
2258/* Override any gcc2 internal prototype to avoid an error. */
2259/* We use char because int might match the return type of a gcc2
2260 builtin and then its argument prototype would still apply. */
2261char dld_link();
2262
2263int main() {
2264dld_link()
2265; return 0; }
2266EOF
2267if { (eval echo configure:2268: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2268 rm -rf conftest*
2269 eval "ac_cv_lib_$ac_lib_var=yes"
2270else
2271 echo "configure: failed program was:" >&5
2272 cat conftest.$ac_ext >&5
2273 rm -rf conftest*
2274 eval "ac_cv_lib_$ac_lib_var=no"
2275fi
2276rm -f conftest*
2277LIBS="$ac_save_LIBS"
2278
2279fi
2280if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2281 echo "$ac_t""yes" 1>&6
2282 ac_tr_lib=HAVE_LIB`echo dld | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2283 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2284 cat >> confdefs.h <<EOF
2285#define $ac_tr_lib 1
2286EOF
2287
2288 LIBS="-ldld $LIBS"
2289
2290else
2291 echo "$ac_t""no" 1>&6
2292fi
2293
2294for ac_func in shl_load
2295do
2296echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2297echo "configure:2298: checking for $ac_func" >&5
2298if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2299 echo $ac_n "(cached) $ac_c" 1>&6
2300else
2301 cat > conftest.$ac_ext <<EOF
2302#line 2303 "configure"
2303#include "confdefs.h"
2304/* System header to define __stub macros and hopefully few prototypes,
2305 which can conflict with char $ac_func(); below. */
2306#include <assert.h>
2307/* Override any gcc2 internal prototype to avoid an error. */
2308/* We use char because int might match the return type of a gcc2
2309 builtin and then its argument prototype would still apply. */
2310char $ac_func();
2311
2312int main() {
2313
2314/* The GNU C library defines this for functions which it implements
2315 to always fail with ENOSYS. Some functions are actually named
2316 something starting with __ and the normal name is an alias. */
2317#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2318choke me
2319#else
2320$ac_func();
2321#endif
2322
2323; return 0; }
2324EOF
2325if { (eval echo configure:2326: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2326 rm -rf conftest*
2327 eval "ac_cv_func_$ac_func=yes"
2328else
2329 echo "configure: failed program was:" >&5
2330 cat conftest.$ac_ext >&5
2331 rm -rf conftest*
2332 eval "ac_cv_func_$ac_func=no"
2333fi
2334rm -f conftest*
2335fi
2336
2337if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2338 echo "$ac_t""yes" 1>&6
2339 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2340 cat >> confdefs.h <<EOF
2341#define $ac_tr_func 1
2342EOF
2343
2344else
2345 echo "$ac_t""no" 1>&6
2346fi
2347done
2348
2349
0f2d19dd
JB
2350#--------------------------------------------------------------------
2351#
2352# Which way does the stack grow?
2353#
2354#--------------------------------------------------------------------
2355
2356if test "$cross_compiling" = yes; then
2357 echo "configure: warning: Guessing that stack grows down -- see scmconfig.h.in" 1>&2
2358else
733943b9 2359 cat > conftest.$ac_ext <<EOF
abb2a7d0 2360#line 2361 "configure"
0f2d19dd
JB
2361#include "confdefs.h"
2362aux (l) unsigned long l;
2363 { int x; exit (l >= ((unsigned long)&x)); }
2364 main () { int q; aux((unsigned long)&q); }
2365EOF
abb2a7d0 2366if { (eval echo configure:2367: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
733943b9 2367then
0f2d19dd
JB
2368 cat >> confdefs.h <<\EOF
2369#define SCM_STACK_GROWS_UP 1
2370EOF
2371
733943b9
TT
2372else
2373 echo "configure: failed program was:" >&5
2374 cat conftest.$ac_ext >&5
0f2d19dd
JB
2375fi
2376rm -fr conftest*
733943b9
TT
2377fi
2378
0f2d19dd
JB
2379
2380
2381if test "$cross_compiling" = yes; then
2382 cat >> confdefs.h <<\EOF
2383#define SCM_SINGLES 1
2384EOF
2385
2386 echo "configure: warning: Guessing that sizeof(long) == sizeof(float) -- see scmconfig.h.in" 1>&2
2387else
733943b9 2388 cat > conftest.$ac_ext <<EOF
abb2a7d0 2389#line 2390 "configure"
0f2d19dd
JB
2390#include "confdefs.h"
2391main () { exit (sizeof(float) != sizeof(long)); }
2392EOF
abb2a7d0 2393if { (eval echo configure:2394: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
733943b9 2394then
0f2d19dd
JB
2395 cat >> confdefs.h <<\EOF
2396#define SCM_SINGLES 1
2397EOF
2398
733943b9
TT
2399else
2400 echo "configure: failed program was:" >&5
2401 cat conftest.$ac_ext >&5
0f2d19dd
JB
2402fi
2403rm -fr conftest*
733943b9
TT
2404fi
2405
0f2d19dd 2406
2e18892a 2407echo $ac_n "checking for struct linger""... $ac_c" 1>&6
abb2a7d0 2408echo "configure:2409: checking for struct linger" >&5
2e18892a
GH
2409if eval "test \"`echo '$''{'scm_cv_struct_linger'+set}'`\" = set"; then
2410 echo $ac_n "(cached) $ac_c" 1>&6
2411else
2412 cat > conftest.$ac_ext <<EOF
abb2a7d0 2413#line 2414 "configure"
2e18892a
GH
2414#include "confdefs.h"
2415#include <sys/socket.h>
733943b9 2416int main() {
2e18892a
GH
2417struct linger lgr; lgr.l_linger = 100
2418; return 0; }
2419EOF
abb2a7d0 2420if { (eval echo configure:2421: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2e18892a
GH
2421 rm -rf conftest*
2422 scm_cv_struct_linger="yes"
2423else
733943b9
TT
2424 echo "configure: failed program was:" >&5
2425 cat conftest.$ac_ext >&5
2e18892a
GH
2426 rm -rf conftest*
2427 scm_cv_struct_linger="no"
2428fi
2429rm -f conftest*
2e18892a 2430fi
0f2d19dd 2431
2e18892a
GH
2432echo "$ac_t""$scm_cv_struct_linger" 1>&6
2433if test $scm_cv_struct_linger = yes; then
2434 cat >> confdefs.h <<\EOF
2435#define HAVE_STRUCT_LINGER 1
2436EOF
0f2d19dd 2437
2e18892a
GH
2438fi
2439
0f2d19dd
JB
2440#--------------------------------------------------------------------
2441#
2442# How can you violate a stdio abstraction by setting a stream's fd?
2443#
2444#--------------------------------------------------------------------
2445
2446FD_SETTER=""
2447
2448if test "x$FD_SETTER" = x; then
2449 cat > conftest.$ac_ext <<EOF
abb2a7d0 2450#line 2451 "configure"
0f2d19dd
JB
2451#include "confdefs.h"
2452#include <stdio.h>
2453
733943b9 2454int main() {
0f2d19dd
JB
2455stdout->_file = 1
2456; return 0; }
2457EOF
abb2a7d0 2458if { (eval echo configure:2459: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
0f2d19dd
JB
2459 rm -rf conftest*
2460 FD_SETTER="((F)->_file = (D))"
733943b9
TT
2461else
2462 echo "configure: failed program was:" >&5
2463 cat conftest.$ac_ext >&5
0f2d19dd
JB
2464fi
2465rm -f conftest*
0f2d19dd
JB
2466fi
2467
2468if test "x$FD_SETTER" = x; then
2469 cat > conftest.$ac_ext <<EOF
abb2a7d0 2470#line 2471 "configure"
0f2d19dd
JB
2471#include "confdefs.h"
2472#include <stdio.h>
2473
733943b9 2474int main() {
0f2d19dd
JB
2475stdout->_fileno
2476; return 0; }
2477EOF
abb2a7d0 2478if { (eval echo configure:2479: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
0f2d19dd
JB
2479 rm -rf conftest*
2480 FD_SETTER="((F)->_fileno = (D))"
733943b9
TT
2481else
2482 echo "configure: failed program was:" >&5
2483 cat conftest.$ac_ext >&5
0f2d19dd
JB
2484fi
2485rm -f conftest*
0f2d19dd
JB
2486fi
2487
2488
2489test "x$FD_SETTER" != x && cat >> confdefs.h <<\EOF
2490#define HAVE_FD_SETTER 1
2491EOF
2492
2493
f93ddd39
GH
2494#--------------------------------------------------------------------
2495# How to find out whether a FILE structure contains buffered data.
2496# From Tk we have the following list:
2497# _cnt: Most UNIX systems
2498# __cnt: HPUX
2499# _r: BSD
2500# readCount: Sprite
2501# Or, in GNU libc there are two fields, _gptr and _egptr, which
2502# have to be compared.
2503# These can also be known as _IO_read_ptr and _IO_read_end.
2504#--------------------------------------------------------------------
2505
2506echo $ac_n "checking how to get buffer char count from FILE structure""... $ac_c" 1>&6
abb2a7d0 2507echo "configure:2508: checking how to get buffer char count from FILE structure" >&5
f93ddd39
GH
2508if eval "test \"`echo '$''{'scm_cv_struct_file_count'+set}'`\" = set"; then
2509 echo $ac_n "(cached) $ac_c" 1>&6
2510else
2511 cat > conftest.$ac_ext <<EOF
abb2a7d0 2512#line 2513 "configure"
f93ddd39
GH
2513#include "confdefs.h"
2514#include <stdio.h>
733943b9 2515int main() {
f93ddd39
GH
2516FILE *f = stdin; f->_cnt = 0
2517; return 0; }
2518EOF
abb2a7d0 2519if { (eval echo configure:2520: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
f93ddd39
GH
2520 rm -rf conftest*
2521 scm_cv_struct_file_count="_cnt"
2522else
733943b9
TT
2523 echo "configure: failed program was:" >&5
2524 cat conftest.$ac_ext >&5
f93ddd39
GH
2525 rm -rf conftest*
2526 cat > conftest.$ac_ext <<EOF
abb2a7d0 2527#line 2528 "configure"
f93ddd39
GH
2528#include "confdefs.h"
2529#include <stdio.h>
733943b9 2530int main() {
f93ddd39
GH
2531FILE *f = stdin; f->_r = 0
2532; return 0; }
2533EOF
abb2a7d0 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="_r"
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
abb2a7d0 2542#line 2543 "configure"
f93ddd39
GH
2543#include "confdefs.h"
2544#include <stdio.h>
733943b9 2545int main() {
f93ddd39
GH
2546FILE *f = stdin; f->readCount = 0
2547; return 0; }
2548EOF
abb2a7d0 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="readCount"
2552else
733943b9
TT
2553 echo "configure: failed program was:" >&5
2554 cat conftest.$ac_ext >&5
f93ddd39
GH
2555 rm -rf conftest*
2556 scm_cv_struct_file_count=""
2557fi
2558rm -f conftest*
f93ddd39
GH
2559fi
2560rm -f conftest*
f93ddd39
GH
2561fi
2562rm -f conftest*
f93ddd39
GH
2563fi
2564
2565if test "$scm_cv_struct_file_count"; then
2566 echo "$ac_t""$scm_cv_struct_file_count" 1>&6
2567 cat >> confdefs.h <<EOF
2568#define FILE_CNT_FIELD $scm_cv_struct_file_count
2569EOF
2570
2571else
2572if eval "test \"`echo '$''{'scm_cv_struct_file_gptr'+set}'`\" = set"; then
2573 echo $ac_n "(cached) $ac_c" 1>&6
2574else
2575 cat > conftest.$ac_ext <<EOF
abb2a7d0 2576#line 2577 "configure"
f93ddd39
GH
2577#include "confdefs.h"
2578#include <stdio.h>
733943b9 2579int main() {
f93ddd39
GH
2580FILE *f = stdin; f->_gptr = f->egptr;
2581; return 0; }
2582EOF
abb2a7d0 2583if { (eval echo configure:2584: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
f93ddd39
GH
2584 rm -rf conftest*
2585 scm_cv_struct_file_gptr=1
2586else
733943b9
TT
2587 echo "configure: failed program was:" >&5
2588 cat conftest.$ac_ext >&5
f93ddd39
GH
2589 rm -rf conftest*
2590 scm_cv_struct_file_gptr=""
2591fi
2592rm -f conftest*
f93ddd39
GH
2593fi
2594
2595if test "$scm_cv_struct_gptr"; then
2596 echo "$ac_t""gptr" 1>&6
2597 cat >> confdefs.h <<EOF
2598#define FILE_CNT_GPTR $scm_cv_struct_file_gptr
2599EOF
2600
2601else
2602if eval "test \"`echo '$''{'scm_cv_struct_file_readptr'+set}'`\" = set"; then
2603 echo $ac_n "(cached) $ac_c" 1>&6
2604else
2605 cat > conftest.$ac_ext <<EOF
abb2a7d0 2606#line 2607 "configure"
f93ddd39
GH
2607#include "confdefs.h"
2608#include <stdio.h>
733943b9 2609int main() {
f93ddd39
GH
2610FILE *f = stdin; f->_IO_read_ptr = f->_IO_read_end;
2611; return 0; }
2612EOF
abb2a7d0 2613if { (eval echo configure:2614: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
f93ddd39
GH
2614 rm -rf conftest*
2615 scm_cv_struct_file_readptr=1
733943b9
TT
2616else
2617 echo "configure: failed program was:" >&5
2618 cat conftest.$ac_ext >&5
f93ddd39
GH
2619fi
2620rm -f conftest*
f93ddd39
GH
2621fi
2622
2623if test "$scm_cv_struct_file_readptr"; then
2624 echo "$ac_t""read_ptr" 1>&6
2625 cat >> confdefs.h <<EOF
2626#define FILE_CNT_READPTR $scm_cv_struct_file_readptr
2627EOF
2628
2629fi
2630fi
2631fi
2632
72f0e9fc
MD
2633#--------------------------------------------------------------------
2634#
2635# Flags for thread support
2636#
2637#--------------------------------------------------------------------
2638
2639if test "$cy_cv_threads_package" = FSU; then
2640 cat >> confdefs.h <<\EOF
2641#define USE_FSU_PTHREADS 1
2642EOF
2643
2644 else if test "$cy_cv_threads_package" = COOP; then
2645 cat >> confdefs.h <<\EOF
2646#define USE_COOP_THREADS 1
2647EOF
2648
2649 else if test "$cy_cv_threads_package" = MIT; then
2650 cat >> confdefs.h <<\EOF
2651#define USE_MIT_PTHREADS 1
2652EOF
2653
2654 else if test "$cy_cv_threads_package" = PCthreads; then
2655 cat >> confdefs.h <<\EOF
2656#define USE_PCTHREADS_PTHREADS 1
2657EOF
2658
2659 else if test "$cy_cv_threads_package" = unknown; then
2660 { echo "configure: error: "cannot find threads installation"" 1>&2; exit 1; }
2661 fi
2662 fi
2663 fi
2664 fi
2665fi
2666
2667if test "$cy_cv_threads_package" != ""; then
2668 cat >> confdefs.h <<\EOF
2669#define USE_THREADS 1
2670EOF
2671
2672fi
2673
d9098516
JB
2674## If we're using GCC, ask for aggressive warnings.
2675case "$GCC" in
2676 yes ) CFLAGS="$CFLAGS -Wall -Wpointer-arith" ;;
2677esac
0f2d19dd 2678
9d7e1edf
JB
2679cat >> confdefs.h <<EOF
2680#define GUILE_MAJOR_VERSION "$GUILE_MAJOR_VERSION"
2681EOF
2682
2683cat >> confdefs.h <<EOF
2684#define GUILE_MINOR_VERSION "$GUILE_MINOR_VERSION"
2685EOF
2686
2687cat >> confdefs.h <<EOF
2688#define GUILE_VERSION "$GUILE_VERSION"
2689EOF
2690
0f2d19dd
JB
2691
2692
0f2d19dd
JB
2693trap '' 1 2 15
2694cat > confcache <<\EOF
2695# This file is a shell script that caches the results of configure
2696# tests run on this system so they can be shared between configure
2697# scripts and configure runs. It is not useful on other systems.
2698# If it contains results you don't want to keep, you may remove or edit it.
2699#
2700# By default, configure uses ./config.cache as the cache file,
2701# creating it if it does not exist already. You can give configure
2702# the --cache-file=FILE option to use a different cache file; that is
2703# what configure does when it calls configure scripts in
2704# subdirectories, so they share the cache.
2705# Giving --cache-file=/dev/null disables caching, for debugging configure.
2706# config.status only pays attention to the cache file if you give it the
2707# --recheck option to rerun configure.
2708#
2709EOF
733943b9
TT
2710# The following way of writing the cache mishandles newlines in values,
2711# but we know of no workaround that is simple, portable, and efficient.
2712# So, don't put newlines in cache variables' values.
0f2d19dd
JB
2713# Ultrix sh set writes to stderr and can't be redirected directly,
2714# and sets the high bit in the cache file unless we assign to the vars.
2715(set) 2>&1 |
733943b9
TT
2716 case `(ac_space=' '; set) 2>&1` in
2717 *ac_space=\ *)
2718 # `set' does not quote correctly, so add quotes (double-quote substitution
2719 # turns \\\\ into \\, and sed turns \\ into \).
2720 sed -n \
2721 -e "s/'/'\\\\''/g" \
2722 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
2723 ;;
2724 *)
2725 # `set' quotes correctly as required by POSIX, so do not add quotes.
2726 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
2727 ;;
2728 esac >> confcache
0f2d19dd
JB
2729if cmp -s $cache_file confcache; then
2730 :
2731else
2732 if test -w $cache_file; then
2733 echo "updating cache $cache_file"
2734 cat confcache > $cache_file
2735 else
2736 echo "not updating unwritable cache $cache_file"
2737 fi
2738fi
2739rm -f confcache
2740
2741trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
2742
2743test "x$prefix" = xNONE && prefix=$ac_default_prefix
2744# Let make expand exec_prefix.
2745test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
2746
2747# Any assignment to VPATH causes Sun make to only execute
2748# the first set of double-colon rules, so remove it if not needed.
2749# If there is a colon in the path, we need to keep it.
2750if test "x$srcdir" = x.; then
2751 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
2752fi
2753
2754trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
2755
2756DEFS=-DHAVE_CONFIG_H
2757
2758# Without the "./", some shells look in PATH for config.status.
2759: ${CONFIG_STATUS=./config.status}
2760
2761echo creating $CONFIG_STATUS
2762rm -f $CONFIG_STATUS
2763cat > $CONFIG_STATUS <<EOF
2764#! /bin/sh
2765# Generated automatically by configure.
2766# Run this file to recreate the current configuration.
2767# This directory was configured as follows,
2768# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
2769#
2770# $0 $ac_configure_args
2771#
2772# Compiler output produced by configure, useful for debugging
2773# configure, is in ./config.log if it exists.
2774
2775ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
2776for ac_option
2777do
2778 case "\$ac_option" in
2779 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
2780 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
2781 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
2782 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
733943b9 2783 echo "$CONFIG_STATUS generated by autoconf version 2.12"
0f2d19dd
JB
2784 exit 0 ;;
2785 -help | --help | --hel | --he | --h)
2786 echo "\$ac_cs_usage"; exit 0 ;;
2787 *) echo "\$ac_cs_usage"; exit 1 ;;
2788 esac
2789done
2790
2791ac_given_srcdir=$srcdir
733943b9 2792ac_given_INSTALL="$INSTALL"
0f2d19dd
JB
2793
2794trap 'rm -fr `echo "Makefile fd.h scmconfig.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
2795EOF
2796cat >> $CONFIG_STATUS <<EOF
2797
2798# Protect against being on the right side of a sed subst in config.status.
2799sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
2800 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
2801$ac_vpsub
2802$extrasub
2803s%@CFLAGS@%$CFLAGS%g
2804s%@CPPFLAGS@%$CPPFLAGS%g
2805s%@CXXFLAGS@%$CXXFLAGS%g
2806s%@DEFS@%$DEFS%g
2807s%@LDFLAGS@%$LDFLAGS%g
2808s%@LIBS@%$LIBS%g
2809s%@exec_prefix@%$exec_prefix%g
2810s%@prefix@%$prefix%g
2811s%@program_transform_name@%$program_transform_name%g
2812s%@bindir@%$bindir%g
2813s%@sbindir@%$sbindir%g
2814s%@libexecdir@%$libexecdir%g
2815s%@datadir@%$datadir%g
2816s%@sysconfdir@%$sysconfdir%g
2817s%@sharedstatedir@%$sharedstatedir%g
2818s%@localstatedir@%$localstatedir%g
2819s%@libdir@%$libdir%g
2820s%@includedir@%$includedir%g
2821s%@oldincludedir@%$oldincludedir%g
2822s%@infodir@%$infodir%g
2823s%@mandir@%$mandir%g
733943b9
TT
2824s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
2825s%@INSTALL_DATA@%$INSTALL_DATA%g
2826s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
2827s%@PACKAGE@%$PACKAGE%g
2828s%@VERSION@%$VERSION%g
2829s%@SET_MAKE@%$SET_MAKE%g
2830s%@module@%$module%g
0f2d19dd
JB
2831s%@CC@%$CC%g
2832s%@CPP@%$CPP%g
2833s%@RANLIB@%$RANLIB%g
2834s%@LIBOBJS@%$LIBOBJS%g
2835s%@FD_SETTER@%$FD_SETTER%g
0f2d19dd
JB
2836
2837CEOF
2838EOF
733943b9
TT
2839
2840cat >> $CONFIG_STATUS <<\EOF
2841
2842# Split the substitutions into bite-sized pieces for seds with
2843# small command number limits, like on Digital OSF/1 and HP-UX.
2844ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
2845ac_file=1 # Number of current file.
2846ac_beg=1 # First line for current file.
2847ac_end=$ac_max_sed_cmds # Line after last line for current file.
2848ac_more_lines=:
2849ac_sed_cmds=""
2850while $ac_more_lines; do
2851 if test $ac_beg -gt 1; then
2852 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
2853 else
2854 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
2855 fi
2856 if test ! -s conftest.s$ac_file; then
2857 ac_more_lines=false
2858 rm -f conftest.s$ac_file
2859 else
2860 if test -z "$ac_sed_cmds"; then
2861 ac_sed_cmds="sed -f conftest.s$ac_file"
2862 else
2863 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
2864 fi
2865 ac_file=`expr $ac_file + 1`
2866 ac_beg=$ac_end
2867 ac_end=`expr $ac_end + $ac_max_sed_cmds`
2868 fi
2869done
2870if test -z "$ac_sed_cmds"; then
2871 ac_sed_cmds=cat
2872fi
2873EOF
2874
0f2d19dd
JB
2875cat >> $CONFIG_STATUS <<EOF
2876
2877CONFIG_FILES=\${CONFIG_FILES-"Makefile fd.h"}
2878EOF
2879cat >> $CONFIG_STATUS <<\EOF
2880for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
733943b9 2881 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
0f2d19dd 2882 case "$ac_file" in
733943b9 2883 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
0f2d19dd
JB
2884 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
2885 *) ac_file_in="${ac_file}.in" ;;
2886 esac
2887
733943b9 2888 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
0f2d19dd
JB
2889
2890 # Remove last slash and all that follows it. Not all systems have dirname.
2891 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
2892 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
2893 # The file is in a subdirectory.
2894 test ! -d "$ac_dir" && mkdir "$ac_dir"
2895 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
2896 # A "../" for each directory in $ac_dir_suffix.
2897 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
2898 else
2899 ac_dir_suffix= ac_dots=
2900 fi
2901
2902 case "$ac_given_srcdir" in
2903 .) srcdir=.
2904 if test -z "$ac_dots"; then top_srcdir=.
2905 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
2906 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
2907 *) # Relative path.
2908 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
2909 top_srcdir="$ac_dots$ac_given_srcdir" ;;
2910 esac
2911
733943b9
TT
2912 case "$ac_given_INSTALL" in
2913 [/$]*) INSTALL="$ac_given_INSTALL" ;;
2914 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
2915 esac
2916
0f2d19dd
JB
2917 echo creating "$ac_file"
2918 rm -f "$ac_file"
2919 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
2920 case "$ac_file" in
2921 *Makefile*) ac_comsub="1i\\
2922# $configure_input" ;;
2923 *) ac_comsub= ;;
2924 esac
733943b9
TT
2925
2926 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
0f2d19dd
JB
2927 sed -e "$ac_comsub
2928s%@configure_input@%$configure_input%g
2929s%@srcdir@%$srcdir%g
2930s%@top_srcdir@%$top_srcdir%g
733943b9
TT
2931s%@INSTALL@%$INSTALL%g
2932" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
0f2d19dd 2933fi; done
733943b9 2934rm -f conftest.s*
0f2d19dd
JB
2935
2936# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
2937# NAME is the cpp macro being defined and VALUE is the value it is being given.
2938#
2939# ac_d sets the value in "#define NAME VALUE" lines.
2940ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
2941ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
2942ac_dC='\3'
2943ac_dD='%g'
2944# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
2945ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
2946ac_uB='\([ ]\)%\1#\2define\3'
2947ac_uC=' '
2948ac_uD='\4%g'
2949# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
2950ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
2951ac_eB='$%\1#\2define\3'
2952ac_eC=' '
2953ac_eD='%g'
2954
733943b9
TT
2955if test "${CONFIG_HEADERS+set}" != set; then
2956EOF
2957cat >> $CONFIG_STATUS <<EOF
2958 CONFIG_HEADERS="scmconfig.h"
2959EOF
2960cat >> $CONFIG_STATUS <<\EOF
2961fi
0f2d19dd 2962for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
733943b9 2963 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
0f2d19dd 2964 case "$ac_file" in
733943b9 2965 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
0f2d19dd
JB
2966 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
2967 *) ac_file_in="${ac_file}.in" ;;
2968 esac
2969
2970 echo creating $ac_file
2971
2972 rm -f conftest.frag conftest.in conftest.out
733943b9
TT
2973 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
2974 cat $ac_file_inputs > conftest.in
0f2d19dd
JB
2975
2976EOF
2977
2978# Transform confdefs.h into a sed script conftest.vals that substitutes
2979# the proper values into config.h.in to produce config.h. And first:
2980# Protect against being on the right side of a sed subst in config.status.
2981# Protect against being in an unquoted here document in config.status.
2982rm -f conftest.vals
2983cat > conftest.hdr <<\EOF
2984s/[\\&%]/\\&/g
2985s%[\\$`]%\\&%g
087d2a6f 2986s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
0f2d19dd
JB
2987s%ac_d%ac_u%gp
2988s%ac_u%ac_e%gp
2989EOF
2990sed -n -f conftest.hdr confdefs.h > conftest.vals
2991rm -f conftest.hdr
2992
2993# This sed command replaces #undef with comments. This is necessary, for
2994# example, in the case of _POSIX_SOURCE, which is predefined and required
2995# on some systems where configure will not decide to define it.
2996cat >> conftest.vals <<\EOF
2997s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
2998EOF
2999
3000# Break up conftest.vals because some shells have a limit on
3001# the size of here documents, and old seds have small limits too.
0f2d19dd
JB
3002
3003rm -f conftest.tail
3004while :
3005do
3006 ac_lines=`grep -c . conftest.vals`
3007 # grep -c gives empty output for an empty file on some AIX systems.
3008 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
3009 # Write a limited-size here document to conftest.frag.
3010 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
3011 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
3012 echo 'CEOF
3013 sed -f conftest.frag conftest.in > conftest.out
3014 rm -f conftest.in
3015 mv conftest.out conftest.in
3016' >> $CONFIG_STATUS
3017 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
3018 rm -f conftest.vals
3019 mv conftest.tail conftest.vals
3020done
3021rm -f conftest.vals
3022
3023cat >> $CONFIG_STATUS <<\EOF
3024 rm -f conftest.frag conftest.h
3025 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
3026 cat conftest.in >> conftest.h
3027 rm -f conftest.in
3028 if cmp -s $ac_file conftest.h 2>/dev/null; then
3029 echo "$ac_file is unchanged"
3030 rm -f conftest.h
3031 else
087d2a6f
JB
3032 # Remove last slash and all that follows it. Not all systems have dirname.
3033 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
3034 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
3035 # The file is in a subdirectory.
3036 test ! -d "$ac_dir" && mkdir "$ac_dir"
3037 fi
0f2d19dd
JB
3038 rm -f $ac_file
3039 mv conftest.h $ac_file
3040 fi
3041fi; done
3042
733943b9
TT
3043EOF
3044cat >> $CONFIG_STATUS <<EOF
3045
10f74a13 3046
733943b9
TT
3047EOF
3048cat >> $CONFIG_STATUS <<\EOF
3049test -z "$CONFIG_HEADER" || echo timestamp > stamp-h
0f2d19dd
JB
3050
3051exit 0
3052EOF
3053chmod +x $CONFIG_STATUS
3054rm -fr confdefs* $ac_clean_files
3055test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
3056
3057