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