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