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