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