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