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