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