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