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