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