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