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