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