* configure.in: Remove quotes around ac_cv_lib_readline_main and
[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
3afbf314
MD
1660echo $ac_n "checking size of int""... $ac_c" 1>&6
1661echo "configure:1662: checking size of int" >&5
1662if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
1663 echo $ac_n "(cached) $ac_c" 1>&6
1664else
1665 if test "$cross_compiling" = yes; then
1666 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
1667else
1668 cat > conftest.$ac_ext <<EOF
1669#line 1670 "configure"
1670#include "confdefs.h"
1671#include <stdio.h>
1672main()
1673{
1674 FILE *f=fopen("conftestval", "w");
1675 if (!f) exit(1);
1676 fprintf(f, "%d\n", sizeof(int));
1677 exit(0);
1678}
1679EOF
1680if { (eval echo configure:1681: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
1681then
1682 ac_cv_sizeof_int=`cat conftestval`
1683else
1684 echo "configure: failed program was:" >&5
1685 cat conftest.$ac_ext >&5
1686 rm -fr conftest*
1687 ac_cv_sizeof_int=0
1688fi
1689rm -fr conftest*
1690fi
1691
1692fi
1693echo "$ac_t""$ac_cv_sizeof_int" 1>&6
1694cat >> confdefs.h <<EOF
1695#define SIZEOF_INT $ac_cv_sizeof_int
1696EOF
1697
1698
1699echo $ac_n "checking size of long""... $ac_c" 1>&6
1700echo "configure:1701: checking size of long" >&5
1701if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
1702 echo $ac_n "(cached) $ac_c" 1>&6
1703else
1704 if test "$cross_compiling" = yes; then
1705 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
1706else
1707 cat > conftest.$ac_ext <<EOF
1708#line 1709 "configure"
1709#include "confdefs.h"
1710#include <stdio.h>
1711main()
1712{
1713 FILE *f=fopen("conftestval", "w");
1714 if (!f) exit(1);
1715 fprintf(f, "%d\n", sizeof(long));
1716 exit(0);
1717}
1718EOF
1719if { (eval echo configure:1720: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
1720then
1721 ac_cv_sizeof_long=`cat conftestval`
1722else
1723 echo "configure: failed program was:" >&5
1724 cat conftest.$ac_ext >&5
1725 rm -fr conftest*
1726 ac_cv_sizeof_long=0
1727fi
1728rm -fr conftest*
1729fi
1730
1731fi
1732echo "$ac_t""$ac_cv_sizeof_long" 1>&6
1733cat >> confdefs.h <<EOF
1734#define SIZEOF_LONG $ac_cv_sizeof_long
1735EOF
1736
1737
1738echo $ac_n "checking for long longs""... $ac_c" 1>&6
1739echo "configure:1740: checking for long longs" >&5
1740if eval "test \"`echo '$''{'scm_cv_long_longs'+set}'`\" = set"; then
1741 echo $ac_n "(cached) $ac_c" 1>&6
1742else
1743 cat > conftest.$ac_ext <<EOF
1744#line 1745 "configure"
1745#include "confdefs.h"
1746
1747int main() {
1748long long a
1749; return 0; }
1750EOF
1751if { (eval echo configure:1752: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1752 rm -rf conftest*
1753 scm_cv_long_longs=yes
1754else
1755 echo "configure: failed program was:" >&5
1756 cat conftest.$ac_ext >&5
1757 rm -rf conftest*
1758 scm_cv_long_longs=no
1759fi
1760rm -f conftest*
1761fi
1762
1763echo "$ac_t""$scm_cv_long_longs" 1>&6
1764if test "$scm_cv_long_longs" = yes; then
1765 cat >> confdefs.h <<\EOF
1766#define HAVE_LONG_LONGS 1
1767EOF
1768
1769fi
3a629497
JB
1770
1771echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
3afbf314 1772echo "configure:1773: checking for ANSI C header files" >&5
3a629497
JB
1773if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1774 echo $ac_n "(cached) $ac_c" 1>&6
1775else
1776 cat > conftest.$ac_ext <<EOF
3afbf314 1777#line 1778 "configure"
3a629497
JB
1778#include "confdefs.h"
1779#include <stdlib.h>
1780#include <stdarg.h>
1781#include <string.h>
1782#include <float.h>
1783EOF
1784ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3afbf314 1785{ (eval echo configure:1786: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2c9a3a48 1786ac_err=`grep -v '^ *+' conftest.out`
3a629497
JB
1787if test -z "$ac_err"; then
1788 rm -rf conftest*
1789 ac_cv_header_stdc=yes
1790else
1791 echo "$ac_err" >&5
1792 echo "configure: failed program was:" >&5
1793 cat conftest.$ac_ext >&5
1794 rm -rf conftest*
1795 ac_cv_header_stdc=no
1796fi
1797rm -f conftest*
1798
1799if test $ac_cv_header_stdc = yes; then
1800 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1801cat > conftest.$ac_ext <<EOF
3afbf314 1802#line 1803 "configure"
3a629497
JB
1803#include "confdefs.h"
1804#include <string.h>
1805EOF
1806if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1807 egrep "memchr" >/dev/null 2>&1; then
1808 :
1809else
1810 rm -rf conftest*
1811 ac_cv_header_stdc=no
1812fi
1813rm -f conftest*
1814
1815fi
1816
1817if test $ac_cv_header_stdc = yes; then
1818 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1819cat > conftest.$ac_ext <<EOF
3afbf314 1820#line 1821 "configure"
3a629497
JB
1821#include "confdefs.h"
1822#include <stdlib.h>
1823EOF
1824if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1825 egrep "free" >/dev/null 2>&1; then
1826 :
1827else
1828 rm -rf conftest*
1829 ac_cv_header_stdc=no
1830fi
1831rm -f conftest*
1832
1833fi
1834
1835if test $ac_cv_header_stdc = yes; then
1836 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1837if test "$cross_compiling" = yes; then
1838 :
1839else
1840 cat > conftest.$ac_ext <<EOF
3afbf314 1841#line 1842 "configure"
3a629497
JB
1842#include "confdefs.h"
1843#include <ctype.h>
1844#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1845#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
1846#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
1847int main () { int i; for (i = 0; i < 256; i++)
1848if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1849exit (0); }
1850
1851EOF
3afbf314 1852if { (eval echo configure:1853: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
3a629497
JB
1853then
1854 :
1855else
1856 echo "configure: failed program was:" >&5
1857 cat conftest.$ac_ext >&5
1858 rm -fr conftest*
1859 ac_cv_header_stdc=no
1860fi
1861rm -fr conftest*
1862fi
1863
1864fi
1865fi
1866
1867echo "$ac_t""$ac_cv_header_stdc" 1>&6
1868if test $ac_cv_header_stdc = yes; then
1869 cat >> confdefs.h <<\EOF
1870#define STDC_HEADERS 1
1871EOF
1872
1873fi
1874
1875ac_header_dirent=no
1876for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
1877do
1878ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1879echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
3afbf314 1880echo "configure:1881: checking for $ac_hdr that defines DIR" >&5
3a629497
JB
1881if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
1882 echo $ac_n "(cached) $ac_c" 1>&6
1883else
1884 cat > conftest.$ac_ext <<EOF
3afbf314 1885#line 1886 "configure"
3a629497
JB
1886#include "confdefs.h"
1887#include <sys/types.h>
1888#include <$ac_hdr>
1889int main() {
1890DIR *dirp = 0;
1891; return 0; }
1892EOF
3afbf314 1893if { (eval echo configure:1894: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3a629497
JB
1894 rm -rf conftest*
1895 eval "ac_cv_header_dirent_$ac_safe=yes"
1896else
1897 echo "configure: failed program was:" >&5
1898 cat conftest.$ac_ext >&5
1899 rm -rf conftest*
1900 eval "ac_cv_header_dirent_$ac_safe=no"
1901fi
1902rm -f conftest*
1903fi
1904if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
1905 echo "$ac_t""yes" 1>&6
1906 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1907 cat >> confdefs.h <<EOF
1908#define $ac_tr_hdr 1
1909EOF
1910 ac_header_dirent=$ac_hdr; break
1911else
1912 echo "$ac_t""no" 1>&6
1913fi
1914done
1915# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
1916if test $ac_header_dirent = dirent.h; then
1917echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
3afbf314 1918echo "configure:1919: checking for opendir in -ldir" >&5
3a629497
JB
1919ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
1920if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1921 echo $ac_n "(cached) $ac_c" 1>&6
1922else
1923 ac_save_LIBS="$LIBS"
1924LIBS="-ldir $LIBS"
1925cat > conftest.$ac_ext <<EOF
3afbf314 1926#line 1927 "configure"
3a629497
JB
1927#include "confdefs.h"
1928/* Override any gcc2 internal prototype to avoid an error. */
1929/* We use char because int might match the return type of a gcc2
1930 builtin and then its argument prototype would still apply. */
1931char opendir();
1932
1933int main() {
1934opendir()
1935; return 0; }
1936EOF
3afbf314 1937if { (eval echo configure:1938: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3a629497
JB
1938 rm -rf conftest*
1939 eval "ac_cv_lib_$ac_lib_var=yes"
1940else
1941 echo "configure: failed program was:" >&5
1942 cat conftest.$ac_ext >&5
1943 rm -rf conftest*
1944 eval "ac_cv_lib_$ac_lib_var=no"
1945fi
1946rm -f conftest*
1947LIBS="$ac_save_LIBS"
1948
1949fi
1950if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1951 echo "$ac_t""yes" 1>&6
1952 LIBS="$LIBS -ldir"
1953else
1954 echo "$ac_t""no" 1>&6
1955fi
1956
1957else
1958echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
3afbf314 1959echo "configure:1960: checking for opendir in -lx" >&5
3a629497
JB
1960ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
1961if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1962 echo $ac_n "(cached) $ac_c" 1>&6
1963else
1964 ac_save_LIBS="$LIBS"
1965LIBS="-lx $LIBS"
1966cat > conftest.$ac_ext <<EOF
3afbf314 1967#line 1968 "configure"
3a629497
JB
1968#include "confdefs.h"
1969/* Override any gcc2 internal prototype to avoid an error. */
1970/* We use char because int might match the return type of a gcc2
1971 builtin and then its argument prototype would still apply. */
1972char opendir();
1973
1974int main() {
1975opendir()
1976; return 0; }
1977EOF
3afbf314 1978if { (eval echo configure:1979: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3a629497
JB
1979 rm -rf conftest*
1980 eval "ac_cv_lib_$ac_lib_var=yes"
1981else
1982 echo "configure: failed program was:" >&5
1983 cat conftest.$ac_ext >&5
1984 rm -rf conftest*
1985 eval "ac_cv_lib_$ac_lib_var=no"
1986fi
1987rm -f conftest*
1988LIBS="$ac_save_LIBS"
1989
1990fi
1991if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1992 echo "$ac_t""yes" 1>&6
1993 LIBS="$LIBS -lx"
1994else
1995 echo "$ac_t""no" 1>&6
1996fi
1997
1998fi
1999
2000echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
3afbf314 2001echo "configure:2002: checking whether time.h and sys/time.h may both be included" >&5
3a629497
JB
2002if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
2003 echo $ac_n "(cached) $ac_c" 1>&6
2004else
2005 cat > conftest.$ac_ext <<EOF
3afbf314 2006#line 2007 "configure"
3a629497
JB
2007#include "confdefs.h"
2008#include <sys/types.h>
2009#include <sys/time.h>
2010#include <time.h>
2011int main() {
2012struct tm *tp;
2013; return 0; }
2014EOF
3afbf314 2015if { (eval echo configure:2016: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3a629497
JB
2016 rm -rf conftest*
2017 ac_cv_header_time=yes
2018else
2019 echo "configure: failed program was:" >&5
2020 cat conftest.$ac_ext >&5
2021 rm -rf conftest*
2022 ac_cv_header_time=no
2023fi
2024rm -f conftest*
2025fi
2026
2027echo "$ac_t""$ac_cv_header_time" 1>&6
2028if test $ac_cv_header_time = yes; then
2029 cat >> confdefs.h <<\EOF
2030#define TIME_WITH_SYS_TIME 1
2031EOF
2032
2033fi
2034
2035echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
3afbf314 2036echo "configure:2037: checking for sys/wait.h that is POSIX.1 compatible" >&5
3a629497
JB
2037if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
2038 echo $ac_n "(cached) $ac_c" 1>&6
2039else
2040 cat > conftest.$ac_ext <<EOF
3afbf314 2041#line 2042 "configure"
3a629497
JB
2042#include "confdefs.h"
2043#include <sys/types.h>
2044#include <sys/wait.h>
2045#ifndef WEXITSTATUS
2046#define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
2047#endif
2048#ifndef WIFEXITED
2049#define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
2050#endif
2051int main() {
2052int s;
2053wait (&s);
2054s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
2055; return 0; }
2056EOF
3afbf314 2057if { (eval echo configure:2058: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3a629497
JB
2058 rm -rf conftest*
2059 ac_cv_header_sys_wait_h=yes
2060else
2061 echo "configure: failed program was:" >&5
2062 cat conftest.$ac_ext >&5
2063 rm -rf conftest*
2064 ac_cv_header_sys_wait_h=no
2065fi
2066rm -f conftest*
2067fi
2068
2069echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
2070if test $ac_cv_header_sys_wait_h = yes; then
2071 cat >> confdefs.h <<\EOF
2072#define HAVE_SYS_WAIT_H 1
2073EOF
2074
2075fi
2076
365d0782 2077for 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
2078do
2079ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2080echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3afbf314 2081echo "configure:2082: checking for $ac_hdr" >&5
3a629497
JB
2082if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2083 echo $ac_n "(cached) $ac_c" 1>&6
2084else
2085 cat > conftest.$ac_ext <<EOF
3afbf314 2086#line 2087 "configure"
3a629497
JB
2087#include "confdefs.h"
2088#include <$ac_hdr>
2089EOF
2090ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3afbf314 2091{ (eval echo configure:2092: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2c9a3a48 2092ac_err=`grep -v '^ *+' conftest.out`
3a629497
JB
2093if test -z "$ac_err"; then
2094 rm -rf conftest*
2095 eval "ac_cv_header_$ac_safe=yes"
2096else
2097 echo "$ac_err" >&5
2098 echo "configure: failed program was:" >&5
2099 cat conftest.$ac_ext >&5
2100 rm -rf conftest*
2101 eval "ac_cv_header_$ac_safe=no"
2102fi
2103rm -f conftest*
2104fi
2105if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2106 echo "$ac_t""yes" 1>&6
2107 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2108 cat >> confdefs.h <<EOF
2109#define $ac_tr_hdr 1
2110EOF
2111
2112else
2113 echo "$ac_t""no" 1>&6
2114fi
2115done
2116
2117
2118 for ac_hdr in libc.h unistd.h
2119do
2120ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2121echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3afbf314 2122echo "configure:2123: checking for $ac_hdr" >&5
3a629497
JB
2123if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2124 echo $ac_n "(cached) $ac_c" 1>&6
2125else
2126 cat > conftest.$ac_ext <<EOF
3afbf314 2127#line 2128 "configure"
3a629497
JB
2128#include "confdefs.h"
2129#include <$ac_hdr>
2130EOF
2131ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3afbf314 2132{ (eval echo configure:2133: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2c9a3a48 2133ac_err=`grep -v '^ *+' conftest.out`
3a629497
JB
2134if test -z "$ac_err"; then
2135 rm -rf conftest*
2136 eval "ac_cv_header_$ac_safe=yes"
2137else
2138 echo "$ac_err" >&5
2139 echo "configure: failed program was:" >&5
2140 cat conftest.$ac_ext >&5
2141 rm -rf conftest*
2142 eval "ac_cv_header_$ac_safe=no"
2143fi
2144rm -f conftest*
2145fi
2146if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2147 echo "$ac_t""yes" 1>&6
2148 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2149 cat >> confdefs.h <<EOF
2150#define $ac_tr_hdr 1
2151EOF
2152
2153else
2154 echo "$ac_t""no" 1>&6
2155fi
2156done
2157
2158 echo $ac_n "checking "whether libc.h and unistd.h can be included together"""... $ac_c" 1>&6
3afbf314 2159echo "configure:2160: checking "whether libc.h and unistd.h can be included together"" >&5
3a629497
JB
2160if eval "test \"`echo '$''{'guile_cv_header_libc_with_unistd'+set}'`\" = set"; then
2161 echo $ac_n "(cached) $ac_c" 1>&6
2162else
2163
2164 if test "$ac_cv_header_libc_h" = "no"; then
2165 guile_cv_header_libc_with_unistd="no"
2166 elif test "$ac_cv_header_unistd.h" = "no"; then
2167 guile_cv_header_libc_with_unistd="yes"
2168 else
2169 cat > conftest.$ac_ext <<EOF
3afbf314 2170#line 2171 "configure"
3a629497
JB
2171#include "confdefs.h"
2172
2173# include <libc.h>
2174# include <unistd.h>
2175
2176int main() {
2177
2178; return 0; }
2179EOF
3afbf314 2180if { (eval echo configure:2181: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3a629497
JB
2181 rm -rf conftest*
2182 guile_cv_header_libc_with_unistd=yes
2183else
2184 echo "configure: failed program was:" >&5
2185 cat conftest.$ac_ext >&5
2186 rm -rf conftest*
2187 guile_cv_header_libc_with_unistd=no
2188
2189fi
2190rm -f conftest*
2191 fi
2192
2193
2194fi
2195
2196echo "$ac_t""$guile_cv_header_libc_with_unistd" 1>&6
2197 if test "$guile_cv_header_libc_with_unistd" = yes; then
2198 cat >> confdefs.h <<\EOF
2199#define LIBC_H_WITH_UNISTD_H 1
2200EOF
2201
2202 fi
2203
2204
2205
2206echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
3afbf314 2207echo "configure:2208: checking for uid_t in sys/types.h" >&5
3a629497
JB
2208if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
2209 echo $ac_n "(cached) $ac_c" 1>&6
2210else
2211 cat > conftest.$ac_ext <<EOF
3afbf314 2212#line 2213 "configure"
3a629497
JB
2213#include "confdefs.h"
2214#include <sys/types.h>
2215EOF
2216if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2217 egrep "uid_t" >/dev/null 2>&1; then
2218 rm -rf conftest*
2219 ac_cv_type_uid_t=yes
2220else
2221 rm -rf conftest*
2222 ac_cv_type_uid_t=no
2223fi
2224rm -f conftest*
2225
2226fi
2227
2228echo "$ac_t""$ac_cv_type_uid_t" 1>&6
2229if test $ac_cv_type_uid_t = no; then
2230 cat >> confdefs.h <<\EOF
2231#define uid_t int
2232EOF
2233
2234 cat >> confdefs.h <<\EOF
2235#define gid_t int
2236EOF
2237
2238fi
2239
2240echo $ac_n "checking type of array argument to getgroups""... $ac_c" 1>&6
3afbf314 2241echo "configure:2242: checking type of array argument to getgroups" >&5
3a629497
JB
2242if eval "test \"`echo '$''{'ac_cv_type_getgroups'+set}'`\" = set"; then
2243 echo $ac_n "(cached) $ac_c" 1>&6
2244else
2245 if test "$cross_compiling" = yes; then
2246 ac_cv_type_getgroups=cross
2247else
2248 cat > conftest.$ac_ext <<EOF
3afbf314 2249#line 2250 "configure"
3a629497
JB
2250#include "confdefs.h"
2251
2252/* Thanks to Mike Rendell for this test. */
2253#include <sys/types.h>
2254#define NGID 256
2255#undef MAX
2256#define MAX(x, y) ((x) > (y) ? (x) : (y))
2257main()
2258{
2259 gid_t gidset[NGID];
2260 int i, n;
2261 union { gid_t gval; long lval; } val;
2262
2263 val.lval = -1;
2264 for (i = 0; i < NGID; i++)
2265 gidset[i] = val.gval;
2266 n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1,
2267 gidset);
2268 /* Exit non-zero if getgroups seems to require an array of ints. This
2269 happens when gid_t is short but getgroups modifies an array of ints. */
2270 exit ((n > 0 && gidset[n] != val.gval) ? 1 : 0);
2271}
2272
2273EOF
3afbf314 2274if { (eval echo configure:2275: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
3a629497
JB
2275then
2276 ac_cv_type_getgroups=gid_t
2277else
2278 echo "configure: failed program was:" >&5
2279 cat conftest.$ac_ext >&5
2280 rm -fr conftest*
2281 ac_cv_type_getgroups=int
2282fi
2283rm -fr conftest*
2284fi
2285
2286if test $ac_cv_type_getgroups = cross; then
2287 cat > conftest.$ac_ext <<EOF
3afbf314 2288#line 2289 "configure"
3a629497
JB
2289#include "confdefs.h"
2290#include <unistd.h>
2291EOF
2292if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2293 egrep "getgroups.*int.*gid_t" >/dev/null 2>&1; then
2294 rm -rf conftest*
2295 ac_cv_type_getgroups=gid_t
2296else
2297 rm -rf conftest*
2298 ac_cv_type_getgroups=int
2299fi
2300rm -f conftest*
2301
2302fi
2303fi
2304
2305echo "$ac_t""$ac_cv_type_getgroups" 1>&6
2306cat >> confdefs.h <<EOF
2307#define GETGROUPS_T $ac_cv_type_getgroups
2308EOF
2309
2310
2311echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
3afbf314 2312echo "configure:2313: checking return type of signal handlers" >&5
3a629497
JB
2313if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
2314 echo $ac_n "(cached) $ac_c" 1>&6
2315else
2316 cat > conftest.$ac_ext <<EOF
3afbf314 2317#line 2318 "configure"
3a629497
JB
2318#include "confdefs.h"
2319#include <sys/types.h>
2320#include <signal.h>
2321#ifdef signal
2322#undef signal
2323#endif
2324#ifdef __cplusplus
2325extern "C" void (*signal (int, void (*)(int)))(int);
2326#else
2327void (*signal ()) ();
2328#endif
2329
2330int main() {
2331int i;
2332; return 0; }
2333EOF
3afbf314 2334if { (eval echo configure:2335: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3a629497
JB
2335 rm -rf conftest*
2336 ac_cv_type_signal=void
2337else
2338 echo "configure: failed program was:" >&5
2339 cat conftest.$ac_ext >&5
2340 rm -rf conftest*
2341 ac_cv_type_signal=int
2342fi
2343rm -f conftest*
2344fi
2345
2346echo "$ac_t""$ac_cv_type_signal" 1>&6
2347cat >> confdefs.h <<EOF
2348#define RETSIGTYPE $ac_cv_type_signal
2349EOF
2350
2351
2352echo $ac_n "checking for mode_t""... $ac_c" 1>&6
3afbf314 2353echo "configure:2354: checking for mode_t" >&5
3a629497
JB
2354if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
2355 echo $ac_n "(cached) $ac_c" 1>&6
2356else
2357 cat > conftest.$ac_ext <<EOF
3afbf314 2358#line 2359 "configure"
3a629497
JB
2359#include "confdefs.h"
2360#include <sys/types.h>
2361#if STDC_HEADERS
2362#include <stdlib.h>
2363#include <stddef.h>
2364#endif
2365EOF
2366if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2367 egrep "mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
2368 rm -rf conftest*
2369 ac_cv_type_mode_t=yes
2370else
2371 rm -rf conftest*
2372 ac_cv_type_mode_t=no
2373fi
2374rm -f conftest*
2375
2376fi
2377echo "$ac_t""$ac_cv_type_mode_t" 1>&6
2378if test $ac_cv_type_mode_t = no; then
2379 cat >> confdefs.h <<\EOF
2380#define mode_t int
2381EOF
2382
2383fi
2384
2385
90fcac06 2386echo $ac_n "checking for main in -lm""... $ac_c" 1>&6
3afbf314 2387echo "configure:2388: checking for main in -lm" >&5
90fcac06 2388ac_lib_var=`echo m'_'main | sed 'y%./+-%__p_%'`
ede1d9bf
JB
2389if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2390 echo $ac_n "(cached) $ac_c" 1>&6
2391else
2392 ac_save_LIBS="$LIBS"
90fcac06 2393LIBS="-lm $LIBS"
ede1d9bf 2394cat > conftest.$ac_ext <<EOF
3afbf314 2395#line 2396 "configure"
ede1d9bf 2396#include "confdefs.h"
ede1d9bf
JB
2397
2398int main() {
baf22c7e 2399main()
ede1d9bf
JB
2400; return 0; }
2401EOF
3afbf314 2402if { (eval echo configure:2403: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
ede1d9bf
JB
2403 rm -rf conftest*
2404 eval "ac_cv_lib_$ac_lib_var=yes"
2405else
2406 echo "configure: failed program was:" >&5
2407 cat conftest.$ac_ext >&5
2408 rm -rf conftest*
2409 eval "ac_cv_lib_$ac_lib_var=no"
2410fi
2411rm -f conftest*
2412LIBS="$ac_save_LIBS"
2413
2414fi
2415if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2416 echo "$ac_t""yes" 1>&6
90fcac06 2417 ac_tr_lib=HAVE_LIB`echo m | sed -e 's/[^a-zA-Z0-9_]/_/g' \
ede1d9bf
JB
2418 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2419 cat >> confdefs.h <<EOF
2420#define $ac_tr_lib 1
2421EOF
2422
90fcac06 2423 LIBS="-lm $LIBS"
ede1d9bf
JB
2424
2425else
2426 echo "$ac_t""no" 1>&6
2427fi
baf22c7e 2428
4c787b52
MD
2429for ac_func in gethostbyname
2430do
2431echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3afbf314 2432echo "configure:2433: checking for $ac_func" >&5
4c787b52 2433if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3a629497
JB
2434 echo $ac_n "(cached) $ac_c" 1>&6
2435else
2436 cat > conftest.$ac_ext <<EOF
3afbf314 2437#line 2438 "configure"
3a629497
JB
2438#include "confdefs.h"
2439/* System header to define __stub macros and hopefully few prototypes,
4c787b52 2440 which can conflict with char $ac_func(); below. */
3a629497
JB
2441#include <assert.h>
2442/* Override any gcc2 internal prototype to avoid an error. */
2443/* We use char because int might match the return type of a gcc2
2444 builtin and then its argument prototype would still apply. */
4c787b52 2445char $ac_func();
3a629497
JB
2446
2447int main() {
2448
2449/* The GNU C library defines this for functions which it implements
2450 to always fail with ENOSYS. Some functions are actually named
2451 something starting with __ and the normal name is an alias. */
4c787b52 2452#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3a629497
JB
2453choke me
2454#else
4c787b52 2455$ac_func();
3a629497
JB
2456#endif
2457
2458; return 0; }
2459EOF
3afbf314 2460if { (eval echo configure:2461: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3a629497 2461 rm -rf conftest*
4c787b52 2462 eval "ac_cv_func_$ac_func=yes"
3a629497
JB
2463else
2464 echo "configure: failed program was:" >&5
2465 cat conftest.$ac_ext >&5
2466 rm -rf conftest*
4c787b52 2467 eval "ac_cv_func_$ac_func=no"
3a629497
JB
2468fi
2469rm -f conftest*
2470fi
2471
4c787b52 2472if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3a629497 2473 echo "$ac_t""yes" 1>&6
4c787b52
MD
2474 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2475 cat >> confdefs.h <<EOF
2476#define $ac_tr_func 1
2477EOF
2478
3a629497
JB
2479else
2480 echo "$ac_t""no" 1>&6
2481fi
4c787b52 2482done
3a629497 2483
5852c051
JB
2484if test $ac_cv_func_gethostbyname = no; then
2485 echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
3afbf314 2486echo "configure:2487: checking for gethostbyname in -lnsl" >&5
5852c051
JB
2487ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
2488if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
e1a191a8
GH
2489 echo $ac_n "(cached) $ac_c" 1>&6
2490else
5852c051
JB
2491 ac_save_LIBS="$LIBS"
2492LIBS="-lnsl $LIBS"
2493cat > conftest.$ac_ext <<EOF
3afbf314 2494#line 2495 "configure"
e1a191a8 2495#include "confdefs.h"
5852c051
JB
2496/* Override any gcc2 internal prototype to avoid an error. */
2497/* We use char because int might match the return type of a gcc2
2498 builtin and then its argument prototype would still apply. */
2499char gethostbyname();
2500
e1a191a8 2501int main() {
5852c051 2502gethostbyname()
e1a191a8
GH
2503; return 0; }
2504EOF
3afbf314 2505if { (eval echo configure:2506: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
e1a191a8 2506 rm -rf conftest*
5852c051 2507 eval "ac_cv_lib_$ac_lib_var=yes"
e1a191a8
GH
2508else
2509 echo "configure: failed program was:" >&5
2510 cat conftest.$ac_ext >&5
2511 rm -rf conftest*
5852c051 2512 eval "ac_cv_lib_$ac_lib_var=no"
e1a191a8
GH
2513fi
2514rm -f conftest*
5852c051 2515LIBS="$ac_save_LIBS"
e1a191a8 2516
5852c051
JB
2517fi
2518if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2519 echo "$ac_t""yes" 1>&6
2520 ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2521 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2522 cat >> confdefs.h <<EOF
2523#define $ac_tr_lib 1
e1a191a8
GH
2524EOF
2525
5852c051
JB
2526 LIBS="-lnsl $LIBS"
2527
2528else
2529 echo "$ac_t""no" 1>&6
e1a191a8
GH
2530fi
2531
5852c051 2532fi
4c787b52
MD
2533for ac_func in connect
2534do
2535echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3afbf314 2536echo "configure:2537: checking for $ac_func" >&5
4c787b52 2537if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3a629497
JB
2538 echo $ac_n "(cached) $ac_c" 1>&6
2539else
2540 cat > conftest.$ac_ext <<EOF
3afbf314 2541#line 2542 "configure"
3a629497
JB
2542#include "confdefs.h"
2543/* System header to define __stub macros and hopefully few prototypes,
4c787b52 2544 which can conflict with char $ac_func(); below. */
3a629497
JB
2545#include <assert.h>
2546/* Override any gcc2 internal prototype to avoid an error. */
2547/* We use char because int might match the return type of a gcc2
2548 builtin and then its argument prototype would still apply. */
4c787b52 2549char $ac_func();
3a629497
JB
2550
2551int main() {
2552
2553/* The GNU C library defines this for functions which it implements
2554 to always fail with ENOSYS. Some functions are actually named
2555 something starting with __ and the normal name is an alias. */
4c787b52 2556#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3a629497
JB
2557choke me
2558#else
4c787b52 2559$ac_func();
3a629497
JB
2560#endif
2561
2562; return 0; }
2563EOF
3afbf314 2564if { (eval echo configure:2565: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3a629497 2565 rm -rf conftest*
4c787b52 2566 eval "ac_cv_func_$ac_func=yes"
3a629497
JB
2567else
2568 echo "configure: failed program was:" >&5
2569 cat conftest.$ac_ext >&5
2570 rm -rf conftest*
4c787b52 2571 eval "ac_cv_func_$ac_func=no"
3a629497
JB
2572fi
2573rm -f conftest*
2574fi
2575
4c787b52 2576if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8e1bfcd0 2577 echo "$ac_t""yes" 1>&6
4c787b52
MD
2578 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2579 cat >> confdefs.h <<EOF
2580#define $ac_tr_func 1
2581EOF
2582
8e1bfcd0
JB
2583else
2584 echo "$ac_t""no" 1>&6
2585fi
4c787b52 2586done
8e1bfcd0 2587
5852c051
JB
2588if test $ac_cv_func_connect = no; then
2589 echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
3afbf314 2590echo "configure:2591: checking for connect in -lsocket" >&5
5852c051
JB
2591ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
2592if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8e1bfcd0
JB
2593 echo $ac_n "(cached) $ac_c" 1>&6
2594else
5852c051
JB
2595 ac_save_LIBS="$LIBS"
2596LIBS="-lsocket $LIBS"
2597cat > conftest.$ac_ext <<EOF
3afbf314 2598#line 2599 "configure"
8e1bfcd0 2599#include "confdefs.h"
8e1bfcd0
JB
2600/* Override any gcc2 internal prototype to avoid an error. */
2601/* We use char because int might match the return type of a gcc2
2602 builtin and then its argument prototype would still apply. */
5852c051 2603char connect();
8e1bfcd0
JB
2604
2605int main() {
5852c051 2606connect()
8e1bfcd0
JB
2607; return 0; }
2608EOF
3afbf314 2609if { (eval echo configure:2610: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
8e1bfcd0 2610 rm -rf conftest*
5852c051 2611 eval "ac_cv_lib_$ac_lib_var=yes"
8e1bfcd0
JB
2612else
2613 echo "configure: failed program was:" >&5
2614 cat conftest.$ac_ext >&5
2615 rm -rf conftest*
5852c051 2616 eval "ac_cv_lib_$ac_lib_var=no"
8e1bfcd0
JB
2617fi
2618rm -f conftest*
5852c051 2619LIBS="$ac_save_LIBS"
8e1bfcd0 2620
5852c051
JB
2621fi
2622if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3a629497 2623 echo "$ac_t""yes" 1>&6
5852c051
JB
2624 ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2625 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3a629497 2626 cat >> confdefs.h <<EOF
5852c051 2627#define $ac_tr_lib 1
3a629497 2628EOF
5852c051
JB
2629
2630 LIBS="-lsocket $LIBS"
2631
3a629497
JB
2632else
2633 echo "$ac_t""no" 1>&6
3a629497 2634fi
3a629497 2635
5852c051 2636fi
5ee74cec
JB
2637
2638for termlib in ncurses termcap ; do
2639 echo $ac_n "checking for tgoto in -l${termlib}""... $ac_c" 1>&6
3afbf314 2640echo "configure:2641: checking for tgoto in -l${termlib}" >&5
5ee74cec 2641ac_lib_var=`echo ${termlib}'_'tgoto | sed 'y%./+-%__p_%'`
81e9e32f
JB
2642if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2643 echo $ac_n "(cached) $ac_c" 1>&6
2644else
2645 ac_save_LIBS="$LIBS"
5ee74cec 2646LIBS="-l${termlib} $LIBS"
81e9e32f 2647cat > conftest.$ac_ext <<EOF
3afbf314 2648#line 2649 "configure"
81e9e32f
JB
2649#include "confdefs.h"
2650/* Override any gcc2 internal prototype to avoid an error. */
2651/* We use char because int might match the return type of a gcc2
2652 builtin and then its argument prototype would still apply. */
2653char tgoto();
2654
2655int main() {
2656tgoto()
2657; return 0; }
2658EOF
3afbf314 2659if { (eval echo configure:2660: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
81e9e32f
JB
2660 rm -rf conftest*
2661 eval "ac_cv_lib_$ac_lib_var=yes"
2662else
2663 echo "configure: failed program was:" >&5
2664 cat conftest.$ac_ext >&5
2665 rm -rf conftest*
2666 eval "ac_cv_lib_$ac_lib_var=no"
2667fi
2668rm -f conftest*
2669LIBS="$ac_save_LIBS"
2670
2671fi
2672if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2673 echo "$ac_t""yes" 1>&6
5ee74cec 2674 LIBS="-l${termlib} $LIBS"; break
81e9e32f
JB
2675else
2676 echo "$ac_t""no" 1>&6
2677fi
2678
5ee74cec
JB
2679done
2680echo $ac_n "checking for main in -lreadline""... $ac_c" 1>&6
3afbf314 2681echo "configure:2682: checking for main in -lreadline" >&5
5ee74cec 2682ac_lib_var=`echo readline'_'main | sed 'y%./+-%__p_%'`
81e9e32f
JB
2683if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2684 echo $ac_n "(cached) $ac_c" 1>&6
2685else
2686 ac_save_LIBS="$LIBS"
2687LIBS="-lreadline $LIBS"
2688cat > conftest.$ac_ext <<EOF
3afbf314 2689#line 2690 "configure"
81e9e32f 2690#include "confdefs.h"
81e9e32f
JB
2691
2692int main() {
5ee74cec 2693main()
81e9e32f
JB
2694; return 0; }
2695EOF
3afbf314 2696if { (eval echo configure:2697: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
81e9e32f
JB
2697 rm -rf conftest*
2698 eval "ac_cv_lib_$ac_lib_var=yes"
2699else
2700 echo "configure: failed program was:" >&5
2701 cat conftest.$ac_ext >&5
2702 rm -rf conftest*
2703 eval "ac_cv_lib_$ac_lib_var=no"
2704fi
2705rm -f conftest*
2706LIBS="$ac_save_LIBS"
2707
2708fi
2709if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2710 echo "$ac_t""yes" 1>&6
2711 ac_tr_lib=HAVE_LIB`echo readline | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2712 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2713 cat >> confdefs.h <<EOF
2714#define $ac_tr_lib 1
2715EOF
2716
2717 LIBS="-lreadline $LIBS"
2718
2719else
2720 echo "$ac_t""no" 1>&6
2721fi
2722
69c8bc06 2723for ac_func in rl_clear_signals rl_cleanup_after_signal
c700db4f
MD
2724do
2725echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3afbf314 2726echo "configure:2727: checking for $ac_func" >&5
c700db4f
MD
2727if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2728 echo $ac_n "(cached) $ac_c" 1>&6
2729else
2730 cat > conftest.$ac_ext <<EOF
3afbf314 2731#line 2732 "configure"
c700db4f
MD
2732#include "confdefs.h"
2733/* System header to define __stub macros and hopefully few prototypes,
2734 which can conflict with char $ac_func(); below. */
2735#include <assert.h>
2736/* Override any gcc2 internal prototype to avoid an error. */
2737/* We use char because int might match the return type of a gcc2
2738 builtin and then its argument prototype would still apply. */
2739char $ac_func();
2740
2741int main() {
2742
2743/* The GNU C library defines this for functions which it implements
2744 to always fail with ENOSYS. Some functions are actually named
2745 something starting with __ and the normal name is an alias. */
2746#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2747choke me
2748#else
2749$ac_func();
2750#endif
2751
2752; return 0; }
2753EOF
3afbf314 2754if { (eval echo configure:2755: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
c700db4f
MD
2755 rm -rf conftest*
2756 eval "ac_cv_func_$ac_func=yes"
2757else
2758 echo "configure: failed program was:" >&5
2759 cat conftest.$ac_ext >&5
2760 rm -rf conftest*
2761 eval "ac_cv_func_$ac_func=no"
2762fi
2763rm -f conftest*
2764fi
2765
2766if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2767 echo "$ac_t""yes" 1>&6
2768 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2769 cat >> confdefs.h <<EOF
2770#define $ac_tr_func 1
2771EOF
2772
2773else
2774 echo "$ac_t""no" 1>&6
2775fi
2776done
2777
69c8bc06
JB
2778
2779echo $ac_n "checking for rl_getc_function pointer in readline""... $ac_c" 1>&6
3afbf314 2780echo "configure:2781: checking for rl_getc_function pointer in readline" >&5
69c8bc06
JB
2781if eval "test \"`echo '$''{'ac_cv_var_rl_getc_function'+set}'`\" = set"; then
2782 echo $ac_n "(cached) $ac_c" 1>&6
2783else
2784 cat > conftest.$ac_ext <<EOF
3afbf314 2785#line 2786 "configure"
69c8bc06
JB
2786#include "confdefs.h"
2787
2788#include <stdio.h>
2789#include <readline/readline.h>
2790int main() {
2791rl_getc_function;
2792; return 0; }
2793EOF
3afbf314 2794if { (eval echo configure:2795: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
69c8bc06
JB
2795 rm -rf conftest*
2796 ac_cv_var_rl_getc_function=yes
2797else
2798 echo "configure: failed program was:" >&5
2799 cat conftest.$ac_ext >&5
2800 rm -rf conftest*
2801 ac_cv_var_rl_getc_function=no
2802fi
2803rm -f conftest*
2804fi
2805
2806echo "$ac_t""$ac_cv_var_rl_getc_function" 1>&6
402c4d4a
JB
2807if test "$ac_cv_var_rl_getc_function" = "yes"; then
2808 cat >> confdefs.h <<\EOF
2809#define HAVE_RL_GETC_FUNCTION 1
2810EOF
2811
2812fi
69c8bc06 2813
21cb5cfc 2814if test $ac_cv_lib_readline_main = yes -a $ac_cv_var_rl_getc_function = no; then
c700db4f
MD
2815 echo 'Warning: libreadline is too old on your system. Need >= 2.1.'
2816fi
3a629497 2817
90fcac06
JB
2818# Checks for dynamic linking
2819
5852c051 2820if test "$enable_dynamic_linking" = "yes"; then
3a629497 2821
5852c051 2822echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
3afbf314 2823echo "configure:2824: checking for dlopen in -ldl" >&5
5852c051
JB
2824ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
2825if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3a629497
JB
2826 echo $ac_n "(cached) $ac_c" 1>&6
2827else
5852c051
JB
2828 ac_save_LIBS="$LIBS"
2829LIBS="-ldl $LIBS"
2830cat > conftest.$ac_ext <<EOF
3afbf314 2831#line 2832 "configure"
3a629497 2832#include "confdefs.h"
5852c051
JB
2833/* Override any gcc2 internal prototype to avoid an error. */
2834/* We use char because int might match the return type of a gcc2
2835 builtin and then its argument prototype would still apply. */
2836char dlopen();
2837
3a629497 2838int main() {
5852c051 2839dlopen()
3a629497
JB
2840; return 0; }
2841EOF
3afbf314 2842if { (eval echo configure:2843: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3a629497 2843 rm -rf conftest*
5852c051 2844 eval "ac_cv_lib_$ac_lib_var=yes"
3a629497
JB
2845else
2846 echo "configure: failed program was:" >&5
2847 cat conftest.$ac_ext >&5
2848 rm -rf conftest*
5852c051 2849 eval "ac_cv_lib_$ac_lib_var=no"
3a629497
JB
2850fi
2851rm -f conftest*
5852c051 2852LIBS="$ac_save_LIBS"
3a629497 2853
5852c051
JB
2854fi
2855if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2856 echo "$ac_t""yes" 1>&6
2857 ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2858 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2859 cat >> confdefs.h <<EOF
2860#define $ac_tr_lib 1
3a629497
JB
2861EOF
2862
5852c051
JB
2863 LIBS="-ldl $LIBS"
2864
2865else
2866 echo "$ac_t""no" 1>&6
3a629497
JB
2867fi
2868
5852c051 2869if test "$ac_cv_lib_dl_dlopen" = "yes"; then
4c787b52
MD
2870 for ac_func in dlopen
2871do
2872echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3afbf314 2873echo "configure:2874: checking for $ac_func" >&5
4c787b52 2874if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
9dca3959
MD
2875 echo $ac_n "(cached) $ac_c" 1>&6
2876else
2877 cat > conftest.$ac_ext <<EOF
3afbf314 2878#line 2879 "configure"
9dca3959
MD
2879#include "confdefs.h"
2880/* System header to define __stub macros and hopefully few prototypes,
4c787b52 2881 which can conflict with char $ac_func(); below. */
9dca3959
MD
2882#include <assert.h>
2883/* Override any gcc2 internal prototype to avoid an error. */
2884/* We use char because int might match the return type of a gcc2
2885 builtin and then its argument prototype would still apply. */
4c787b52 2886char $ac_func();
9dca3959
MD
2887
2888int main() {
2889
2890/* The GNU C library defines this for functions which it implements
2891 to always fail with ENOSYS. Some functions are actually named
2892 something starting with __ and the normal name is an alias. */
4c787b52 2893#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9dca3959
MD
2894choke me
2895#else
4c787b52 2896$ac_func();
9dca3959
MD
2897#endif
2898
2899; return 0; }
26c41b99 2900EOF
3afbf314 2901if { (eval echo configure:2902: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
9dca3959 2902 rm -rf conftest*
4c787b52 2903 eval "ac_cv_func_$ac_func=yes"
9dca3959
MD
2904else
2905 echo "configure: failed program was:" >&5
2906 cat conftest.$ac_ext >&5
2907 rm -rf conftest*
4c787b52 2908 eval "ac_cv_func_$ac_func=no"
9dca3959
MD
2909fi
2910rm -f conftest*
2911fi
2912
4c787b52 2913if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9dca3959 2914 echo "$ac_t""yes" 1>&6
4c787b52
MD
2915 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2916 cat >> confdefs.h <<EOF
2917#define $ac_tr_func 1
2918EOF
2919
9dca3959
MD
2920else
2921 echo "$ac_t""no" 1>&6
2922fi
4c787b52 2923done
26c41b99 2924
5852c051
JB
2925 cat >> confdefs.h <<\EOF
2926#define DYNAMIC_LINKING 1
2927EOF
2928
2929else
2930echo $ac_n "checking for dld_link in -ldld""... $ac_c" 1>&6
3afbf314 2931echo "configure:2932: checking for dld_link in -ldld" >&5
5852c051
JB
2932ac_lib_var=`echo dld'_'dld_link | sed 'y%./+-%__p_%'`
2933if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3a629497
JB
2934 echo $ac_n "(cached) $ac_c" 1>&6
2935else
5852c051
JB
2936 ac_save_LIBS="$LIBS"
2937LIBS="-ldld $LIBS"
2938cat > conftest.$ac_ext <<EOF
3afbf314 2939#line 2940 "configure"
3a629497 2940#include "confdefs.h"
5852c051
JB
2941/* Override any gcc2 internal prototype to avoid an error. */
2942/* We use char because int might match the return type of a gcc2
2943 builtin and then its argument prototype would still apply. */
2944char dld_link();
3a629497
JB
2945
2946int main() {
5852c051 2947dld_link()
3a629497
JB
2948; return 0; }
2949EOF
3afbf314 2950if { (eval echo configure:2951: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3a629497 2951 rm -rf conftest*
5852c051 2952 eval "ac_cv_lib_$ac_lib_var=yes"
3a629497
JB
2953else
2954 echo "configure: failed program was:" >&5
2955 cat conftest.$ac_ext >&5
2956 rm -rf conftest*
5852c051 2957 eval "ac_cv_lib_$ac_lib_var=no"
3a629497
JB
2958fi
2959rm -f conftest*
5852c051 2960LIBS="$ac_save_LIBS"
3a629497
JB
2961
2962fi
5852c051
JB
2963if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2964 echo "$ac_t""yes" 1>&6
2965 ac_tr_lib=HAVE_LIB`echo dld | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2966 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2967 cat >> confdefs.h <<EOF
2968#define $ac_tr_lib 1
3a629497
JB
2969EOF
2970
5852c051 2971 LIBS="-ldld $LIBS"
3a629497 2972
3a629497 2973else
5852c051 2974 echo "$ac_t""no" 1>&6
3a629497 2975fi
3a629497 2976
5852c051 2977if test "$ac_cv_lib_dld_dld_link" = "yes"; then
5852c051
JB
2978 cat >> confdefs.h <<\EOF
2979#define DYNAMIC_LINKING 1
2980EOF
3a629497 2981
5852c051 2982else
4c787b52
MD
2983for ac_func in shl_load
2984do
2985echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3afbf314 2986echo "configure:2987: checking for $ac_func" >&5
4c787b52 2987if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3a629497
JB
2988 echo $ac_n "(cached) $ac_c" 1>&6
2989else
2990 cat > conftest.$ac_ext <<EOF
3afbf314 2991#line 2992 "configure"
3a629497
JB
2992#include "confdefs.h"
2993/* System header to define __stub macros and hopefully few prototypes,
4c787b52 2994 which can conflict with char $ac_func(); below. */
3a629497
JB
2995#include <assert.h>
2996/* Override any gcc2 internal prototype to avoid an error. */
2997/* We use char because int might match the return type of a gcc2
2998 builtin and then its argument prototype would still apply. */
4c787b52 2999char $ac_func();
3a629497
JB
3000
3001int main() {
3002
3003/* The GNU C library defines this for functions which it implements
3004 to always fail with ENOSYS. Some functions are actually named
3005 something starting with __ and the normal name is an alias. */
4c787b52 3006#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3a629497
JB
3007choke me
3008#else
4c787b52 3009$ac_func();
3a629497
JB
3010#endif
3011
3012; return 0; }
3013EOF
3afbf314 3014if { (eval echo configure:3015: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3a629497 3015 rm -rf conftest*
4c787b52 3016 eval "ac_cv_func_$ac_func=yes"
3a629497
JB
3017else
3018 echo "configure: failed program was:" >&5
3019 cat conftest.$ac_ext >&5
3020 rm -rf conftest*
4c787b52 3021 eval "ac_cv_func_$ac_func=no"
3a629497
JB
3022fi
3023rm -f conftest*
3024fi
3025
4c787b52 3026if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3a629497 3027 echo "$ac_t""yes" 1>&6
4c787b52
MD
3028 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3029 cat >> confdefs.h <<EOF
3030#define $ac_tr_func 1
3031EOF
3032
3a629497
JB
3033else
3034 echo "$ac_t""no" 1>&6
3035fi
4c787b52 3036done
3a629497 3037
5852c051
JB
3038if test "$ac_cv_func_shl_load" = "yes"; then
3039 cat >> confdefs.h <<\EOF
3040#define DYNAMIC_LINKING 1
3a629497 3041EOF
5852c051 3042
a4995389 3043else
4c787b52
MD
3044for ac_func in dlopen
3045do
3046echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3afbf314 3047echo "configure:3048: checking for $ac_func" >&5
4c787b52 3048if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
a4995389
MV
3049 echo $ac_n "(cached) $ac_c" 1>&6
3050else
3051 cat > conftest.$ac_ext <<EOF
3afbf314 3052#line 3053 "configure"
a4995389
MV
3053#include "confdefs.h"
3054/* System header to define __stub macros and hopefully few prototypes,
4c787b52 3055 which can conflict with char $ac_func(); below. */
a4995389
MV
3056#include <assert.h>
3057/* Override any gcc2 internal prototype to avoid an error. */
3058/* We use char because int might match the return type of a gcc2
3059 builtin and then its argument prototype would still apply. */
4c787b52 3060char $ac_func();
a4995389
MV
3061
3062int main() {
3063
3064/* The GNU C library defines this for functions which it implements
3065 to always fail with ENOSYS. Some functions are actually named
3066 something starting with __ and the normal name is an alias. */
4c787b52 3067#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
a4995389
MV
3068choke me
3069#else
4c787b52 3070$ac_func();
a4995389
MV
3071#endif
3072
3073; return 0; }
3074EOF
3afbf314 3075if { (eval echo configure:3076: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
a4995389 3076 rm -rf conftest*
4c787b52 3077 eval "ac_cv_func_$ac_func=yes"
a4995389
MV
3078else
3079 echo "configure: failed program was:" >&5
3080 cat conftest.$ac_ext >&5
3081 rm -rf conftest*
4c787b52 3082 eval "ac_cv_func_$ac_func=no"
a4995389
MV
3083fi
3084rm -f conftest*
3085fi
3086
4c787b52 3087if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
a4995389 3088 echo "$ac_t""yes" 1>&6
4c787b52
MD
3089 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3090 cat >> confdefs.h <<EOF
3091#define $ac_tr_func 1
3092EOF
3093
a4995389
MV
3094else
3095 echo "$ac_t""no" 1>&6
3096fi
4c787b52 3097done
a4995389
MV
3098
3099if test "$ac_cv_func_dlopen" = "yes"; then
3100 cat >> confdefs.h <<\EOF
3101#define DYNAMIC_LINKING 1
3102EOF
3103
3104fi
3a629497 3105fi
3a629497 3106fi
3a629497
JB
3107fi
3108
3a629497
JB
3109fi
3110
774b7f22
TP
3111
3112 echo $ac_n "checking for underscore before symbols""... $ac_c" 1>&6
3afbf314 3113echo "configure:3114: checking for underscore before symbols" >&5
774b7f22
TP
3114 if eval "test \"`echo '$''{'guile_cv_uscore'+set}'`\" = set"; then
3115 echo $ac_n "(cached) $ac_c" 1>&6
3116else
3117
3118 echo "main(){int i=1;}
3119 fnord(){int i=23; int ltuae=42;}" > conftest.c
3120 ${CC} conftest.c > /dev/null
3121 if (nm a.out | grep _fnord) > /dev/null; then
3122 guile_cv_uscore=yes
3123 else
3124 guile_cv_uscore=no
3125 fi
3126fi
3127
3128 echo "$ac_t""$guile_cv_uscore" 1>&6
3129 rm -f conftest.c a.out
3130
3131 if test $guile_cv_uscore = yes; then
3132 cat >> confdefs.h <<\EOF
3133#define USCORE 1
3134EOF
3135
3136
3137 if test $ac_cv_func_dlopen = yes -o $ac_cv_lib_dl_dlopen = yes ; then
3138 echo $ac_n "checking whether dlsym always adds an underscore for us""... $ac_c" 1>&6
3afbf314 3139echo "configure:3140: checking whether dlsym always adds an underscore for us" >&5
774b7f22
TP
3140 if eval "test \"`echo '$''{'guile_cv_dlsym_adds_uscore'+set}'`\" = set"; then
3141 echo $ac_n "(cached) $ac_c" 1>&6
3142else
3143 if test "$cross_compiling" = yes; then
5aadf8c1 3144 guile_cv_dlsym_adds_uscore=no
774b7f22
TP
3145else
3146 cat > conftest.$ac_ext <<EOF
3afbf314 3147#line 3148 "configure"
774b7f22
TP
3148#include "confdefs.h"
3149
3150#include <dlfcn.h>
3151#include <stdio.h>
3152fnord() { int i=42;}
3153main() { void *self, *ptr1, *ptr2; self=dlopen(NULL,RTLD_LAZY);
3154 if(self) { ptr1=dlsym(self,"fnord"); ptr2=dlsym(self,"_fnord");
3155 if(ptr1 && !ptr2) exit(0); } exit(1); }
3156
3157EOF
3afbf314 3158if { (eval echo configure:3159: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
774b7f22
TP
3159then
3160 guile_cv_dlsym_adds_uscore=yes
3161 cat >> confdefs.h <<\EOF
3162#define DLSYM_ADDS_USCORE 1
3163EOF
3164
3165else
3166 echo "configure: failed program was:" >&5
3167 cat conftest.$ac_ext >&5
3168 rm -fr conftest*
3169 guile_cv_dlsym_adds_uscore=no
3170fi
3171rm -fr conftest*
3172fi
3173
3174fi
3175
3176
3177 echo "$ac_t""$guile_cv_dlsym_adds_uscore" 1>&6
3178 fi
3179 fi
3180
3a629497 3181
4f654c0e 3182for 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
3183do
3184echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3afbf314 3185echo "configure:3186: checking for $ac_func" >&5
5852c051 3186if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3a629497
JB
3187 echo $ac_n "(cached) $ac_c" 1>&6
3188else
3189 cat > conftest.$ac_ext <<EOF
3afbf314 3190#line 3191 "configure"
3a629497 3191#include "confdefs.h"
5852c051
JB
3192/* System header to define __stub macros and hopefully few prototypes,
3193 which can conflict with char $ac_func(); below. */
3194#include <assert.h>
3195/* Override any gcc2 internal prototype to avoid an error. */
3196/* We use char because int might match the return type of a gcc2
3197 builtin and then its argument prototype would still apply. */
3198char $ac_func();
3199
3a629497 3200int main() {
5852c051
JB
3201
3202/* The GNU C library defines this for functions which it implements
3203 to always fail with ENOSYS. Some functions are actually named
3204 something starting with __ and the normal name is an alias. */
3205#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3206choke me
3207#else
3208$ac_func();
3209#endif
3210
3a629497
JB
3211; return 0; }
3212EOF
3afbf314 3213if { (eval echo configure:3214: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3a629497 3214 rm -rf conftest*
5852c051 3215 eval "ac_cv_func_$ac_func=yes"
3a629497
JB
3216else
3217 echo "configure: failed program was:" >&5
3218 cat conftest.$ac_ext >&5
3219 rm -rf conftest*
5852c051 3220 eval "ac_cv_func_$ac_func=no"
3a629497
JB
3221fi
3222rm -f conftest*
3223fi
3224
5852c051
JB
3225if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3226 echo "$ac_t""yes" 1>&6
3227 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3228 cat >> confdefs.h <<EOF
3229#define $ac_tr_func 1
3a629497 3230EOF
5852c051
JB
3231
3232else
3233 echo "$ac_t""no" 1>&6
3a629497 3234fi
5852c051 3235done
3a629497 3236
5852c051 3237
777b022a
JB
3238### Some systems don't declare some functions. On such systems, we
3239### need to at least provide our own K&R-style declarations.
64e121dc 3240
777b022a
JB
3241### GUILE_FUNC_DECLARED(function, headerfile)
3242
3243### Check for a declaration of FUNCTION in HEADERFILE; if it is
3244### not there, #define MISSING_FUNCTION_DECL.
3245
3246
3247
3248 echo $ac_n "checking for strptime declaration""... $ac_c" 1>&6
3afbf314 3249echo "configure:3250: checking for strptime declaration" >&5
dc70c998 3250if eval "test \"`echo '$''{'guile_cv_func_strptime_declared'+set}'`\" = set"; then
777b022a
JB
3251 echo $ac_n "(cached) $ac_c" 1>&6
3252else
3253 cat > conftest.$ac_ext <<EOF
3afbf314 3254#line 3255 "configure"
777b022a
JB
3255#include "confdefs.h"
3256#include <time.h>
3257EOF
3258if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3259 egrep "strptime" >/dev/null 2>&1; then
3260 rm -rf conftest*
dc70c998 3261 guile_cv_func_strptime_declared=yes
777b022a
JB
3262else
3263 rm -rf conftest*
dc70c998 3264 guile_cv_func_strptime_declared=no
64e121dc 3265fi
777b022a 3266rm -f conftest*
64e121dc 3267
777b022a 3268fi
64e121dc 3269
dc70c998
JB
3270echo "$ac_t""$guile_cv_func_strptime_declared" 1>&6
3271 if test x$guile_cv_func_strptime_declared = xno; then
777b022a
JB
3272 cat >> confdefs.h <<\EOF
3273#define MISSING_STRPTIME_DECL 1
3274EOF
64e121dc 3275
777b022a 3276 fi
64e121dc
MD
3277
3278
777b022a 3279 echo $ac_n "checking for bzero declaration""... $ac_c" 1>&6
3afbf314 3280echo "configure:3281: checking for bzero declaration" >&5
dc70c998 3281if eval "test \"`echo '$''{'guile_cv_func_bzero_declared'+set}'`\" = set"; then
777b022a
JB
3282 echo $ac_n "(cached) $ac_c" 1>&6
3283else
3284 cat > conftest.$ac_ext <<EOF
3afbf314 3285#line 3286 "configure"
777b022a
JB
3286#include "confdefs.h"
3287#include <string.h>
3288EOF
3289if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3290 egrep "bzero" >/dev/null 2>&1; then
3291 rm -rf conftest*
dc70c998 3292 guile_cv_func_bzero_declared=yes
777b022a
JB
3293else
3294 rm -rf conftest*
dc70c998 3295 guile_cv_func_bzero_declared=no
777b022a
JB
3296fi
3297rm -f conftest*
3298
3299fi
3300
dc70c998
JB
3301echo "$ac_t""$guile_cv_func_bzero_declared" 1>&6
3302 if test x$guile_cv_func_bzero_declared = xno; then
64e121dc 3303 cat >> confdefs.h <<\EOF
777b022a 3304#define MISSING_BZERO_DECL 1
64e121dc
MD
3305EOF
3306
777b022a
JB
3307 fi
3308
3309
c31bfb85 3310 echo $ac_n "checking for sleep declaration""... $ac_c" 1>&6
3afbf314 3311echo "configure:3312: checking for sleep declaration" >&5
dc70c998 3312if eval "test \"`echo '$''{'guile_cv_func_sleep_declared'+set}'`\" = set"; then
c31bfb85
JB
3313 echo $ac_n "(cached) $ac_c" 1>&6
3314else
3315 cat > conftest.$ac_ext <<EOF
3afbf314 3316#line 3317 "configure"
c31bfb85
JB
3317#include "confdefs.h"
3318#include <unistd.h>
3319EOF
3320if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3321 egrep "sleep" >/dev/null 2>&1; then
3322 rm -rf conftest*
dc70c998 3323 guile_cv_func_sleep_declared=yes
c31bfb85
JB
3324else
3325 rm -rf conftest*
dc70c998 3326 guile_cv_func_sleep_declared=no
c31bfb85
JB
3327fi
3328rm -f conftest*
3329
3330fi
3331
dc70c998
JB
3332echo "$ac_t""$guile_cv_func_sleep_declared" 1>&6
3333 if test x$guile_cv_func_sleep_declared = xno; then
c31bfb85
JB
3334 cat >> confdefs.h <<\EOF
3335#define MISSING_SLEEP_DECL 1
3336EOF
3337
3338 fi
3339
3340
777b022a 3341 echo $ac_n "checking for usleep declaration""... $ac_c" 1>&6
3afbf314 3342echo "configure:3343: checking for usleep declaration" >&5
dc70c998 3343if eval "test \"`echo '$''{'guile_cv_func_usleep_declared'+set}'`\" = set"; then
777b022a
JB
3344 echo $ac_n "(cached) $ac_c" 1>&6
3345else
3346 cat > conftest.$ac_ext <<EOF
3afbf314 3347#line 3348 "configure"
777b022a
JB
3348#include "confdefs.h"
3349#include <unistd.h>
3350EOF
3351if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3352 egrep "usleep" >/dev/null 2>&1; then
3353 rm -rf conftest*
dc70c998 3354 guile_cv_func_usleep_declared=yes
777b022a
JB
3355else
3356 rm -rf conftest*
dc70c998 3357 guile_cv_func_usleep_declared=no
777b022a
JB
3358fi
3359rm -f conftest*
3360
3361fi
3362
dc70c998
JB
3363echo "$ac_t""$guile_cv_func_usleep_declared" 1>&6
3364 if test x$guile_cv_func_usleep_declared = xno; then
64e121dc 3365 cat >> confdefs.h <<\EOF
777b022a 3366#define MISSING_USLEEP_DECL 1
64e121dc
MD
3367EOF
3368
777b022a
JB
3369 fi
3370
64e121dc 3371
da753252
JB
3372### On some systems usleep has no return value. If it does have one,
3373### we'd like to return it; otherwise, we'll fake it.
dc70c998 3374echo $ac_n "checking return type of usleep""... $ac_c" 1>&6
3afbf314 3375echo "configure:3376: checking return type of usleep" >&5
dc70c998
JB
3376if eval "test \"`echo '$''{'guile_cv_func_usleep_return_type'+set}'`\" = set"; then
3377 echo $ac_n "(cached) $ac_c" 1>&6
3378else
3379 cat > conftest.$ac_ext <<EOF
3afbf314 3380#line 3381 "configure"
0935d604
MD
3381#include "confdefs.h"
3382#include </usr/include/unistd.h>
3383EOF
3384if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
c43f86c1 3385 egrep "void[ ]+usleep" >/dev/null 2>&1; then
0935d604 3386 rm -rf conftest*
dc70c998
JB
3387 guile_cv_func_usleep_return_type=void
3388else
3389 rm -rf conftest*
3390 guile_cv_func_usleep_return_type=int
3391fi
3392rm -f conftest*
3393
3394fi
3395
3396echo "$ac_t""$guile_cv_func_usleep_return_type" 1>&6
3397case "$guile_cv_func_usleep_return_type" in
3398 "void" )
3399 cat >> confdefs.h <<\EOF
0935d604
MD
3400#define USLEEP_RETURNS_VOID 1
3401EOF
3402
dc70c998
JB
3403 ;;
3404esac
0935d604 3405
da88f0cb
JB
3406
3407ac_safe=`echo "sys/un.h" | sed 'y%./+-%__p_%'`
3408echo $ac_n "checking for sys/un.h""... $ac_c" 1>&6
3afbf314 3409echo "configure:3410: checking for sys/un.h" >&5
da88f0cb
JB
3410if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3411 echo $ac_n "(cached) $ac_c" 1>&6
3412else
3413 cat > conftest.$ac_ext <<EOF
3afbf314 3414#line 3415 "configure"
da88f0cb
JB
3415#include "confdefs.h"
3416#include <sys/un.h>
3417EOF
3418ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3afbf314 3419{ (eval echo configure:3420: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2c9a3a48 3420ac_err=`grep -v '^ *+' conftest.out`
da88f0cb
JB
3421if test -z "$ac_err"; then
3422 rm -rf conftest*
3423 eval "ac_cv_header_$ac_safe=yes"
3424else
3425 echo "$ac_err" >&5
3426 echo "configure: failed program was:" >&5
3427 cat conftest.$ac_ext >&5
3428 rm -rf conftest*
3429 eval "ac_cv_header_$ac_safe=no"
3430fi
3431rm -f conftest*
3432fi
3433if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3434 echo "$ac_t""yes" 1>&6
3435 have_sys_un_h=1
3436else
3437 echo "$ac_t""no" 1>&6
3438fi
3439
3440if test -n "$have_sys_un_h" ; then
3441cat >> confdefs.h <<\EOF
3442#define HAVE_UNIX_DOMAIN_SOCKETS 1
3443EOF
3444
3445fi
3446
3447for ac_func in socketpair getgroups setpwent pause tzset
3448do
3449echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3afbf314 3450echo "configure:3451: checking for $ac_func" >&5
da88f0cb
JB
3451if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3452 echo $ac_n "(cached) $ac_c" 1>&6
3453else
3454 cat > conftest.$ac_ext <<EOF
3afbf314 3455#line 3456 "configure"
da88f0cb
JB
3456#include "confdefs.h"
3457/* System header to define __stub macros and hopefully few prototypes,
3458 which can conflict with char $ac_func(); below. */
3459#include <assert.h>
3460/* Override any gcc2 internal prototype to avoid an error. */
3461/* We use char because int might match the return type of a gcc2
3462 builtin and then its argument prototype would still apply. */
3463char $ac_func();
3464
3465int main() {
3466
3467/* The GNU C library defines this for functions which it implements
3468 to always fail with ENOSYS. Some functions are actually named
3469 something starting with __ and the normal name is an alias. */
3470#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3471choke me
3472#else
3473$ac_func();
3474#endif
3475
3476; return 0; }
3477EOF
3afbf314 3478if { (eval echo configure:3479: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
da88f0cb
JB
3479 rm -rf conftest*
3480 eval "ac_cv_func_$ac_func=yes"
3481else
3482 echo "configure: failed program was:" >&5
3483 cat conftest.$ac_ext >&5
3484 rm -rf conftest*
3485 eval "ac_cv_func_$ac_func=no"
3486fi
3487rm -f conftest*
3488fi
3489
3490if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3491 echo "$ac_t""yes" 1>&6
3492 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3493 cat >> confdefs.h <<EOF
3494#define $ac_tr_func 1
3495EOF
3496
3497else
3498 echo "$ac_t""no" 1>&6
3499fi
3500done
3501
3502
f4e5b810
GH
3503
3504
3505
3506for ac_func in sethostent endhostent getnetent setnetent endnetent getprotoent endprotoent getservent endservent getnetbyaddr getnetbyname inet_lnaof inet_makeaddr inet_netof
3507do
3508echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3afbf314 3509echo "configure:3510: checking for $ac_func" >&5
f4e5b810 3510if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
da88f0cb
JB
3511 echo $ac_n "(cached) $ac_c" 1>&6
3512else
3513 cat > conftest.$ac_ext <<EOF
3afbf314 3514#line 3515 "configure"
da88f0cb
JB
3515#include "confdefs.h"
3516/* System header to define __stub macros and hopefully few prototypes,
f4e5b810 3517 which can conflict with char $ac_func(); below. */
da88f0cb
JB
3518#include <assert.h>
3519/* Override any gcc2 internal prototype to avoid an error. */
3520/* We use char because int might match the return type of a gcc2
3521 builtin and then its argument prototype would still apply. */
f4e5b810 3522char $ac_func();
da88f0cb
JB
3523
3524int main() {
3525
3526/* The GNU C library defines this for functions which it implements
3527 to always fail with ENOSYS. Some functions are actually named
3528 something starting with __ and the normal name is an alias. */
f4e5b810 3529#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
da88f0cb
JB
3530choke me
3531#else
f4e5b810 3532$ac_func();
da88f0cb
JB
3533#endif
3534
3535; return 0; }
3536EOF
3afbf314 3537if { (eval echo configure:3538: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
da88f0cb 3538 rm -rf conftest*
f4e5b810 3539 eval "ac_cv_func_$ac_func=yes"
da88f0cb
JB
3540else
3541 echo "configure: failed program was:" >&5
3542 cat conftest.$ac_ext >&5
3543 rm -rf conftest*
f4e5b810 3544 eval "ac_cv_func_$ac_func=no"
da88f0cb
JB
3545fi
3546rm -f conftest*
3547fi
3548
f4e5b810 3549if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
da88f0cb 3550 echo "$ac_t""yes" 1>&6
f4e5b810
GH
3551 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3552 cat >> confdefs.h <<EOF
3553#define $ac_tr_func 1
3554EOF
3555
da88f0cb
JB
3556else
3557 echo "$ac_t""no" 1>&6
3558fi
da88f0cb 3559done
f4e5b810 3560
da88f0cb
JB
3561
3562
5852c051 3563echo $ac_n "checking for restartable system calls""... $ac_c" 1>&6
3afbf314 3564echo "configure:3565: checking for restartable system calls" >&5
5852c051 3565if eval "test \"`echo '$''{'scm_cv_restarts'+set}'`\" = set"; then
3a629497
JB
3566 echo $ac_n "(cached) $ac_c" 1>&6
3567else
5852c051
JB
3568 if test $ac_cv_func_sigaction = yes; then
3569 cat > conftest.$ac_ext <<EOF
3afbf314 3570#line 3571 "configure"
3a629497 3571#include "confdefs.h"
5852c051 3572#include <signal.h>
3a629497 3573int main() {
5852c051 3574int a = SA_RESTART
3a629497
JB
3575; return 0; }
3576EOF
3afbf314 3577if { (eval echo configure:3578: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3a629497 3578 rm -rf conftest*
5852c051 3579 scm_cv_restarts=yes
3a629497
JB
3580else
3581 echo "configure: failed program was:" >&5
3582 cat conftest.$ac_ext >&5
3583 rm -rf conftest*
5852c051 3584 scm_cv_restarts=no
3a629497
JB
3585fi
3586rm -f conftest*
5852c051
JB
3587 else
3588 scm_cv_restarts=no
3589 fi
3a629497
JB
3590fi
3591
5852c051
JB
3592echo "$ac_t""$scm_cv_restarts" 1>&6
3593if test $scm_cv_restarts = yes; then
3594 cat >> confdefs.h <<\EOF
3595#define HAVE_RESTARTS 1
3a629497
JB
3596EOF
3597
3598fi
3599
365d0782
MD
3600if test "$ac_cv_header_regex_h" = yes ||
3601 test "$ac_cv_header_rxposix_h" = yes ||
3602 test "$ac_cv_header_rx_rxposix_h" = yes; then
365d0782 3603 echo $ac_n "checking for regcomp""... $ac_c" 1>&6
3afbf314 3604echo "configure:3605: checking for regcomp" >&5
0b89e78e 3605if eval "test \"`echo '$''{'ac_cv_func_regcomp_norx'+set}'`\" = set"; then
3a629497
JB
3606 echo $ac_n "(cached) $ac_c" 1>&6
3607else
3608 cat > conftest.$ac_ext <<EOF
3afbf314 3609#line 3610 "configure"
3a629497 3610#include "confdefs.h"
5852c051 3611/* System header to define __stub macros and hopefully few prototypes,
365d0782 3612 which can conflict with char regcomp(); below. */
5852c051
JB
3613#include <assert.h>
3614/* Override any gcc2 internal prototype to avoid an error. */
3615/* We use char because int might match the return type of a gcc2
3616 builtin and then its argument prototype would still apply. */
365d0782 3617char regcomp();
5852c051 3618
3a629497 3619int main() {
5852c051
JB
3620
3621/* The GNU C library defines this for functions which it implements
3622 to always fail with ENOSYS. Some functions are actually named
3623 something starting with __ and the normal name is an alias. */
365d0782 3624#if defined (__stub_regcomp) || defined (__stub___regcomp)
5852c051
JB
3625choke me
3626#else
365d0782 3627regcomp();
5852c051
JB
3628#endif
3629
3a629497
JB
3630; return 0; }
3631EOF
3afbf314 3632if { (eval echo configure:3633: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3a629497 3633 rm -rf conftest*
0b89e78e 3634 eval "ac_cv_func_regcomp_norx=yes"
3a629497
JB
3635else
3636 echo "configure: failed program was:" >&5
3637 cat conftest.$ac_ext >&5
3638 rm -rf conftest*
0b89e78e 3639 eval "ac_cv_func_regcomp_norx=no"
3a629497
JB
3640fi
3641rm -f conftest*
3642fi
3643
0b89e78e 3644if eval "test \"`echo '$ac_cv_func_'regcomp'_'norx`\" = yes"; then
5852c051 3645 echo "$ac_t""yes" 1>&6
365d0782
MD
3646 LIBOBJS="regex-posix.o $LIBOBJS"
3647else
3648 echo "$ac_t""no" 1>&6
0b89e78e 3649echo $ac_n "checking for main in -lrx""... $ac_c" 1>&6
3afbf314 3650echo "configure:3651: checking for main in -lrx" >&5
365d0782
MD
3651ac_lib_var=`echo rx'_'main | sed 'y%./+-%__p_%'`
3652if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3653 echo $ac_n "(cached) $ac_c" 1>&6
3654else
3655 ac_save_LIBS="$LIBS"
3656LIBS="-lrx $LIBS"
3657cat > conftest.$ac_ext <<EOF
3afbf314 3658#line 3659 "configure"
365d0782
MD
3659#include "confdefs.h"
3660
3661int main() {
3662main()
3663; return 0; }
3664EOF
3afbf314 3665if { (eval echo configure:3666: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
365d0782
MD
3666 rm -rf conftest*
3667 eval "ac_cv_lib_$ac_lib_var=yes"
3668else
3669 echo "configure: failed program was:" >&5
3670 cat conftest.$ac_ext >&5
3671 rm -rf conftest*
3672 eval "ac_cv_lib_$ac_lib_var=no"
3673fi
3674rm -f conftest*
3675LIBS="$ac_save_LIBS"
3676
3677fi
3678if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3679 echo "$ac_t""yes" 1>&6
3680 ac_tr_lib=HAVE_LIB`echo rx | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3681 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5852c051 3682 cat >> confdefs.h <<EOF
365d0782 3683#define $ac_tr_lib 1
3a629497 3684EOF
365d0782
MD
3685
3686 LIBS="-lrx $LIBS"
3687
5852c051
JB
3688else
3689 echo "$ac_t""no" 1>&6
3a629497
JB
3690fi
3691
0b89e78e 3692 echo $ac_n "checking for regcomp""... $ac_c" 1>&6
3afbf314 3693echo "configure:3694: checking for regcomp" >&5
0b89e78e 3694if eval "test \"`echo '$''{'ac_cv_func_regcomp_rx'+set}'`\" = set"; then
365d0782
MD
3695 echo $ac_n "(cached) $ac_c" 1>&6
3696else
3697 cat > conftest.$ac_ext <<EOF
3afbf314 3698#line 3699 "configure"
365d0782
MD
3699#include "confdefs.h"
3700/* System header to define __stub macros and hopefully few prototypes,
3701 which can conflict with char regcomp(); below. */
3702#include <assert.h>
3703/* Override any gcc2 internal prototype to avoid an error. */
3704/* We use char because int might match the return type of a gcc2
3705 builtin and then its argument prototype would still apply. */
3706char regcomp();
3707
3708int main() {
3709
3710/* The GNU C library defines this for functions which it implements
3711 to always fail with ENOSYS. Some functions are actually named
3712 something starting with __ and the normal name is an alias. */
3713#if defined (__stub_regcomp) || defined (__stub___regcomp)
3714choke me
3715#else
3716regcomp();
3717#endif
3718
3719; return 0; }
3720EOF
3afbf314 3721if { (eval echo configure:3722: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
365d0782 3722 rm -rf conftest*
0b89e78e 3723 eval "ac_cv_func_regcomp_rx=yes"
365d0782
MD
3724else
3725 echo "configure: failed program was:" >&5
3726 cat conftest.$ac_ext >&5
3727 rm -rf conftest*
0b89e78e 3728 eval "ac_cv_func_regcomp_rx=no"
365d0782
MD
3729fi
3730rm -f conftest*
3731fi
3732
0b89e78e 3733if eval "test \"`echo '$ac_cv_func_'regcomp'_'rx`\" = yes"; then
365d0782
MD
3734 echo "$ac_t""yes" 1>&6
3735 LIBOBJS="regex-posix.o $LIBOBJS"
3736else
3737 echo "$ac_t""no" 1>&6
3738fi
3739
0b89e78e
MD
3740
3741fi
3742
3743 if test "$ac_cv_func_regcomp_norx" = yes ||
3744 test "$ac_cv_func_regcomp_rx" = yes; then
365d0782
MD
3745 cat >> confdefs.h <<\EOF
3746#define HAVE_REGCOMP 1
3747EOF
3748
3749 fi
da88f0cb 3750fi
5852c051
JB
3751
3752for ac_func in inet_aton putenv strerror
3753do
3754echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3afbf314 3755echo "configure:3756: checking for $ac_func" >&5
5852c051 3756if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3a629497
JB
3757 echo $ac_n "(cached) $ac_c" 1>&6
3758else
3759 cat > conftest.$ac_ext <<EOF
3afbf314 3760#line 3761 "configure"
3a629497 3761#include "confdefs.h"
5852c051
JB
3762/* System header to define __stub macros and hopefully few prototypes,
3763 which can conflict with char $ac_func(); below. */
3764#include <assert.h>
3765/* Override any gcc2 internal prototype to avoid an error. */
3766/* We use char because int might match the return type of a gcc2
3767 builtin and then its argument prototype would still apply. */
3768char $ac_func();
3769
3a629497 3770int main() {
5852c051
JB
3771
3772/* The GNU C library defines this for functions which it implements
3773 to always fail with ENOSYS. Some functions are actually named
3774 something starting with __ and the normal name is an alias. */
3775#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3776choke me
3777#else
3778$ac_func();
3779#endif
3780
3a629497
JB
3781; return 0; }
3782EOF
3afbf314 3783if { (eval echo configure:3784: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3a629497 3784 rm -rf conftest*
5852c051 3785 eval "ac_cv_func_$ac_func=yes"
3a629497
JB
3786else
3787 echo "configure: failed program was:" >&5
3788 cat conftest.$ac_ext >&5
3789 rm -rf conftest*
5852c051 3790 eval "ac_cv_func_$ac_func=no"
3a629497
JB
3791fi
3792rm -f conftest*
3793fi
3794
5852c051
JB
3795if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3796 echo "$ac_t""yes" 1>&6
3797 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3798 cat >> confdefs.h <<EOF
3799#define $ac_tr_func 1
3a629497 3800EOF
5852c051 3801
3a629497 3802else
5852c051 3803 echo "$ac_t""no" 1>&6
2c9a3a48 3804LIBOBJS="$LIBOBJS ${ac_func}.o"
3a629497 3805fi
5852c051 3806done
3a629497 3807
3a629497 3808
5852c051 3809
4a5fa91c
TP
3810# When testing for the presence of alloca, we need to add alloca.o
3811# explicitly to LIBOBJS to make sure that it is translated to
3812# `alloca.lo' for libtool later on. This can and should be done more cleanly.
5852c051
JB
3813# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
3814# for constant arguments. Useless!
3815echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
3afbf314 3816echo "configure:3817: checking for working alloca.h" >&5
5852c051 3817if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
3a629497
JB
3818 echo $ac_n "(cached) $ac_c" 1>&6
3819else
3820 cat > conftest.$ac_ext <<EOF
3afbf314 3821#line 3822 "configure"
3a629497 3822#include "confdefs.h"
5852c051 3823#include <alloca.h>
3a629497 3824int main() {
5852c051 3825char *p = alloca(2 * sizeof(int));
3a629497
JB
3826; return 0; }
3827EOF
3afbf314 3828if { (eval echo configure:3829: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3a629497 3829 rm -rf conftest*
5852c051 3830 ac_cv_header_alloca_h=yes
3a629497
JB
3831else
3832 echo "configure: failed program was:" >&5
3833 cat conftest.$ac_ext >&5
3834 rm -rf conftest*
5852c051 3835 ac_cv_header_alloca_h=no
3a629497
JB
3836fi
3837rm -f conftest*
3838fi
3839
5852c051
JB
3840echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
3841if test $ac_cv_header_alloca_h = yes; then
3842 cat >> confdefs.h <<\EOF
3843#define HAVE_ALLOCA_H 1
3a629497
JB
3844EOF
3845
3a629497
JB
3846fi
3847
5852c051 3848echo $ac_n "checking for alloca""... $ac_c" 1>&6
3afbf314 3849echo "configure:3850: checking for alloca" >&5
5852c051 3850if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
3a629497
JB
3851 echo $ac_n "(cached) $ac_c" 1>&6
3852else
3853 cat > conftest.$ac_ext <<EOF
3afbf314 3854#line 3855 "configure"
3a629497
JB
3855#include "confdefs.h"
3856
5852c051
JB
3857#ifdef __GNUC__
3858# define alloca __builtin_alloca
3a629497 3859#else
2c9a3a48
JB
3860# if HAVE_ALLOCA_H
3861# include <alloca.h>
5852c051 3862# else
2c9a3a48 3863# ifdef _AIX
539c89a1 3864 #pragma alloca
2c9a3a48
JB
3865# else
3866# ifndef alloca /* predefined by HP cc +Olibcalls */
5852c051
JB
3867char *alloca ();
3868# endif
3869# endif
3870# endif
3a629497 3871#endif
3a629497 3872
5852c051
JB
3873int main() {
3874char *p = (char *) alloca(1);
3875; return 0; }
3a629497 3876EOF
3afbf314 3877if { (eval echo configure:3878: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3a629497 3878 rm -rf conftest*
5852c051 3879 ac_cv_func_alloca_works=yes
3a629497 3880else
3a629497
JB
3881 echo "configure: failed program was:" >&5
3882 cat conftest.$ac_ext >&5
3883 rm -rf conftest*
5852c051 3884 ac_cv_func_alloca_works=no
3a629497
JB
3885fi
3886rm -f conftest*
3887fi
3888
5852c051
JB
3889echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
3890if test $ac_cv_func_alloca_works = yes; then
3891 cat >> confdefs.h <<\EOF
3892#define HAVE_ALLOCA 1
3a629497
JB
3893EOF
3894
5852c051 3895fi
3a629497 3896
5852c051
JB
3897if test $ac_cv_func_alloca_works = no; then
3898 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
3899 # that cause trouble. Some versions do not even contain alloca or
3900 # contain a buggy version. If you still want to use their alloca,
3901 # use ar to extract alloca.o from them instead of compiling alloca.c.
2c9a3a48 3902 ALLOCA=alloca.o
5852c051
JB
3903 cat >> confdefs.h <<\EOF
3904#define C_ALLOCA 1
3905EOF
3a629497
JB
3906
3907
5852c051 3908echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
3afbf314 3909echo "configure:3910: checking whether alloca needs Cray hooks" >&5
5852c051 3910if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
3a629497
JB
3911 echo $ac_n "(cached) $ac_c" 1>&6
3912else
5852c051 3913 cat > conftest.$ac_ext <<EOF
3afbf314 3914#line 3915 "configure"
3a629497 3915#include "confdefs.h"
5852c051
JB
3916#if defined(CRAY) && ! defined(CRAY2)
3917webecray
3918#else
3919wenotbecray
3920#endif
3a629497 3921
3a629497 3922EOF
5852c051
JB
3923if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3924 egrep "webecray" >/dev/null 2>&1; then
3a629497 3925 rm -rf conftest*
5852c051 3926 ac_cv_os_cray=yes
3a629497 3927else
3a629497 3928 rm -rf conftest*
5852c051 3929 ac_cv_os_cray=no
3a629497
JB
3930fi
3931rm -f conftest*
3a629497
JB
3932
3933fi
3a629497 3934
5852c051
JB
3935echo "$ac_t""$ac_cv_os_cray" 1>&6
3936if test $ac_cv_os_cray = yes; then
3937for ac_func in _getb67 GETB67 getb67; do
3938 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3afbf314 3939echo "configure:3940: checking for $ac_func" >&5
5852c051 3940if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
075edbde
JB
3941 echo $ac_n "(cached) $ac_c" 1>&6
3942else
3943 cat > conftest.$ac_ext <<EOF
3afbf314 3944#line 3945 "configure"
075edbde
JB
3945#include "confdefs.h"
3946/* System header to define __stub macros and hopefully few prototypes,
5852c051 3947 which can conflict with char $ac_func(); below. */
075edbde
JB
3948#include <assert.h>
3949/* Override any gcc2 internal prototype to avoid an error. */
3950/* We use char because int might match the return type of a gcc2
3951 builtin and then its argument prototype would still apply. */
5852c051 3952char $ac_func();
075edbde
JB
3953
3954int main() {
3955
3956/* The GNU C library defines this for functions which it implements
3957 to always fail with ENOSYS. Some functions are actually named
3958 something starting with __ and the normal name is an alias. */
5852c051 3959#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
075edbde
JB
3960choke me
3961#else
5852c051 3962$ac_func();
075edbde
JB
3963#endif
3964
3965; return 0; }
3966EOF
3afbf314 3967if { (eval echo configure:3968: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
075edbde 3968 rm -rf conftest*
5852c051 3969 eval "ac_cv_func_$ac_func=yes"
075edbde
JB
3970else
3971 echo "configure: failed program was:" >&5
3972 cat conftest.$ac_ext >&5
3973 rm -rf conftest*
5852c051 3974 eval "ac_cv_func_$ac_func=no"
075edbde
JB
3975fi
3976rm -f conftest*
3977fi
3978
5852c051 3979if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
075edbde 3980 echo "$ac_t""yes" 1>&6
5852c051
JB
3981 cat >> confdefs.h <<EOF
3982#define CRAY_STACKSEG_END $ac_func
3983EOF
3984
3985 break
075edbde
JB
3986else
3987 echo "$ac_t""no" 1>&6
3988fi
3989
5852c051
JB
3990done
3991fi
3992
3993echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
3afbf314 3994echo "configure:3995: checking stack direction for C alloca" >&5
5852c051 3995if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
3a629497
JB
3996 echo $ac_n "(cached) $ac_c" 1>&6
3997else
5852c051
JB
3998 if test "$cross_compiling" = yes; then
3999 ac_cv_c_stack_direction=0
4000else
4001 cat > conftest.$ac_ext <<EOF
3afbf314 4002#line 4003 "configure"
3a629497 4003#include "confdefs.h"
5852c051
JB
4004find_stack_direction ()
4005{
4006 static char *addr = 0;
4007 auto char dummy;
4008 if (addr == 0)
4009 {
4010 addr = &dummy;
4011 return find_stack_direction ();
4012 }
4013 else
4014 return (&dummy > addr) ? 1 : -1;
4015}
4016main ()
4017{
4018 exit (find_stack_direction() < 0);
4019}
4020EOF
3afbf314 4021if { (eval echo configure:4022: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
5852c051
JB
4022then
4023 ac_cv_c_stack_direction=1
4024else
4025 echo "configure: failed program was:" >&5
4026 cat conftest.$ac_ext >&5
4027 rm -fr conftest*
4028 ac_cv_c_stack_direction=-1
4029fi
4030rm -fr conftest*
4031fi
4032
4033fi
4034
4035echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
4036cat >> confdefs.h <<EOF
4037#define STACK_DIRECTION $ac_cv_c_stack_direction
4038EOF
3a629497 4039
5852c051
JB
4040fi
4041
4a5fa91c 4042if test "$ALLOCA" = "alloca.o"; then LIBOBJS="alloca.o $LIBOBJS"; fi
5852c051
JB
4043
4044echo $ac_n "checking for st_rdev in struct stat""... $ac_c" 1>&6
3afbf314 4045echo "configure:4046: checking for st_rdev in struct stat" >&5
5852c051
JB
4046if eval "test \"`echo '$''{'ac_cv_struct_st_rdev'+set}'`\" = set"; then
4047 echo $ac_n "(cached) $ac_c" 1>&6
4048else
4049 cat > conftest.$ac_ext <<EOF
3afbf314 4050#line 4051 "configure"
5852c051
JB
4051#include "confdefs.h"
4052#include <sys/types.h>
4053#include <sys/stat.h>
3a629497 4054int main() {
5852c051 4055struct stat s; s.st_rdev;
3a629497
JB
4056; return 0; }
4057EOF
3afbf314 4058if { (eval echo configure:4059: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3a629497 4059 rm -rf conftest*
5852c051 4060 ac_cv_struct_st_rdev=yes
3a629497
JB
4061else
4062 echo "configure: failed program was:" >&5
4063 cat conftest.$ac_ext >&5
4064 rm -rf conftest*
5852c051 4065 ac_cv_struct_st_rdev=no
3a629497
JB
4066fi
4067rm -f conftest*
3a629497 4068fi
3a629497 4069
5852c051
JB
4070echo "$ac_t""$ac_cv_struct_st_rdev" 1>&6
4071if test $ac_cv_struct_st_rdev = yes; then
4072 cat >> confdefs.h <<\EOF
4073#define HAVE_ST_RDEV 1
4074EOF
075edbde 4075
075edbde 4076fi
3a629497 4077
5852c051 4078echo $ac_n "checking for st_blksize in struct stat""... $ac_c" 1>&6
3afbf314 4079echo "configure:4080: checking for st_blksize in struct stat" >&5
5852c051 4080if eval "test \"`echo '$''{'ac_cv_struct_st_blksize'+set}'`\" = set"; then
075edbde
JB
4081 echo $ac_n "(cached) $ac_c" 1>&6
4082else
4083 cat > conftest.$ac_ext <<EOF
3afbf314 4084#line 4085 "configure"
075edbde 4085#include "confdefs.h"
5852c051
JB
4086#include <sys/types.h>
4087#include <sys/stat.h>
075edbde 4088int main() {
5852c051 4089struct stat s; s.st_blksize;
075edbde
JB
4090; return 0; }
4091EOF
3afbf314 4092if { (eval echo configure:4093: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
075edbde 4093 rm -rf conftest*
5852c051 4094 ac_cv_struct_st_blksize=yes
075edbde
JB
4095else
4096 echo "configure: failed program was:" >&5
4097 cat conftest.$ac_ext >&5
4098 rm -rf conftest*
5852c051 4099 ac_cv_struct_st_blksize=no
075edbde
JB
4100fi
4101rm -f conftest*
4102fi
4103
5852c051
JB
4104echo "$ac_t""$ac_cv_struct_st_blksize" 1>&6
4105if test $ac_cv_struct_st_blksize = yes; then
4106 cat >> confdefs.h <<\EOF
4107#define HAVE_ST_BLKSIZE 1
4108EOF
4109
3a629497
JB
4110fi
4111
5852c051
JB
4112
4113# We could use AC_STRUCT_ST_BLOCKS here, but that adds fileblocks.o to
4114# LIBOBJS, which we don't need. This seems more direct.
4115echo $ac_n "checking for st_blocks in struct stat""... $ac_c" 1>&6
3afbf314 4116echo "configure:4117: checking for st_blocks in struct stat" >&5
5852c051 4117if eval "test \"`echo '$''{'ac_cv_struct_st_blocks'+set}'`\" = set"; then
3a629497
JB
4118 echo $ac_n "(cached) $ac_c" 1>&6
4119else
5852c051 4120 cat > conftest.$ac_ext <<EOF
3afbf314 4121#line 4122 "configure"
3a629497 4122#include "confdefs.h"
5852c051
JB
4123#include <sys/types.h>
4124#include <sys/stat.h>
3a629497 4125int main() {
5852c051 4126struct stat s; s.st_blocks;
3a629497
JB
4127; return 0; }
4128EOF
3afbf314 4129if { (eval echo configure:4130: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3a629497 4130 rm -rf conftest*
5852c051 4131 ac_cv_struct_st_blocks=yes
3a629497
JB
4132else
4133 echo "configure: failed program was:" >&5
4134 cat conftest.$ac_ext >&5
4135 rm -rf conftest*
5852c051 4136 ac_cv_struct_st_blocks=no
3a629497
JB
4137fi
4138rm -f conftest*
3a629497 4139fi
3a629497 4140
5852c051
JB
4141echo "$ac_t""$ac_cv_struct_st_blocks" 1>&6
4142if test $ac_cv_struct_st_blocks = yes; then
4143 cat >> confdefs.h <<\EOF
4144#define HAVE_ST_BLOCKS 1
4145EOF
3a629497 4146
075edbde 4147fi
3a629497 4148
5852c051 4149echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
3afbf314 4150echo "configure:4151: checking whether struct tm is in sys/time.h or time.h" >&5
5852c051 4151if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
3a629497
JB
4152 echo $ac_n "(cached) $ac_c" 1>&6
4153else
5852c051 4154 cat > conftest.$ac_ext <<EOF
3afbf314 4155#line 4156 "configure"
3a629497 4156#include "confdefs.h"
5852c051
JB
4157#include <sys/types.h>
4158#include <time.h>
3a629497 4159int main() {
5852c051 4160struct tm *tp; tp->tm_sec;
3a629497
JB
4161; return 0; }
4162EOF
3afbf314 4163if { (eval echo configure:4164: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3a629497 4164 rm -rf conftest*
5852c051 4165 ac_cv_struct_tm=time.h
3a629497
JB
4166else
4167 echo "configure: failed program was:" >&5
4168 cat conftest.$ac_ext >&5
4169 rm -rf conftest*
5852c051 4170 ac_cv_struct_tm=sys/time.h
3a629497
JB
4171fi
4172rm -f conftest*
3a629497 4173fi
5852c051
JB
4174
4175echo "$ac_t""$ac_cv_struct_tm" 1>&6
4176if test $ac_cv_struct_tm = sys/time.h; then
4177 cat >> confdefs.h <<\EOF
4178#define TM_IN_SYS_TIME 1
3a629497
JB
4179EOF
4180
5852c051 4181fi
3a629497 4182
5852c051 4183echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6
3afbf314 4184echo "configure:4185: checking for tm_zone in struct tm" >&5
5852c051
JB
4185if eval "test \"`echo '$''{'ac_cv_struct_tm_zone'+set}'`\" = set"; then
4186 echo $ac_n "(cached) $ac_c" 1>&6
3a629497 4187else
5852c051 4188 cat > conftest.$ac_ext <<EOF
3afbf314 4189#line 4190 "configure"
5852c051
JB
4190#include "confdefs.h"
4191#include <sys/types.h>
4192#include <$ac_cv_struct_tm>
4193int main() {
4194struct tm tm; tm.tm_zone;
4195; return 0; }
4196EOF
3afbf314 4197if { (eval echo configure:4198: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5852c051
JB
4198 rm -rf conftest*
4199 ac_cv_struct_tm_zone=yes
4200else
4201 echo "configure: failed program was:" >&5
4202 cat conftest.$ac_ext >&5
4203 rm -rf conftest*
4204 ac_cv_struct_tm_zone=no
4205fi
4206rm -f conftest*
3a629497
JB
4207fi
4208
5852c051
JB
4209echo "$ac_t""$ac_cv_struct_tm_zone" 1>&6
4210if test "$ac_cv_struct_tm_zone" = yes; then
3a629497 4211 cat >> confdefs.h <<\EOF
5852c051 4212#define HAVE_TM_ZONE 1
3a629497
JB
4213EOF
4214
4215else
5852c051 4216 echo $ac_n "checking for tzname""... $ac_c" 1>&6
3afbf314 4217echo "configure:4218: checking for tzname" >&5
5852c051 4218if eval "test \"`echo '$''{'ac_cv_var_tzname'+set}'`\" = set"; then
3a629497
JB
4219 echo $ac_n "(cached) $ac_c" 1>&6
4220else
5852c051 4221 cat > conftest.$ac_ext <<EOF
3afbf314 4222#line 4223 "configure"
3a629497 4223#include "confdefs.h"
5852c051
JB
4224#include <time.h>
4225#ifndef tzname /* For SGI. */
4226extern char *tzname[]; /* RS6000 and others reject char **tzname. */
4227#endif
3a629497 4228int main() {
5852c051 4229atoi(*tzname);
3a629497
JB
4230; return 0; }
4231EOF
3afbf314 4232if { (eval echo configure:4233: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3a629497 4233 rm -rf conftest*
5852c051 4234 ac_cv_var_tzname=yes
3a629497
JB
4235else
4236 echo "configure: failed program was:" >&5
4237 cat conftest.$ac_ext >&5
4238 rm -rf conftest*
5852c051 4239 ac_cv_var_tzname=no
3a629497
JB
4240fi
4241rm -f conftest*
3a629497 4242fi
3a629497 4243
5852c051
JB
4244echo "$ac_t""$ac_cv_var_tzname" 1>&6
4245 if test $ac_cv_var_tzname = yes; then
4246 cat >> confdefs.h <<\EOF
4247#define HAVE_TZNAME 1
4248EOF
3a629497 4249
5852c051 4250 fi
3a629497
JB
4251fi
4252
3a629497 4253
5852c051 4254 echo $ac_n "checking whether we need POSIX to get struct utimbuf""... $ac_c" 1>&6
3afbf314 4255echo "configure:4256: checking whether we need POSIX to get struct utimbuf" >&5
5852c051 4256if eval "test \"`echo '$''{'guile_cv_struct_utimbuf_needs_posix'+set}'`\" = set"; then
3a629497
JB
4257 echo $ac_n "(cached) $ac_c" 1>&6
4258else
4259 cat > conftest.$ac_ext <<EOF
3afbf314 4260#line 4261 "configure"
3a629497 4261#include "confdefs.h"
3a629497 4262
5852c051
JB
4263#ifdef __EMX__
4264#include <sys/utime.h>
3a629497 4265#else
5852c051 4266#include <utime.h>
3a629497 4267#endif
5852c051 4268struct utime blah;
3a629497 4269
3a629497 4270EOF
5852c051 4271ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3afbf314 4272{ (eval echo configure:4273: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2c9a3a48 4273ac_err=`grep -v '^ *+' conftest.out`
5852c051 4274if test -z "$ac_err"; then
3a629497 4275 rm -rf conftest*
5852c051 4276 guile_cv_struct_utimbuf_needs_posix=no
3a629497 4277else
5852c051 4278 echo "$ac_err" >&5
3a629497
JB
4279 echo "configure: failed program was:" >&5
4280 cat conftest.$ac_ext >&5
4281 rm -rf conftest*
5852c051 4282 guile_cv_struct_utimbuf_needs_posix=yes
3a629497
JB
4283fi
4284rm -f conftest*
4285fi
4286
5852c051
JB
4287echo "$ac_t""$guile_cv_struct_utimbuf_needs_posix" 1>&6
4288 if test "$guile_cv_struct_utimbuf_needs_posix" = yes; then
4289 cat >> confdefs.h <<\EOF
4290#define UTIMBUF_NEEDS_POSIX 1
3a629497
JB
4291EOF
4292
5852c051 4293 fi
3a629497
JB
4294
4295#--------------------------------------------------------------------
4296#
4297# Which way does the stack grow?
4298#
4299#--------------------------------------------------------------------
4300
4301if test "$cross_compiling" = yes; then
4302 echo "configure: warning: Guessing that stack grows down -- see scmconfig.h.in" 1>&2
4303else
4304 cat > conftest.$ac_ext <<EOF
3afbf314 4305#line 4306 "configure"
3a629497
JB
4306#include "confdefs.h"
4307aux (l) unsigned long l;
4308 { int x; exit (l >= ((unsigned long)&x)); }
4309 main () { int q; aux((unsigned long)&q); }
4310EOF
3afbf314 4311if { (eval echo configure:4312: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
3a629497
JB
4312then
4313 cat >> confdefs.h <<\EOF
4314#define SCM_STACK_GROWS_UP 1
4315EOF
4316
4317else
4318 echo "configure: failed program was:" >&5
4319 cat conftest.$ac_ext >&5
4320fi
4321rm -fr conftest*
4322fi
4323
4324
3a171311 4325echo $ac_n "checking whether floats fit in longs""... $ac_c" 1>&6
3afbf314 4326echo "configure:4327: checking whether floats fit in longs" >&5
3a171311
JB
4327if eval "test \"`echo '$''{'guile_cv_type_float_fits_long'+set}'`\" = set"; then
4328 echo $ac_n "(cached) $ac_c" 1>&6
4329else
4330 if test "$cross_compiling" = yes; then
4331 guile_cv_type_float_fits_long=guess-yes
3a629497
JB
4332else
4333 cat > conftest.$ac_ext <<EOF
3afbf314 4334#line 4335 "configure"
3a629497 4335#include "confdefs.h"
3a171311 4336main () { exit (sizeof(float) > sizeof(long)); }
3a629497 4337EOF
3afbf314 4338if { (eval echo configure:4339: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
3a629497 4339then
3a171311 4340 guile_cv_type_float_fits_long=yes
3a629497
JB
4341else
4342 echo "configure: failed program was:" >&5
4343 cat conftest.$ac_ext >&5
3a171311
JB
4344 rm -fr conftest*
4345 guile_cv_type_float_fits_long=no
3a629497
JB
4346fi
4347rm -fr conftest*
4348fi
4349
3a171311
JB
4350fi
4351
4352echo "$ac_t""$guile_cv_type_float_fits_long" 1>&6
4353case $guile_cv_type_float_fits_long in
4354 "yes" )
4355 cat >> confdefs.h <<\EOF
4356#define SCM_SINGLES 1
4357EOF
4358
4359 ;;
4360 "guess-yes" )
4361 cat >> confdefs.h <<\EOF
4362#define SCM_SINGLES 1
4363EOF
4364
4365 echo "configure: warning: guessing that sizeof(long) == sizeof(float)" 1>&2
4366 echo "configure: warning: see SCM_SINGLES in scmconfig.h.in" 1>&2
4367 ;;
4368esac
4369
3a629497
JB
4370
4371echo $ac_n "checking for struct linger""... $ac_c" 1>&6
3afbf314 4372echo "configure:4373: checking for struct linger" >&5
3a629497
JB
4373if eval "test \"`echo '$''{'scm_cv_struct_linger'+set}'`\" = set"; then
4374 echo $ac_n "(cached) $ac_c" 1>&6
4375else
4376 cat > conftest.$ac_ext <<EOF
3afbf314 4377#line 4378 "configure"
3a629497
JB
4378#include "confdefs.h"
4379
4380#include <sys/types.h>
4381#include <sys/socket.h>
4382int main() {
4383struct linger lgr; lgr.l_linger = 100
4384; return 0; }
4385EOF
3afbf314 4386if { (eval echo configure:4387: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3a629497
JB
4387 rm -rf conftest*
4388 scm_cv_struct_linger="yes"
4389else
4390 echo "configure: failed program was:" >&5
4391 cat conftest.$ac_ext >&5
4392 rm -rf conftest*
4393 scm_cv_struct_linger="no"
4394fi
4395rm -f conftest*
4396fi
4397
4398echo "$ac_t""$scm_cv_struct_linger" 1>&6
4399if test $scm_cv_struct_linger = yes; then
4400 cat >> confdefs.h <<\EOF
4401#define HAVE_STRUCT_LINGER 1
4402EOF
4403
4404fi
4405
4406#--------------------------------------------------------------------
4407#
4408# How can you violate a stdio abstraction by setting a stream's fd?
4409#
4410#--------------------------------------------------------------------
4411
4412echo $ac_n "checking how to set a stream file descriptor""... $ac_c" 1>&6
3afbf314 4413echo "configure:4414: checking how to set a stream file descriptor" >&5
3a629497
JB
4414if eval "test \"`echo '$''{'scm_cv_fd_setter'+set}'`\" = set"; then
4415 echo $ac_n "(cached) $ac_c" 1>&6
4416else
4417 cat > conftest.$ac_ext <<EOF
3afbf314 4418#line 4419 "configure"
3a629497
JB
4419#include "confdefs.h"
4420#include <stdio.h>
4421int main() {
4422stdout->_file = 1
4423; return 0; }
4424EOF
3afbf314 4425if { (eval echo configure:4426: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3a629497
JB
4426 rm -rf conftest*
4427 scm_cv_fd_setter="_file"
4428else
4429 echo "configure: failed program was:" >&5
4430 cat conftest.$ac_ext >&5
4431 rm -rf conftest*
4432 cat > conftest.$ac_ext <<EOF
3afbf314 4433#line 4434 "configure"
3a629497
JB
4434#include "confdefs.h"
4435#include <stdio.h>
4436int main() {
fe75dfc5 4437stdout->__file = 1
3a629497
JB
4438; return 0; }
4439EOF
3afbf314 4440if { (eval echo configure:4441: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
fe75dfc5
JB
4441 rm -rf conftest*
4442 scm_cv_fd_setter="__file"
4443else
4444 echo "configure: failed program was:" >&5
4445 cat conftest.$ac_ext >&5
4446 rm -rf conftest*
4447 cat > conftest.$ac_ext <<EOF
3afbf314 4448#line 4449 "configure"
fe75dfc5
JB
4449#include "confdefs.h"
4450#include <stdio.h>
4451int main() {
4452stdout->_fileno = 1
4453; return 0; }
4454EOF
3afbf314 4455if { (eval echo configure:4456: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3a629497
JB
4456 rm -rf conftest*
4457 scm_cv_fd_setter="_fileno"
4458else
4459 echo "configure: failed program was:" >&5
4460 cat conftest.$ac_ext >&5
4461 rm -rf conftest*
4462 scm_cv_fd_setter=""
4463fi
4464rm -f conftest*
4465fi
4466rm -f conftest*
4467fi
fe75dfc5
JB
4468rm -f conftest*
4469fi
3a629497
JB
4470
4471
4472if test "$scm_cv_fd_setter"; then
4473 echo "$ac_t""$scm_cv_fd_setter" 1>&6
4474 cat >> confdefs.h <<EOF
4475#define FD_SETTER $scm_cv_fd_setter
4476EOF
4477
4478else
4479 echo "$ac_t""we couldn't do it!" 1>&6
4480fi
4481
4482#--------------------------------------------------------------------
4483# How to find out whether a FILE structure contains buffered data.
4484# From Tk we have the following list:
4485# _cnt: Most UNIX systems
fe75dfc5 4486# __cnt: HPUX and SCO
3a629497
JB
4487# _r: BSD
4488# readCount: Sprite
4489# Or, in GNU libc there are two fields, _gptr and _egptr, which
4490# have to be compared.
4491# These can also be known as _IO_read_ptr and _IO_read_end.
4492#--------------------------------------------------------------------
4493
4494echo $ac_n "checking how to get buffer char count from FILE structure""... $ac_c" 1>&6
3afbf314 4495echo "configure:4496: checking how to get buffer char count from FILE structure" >&5
3a629497
JB
4496if eval "test \"`echo '$''{'scm_cv_struct_file_count'+set}'`\" = set"; then
4497 echo $ac_n "(cached) $ac_c" 1>&6
4498else
4499 cat > conftest.$ac_ext <<EOF
3afbf314 4500#line 4501 "configure"
3a629497
JB
4501#include "confdefs.h"
4502#include <stdio.h>
4503int main() {
4504FILE *f = stdin; f->_cnt = 0
4505; return 0; }
4506EOF
3afbf314 4507if { (eval echo configure:4508: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3a629497
JB
4508 rm -rf conftest*
4509 scm_cv_struct_file_count="_cnt"
4510else
4511 echo "configure: failed program was:" >&5
4512 cat conftest.$ac_ext >&5
4513 rm -rf conftest*
4514 cat > conftest.$ac_ext <<EOF
3afbf314 4515#line 4516 "configure"
fe75dfc5
JB
4516#include "confdefs.h"
4517#include <stdio.h>
4518int main() {
4519FILE *f = stdin; f->__cnt = 0
4520; return 0; }
4521EOF
3afbf314 4522if { (eval echo configure:4523: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
fe75dfc5
JB
4523 rm -rf conftest*
4524 scm_cv_struct_file_count="__cnt"
4525else
4526 echo "configure: failed program was:" >&5
4527 cat conftest.$ac_ext >&5
4528 rm -rf conftest*
4529 cat > conftest.$ac_ext <<EOF
3afbf314 4530#line 4531 "configure"
3a629497
JB
4531#include "confdefs.h"
4532#include <stdio.h>
4533int main() {
4534FILE *f = stdin; f->_r = 0
4535; return 0; }
4536EOF
3afbf314 4537if { (eval echo configure:4538: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3a629497
JB
4538 rm -rf conftest*
4539 scm_cv_struct_file_count="_r"
4540else
4541 echo "configure: failed program was:" >&5
4542 cat conftest.$ac_ext >&5
4543 rm -rf conftest*
4544 cat > conftest.$ac_ext <<EOF
3afbf314 4545#line 4546 "configure"
3a629497
JB
4546#include "confdefs.h"
4547#include <stdio.h>
4548int main() {
4549FILE *f = stdin; f->readCount = 0
4550; return 0; }
4551EOF
3afbf314 4552if { (eval echo configure:4553: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3a629497
JB
4553 rm -rf conftest*
4554 scm_cv_struct_file_count="readCount"
4555else
4556 echo "configure: failed program was:" >&5
4557 cat conftest.$ac_ext >&5
4558 rm -rf conftest*
4559 scm_cv_struct_file_count=""
4560fi
4561rm -f conftest*
4562fi
4563rm -f conftest*
4564fi
4565rm -f conftest*
4566fi
fe75dfc5
JB
4567rm -f conftest*
4568fi
3a629497
JB
4569
4570if test "$scm_cv_struct_file_count"; then
4571 echo "$ac_t""$scm_cv_struct_file_count" 1>&6
4572 cat >> confdefs.h <<EOF
4573#define FILE_CNT_FIELD $scm_cv_struct_file_count
4574EOF
4575
4576else
4577if eval "test \"`echo '$''{'scm_cv_struct_file_gptr'+set}'`\" = set"; then
4578 echo $ac_n "(cached) $ac_c" 1>&6
4579else
4580 cat > conftest.$ac_ext <<EOF
3afbf314 4581#line 4582 "configure"
3a629497
JB
4582#include "confdefs.h"
4583#include <stdio.h>
4584int main() {
4585FILE *f = stdin; f->_gptr = f->egptr;
4586; return 0; }
4587EOF
3afbf314 4588if { (eval echo configure:4589: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3a629497
JB
4589 rm -rf conftest*
4590 scm_cv_struct_file_gptr=1
4591else
4592 echo "configure: failed program was:" >&5
4593 cat conftest.$ac_ext >&5
4594 rm -rf conftest*
4595 scm_cv_struct_file_gptr=""
4596fi
4597rm -f conftest*
4598fi
4599
4600if test "$scm_cv_struct_gptr"; then
4601 echo "$ac_t""gptr" 1>&6
4602 cat >> confdefs.h <<EOF
4603#define FILE_CNT_GPTR $scm_cv_struct_file_gptr
4604EOF
4605
4606else
4607if eval "test \"`echo '$''{'scm_cv_struct_file_readptr'+set}'`\" = set"; then
4608 echo $ac_n "(cached) $ac_c" 1>&6
4609else
4610 cat > conftest.$ac_ext <<EOF
3afbf314 4611#line 4612 "configure"
3a629497
JB
4612#include "confdefs.h"
4613#include <stdio.h>
4614int main() {
4615FILE *f = stdin; f->_IO_read_ptr = f->_IO_read_end;
4616; return 0; }
4617EOF
3afbf314 4618if { (eval echo configure:4619: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3a629497
JB
4619 rm -rf conftest*
4620 scm_cv_struct_file_readptr=1
4621else
4622 echo "configure: failed program was:" >&5
4623 cat conftest.$ac_ext >&5
4624fi
4625rm -f conftest*
4626fi
4627
4628if test "$scm_cv_struct_file_readptr"; then
4629 echo "$ac_t""read_ptr" 1>&6
4630 cat >> confdefs.h <<EOF
4631#define FILE_CNT_READPTR $scm_cv_struct_file_readptr
4632EOF
4633
4634else
4635 echo "$ac_t""we couldn't do it!" 1>&6
4636fi
4637fi
4638fi
4639
4640#--------------------------------------------------------------------
4641#
4642# Flags for thread support
4643#
4644#--------------------------------------------------------------------
4645
539c89a1 4646### What thread package has the user asked for?
956055a9
GH
4647# Check whether --with-threads or --without-threads was given.
4648if test "${with_threads+set}" = set; then
4649 withval="$with_threads"
539c89a1 4650 :
956055a9 4651else
539c89a1 4652 with_threads=no
956055a9 4653fi
956055a9 4654
956055a9 4655
539c89a1
JB
4656### Turn $with_threads into either the name of a threads package, like
4657### `qt', or `no', meaning that threads should not be supported.
e0f54bcc 4658echo $ac_n "checking whether to support threads""... $ac_c" 1>&6
3afbf314 4659echo "configure:4660: checking whether to support threads" >&5
539c89a1
JB
4660case "$with_threads" in
4661 "yes" | "qt" | "coop" | "")
4662 with_threads=qt
4663 ;;
4664 "no" )
4665 ;;
4666 * )
4667 { echo "configure: error: invalid value for --with-threads: $with_threads" 1>&2; exit 1; }
4668 ;;
4669esac
e0f54bcc 4670echo "$ac_t""$with_threads" 1>&6
956055a9 4671
539c89a1
JB
4672## Make sure the threads package we've chosen is actually supported on
4673## the present platform.
4674case "${with_threads}" in
4675 "qt" )
4676 ## This configures the QuickThreads package, and sets or clears
4677 ## the THREAD_PACKAGE variable if qthreads don't configure
4678 ## correctly.
4679
7bc24529 4680
956055a9 4681
b8f08e26 4682 echo $ac_n "checking QuickThreads configuration""... $ac_c" 1>&6
3afbf314 4683echo "configure:4684: checking QuickThreads configuration" >&5
539c89a1
JB
4684 # How can we refer to the qt source directory from within the qt build
4685 # directory? For headers, we can rely on the fact that the qt src
4686 # directory appears in the #include path.
4687 qtsrcdir="`(cd $srcdir; pwd)`/qt"
956055a9 4688
539c89a1
JB
4689
4690 THREAD_PACKAGE=QT
47521807 4691 qthread_asflags=''
539c89a1
JB
4692 case "$host" in
4693 i[3456]86-*-*)
b8f08e26 4694 port_name=i386
539c89a1
JB
4695 qtmd_h=md/i386.h
4696 qtmds_s=md/i386.s
4697 qtmdc_c=md/null.c
4698 qtdmdb_s=
47521807
JB
4699 case "$host" in
4700 *-*-netbsd* )
4701 ## NetBSD needs to be told to pass the assembly code through
4702 ## the C preprocessor. Other GCC installations seem to do
4703 ## this by default, but NetBSD's doesn't. We could get the
4704 ## same effect by giving the file a name ending with .S
4705 ## instead of .s, but I don't see how to tell automake to do
4706 ## that.
4707 qthread_asflags='-x assembler-with-cpp'
4708 ;;
4709 esac
539c89a1
JB
4710 ;;
4711 mips-sgi-irix[56]*)
b8f08e26 4712 port_name=irix
539c89a1
JB
4713 qtmd_h=md/mips.h
4714 qtmds_s=md/mips-irix5.s
4715 qtmdc_c=md/null.c
4716 qtdmdb_s=md/mips_b.s
4717 ;;
4718 mips-*-*)
b8f08e26 4719 port_name=mips
539c89a1
JB
4720 qtmd_h=md/mips.h
4721 qtmds_s=md/mips.s
4722 qtmdc_c=md/null.c
4723 qtdmdb_s=md/mips_b.s
4724 ;;
4725 sparc-*-sunos*)
b8f08e26 4726 port_name=sparc-sunos
539c89a1
JB
4727 qtmd_h=md/sparc.h
4728 qtmds_s=md/_sparc.s
4729 qtmdc_c=md/null.c
4730 qtdmdb_s=md/_sparc_b.s
4731 ;;
4732 sparc-*-*)
b8f08e26 4733 port_name=sparc
539c89a1
JB
4734 qtmd_h=md/sparc.h
4735 qtmds_s=md/sparc.s
4736 qtmdc_c=md/null.c
4737 qtdmdb_s=md/sparc_b.s
4738 ;;
4739 alpha-*-*)
b8f08e26 4740 port_name=alpha
539c89a1
JB
4741 qtmd_h=md/axp.h
4742 qtmds_s=md/axp.s
4743 qtmdc_c=md/null.c
4744 qtdmdb_s=md/axp_b.s
4745 ;;
4746 *)
4747 echo "Unknown configuration; threads package disabled"
4748 THREAD_PACKAGE=""
4749 ;;
4750 esac
4751
956055a9 4752
539c89a1
JB
4753 # Did configuration succeed?
4754 if test -n "$THREAD_PACKAGE"; then
b8f08e26 4755 echo "$ac_t""$port_name" 1>&6
539c89a1
JB
4756 QTHREAD_LTLIBS=libqthreads.la
4757 THREAD_CPPFLAGS="-I$qtsrcdir -I../qt"
4758 THREAD_LIBS_LOCAL="../qt/libqthreads.la"
4759 THREAD_LIBS_INSTALLED="-lqthreads"
b8f08e26
MD
4760 else
4761 echo "$ac_t""none; disabled" 1>&6
539c89a1 4762 fi
956055a9 4763
539c89a1
JB
4764
4765
4766
4767
4768
4769
4770
4771
4772
47521807 4773
3a629497 4774
539c89a1
JB
4775 ;;
4776esac
3a629497 4777
539c89a1
JB
4778## If we're using threads, bring in some other parts of Guile which
4779## work with them.
4780if test "${THREAD_PACKAGE}" != "" ; then
3a629497 4781 cat >> confdefs.h <<\EOF
539c89a1 4782#define USE_THREADS 1
3a629497
JB
4783EOF
4784
3a629497 4785
539c89a1
JB
4786 ## Include the Guile thread interface in the library...
4787 LIBOBJS="$LIBOBJS threads.o"
3a629497 4788
539c89a1
JB
4789 ## ... and tell it which package to talk to.
4790 case "${THREAD_PACKAGE}" in
4791 "QT" )
4792 cat >> confdefs.h <<\EOF
4793#define USE_COOP_THREADS 1
3a629497
JB
4794EOF
4795
539c89a1
JB
4796 ;;
4797 * )
4798 { echo "configure: error: invalid value for THREAD_PACKAGE: ${THREAD_PACKAGE}" 1>&2; exit 1; }
4799 ;;
4800 esac
86c5044a 4801
539c89a1
JB
4802 ## Bring in scm_internal_select, if appropriate.
4803 if test $ac_cv_func_gettimeofday = yes &&
4804 test $ac_cv_func_select = yes; then
4805 LIBOBJS="$LIBOBJS iselect.o"
4806 cat >> confdefs.h <<\EOF
86c5044a
MD
4807#define GUILE_ISELECT 1
4808EOF
4809
539c89a1 4810 fi
86c5044a
MD
4811fi
4812
3a629497
JB
4813## If we're using GCC, ask for aggressive warnings.
4814case "$GCC" in
99be3450 4815 yes )
b8f08e26
MD
4816 ## We had -Wstrict-prototypes in here for a bit, but Guile does too
4817 ## much stuff with generic function pointers for that to really be
4818 ## less than exasperating.
0a1b8b15 4819 CFLAGS="$CFLAGS -Wall -Wpointer-arith -Wmissing-prototypes" ;;
3a629497
JB
4820esac
4821
4822for ac_prog in mawk gawk nawk awk
4823do
4824# Extract the first word of "$ac_prog", so it can be a program name with args.
4825set dummy $ac_prog; ac_word=$2
4826echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3afbf314 4827echo "configure:4828: checking for $ac_word" >&5
3a629497
JB
4828if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
4829 echo $ac_n "(cached) $ac_c" 1>&6
4830else
4831 if test -n "$AWK"; then
4832 ac_cv_prog_AWK="$AWK" # Let the user override the test.
4833else
2c9a3a48 4834 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
3a629497
JB
4835 for ac_dir in $PATH; do
4836 test -z "$ac_dir" && ac_dir=.
4837 if test -f $ac_dir/$ac_word; then
4838 ac_cv_prog_AWK="$ac_prog"
4839 break
4840 fi
4841 done
4842 IFS="$ac_save_ifs"
4843fi
4844fi
4845AWK="$ac_cv_prog_AWK"
4846if test -n "$AWK"; then
4847 echo "$ac_t""$AWK" 1>&6
4848else
4849 echo "$ac_t""no" 1>&6
4850fi
4851
4852test -n "$AWK" && break
4853done
4854
4855
4856## If we're creating a shared library (using libtool!), then we'll
4857## need to generate a list of .lo files corresponding to the .o files
4858## given in LIBOBJS. We'll call it LIBLOBJS.
4859LIBLOBJS="`echo ${LIBOBJS} | sed 's/\.o/.lo/g'`"
4860
3a629497 4861
3a629497 4862
7c86ae05 4863
3a629497 4864
539c89a1 4865GUILE_LIBS="$LDFLAGS $THREAD_LIBS_INSTALLED $LIBS"
3a629497
JB
4866
4867
539c89a1 4868GUILE_STAMP="`date`"
3a629497
JB
4869
4870
4871
4872
4873
4874trap '' 1 2 15
4875cat > confcache <<\EOF
4876# This file is a shell script that caches the results of configure
4877# tests run on this system so they can be shared between configure
4878# scripts and configure runs. It is not useful on other systems.
4879# If it contains results you don't want to keep, you may remove or edit it.
4880#
4881# By default, configure uses ./config.cache as the cache file,
4882# creating it if it does not exist already. You can give configure
4883# the --cache-file=FILE option to use a different cache file; that is
4884# what configure does when it calls configure scripts in
4885# subdirectories, so they share the cache.
4886# Giving --cache-file=/dev/null disables caching, for debugging configure.
4887# config.status only pays attention to the cache file if you give it the
4888# --recheck option to rerun configure.
4889#
4890EOF
4891# The following way of writing the cache mishandles newlines in values,
4892# but we know of no workaround that is simple, portable, and efficient.
4893# So, don't put newlines in cache variables' values.
4894# Ultrix sh set writes to stderr and can't be redirected directly,
4895# and sets the high bit in the cache file unless we assign to the vars.
4896(set) 2>&1 |
2c9a3a48 4897 case `(ac_space=' '; set) 2>&1` in
3a629497
JB
4898 *ac_space=\ *)
4899 # `set' does not quote correctly, so add quotes (double-quote substitution
4900 # turns \\\\ into \\, and sed turns \\ into \).
4901 sed -n \
4902 -e "s/'/'\\\\''/g" \
4903 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
4904 ;;
4905 *)
4906 # `set' quotes correctly as required by POSIX, so do not add quotes.
4907 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
4908 ;;
4909 esac >> confcache
4910if cmp -s $cache_file confcache; then
4911 :
4912else
4913 if test -w $cache_file; then
4914 echo "updating cache $cache_file"
4915 cat confcache > $cache_file
4916 else
4917 echo "not updating unwritable cache $cache_file"
4918 fi
4919fi
4920rm -f confcache
4921
4922trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
4923
4924test "x$prefix" = xNONE && prefix=$ac_default_prefix
4925# Let make expand exec_prefix.
4926test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
4927
4928# Any assignment to VPATH causes Sun make to only execute
4929# the first set of double-colon rules, so remove it if not needed.
4930# If there is a colon in the path, we need to keep it.
4931if test "x$srcdir" = x.; then
4932 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
4933fi
4934
4935trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
4936
4937DEFS=-DHAVE_CONFIG_H
4938
4939# Without the "./", some shells look in PATH for config.status.
4940: ${CONFIG_STATUS=./config.status}
4941
4942echo creating $CONFIG_STATUS
4943rm -f $CONFIG_STATUS
4944cat > $CONFIG_STATUS <<EOF
4945#! /bin/sh
4946# Generated automatically by configure.
4947# Run this file to recreate the current configuration.
4948# This directory was configured as follows,
4949# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
4950#
4951# $0 $ac_configure_args
4952#
4953# Compiler output produced by configure, useful for debugging
4954# configure, is in ./config.log if it exists.
4955
4956ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
4957for ac_option
4958do
4959 case "\$ac_option" in
4960 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
4961 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
4962 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
4963 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
2c9a3a48 4964 echo "$CONFIG_STATUS generated by autoconf version 2.12"
3a629497
JB
4965 exit 0 ;;
4966 -help | --help | --hel | --he | --h)
4967 echo "\$ac_cs_usage"; exit 0 ;;
4968 *) echo "\$ac_cs_usage"; exit 1 ;;
4969 esac
4970done
4971
4972ac_given_srcdir=$srcdir
4973ac_given_INSTALL="$INSTALL"
4974
0e6d926d 4975trap '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
4976EOF
4977cat >> $CONFIG_STATUS <<EOF
4978
4979# Protect against being on the right side of a sed subst in config.status.
4980sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
4981 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
4982$ac_vpsub
4983$extrasub
4984s%@CFLAGS@%$CFLAGS%g
4985s%@CPPFLAGS@%$CPPFLAGS%g
4986s%@CXXFLAGS@%$CXXFLAGS%g
4987s%@DEFS@%$DEFS%g
4988s%@LDFLAGS@%$LDFLAGS%g
4989s%@LIBS@%$LIBS%g
4990s%@exec_prefix@%$exec_prefix%g
4991s%@prefix@%$prefix%g
4992s%@program_transform_name@%$program_transform_name%g
4993s%@bindir@%$bindir%g
4994s%@sbindir@%$sbindir%g
4995s%@libexecdir@%$libexecdir%g
4996s%@datadir@%$datadir%g
4997s%@sysconfdir@%$sysconfdir%g
4998s%@sharedstatedir@%$sharedstatedir%g
4999s%@localstatedir@%$localstatedir%g
5000s%@libdir@%$libdir%g
5001s%@includedir@%$includedir%g
5002s%@oldincludedir@%$oldincludedir%g
5003s%@infodir@%$infodir%g
5004s%@mandir@%$mandir%g
5005s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
5006s%@INSTALL_DATA@%$INSTALL_DATA%g
5007s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
5008s%@PACKAGE@%$PACKAGE%g
5009s%@VERSION@%$VERSION%g
5010s%@ACLOCAL@%$ACLOCAL%g
5011s%@AUTOCONF@%$AUTOCONF%g
5012s%@AUTOMAKE@%$AUTOMAKE%g
5013s%@AUTOHEADER@%$AUTOHEADER%g
5014s%@MAKEINFO@%$MAKEINFO%g
5015s%@SET_MAKE@%$SET_MAKE%g
5016s%@MAINT@%$MAINT%g
5017s%@CC@%$CC%g
5018s%@CPP@%$CPP%g
5aadf8c1
MG
5019s%@host@%$host%g
5020s%@host_alias@%$host_alias%g
5021s%@host_cpu@%$host_cpu%g
5022s%@host_vendor@%$host_vendor%g
5023s%@host_os@%$host_os%g
5024s%@RANLIB@%$RANLIB%g
5025s%@LD@%$LD%g
5026s%@NM@%$NM%g
5027s%@LN_S@%$LN_S%g
5028s%@LIBTOOL@%$LIBTOOL%g
3a629497
JB
5029s%@LIBOBJS@%$LIBOBJS%g
5030s%@ALLOCA@%$ALLOCA%g
539c89a1
JB
5031s%@QTHREAD_LTLIBS@%$QTHREAD_LTLIBS%g
5032s%@qtmd_h@%$qtmd_h%g
5033s%@qtmds_s@%$qtmds_s%g
5034s%@qtmdc_c@%$qtmdc_c%g
5035s%@qtdmdb_s@%$qtdmdb_s%g
47521807 5036s%@qthread_asflags@%$qthread_asflags%g
539c89a1
JB
5037s%@THREAD_PACKAGE@%$THREAD_PACKAGE%g
5038s%@THREAD_CPPFLAGS@%$THREAD_CPPFLAGS%g
5039s%@THREAD_LIBS_LOCAL@%$THREAD_LIBS_LOCAL%g
5040s%@THREAD_LIBS_INSTALLED@%$THREAD_LIBS_INSTALLED%g
3a629497 5041s%@AWK@%$AWK%g
7c86ae05
JB
5042s%@GUILE_MAJOR_VERSION@%$GUILE_MAJOR_VERSION%g
5043s%@GUILE_MINOR_VERSION@%$GUILE_MINOR_VERSION%g
5044s%@GUILE_VERSION@%$GUILE_VERSION%g
daa4f38c 5045s%@GUILE_LIBS@%$GUILE_LIBS%g
7c86ae05 5046s%@GUILE_STAMP@%$GUILE_STAMP%g
3a629497 5047s%@LIBLOBJS@%$LIBLOBJS%g
3a629497
JB
5048
5049CEOF
5050EOF
5051
5052cat >> $CONFIG_STATUS <<\EOF
5053
5054# Split the substitutions into bite-sized pieces for seds with
5055# small command number limits, like on Digital OSF/1 and HP-UX.
5056ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
5057ac_file=1 # Number of current file.
5058ac_beg=1 # First line for current file.
5059ac_end=$ac_max_sed_cmds # Line after last line for current file.
5060ac_more_lines=:
5061ac_sed_cmds=""
5062while $ac_more_lines; do
5063 if test $ac_beg -gt 1; then
5064 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
5065 else
5066 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
5067 fi
5068 if test ! -s conftest.s$ac_file; then
5069 ac_more_lines=false
5070 rm -f conftest.s$ac_file
5071 else
5072 if test -z "$ac_sed_cmds"; then
5073 ac_sed_cmds="sed -f conftest.s$ac_file"
5074 else
5075 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
5076 fi
5077 ac_file=`expr $ac_file + 1`
5078 ac_beg=$ac_end
5079 ac_end=`expr $ac_end + $ac_max_sed_cmds`
5080 fi
5081done
5082if test -z "$ac_sed_cmds"; then
5083 ac_sed_cmds=cat
5084fi
5085EOF
5086
5087cat >> $CONFIG_STATUS <<EOF
5088
0e6d926d 5089CONFIG_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
5090EOF
5091cat >> $CONFIG_STATUS <<\EOF
5092for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
5093 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
5094 case "$ac_file" in
5095 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
5096 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
5097 *) ac_file_in="${ac_file}.in" ;;
5098 esac
5099
5100 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
5101
5102 # Remove last slash and all that follows it. Not all systems have dirname.
5103 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
5104 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
5105 # The file is in a subdirectory.
5106 test ! -d "$ac_dir" && mkdir "$ac_dir"
5107 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
5108 # A "../" for each directory in $ac_dir_suffix.
5109 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
5110 else
5111 ac_dir_suffix= ac_dots=
5112 fi
5113
5114 case "$ac_given_srcdir" in
5115 .) srcdir=.
5116 if test -z "$ac_dots"; then top_srcdir=.
5117 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
0f2d19dd
JB
5118 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
5119 *) # Relative path.
5120 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
5121 top_srcdir="$ac_dots$ac_given_srcdir" ;;
5122 esac
5123
733943b9
TT
5124 case "$ac_given_INSTALL" in
5125 [/$]*) INSTALL="$ac_given_INSTALL" ;;
5126 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
5127 esac
5128
0f2d19dd
JB
5129 echo creating "$ac_file"
5130 rm -f "$ac_file"
5131 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
5132 case "$ac_file" in
5133 *Makefile*) ac_comsub="1i\\
5134# $configure_input" ;;
5135 *) ac_comsub= ;;
5136 esac
733943b9
TT
5137
5138 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
0f2d19dd
JB
5139 sed -e "$ac_comsub
5140s%@configure_input@%$configure_input%g
5141s%@srcdir@%$srcdir%g
5142s%@top_srcdir@%$top_srcdir%g
733943b9
TT
5143s%@INSTALL@%$INSTALL%g
5144" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
0f2d19dd 5145fi; done
733943b9 5146rm -f conftest.s*
0f2d19dd 5147
3a629497
JB
5148# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
5149# NAME is the cpp macro being defined and VALUE is the value it is being given.
5150#
5151# ac_d sets the value in "#define NAME VALUE" lines.
5152ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
5153ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
5154ac_dC='\3'
5155ac_dD='%g'
5156# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
5157ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
5158ac_uB='\([ ]\)%\1#\2define\3'
5159ac_uC=' '
5160ac_uD='\4%g'
5161# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
5162ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
5163ac_eB='$%\1#\2define\3'
5164ac_eC=' '
5165ac_eD='%g'
5166
5167if test "${CONFIG_HEADERS+set}" != set; then
733943b9
TT
5168EOF
5169cat >> $CONFIG_STATUS <<EOF
3a629497 5170 CONFIG_HEADERS="libguile/scmconfig.h"
733943b9
TT
5171EOF
5172cat >> $CONFIG_STATUS <<\EOF
3a629497
JB
5173fi
5174for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
5175 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
5176 case "$ac_file" in
5177 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
5178 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
5179 *) ac_file_in="${ac_file}.in" ;;
5180 esac
0f2d19dd 5181
3a629497 5182 echo creating $ac_file
0f2d19dd 5183
3a629497
JB
5184 rm -f conftest.frag conftest.in conftest.out
5185 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
5186 cat $ac_file_inputs > conftest.in
0f2d19dd 5187
3a629497 5188EOF
0f2d19dd 5189
3a629497
JB
5190# Transform confdefs.h into a sed script conftest.vals that substitutes
5191# the proper values into config.h.in to produce config.h. And first:
5192# Protect against being on the right side of a sed subst in config.status.
5193# Protect against being in an unquoted here document in config.status.
5194rm -f conftest.vals
5195cat > conftest.hdr <<\EOF
5196s/[\\&%]/\\&/g
5197s%[\\$`]%\\&%g
5198s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
5199s%ac_d%ac_u%gp
5200s%ac_u%ac_e%gp
5201EOF
5202sed -n -f conftest.hdr confdefs.h > conftest.vals
5203rm -f conftest.hdr
5204
5205# This sed command replaces #undef with comments. This is necessary, for
5206# example, in the case of _POSIX_SOURCE, which is predefined and required
5207# on some systems where configure will not decide to define it.
5208cat >> conftest.vals <<\EOF
5209s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
5210EOF
0f2d19dd 5211
3a629497
JB
5212# Break up conftest.vals because some shells have a limit on
5213# the size of here documents, and old seds have small limits too.
733943b9 5214
3a629497
JB
5215rm -f conftest.tail
5216while :
5217do
5218 ac_lines=`grep -c . conftest.vals`
5219 # grep -c gives empty output for an empty file on some AIX systems.
5220 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
5221 # Write a limited-size here document to conftest.frag.
5222 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
5223 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
5224 echo 'CEOF
5225 sed -f conftest.frag conftest.in > conftest.out
5226 rm -f conftest.in
5227 mv conftest.out conftest.in
5228' >> $CONFIG_STATUS
5229 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
5230 rm -f conftest.vals
5231 mv conftest.tail conftest.vals
5232done
5233rm -f conftest.vals
0f2d19dd 5234
3a629497
JB
5235cat >> $CONFIG_STATUS <<\EOF
5236 rm -f conftest.frag conftest.h
5237 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
5238 cat conftest.in >> conftest.h
5239 rm -f conftest.in
5240 if cmp -s $ac_file conftest.h 2>/dev/null; then
5241 echo "$ac_file is unchanged"
5242 rm -f conftest.h
5243 else
5244 # Remove last slash and all that follows it. Not all systems have dirname.
5245 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
5246 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
5247 # The file is in a subdirectory.
5248 test ! -d "$ac_dir" && mkdir "$ac_dir"
0f2d19dd 5249 fi
3a629497
JB
5250 rm -f $ac_file
5251 mv conftest.h $ac_file
5252 fi
5253fi; done
0f2d19dd 5254
3a629497
JB
5255EOF
5256cat >> $CONFIG_STATUS <<EOF
0f2d19dd 5257
3a629497
JB
5258EOF
5259cat >> $CONFIG_STATUS <<\EOF
5260test -z "$CONFIG_HEADERS" || echo timestamp > libguile/stamp-h
5261chmod +x libguile/guile-snarf
5262exit 0
5263EOF
5264chmod +x $CONFIG_STATUS
5265rm -fr confdefs* $ac_clean_files
5266test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
5267
0f2d19dd 5268