* configure.in: Add option and checks for dynamic linking.
[bpt/guile.git] / libguile / configure
1 #! /bin/sh
2
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated automatically using autoconf version 2.12
5 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
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:
11 ac_help=
12 ac_default_prefix=/usr/local
13 # Any additions from configure.in:
14 ac_help="$ac_help
15 --disable-debug Don't include debugging support"
16 ac_help="$ac_help
17 --enable-dynamic-linking Include support for dynamic linking"
18 ac_help="$ac_help
19 --with-threads thread interface"
20
21 # Initialize some variables set by options.
22 # The variables have the same names as the options, with
23 # dashes changed to underlines.
24 build=NONE
25 cache_file=./config.cache
26 exec_prefix=NONE
27 host=NONE
28 no_create=
29 nonopt=NONE
30 no_recursion=
31 prefix=NONE
32 program_prefix=NONE
33 program_suffix=NONE
34 program_transform_name=s,x,x,
35 silent=
36 site=
37 srcdir=
38 target=NONE
39 verbose=
40 x_includes=NONE
41 x_libraries=NONE
42 bindir='${exec_prefix}/bin'
43 sbindir='${exec_prefix}/sbin'
44 libexecdir='${exec_prefix}/libexec'
45 datadir='${prefix}/share'
46 sysconfdir='${prefix}/etc'
47 sharedstatedir='${prefix}/com'
48 localstatedir='${prefix}/var'
49 libdir='${exec_prefix}/lib'
50 includedir='${prefix}/include'
51 oldincludedir='/usr/include'
52 infodir='${prefix}/info'
53 mandir='${prefix}/man'
54
55 # Initialize some other variables.
56 subdirs=
57 MFLAGS= MAKEFLAGS=
58 # Maximum number of lines to put in a shell here document.
59 ac_max_here_lines=12
60
61 ac_prev=
62 for ac_option
63 do
64
65 # If the previous option needs an argument, assign it.
66 if test -n "$ac_prev"; then
67 eval "$ac_prev=\$ac_option"
68 ac_prev=
69 continue
70 fi
71
72 case "$ac_option" in
73 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
74 *) ac_optarg= ;;
75 esac
76
77 # Accept the important Cygnus configure options, so we can diagnose typos.
78
79 case "$ac_option" in
80
81 -bindir | --bindir | --bindi | --bind | --bin | --bi)
82 ac_prev=bindir ;;
83 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
84 bindir="$ac_optarg" ;;
85
86 -build | --build | --buil | --bui | --bu)
87 ac_prev=build ;;
88 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
89 build="$ac_optarg" ;;
90
91 -cache-file | --cache-file | --cache-fil | --cache-fi \
92 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
93 ac_prev=cache_file ;;
94 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
95 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
96 cache_file="$ac_optarg" ;;
97
98 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
99 ac_prev=datadir ;;
100 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
101 | --da=*)
102 datadir="$ac_optarg" ;;
103
104 -disable-* | --disable-*)
105 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
106 # Reject names that are not valid shell variable names.
107 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
108 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
109 fi
110 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
111 eval "enable_${ac_feature}=no" ;;
112
113 -enable-* | --enable-*)
114 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
115 # Reject names that are not valid shell variable names.
116 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
117 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
118 fi
119 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
120 case "$ac_option" in
121 *=*) ;;
122 *) ac_optarg=yes ;;
123 esac
124 eval "enable_${ac_feature}='$ac_optarg'" ;;
125
126 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
127 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
128 | --exec | --exe | --ex)
129 ac_prev=exec_prefix ;;
130 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
131 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
132 | --exec=* | --exe=* | --ex=*)
133 exec_prefix="$ac_optarg" ;;
134
135 -gas | --gas | --ga | --g)
136 # Obsolete; use --with-gas.
137 with_gas=yes ;;
138
139 -help | --help | --hel | --he)
140 # Omit some internal or obsolete options to make the list less imposing.
141 # This message is too long to be a string in the A/UX 3.1 sh.
142 cat << EOF
143 Usage: configure [options] [host]
144 Options: [defaults in brackets after descriptions]
145 Configuration:
146 --cache-file=FILE cache test results in FILE
147 --help print this message
148 --no-create do not create output files
149 --quiet, --silent do not print \`checking...' messages
150 --version print the version of autoconf that created configure
151 Directory and file names:
152 --prefix=PREFIX install architecture-independent files in PREFIX
153 [$ac_default_prefix]
154 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
155 [same as prefix]
156 --bindir=DIR user executables in DIR [EPREFIX/bin]
157 --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
158 --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
159 --datadir=DIR read-only architecture-independent data in DIR
160 [PREFIX/share]
161 --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
162 --sharedstatedir=DIR modifiable architecture-independent data in DIR
163 [PREFIX/com]
164 --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
165 --libdir=DIR object code libraries in DIR [EPREFIX/lib]
166 --includedir=DIR C header files in DIR [PREFIX/include]
167 --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
168 --infodir=DIR info documentation in DIR [PREFIX/info]
169 --mandir=DIR man documentation in DIR [PREFIX/man]
170 --srcdir=DIR find the sources in DIR [configure dir or ..]
171 --program-prefix=PREFIX prepend PREFIX to installed program names
172 --program-suffix=SUFFIX append SUFFIX to installed program names
173 --program-transform-name=PROGRAM
174 run sed PROGRAM on installed program names
175 EOF
176 cat << EOF
177 Host type:
178 --build=BUILD configure for building on BUILD [BUILD=HOST]
179 --host=HOST configure for HOST [guessed]
180 --target=TARGET configure for TARGET [TARGET=HOST]
181 Features and packages:
182 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
183 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
184 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
185 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
186 --x-includes=DIR X include files are in DIR
187 --x-libraries=DIR X library files are in DIR
188 EOF
189 if test -n "$ac_help"; then
190 echo "--enable and --with options recognized:$ac_help"
191 fi
192 exit 0 ;;
193
194 -host | --host | --hos | --ho)
195 ac_prev=host ;;
196 -host=* | --host=* | --hos=* | --ho=*)
197 host="$ac_optarg" ;;
198
199 -includedir | --includedir | --includedi | --included | --include \
200 | --includ | --inclu | --incl | --inc)
201 ac_prev=includedir ;;
202 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
203 | --includ=* | --inclu=* | --incl=* | --inc=*)
204 includedir="$ac_optarg" ;;
205
206 -infodir | --infodir | --infodi | --infod | --info | --inf)
207 ac_prev=infodir ;;
208 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
209 infodir="$ac_optarg" ;;
210
211 -libdir | --libdir | --libdi | --libd)
212 ac_prev=libdir ;;
213 -libdir=* | --libdir=* | --libdi=* | --libd=*)
214 libdir="$ac_optarg" ;;
215
216 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
217 | --libexe | --libex | --libe)
218 ac_prev=libexecdir ;;
219 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
220 | --libexe=* | --libex=* | --libe=*)
221 libexecdir="$ac_optarg" ;;
222
223 -localstatedir | --localstatedir | --localstatedi | --localstated \
224 | --localstate | --localstat | --localsta | --localst \
225 | --locals | --local | --loca | --loc | --lo)
226 ac_prev=localstatedir ;;
227 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
228 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
229 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
230 localstatedir="$ac_optarg" ;;
231
232 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
233 ac_prev=mandir ;;
234 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
235 mandir="$ac_optarg" ;;
236
237 -nfp | --nfp | --nf)
238 # Obsolete; use --without-fp.
239 with_fp=no ;;
240
241 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
242 | --no-cr | --no-c)
243 no_create=yes ;;
244
245 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
246 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
247 no_recursion=yes ;;
248
249 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
250 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
251 | --oldin | --oldi | --old | --ol | --o)
252 ac_prev=oldincludedir ;;
253 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
254 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
255 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
256 oldincludedir="$ac_optarg" ;;
257
258 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
259 ac_prev=prefix ;;
260 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
261 prefix="$ac_optarg" ;;
262
263 -program-prefix | --program-prefix | --program-prefi | --program-pref \
264 | --program-pre | --program-pr | --program-p)
265 ac_prev=program_prefix ;;
266 -program-prefix=* | --program-prefix=* | --program-prefi=* \
267 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
268 program_prefix="$ac_optarg" ;;
269
270 -program-suffix | --program-suffix | --program-suffi | --program-suff \
271 | --program-suf | --program-su | --program-s)
272 ac_prev=program_suffix ;;
273 -program-suffix=* | --program-suffix=* | --program-suffi=* \
274 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
275 program_suffix="$ac_optarg" ;;
276
277 -program-transform-name | --program-transform-name \
278 | --program-transform-nam | --program-transform-na \
279 | --program-transform-n | --program-transform- \
280 | --program-transform | --program-transfor \
281 | --program-transfo | --program-transf \
282 | --program-trans | --program-tran \
283 | --progr-tra | --program-tr | --program-t)
284 ac_prev=program_transform_name ;;
285 -program-transform-name=* | --program-transform-name=* \
286 | --program-transform-nam=* | --program-transform-na=* \
287 | --program-transform-n=* | --program-transform-=* \
288 | --program-transform=* | --program-transfor=* \
289 | --program-transfo=* | --program-transf=* \
290 | --program-trans=* | --program-tran=* \
291 | --progr-tra=* | --program-tr=* | --program-t=*)
292 program_transform_name="$ac_optarg" ;;
293
294 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
295 | -silent | --silent | --silen | --sile | --sil)
296 silent=yes ;;
297
298 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
299 ac_prev=sbindir ;;
300 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
301 | --sbi=* | --sb=*)
302 sbindir="$ac_optarg" ;;
303
304 -sharedstatedir | --sharedstatedir | --sharedstatedi \
305 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
306 | --sharedst | --shareds | --shared | --share | --shar \
307 | --sha | --sh)
308 ac_prev=sharedstatedir ;;
309 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
310 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
311 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
312 | --sha=* | --sh=*)
313 sharedstatedir="$ac_optarg" ;;
314
315 -site | --site | --sit)
316 ac_prev=site ;;
317 -site=* | --site=* | --sit=*)
318 site="$ac_optarg" ;;
319
320 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
321 ac_prev=srcdir ;;
322 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
323 srcdir="$ac_optarg" ;;
324
325 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
326 | --syscon | --sysco | --sysc | --sys | --sy)
327 ac_prev=sysconfdir ;;
328 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
329 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
330 sysconfdir="$ac_optarg" ;;
331
332 -target | --target | --targe | --targ | --tar | --ta | --t)
333 ac_prev=target ;;
334 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
335 target="$ac_optarg" ;;
336
337 -v | -verbose | --verbose | --verbos | --verbo | --verb)
338 verbose=yes ;;
339
340 -version | --version | --versio | --versi | --vers)
341 echo "configure generated by autoconf version 2.12"
342 exit 0 ;;
343
344 -with-* | --with-*)
345 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
346 # Reject names that are not valid shell variable names.
347 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
348 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
349 fi
350 ac_package=`echo $ac_package| sed 's/-/_/g'`
351 case "$ac_option" in
352 *=*) ;;
353 *) ac_optarg=yes ;;
354 esac
355 eval "with_${ac_package}='$ac_optarg'" ;;
356
357 -without-* | --without-*)
358 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
359 # Reject names that are not valid shell variable names.
360 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
361 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
362 fi
363 ac_package=`echo $ac_package| sed 's/-/_/g'`
364 eval "with_${ac_package}=no" ;;
365
366 --x)
367 # Obsolete; use --with-x.
368 with_x=yes ;;
369
370 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
371 | --x-incl | --x-inc | --x-in | --x-i)
372 ac_prev=x_includes ;;
373 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
374 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
375 x_includes="$ac_optarg" ;;
376
377 -x-libraries | --x-libraries | --x-librarie | --x-librari \
378 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
379 ac_prev=x_libraries ;;
380 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
381 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
382 x_libraries="$ac_optarg" ;;
383
384 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
385 ;;
386
387 *)
388 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
389 echo "configure: warning: $ac_option: invalid host type" 1>&2
390 fi
391 if test "x$nonopt" != xNONE; then
392 { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
393 fi
394 nonopt="$ac_option"
395 ;;
396
397 esac
398 done
399
400 if test -n "$ac_prev"; then
401 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
402 fi
403
404 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
405
406 # File descriptor usage:
407 # 0 standard input
408 # 1 file creation
409 # 2 errors and warnings
410 # 3 some systems may open it to /dev/tty
411 # 4 used on the Kubota Titan
412 # 6 checking for... messages and results
413 # 5 compiler messages saved in config.log
414 if test "$silent" = yes; then
415 exec 6>/dev/null
416 else
417 exec 6>&1
418 fi
419 exec 5>./config.log
420
421 echo "\
422 This file contains any messages produced by compilers while
423 running configure, to aid debugging if configure makes a mistake.
424 " 1>&5
425
426 # Strip out --no-create and --no-recursion so they do not pile up.
427 # Also quote any args containing shell metacharacters.
428 ac_configure_args=
429 for ac_arg
430 do
431 case "$ac_arg" in
432 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
433 | --no-cr | --no-c) ;;
434 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
435 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
436 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
437 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
438 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
439 esac
440 done
441
442 # NLS nuisances.
443 # Only set these to C if already set. These must not be set unconditionally
444 # because not all systems understand e.g. LANG=C (notably SCO).
445 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
446 # Non-C LC_CTYPE values break the ctype check.
447 if test "${LANG+set}" = set; then LANG=C; export LANG; fi
448 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
449 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
450 if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
451
452 # confdefs.h avoids OS command line length limits that DEFS can exceed.
453 rm -rf conftest* confdefs.h
454 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
455 echo > confdefs.h
456
457 # A filename unique to this package, relative to the directory that
458 # configure is in, which we can look for to find out if srcdir is correct.
459 ac_unique_file=eval.c
460
461 # Find the source files, if location was not specified.
462 if test -z "$srcdir"; then
463 ac_srcdir_defaulted=yes
464 # Try the directory containing this script, then its parent.
465 ac_prog=$0
466 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
467 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
468 srcdir=$ac_confdir
469 if test ! -r $srcdir/$ac_unique_file; then
470 srcdir=..
471 fi
472 else
473 ac_srcdir_defaulted=no
474 fi
475 if test ! -r $srcdir/$ac_unique_file; then
476 if test "$ac_srcdir_defaulted" = yes; then
477 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
478 else
479 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
480 fi
481 fi
482 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
483
484 # Prefer explicitly selected file to automatically selected ones.
485 if test -z "$CONFIG_SITE"; then
486 if test "x$prefix" != xNONE; then
487 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
488 else
489 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
490 fi
491 fi
492 for ac_site_file in $CONFIG_SITE; do
493 if test -r "$ac_site_file"; then
494 echo "loading site script $ac_site_file"
495 . "$ac_site_file"
496 fi
497 done
498
499 if test -r "$cache_file"; then
500 echo "loading cache $cache_file"
501 . $cache_file
502 else
503 echo "creating cache $cache_file"
504 > $cache_file
505 fi
506
507 ac_ext=c
508 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
509 ac_cpp='$CPP $CPPFLAGS'
510 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
511 ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
512 cross_compiling=$ac_cv_prog_cc_cross
513
514 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
515 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
516 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
517 ac_n= ac_c='
518 ' ac_t=' '
519 else
520 ac_n=-n ac_c= ac_t=
521 fi
522 else
523 ac_n= ac_c='\c' ac_t=
524 fi
525
526
527
528
529
530 ac_aux_dir=
531 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
532 if test -f $ac_dir/install-sh; then
533 ac_aux_dir=$ac_dir
534 ac_install_sh="$ac_aux_dir/install-sh -c"
535 break
536 elif test -f $ac_dir/install.sh; then
537 ac_aux_dir=$ac_dir
538 ac_install_sh="$ac_aux_dir/install.sh -c"
539 break
540 fi
541 done
542 if test -z "$ac_aux_dir"; then
543 { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
544 fi
545 ac_config_guess=$ac_aux_dir/config.guess
546 ac_config_sub=$ac_aux_dir/config.sub
547 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
548
549 # Find a good install program. We prefer a C program (faster),
550 # so one script is as good as another. But avoid the broken or
551 # incompatible versions:
552 # SysV /etc/install, /usr/sbin/install
553 # SunOS /usr/etc/install
554 # IRIX /sbin/install
555 # AIX /bin/install
556 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
557 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
558 # ./install, which can be erroneously created by make from ./install.sh.
559 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
560 echo "configure:561: checking for a BSD compatible install" >&5
561 if test -z "$INSTALL"; then
562 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
563 echo $ac_n "(cached) $ac_c" 1>&6
564 else
565 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="${IFS}:"
566 for ac_dir in $PATH; do
567 # Account for people who put trailing slashes in PATH elements.
568 case "$ac_dir/" in
569 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
570 *)
571 # OSF1 and SCO ODT 3.0 have their own names for install.
572 for ac_prog in ginstall installbsd scoinst install; do
573 if test -f $ac_dir/$ac_prog; then
574 if test $ac_prog = install &&
575 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
576 # AIX install. It has an incompatible calling convention.
577 # OSF/1 installbsd also uses dspmsg, but is usable.
578 :
579 else
580 ac_cv_path_install="$ac_dir/$ac_prog -c"
581 break 2
582 fi
583 fi
584 done
585 ;;
586 esac
587 done
588 IFS="$ac_save_IFS"
589
590 fi
591 if test "${ac_cv_path_install+set}" = set; then
592 INSTALL="$ac_cv_path_install"
593 else
594 # As a last resort, use the slow shell script. We don't cache a
595 # path for INSTALL within a source directory, because that will
596 # break other packages using the cache if that directory is
597 # removed, or if the path is relative.
598 INSTALL="$ac_install_sh"
599 fi
600 fi
601 echo "$ac_t""$INSTALL" 1>&6
602
603 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
604 # It thinks the first close brace ends the variable substitution.
605 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
606
607 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
608
609
610 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
611
612
613 . $srcdir/../GUILE-VERSION
614
615 PACKAGE=$PACKAGE
616
617 cat >> confdefs.h <<EOF
618 #define PACKAGE "$PACKAGE"
619 EOF
620
621 VERSION=$VERSION
622
623 cat >> confdefs.h <<EOF
624 #define VERSION "$VERSION"
625 EOF
626
627 echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
628 echo "configure:629: checking whether build environment is sane" >&5
629 echo timestamp > conftestfile
630 # Do this in a subshell so we don't clobber the current shell's
631 # arguments. FIXME: maybe try `-L' hack like GETLOADAVG test?
632 if (set X `ls -t $srcdir/configure conftestfile`; test "$2" = conftestfile)
633 then
634 # Ok.
635 :
636 else
637 { echo "configure: error: newly created file is older than distributed files!
638 Check your system clock" 1>&2; exit 1; }
639 fi
640 rm -f conftest*
641 echo "$ac_t""yes" 1>&6
642 if test "$program_transform_name" = s,x,x,; then
643 program_transform_name=
644 else
645 # Double any \ or $. echo might interpret backslashes.
646 cat <<\EOF_SED > conftestsed
647 s,\\,\\\\,g; s,\$,$$,g
648 EOF_SED
649 program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
650 rm -f conftestsed
651 fi
652 test "$program_prefix" != NONE &&
653 program_transform_name="s,^,${program_prefix},; $program_transform_name"
654 # Use a double $ so make ignores it.
655 test "$program_suffix" != NONE &&
656 program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
657
658 # sed with no file args requires a program.
659 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
660
661 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
662 echo "configure:663: checking whether ${MAKE-make} sets \${MAKE}" >&5
663 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
664 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
665 echo $ac_n "(cached) $ac_c" 1>&6
666 else
667 cat > conftestmake <<\EOF
668 all:
669 @echo 'ac_maketemp="${MAKE}"'
670 EOF
671 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
672 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
673 if test -n "$ac_maketemp"; then
674 eval ac_cv_prog_make_${ac_make}_set=yes
675 else
676 eval ac_cv_prog_make_${ac_make}_set=no
677 fi
678 rm -f conftestmake
679 fi
680 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
681 echo "$ac_t""yes" 1>&6
682 SET_MAKE=
683 else
684 echo "$ac_t""no" 1>&6
685 SET_MAKE="MAKE=${MAKE-make}"
686 fi
687
688 ac_aux_dir=
689 for ac_dir in .. $srcdir/..; do
690 if test -f $ac_dir/install-sh; then
691 ac_aux_dir=$ac_dir
692 ac_install_sh="$ac_aux_dir/install-sh -c"
693 break
694 elif test -f $ac_dir/install.sh; then
695 ac_aux_dir=$ac_dir
696 ac_install_sh="$ac_aux_dir/install.sh -c"
697 break
698 fi
699 done
700 if test -z "$ac_aux_dir"; then
701 { echo "configure: error: can not find install-sh or install.sh in .. $srcdir/.." 1>&2; exit 1; }
702 fi
703 ac_config_guess=$ac_aux_dir/config.guess
704 ac_config_sub=$ac_aux_dir/config.sub
705 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
706
707 module=libguile
708
709
710 #--------------------------------------------------------------------
711 #
712 # User options
713 #
714 #--------------------------------------------------------------------
715
716 # Check whether --enable-debug or --disable-debug was given.
717 if test "${enable_debug+set}" = set; then
718 enableval="$enable_debug"
719 :
720 fi
721
722 if test "$enableval" != n && test "$enableval" != no; then
723 cat >> confdefs.h <<\EOF
724 #define DEBUG_EXTENSIONS 1
725 EOF
726
727 cat >> confdefs.h <<\EOF
728 #define READER_EXTENSIONS 1
729 EOF
730
731 LIBOBJS="backtrace.o stacks.o debug.o srcprop.o $LIBOBJS"
732 fi
733
734 # Check whether --enable-dynamic-linking or --disable-dynamic-linking was given.
735 if test "${enable_dynamic_linking+set}" = set; then
736 enableval="$enable_dynamic_linking"
737 :
738 fi
739
740 if test "$enableval" != n && test "$enableval" != no && test "$enableval" != ""; then
741 cat >> confdefs.h <<\EOF
742 #define DYNAMIC_LINKING 1
743 EOF
744
745 fi
746
747 #--------------------------------------------------------------------
748
749 # Extract the first word of "gcc", so it can be a program name with args.
750 set dummy gcc; ac_word=$2
751 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
752 echo "configure:753: checking for $ac_word" >&5
753 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
754 echo $ac_n "(cached) $ac_c" 1>&6
755 else
756 if test -n "$CC"; then
757 ac_cv_prog_CC="$CC" # Let the user override the test.
758 else
759 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
760 for ac_dir in $PATH; do
761 test -z "$ac_dir" && ac_dir=.
762 if test -f $ac_dir/$ac_word; then
763 ac_cv_prog_CC="gcc"
764 break
765 fi
766 done
767 IFS="$ac_save_ifs"
768 fi
769 fi
770 CC="$ac_cv_prog_CC"
771 if test -n "$CC"; then
772 echo "$ac_t""$CC" 1>&6
773 else
774 echo "$ac_t""no" 1>&6
775 fi
776
777 if test -z "$CC"; then
778 # Extract the first word of "cc", so it can be a program name with args.
779 set dummy cc; ac_word=$2
780 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
781 echo "configure:782: checking for $ac_word" >&5
782 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
783 echo $ac_n "(cached) $ac_c" 1>&6
784 else
785 if test -n "$CC"; then
786 ac_cv_prog_CC="$CC" # Let the user override the test.
787 else
788 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
789 ac_prog_rejected=no
790 for ac_dir in $PATH; do
791 test -z "$ac_dir" && ac_dir=.
792 if test -f $ac_dir/$ac_word; then
793 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
794 ac_prog_rejected=yes
795 continue
796 fi
797 ac_cv_prog_CC="cc"
798 break
799 fi
800 done
801 IFS="$ac_save_ifs"
802 if test $ac_prog_rejected = yes; then
803 # We found a bogon in the path, so make sure we never use it.
804 set dummy $ac_cv_prog_CC
805 shift
806 if test $# -gt 0; then
807 # We chose a different compiler from the bogus one.
808 # However, it has the same basename, so the bogon will be chosen
809 # first if we set CC to just the basename; use the full file name.
810 shift
811 set dummy "$ac_dir/$ac_word" "$@"
812 shift
813 ac_cv_prog_CC="$@"
814 fi
815 fi
816 fi
817 fi
818 CC="$ac_cv_prog_CC"
819 if test -n "$CC"; then
820 echo "$ac_t""$CC" 1>&6
821 else
822 echo "$ac_t""no" 1>&6
823 fi
824
825 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
826 fi
827
828 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
829 echo "configure:830: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
830
831 ac_ext=c
832 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
833 ac_cpp='$CPP $CPPFLAGS'
834 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
835 ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
836 cross_compiling=$ac_cv_prog_cc_cross
837
838 cat > conftest.$ac_ext <<EOF
839 #line 840 "configure"
840 #include "confdefs.h"
841 main(){return(0);}
842 EOF
843 if { (eval echo configure:844: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
844 ac_cv_prog_cc_works=yes
845 # If we can't run a trivial program, we are probably using a cross compiler.
846 if (./conftest; exit) 2>/dev/null; then
847 ac_cv_prog_cc_cross=no
848 else
849 ac_cv_prog_cc_cross=yes
850 fi
851 else
852 echo "configure: failed program was:" >&5
853 cat conftest.$ac_ext >&5
854 ac_cv_prog_cc_works=no
855 fi
856 rm -fr conftest*
857
858 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
859 if test $ac_cv_prog_cc_works = no; then
860 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
861 fi
862 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
863 echo "configure:864: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
864 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
865 cross_compiling=$ac_cv_prog_cc_cross
866
867 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
868 echo "configure:869: checking whether we are using GNU C" >&5
869 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
870 echo $ac_n "(cached) $ac_c" 1>&6
871 else
872 cat > conftest.c <<EOF
873 #ifdef __GNUC__
874 yes;
875 #endif
876 EOF
877 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:878: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
878 ac_cv_prog_gcc=yes
879 else
880 ac_cv_prog_gcc=no
881 fi
882 fi
883
884 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
885
886 if test $ac_cv_prog_gcc = yes; then
887 GCC=yes
888 ac_test_CFLAGS="${CFLAGS+set}"
889 ac_save_CFLAGS="$CFLAGS"
890 CFLAGS=
891 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
892 echo "configure:893: checking whether ${CC-cc} accepts -g" >&5
893 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
894 echo $ac_n "(cached) $ac_c" 1>&6
895 else
896 echo 'void f(){}' > conftest.c
897 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
898 ac_cv_prog_cc_g=yes
899 else
900 ac_cv_prog_cc_g=no
901 fi
902 rm -f conftest*
903
904 fi
905
906 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
907 if test "$ac_test_CFLAGS" = set; then
908 CFLAGS="$ac_save_CFLAGS"
909 elif test $ac_cv_prog_cc_g = yes; then
910 CFLAGS="-g -O2"
911 else
912 CFLAGS="-O2"
913 fi
914 else
915 GCC=
916 test "${CFLAGS+set}" = set || CFLAGS="-g"
917 fi
918
919 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
920 echo "configure:921: checking how to run the C preprocessor" >&5
921 # On Suns, sometimes $CPP names a directory.
922 if test -n "$CPP" && test -d "$CPP"; then
923 CPP=
924 fi
925 if test -z "$CPP"; then
926 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
927 echo $ac_n "(cached) $ac_c" 1>&6
928 else
929 # This must be in double quotes, not single quotes, because CPP may get
930 # substituted into the Makefile and "${CC-cc}" will confuse make.
931 CPP="${CC-cc} -E"
932 # On the NeXT, cc -E runs the code through the compiler's parser,
933 # not just through cpp.
934 cat > conftest.$ac_ext <<EOF
935 #line 936 "configure"
936 #include "confdefs.h"
937 #include <assert.h>
938 Syntax Error
939 EOF
940 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
941 { (eval echo configure:942: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
942 ac_err=`grep -v '^ *+' conftest.out`
943 if test -z "$ac_err"; then
944 :
945 else
946 echo "$ac_err" >&5
947 echo "configure: failed program was:" >&5
948 cat conftest.$ac_ext >&5
949 rm -rf conftest*
950 CPP="${CC-cc} -E -traditional-cpp"
951 cat > conftest.$ac_ext <<EOF
952 #line 953 "configure"
953 #include "confdefs.h"
954 #include <assert.h>
955 Syntax Error
956 EOF
957 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
958 { (eval echo configure:959: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
959 ac_err=`grep -v '^ *+' conftest.out`
960 if test -z "$ac_err"; then
961 :
962 else
963 echo "$ac_err" >&5
964 echo "configure: failed program was:" >&5
965 cat conftest.$ac_ext >&5
966 rm -rf conftest*
967 CPP=/lib/cpp
968 fi
969 rm -f conftest*
970 fi
971 rm -f conftest*
972 ac_cv_prog_CPP="$CPP"
973 fi
974 CPP="$ac_cv_prog_CPP"
975 else
976 ac_cv_prog_CPP="$CPP"
977 fi
978 echo "$ac_t""$CPP" 1>&6
979
980 # Extract the first word of "ranlib", so it can be a program name with args.
981 set dummy ranlib; ac_word=$2
982 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
983 echo "configure:984: checking for $ac_word" >&5
984 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
985 echo $ac_n "(cached) $ac_c" 1>&6
986 else
987 if test -n "$RANLIB"; then
988 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
989 else
990 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
991 for ac_dir in $PATH; do
992 test -z "$ac_dir" && ac_dir=.
993 if test -f $ac_dir/$ac_word; then
994 ac_cv_prog_RANLIB="ranlib"
995 break
996 fi
997 done
998 IFS="$ac_save_ifs"
999 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1000 fi
1001 fi
1002 RANLIB="$ac_cv_prog_RANLIB"
1003 if test -n "$RANLIB"; then
1004 echo "$ac_t""$RANLIB" 1>&6
1005 else
1006 echo "$ac_t""no" 1>&6
1007 fi
1008
1009
1010 echo $ac_n "checking for AIX""... $ac_c" 1>&6
1011 echo "configure:1012: checking for AIX" >&5
1012 cat > conftest.$ac_ext <<EOF
1013 #line 1014 "configure"
1014 #include "confdefs.h"
1015 #ifdef _AIX
1016 yes
1017 #endif
1018
1019 EOF
1020 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1021 egrep "yes" >/dev/null 2>&1; then
1022 rm -rf conftest*
1023 echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
1024 #define _ALL_SOURCE 1
1025 EOF
1026
1027 else
1028 rm -rf conftest*
1029 echo "$ac_t""no" 1>&6
1030 fi
1031 rm -f conftest*
1032
1033
1034 echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
1035 echo "configure:1036: checking for POSIXized ISC" >&5
1036 if test -d /etc/conf/kconfig.d &&
1037 grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
1038 then
1039 echo "$ac_t""yes" 1>&6
1040 ISC=yes # If later tests want to check for ISC.
1041 cat >> confdefs.h <<\EOF
1042 #define _POSIX_SOURCE 1
1043 EOF
1044
1045 if test "$GCC" = yes; then
1046 CC="$CC -posix"
1047 else
1048 CC="$CC -Xp"
1049 fi
1050 else
1051 echo "$ac_t""no" 1>&6
1052 ISC=
1053 fi
1054
1055 ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'`
1056 echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6
1057 echo "configure:1058: checking for minix/config.h" >&5
1058 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1059 echo $ac_n "(cached) $ac_c" 1>&6
1060 else
1061 cat > conftest.$ac_ext <<EOF
1062 #line 1063 "configure"
1063 #include "confdefs.h"
1064 #include <minix/config.h>
1065 EOF
1066 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1067 { (eval echo configure:1068: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1068 ac_err=`grep -v '^ *+' conftest.out`
1069 if test -z "$ac_err"; then
1070 rm -rf conftest*
1071 eval "ac_cv_header_$ac_safe=yes"
1072 else
1073 echo "$ac_err" >&5
1074 echo "configure: failed program was:" >&5
1075 cat conftest.$ac_ext >&5
1076 rm -rf conftest*
1077 eval "ac_cv_header_$ac_safe=no"
1078 fi
1079 rm -f conftest*
1080 fi
1081 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1082 echo "$ac_t""yes" 1>&6
1083 MINIX=yes
1084 else
1085 echo "$ac_t""no" 1>&6
1086 MINIX=
1087 fi
1088
1089 if test "$MINIX" = yes; then
1090 cat >> confdefs.h <<\EOF
1091 #define _POSIX_SOURCE 1
1092 EOF
1093
1094 cat >> confdefs.h <<\EOF
1095 #define _POSIX_1_SOURCE 2
1096 EOF
1097
1098 cat >> confdefs.h <<\EOF
1099 #define _MINIX 1
1100 EOF
1101
1102 fi
1103
1104
1105
1106 echo $ac_n "checking "threads package type"""... $ac_c" 1>&6
1107 echo "configure:1108: checking "threads package type"" >&5
1108 if eval "test \"`echo '$''{'cy_cv_threads_package'+set}'`\" = set"; then
1109 echo $ac_n "(cached) $ac_c" 1>&6
1110 else
1111
1112 if eval "test \"`echo '$''{'cy_cv_threads_cflags'+set}'`\" = set"; then
1113 echo $ac_n "(cached) $ac_c" 1>&6
1114 else
1115
1116 if eval "test \"`echo '$''{'cy_cv_threads_libs'+set}'`\" = set"; then
1117 echo $ac_n "(cached) $ac_c" 1>&6
1118 else
1119
1120 use_threads=no;
1121 # Check whether --with-threads or --without-threads was given.
1122 if test "${with_threads+set}" = set; then
1123 withval="$with_threads"
1124 use_threads=$withval
1125 else
1126 use_threads=no
1127 fi
1128
1129 test -n "$use_threads" || use_threads=qt
1130 threads_package=unknown
1131 if test "$use_threads" != no; then
1132 if test "$use_threads" = yes || test "$use_threads" = qt; then
1133 # Look for qt in source directory. This is a hack: we look in
1134 # "./qt" because this check might be run at the top level.
1135 if test -f $srcdir/../qt/qt.c || test -f $srcdir/qt/qt.c; then
1136 threads_package=COOP
1137 cy_cv_threads_cflags="-I$srcdir/../qt -I../qt"
1138 cy_cv_threads_libs="../threads/libthreads.a ../qt/libqt.a"
1139 fi
1140 else
1141 if test -f $use_threads/qt.c; then
1142 # FIXME seems as though we should try to use an installed qt here.
1143 threads_package=COOP
1144 cy_cv_threads_cflags="-I$use_threads -I../qt"
1145 cy_cv_threads_libs="../threads/libthreads.a ../qt/libqt.a"
1146 fi
1147 fi
1148 if test "$use_threads" = pthreads; then
1149 # Look for pthreads in srcdir. See above to understand why
1150 # we always set threads_package.
1151 if test -f $srcdir/../../pthreads/pthreads/queue.c \
1152 || test -f $srcdir/../pthreads/pthreads/queue.c; then
1153 threads_package=MIT
1154 cy_cv_threads_cflags="-I$srcdir/../../pthreads/include"
1155 cy_cv_threads_libs="-L../../pthreads/lib -lpthread"
1156 fi
1157 fi
1158 saved_CPP="$CPPFLAGS"
1159 saved_LD="$LDFLAGS"
1160 saved_LIBS="$LIBS"
1161 if test "$threads_package" = unknown; then
1162 CPPFLAGS="-I$use_threads/include"
1163 LDFLAGS="-L$use_threads/lib"
1164 LIBS="-lgthreads -lmalloc"
1165 cat > conftest.$ac_ext <<EOF
1166 #line 1167 "configure"
1167 #include "confdefs.h"
1168 #include <pthread.h>
1169 int main() {
1170
1171 pthread_equal(NULL,NULL);
1172
1173 ; return 0; }
1174 EOF
1175 if { (eval echo configure:1176: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1176 rm -rf conftest*
1177 threads_package=FSU
1178 else
1179 echo "configure: failed program was:" >&5
1180 cat conftest.$ac_ext >&5
1181 fi
1182 rm -f conftest*
1183 fi
1184 if test "$threads_package" = unknown; then
1185 LIBS="-lpthread"
1186 cat > conftest.$ac_ext <<EOF
1187 #line 1188 "configure"
1188 #include "confdefs.h"
1189 #include <pthread.h>
1190 int main() {
1191
1192 pthread_equal(NULL,NULL);
1193
1194 ; return 0; }
1195 EOF
1196 if { (eval echo configure:1197: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1197 rm -rf conftest*
1198 threads_package=MIT
1199 else
1200 echo "configure: failed program was:" >&5
1201 cat conftest.$ac_ext >&5
1202 fi
1203 rm -f conftest*
1204 fi
1205 if test "$threads_package" = unknown; then
1206 LIBS="-lpthreads"
1207 cat > conftest.$ac_ext <<EOF
1208 #line 1209 "configure"
1209 #include "confdefs.h"
1210 #include <pthread.h>
1211 int main() {
1212
1213 pthread_equal(NULL,NULL);
1214
1215 ; return 0; }
1216 EOF
1217 if { (eval echo configure:1218: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1218 rm -rf conftest*
1219 threads_package=PCthreads
1220 else
1221 echo "configure: failed program was:" >&5
1222 cat conftest.$ac_ext >&5
1223 fi
1224 rm -f conftest*
1225 fi
1226 cy_cv_threads_cflags="$CPPFLAGS $cy_cv_threads_cflags"
1227 cy_cv_threads_libs="$LDFLAGS $LIBS $cy_cv_threads_libs"
1228 cy_cv_threads_package=$threads_package
1229 CPPFLAGS="$saved_CPP"
1230 LDFLAGS="$saved_LD"
1231 LIBS="$saved_LIBS"
1232 if test "$threads_package" = unknown; then
1233 { echo "configure: error: "cannot find thread library installation"" 1>&2; exit 1; }
1234 fi
1235 fi
1236
1237 fi
1238
1239
1240 fi
1241
1242
1243 fi
1244
1245 echo "$ac_t""$cy_cv_threads_package" 1>&6
1246
1247
1248 echo $ac_n "checking for working const""... $ac_c" 1>&6
1249 echo "configure:1250: checking for working const" >&5
1250 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
1251 echo $ac_n "(cached) $ac_c" 1>&6
1252 else
1253 cat > conftest.$ac_ext <<EOF
1254 #line 1255 "configure"
1255 #include "confdefs.h"
1256
1257 int main() {
1258
1259 /* Ultrix mips cc rejects this. */
1260 typedef int charset[2]; const charset x;
1261 /* SunOS 4.1.1 cc rejects this. */
1262 char const *const *ccp;
1263 char **p;
1264 /* NEC SVR4.0.2 mips cc rejects this. */
1265 struct point {int x, y;};
1266 static struct point const zero = {0,0};
1267 /* AIX XL C 1.02.0.0 rejects this.
1268 It does not let you subtract one const X* pointer from another in an arm
1269 of an if-expression whose if-part is not a constant expression */
1270 const char *g = "string";
1271 ccp = &g + (g ? g-g : 0);
1272 /* HPUX 7.0 cc rejects these. */
1273 ++ccp;
1274 p = (char**) ccp;
1275 ccp = (char const *const *) p;
1276 { /* SCO 3.2v4 cc rejects this. */
1277 char *t;
1278 char const *s = 0 ? (char *) 0 : (char const *) 0;
1279
1280 *t++ = 0;
1281 }
1282 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
1283 int x[] = {25, 17};
1284 const int *foo = &x[0];
1285 ++foo;
1286 }
1287 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
1288 typedef const int *iptr;
1289 iptr p = 0;
1290 ++p;
1291 }
1292 { /* AIX XL C 1.02.0.0 rejects this saying
1293 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
1294 struct s { int j; const int *ap[3]; };
1295 struct s *b; b->j = 5;
1296 }
1297 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
1298 const int foo = 10;
1299 }
1300
1301 ; return 0; }
1302 EOF
1303 if { (eval echo configure:1304: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1304 rm -rf conftest*
1305 ac_cv_c_const=yes
1306 else
1307 echo "configure: failed program was:" >&5
1308 cat conftest.$ac_ext >&5
1309 rm -rf conftest*
1310 ac_cv_c_const=no
1311 fi
1312 rm -f conftest*
1313 fi
1314
1315 echo "$ac_t""$ac_cv_c_const" 1>&6
1316 if test $ac_cv_c_const = no; then
1317 cat >> confdefs.h <<\EOF
1318 #define const
1319 EOF
1320
1321 fi
1322
1323
1324 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
1325 echo "configure:1326: checking for ANSI C header files" >&5
1326 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1327 echo $ac_n "(cached) $ac_c" 1>&6
1328 else
1329 cat > conftest.$ac_ext <<EOF
1330 #line 1331 "configure"
1331 #include "confdefs.h"
1332 #include <stdlib.h>
1333 #include <stdarg.h>
1334 #include <string.h>
1335 #include <float.h>
1336 EOF
1337 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1338 { (eval echo configure:1339: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1339 ac_err=`grep -v '^ *+' conftest.out`
1340 if test -z "$ac_err"; then
1341 rm -rf conftest*
1342 ac_cv_header_stdc=yes
1343 else
1344 echo "$ac_err" >&5
1345 echo "configure: failed program was:" >&5
1346 cat conftest.$ac_ext >&5
1347 rm -rf conftest*
1348 ac_cv_header_stdc=no
1349 fi
1350 rm -f conftest*
1351
1352 if test $ac_cv_header_stdc = yes; then
1353 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1354 cat > conftest.$ac_ext <<EOF
1355 #line 1356 "configure"
1356 #include "confdefs.h"
1357 #include <string.h>
1358 EOF
1359 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1360 egrep "memchr" >/dev/null 2>&1; then
1361 :
1362 else
1363 rm -rf conftest*
1364 ac_cv_header_stdc=no
1365 fi
1366 rm -f conftest*
1367
1368 fi
1369
1370 if test $ac_cv_header_stdc = yes; then
1371 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1372 cat > conftest.$ac_ext <<EOF
1373 #line 1374 "configure"
1374 #include "confdefs.h"
1375 #include <stdlib.h>
1376 EOF
1377 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1378 egrep "free" >/dev/null 2>&1; then
1379 :
1380 else
1381 rm -rf conftest*
1382 ac_cv_header_stdc=no
1383 fi
1384 rm -f conftest*
1385
1386 fi
1387
1388 if test $ac_cv_header_stdc = yes; then
1389 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1390 if test "$cross_compiling" = yes; then
1391 :
1392 else
1393 cat > conftest.$ac_ext <<EOF
1394 #line 1395 "configure"
1395 #include "confdefs.h"
1396 #include <ctype.h>
1397 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1398 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
1399 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
1400 int main () { int i; for (i = 0; i < 256; i++)
1401 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1402 exit (0); }
1403
1404 EOF
1405 if { (eval echo configure:1406: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
1406 then
1407 :
1408 else
1409 echo "configure: failed program was:" >&5
1410 cat conftest.$ac_ext >&5
1411 rm -fr conftest*
1412 ac_cv_header_stdc=no
1413 fi
1414 rm -fr conftest*
1415 fi
1416
1417 fi
1418 fi
1419
1420 echo "$ac_t""$ac_cv_header_stdc" 1>&6
1421 if test $ac_cv_header_stdc = yes; then
1422 cat >> confdefs.h <<\EOF
1423 #define STDC_HEADERS 1
1424 EOF
1425
1426 fi
1427
1428 ac_header_dirent=no
1429 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
1430 do
1431 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1432 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
1433 echo "configure:1434: checking for $ac_hdr that defines DIR" >&5
1434 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
1435 echo $ac_n "(cached) $ac_c" 1>&6
1436 else
1437 cat > conftest.$ac_ext <<EOF
1438 #line 1439 "configure"
1439 #include "confdefs.h"
1440 #include <sys/types.h>
1441 #include <$ac_hdr>
1442 int main() {
1443 DIR *dirp = 0;
1444 ; return 0; }
1445 EOF
1446 if { (eval echo configure:1447: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1447 rm -rf conftest*
1448 eval "ac_cv_header_dirent_$ac_safe=yes"
1449 else
1450 echo "configure: failed program was:" >&5
1451 cat conftest.$ac_ext >&5
1452 rm -rf conftest*
1453 eval "ac_cv_header_dirent_$ac_safe=no"
1454 fi
1455 rm -f conftest*
1456 fi
1457 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
1458 echo "$ac_t""yes" 1>&6
1459 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1460 cat >> confdefs.h <<EOF
1461 #define $ac_tr_hdr 1
1462 EOF
1463 ac_header_dirent=$ac_hdr; break
1464 else
1465 echo "$ac_t""no" 1>&6
1466 fi
1467 done
1468 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
1469 if test $ac_header_dirent = dirent.h; then
1470 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
1471 echo "configure:1472: checking for opendir in -ldir" >&5
1472 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
1473 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1474 echo $ac_n "(cached) $ac_c" 1>&6
1475 else
1476 ac_save_LIBS="$LIBS"
1477 LIBS="-ldir $LIBS"
1478 cat > conftest.$ac_ext <<EOF
1479 #line 1480 "configure"
1480 #include "confdefs.h"
1481 /* Override any gcc2 internal prototype to avoid an error. */
1482 /* We use char because int might match the return type of a gcc2
1483 builtin and then its argument prototype would still apply. */
1484 char opendir();
1485
1486 int main() {
1487 opendir()
1488 ; return 0; }
1489 EOF
1490 if { (eval echo configure:1491: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1491 rm -rf conftest*
1492 eval "ac_cv_lib_$ac_lib_var=yes"
1493 else
1494 echo "configure: failed program was:" >&5
1495 cat conftest.$ac_ext >&5
1496 rm -rf conftest*
1497 eval "ac_cv_lib_$ac_lib_var=no"
1498 fi
1499 rm -f conftest*
1500 LIBS="$ac_save_LIBS"
1501
1502 fi
1503 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1504 echo "$ac_t""yes" 1>&6
1505 LIBS="$LIBS -ldir"
1506 else
1507 echo "$ac_t""no" 1>&6
1508 fi
1509
1510 else
1511 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
1512 echo "configure:1513: checking for opendir in -lx" >&5
1513 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
1514 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1515 echo $ac_n "(cached) $ac_c" 1>&6
1516 else
1517 ac_save_LIBS="$LIBS"
1518 LIBS="-lx $LIBS"
1519 cat > conftest.$ac_ext <<EOF
1520 #line 1521 "configure"
1521 #include "confdefs.h"
1522 /* Override any gcc2 internal prototype to avoid an error. */
1523 /* We use char because int might match the return type of a gcc2
1524 builtin and then its argument prototype would still apply. */
1525 char opendir();
1526
1527 int main() {
1528 opendir()
1529 ; return 0; }
1530 EOF
1531 if { (eval echo configure:1532: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1532 rm -rf conftest*
1533 eval "ac_cv_lib_$ac_lib_var=yes"
1534 else
1535 echo "configure: failed program was:" >&5
1536 cat conftest.$ac_ext >&5
1537 rm -rf conftest*
1538 eval "ac_cv_lib_$ac_lib_var=no"
1539 fi
1540 rm -f conftest*
1541 LIBS="$ac_save_LIBS"
1542
1543 fi
1544 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1545 echo "$ac_t""yes" 1>&6
1546 LIBS="$LIBS -lx"
1547 else
1548 echo "$ac_t""no" 1>&6
1549 fi
1550
1551 fi
1552
1553 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
1554 echo "configure:1555: checking whether time.h and sys/time.h may both be included" >&5
1555 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
1556 echo $ac_n "(cached) $ac_c" 1>&6
1557 else
1558 cat > conftest.$ac_ext <<EOF
1559 #line 1560 "configure"
1560 #include "confdefs.h"
1561 #include <sys/types.h>
1562 #include <sys/time.h>
1563 #include <time.h>
1564 int main() {
1565 struct tm *tp;
1566 ; return 0; }
1567 EOF
1568 if { (eval echo configure:1569: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1569 rm -rf conftest*
1570 ac_cv_header_time=yes
1571 else
1572 echo "configure: failed program was:" >&5
1573 cat conftest.$ac_ext >&5
1574 rm -rf conftest*
1575 ac_cv_header_time=no
1576 fi
1577 rm -f conftest*
1578 fi
1579
1580 echo "$ac_t""$ac_cv_header_time" 1>&6
1581 if test $ac_cv_header_time = yes; then
1582 cat >> confdefs.h <<\EOF
1583 #define TIME_WITH_SYS_TIME 1
1584 EOF
1585
1586 fi
1587
1588 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
1589 echo "configure:1590: checking for sys/wait.h that is POSIX.1 compatible" >&5
1590 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
1591 echo $ac_n "(cached) $ac_c" 1>&6
1592 else
1593 cat > conftest.$ac_ext <<EOF
1594 #line 1595 "configure"
1595 #include "confdefs.h"
1596 #include <sys/types.h>
1597 #include <sys/wait.h>
1598 #ifndef WEXITSTATUS
1599 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
1600 #endif
1601 #ifndef WIFEXITED
1602 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
1603 #endif
1604 int main() {
1605 int s;
1606 wait (&s);
1607 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
1608 ; return 0; }
1609 EOF
1610 if { (eval echo configure:1611: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1611 rm -rf conftest*
1612 ac_cv_header_sys_wait_h=yes
1613 else
1614 echo "configure: failed program was:" >&5
1615 cat conftest.$ac_ext >&5
1616 rm -rf conftest*
1617 ac_cv_header_sys_wait_h=no
1618 fi
1619 rm -f conftest*
1620 fi
1621
1622 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
1623 if test $ac_cv_header_sys_wait_h = yes; then
1624 cat >> confdefs.h <<\EOF
1625 #define HAVE_SYS_WAIT_H 1
1626 EOF
1627
1628 fi
1629
1630 for ac_hdr in libc.h limits.h malloc.h memory.h string.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
1631 do
1632 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1633 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1634 echo "configure:1635: checking for $ac_hdr" >&5
1635 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1636 echo $ac_n "(cached) $ac_c" 1>&6
1637 else
1638 cat > conftest.$ac_ext <<EOF
1639 #line 1640 "configure"
1640 #include "confdefs.h"
1641 #include <$ac_hdr>
1642 EOF
1643 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1644 { (eval echo configure:1645: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1645 ac_err=`grep -v '^ *+' conftest.out`
1646 if test -z "$ac_err"; then
1647 rm -rf conftest*
1648 eval "ac_cv_header_$ac_safe=yes"
1649 else
1650 echo "$ac_err" >&5
1651 echo "configure: failed program was:" >&5
1652 cat conftest.$ac_ext >&5
1653 rm -rf conftest*
1654 eval "ac_cv_header_$ac_safe=no"
1655 fi
1656 rm -f conftest*
1657 fi
1658 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1659 echo "$ac_t""yes" 1>&6
1660 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1661 cat >> confdefs.h <<EOF
1662 #define $ac_tr_hdr 1
1663 EOF
1664
1665 else
1666 echo "$ac_t""no" 1>&6
1667 fi
1668 done
1669
1670
1671 for ac_hdr in libc.h unistd.h
1672 do
1673 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1674 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1675 echo "configure:1676: checking for $ac_hdr" >&5
1676 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1677 echo $ac_n "(cached) $ac_c" 1>&6
1678 else
1679 cat > conftest.$ac_ext <<EOF
1680 #line 1681 "configure"
1681 #include "confdefs.h"
1682 #include <$ac_hdr>
1683 EOF
1684 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1685 { (eval echo configure:1686: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1686 ac_err=`grep -v '^ *+' conftest.out`
1687 if test -z "$ac_err"; then
1688 rm -rf conftest*
1689 eval "ac_cv_header_$ac_safe=yes"
1690 else
1691 echo "$ac_err" >&5
1692 echo "configure: failed program was:" >&5
1693 cat conftest.$ac_ext >&5
1694 rm -rf conftest*
1695 eval "ac_cv_header_$ac_safe=no"
1696 fi
1697 rm -f conftest*
1698 fi
1699 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1700 echo "$ac_t""yes" 1>&6
1701 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1702 cat >> confdefs.h <<EOF
1703 #define $ac_tr_hdr 1
1704 EOF
1705
1706 else
1707 echo "$ac_t""no" 1>&6
1708 fi
1709 done
1710
1711 echo $ac_n "checking "whether libc.h and unistd.h can be included together"""... $ac_c" 1>&6
1712 echo "configure:1713: checking "whether libc.h and unistd.h can be included together"" >&5
1713 if eval "test \"`echo '$''{'guile_cv_header_libc_with_unistd'+set}'`\" = set"; then
1714 echo $ac_n "(cached) $ac_c" 1>&6
1715 else
1716
1717 if test "$ac_cv_header_libc_h" = "no"; then
1718 guile_cv_header_libc_with_unistd="no"
1719 elif test "$ac_cv_header_unistd.h" = "no"; then
1720 guile_cv_header_libc_with_unistd="yes"
1721 else
1722 cat > conftest.$ac_ext <<EOF
1723 #line 1724 "configure"
1724 #include "confdefs.h"
1725
1726 # include <libc.h>
1727 # include <unistd.h>
1728
1729 int main() {
1730
1731 ; return 0; }
1732 EOF
1733 if { (eval echo configure:1734: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1734 rm -rf conftest*
1735 guile_cv_header_libc_with_unistd=yes
1736 else
1737 echo "configure: failed program was:" >&5
1738 cat conftest.$ac_ext >&5
1739 rm -rf conftest*
1740 guile_cv_header_libc_with_unistd=no
1741
1742 fi
1743 rm -f conftest*
1744 fi
1745
1746
1747 fi
1748
1749 echo "$ac_t""$guile_cv_header_libc_with_unistd" 1>&6
1750 if test "$guile_cv_header_libc_with_unistd" = yes; then
1751 cat >> confdefs.h <<\EOF
1752 #define LIBC_H_WITH_UNISTD_H 1
1753 EOF
1754
1755 fi
1756
1757
1758
1759 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
1760 echo "configure:1761: checking for uid_t in sys/types.h" >&5
1761 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
1762 echo $ac_n "(cached) $ac_c" 1>&6
1763 else
1764 cat > conftest.$ac_ext <<EOF
1765 #line 1766 "configure"
1766 #include "confdefs.h"
1767 #include <sys/types.h>
1768 EOF
1769 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1770 egrep "uid_t" >/dev/null 2>&1; then
1771 rm -rf conftest*
1772 ac_cv_type_uid_t=yes
1773 else
1774 rm -rf conftest*
1775 ac_cv_type_uid_t=no
1776 fi
1777 rm -f conftest*
1778
1779 fi
1780
1781 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
1782 if test $ac_cv_type_uid_t = no; then
1783 cat >> confdefs.h <<\EOF
1784 #define uid_t int
1785 EOF
1786
1787 cat >> confdefs.h <<\EOF
1788 #define gid_t int
1789 EOF
1790
1791 fi
1792
1793 echo $ac_n "checking type of array argument to getgroups""... $ac_c" 1>&6
1794 echo "configure:1795: checking type of array argument to getgroups" >&5
1795 if eval "test \"`echo '$''{'ac_cv_type_getgroups'+set}'`\" = set"; then
1796 echo $ac_n "(cached) $ac_c" 1>&6
1797 else
1798 if test "$cross_compiling" = yes; then
1799 ac_cv_type_getgroups=cross
1800 else
1801 cat > conftest.$ac_ext <<EOF
1802 #line 1803 "configure"
1803 #include "confdefs.h"
1804
1805 /* Thanks to Mike Rendell for this test. */
1806 #include <sys/types.h>
1807 #define NGID 256
1808 #undef MAX
1809 #define MAX(x, y) ((x) > (y) ? (x) : (y))
1810 main()
1811 {
1812 gid_t gidset[NGID];
1813 int i, n;
1814 union { gid_t gval; long lval; } val;
1815
1816 val.lval = -1;
1817 for (i = 0; i < NGID; i++)
1818 gidset[i] = val.gval;
1819 n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1,
1820 gidset);
1821 /* Exit non-zero if getgroups seems to require an array of ints. This
1822 happens when gid_t is short but getgroups modifies an array of ints. */
1823 exit ((n > 0 && gidset[n] != val.gval) ? 1 : 0);
1824 }
1825
1826 EOF
1827 if { (eval echo configure:1828: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
1828 then
1829 ac_cv_type_getgroups=gid_t
1830 else
1831 echo "configure: failed program was:" >&5
1832 cat conftest.$ac_ext >&5
1833 rm -fr conftest*
1834 ac_cv_type_getgroups=int
1835 fi
1836 rm -fr conftest*
1837 fi
1838
1839 if test $ac_cv_type_getgroups = cross; then
1840 cat > conftest.$ac_ext <<EOF
1841 #line 1842 "configure"
1842 #include "confdefs.h"
1843 #include <unistd.h>
1844 EOF
1845 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1846 egrep "getgroups.*int.*gid_t" >/dev/null 2>&1; then
1847 rm -rf conftest*
1848 ac_cv_type_getgroups=gid_t
1849 else
1850 rm -rf conftest*
1851 ac_cv_type_getgroups=int
1852 fi
1853 rm -f conftest*
1854
1855 fi
1856 fi
1857
1858 echo "$ac_t""$ac_cv_type_getgroups" 1>&6
1859 cat >> confdefs.h <<EOF
1860 #define GETGROUPS_T $ac_cv_type_getgroups
1861 EOF
1862
1863
1864 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
1865 echo "configure:1866: checking return type of signal handlers" >&5
1866 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
1867 echo $ac_n "(cached) $ac_c" 1>&6
1868 else
1869 cat > conftest.$ac_ext <<EOF
1870 #line 1871 "configure"
1871 #include "confdefs.h"
1872 #include <sys/types.h>
1873 #include <signal.h>
1874 #ifdef signal
1875 #undef signal
1876 #endif
1877 #ifdef __cplusplus
1878 extern "C" void (*signal (int, void (*)(int)))(int);
1879 #else
1880 void (*signal ()) ();
1881 #endif
1882
1883 int main() {
1884 int i;
1885 ; return 0; }
1886 EOF
1887 if { (eval echo configure:1888: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1888 rm -rf conftest*
1889 ac_cv_type_signal=void
1890 else
1891 echo "configure: failed program was:" >&5
1892 cat conftest.$ac_ext >&5
1893 rm -rf conftest*
1894 ac_cv_type_signal=int
1895 fi
1896 rm -f conftest*
1897 fi
1898
1899 echo "$ac_t""$ac_cv_type_signal" 1>&6
1900 cat >> confdefs.h <<EOF
1901 #define RETSIGTYPE $ac_cv_type_signal
1902 EOF
1903
1904
1905 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
1906 echo "configure:1907: checking for mode_t" >&5
1907 if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
1908 echo $ac_n "(cached) $ac_c" 1>&6
1909 else
1910 cat > conftest.$ac_ext <<EOF
1911 #line 1912 "configure"
1912 #include "confdefs.h"
1913 #include <sys/types.h>
1914 #if STDC_HEADERS
1915 #include <stdlib.h>
1916 #include <stddef.h>
1917 #endif
1918 EOF
1919 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1920 egrep "mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
1921 rm -rf conftest*
1922 ac_cv_type_mode_t=yes
1923 else
1924 rm -rf conftest*
1925 ac_cv_type_mode_t=no
1926 fi
1927 rm -f conftest*
1928
1929 fi
1930 echo "$ac_t""$ac_cv_type_mode_t" 1>&6
1931 if test $ac_cv_type_mode_t = no; then
1932 cat >> confdefs.h <<\EOF
1933 #define mode_t int
1934 EOF
1935
1936 fi
1937
1938
1939 for ac_func in ctermid ftime getcwd geteuid lstat mkdir mknod nice putenv readlink rename rmdir select setegid seteuid setlocale setpgid setsid strftime strptime symlink sync tcgetpgrp tcsetpgrp times uname waitpid
1940 do
1941 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1942 echo "configure:1943: checking for $ac_func" >&5
1943 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1944 echo $ac_n "(cached) $ac_c" 1>&6
1945 else
1946 cat > conftest.$ac_ext <<EOF
1947 #line 1948 "configure"
1948 #include "confdefs.h"
1949 /* System header to define __stub macros and hopefully few prototypes,
1950 which can conflict with char $ac_func(); below. */
1951 #include <assert.h>
1952 /* Override any gcc2 internal prototype to avoid an error. */
1953 /* We use char because int might match the return type of a gcc2
1954 builtin and then its argument prototype would still apply. */
1955 char $ac_func();
1956
1957 int main() {
1958
1959 /* The GNU C library defines this for functions which it implements
1960 to always fail with ENOSYS. Some functions are actually named
1961 something starting with __ and the normal name is an alias. */
1962 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1963 choke me
1964 #else
1965 $ac_func();
1966 #endif
1967
1968 ; return 0; }
1969 EOF
1970 if { (eval echo configure:1971: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1971 rm -rf conftest*
1972 eval "ac_cv_func_$ac_func=yes"
1973 else
1974 echo "configure: failed program was:" >&5
1975 cat conftest.$ac_ext >&5
1976 rm -rf conftest*
1977 eval "ac_cv_func_$ac_func=no"
1978 fi
1979 rm -f conftest*
1980 fi
1981
1982 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1983 echo "$ac_t""yes" 1>&6
1984 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1985 cat >> confdefs.h <<EOF
1986 #define $ac_tr_func 1
1987 EOF
1988
1989 else
1990 echo "$ac_t""no" 1>&6
1991 fi
1992 done
1993
1994
1995 for ac_func in inet_aton strerror
1996 do
1997 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1998 echo "configure:1999: checking for $ac_func" >&5
1999 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2000 echo $ac_n "(cached) $ac_c" 1>&6
2001 else
2002 cat > conftest.$ac_ext <<EOF
2003 #line 2004 "configure"
2004 #include "confdefs.h"
2005 /* System header to define __stub macros and hopefully few prototypes,
2006 which can conflict with char $ac_func(); below. */
2007 #include <assert.h>
2008 /* Override any gcc2 internal prototype to avoid an error. */
2009 /* We use char because int might match the return type of a gcc2
2010 builtin and then its argument prototype would still apply. */
2011 char $ac_func();
2012
2013 int main() {
2014
2015 /* The GNU C library defines this for functions which it implements
2016 to always fail with ENOSYS. Some functions are actually named
2017 something starting with __ and the normal name is an alias. */
2018 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2019 choke me
2020 #else
2021 $ac_func();
2022 #endif
2023
2024 ; return 0; }
2025 EOF
2026 if { (eval echo configure:2027: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2027 rm -rf conftest*
2028 eval "ac_cv_func_$ac_func=yes"
2029 else
2030 echo "configure: failed program was:" >&5
2031 cat conftest.$ac_ext >&5
2032 rm -rf conftest*
2033 eval "ac_cv_func_$ac_func=no"
2034 fi
2035 rm -f conftest*
2036 fi
2037
2038 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2039 echo "$ac_t""yes" 1>&6
2040 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2041 cat >> confdefs.h <<EOF
2042 #define $ac_tr_func 1
2043 EOF
2044
2045 else
2046 echo "$ac_t""no" 1>&6
2047 LIBOBJS="$LIBOBJS ${ac_func}.o"
2048 fi
2049 done
2050
2051
2052
2053 echo $ac_n "checking for st_rdev in struct stat""... $ac_c" 1>&6
2054 echo "configure:2055: checking for st_rdev in struct stat" >&5
2055 if eval "test \"`echo '$''{'ac_cv_struct_st_rdev'+set}'`\" = set"; then
2056 echo $ac_n "(cached) $ac_c" 1>&6
2057 else
2058 cat > conftest.$ac_ext <<EOF
2059 #line 2060 "configure"
2060 #include "confdefs.h"
2061 #include <sys/types.h>
2062 #include <sys/stat.h>
2063 int main() {
2064 struct stat s; s.st_rdev;
2065 ; return 0; }
2066 EOF
2067 if { (eval echo configure:2068: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2068 rm -rf conftest*
2069 ac_cv_struct_st_rdev=yes
2070 else
2071 echo "configure: failed program was:" >&5
2072 cat conftest.$ac_ext >&5
2073 rm -rf conftest*
2074 ac_cv_struct_st_rdev=no
2075 fi
2076 rm -f conftest*
2077 fi
2078
2079 echo "$ac_t""$ac_cv_struct_st_rdev" 1>&6
2080 if test $ac_cv_struct_st_rdev = yes; then
2081 cat >> confdefs.h <<\EOF
2082 #define HAVE_ST_RDEV 1
2083 EOF
2084
2085 fi
2086
2087 echo $ac_n "checking for st_blksize in struct stat""... $ac_c" 1>&6
2088 echo "configure:2089: checking for st_blksize in struct stat" >&5
2089 if eval "test \"`echo '$''{'ac_cv_struct_st_blksize'+set}'`\" = set"; then
2090 echo $ac_n "(cached) $ac_c" 1>&6
2091 else
2092 cat > conftest.$ac_ext <<EOF
2093 #line 2094 "configure"
2094 #include "confdefs.h"
2095 #include <sys/types.h>
2096 #include <sys/stat.h>
2097 int main() {
2098 struct stat s; s.st_blksize;
2099 ; return 0; }
2100 EOF
2101 if { (eval echo configure:2102: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2102 rm -rf conftest*
2103 ac_cv_struct_st_blksize=yes
2104 else
2105 echo "configure: failed program was:" >&5
2106 cat conftest.$ac_ext >&5
2107 rm -rf conftest*
2108 ac_cv_struct_st_blksize=no
2109 fi
2110 rm -f conftest*
2111 fi
2112
2113 echo "$ac_t""$ac_cv_struct_st_blksize" 1>&6
2114 if test $ac_cv_struct_st_blksize = yes; then
2115 cat >> confdefs.h <<\EOF
2116 #define HAVE_ST_BLKSIZE 1
2117 EOF
2118
2119 fi
2120
2121 echo $ac_n "checking for st_blocks in struct stat""... $ac_c" 1>&6
2122 echo "configure:2123: checking for st_blocks in struct stat" >&5
2123 if eval "test \"`echo '$''{'ac_cv_struct_st_blocks'+set}'`\" = set"; then
2124 echo $ac_n "(cached) $ac_c" 1>&6
2125 else
2126 cat > conftest.$ac_ext <<EOF
2127 #line 2128 "configure"
2128 #include "confdefs.h"
2129 #include <sys/types.h>
2130 #include <sys/stat.h>
2131 int main() {
2132 struct stat s; s.st_blocks;
2133 ; return 0; }
2134 EOF
2135 if { (eval echo configure:2136: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2136 rm -rf conftest*
2137 ac_cv_struct_st_blocks=yes
2138 else
2139 echo "configure: failed program was:" >&5
2140 cat conftest.$ac_ext >&5
2141 rm -rf conftest*
2142 ac_cv_struct_st_blocks=no
2143 fi
2144 rm -f conftest*
2145 fi
2146
2147 echo "$ac_t""$ac_cv_struct_st_blocks" 1>&6
2148 if test $ac_cv_struct_st_blocks = yes; then
2149 cat >> confdefs.h <<\EOF
2150 #define HAVE_ST_BLOCKS 1
2151 EOF
2152
2153 else
2154 LIBOBJS="$LIBOBJS fileblocks.o"
2155 fi
2156
2157
2158 echo $ac_n "checking whether we need POSIX to get struct utimbuf""... $ac_c" 1>&6
2159 echo "configure:2160: checking whether we need POSIX to get struct utimbuf" >&5
2160 if eval "test \"`echo '$''{'guile_cv_struct_utimbuf_needs_posix'+set}'`\" = set"; then
2161 echo $ac_n "(cached) $ac_c" 1>&6
2162 else
2163 cat > conftest.$ac_ext <<EOF
2164 #line 2165 "configure"
2165 #include "confdefs.h"
2166
2167 #ifdef __EMX__
2168 #include <sys/utime.h>
2169 #else
2170 #include <utime.h>
2171 #endif
2172 struct utime blah;
2173
2174 EOF
2175 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2176 { (eval echo configure:2177: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2177 ac_err=`grep -v '^ *+' conftest.out`
2178 if test -z "$ac_err"; then
2179 rm -rf conftest*
2180 guile_cv_struct_utimbuf_needs_posix=no
2181 else
2182 echo "$ac_err" >&5
2183 echo "configure: failed program was:" >&5
2184 cat conftest.$ac_ext >&5
2185 rm -rf conftest*
2186 guile_cv_struct_utimbuf_needs_posix=yes
2187 fi
2188 rm -f conftest*
2189 fi
2190
2191 echo "$ac_t""$guile_cv_struct_utimbuf_needs_posix" 1>&6
2192 if test "$guile_cv_struct_utimbuf_needs_posix" = yes; then
2193 cat >> confdefs.h <<\EOF
2194 #define UTIMBUF_NEEDS_POSIX 1
2195 EOF
2196
2197 fi
2198
2199 # Checks for dynamic linking
2200 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
2201 echo "configure:2202: checking for dlopen in -ldl" >&5
2202 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
2203 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2204 echo $ac_n "(cached) $ac_c" 1>&6
2205 else
2206 ac_save_LIBS="$LIBS"
2207 LIBS="-ldl $LIBS"
2208 cat > conftest.$ac_ext <<EOF
2209 #line 2210 "configure"
2210 #include "confdefs.h"
2211 /* Override any gcc2 internal prototype to avoid an error. */
2212 /* We use char because int might match the return type of a gcc2
2213 builtin and then its argument prototype would still apply. */
2214 char dlopen();
2215
2216 int main() {
2217 dlopen()
2218 ; return 0; }
2219 EOF
2220 if { (eval echo configure:2221: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2221 rm -rf conftest*
2222 eval "ac_cv_lib_$ac_lib_var=yes"
2223 else
2224 echo "configure: failed program was:" >&5
2225 cat conftest.$ac_ext >&5
2226 rm -rf conftest*
2227 eval "ac_cv_lib_$ac_lib_var=no"
2228 fi
2229 rm -f conftest*
2230 LIBS="$ac_save_LIBS"
2231
2232 fi
2233 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2234 echo "$ac_t""yes" 1>&6
2235 ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2236 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2237 cat >> confdefs.h <<EOF
2238 #define $ac_tr_lib 1
2239 EOF
2240
2241 LIBS="-ldl $LIBS"
2242
2243 else
2244 echo "$ac_t""no" 1>&6
2245 fi
2246
2247 echo $ac_n "checking for dld_link in -ldld""... $ac_c" 1>&6
2248 echo "configure:2249: checking for dld_link in -ldld" >&5
2249 ac_lib_var=`echo dld'_'dld_link | sed 'y%./+-%__p_%'`
2250 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2251 echo $ac_n "(cached) $ac_c" 1>&6
2252 else
2253 ac_save_LIBS="$LIBS"
2254 LIBS="-ldld $LIBS"
2255 cat > conftest.$ac_ext <<EOF
2256 #line 2257 "configure"
2257 #include "confdefs.h"
2258 /* Override any gcc2 internal prototype to avoid an error. */
2259 /* We use char because int might match the return type of a gcc2
2260 builtin and then its argument prototype would still apply. */
2261 char dld_link();
2262
2263 int main() {
2264 dld_link()
2265 ; return 0; }
2266 EOF
2267 if { (eval echo configure:2268: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2268 rm -rf conftest*
2269 eval "ac_cv_lib_$ac_lib_var=yes"
2270 else
2271 echo "configure: failed program was:" >&5
2272 cat conftest.$ac_ext >&5
2273 rm -rf conftest*
2274 eval "ac_cv_lib_$ac_lib_var=no"
2275 fi
2276 rm -f conftest*
2277 LIBS="$ac_save_LIBS"
2278
2279 fi
2280 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2281 echo "$ac_t""yes" 1>&6
2282 ac_tr_lib=HAVE_LIB`echo dld | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2283 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2284 cat >> confdefs.h <<EOF
2285 #define $ac_tr_lib 1
2286 EOF
2287
2288 LIBS="-ldld $LIBS"
2289
2290 else
2291 echo "$ac_t""no" 1>&6
2292 fi
2293
2294 for ac_func in shl_load
2295 do
2296 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2297 echo "configure:2298: checking for $ac_func" >&5
2298 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2299 echo $ac_n "(cached) $ac_c" 1>&6
2300 else
2301 cat > conftest.$ac_ext <<EOF
2302 #line 2303 "configure"
2303 #include "confdefs.h"
2304 /* System header to define __stub macros and hopefully few prototypes,
2305 which can conflict with char $ac_func(); below. */
2306 #include <assert.h>
2307 /* Override any gcc2 internal prototype to avoid an error. */
2308 /* We use char because int might match the return type of a gcc2
2309 builtin and then its argument prototype would still apply. */
2310 char $ac_func();
2311
2312 int main() {
2313
2314 /* The GNU C library defines this for functions which it implements
2315 to always fail with ENOSYS. Some functions are actually named
2316 something starting with __ and the normal name is an alias. */
2317 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2318 choke me
2319 #else
2320 $ac_func();
2321 #endif
2322
2323 ; return 0; }
2324 EOF
2325 if { (eval echo configure:2326: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2326 rm -rf conftest*
2327 eval "ac_cv_func_$ac_func=yes"
2328 else
2329 echo "configure: failed program was:" >&5
2330 cat conftest.$ac_ext >&5
2331 rm -rf conftest*
2332 eval "ac_cv_func_$ac_func=no"
2333 fi
2334 rm -f conftest*
2335 fi
2336
2337 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2338 echo "$ac_t""yes" 1>&6
2339 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2340 cat >> confdefs.h <<EOF
2341 #define $ac_tr_func 1
2342 EOF
2343
2344 else
2345 echo "$ac_t""no" 1>&6
2346 fi
2347 done
2348
2349
2350 #--------------------------------------------------------------------
2351 #
2352 # Which way does the stack grow?
2353 #
2354 #--------------------------------------------------------------------
2355
2356 if test "$cross_compiling" = yes; then
2357 echo "configure: warning: Guessing that stack grows down -- see scmconfig.h.in" 1>&2
2358 else
2359 cat > conftest.$ac_ext <<EOF
2360 #line 2361 "configure"
2361 #include "confdefs.h"
2362 aux (l) unsigned long l;
2363 { int x; exit (l >= ((unsigned long)&x)); }
2364 main () { int q; aux((unsigned long)&q); }
2365 EOF
2366 if { (eval echo configure:2367: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
2367 then
2368 cat >> confdefs.h <<\EOF
2369 #define SCM_STACK_GROWS_UP 1
2370 EOF
2371
2372 else
2373 echo "configure: failed program was:" >&5
2374 cat conftest.$ac_ext >&5
2375 fi
2376 rm -fr conftest*
2377 fi
2378
2379
2380
2381 if test "$cross_compiling" = yes; then
2382 cat >> confdefs.h <<\EOF
2383 #define SCM_SINGLES 1
2384 EOF
2385
2386 echo "configure: warning: Guessing that sizeof(long) == sizeof(float) -- see scmconfig.h.in" 1>&2
2387 else
2388 cat > conftest.$ac_ext <<EOF
2389 #line 2390 "configure"
2390 #include "confdefs.h"
2391 main () { exit (sizeof(float) != sizeof(long)); }
2392 EOF
2393 if { (eval echo configure:2394: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
2394 then
2395 cat >> confdefs.h <<\EOF
2396 #define SCM_SINGLES 1
2397 EOF
2398
2399 else
2400 echo "configure: failed program was:" >&5
2401 cat conftest.$ac_ext >&5
2402 fi
2403 rm -fr conftest*
2404 fi
2405
2406
2407 echo $ac_n "checking for struct linger""... $ac_c" 1>&6
2408 echo "configure:2409: checking for struct linger" >&5
2409 if eval "test \"`echo '$''{'scm_cv_struct_linger'+set}'`\" = set"; then
2410 echo $ac_n "(cached) $ac_c" 1>&6
2411 else
2412 cat > conftest.$ac_ext <<EOF
2413 #line 2414 "configure"
2414 #include "confdefs.h"
2415 #include <sys/socket.h>
2416 int main() {
2417 struct linger lgr; lgr.l_linger = 100
2418 ; return 0; }
2419 EOF
2420 if { (eval echo configure:2421: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2421 rm -rf conftest*
2422 scm_cv_struct_linger="yes"
2423 else
2424 echo "configure: failed program was:" >&5
2425 cat conftest.$ac_ext >&5
2426 rm -rf conftest*
2427 scm_cv_struct_linger="no"
2428 fi
2429 rm -f conftest*
2430 fi
2431
2432 echo "$ac_t""$scm_cv_struct_linger" 1>&6
2433 if test $scm_cv_struct_linger = yes; then
2434 cat >> confdefs.h <<\EOF
2435 #define HAVE_STRUCT_LINGER 1
2436 EOF
2437
2438 fi
2439
2440 #--------------------------------------------------------------------
2441 #
2442 # How can you violate a stdio abstraction by setting a stream's fd?
2443 #
2444 #--------------------------------------------------------------------
2445
2446 FD_SETTER=""
2447
2448 if test "x$FD_SETTER" = x; then
2449 cat > conftest.$ac_ext <<EOF
2450 #line 2451 "configure"
2451 #include "confdefs.h"
2452 #include <stdio.h>
2453
2454 int main() {
2455 stdout->_file = 1
2456 ; return 0; }
2457 EOF
2458 if { (eval echo configure:2459: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2459 rm -rf conftest*
2460 FD_SETTER="((F)->_file = (D))"
2461 else
2462 echo "configure: failed program was:" >&5
2463 cat conftest.$ac_ext >&5
2464 fi
2465 rm -f conftest*
2466 fi
2467
2468 if test "x$FD_SETTER" = x; then
2469 cat > conftest.$ac_ext <<EOF
2470 #line 2471 "configure"
2471 #include "confdefs.h"
2472 #include <stdio.h>
2473
2474 int main() {
2475 stdout->_fileno
2476 ; return 0; }
2477 EOF
2478 if { (eval echo configure:2479: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2479 rm -rf conftest*
2480 FD_SETTER="((F)->_fileno = (D))"
2481 else
2482 echo "configure: failed program was:" >&5
2483 cat conftest.$ac_ext >&5
2484 fi
2485 rm -f conftest*
2486 fi
2487
2488
2489 test "x$FD_SETTER" != x && cat >> confdefs.h <<\EOF
2490 #define HAVE_FD_SETTER 1
2491 EOF
2492
2493
2494 #--------------------------------------------------------------------
2495 # How to find out whether a FILE structure contains buffered data.
2496 # From Tk we have the following list:
2497 # _cnt: Most UNIX systems
2498 # __cnt: HPUX
2499 # _r: BSD
2500 # readCount: Sprite
2501 # Or, in GNU libc there are two fields, _gptr and _egptr, which
2502 # have to be compared.
2503 # These can also be known as _IO_read_ptr and _IO_read_end.
2504 #--------------------------------------------------------------------
2505
2506 echo $ac_n "checking how to get buffer char count from FILE structure""... $ac_c" 1>&6
2507 echo "configure:2508: checking how to get buffer char count from FILE structure" >&5
2508 if eval "test \"`echo '$''{'scm_cv_struct_file_count'+set}'`\" = set"; then
2509 echo $ac_n "(cached) $ac_c" 1>&6
2510 else
2511 cat > conftest.$ac_ext <<EOF
2512 #line 2513 "configure"
2513 #include "confdefs.h"
2514 #include <stdio.h>
2515 int main() {
2516 FILE *f = stdin; f->_cnt = 0
2517 ; return 0; }
2518 EOF
2519 if { (eval echo configure:2520: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2520 rm -rf conftest*
2521 scm_cv_struct_file_count="_cnt"
2522 else
2523 echo "configure: failed program was:" >&5
2524 cat conftest.$ac_ext >&5
2525 rm -rf conftest*
2526 cat > conftest.$ac_ext <<EOF
2527 #line 2528 "configure"
2528 #include "confdefs.h"
2529 #include <stdio.h>
2530 int main() {
2531 FILE *f = stdin; f->_r = 0
2532 ; return 0; }
2533 EOF
2534 if { (eval echo configure:2535: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2535 rm -rf conftest*
2536 scm_cv_struct_file_count="_r"
2537 else
2538 echo "configure: failed program was:" >&5
2539 cat conftest.$ac_ext >&5
2540 rm -rf conftest*
2541 cat > conftest.$ac_ext <<EOF
2542 #line 2543 "configure"
2543 #include "confdefs.h"
2544 #include <stdio.h>
2545 int main() {
2546 FILE *f = stdin; f->readCount = 0
2547 ; return 0; }
2548 EOF
2549 if { (eval echo configure:2550: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2550 rm -rf conftest*
2551 scm_cv_struct_file_count="readCount"
2552 else
2553 echo "configure: failed program was:" >&5
2554 cat conftest.$ac_ext >&5
2555 rm -rf conftest*
2556 scm_cv_struct_file_count=""
2557 fi
2558 rm -f conftest*
2559 fi
2560 rm -f conftest*
2561 fi
2562 rm -f conftest*
2563 fi
2564
2565 if test "$scm_cv_struct_file_count"; then
2566 echo "$ac_t""$scm_cv_struct_file_count" 1>&6
2567 cat >> confdefs.h <<EOF
2568 #define FILE_CNT_FIELD $scm_cv_struct_file_count
2569 EOF
2570
2571 else
2572 if eval "test \"`echo '$''{'scm_cv_struct_file_gptr'+set}'`\" = set"; then
2573 echo $ac_n "(cached) $ac_c" 1>&6
2574 else
2575 cat > conftest.$ac_ext <<EOF
2576 #line 2577 "configure"
2577 #include "confdefs.h"
2578 #include <stdio.h>
2579 int main() {
2580 FILE *f = stdin; f->_gptr = f->egptr;
2581 ; return 0; }
2582 EOF
2583 if { (eval echo configure:2584: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2584 rm -rf conftest*
2585 scm_cv_struct_file_gptr=1
2586 else
2587 echo "configure: failed program was:" >&5
2588 cat conftest.$ac_ext >&5
2589 rm -rf conftest*
2590 scm_cv_struct_file_gptr=""
2591 fi
2592 rm -f conftest*
2593 fi
2594
2595 if test "$scm_cv_struct_gptr"; then
2596 echo "$ac_t""gptr" 1>&6
2597 cat >> confdefs.h <<EOF
2598 #define FILE_CNT_GPTR $scm_cv_struct_file_gptr
2599 EOF
2600
2601 else
2602 if eval "test \"`echo '$''{'scm_cv_struct_file_readptr'+set}'`\" = set"; then
2603 echo $ac_n "(cached) $ac_c" 1>&6
2604 else
2605 cat > conftest.$ac_ext <<EOF
2606 #line 2607 "configure"
2607 #include "confdefs.h"
2608 #include <stdio.h>
2609 int main() {
2610 FILE *f = stdin; f->_IO_read_ptr = f->_IO_read_end;
2611 ; return 0; }
2612 EOF
2613 if { (eval echo configure:2614: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2614 rm -rf conftest*
2615 scm_cv_struct_file_readptr=1
2616 else
2617 echo "configure: failed program was:" >&5
2618 cat conftest.$ac_ext >&5
2619 fi
2620 rm -f conftest*
2621 fi
2622
2623 if test "$scm_cv_struct_file_readptr"; then
2624 echo "$ac_t""read_ptr" 1>&6
2625 cat >> confdefs.h <<EOF
2626 #define FILE_CNT_READPTR $scm_cv_struct_file_readptr
2627 EOF
2628
2629 fi
2630 fi
2631 fi
2632
2633 #--------------------------------------------------------------------
2634 #
2635 # Flags for thread support
2636 #
2637 #--------------------------------------------------------------------
2638
2639 if test "$cy_cv_threads_package" = FSU; then
2640 cat >> confdefs.h <<\EOF
2641 #define USE_FSU_PTHREADS 1
2642 EOF
2643
2644 else if test "$cy_cv_threads_package" = COOP; then
2645 cat >> confdefs.h <<\EOF
2646 #define USE_COOP_THREADS 1
2647 EOF
2648
2649 else if test "$cy_cv_threads_package" = MIT; then
2650 cat >> confdefs.h <<\EOF
2651 #define USE_MIT_PTHREADS 1
2652 EOF
2653
2654 else if test "$cy_cv_threads_package" = PCthreads; then
2655 cat >> confdefs.h <<\EOF
2656 #define USE_PCTHREADS_PTHREADS 1
2657 EOF
2658
2659 else if test "$cy_cv_threads_package" = unknown; then
2660 { echo "configure: error: "cannot find threads installation"" 1>&2; exit 1; }
2661 fi
2662 fi
2663 fi
2664 fi
2665 fi
2666
2667 if test "$cy_cv_threads_package" != ""; then
2668 cat >> confdefs.h <<\EOF
2669 #define USE_THREADS 1
2670 EOF
2671
2672 fi
2673
2674 ## If we're using GCC, ask for aggressive warnings.
2675 case "$GCC" in
2676 yes ) CFLAGS="$CFLAGS -Wall -Wpointer-arith" ;;
2677 esac
2678
2679 cat >> confdefs.h <<EOF
2680 #define GUILE_MAJOR_VERSION "$GUILE_MAJOR_VERSION"
2681 EOF
2682
2683 cat >> confdefs.h <<EOF
2684 #define GUILE_MINOR_VERSION "$GUILE_MINOR_VERSION"
2685 EOF
2686
2687 cat >> confdefs.h <<EOF
2688 #define GUILE_VERSION "$GUILE_VERSION"
2689 EOF
2690
2691
2692
2693 trap '' 1 2 15
2694 cat > confcache <<\EOF
2695 # This file is a shell script that caches the results of configure
2696 # tests run on this system so they can be shared between configure
2697 # scripts and configure runs. It is not useful on other systems.
2698 # If it contains results you don't want to keep, you may remove or edit it.
2699 #
2700 # By default, configure uses ./config.cache as the cache file,
2701 # creating it if it does not exist already. You can give configure
2702 # the --cache-file=FILE option to use a different cache file; that is
2703 # what configure does when it calls configure scripts in
2704 # subdirectories, so they share the cache.
2705 # Giving --cache-file=/dev/null disables caching, for debugging configure.
2706 # config.status only pays attention to the cache file if you give it the
2707 # --recheck option to rerun configure.
2708 #
2709 EOF
2710 # The following way of writing the cache mishandles newlines in values,
2711 # but we know of no workaround that is simple, portable, and efficient.
2712 # So, don't put newlines in cache variables' values.
2713 # Ultrix sh set writes to stderr and can't be redirected directly,
2714 # and sets the high bit in the cache file unless we assign to the vars.
2715 (set) 2>&1 |
2716 case `(ac_space=' '; set) 2>&1` in
2717 *ac_space=\ *)
2718 # `set' does not quote correctly, so add quotes (double-quote substitution
2719 # turns \\\\ into \\, and sed turns \\ into \).
2720 sed -n \
2721 -e "s/'/'\\\\''/g" \
2722 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
2723 ;;
2724 *)
2725 # `set' quotes correctly as required by POSIX, so do not add quotes.
2726 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
2727 ;;
2728 esac >> confcache
2729 if cmp -s $cache_file confcache; then
2730 :
2731 else
2732 if test -w $cache_file; then
2733 echo "updating cache $cache_file"
2734 cat confcache > $cache_file
2735 else
2736 echo "not updating unwritable cache $cache_file"
2737 fi
2738 fi
2739 rm -f confcache
2740
2741 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
2742
2743 test "x$prefix" = xNONE && prefix=$ac_default_prefix
2744 # Let make expand exec_prefix.
2745 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
2746
2747 # Any assignment to VPATH causes Sun make to only execute
2748 # the first set of double-colon rules, so remove it if not needed.
2749 # If there is a colon in the path, we need to keep it.
2750 if test "x$srcdir" = x.; then
2751 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
2752 fi
2753
2754 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
2755
2756 DEFS=-DHAVE_CONFIG_H
2757
2758 # Without the "./", some shells look in PATH for config.status.
2759 : ${CONFIG_STATUS=./config.status}
2760
2761 echo creating $CONFIG_STATUS
2762 rm -f $CONFIG_STATUS
2763 cat > $CONFIG_STATUS <<EOF
2764 #! /bin/sh
2765 # Generated automatically by configure.
2766 # Run this file to recreate the current configuration.
2767 # This directory was configured as follows,
2768 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
2769 #
2770 # $0 $ac_configure_args
2771 #
2772 # Compiler output produced by configure, useful for debugging
2773 # configure, is in ./config.log if it exists.
2774
2775 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
2776 for ac_option
2777 do
2778 case "\$ac_option" in
2779 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
2780 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
2781 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
2782 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
2783 echo "$CONFIG_STATUS generated by autoconf version 2.12"
2784 exit 0 ;;
2785 -help | --help | --hel | --he | --h)
2786 echo "\$ac_cs_usage"; exit 0 ;;
2787 *) echo "\$ac_cs_usage"; exit 1 ;;
2788 esac
2789 done
2790
2791 ac_given_srcdir=$srcdir
2792 ac_given_INSTALL="$INSTALL"
2793
2794 trap 'rm -fr `echo "Makefile fd.h scmconfig.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
2795 EOF
2796 cat >> $CONFIG_STATUS <<EOF
2797
2798 # Protect against being on the right side of a sed subst in config.status.
2799 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
2800 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
2801 $ac_vpsub
2802 $extrasub
2803 s%@CFLAGS@%$CFLAGS%g
2804 s%@CPPFLAGS@%$CPPFLAGS%g
2805 s%@CXXFLAGS@%$CXXFLAGS%g
2806 s%@DEFS@%$DEFS%g
2807 s%@LDFLAGS@%$LDFLAGS%g
2808 s%@LIBS@%$LIBS%g
2809 s%@exec_prefix@%$exec_prefix%g
2810 s%@prefix@%$prefix%g
2811 s%@program_transform_name@%$program_transform_name%g
2812 s%@bindir@%$bindir%g
2813 s%@sbindir@%$sbindir%g
2814 s%@libexecdir@%$libexecdir%g
2815 s%@datadir@%$datadir%g
2816 s%@sysconfdir@%$sysconfdir%g
2817 s%@sharedstatedir@%$sharedstatedir%g
2818 s%@localstatedir@%$localstatedir%g
2819 s%@libdir@%$libdir%g
2820 s%@includedir@%$includedir%g
2821 s%@oldincludedir@%$oldincludedir%g
2822 s%@infodir@%$infodir%g
2823 s%@mandir@%$mandir%g
2824 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
2825 s%@INSTALL_DATA@%$INSTALL_DATA%g
2826 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
2827 s%@PACKAGE@%$PACKAGE%g
2828 s%@VERSION@%$VERSION%g
2829 s%@SET_MAKE@%$SET_MAKE%g
2830 s%@module@%$module%g
2831 s%@CC@%$CC%g
2832 s%@CPP@%$CPP%g
2833 s%@RANLIB@%$RANLIB%g
2834 s%@LIBOBJS@%$LIBOBJS%g
2835 s%@FD_SETTER@%$FD_SETTER%g
2836
2837 CEOF
2838 EOF
2839
2840 cat >> $CONFIG_STATUS <<\EOF
2841
2842 # Split the substitutions into bite-sized pieces for seds with
2843 # small command number limits, like on Digital OSF/1 and HP-UX.
2844 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
2845 ac_file=1 # Number of current file.
2846 ac_beg=1 # First line for current file.
2847 ac_end=$ac_max_sed_cmds # Line after last line for current file.
2848 ac_more_lines=:
2849 ac_sed_cmds=""
2850 while $ac_more_lines; do
2851 if test $ac_beg -gt 1; then
2852 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
2853 else
2854 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
2855 fi
2856 if test ! -s conftest.s$ac_file; then
2857 ac_more_lines=false
2858 rm -f conftest.s$ac_file
2859 else
2860 if test -z "$ac_sed_cmds"; then
2861 ac_sed_cmds="sed -f conftest.s$ac_file"
2862 else
2863 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
2864 fi
2865 ac_file=`expr $ac_file + 1`
2866 ac_beg=$ac_end
2867 ac_end=`expr $ac_end + $ac_max_sed_cmds`
2868 fi
2869 done
2870 if test -z "$ac_sed_cmds"; then
2871 ac_sed_cmds=cat
2872 fi
2873 EOF
2874
2875 cat >> $CONFIG_STATUS <<EOF
2876
2877 CONFIG_FILES=\${CONFIG_FILES-"Makefile fd.h"}
2878 EOF
2879 cat >> $CONFIG_STATUS <<\EOF
2880 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
2881 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
2882 case "$ac_file" in
2883 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
2884 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
2885 *) ac_file_in="${ac_file}.in" ;;
2886 esac
2887
2888 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
2889
2890 # Remove last slash and all that follows it. Not all systems have dirname.
2891 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
2892 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
2893 # The file is in a subdirectory.
2894 test ! -d "$ac_dir" && mkdir "$ac_dir"
2895 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
2896 # A "../" for each directory in $ac_dir_suffix.
2897 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
2898 else
2899 ac_dir_suffix= ac_dots=
2900 fi
2901
2902 case "$ac_given_srcdir" in
2903 .) srcdir=.
2904 if test -z "$ac_dots"; then top_srcdir=.
2905 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
2906 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
2907 *) # Relative path.
2908 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
2909 top_srcdir="$ac_dots$ac_given_srcdir" ;;
2910 esac
2911
2912 case "$ac_given_INSTALL" in
2913 [/$]*) INSTALL="$ac_given_INSTALL" ;;
2914 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
2915 esac
2916
2917 echo creating "$ac_file"
2918 rm -f "$ac_file"
2919 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
2920 case "$ac_file" in
2921 *Makefile*) ac_comsub="1i\\
2922 # $configure_input" ;;
2923 *) ac_comsub= ;;
2924 esac
2925
2926 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
2927 sed -e "$ac_comsub
2928 s%@configure_input@%$configure_input%g
2929 s%@srcdir@%$srcdir%g
2930 s%@top_srcdir@%$top_srcdir%g
2931 s%@INSTALL@%$INSTALL%g
2932 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
2933 fi; done
2934 rm -f conftest.s*
2935
2936 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
2937 # NAME is the cpp macro being defined and VALUE is the value it is being given.
2938 #
2939 # ac_d sets the value in "#define NAME VALUE" lines.
2940 ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
2941 ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
2942 ac_dC='\3'
2943 ac_dD='%g'
2944 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
2945 ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
2946 ac_uB='\([ ]\)%\1#\2define\3'
2947 ac_uC=' '
2948 ac_uD='\4%g'
2949 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
2950 ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
2951 ac_eB='$%\1#\2define\3'
2952 ac_eC=' '
2953 ac_eD='%g'
2954
2955 if test "${CONFIG_HEADERS+set}" != set; then
2956 EOF
2957 cat >> $CONFIG_STATUS <<EOF
2958 CONFIG_HEADERS="scmconfig.h"
2959 EOF
2960 cat >> $CONFIG_STATUS <<\EOF
2961 fi
2962 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
2963 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
2964 case "$ac_file" in
2965 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
2966 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
2967 *) ac_file_in="${ac_file}.in" ;;
2968 esac
2969
2970 echo creating $ac_file
2971
2972 rm -f conftest.frag conftest.in conftest.out
2973 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
2974 cat $ac_file_inputs > conftest.in
2975
2976 EOF
2977
2978 # Transform confdefs.h into a sed script conftest.vals that substitutes
2979 # the proper values into config.h.in to produce config.h. And first:
2980 # Protect against being on the right side of a sed subst in config.status.
2981 # Protect against being in an unquoted here document in config.status.
2982 rm -f conftest.vals
2983 cat > conftest.hdr <<\EOF
2984 s/[\\&%]/\\&/g
2985 s%[\\$`]%\\&%g
2986 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
2987 s%ac_d%ac_u%gp
2988 s%ac_u%ac_e%gp
2989 EOF
2990 sed -n -f conftest.hdr confdefs.h > conftest.vals
2991 rm -f conftest.hdr
2992
2993 # This sed command replaces #undef with comments. This is necessary, for
2994 # example, in the case of _POSIX_SOURCE, which is predefined and required
2995 # on some systems where configure will not decide to define it.
2996 cat >> conftest.vals <<\EOF
2997 s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
2998 EOF
2999
3000 # Break up conftest.vals because some shells have a limit on
3001 # the size of here documents, and old seds have small limits too.
3002
3003 rm -f conftest.tail
3004 while :
3005 do
3006 ac_lines=`grep -c . conftest.vals`
3007 # grep -c gives empty output for an empty file on some AIX systems.
3008 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
3009 # Write a limited-size here document to conftest.frag.
3010 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
3011 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
3012 echo 'CEOF
3013 sed -f conftest.frag conftest.in > conftest.out
3014 rm -f conftest.in
3015 mv conftest.out conftest.in
3016 ' >> $CONFIG_STATUS
3017 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
3018 rm -f conftest.vals
3019 mv conftest.tail conftest.vals
3020 done
3021 rm -f conftest.vals
3022
3023 cat >> $CONFIG_STATUS <<\EOF
3024 rm -f conftest.frag conftest.h
3025 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
3026 cat conftest.in >> conftest.h
3027 rm -f conftest.in
3028 if cmp -s $ac_file conftest.h 2>/dev/null; then
3029 echo "$ac_file is unchanged"
3030 rm -f conftest.h
3031 else
3032 # Remove last slash and all that follows it. Not all systems have dirname.
3033 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
3034 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
3035 # The file is in a subdirectory.
3036 test ! -d "$ac_dir" && mkdir "$ac_dir"
3037 fi
3038 rm -f $ac_file
3039 mv conftest.h $ac_file
3040 fi
3041 fi; done
3042
3043 EOF
3044 cat >> $CONFIG_STATUS <<EOF
3045
3046 EOF
3047 cat >> $CONFIG_STATUS <<\EOF
3048 test -z "$CONFIG_HEADER" || echo timestamp > stamp-h
3049
3050 exit 0
3051 EOF
3052 chmod +x $CONFIG_STATUS
3053 rm -fr confdefs* $ac_clean_files
3054 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
3055
3056