OSDN Git Service

* libtool.m4 (LD): Correct powerpc64 host match.
[pf3gnuchains/gcc-fork.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-shared[=PKGS]  build shared libraries [default=yes]"
18 ac_help="$ac_help
19   --enable-static[=PKGS]  build static libraries [default=yes]"
20 ac_help="$ac_help
21   --enable-fast-install[=PKGS]  optimize for fast installation [default=yes]"
22 ac_help="$ac_help
23   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]"
24 ac_help="$ac_help
25   --disable-libtool-lock  avoid locking (might break parallel builds)"
26 ac_help="$ac_help
27   --with-pic              try to use only PIC/non-PIC objects [default=use both]"
28 ac_help="$ac_help
29   --enable-maintainer-mode enable make rules and dependencies not useful
30                           (and sometimes confusing) to the casual installer"
31 ac_help="$ac_help
32   --enable-debug          debugging mode"
33 ac_help="$ac_help
34   --disable-structs       omit code for struct support"
35 ac_help="$ac_help
36   --disable-raw-api       make the raw api unavailable"
37 ac_help="$ac_help
38   --enable-purify-safety  purify-safe mode"
39
40 # Initialize some variables set by options.
41 # The variables have the same names as the options, with
42 # dashes changed to underlines.
43 build=NONE
44 cache_file=./config.cache
45 exec_prefix=NONE
46 host=NONE
47 no_create=
48 nonopt=NONE
49 no_recursion=
50 prefix=NONE
51 program_prefix=NONE
52 program_suffix=NONE
53 program_transform_name=s,x,x,
54 silent=
55 site=
56 srcdir=
57 target=NONE
58 verbose=
59 x_includes=NONE
60 x_libraries=NONE
61 bindir='${exec_prefix}/bin'
62 sbindir='${exec_prefix}/sbin'
63 libexecdir='${exec_prefix}/libexec'
64 datadir='${prefix}/share'
65 sysconfdir='${prefix}/etc'
66 sharedstatedir='${prefix}/com'
67 localstatedir='${prefix}/var'
68 libdir='${exec_prefix}/lib'
69 includedir='${prefix}/include'
70 oldincludedir='/usr/include'
71 infodir='${prefix}/info'
72 mandir='${prefix}/man'
73
74 # Initialize some other variables.
75 subdirs=
76 MFLAGS= MAKEFLAGS=
77 SHELL=${CONFIG_SHELL-/bin/sh}
78 # Maximum number of lines to put in a shell here document.
79 ac_max_here_lines=12
80
81 ac_prev=
82 for ac_option
83 do
84
85   # If the previous option needs an argument, assign it.
86   if test -n "$ac_prev"; then
87     eval "$ac_prev=\$ac_option"
88     ac_prev=
89     continue
90   fi
91
92   case "$ac_option" in
93   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
94   *) ac_optarg= ;;
95   esac
96
97   # Accept the important Cygnus configure options, so we can diagnose typos.
98
99   case "$ac_option" in
100
101   -bindir | --bindir | --bindi | --bind | --bin | --bi)
102     ac_prev=bindir ;;
103   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
104     bindir="$ac_optarg" ;;
105
106   -build | --build | --buil | --bui | --bu)
107     ac_prev=build ;;
108   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
109     build="$ac_optarg" ;;
110
111   -cache-file | --cache-file | --cache-fil | --cache-fi \
112   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
113     ac_prev=cache_file ;;
114   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
115   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
116     cache_file="$ac_optarg" ;;
117
118   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
119     ac_prev=datadir ;;
120   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
121   | --da=*)
122     datadir="$ac_optarg" ;;
123
124   -disable-* | --disable-*)
125     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
126     # Reject names that are not valid shell variable names.
127     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
128       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
129     fi
130     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
131     eval "enable_${ac_feature}=no" ;;
132
133   -enable-* | --enable-*)
134     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
135     # Reject names that are not valid shell variable names.
136     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
137       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
138     fi
139     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
140     case "$ac_option" in
141       *=*) ;;
142       *) ac_optarg=yes ;;
143     esac
144     eval "enable_${ac_feature}='$ac_optarg'" ;;
145
146   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
147   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
148   | --exec | --exe | --ex)
149     ac_prev=exec_prefix ;;
150   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
151   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
152   | --exec=* | --exe=* | --ex=*)
153     exec_prefix="$ac_optarg" ;;
154
155   -gas | --gas | --ga | --g)
156     # Obsolete; use --with-gas.
157     with_gas=yes ;;
158
159   -help | --help | --hel | --he)
160     # Omit some internal or obsolete options to make the list less imposing.
161     # This message is too long to be a string in the A/UX 3.1 sh.
162     cat << EOF
163 Usage: configure [options] [host]
164 Options: [defaults in brackets after descriptions]
165 Configuration:
166   --cache-file=FILE       cache test results in FILE
167   --help                  print this message
168   --no-create             do not create output files
169   --quiet, --silent       do not print \`checking...' messages
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   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
341     ac_prev=srcdir ;;
342   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
343     srcdir="$ac_optarg" ;;
344
345   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
346   | --syscon | --sysco | --sysc | --sys | --sy)
347     ac_prev=sysconfdir ;;
348   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
349   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
350     sysconfdir="$ac_optarg" ;;
351
352   -target | --target | --targe | --targ | --tar | --ta | --t)
353     ac_prev=target ;;
354   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
355     target="$ac_optarg" ;;
356
357   -v | -verbose | --verbose | --verbos | --verbo | --verb)
358     verbose=yes ;;
359
360   -version | --version | --versio | --versi | --vers)
361     echo "configure generated by autoconf version 2.13"
362     exit 0 ;;
363
364   -with-* | --with-*)
365     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
366     # Reject names that are not valid shell variable names.
367     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
368       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
369     fi
370     ac_package=`echo $ac_package| sed 's/-/_/g'`
371     case "$ac_option" in
372       *=*) ;;
373       *) ac_optarg=yes ;;
374     esac
375     eval "with_${ac_package}='$ac_optarg'" ;;
376
377   -without-* | --without-*)
378     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
379     # Reject names that are not valid shell variable names.
380     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
381       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
382     fi
383     ac_package=`echo $ac_package| sed 's/-/_/g'`
384     eval "with_${ac_package}=no" ;;
385
386   --x)
387     # Obsolete; use --with-x.
388     with_x=yes ;;
389
390   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
391   | --x-incl | --x-inc | --x-in | --x-i)
392     ac_prev=x_includes ;;
393   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
394   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
395     x_includes="$ac_optarg" ;;
396
397   -x-libraries | --x-libraries | --x-librarie | --x-librari \
398   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
399     ac_prev=x_libraries ;;
400   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
401   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
402     x_libraries="$ac_optarg" ;;
403
404   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
405     ;;
406
407   *)
408     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
409       echo "configure: warning: $ac_option: invalid host type" 1>&2
410     fi
411     if test "x$nonopt" != xNONE; then
412       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
413     fi
414     nonopt="$ac_option"
415     ;;
416
417   esac
418 done
419
420 if test -n "$ac_prev"; then
421   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
422 fi
423
424 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
425
426 # File descriptor usage:
427 # 0 standard input
428 # 1 file creation
429 # 2 errors and warnings
430 # 3 some systems may open it to /dev/tty
431 # 4 used on the Kubota Titan
432 # 6 checking for... messages and results
433 # 5 compiler messages saved in config.log
434 if test "$silent" = yes; then
435   exec 6>/dev/null
436 else
437   exec 6>&1
438 fi
439 exec 5>./config.log
440
441 echo "\
442 This file contains any messages produced by compilers while
443 running configure, to aid debugging if configure makes a mistake.
444 " 1>&5
445
446 # Strip out --no-create and --no-recursion so they do not pile up.
447 # Also quote any args containing shell metacharacters.
448 ac_configure_args=
449 for ac_arg
450 do
451   case "$ac_arg" in
452   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
453   | --no-cr | --no-c) ;;
454   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
455   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
456   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
457   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
458   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
459   esac
460 done
461
462 # NLS nuisances.
463 # Only set these to C if already set.  These must not be set unconditionally
464 # because not all systems understand e.g. LANG=C (notably SCO).
465 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
466 # Non-C LC_CTYPE values break the ctype check.
467 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
468 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
469 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
470 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
471
472 # confdefs.h avoids OS command line length limits that DEFS can exceed.
473 rm -rf conftest* confdefs.h
474 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
475 echo > confdefs.h
476
477 # A filename unique to this package, relative to the directory that
478 # configure is in, which we can look for to find out if srcdir is correct.
479 ac_unique_file=fficonfig.h.in
480
481 # Find the source files, if location was not specified.
482 if test -z "$srcdir"; then
483   ac_srcdir_defaulted=yes
484   # Try the directory containing this script, then its parent.
485   ac_prog=$0
486   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
487   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
488   srcdir=$ac_confdir
489   if test ! -r $srcdir/$ac_unique_file; then
490     srcdir=..
491   fi
492 else
493   ac_srcdir_defaulted=no
494 fi
495 if test ! -r $srcdir/$ac_unique_file; then
496   if test "$ac_srcdir_defaulted" = yes; then
497     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
498   else
499     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
500   fi
501 fi
502 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
503
504 # Prefer explicitly selected file to automatically selected ones.
505 if test -z "$CONFIG_SITE"; then
506   if test "x$prefix" != xNONE; then
507     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
508   else
509     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
510   fi
511 fi
512 for ac_site_file in $CONFIG_SITE; do
513   if test -r "$ac_site_file"; then
514     echo "loading site script $ac_site_file"
515     . "$ac_site_file"
516   fi
517 done
518
519 if test -r "$cache_file"; then
520   echo "loading cache $cache_file"
521   . $cache_file
522 else
523   echo "creating cache $cache_file"
524   > $cache_file
525 fi
526
527 ac_ext=c
528 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
529 ac_cpp='$CPP $CPPFLAGS'
530 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
531 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
532 cross_compiling=$ac_cv_prog_cc_cross
533
534 ac_exeext=
535 ac_objext=o
536 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
537   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
538   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
539     ac_n= ac_c='
540 ' ac_t='        '
541   else
542     ac_n=-n ac_c= ac_t=
543   fi
544 else
545   ac_n= ac_c='\c' ac_t=
546 fi
547
548 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
549 echo "configure:550: checking for Cygwin environment" >&5
550 if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
551   echo $ac_n "(cached) $ac_c" 1>&6
552 else
553   cat > conftest.$ac_ext <<EOF
554 #line 555 "configure"
555 #include "confdefs.h"
556
557 int main() {
558
559 #ifndef __CYGWIN__
560 #define __CYGWIN__ __CYGWIN32__
561 #endif
562 return __CYGWIN__;
563 ; return 0; }
564 EOF
565 if { (eval echo configure:566: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
566   rm -rf conftest*
567   ac_cv_cygwin=yes
568 else
569   echo "configure: failed program was:" >&5
570   cat conftest.$ac_ext >&5
571   rm -rf conftest*
572   ac_cv_cygwin=no
573 fi
574 rm -f conftest*
575 rm -f conftest*
576 fi
577
578 echo "$ac_t""$ac_cv_cygwin" 1>&6
579 CYGWIN=
580 test "$ac_cv_cygwin" = yes && CYGWIN=yes
581 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
582 echo "configure:583: checking for mingw32 environment" >&5
583 if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
584   echo $ac_n "(cached) $ac_c" 1>&6
585 else
586   cat > conftest.$ac_ext <<EOF
587 #line 588 "configure"
588 #include "confdefs.h"
589
590 int main() {
591 return __MINGW32__;
592 ; return 0; }
593 EOF
594 if { (eval echo configure:595: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
595   rm -rf conftest*
596   ac_cv_mingw32=yes
597 else
598   echo "configure: failed program was:" >&5
599   cat conftest.$ac_ext >&5
600   rm -rf conftest*
601   ac_cv_mingw32=no
602 fi
603 rm -f conftest*
604 rm -f conftest*
605 fi
606
607 echo "$ac_t""$ac_cv_mingw32" 1>&6
608 MINGW32=
609 test "$ac_cv_mingw32" = yes && MINGW32=yes
610
611
612
613
614
615 # This works around the fact that libtool configuration may change LD
616 # for this particular configuration, but some shells, instead of
617 # keeping the changes in LD private, export them just because LD is
618 # exported.
619 ORIGINAL_LD_FOR_MULTILIBS=$LD
620
621 # Check whether --enable-multilib or --disable-multilib was given.
622 if test "${enable_multilib+set}" = set; then
623   enableval="$enable_multilib"
624   case "${enableval}" in
625   yes) multilib=yes ;;
626   no)  multilib=no ;;
627   *)   { echo "configure: error: bad value ${enableval} for multilib option" 1>&2; exit 1; } ;;
628  esac
629 else
630   multilib=yes
631 fi
632
633
634 if test "${srcdir}" = "."; then
635   if test "${with_target_subdir}" != "."; then
636     libffi_basedir="${with_multisrctop}../"
637   else
638     libffi_basedir="${with_multisrctop}"
639   fi
640 else
641   libffi_basedir=
642 fi
643
644 ac_aux_dir=
645 for ac_dir in ${libffi_basedir}.. $srcdir/${libffi_basedir}..; do
646   if test -f $ac_dir/install-sh; then
647     ac_aux_dir=$ac_dir
648     ac_install_sh="$ac_aux_dir/install-sh -c"
649     break
650   elif test -f $ac_dir/install.sh; then
651     ac_aux_dir=$ac_dir
652     ac_install_sh="$ac_aux_dir/install.sh -c"
653     break
654   fi
655 done
656 if test -z "$ac_aux_dir"; then
657   { echo "configure: error: can not find install-sh or install.sh in ${libffi_basedir}.. $srcdir/${libffi_basedir}.." 1>&2; exit 1; }
658 fi
659 ac_config_guess=$ac_aux_dir/config.guess
660 ac_config_sub=$ac_aux_dir/config.sub
661 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
662
663
664
665 # Do some error checking and defaulting for the host and target type.
666 # The inputs are:
667 #    configure --host=HOST --target=TARGET --build=BUILD NONOPT
668 #
669 # The rules are:
670 # 1. You are not allowed to specify --host, --target, and nonopt at the
671 #    same time.
672 # 2. Host defaults to nonopt.
673 # 3. If nonopt is not specified, then host defaults to the current host,
674 #    as determined by config.guess.
675 # 4. Target and build default to nonopt.
676 # 5. If nonopt is not specified, then target and build default to host.
677
678 # The aliases save the names the user supplied, while $host etc.
679 # will get canonicalized.
680 case $host---$target---$nonopt in
681 NONE---*---* | *---NONE---* | *---*---NONE) ;;
682 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
683 esac
684
685
686 # Make sure we can run config.sub.
687 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
688 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
689 fi
690
691 echo $ac_n "checking host system type""... $ac_c" 1>&6
692 echo "configure:693: checking host system type" >&5
693
694 host_alias=$host
695 case "$host_alias" in
696 NONE)
697   case $nonopt in
698   NONE)
699     if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
700     else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
701     fi ;;
702   *) host_alias=$nonopt ;;
703   esac ;;
704 esac
705
706 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
707 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
708 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
709 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
710 echo "$ac_t""$host" 1>&6
711
712 echo $ac_n "checking target system type""... $ac_c" 1>&6
713 echo "configure:714: checking target system type" >&5
714
715 target_alias=$target
716 case "$target_alias" in
717 NONE)
718   case $nonopt in
719   NONE) target_alias=$host_alias ;;
720   *) target_alias=$nonopt ;;
721   esac ;;
722 esac
723
724 target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
725 target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
726 target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
727 target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
728 echo "$ac_t""$target" 1>&6
729
730 echo $ac_n "checking build system type""... $ac_c" 1>&6
731 echo "configure:732: checking build system type" >&5
732
733 build_alias=$build
734 case "$build_alias" in
735 NONE)
736   case $nonopt in
737   NONE) build_alias=$host_alias ;;
738   *) build_alias=$nonopt ;;
739   esac ;;
740 esac
741
742 build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
743 build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
744 build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
745 build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
746 echo "$ac_t""$build" 1>&6
747
748 test "$host_alias" != "$target_alias" &&
749   test "$program_prefix$program_suffix$program_transform_name" = \
750     NONENONEs,x,x, &&
751   program_prefix=${target_alias}-
752
753 target_alias=${target_alias-$host_alias}
754
755 # Check whether --enable-shared or --disable-shared was given.
756 if test "${enable_shared+set}" = set; then
757   enableval="$enable_shared"
758   p=${PACKAGE-default}
759 case $enableval in
760 yes) enable_shared=yes ;;
761 no) enable_shared=no ;;
762 *)
763   enable_shared=no
764   # Look at the argument we got.  We use all the common list separators.
765   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
766   for pkg in $enableval; do
767     if test "X$pkg" = "X$p"; then
768       enable_shared=yes
769     fi
770   done
771   IFS="$ac_save_ifs"
772   ;;
773 esac
774 else
775   enable_shared=yes
776 fi
777
778 # Check whether --enable-static or --disable-static was given.
779 if test "${enable_static+set}" = set; then
780   enableval="$enable_static"
781   p=${PACKAGE-default}
782 case $enableval in
783 yes) enable_static=yes ;;
784 no) enable_static=no ;;
785 *)
786   enable_static=no
787   # Look at the argument we got.  We use all the common list separators.
788   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
789   for pkg in $enableval; do
790     if test "X$pkg" = "X$p"; then
791       enable_static=yes
792     fi
793   done
794   IFS="$ac_save_ifs"
795   ;;
796 esac
797 else
798   enable_static=yes
799 fi
800
801 # Check whether --enable-fast-install or --disable-fast-install was given.
802 if test "${enable_fast_install+set}" = set; then
803   enableval="$enable_fast_install"
804   p=${PACKAGE-default}
805 case $enableval in
806 yes) enable_fast_install=yes ;;
807 no) enable_fast_install=no ;;
808 *)
809   enable_fast_install=no
810   # Look at the argument we got.  We use all the common list separators.
811   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
812   for pkg in $enableval; do
813     if test "X$pkg" = "X$p"; then
814       enable_fast_install=yes
815     fi
816   done
817   IFS="$ac_save_ifs"
818   ;;
819 esac
820 else
821   enable_fast_install=yes
822 fi
823
824 # Extract the first word of "gcc", so it can be a program name with args.
825 set dummy gcc; ac_word=$2
826 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
827 echo "configure:828: checking for $ac_word" >&5
828 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
829   echo $ac_n "(cached) $ac_c" 1>&6
830 else
831   if test -n "$CC"; then
832   ac_cv_prog_CC="$CC" # Let the user override the test.
833 else
834   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
835   ac_dummy="$PATH"
836   for ac_dir in $ac_dummy; do
837     test -z "$ac_dir" && ac_dir=.
838     if test -f $ac_dir/$ac_word; then
839       ac_cv_prog_CC="gcc"
840       break
841     fi
842   done
843   IFS="$ac_save_ifs"
844 fi
845 fi
846 CC="$ac_cv_prog_CC"
847 if test -n "$CC"; then
848   echo "$ac_t""$CC" 1>&6
849 else
850   echo "$ac_t""no" 1>&6
851 fi
852
853 if test -z "$CC"; then
854   # Extract the first word of "cc", so it can be a program name with args.
855 set dummy cc; ac_word=$2
856 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
857 echo "configure:858: checking for $ac_word" >&5
858 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
859   echo $ac_n "(cached) $ac_c" 1>&6
860 else
861   if test -n "$CC"; then
862   ac_cv_prog_CC="$CC" # Let the user override the test.
863 else
864   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
865   ac_prog_rejected=no
866   ac_dummy="$PATH"
867   for ac_dir in $ac_dummy; do
868     test -z "$ac_dir" && ac_dir=.
869     if test -f $ac_dir/$ac_word; then
870       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
871         ac_prog_rejected=yes
872         continue
873       fi
874       ac_cv_prog_CC="cc"
875       break
876     fi
877   done
878   IFS="$ac_save_ifs"
879 if test $ac_prog_rejected = yes; then
880   # We found a bogon in the path, so make sure we never use it.
881   set dummy $ac_cv_prog_CC
882   shift
883   if test $# -gt 0; then
884     # We chose a different compiler from the bogus one.
885     # However, it has the same basename, so the bogon will be chosen
886     # first if we set CC to just the basename; use the full file name.
887     shift
888     set dummy "$ac_dir/$ac_word" "$@"
889     shift
890     ac_cv_prog_CC="$@"
891   fi
892 fi
893 fi
894 fi
895 CC="$ac_cv_prog_CC"
896 if test -n "$CC"; then
897   echo "$ac_t""$CC" 1>&6
898 else
899   echo "$ac_t""no" 1>&6
900 fi
901
902   if test -z "$CC"; then
903     case "`uname -s`" in
904     *win32* | *WIN32*)
905       # Extract the first word of "cl", so it can be a program name with args.
906 set dummy cl; ac_word=$2
907 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
908 echo "configure:909: checking for $ac_word" >&5
909 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
910   echo $ac_n "(cached) $ac_c" 1>&6
911 else
912   if test -n "$CC"; then
913   ac_cv_prog_CC="$CC" # Let the user override the test.
914 else
915   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
916   ac_dummy="$PATH"
917   for ac_dir in $ac_dummy; do
918     test -z "$ac_dir" && ac_dir=.
919     if test -f $ac_dir/$ac_word; then
920       ac_cv_prog_CC="cl"
921       break
922     fi
923   done
924   IFS="$ac_save_ifs"
925 fi
926 fi
927 CC="$ac_cv_prog_CC"
928 if test -n "$CC"; then
929   echo "$ac_t""$CC" 1>&6
930 else
931   echo "$ac_t""no" 1>&6
932 fi
933  ;;
934     esac
935   fi
936   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
937 fi
938
939 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
940 echo "configure:941: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
941
942 ac_ext=c
943 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
944 ac_cpp='$CPP $CPPFLAGS'
945 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
946 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
947 cross_compiling=$ac_cv_prog_cc_cross
948
949 cat > conftest.$ac_ext << EOF
950
951 #line 952 "configure"
952 #include "confdefs.h"
953
954 main(){return(0);}
955 EOF
956 if { (eval echo configure:957: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
957   ac_cv_prog_cc_works=yes
958   # If we can't run a trivial program, we are probably using a cross compiler.
959   if (./conftest; exit) 2>/dev/null; then
960     ac_cv_prog_cc_cross=no
961   else
962     ac_cv_prog_cc_cross=yes
963   fi
964 else
965   echo "configure: failed program was:" >&5
966   cat conftest.$ac_ext >&5
967   ac_cv_prog_cc_works=no
968 fi
969 rm -fr conftest*
970 ac_ext=c
971 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
972 ac_cpp='$CPP $CPPFLAGS'
973 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
974 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
975 cross_compiling=$ac_cv_prog_cc_cross
976
977 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
978 if test $ac_cv_prog_cc_works = no; then
979   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
980 fi
981 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
982 echo "configure:983: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
983 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
984 cross_compiling=$ac_cv_prog_cc_cross
985
986 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
987 echo "configure:988: checking whether we are using GNU C" >&5
988 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
989   echo $ac_n "(cached) $ac_c" 1>&6
990 else
991   cat > conftest.c <<EOF
992 #ifdef __GNUC__
993   yes;
994 #endif
995 EOF
996 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:997: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
997   ac_cv_prog_gcc=yes
998 else
999   ac_cv_prog_gcc=no
1000 fi
1001 fi
1002
1003 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1004
1005 if test $ac_cv_prog_gcc = yes; then
1006   GCC=yes
1007 else
1008   GCC=
1009 fi
1010
1011 ac_test_CFLAGS="${CFLAGS+set}"
1012 ac_save_CFLAGS="$CFLAGS"
1013 CFLAGS=
1014 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1015 echo "configure:1016: checking whether ${CC-cc} accepts -g" >&5
1016 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
1017   echo $ac_n "(cached) $ac_c" 1>&6
1018 else
1019   echo 'void f(){}' > conftest.c
1020 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1021   ac_cv_prog_cc_g=yes
1022 else
1023   ac_cv_prog_cc_g=no
1024 fi
1025 rm -f conftest*
1026
1027 fi
1028
1029 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1030 if test "$ac_test_CFLAGS" = set; then
1031   CFLAGS="$ac_save_CFLAGS"
1032 elif test $ac_cv_prog_cc_g = yes; then
1033   if test "$GCC" = yes; then
1034     CFLAGS="-g -O2"
1035   else
1036     CFLAGS="-g"
1037   fi
1038 else
1039   if test "$GCC" = yes; then
1040     CFLAGS="-O2"
1041   else
1042     CFLAGS=
1043   fi
1044 fi
1045
1046 # Check whether --with-gnu-ld or --without-gnu-ld was given.
1047 if test "${with_gnu_ld+set}" = set; then
1048   withval="$with_gnu_ld"
1049   test "$withval" = no || with_gnu_ld=yes
1050 else
1051   with_gnu_ld=no
1052 fi
1053
1054 ac_prog=ld
1055 if test "$GCC" = yes; then
1056   # Check if gcc -print-prog-name=ld gives a path.
1057   echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
1058 echo "configure:1059: checking for ld used by GCC" >&5
1059   case $host in
1060   *-*-mingw*)
1061     # gcc leaves a trailing carriage return which upsets mingw
1062     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
1063   *)
1064     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
1065   esac
1066   case $ac_prog in
1067     # Accept absolute paths.
1068     [\\/]* | [A-Za-z]:[\\/]*)
1069       re_direlt='/[^/][^/]*/\.\./'
1070       # Canonicalize the path of ld
1071       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
1072       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
1073         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
1074       done
1075       test -z "$LD" && LD="$ac_prog"
1076       ;;
1077   "")
1078     # If it fails, then pretend we aren't using GCC.
1079     ac_prog=ld
1080     ;;
1081   *)
1082     # If it is relative, then search for the first ld in PATH.
1083     with_gnu_ld=unknown
1084     ;;
1085   esac
1086 elif test "$with_gnu_ld" = yes; then
1087   echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
1088 echo "configure:1089: checking for GNU ld" >&5
1089 else
1090   echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
1091 echo "configure:1092: checking for non-GNU ld" >&5
1092 fi
1093 if eval "test \"`echo '$''{'lt_cv_path_LD'+set}'`\" = set"; then
1094   echo $ac_n "(cached) $ac_c" 1>&6
1095 else
1096   if test -z "$LD"; then
1097   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
1098   for ac_dir in $PATH; do
1099     test -z "$ac_dir" && ac_dir=.
1100     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
1101       lt_cv_path_LD="$ac_dir/$ac_prog"
1102       # Check to see if the program is GNU ld.  I'd rather use --version,
1103       # but apparently some GNU ld's only accept -v.
1104       # Break only if it was the GNU/non-GNU ld that we prefer.
1105       if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
1106         test "$with_gnu_ld" != no && break
1107       else
1108         test "$with_gnu_ld" != yes && break
1109       fi
1110     fi
1111   done
1112   IFS="$ac_save_ifs"
1113 else
1114   lt_cv_path_LD="$LD" # Let the user override the test with a path.
1115 fi
1116 fi
1117
1118 LD="$lt_cv_path_LD"
1119 if test -n "$LD"; then
1120   echo "$ac_t""$LD" 1>&6
1121 else
1122   echo "$ac_t""no" 1>&6
1123 fi
1124 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
1125 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
1126 echo "configure:1127: checking if the linker ($LD) is GNU ld" >&5
1127 if eval "test \"`echo '$''{'lt_cv_prog_gnu_ld'+set}'`\" = set"; then
1128   echo $ac_n "(cached) $ac_c" 1>&6
1129 else
1130   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
1131 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
1132   lt_cv_prog_gnu_ld=yes
1133 else
1134   lt_cv_prog_gnu_ld=no
1135 fi
1136 fi
1137
1138 echo "$ac_t""$lt_cv_prog_gnu_ld" 1>&6
1139 with_gnu_ld=$lt_cv_prog_gnu_ld
1140
1141
1142 echo $ac_n "checking for $LD option to reload object files""... $ac_c" 1>&6
1143 echo "configure:1144: checking for $LD option to reload object files" >&5
1144 if eval "test \"`echo '$''{'lt_cv_ld_reload_flag'+set}'`\" = set"; then
1145   echo $ac_n "(cached) $ac_c" 1>&6
1146 else
1147   lt_cv_ld_reload_flag='-r'
1148 fi
1149
1150 echo "$ac_t""$lt_cv_ld_reload_flag" 1>&6
1151 reload_flag=$lt_cv_ld_reload_flag
1152 test -n "$reload_flag" && reload_flag=" $reload_flag"
1153
1154 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
1155 echo "configure:1156: checking for BSD-compatible nm" >&5
1156 if eval "test \"`echo '$''{'lt_cv_path_NM'+set}'`\" = set"; then
1157   echo $ac_n "(cached) $ac_c" 1>&6
1158 else
1159   if test -n "$NM"; then
1160   # Let the user override the test.
1161   lt_cv_path_NM="$NM"
1162 else
1163   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
1164   for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
1165     test -z "$ac_dir" && ac_dir=.
1166     tmp_nm=$ac_dir/${ac_tool_prefix}nm
1167     if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then
1168       # Check to see if the nm accepts a BSD-compat flag.
1169       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
1170       #   nm: unknown option "B" ignored
1171       # Tru64's nm complains that /dev/null is an invalid object file
1172       if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
1173         lt_cv_path_NM="$tmp_nm -B"
1174         break
1175       elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
1176         lt_cv_path_NM="$tmp_nm -p"
1177         break
1178       else
1179         lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
1180         continue # so that we can try to find one that supports BSD flags
1181       fi
1182     fi
1183   done
1184   IFS="$ac_save_ifs"
1185   test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
1186 fi
1187 fi
1188
1189 NM="$lt_cv_path_NM"
1190 echo "$ac_t""$NM" 1>&6
1191
1192 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
1193 echo "configure:1194: checking whether ln -s works" >&5
1194 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
1195   echo $ac_n "(cached) $ac_c" 1>&6
1196 else
1197   rm -f conftestdata
1198 if ln -s X conftestdata 2>/dev/null
1199 then
1200   rm -f conftestdata
1201   ac_cv_prog_LN_S="ln -s"
1202 else
1203   ac_cv_prog_LN_S=ln
1204 fi
1205 fi
1206 LN_S="$ac_cv_prog_LN_S"
1207 if test "$ac_cv_prog_LN_S" = "ln -s"; then
1208   echo "$ac_t""yes" 1>&6
1209 else
1210   echo "$ac_t""no" 1>&6
1211 fi
1212
1213 echo $ac_n "checking how to recognise dependant libraries""... $ac_c" 1>&6
1214 echo "configure:1215: checking how to recognise dependant libraries" >&5
1215 if eval "test \"`echo '$''{'lt_cv_deplibs_check_method'+set}'`\" = set"; then
1216   echo $ac_n "(cached) $ac_c" 1>&6
1217 else
1218   lt_cv_file_magic_cmd='$MAGIC_CMD'
1219 lt_cv_file_magic_test_file=
1220 lt_cv_deplibs_check_method='unknown'
1221 # Need to set the preceding variable on all platforms that support
1222 # interlibrary dependencies.
1223 # 'none' -- dependencies not supported.
1224 # `unknown' -- same as none, but documents that we really don't know.
1225 # 'pass_all' -- all dependencies passed with no checks.
1226 # 'test_compile' -- check by making test program.
1227 # 'file_magic [regex]' -- check by looking for files in library path
1228 # which responds to the $file_magic_cmd with a given egrep regex.
1229 # If you have `file' or equivalent on your system and you're not sure
1230 # whether `pass_all' will *always* work, you probably want this one.
1231
1232 case $host_os in
1233 aix*)
1234   lt_cv_deplibs_check_method=pass_all
1235   ;;
1236
1237 beos*)
1238   lt_cv_deplibs_check_method=pass_all
1239   ;;
1240
1241 bsdi4*)
1242   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
1243   lt_cv_file_magic_cmd='/usr/bin/file -L'
1244   lt_cv_file_magic_test_file=/shlib/libc.so
1245   ;;
1246
1247 cygwin* | mingw* |pw32*)
1248   lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
1249   lt_cv_file_magic_cmd='$OBJDUMP -f'
1250   ;;
1251
1252 darwin* | rhapsody*)
1253   lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
1254   lt_cv_file_magic_cmd='/usr/bin/file -L'
1255   case "$host_os" in
1256   rhapsody* | darwin1.012)
1257     lt_cv_file_magic_test_file='/System/Library/Frameworks/System.framework/System'
1258     ;;
1259   *) # Darwin 1.3 on
1260     lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
1261     ;;
1262   esac
1263   ;;
1264
1265 freebsd* )
1266   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
1267     case $host_cpu in
1268     i*86 )
1269       # Not sure whether the presence of OpenBSD here was a mistake.
1270       # Let's accept both of them until this is cleared up.
1271       lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library'
1272       lt_cv_file_magic_cmd=/usr/bin/file
1273       lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
1274       ;;
1275     esac
1276   else
1277     lt_cv_deplibs_check_method=pass_all
1278   fi
1279   ;;
1280
1281 gnu*)
1282   lt_cv_deplibs_check_method=pass_all
1283   ;;
1284
1285 hpux10.20*|hpux11*)
1286   case $host_cpu in
1287   hppa*)
1288     lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
1289     lt_cv_file_magic_cmd=/usr/bin/file
1290     lt_cv_file_magic_test_file=/usr/lib/libc.sl
1291     ;;
1292   ia64*)
1293     lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64'
1294     lt_cv_file_magic_cmd=/usr/bin/file
1295     lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
1296     ;;
1297   esac
1298   ;;
1299
1300 irix5* | irix6*)
1301   case $host_os in
1302   irix5*)
1303     # this will be overridden with pass_all, but let us keep it just in case
1304     lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
1305     ;;
1306   *)
1307     case $LD in
1308     *-32|*"-32 ") libmagic=32-bit;;
1309     *-n32|*"-n32 ") libmagic=N32;;
1310     *-64|*"-64 ") libmagic=64-bit;;
1311     *) libmagic=never-match;;
1312     esac
1313     # this will be overridden with pass_all, but let us keep it just in case
1314     lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1"
1315     ;;
1316   esac
1317   lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
1318   lt_cv_deplibs_check_method=pass_all
1319   ;;
1320
1321 # This must be Linux ELF.
1322 linux-gnu*)
1323   case $host_cpu in
1324   alpha* | mips* | hppa* | i*86 | powerpc* | sparc* | ia64* )
1325     lt_cv_deplibs_check_method=pass_all ;;
1326   *)
1327     # glibc up to 2.1.1 does not perform some relocations on ARM
1328     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;;
1329   esac
1330   lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
1331   ;;
1332
1333 netbsd*)
1334   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
1335     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
1336   else
1337     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so$'
1338   fi
1339   ;;
1340
1341 newsos6)
1342   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
1343   lt_cv_file_magic_cmd=/usr/bin/file
1344   lt_cv_file_magic_test_file=/usr/lib/libnls.so
1345   ;;
1346
1347 osf3* | osf4* | osf5*)
1348   # this will be overridden with pass_all, but let us keep it just in case
1349   lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
1350   lt_cv_file_magic_test_file=/shlib/libc.so
1351   lt_cv_deplibs_check_method=pass_all
1352   ;;
1353
1354 sco3.2v5*)
1355   lt_cv_deplibs_check_method=pass_all
1356   ;;
1357
1358 solaris*)
1359   lt_cv_deplibs_check_method=pass_all
1360   lt_cv_file_magic_test_file=/lib/libc.so
1361   ;;
1362
1363 sysv5uw[78]* | sysv4*uw2*)
1364   lt_cv_deplibs_check_method=pass_all
1365   ;;
1366
1367 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
1368   case $host_vendor in
1369   ncr)
1370     lt_cv_deplibs_check_method=pass_all
1371     ;;
1372   motorola)
1373     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]'
1374     lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
1375     ;;
1376   esac
1377   ;;
1378 esac
1379
1380 fi
1381
1382 echo "$ac_t""$lt_cv_deplibs_check_method" 1>&6
1383 file_magic_cmd=$lt_cv_file_magic_cmd
1384 deplibs_check_method=$lt_cv_deplibs_check_method
1385
1386 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
1387 echo "configure:1388: checking for object suffix" >&5
1388 if eval "test \"`echo '$''{'ac_cv_objext'+set}'`\" = set"; then
1389   echo $ac_n "(cached) $ac_c" 1>&6
1390 else
1391   rm -f conftest*
1392 echo 'int i = 1;' > conftest.$ac_ext
1393 if { (eval echo configure:1394: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1394   for ac_file in conftest.*; do
1395     case $ac_file in
1396     *.c) ;;
1397     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
1398     esac
1399   done
1400 else
1401   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
1402 fi
1403 rm -f conftest*
1404 fi
1405
1406 echo "$ac_t""$ac_cv_objext" 1>&6
1407 OBJEXT=$ac_cv_objext
1408 ac_objext=$ac_cv_objext
1409
1410
1411
1412 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
1413 echo "configure:1414: checking for executable suffix" >&5
1414 if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
1415   echo $ac_n "(cached) $ac_c" 1>&6
1416 else
1417   if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
1418   ac_cv_exeext=.exe
1419 else
1420   rm -f conftest*
1421   echo 'int main () { return 0; }' > conftest.$ac_ext
1422   ac_cv_exeext=
1423   if { (eval echo configure:1424: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
1424     for file in conftest.*; do
1425       case $file in
1426       *.c | *.o | *.obj) ;;
1427       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
1428       esac
1429     done
1430   else
1431     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
1432   fi
1433   rm -f conftest*
1434   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
1435 fi
1436 fi
1437
1438 EXEEXT=""
1439 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
1440 echo "$ac_t""${ac_cv_exeext}" 1>&6
1441 ac_exeext=$EXEEXT
1442
1443 if test $host != $build; then
1444   ac_tool_prefix=${host_alias}-
1445 else
1446   ac_tool_prefix=
1447 fi
1448
1449 # Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
1450
1451 # Only perform the check for file, if the check method requires it
1452 case $deplibs_check_method in
1453 file_magic*)
1454   if test "$file_magic_cmd" = '$MAGIC_CMD'; then
1455     echo $ac_n "checking for ${ac_tool_prefix}file""... $ac_c" 1>&6
1456 echo "configure:1457: checking for ${ac_tool_prefix}file" >&5
1457 if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then
1458   echo $ac_n "(cached) $ac_c" 1>&6
1459 else
1460   case $MAGIC_CMD in
1461   /*)
1462   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
1463   ;;
1464   ?:/*)
1465   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
1466   ;;
1467   *)
1468   ac_save_MAGIC_CMD="$MAGIC_CMD"
1469   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1470   ac_dummy="/usr/bin:$PATH"
1471   for ac_dir in $ac_dummy; do
1472     test -z "$ac_dir" && ac_dir=.
1473     if test -f $ac_dir/${ac_tool_prefix}file; then
1474       lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
1475       if test -n "$file_magic_test_file"; then
1476         case $deplibs_check_method in
1477         "file_magic "*)
1478           file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
1479           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
1480           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
1481             egrep "$file_magic_regex" > /dev/null; then
1482             :
1483           else
1484             cat <<EOF 1>&2
1485
1486 *** Warning: the command libtool uses to detect shared libraries,
1487 *** $file_magic_cmd, produces output that libtool cannot recognize.
1488 *** The result is that libtool may fail to recognize shared libraries
1489 *** as such.  This will affect the creation of libtool libraries that
1490 *** depend on shared libraries, but programs linked with such libtool
1491 *** libraries will work regardless of this problem.  Nevertheless, you
1492 *** may want to report the problem to your system manager and/or to
1493 *** bug-libtool@gnu.org
1494
1495 EOF
1496           fi ;;
1497         esac
1498       fi
1499       break
1500     fi
1501   done
1502   IFS="$ac_save_ifs"
1503   MAGIC_CMD="$ac_save_MAGIC_CMD"
1504   ;;
1505 esac
1506 fi
1507
1508 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
1509 if test -n "$MAGIC_CMD"; then
1510   echo "$ac_t""$MAGIC_CMD" 1>&6
1511 else
1512   echo "$ac_t""no" 1>&6
1513 fi
1514
1515 if test -z "$lt_cv_path_MAGIC_CMD"; then
1516   if test -n "$ac_tool_prefix"; then
1517     echo $ac_n "checking for file""... $ac_c" 1>&6
1518 echo "configure:1519: checking for file" >&5
1519 if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then
1520   echo $ac_n "(cached) $ac_c" 1>&6
1521 else
1522   case $MAGIC_CMD in
1523   /*)
1524   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
1525   ;;
1526   ?:/*)
1527   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
1528   ;;
1529   *)
1530   ac_save_MAGIC_CMD="$MAGIC_CMD"
1531   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1532   ac_dummy="/usr/bin:$PATH"
1533   for ac_dir in $ac_dummy; do
1534     test -z "$ac_dir" && ac_dir=.
1535     if test -f $ac_dir/file; then
1536       lt_cv_path_MAGIC_CMD="$ac_dir/file"
1537       if test -n "$file_magic_test_file"; then
1538         case $deplibs_check_method in
1539         "file_magic "*)
1540           file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
1541           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
1542           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
1543             egrep "$file_magic_regex" > /dev/null; then
1544             :
1545           else
1546             cat <<EOF 1>&2
1547
1548 *** Warning: the command libtool uses to detect shared libraries,
1549 *** $file_magic_cmd, produces output that libtool cannot recognize.
1550 *** The result is that libtool may fail to recognize shared libraries
1551 *** as such.  This will affect the creation of libtool libraries that
1552 *** depend on shared libraries, but programs linked with such libtool
1553 *** libraries will work regardless of this problem.  Nevertheless, you
1554 *** may want to report the problem to your system manager and/or to
1555 *** bug-libtool@gnu.org
1556
1557 EOF
1558           fi ;;
1559         esac
1560       fi
1561       break
1562     fi
1563   done
1564   IFS="$ac_save_ifs"
1565   MAGIC_CMD="$ac_save_MAGIC_CMD"
1566   ;;
1567 esac
1568 fi
1569
1570 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
1571 if test -n "$MAGIC_CMD"; then
1572   echo "$ac_t""$MAGIC_CMD" 1>&6
1573 else
1574   echo "$ac_t""no" 1>&6
1575 fi
1576
1577   else
1578     MAGIC_CMD=:
1579   fi
1580 fi
1581
1582   fi
1583   ;;
1584 esac
1585
1586 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
1587 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
1588 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1589 echo "configure:1590: checking for $ac_word" >&5
1590 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1591   echo $ac_n "(cached) $ac_c" 1>&6
1592 else
1593   if test -n "$RANLIB"; then
1594   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1595 else
1596   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1597   ac_dummy="$PATH"
1598   for ac_dir in $ac_dummy; do
1599     test -z "$ac_dir" && ac_dir=.
1600     if test -f $ac_dir/$ac_word; then
1601       ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
1602       break
1603     fi
1604   done
1605   IFS="$ac_save_ifs"
1606 fi
1607 fi
1608 RANLIB="$ac_cv_prog_RANLIB"
1609 if test -n "$RANLIB"; then
1610   echo "$ac_t""$RANLIB" 1>&6
1611 else
1612   echo "$ac_t""no" 1>&6
1613 fi
1614
1615
1616 if test -z "$ac_cv_prog_RANLIB"; then
1617 if test -n "$ac_tool_prefix"; then
1618   # Extract the first word of "ranlib", so it can be a program name with args.
1619 set dummy ranlib; ac_word=$2
1620 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1621 echo "configure:1622: checking for $ac_word" >&5
1622 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1623   echo $ac_n "(cached) $ac_c" 1>&6
1624 else
1625   if test -n "$RANLIB"; then
1626   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1627 else
1628   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1629   ac_dummy="$PATH"
1630   for ac_dir in $ac_dummy; do
1631     test -z "$ac_dir" && ac_dir=.
1632     if test -f $ac_dir/$ac_word; then
1633       ac_cv_prog_RANLIB="ranlib"
1634       break
1635     fi
1636   done
1637   IFS="$ac_save_ifs"
1638   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1639 fi
1640 fi
1641 RANLIB="$ac_cv_prog_RANLIB"
1642 if test -n "$RANLIB"; then
1643   echo "$ac_t""$RANLIB" 1>&6
1644 else
1645   echo "$ac_t""no" 1>&6
1646 fi
1647
1648 else
1649   RANLIB=":"
1650 fi
1651 fi
1652
1653 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
1654 set dummy ${ac_tool_prefix}strip; ac_word=$2
1655 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1656 echo "configure:1657: checking for $ac_word" >&5
1657 if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
1658   echo $ac_n "(cached) $ac_c" 1>&6
1659 else
1660   if test -n "$STRIP"; then
1661   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
1662 else
1663   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1664   ac_dummy="$PATH"
1665   for ac_dir in $ac_dummy; do
1666     test -z "$ac_dir" && ac_dir=.
1667     if test -f $ac_dir/$ac_word; then
1668       ac_cv_prog_STRIP="${ac_tool_prefix}strip"
1669       break
1670     fi
1671   done
1672   IFS="$ac_save_ifs"
1673 fi
1674 fi
1675 STRIP="$ac_cv_prog_STRIP"
1676 if test -n "$STRIP"; then
1677   echo "$ac_t""$STRIP" 1>&6
1678 else
1679   echo "$ac_t""no" 1>&6
1680 fi
1681
1682
1683 if test -z "$ac_cv_prog_STRIP"; then
1684 if test -n "$ac_tool_prefix"; then
1685   # Extract the first word of "strip", so it can be a program name with args.
1686 set dummy strip; ac_word=$2
1687 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1688 echo "configure:1689: checking for $ac_word" >&5
1689 if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
1690   echo $ac_n "(cached) $ac_c" 1>&6
1691 else
1692   if test -n "$STRIP"; then
1693   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
1694 else
1695   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1696   ac_dummy="$PATH"
1697   for ac_dir in $ac_dummy; do
1698     test -z "$ac_dir" && ac_dir=.
1699     if test -f $ac_dir/$ac_word; then
1700       ac_cv_prog_STRIP="strip"
1701       break
1702     fi
1703   done
1704   IFS="$ac_save_ifs"
1705   test -z "$ac_cv_prog_STRIP" && ac_cv_prog_STRIP=":"
1706 fi
1707 fi
1708 STRIP="$ac_cv_prog_STRIP"
1709 if test -n "$STRIP"; then
1710   echo "$ac_t""$STRIP" 1>&6
1711 else
1712   echo "$ac_t""no" 1>&6
1713 fi
1714
1715 else
1716   STRIP=":"
1717 fi
1718 fi
1719
1720
1721 # Check for any special flags to pass to ltconfig.
1722 libtool_flags="--cache-file=$cache_file"
1723 test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
1724 test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
1725 test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
1726 test "$GCC" = yes && libtool_flags="$libtool_flags --with-gcc"
1727 test "$lt_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
1728
1729
1730 # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
1731 if test "${enable_libtool_lock+set}" = set; then
1732   enableval="$enable_libtool_lock"
1733   :
1734 fi
1735
1736 test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
1737 test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
1738
1739 # Check whether --with-pic or --without-pic was given.
1740 if test "${with_pic+set}" = set; then
1741   withval="$with_pic"
1742   pic_mode="$withval"
1743 else
1744   pic_mode=default
1745 fi
1746
1747 test x"$pic_mode" = xyes && libtool_flags="$libtool_flags --prefer-pic"
1748 test x"$pic_mode" = xno && libtool_flags="$libtool_flags --prefer-non-pic"
1749
1750 # Some flags need to be propagated to the compiler or linker for good
1751 # libtool support.
1752 case $host in
1753 *-*-irix6*)
1754   # Find out which ABI we are using.
1755   echo '#line 1756 "configure"' > conftest.$ac_ext
1756   if { (eval echo configure:1757: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1757    if test "$lt_cv_prog_gnu_ld" = yes; then
1758     case `/usr/bin/file conftest.$ac_objext` in
1759     *32-bit*)
1760       LD="${LD-ld} -melf32bsmip"
1761       ;;
1762     *N32*)
1763       LD="${LD-ld} -melf32bmipn32"
1764       ;;
1765     *64-bit*)
1766       LD="${LD-ld} -melf64bmip"
1767       ;;
1768     esac
1769    else
1770     case `/usr/bin/file conftest.$ac_objext` in
1771     *32-bit*)
1772       LD="${LD-ld} -32"
1773       ;;
1774     *N32*)
1775       LD="${LD-ld} -n32"
1776       ;;
1777     *64-bit*)
1778       LD="${LD-ld} -64"
1779       ;;
1780     esac
1781    fi
1782   fi
1783   rm -rf conftest*
1784   ;;
1785
1786 ia64-*-hpux*)
1787   # Find out which ABI we are using.
1788   echo 'int i;' > conftest.$ac_ext
1789   if { (eval echo configure:1790: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1790     case "`/usr/bin/file conftest.o`" in
1791     *ELF-32*)
1792       HPUX_IA64_MODE="32"
1793       ;;
1794     *ELF-64*)
1795       HPUX_IA64_MODE="64"
1796       ;;
1797     esac
1798   fi
1799   rm -rf conftest*
1800   ;;
1801
1802 x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
1803   # Find out which ABI we are using.
1804   echo 'int i;' > conftest.$ac_ext
1805   if { (eval echo configure:1806: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1806     case "`/usr/bin/file conftest.o`" in
1807     *32-bit*)
1808       case $host in
1809         x86_64-*linux*)
1810           LD="${LD-ld} -m elf_i386"
1811           ;;
1812         ppc64-*linux*|powerpc64-*linux*)
1813           LD="${LD-ld} -m elf32ppclinux"
1814           ;;
1815         s390x-*linux*)
1816           LD="${LD-ld} -m elf_s390"
1817           ;;
1818         sparc64-*linux*)
1819           LD="${LD-ld} -m elf32_sparc"
1820           ;;
1821       esac
1822       ;;
1823     *64-bit*)
1824       case $host in
1825         x86_64-*linux*)
1826           LD="${LD-ld} -m elf_x86_64"
1827           ;;
1828         ppc*-*linux*|powerpc*-*linux*)
1829           LD="${LD-ld} -m elf64ppc"
1830           ;;
1831         s390*-*linux*)
1832           LD="${LD-ld} -m elf64_s390"
1833           ;;
1834         sparc*-*linux*)
1835           LD="${LD-ld} -m elf64_sparc"
1836           ;;
1837       esac
1838       ;;
1839     esac
1840   fi
1841   rm -rf conftest*
1842   ;;
1843
1844 *-*-sco3.2v5*)
1845   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
1846   SAVE_CFLAGS="$CFLAGS"
1847   CFLAGS="$CFLAGS -belf"
1848   echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
1849 echo "configure:1850: checking whether the C compiler needs -belf" >&5
1850 if eval "test \"`echo '$''{'lt_cv_cc_needs_belf'+set}'`\" = set"; then
1851   echo $ac_n "(cached) $ac_c" 1>&6
1852 else
1853   
1854      ac_ext=c
1855 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1856 ac_cpp='$CPP $CPPFLAGS'
1857 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1858 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1859 cross_compiling=$ac_cv_prog_cc_cross
1860
1861      cat > conftest.$ac_ext <<EOF
1862 #line 1863 "configure"
1863 #include "confdefs.h"
1864
1865 int main() {
1866
1867 ; return 0; }
1868 EOF
1869 if { (eval echo configure:1870: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1870   rm -rf conftest*
1871   lt_cv_cc_needs_belf=yes
1872 else
1873   echo "configure: failed program was:" >&5
1874   cat conftest.$ac_ext >&5
1875   rm -rf conftest*
1876   lt_cv_cc_needs_belf=no
1877 fi
1878 rm -f conftest*
1879      ac_ext=c
1880 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1881 ac_cpp='$CPP $CPPFLAGS'
1882 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1883 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1884 cross_compiling=$ac_cv_prog_cc_cross
1885
1886 fi
1887
1888 echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
1889   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
1890     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
1891     CFLAGS="$SAVE_CFLAGS"
1892   fi
1893   ;;
1894
1895
1896 esac
1897
1898
1899 # Save cache, so that ltconfig can load it
1900 cat > confcache <<\EOF
1901 # This file is a shell script that caches the results of configure
1902 # tests run on this system so they can be shared between configure
1903 # scripts and configure runs.  It is not useful on other systems.
1904 # If it contains results you don't want to keep, you may remove or edit it.
1905 #
1906 # By default, configure uses ./config.cache as the cache file,
1907 # creating it if it does not exist already.  You can give configure
1908 # the --cache-file=FILE option to use a different cache file; that is
1909 # what configure does when it calls configure scripts in
1910 # subdirectories, so they share the cache.
1911 # Giving --cache-file=/dev/null disables caching, for debugging configure.
1912 # config.status only pays attention to the cache file if you give it the
1913 # --recheck option to rerun configure.
1914 #
1915 EOF
1916 # The following way of writing the cache mishandles newlines in values,
1917 # but we know of no workaround that is simple, portable, and efficient.
1918 # So, don't put newlines in cache variables' values.
1919 # Ultrix sh set writes to stderr and can't be redirected directly,
1920 # and sets the high bit in the cache file unless we assign to the vars.
1921 (set) 2>&1 |
1922   case `(ac_space=' '; set | grep ac_space) 2>&1` in
1923   *ac_space=\ *)
1924     # `set' does not quote correctly, so add quotes (double-quote substitution
1925     # turns \\\\ into \\, and sed turns \\ into \).
1926     sed -n \
1927       -e "s/'/'\\\\''/g" \
1928       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
1929     ;;
1930   *)
1931     # `set' quotes correctly as required by POSIX, so do not add quotes.
1932     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
1933     ;;
1934   esac >> confcache
1935 if cmp -s $cache_file confcache; then
1936   :
1937 else
1938   if test -w $cache_file; then
1939     echo "updating cache $cache_file"
1940     cat confcache > $cache_file
1941   else
1942     echo "not updating unwritable cache $cache_file"
1943   fi
1944 fi
1945 rm -f confcache
1946
1947
1948 # Actually configure libtool.  ac_aux_dir is where install-sh is found.
1949 AR="$AR" LTCC="$CC" CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
1950 MAGIC_CMD="$MAGIC_CMD" LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
1951 LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" STRIP="$STRIP" \
1952 AS="$AS" DLLTOOL="$DLLTOOL" OBJDUMP="$OBJDUMP" \
1953 objext="$OBJEXT" exeext="$EXEEXT" reload_flag="$reload_flag" \
1954 deplibs_check_method="$deplibs_check_method" file_magic_cmd="$file_magic_cmd" \
1955 ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
1956 $libtool_flags --no-verify --build="$build" $ac_aux_dir/ltmain.sh $host \
1957 || { echo "configure: error: libtool configure failed" 1>&2; exit 1; }
1958
1959 # Reload cache, that may have been modified by ltconfig
1960 if test -r "$cache_file"; then
1961   echo "loading cache $cache_file"
1962   . $cache_file
1963 else
1964   echo "creating cache $cache_file"
1965   > $cache_file
1966 fi
1967
1968
1969 # This can be used to rebuild libtool when needed
1970 LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh $ac_aux_dir/ltcf-c.sh"
1971
1972 # Always use our own libtool.
1973 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
1974
1975 # Redirect the config.log output again, so that the ltconfig log is not
1976 # clobbered by the next message.
1977 exec 5>>./config.log
1978
1979   
1980
1981   
1982          
1983          
1984
1985 # Find a good install program.  We prefer a C program (faster),
1986 # so one script is as good as another.  But avoid the broken or
1987 # incompatible versions:
1988 # SysV /etc/install, /usr/sbin/install
1989 # SunOS /usr/etc/install
1990 # IRIX /sbin/install
1991 # AIX /bin/install
1992 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
1993 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
1994 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1995 # ./install, which can be erroneously created by make from ./install.sh.
1996 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
1997 echo "configure:1998: checking for a BSD compatible install" >&5
1998 if test -z "$INSTALL"; then
1999 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
2000   echo $ac_n "(cached) $ac_c" 1>&6
2001 else
2002     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
2003   for ac_dir in $PATH; do
2004     # Account for people who put trailing slashes in PATH elements.
2005     case "$ac_dir/" in
2006     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
2007     *)
2008       # OSF1 and SCO ODT 3.0 have their own names for install.
2009       # Don't use installbsd from OSF since it installs stuff as root
2010       # by default.
2011       for ac_prog in ginstall scoinst install; do
2012         if test -f $ac_dir/$ac_prog; then
2013           if test $ac_prog = install &&
2014             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
2015             # AIX install.  It has an incompatible calling convention.
2016             :
2017           else
2018             ac_cv_path_install="$ac_dir/$ac_prog -c"
2019             break 2
2020           fi
2021         fi
2022       done
2023       ;;
2024     esac
2025   done
2026   IFS="$ac_save_IFS"
2027
2028 fi
2029   if test "${ac_cv_path_install+set}" = set; then
2030     INSTALL="$ac_cv_path_install"
2031   else
2032     # As a last resort, use the slow shell script.  We don't cache a
2033     # path for INSTALL within a source directory, because that will
2034     # break other packages using the cache if that directory is
2035     # removed, or if the path is relative.
2036     INSTALL="$ac_install_sh"
2037   fi
2038 fi
2039 echo "$ac_t""$INSTALL" 1>&6
2040
2041 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2042 # It thinks the first close brace ends the variable substitution.
2043 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2044
2045 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
2046
2047 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2048
2049 echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
2050 echo "configure:2051: checking whether build environment is sane" >&5
2051 # Just in case
2052 sleep 1
2053 echo timestamp > conftestfile
2054 # Do `set' in a subshell so we don't clobber the current shell's
2055 # arguments.  Must try -L first in case configure is actually a
2056 # symlink; some systems play weird games with the mod time of symlinks
2057 # (eg FreeBSD returns the mod time of the symlink's containing
2058 # directory).
2059 if (
2060    set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
2061    if test "$*" = "X"; then
2062       # -L didn't work.
2063       set X `ls -t $srcdir/configure conftestfile`
2064    fi
2065    if test "$*" != "X $srcdir/configure conftestfile" \
2066       && test "$*" != "X conftestfile $srcdir/configure"; then
2067
2068       # If neither matched, then we have a broken ls.  This can happen
2069       # if, for instance, CONFIG_SHELL is bash and it inherits a
2070       # broken ls alias from the environment.  This has actually
2071       # happened.  Such a system could not be considered "sane".
2072       { echo "configure: error: ls -t appears to fail.  Make sure there is not a broken
2073 alias in your environment" 1>&2; exit 1; }
2074    fi
2075
2076    test "$2" = conftestfile
2077    )
2078 then
2079    # Ok.
2080    :
2081 else
2082    { echo "configure: error: newly created file is older than distributed files!
2083 Check your system clock" 1>&2; exit 1; }
2084 fi
2085 rm -f conftest*
2086 echo "$ac_t""yes" 1>&6
2087 if test "$program_transform_name" = s,x,x,; then
2088   program_transform_name=
2089 else
2090   # Double any \ or $.  echo might interpret backslashes.
2091   cat <<\EOF_SED > conftestsed
2092 s,\\,\\\\,g; s,\$,$$,g
2093 EOF_SED
2094   program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
2095   rm -f conftestsed
2096 fi
2097 test "$program_prefix" != NONE &&
2098   program_transform_name="s,^,${program_prefix},; $program_transform_name"
2099 # Use a double $ so make ignores it.
2100 test "$program_suffix" != NONE &&
2101   program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
2102
2103 # sed with no file args requires a program.
2104 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
2105
2106 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
2107 echo "configure:2108: checking whether ${MAKE-make} sets \${MAKE}" >&5
2108 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
2109 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
2110   echo $ac_n "(cached) $ac_c" 1>&6
2111 else
2112   cat > conftestmake <<\EOF
2113 all:
2114         @echo 'ac_maketemp="${MAKE}"'
2115 EOF
2116 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
2117 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
2118 if test -n "$ac_maketemp"; then
2119   eval ac_cv_prog_make_${ac_make}_set=yes
2120 else
2121   eval ac_cv_prog_make_${ac_make}_set=no
2122 fi
2123 rm -f conftestmake
2124 fi
2125 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
2126   echo "$ac_t""yes" 1>&6
2127   SET_MAKE=
2128 else
2129   echo "$ac_t""no" 1>&6
2130   SET_MAKE="MAKE=${MAKE-make}"
2131 fi
2132
2133
2134 PACKAGE=libffi
2135
2136 VERSION=2.00-beta
2137
2138 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
2139   { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
2140 fi
2141
2142
2143
2144 missing_dir=`cd $ac_aux_dir && pwd`
2145 echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
2146 echo "configure:2147: checking for working aclocal" >&5
2147 # Run test in a subshell; some versions of sh will print an error if
2148 # an executable is not found, even if stderr is redirected.
2149 # Redirect stdin to placate older versions of autoconf.  Sigh.
2150 if (aclocal --version) < /dev/null > /dev/null 2>&1; then
2151    ACLOCAL=aclocal
2152    echo "$ac_t""found" 1>&6
2153 else
2154    ACLOCAL="$missing_dir/missing aclocal"
2155    echo "$ac_t""missing" 1>&6
2156 fi
2157
2158 echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
2159 echo "configure:2160: checking for working autoconf" >&5
2160 # Run test in a subshell; some versions of sh will print an error if
2161 # an executable is not found, even if stderr is redirected.
2162 # Redirect stdin to placate older versions of autoconf.  Sigh.
2163 if (autoconf --version) < /dev/null > /dev/null 2>&1; then
2164    AUTOCONF=autoconf
2165    echo "$ac_t""found" 1>&6
2166 else
2167    AUTOCONF="$missing_dir/missing autoconf"
2168    echo "$ac_t""missing" 1>&6
2169 fi
2170
2171 echo $ac_n "checking for working automake""... $ac_c" 1>&6
2172 echo "configure:2173: checking for working automake" >&5
2173 # Run test in a subshell; some versions of sh will print an error if
2174 # an executable is not found, even if stderr is redirected.
2175 # Redirect stdin to placate older versions of autoconf.  Sigh.
2176 if (automake --version) < /dev/null > /dev/null 2>&1; then
2177    AUTOMAKE=automake
2178    echo "$ac_t""found" 1>&6
2179 else
2180    AUTOMAKE="$missing_dir/missing automake"
2181    echo "$ac_t""missing" 1>&6
2182 fi
2183
2184 echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
2185 echo "configure:2186: checking for working autoheader" >&5
2186 # Run test in a subshell; some versions of sh will print an error if
2187 # an executable is not found, even if stderr is redirected.
2188 # Redirect stdin to placate older versions of autoconf.  Sigh.
2189 if (autoheader --version) < /dev/null > /dev/null 2>&1; then
2190    AUTOHEADER=autoheader
2191    echo "$ac_t""found" 1>&6
2192 else
2193    AUTOHEADER="$missing_dir/missing autoheader"
2194    echo "$ac_t""missing" 1>&6
2195 fi
2196
2197 echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
2198 echo "configure:2199: checking for working makeinfo" >&5
2199 # Run test in a subshell; some versions of sh will print an error if
2200 # an executable is not found, even if stderr is redirected.
2201 # Redirect stdin to placate older versions of autoconf.  Sigh.
2202 if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
2203    MAKEINFO=makeinfo
2204    echo "$ac_t""found" 1>&6
2205 else
2206    MAKEINFO="$missing_dir/missing makeinfo"
2207    echo "$ac_t""missing" 1>&6
2208 fi
2209
2210
2211
2212
2213
2214 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
2215 echo "configure:2216: checking for executable suffix" >&5
2216 if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
2217   echo $ac_n "(cached) $ac_c" 1>&6
2218 else
2219   if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
2220   ac_cv_exeext=.exe
2221 else
2222   rm -f conftest*
2223   echo 'int main () { return 0; }' > conftest.$ac_ext
2224   ac_cv_exeext=
2225   if { (eval echo configure:2226: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
2226     for file in conftest.*; do
2227       case $file in
2228       *.c | *.o | *.obj) ;;
2229       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
2230       esac
2231     done
2232   else
2233     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
2234   fi
2235   rm -f conftest*
2236   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
2237 fi
2238 fi
2239
2240 EXEEXT=""
2241 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
2242 echo "$ac_t""${ac_cv_exeext}" 1>&6
2243 ac_exeext=$EXEEXT
2244
2245 echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
2246 echo "configure:2247: checking whether to enable maintainer-specific portions of Makefiles" >&5
2247     # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
2248 if test "${enable_maintainer_mode+set}" = set; then
2249   enableval="$enable_maintainer_mode"
2250   USE_MAINTAINER_MODE=$enableval
2251 else
2252   USE_MAINTAINER_MODE=no
2253 fi
2254
2255   echo "$ac_t""$USE_MAINTAINER_MODE" 1>&6
2256   
2257
2258 if test $USE_MAINTAINER_MODE = yes; then
2259   MAINTAINER_MODE_TRUE=
2260   MAINTAINER_MODE_FALSE='#'
2261 else
2262   MAINTAINER_MODE_TRUE='#'
2263   MAINTAINER_MODE_FALSE=
2264 fi
2265   MAINT=$MAINTAINER_MODE_TRUE
2266   
2267
2268
2269 # Extract the first word of "gcc", so it can be a program name with args.
2270 set dummy gcc; ac_word=$2
2271 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2272 echo "configure:2273: checking for $ac_word" >&5
2273 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
2274   echo $ac_n "(cached) $ac_c" 1>&6
2275 else
2276   if test -n "$CC"; then
2277   ac_cv_prog_CC="$CC" # Let the user override the test.
2278 else
2279   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2280   ac_dummy="$PATH"
2281   for ac_dir in $ac_dummy; do
2282     test -z "$ac_dir" && ac_dir=.
2283     if test -f $ac_dir/$ac_word; then
2284       ac_cv_prog_CC="gcc"
2285       break
2286     fi
2287   done
2288   IFS="$ac_save_ifs"
2289 fi
2290 fi
2291 CC="$ac_cv_prog_CC"
2292 if test -n "$CC"; then
2293   echo "$ac_t""$CC" 1>&6
2294 else
2295   echo "$ac_t""no" 1>&6
2296 fi
2297
2298 if test -z "$CC"; then
2299   # Extract the first word of "cc", so it can be a program name with args.
2300 set dummy cc; ac_word=$2
2301 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2302 echo "configure:2303: checking for $ac_word" >&5
2303 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
2304   echo $ac_n "(cached) $ac_c" 1>&6
2305 else
2306   if test -n "$CC"; then
2307   ac_cv_prog_CC="$CC" # Let the user override the test.
2308 else
2309   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2310   ac_prog_rejected=no
2311   ac_dummy="$PATH"
2312   for ac_dir in $ac_dummy; do
2313     test -z "$ac_dir" && ac_dir=.
2314     if test -f $ac_dir/$ac_word; then
2315       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
2316         ac_prog_rejected=yes
2317         continue
2318       fi
2319       ac_cv_prog_CC="cc"
2320       break
2321     fi
2322   done
2323   IFS="$ac_save_ifs"
2324 if test $ac_prog_rejected = yes; then
2325   # We found a bogon in the path, so make sure we never use it.
2326   set dummy $ac_cv_prog_CC
2327   shift
2328   if test $# -gt 0; then
2329     # We chose a different compiler from the bogus one.
2330     # However, it has the same basename, so the bogon will be chosen
2331     # first if we set CC to just the basename; use the full file name.
2332     shift
2333     set dummy "$ac_dir/$ac_word" "$@"
2334     shift
2335     ac_cv_prog_CC="$@"
2336   fi
2337 fi
2338 fi
2339 fi
2340 CC="$ac_cv_prog_CC"
2341 if test -n "$CC"; then
2342   echo "$ac_t""$CC" 1>&6
2343 else
2344   echo "$ac_t""no" 1>&6
2345 fi
2346
2347   if test -z "$CC"; then
2348     case "`uname -s`" in
2349     *win32* | *WIN32*)
2350       # Extract the first word of "cl", so it can be a program name with args.
2351 set dummy cl; ac_word=$2
2352 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2353 echo "configure:2354: checking for $ac_word" >&5
2354 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
2355   echo $ac_n "(cached) $ac_c" 1>&6
2356 else
2357   if test -n "$CC"; then
2358   ac_cv_prog_CC="$CC" # Let the user override the test.
2359 else
2360   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2361   ac_dummy="$PATH"
2362   for ac_dir in $ac_dummy; do
2363     test -z "$ac_dir" && ac_dir=.
2364     if test -f $ac_dir/$ac_word; then
2365       ac_cv_prog_CC="cl"
2366       break
2367     fi
2368   done
2369   IFS="$ac_save_ifs"
2370 fi
2371 fi
2372 CC="$ac_cv_prog_CC"
2373 if test -n "$CC"; then
2374   echo "$ac_t""$CC" 1>&6
2375 else
2376   echo "$ac_t""no" 1>&6
2377 fi
2378  ;;
2379     esac
2380   fi
2381   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
2382 fi
2383
2384 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
2385 echo "configure:2386: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
2386
2387 ac_ext=c
2388 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2389 ac_cpp='$CPP $CPPFLAGS'
2390 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2391 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2392 cross_compiling=$ac_cv_prog_cc_cross
2393
2394 cat > conftest.$ac_ext << EOF
2395
2396 #line 2397 "configure"
2397 #include "confdefs.h"
2398
2399 main(){return(0);}
2400 EOF
2401 if { (eval echo configure:2402: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2402   ac_cv_prog_cc_works=yes
2403   # If we can't run a trivial program, we are probably using a cross compiler.
2404   if (./conftest; exit) 2>/dev/null; then
2405     ac_cv_prog_cc_cross=no
2406   else
2407     ac_cv_prog_cc_cross=yes
2408   fi
2409 else
2410   echo "configure: failed program was:" >&5
2411   cat conftest.$ac_ext >&5
2412   ac_cv_prog_cc_works=no
2413 fi
2414 rm -fr conftest*
2415 ac_ext=c
2416 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2417 ac_cpp='$CPP $CPPFLAGS'
2418 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2419 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2420 cross_compiling=$ac_cv_prog_cc_cross
2421
2422 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
2423 if test $ac_cv_prog_cc_works = no; then
2424   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
2425 fi
2426 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
2427 echo "configure:2428: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
2428 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
2429 cross_compiling=$ac_cv_prog_cc_cross
2430
2431 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
2432 echo "configure:2433: checking whether we are using GNU C" >&5
2433 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
2434   echo $ac_n "(cached) $ac_c" 1>&6
2435 else
2436   cat > conftest.c <<EOF
2437 #ifdef __GNUC__
2438   yes;
2439 #endif
2440 EOF
2441 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2442: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
2442   ac_cv_prog_gcc=yes
2443 else
2444   ac_cv_prog_gcc=no
2445 fi
2446 fi
2447
2448 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
2449
2450 if test $ac_cv_prog_gcc = yes; then
2451   GCC=yes
2452 else
2453   GCC=
2454 fi
2455
2456 ac_test_CFLAGS="${CFLAGS+set}"
2457 ac_save_CFLAGS="$CFLAGS"
2458 CFLAGS=
2459 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
2460 echo "configure:2461: checking whether ${CC-cc} accepts -g" >&5
2461 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
2462   echo $ac_n "(cached) $ac_c" 1>&6
2463 else
2464   echo 'void f(){}' > conftest.c
2465 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
2466   ac_cv_prog_cc_g=yes
2467 else
2468   ac_cv_prog_cc_g=no
2469 fi
2470 rm -f conftest*
2471
2472 fi
2473
2474 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
2475 if test "$ac_test_CFLAGS" = set; then
2476   CFLAGS="$ac_save_CFLAGS"
2477 elif test $ac_cv_prog_cc_g = yes; then
2478   if test "$GCC" = yes; then
2479     CFLAGS="-g -O2"
2480   else
2481     CFLAGS="-g"
2482   fi
2483 else
2484   if test "$GCC" = yes; then
2485     CFLAGS="-O2"
2486   else
2487     CFLAGS=
2488   fi
2489 fi
2490
2491
2492   
2493
2494   
2495          
2496          
2497
2498
2499
2500 if test -d $srcdir/testsuite; then
2501   TESTSUBDIR_TRUE=
2502   TESTSUBDIR_FALSE='#'
2503 else
2504   TESTSUBDIR_TRUE='#'
2505   TESTSUBDIR_FALSE=
2506 fi
2507
2508
2509 TARGETDIR="unknown"
2510 case "$host" in
2511 mips-sgi-irix5.* | mips-sgi-irix6.*) TARGET=MIPS; TARGETDIR=mips;;
2512 i*86-*-linux*) TARGET=X86; TARGETDIR=x86;;
2513 i*86-*-solaris*) TARGET=X86; TARGETDIR=x86;;
2514 i*86-*-beos*) TARGET=X86; TARGETDIR=x86;;
2515 i*86-*-freebsd*) TARGET=X86; TARGETDIR=x86;;
2516 i*86-*-netbsdelf*) TARGET=X86; TARGETDIR=x86;;
2517 i*86-*-win32*) TARGET=X86_WIN32; TARGETDIR=x86;;
2518 i*86-*-cygwin*) TARGET=X86_WIN32; TARGETDIR=x86;;
2519 i*86-*-mingw*) TARGET=X86_WIN32; TARGETDIR=x86;;
2520 sparc-sun-4*) TARGET=SPARC; TARGETDIR=sparc;;
2521 sparc*-sun-*) TARGET=SPARC; TARGETDIR=sparc;;
2522 sparc-*-linux* | sparc-*-netbsdelf*) TARGET=SPARC; TARGETDIR=sparc;;
2523 sparc64-*-linux* | sparc64-*-netbsd*) TARGET=SPARC; TARGETDIR=sparc;;
2524 alpha*-*-linux* | alpha*-*-osf* | alpha*-*-freebsd* | alpha*-*-netbsd*) TARGET=ALPHA; TARGETDIR=alpha;;
2525 ia64*-*-*) TARGET=IA64; TARGETDIR=ia64;;
2526 m68k-*-linux*) TARGET=M68K; TARGETDIR=m68k;;
2527 mips64*-*);;
2528 mips*-*-linux*) TARGET=MIPS_LINUX; TARGETDIR=mips;;
2529 powerpc*-*-linux* | powerpc-*-sysv*) TARGET=POWERPC; TARGETDIR=powerpc;;
2530 powerpc-*-beos*) TARGET=POWERPC; TARGETDIR=powerpc;;
2531 powerpc-*-darwin*) TARGET=POWERPC_DARWIN; TARGETDIR=powerpc;;
2532 powerpc-*-aix*) TARGET=POWERPC_AIX; TARGETDIR=powerpc;;
2533 rs6000-*-aix*) TARGET=POWERPC_AIX; TARGETDIR=powerpc;;
2534 arm*-*-linux-*) TARGET=ARM; TARGETDIR=arm;;
2535 arm*-*-netbsdelf*) TARGET=ARM; TARGETDIR=arm;;
2536 s390-*-linux-*) TARGET=S390; TARGETDIR=s390;;
2537 s390x-*-linux-*) TARGET=S390; TARGETDIR=s390;;
2538 x86_64-*-linux*) TARGET=X86_64; TARGETDIR=x86;;
2539 sh-*-linux* | sh[34]*-*-linux*) TARGET=SH; TARGETDIR=sh;;
2540 sh64-*-linux* | sh5*-*-linux*) TARGET=SH64; TARGETDIR=sh64;;
2541 esac
2542
2543
2544
2545 if test $TARGETDIR = unknown; then
2546   { echo "configure: error: "libffi has not been ported to $host."" 1>&2; exit 1; }
2547 fi
2548
2549
2550
2551 if test ${TARGET}${ac_cv_prog_gcc} = MIPSyes; then
2552   MIPS_GCC_TRUE=
2553   MIPS_GCC_FALSE='#'
2554 else
2555   MIPS_GCC_TRUE='#'
2556   MIPS_GCC_FALSE=
2557 fi
2558
2559
2560 if test ${TARGET}${ac_cv_prog_gcc} = MIPSno; then
2561   MIPS_SGI_TRUE=
2562   MIPS_SGI_FALSE='#'
2563 else
2564   MIPS_SGI_TRUE='#'
2565   MIPS_SGI_FALSE=
2566 fi
2567
2568
2569 if test x$TARGET = xMIPS_LINUX; then
2570   MIPS_LINUX_TRUE=
2571   MIPS_LINUX_FALSE='#'
2572 else
2573   MIPS_LINUX_TRUE='#'
2574   MIPS_LINUX_FALSE=
2575 fi
2576
2577
2578 if test x$TARGET = xSPARC; then
2579   SPARC_TRUE=
2580   SPARC_FALSE='#'
2581 else
2582   SPARC_TRUE='#'
2583   SPARC_FALSE=
2584 fi
2585
2586
2587 if test x$TARGET = xX86; then
2588   X86_TRUE=
2589   X86_FALSE='#'
2590 else
2591   X86_TRUE='#'
2592   X86_FALSE=
2593 fi
2594
2595
2596 if test x$TARGET = xX86_WIN32; then
2597   X86_WIN32_TRUE=
2598   X86_WIN32_FALSE='#'
2599 else
2600   X86_WIN32_TRUE='#'
2601   X86_WIN32_FALSE=
2602 fi
2603
2604
2605 if test x$TARGET = xALPHA; then
2606   ALPHA_TRUE=
2607   ALPHA_FALSE='#'
2608 else
2609   ALPHA_TRUE='#'
2610   ALPHA_FALSE=
2611 fi
2612
2613
2614 if test x$TARGET = xIA64; then
2615   IA64_TRUE=
2616   IA64_FALSE='#'
2617 else
2618   IA64_TRUE='#'
2619   IA64_FALSE=
2620 fi
2621
2622
2623 if test x$TARGET = xM68K; then
2624   M68K_TRUE=
2625   M68K_FALSE='#'
2626 else
2627   M68K_TRUE='#'
2628   M68K_FALSE=
2629 fi
2630
2631
2632 if test x$TARGET = xPOWERPC; then
2633   POWERPC_TRUE=
2634   POWERPC_FALSE='#'
2635 else
2636   POWERPC_TRUE='#'
2637   POWERPC_FALSE=
2638 fi
2639
2640
2641 if test x$TARGET = xPOWERPC_AIX; then
2642   POWERPC_AIX_TRUE=
2643   POWERPC_AIX_FALSE='#'
2644 else
2645   POWERPC_AIX_TRUE='#'
2646   POWERPC_AIX_FALSE=
2647 fi
2648
2649
2650 if test x$TARGET = xPOWERPC_DARWIN; then
2651   POWERPC_DARWIN_TRUE=
2652   POWERPC_DARWIN_FALSE='#'
2653 else
2654   POWERPC_DARWIN_TRUE='#'
2655   POWERPC_DARWIN_FALSE=
2656 fi
2657
2658
2659 if test x$TARGET = xARM; then
2660   ARM_TRUE=
2661   ARM_FALSE='#'
2662 else
2663   ARM_TRUE='#'
2664   ARM_FALSE=
2665 fi
2666
2667
2668 if test x$TARGET = xS390; then
2669   S390_TRUE=
2670   S390_FALSE='#'
2671 else
2672   S390_TRUE='#'
2673   S390_FALSE=
2674 fi
2675
2676
2677 if test x$TARGET = xX86_64; then
2678   X86_64_TRUE=
2679   X86_64_FALSE='#'
2680 else
2681   X86_64_TRUE='#'
2682   X86_64_FALSE=
2683 fi
2684
2685
2686 if test x$TARGET = xSH; then
2687   SH_TRUE=
2688   SH_FALSE='#'
2689 else
2690   SH_TRUE='#'
2691   SH_FALSE=
2692 fi
2693
2694
2695 if test x$TARGET = xSH64; then
2696   SH64_TRUE=
2697   SH64_FALSE='#'
2698 else
2699   SH64_TRUE='#'
2700   SH64_FALSE=
2701 fi
2702
2703 if test x$TARGET = xMIPS_LINUX; then
2704   TARGET=MIPS
2705 fi
2706
2707 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
2708 echo "configure:2709: checking how to run the C preprocessor" >&5
2709 # On Suns, sometimes $CPP names a directory.
2710 if test -n "$CPP" && test -d "$CPP"; then
2711   CPP=
2712 fi
2713 if test -z "$CPP"; then
2714 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
2715   echo $ac_n "(cached) $ac_c" 1>&6
2716 else
2717     # This must be in double quotes, not single quotes, because CPP may get
2718   # substituted into the Makefile and "${CC-cc}" will confuse make.
2719   CPP="${CC-cc} -E"
2720   # On the NeXT, cc -E runs the code through the compiler's parser,
2721   # not just through cpp.
2722   cat > conftest.$ac_ext <<EOF
2723 #line 2724 "configure"
2724 #include "confdefs.h"
2725 #include <assert.h>
2726 Syntax Error
2727 EOF
2728 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2729 { (eval echo configure:2730: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2730 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2731 if test -z "$ac_err"; then
2732   :
2733 else
2734   echo "$ac_err" >&5
2735   echo "configure: failed program was:" >&5
2736   cat conftest.$ac_ext >&5
2737   rm -rf conftest*
2738   CPP="${CC-cc} -E -traditional-cpp"
2739   cat > conftest.$ac_ext <<EOF
2740 #line 2741 "configure"
2741 #include "confdefs.h"
2742 #include <assert.h>
2743 Syntax Error
2744 EOF
2745 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2746 { (eval echo configure:2747: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2747 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2748 if test -z "$ac_err"; then
2749   :
2750 else
2751   echo "$ac_err" >&5
2752   echo "configure: failed program was:" >&5
2753   cat conftest.$ac_ext >&5
2754   rm -rf conftest*
2755   CPP="${CC-cc} -nologo -E"
2756   cat > conftest.$ac_ext <<EOF
2757 #line 2758 "configure"
2758 #include "confdefs.h"
2759 #include <assert.h>
2760 Syntax Error
2761 EOF
2762 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2763 { (eval echo configure:2764: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2764 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2765 if test -z "$ac_err"; then
2766   :
2767 else
2768   echo "$ac_err" >&5
2769   echo "configure: failed program was:" >&5
2770   cat conftest.$ac_ext >&5
2771   rm -rf conftest*
2772   CPP=/lib/cpp
2773 fi
2774 rm -f conftest*
2775 fi
2776 rm -f conftest*
2777 fi
2778 rm -f conftest*
2779   ac_cv_prog_CPP="$CPP"
2780 fi
2781   CPP="$ac_cv_prog_CPP"
2782 else
2783   ac_cv_prog_CPP="$CPP"
2784 fi
2785 echo "$ac_t""$CPP" 1>&6
2786
2787 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
2788 echo "configure:2789: checking for ANSI C header files" >&5
2789 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
2790   echo $ac_n "(cached) $ac_c" 1>&6
2791 else
2792   cat > conftest.$ac_ext <<EOF
2793 #line 2794 "configure"
2794 #include "confdefs.h"
2795 #include <stdlib.h>
2796 #include <stdarg.h>
2797 #include <string.h>
2798 #include <float.h>
2799 EOF
2800 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2801 { (eval echo configure:2802: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2802 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2803 if test -z "$ac_err"; then
2804   rm -rf conftest*
2805   ac_cv_header_stdc=yes
2806 else
2807   echo "$ac_err" >&5
2808   echo "configure: failed program was:" >&5
2809   cat conftest.$ac_ext >&5
2810   rm -rf conftest*
2811   ac_cv_header_stdc=no
2812 fi
2813 rm -f conftest*
2814
2815 if test $ac_cv_header_stdc = yes; then
2816   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
2817 cat > conftest.$ac_ext <<EOF
2818 #line 2819 "configure"
2819 #include "confdefs.h"
2820 #include <string.h>
2821 EOF
2822 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2823   egrep "memchr" >/dev/null 2>&1; then
2824   :
2825 else
2826   rm -rf conftest*
2827   ac_cv_header_stdc=no
2828 fi
2829 rm -f conftest*
2830
2831 fi
2832
2833 if test $ac_cv_header_stdc = yes; then
2834   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
2835 cat > conftest.$ac_ext <<EOF
2836 #line 2837 "configure"
2837 #include "confdefs.h"
2838 #include <stdlib.h>
2839 EOF
2840 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2841   egrep "free" >/dev/null 2>&1; then
2842   :
2843 else
2844   rm -rf conftest*
2845   ac_cv_header_stdc=no
2846 fi
2847 rm -f conftest*
2848
2849 fi
2850
2851 if test $ac_cv_header_stdc = yes; then
2852   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
2853 if test "$cross_compiling" = yes; then
2854   :
2855 else
2856   cat > conftest.$ac_ext <<EOF
2857 #line 2858 "configure"
2858 #include "confdefs.h"
2859 #include <ctype.h>
2860 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
2861 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
2862 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
2863 int main () { int i; for (i = 0; i < 256; i++)
2864 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
2865 exit (0); }
2866
2867 EOF
2868 if { (eval echo configure:2869: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2869 then
2870   :
2871 else
2872   echo "configure: failed program was:" >&5
2873   cat conftest.$ac_ext >&5
2874   rm -fr conftest*
2875   ac_cv_header_stdc=no
2876 fi
2877 rm -fr conftest*
2878 fi
2879
2880 fi
2881 fi
2882
2883 echo "$ac_t""$ac_cv_header_stdc" 1>&6
2884 if test $ac_cv_header_stdc = yes; then
2885   cat >> confdefs.h <<\EOF
2886 #define STDC_HEADERS 1
2887 EOF
2888
2889 fi
2890
2891 for ac_func in memcpy
2892 do
2893 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2894 echo "configure:2895: checking for $ac_func" >&5
2895 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2896   echo $ac_n "(cached) $ac_c" 1>&6
2897 else
2898   cat > conftest.$ac_ext <<EOF
2899 #line 2900 "configure"
2900 #include "confdefs.h"
2901 /* System header to define __stub macros and hopefully few prototypes,
2902     which can conflict with char $ac_func(); below.  */
2903 #include <assert.h>
2904 /* Override any gcc2 internal prototype to avoid an error.  */
2905 /* We use char because int might match the return type of a gcc2
2906     builtin and then its argument prototype would still apply.  */
2907 char $ac_func();
2908
2909 int main() {
2910
2911 /* The GNU C library defines this for functions which it implements
2912     to always fail with ENOSYS.  Some functions are actually named
2913     something starting with __ and the normal name is an alias.  */
2914 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2915 choke me
2916 #else
2917 $ac_func();
2918 #endif
2919
2920 ; return 0; }
2921 EOF
2922 if { (eval echo configure:2923: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2923   rm -rf conftest*
2924   eval "ac_cv_func_$ac_func=yes"
2925 else
2926   echo "configure: failed program was:" >&5
2927   cat conftest.$ac_ext >&5
2928   rm -rf conftest*
2929   eval "ac_cv_func_$ac_func=no"
2930 fi
2931 rm -f conftest*
2932 fi
2933
2934 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2935   echo "$ac_t""yes" 1>&6
2936     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2937   cat >> confdefs.h <<EOF
2938 #define $ac_tr_func 1
2939 EOF
2940  
2941 else
2942   echo "$ac_t""no" 1>&6
2943 fi
2944 done
2945
2946 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
2947 # for constant arguments.  Useless!
2948 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
2949 echo "configure:2950: checking for working alloca.h" >&5
2950 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
2951   echo $ac_n "(cached) $ac_c" 1>&6
2952 else
2953   cat > conftest.$ac_ext <<EOF
2954 #line 2955 "configure"
2955 #include "confdefs.h"
2956 #include <alloca.h>
2957 int main() {
2958 char *p = alloca(2 * sizeof(int));
2959 ; return 0; }
2960 EOF
2961 if { (eval echo configure:2962: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2962   rm -rf conftest*
2963   ac_cv_header_alloca_h=yes
2964 else
2965   echo "configure: failed program was:" >&5
2966   cat conftest.$ac_ext >&5
2967   rm -rf conftest*
2968   ac_cv_header_alloca_h=no
2969 fi
2970 rm -f conftest*
2971 fi
2972
2973 echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
2974 if test $ac_cv_header_alloca_h = yes; then
2975   cat >> confdefs.h <<\EOF
2976 #define HAVE_ALLOCA_H 1
2977 EOF
2978
2979 fi
2980
2981 echo $ac_n "checking for alloca""... $ac_c" 1>&6
2982 echo "configure:2983: checking for alloca" >&5
2983 if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
2984   echo $ac_n "(cached) $ac_c" 1>&6
2985 else
2986   cat > conftest.$ac_ext <<EOF
2987 #line 2988 "configure"
2988 #include "confdefs.h"
2989
2990 #ifdef __GNUC__
2991 # define alloca __builtin_alloca
2992 #else
2993 # ifdef _MSC_VER
2994 #  include <malloc.h>
2995 #  define alloca _alloca
2996 # else
2997 #  if HAVE_ALLOCA_H
2998 #   include <alloca.h>
2999 #  else
3000 #   ifdef _AIX
3001  #pragma alloca
3002 #   else
3003 #    ifndef alloca /* predefined by HP cc +Olibcalls */
3004 char *alloca ();
3005 #    endif
3006 #   endif
3007 #  endif
3008 # endif
3009 #endif
3010
3011 int main() {
3012 char *p = (char *) alloca(1);
3013 ; return 0; }
3014 EOF
3015 if { (eval echo configure:3016: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3016   rm -rf conftest*
3017   ac_cv_func_alloca_works=yes
3018 else
3019   echo "configure: failed program was:" >&5
3020   cat conftest.$ac_ext >&5
3021   rm -rf conftest*
3022   ac_cv_func_alloca_works=no
3023 fi
3024 rm -f conftest*
3025 fi
3026
3027 echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
3028 if test $ac_cv_func_alloca_works = yes; then
3029   cat >> confdefs.h <<\EOF
3030 #define HAVE_ALLOCA 1
3031 EOF
3032
3033 fi
3034
3035 if test $ac_cv_func_alloca_works = no; then
3036   # The SVR3 libPW and SVR4 libucb both contain incompatible functions
3037   # that cause trouble.  Some versions do not even contain alloca or
3038   # contain a buggy version.  If you still want to use their alloca,
3039   # use ar to extract alloca.o from them instead of compiling alloca.c.
3040   ALLOCA=alloca.${ac_objext}
3041   cat >> confdefs.h <<\EOF
3042 #define C_ALLOCA 1
3043 EOF
3044
3045
3046 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
3047 echo "configure:3048: checking whether alloca needs Cray hooks" >&5
3048 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
3049   echo $ac_n "(cached) $ac_c" 1>&6
3050 else
3051   cat > conftest.$ac_ext <<EOF
3052 #line 3053 "configure"
3053 #include "confdefs.h"
3054 #if defined(CRAY) && ! defined(CRAY2)
3055 webecray
3056 #else
3057 wenotbecray
3058 #endif
3059
3060 EOF
3061 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3062   egrep "webecray" >/dev/null 2>&1; then
3063   rm -rf conftest*
3064   ac_cv_os_cray=yes
3065 else
3066   rm -rf conftest*
3067   ac_cv_os_cray=no
3068 fi
3069 rm -f conftest*
3070
3071 fi
3072
3073 echo "$ac_t""$ac_cv_os_cray" 1>&6
3074 if test $ac_cv_os_cray = yes; then
3075 for ac_func in _getb67 GETB67 getb67; do
3076   echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3077 echo "configure:3078: checking for $ac_func" >&5
3078 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3079   echo $ac_n "(cached) $ac_c" 1>&6
3080 else
3081   cat > conftest.$ac_ext <<EOF
3082 #line 3083 "configure"
3083 #include "confdefs.h"
3084 /* System header to define __stub macros and hopefully few prototypes,
3085     which can conflict with char $ac_func(); below.  */
3086 #include <assert.h>
3087 /* Override any gcc2 internal prototype to avoid an error.  */
3088 /* We use char because int might match the return type of a gcc2
3089     builtin and then its argument prototype would still apply.  */
3090 char $ac_func();
3091
3092 int main() {
3093
3094 /* The GNU C library defines this for functions which it implements
3095     to always fail with ENOSYS.  Some functions are actually named
3096     something starting with __ and the normal name is an alias.  */
3097 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3098 choke me
3099 #else
3100 $ac_func();
3101 #endif
3102
3103 ; return 0; }
3104 EOF
3105 if { (eval echo configure:3106: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3106   rm -rf conftest*
3107   eval "ac_cv_func_$ac_func=yes"
3108 else
3109   echo "configure: failed program was:" >&5
3110   cat conftest.$ac_ext >&5
3111   rm -rf conftest*
3112   eval "ac_cv_func_$ac_func=no"
3113 fi
3114 rm -f conftest*
3115 fi
3116
3117 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3118   echo "$ac_t""yes" 1>&6
3119   cat >> confdefs.h <<EOF
3120 #define CRAY_STACKSEG_END $ac_func
3121 EOF
3122
3123   break
3124 else
3125   echo "$ac_t""no" 1>&6
3126 fi
3127
3128 done
3129 fi
3130
3131 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
3132 echo "configure:3133: checking stack direction for C alloca" >&5
3133 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
3134   echo $ac_n "(cached) $ac_c" 1>&6
3135 else
3136   if test "$cross_compiling" = yes; then
3137   ac_cv_c_stack_direction=0
3138 else
3139   cat > conftest.$ac_ext <<EOF
3140 #line 3141 "configure"
3141 #include "confdefs.h"
3142 find_stack_direction ()
3143 {
3144   static char *addr = 0;
3145   auto char dummy;
3146   if (addr == 0)
3147     {
3148       addr = &dummy;
3149       return find_stack_direction ();
3150     }
3151   else
3152     return (&dummy > addr) ? 1 : -1;
3153 }
3154 main ()
3155 {
3156   exit (find_stack_direction() < 0);
3157 }
3158 EOF
3159 if { (eval echo configure:3160: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3160 then
3161   ac_cv_c_stack_direction=1
3162 else
3163   echo "configure: failed program was:" >&5
3164   cat conftest.$ac_ext >&5
3165   rm -fr conftest*
3166   ac_cv_c_stack_direction=-1
3167 fi
3168 rm -fr conftest*
3169 fi
3170
3171 fi
3172
3173 echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
3174 cat >> confdefs.h <<EOF
3175 #define STACK_DIRECTION $ac_cv_c_stack_direction
3176 EOF
3177
3178 fi
3179
3180
3181 echo $ac_n "checking size of short""... $ac_c" 1>&6
3182 echo "configure:3183: checking size of short" >&5
3183 if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
3184   echo $ac_n "(cached) $ac_c" 1>&6
3185 else
3186   for ac_size in 4 8 1 2 16 12  ; do # List sizes in rough order of prevalence.
3187   cat > conftest.$ac_ext <<EOF
3188 #line 3189 "configure"
3189 #include "confdefs.h"
3190 #include "confdefs.h"
3191 #include <sys/types.h>
3192
3193
3194 int main() {
3195 switch (0) case 0: case (sizeof (short) == $ac_size):;
3196 ; return 0; }
3197 EOF
3198 if { (eval echo configure:3199: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3199   rm -rf conftest*
3200   ac_cv_sizeof_short=$ac_size
3201 else
3202   echo "configure: failed program was:" >&5
3203   cat conftest.$ac_ext >&5
3204 fi
3205 rm -f conftest*
3206   if test x$ac_cv_sizeof_short != x ; then break; fi
3207 done
3208
3209 fi
3210
3211 if test x$ac_cv_sizeof_short = x ; then
3212   { echo "configure: error: cannot determine a size for short" 1>&2; exit 1; }
3213 fi
3214 echo "$ac_t""$ac_cv_sizeof_short" 1>&6
3215 cat >> confdefs.h <<EOF
3216 #define SIZEOF_SHORT $ac_cv_sizeof_short
3217 EOF
3218
3219
3220 echo $ac_n "checking size of int""... $ac_c" 1>&6
3221 echo "configure:3222: checking size of int" >&5
3222 if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
3223   echo $ac_n "(cached) $ac_c" 1>&6
3224 else
3225   for ac_size in 4 8 1 2 16 12  ; do # List sizes in rough order of prevalence.
3226   cat > conftest.$ac_ext <<EOF
3227 #line 3228 "configure"
3228 #include "confdefs.h"
3229 #include "confdefs.h"
3230 #include <sys/types.h>
3231
3232
3233 int main() {
3234 switch (0) case 0: case (sizeof (int) == $ac_size):;
3235 ; return 0; }
3236 EOF
3237 if { (eval echo configure:3238: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3238   rm -rf conftest*
3239   ac_cv_sizeof_int=$ac_size
3240 else
3241   echo "configure: failed program was:" >&5
3242   cat conftest.$ac_ext >&5
3243 fi
3244 rm -f conftest*
3245   if test x$ac_cv_sizeof_int != x ; then break; fi
3246 done
3247
3248 fi
3249
3250 if test x$ac_cv_sizeof_int = x ; then
3251   { echo "configure: error: cannot determine a size for int" 1>&2; exit 1; }
3252 fi
3253 echo "$ac_t""$ac_cv_sizeof_int" 1>&6
3254 cat >> confdefs.h <<EOF
3255 #define SIZEOF_INT $ac_cv_sizeof_int
3256 EOF
3257
3258
3259 echo $ac_n "checking size of long""... $ac_c" 1>&6
3260 echo "configure:3261: checking size of long" >&5
3261 if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
3262   echo $ac_n "(cached) $ac_c" 1>&6
3263 else
3264   for ac_size in 4 8 1 2 16 12  ; do # List sizes in rough order of prevalence.
3265   cat > conftest.$ac_ext <<EOF
3266 #line 3267 "configure"
3267 #include "confdefs.h"
3268 #include "confdefs.h"
3269 #include <sys/types.h>
3270
3271
3272 int main() {
3273 switch (0) case 0: case (sizeof (long) == $ac_size):;
3274 ; return 0; }
3275 EOF
3276 if { (eval echo configure:3277: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3277   rm -rf conftest*
3278   ac_cv_sizeof_long=$ac_size
3279 else
3280   echo "configure: failed program was:" >&5
3281   cat conftest.$ac_ext >&5
3282 fi
3283 rm -f conftest*
3284   if test x$ac_cv_sizeof_long != x ; then break; fi
3285 done
3286
3287 fi
3288
3289 if test x$ac_cv_sizeof_long = x ; then
3290   { echo "configure: error: cannot determine a size for long" 1>&2; exit 1; }
3291 fi
3292 echo "$ac_t""$ac_cv_sizeof_long" 1>&6
3293 cat >> confdefs.h <<EOF
3294 #define SIZEOF_LONG $ac_cv_sizeof_long
3295 EOF
3296
3297
3298 echo $ac_n "checking size of long long""... $ac_c" 1>&6
3299 echo "configure:3300: checking size of long long" >&5
3300 if eval "test \"`echo '$''{'ac_cv_sizeof_long_long'+set}'`\" = set"; then
3301   echo $ac_n "(cached) $ac_c" 1>&6
3302 else
3303   for ac_size in 4 8 1 2 16 12  ; do # List sizes in rough order of prevalence.
3304   cat > conftest.$ac_ext <<EOF
3305 #line 3306 "configure"
3306 #include "confdefs.h"
3307 #include "confdefs.h"
3308 #include <sys/types.h>
3309
3310
3311 int main() {
3312 switch (0) case 0: case (sizeof (long long) == $ac_size):;
3313 ; return 0; }
3314 EOF
3315 if { (eval echo configure:3316: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3316   rm -rf conftest*
3317   ac_cv_sizeof_long_long=$ac_size
3318 else
3319   echo "configure: failed program was:" >&5
3320   cat conftest.$ac_ext >&5
3321 fi
3322 rm -f conftest*
3323   if test x$ac_cv_sizeof_long_long != x ; then break; fi
3324 done
3325
3326 fi
3327
3328 if test x$ac_cv_sizeof_long_long = x ; then
3329   { echo "configure: error: cannot determine a size for long long" 1>&2; exit 1; }
3330 fi
3331 echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6
3332 cat >> confdefs.h <<EOF
3333 #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
3334 EOF
3335
3336
3337 echo $ac_n "checking size of float""... $ac_c" 1>&6
3338 echo "configure:3339: checking size of float" >&5
3339 if eval "test \"`echo '$''{'ac_cv_sizeof_float'+set}'`\" = set"; then
3340   echo $ac_n "(cached) $ac_c" 1>&6
3341 else
3342   for ac_size in 4 8 1 2 16 12  ; do # List sizes in rough order of prevalence.
3343   cat > conftest.$ac_ext <<EOF
3344 #line 3345 "configure"
3345 #include "confdefs.h"
3346 #include "confdefs.h"
3347 #include <sys/types.h>
3348
3349
3350 int main() {
3351 switch (0) case 0: case (sizeof (float) == $ac_size):;
3352 ; return 0; }
3353 EOF
3354 if { (eval echo configure:3355: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3355   rm -rf conftest*
3356   ac_cv_sizeof_float=$ac_size
3357 else
3358   echo "configure: failed program was:" >&5
3359   cat conftest.$ac_ext >&5
3360 fi
3361 rm -f conftest*
3362   if test x$ac_cv_sizeof_float != x ; then break; fi
3363 done
3364
3365 fi
3366
3367 if test x$ac_cv_sizeof_float = x ; then
3368   { echo "configure: error: cannot determine a size for float" 1>&2; exit 1; }
3369 fi
3370 echo "$ac_t""$ac_cv_sizeof_float" 1>&6
3371 cat >> confdefs.h <<EOF
3372 #define SIZEOF_FLOAT $ac_cv_sizeof_float
3373 EOF
3374
3375
3376 echo $ac_n "checking size of double""... $ac_c" 1>&6
3377 echo "configure:3378: checking size of double" >&5
3378 if eval "test \"`echo '$''{'ac_cv_sizeof_double'+set}'`\" = set"; then
3379   echo $ac_n "(cached) $ac_c" 1>&6
3380 else
3381   for ac_size in 4 8 1 2 16 12  ; do # List sizes in rough order of prevalence.
3382   cat > conftest.$ac_ext <<EOF
3383 #line 3384 "configure"
3384 #include "confdefs.h"
3385 #include "confdefs.h"
3386 #include <sys/types.h>
3387
3388
3389 int main() {
3390 switch (0) case 0: case (sizeof (double) == $ac_size):;
3391 ; return 0; }
3392 EOF
3393 if { (eval echo configure:3394: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3394   rm -rf conftest*
3395   ac_cv_sizeof_double=$ac_size
3396 else
3397   echo "configure: failed program was:" >&5
3398   cat conftest.$ac_ext >&5
3399 fi
3400 rm -f conftest*
3401   if test x$ac_cv_sizeof_double != x ; then break; fi
3402 done
3403
3404 fi
3405
3406 if test x$ac_cv_sizeof_double = x ; then
3407   { echo "configure: error: cannot determine a size for double" 1>&2; exit 1; }
3408 fi
3409 echo "$ac_t""$ac_cv_sizeof_double" 1>&6
3410 cat >> confdefs.h <<EOF
3411 #define SIZEOF_DOUBLE $ac_cv_sizeof_double
3412 EOF
3413
3414
3415 echo $ac_n "checking size of long double""... $ac_c" 1>&6
3416 echo "configure:3417: checking size of long double" >&5
3417 if eval "test \"`echo '$''{'ac_cv_sizeof_long_double'+set}'`\" = set"; then
3418   echo $ac_n "(cached) $ac_c" 1>&6
3419 else
3420   for ac_size in 4 8 1 2 16 12  ; do # List sizes in rough order of prevalence.
3421   cat > conftest.$ac_ext <<EOF
3422 #line 3423 "configure"
3423 #include "confdefs.h"
3424 #include "confdefs.h"
3425 #include <sys/types.h>
3426
3427
3428 int main() {
3429 switch (0) case 0: case (sizeof (long double) == $ac_size):;
3430 ; return 0; }
3431 EOF
3432 if { (eval echo configure:3433: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3433   rm -rf conftest*
3434   ac_cv_sizeof_long_double=$ac_size
3435 else
3436   echo "configure: failed program was:" >&5
3437   cat conftest.$ac_ext >&5
3438 fi
3439 rm -f conftest*
3440   if test x$ac_cv_sizeof_long_double != x ; then break; fi
3441 done
3442
3443 fi
3444
3445 if test x$ac_cv_sizeof_long_double = x ; then
3446   { echo "configure: error: cannot determine a size for long double" 1>&2; exit 1; }
3447 fi
3448 echo "$ac_t""$ac_cv_sizeof_long_double" 1>&6
3449 cat >> confdefs.h <<EOF
3450 #define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
3451 EOF
3452
3453
3454
3455 echo $ac_n "checking size of void *""... $ac_c" 1>&6
3456 echo "configure:3457: checking size of void *" >&5
3457 if eval "test \"`echo '$''{'ac_cv_sizeof_void_p'+set}'`\" = set"; then
3458   echo $ac_n "(cached) $ac_c" 1>&6
3459 else
3460   for ac_size in 4 8 1 2 16 12  ; do # List sizes in rough order of prevalence.
3461   cat > conftest.$ac_ext <<EOF
3462 #line 3463 "configure"
3463 #include "confdefs.h"
3464 #include "confdefs.h"
3465 #include <sys/types.h>
3466
3467
3468 int main() {
3469 switch (0) case 0: case (sizeof (void *) == $ac_size):;
3470 ; return 0; }
3471 EOF
3472 if { (eval echo configure:3473: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3473   rm -rf conftest*
3474   ac_cv_sizeof_void_p=$ac_size
3475 else
3476   echo "configure: failed program was:" >&5
3477   cat conftest.$ac_ext >&5
3478 fi
3479 rm -f conftest*
3480   if test x$ac_cv_sizeof_void_p != x ; then break; fi
3481 done
3482
3483 fi
3484
3485 if test x$ac_cv_sizeof_void_p = x ; then
3486   { echo "configure: error: cannot determine a size for void *" 1>&2; exit 1; }
3487 fi
3488 echo "$ac_t""$ac_cv_sizeof_void_p" 1>&6
3489 cat >> confdefs.h <<EOF
3490 #define SIZEOF_VOID_P $ac_cv_sizeof_void_p
3491 EOF
3492
3493
3494 echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
3495 echo "configure:3496: checking whether byte ordering is bigendian" >&5
3496 if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
3497   echo $ac_n "(cached) $ac_c" 1>&6
3498 else
3499   ac_cv_c_bigendian=unknown
3500 # See if sys/param.h defines the BYTE_ORDER macro.
3501 cat > conftest.$ac_ext <<EOF
3502 #line 3503 "configure"
3503 #include "confdefs.h"
3504 #include <sys/types.h>
3505 #include <sys/param.h>
3506 int main() {
3507
3508 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
3509  bogus endian macros
3510 #endif
3511 ; return 0; }
3512 EOF
3513 if { (eval echo configure:3514: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3514   rm -rf conftest*
3515   # It does; now see whether it defined to BIG_ENDIAN or not.
3516 cat > conftest.$ac_ext <<EOF
3517 #line 3518 "configure"
3518 #include "confdefs.h"
3519 #include <sys/types.h>
3520 #include <sys/param.h>
3521 int main() {
3522
3523 #if BYTE_ORDER != BIG_ENDIAN
3524  not big endian
3525 #endif
3526 ; return 0; }
3527 EOF
3528 if { (eval echo configure:3529: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3529   rm -rf conftest*
3530   ac_cv_c_bigendian=yes
3531 else
3532   echo "configure: failed program was:" >&5
3533   cat conftest.$ac_ext >&5
3534   rm -rf conftest*
3535   ac_cv_c_bigendian=no
3536 fi
3537 rm -f conftest*
3538 else
3539   echo "configure: failed program was:" >&5
3540   cat conftest.$ac_ext >&5
3541 fi
3542 rm -f conftest*
3543 if test $ac_cv_c_bigendian = unknown; then
3544 if test "$cross_compiling" = yes; then
3545    echo $ac_n "cross-compiling... " 2>&6 
3546 else
3547   cat > conftest.$ac_ext <<EOF
3548 #line 3549 "configure"
3549 #include "confdefs.h"
3550 main () {
3551   /* Are we little or big endian?  From Harbison&Steele.  */
3552   union
3553   {
3554     long l;
3555     char c[sizeof (long)];
3556   } u;
3557   u.l = 1;
3558   exit (u.c[sizeof (long) - 1] == 1);
3559 }
3560 EOF
3561 if { (eval echo configure:3562: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3562 then
3563   ac_cv_c_bigendian=no
3564 else
3565   echo "configure: failed program was:" >&5
3566   cat conftest.$ac_ext >&5
3567   rm -fr conftest*
3568   ac_cv_c_bigendian=yes
3569 fi
3570 rm -fr conftest*
3571 fi
3572
3573 fi
3574 fi
3575
3576 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
3577 if test $ac_cv_c_bigendian = unknown; then
3578 echo $ac_n "checking to probe for byte ordering""... $ac_c" 1>&6
3579 echo "configure:3580: checking to probe for byte ordering" >&5
3580
3581 cat >conftest.c <<EOF
3582 short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
3583 short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
3584 void _ascii() { char* s = (char*) ascii_mm; s = (char*) ascii_ii; }
3585 short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
3586 short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
3587 void _ebcdic() { char* s = (char*) ebcdic_mm; s = (char*) ebcdic_ii; }
3588 int main() { _ascii (); _ebcdic (); return 0; }
3589 EOF
3590  if test -f conftest.c ; then
3591      if ${CC-cc} ${CFLAGS} conftest.c -o conftest.o && test -f conftest.o ; then
3592         if test `grep -l BIGenDianSyS conftest.o` ; then
3593            echo $ac_n ' big endian probe OK, ' 1>&6
3594            ac_cv_c_bigendian=yes
3595         fi
3596         if test `grep -l LiTTleEnDian conftest.o` ; then
3597            echo $ac_n ' little endian probe OK, ' 1>&6
3598            if test $ac_cv_c_bigendian = yes ; then
3599             ac_cv_c_bigendian=unknown;
3600            else
3601             ac_cv_c_bigendian=no
3602            fi
3603         fi
3604         echo $ac_n 'guessing bigendian ...  ' >&6
3605      fi
3606   fi
3607 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
3608 fi
3609 if test $ac_cv_c_bigendian = yes; then
3610   cat >> confdefs.h <<\EOF
3611 #define WORDS_BIGENDIAN 1
3612 EOF
3613
3614   cat >> confdefs.h <<\EOF
3615 #define HOST_WORDS_BIG_ENDIAN 1
3616 EOF
3617
3618   BYTEORDER=4321
3619 else
3620   BYTEORDER=1234
3621 fi
3622 cat >> confdefs.h <<EOF
3623 #define BYTEORDER $BYTEORDER
3624 EOF
3625
3626 if test $ac_cv_c_bigendian = unknown; then
3627   { echo "configure: error: unknown endianess - sorry" 1>&2; exit 1; }
3628 fi
3629
3630
3631 if test x$TARGET = xSPARC; then
3632     echo $ac_n "checking assembler and linker support unaligned pc related relocs""... $ac_c" 1>&6
3633 echo "configure:3634: checking assembler and linker support unaligned pc related relocs" >&5
3634 if eval "test \"`echo '$''{'libffi_cv_as_sparc_ua_pcrel'+set}'`\" = set"; then
3635   echo $ac_n "(cached) $ac_c" 1>&6
3636 else
3637   
3638         save_CFLAGS="$CFLAGS"
3639         save_LDFLAGS="$LDFLAGS"
3640         CFLAGS="$CFLAGS -fpic"
3641         LDFLAGS="$LDFLAGS -shared"
3642         cat > conftest.$ac_ext <<EOF
3643 #line 3644 "configure"
3644 #include "confdefs.h"
3645 asm (".text; foo: nop; .data; .align 4; .byte 0; .uaword %r_disp32(foo); .text");
3646 int main() {
3647
3648 ; return 0; }
3649 EOF
3650 if { (eval echo configure:3651: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3651   rm -rf conftest*
3652   libffi_cv_as_sparc_ua_pcrel=yes
3653 else
3654   echo "configure: failed program was:" >&5
3655   cat conftest.$ac_ext >&5
3656   rm -rf conftest*
3657   libffi_cv_as_sparc_ua_pcrel=no
3658 fi
3659 rm -f conftest*
3660         CFLAGS="$save_CFLAGS"
3661         LDFLAGS="$save_LDFLAGS"
3662 fi
3663
3664 echo "$ac_t""$libffi_cv_as_sparc_ua_pcrel" 1>&6
3665     if test "x$libffi_cv_as_sparc_ua_pcrel" = xyes; then
3666         cat >> confdefs.h <<\EOF
3667 #define HAVE_AS_SPARC_UA_PCREL 1
3668 EOF
3669
3670     fi
3671
3672     echo $ac_n "checking assembler .register pseudo-op support""... $ac_c" 1>&6
3673 echo "configure:3674: checking assembler .register pseudo-op support" >&5
3674 if eval "test \"`echo '$''{'libffi_cv_as_register_pseudo_op'+set}'`\" = set"; then
3675   echo $ac_n "(cached) $ac_c" 1>&6
3676 else
3677   
3678        libffi_cv_as_register_pseudo_op=unknown
3679        # Check if we have .register
3680        cat > conftest.$ac_ext <<EOF
3681 #line 3682 "configure"
3682 #include "confdefs.h"
3683 asm (".register %g2, #scratch");
3684 int main() {
3685
3686 ; return 0; }
3687 EOF
3688 if { (eval echo configure:3689: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3689   rm -rf conftest*
3690   libffi_cv_as_register_pseudo_op=yes
3691 else
3692   echo "configure: failed program was:" >&5
3693   cat conftest.$ac_ext >&5
3694   rm -rf conftest*
3695   libffi_cv_as_register_pseudo_op=no
3696 fi
3697 rm -f conftest*
3698     
3699 fi
3700
3701 echo "$ac_t""$libffi_cv_as_register_pseudo_op" 1>&6
3702     if test "x$libffi_cv_as_register_pseudo_op" = xyes; then
3703        cat >> confdefs.h <<\EOF
3704 #define HAVE_AS_REGISTER_PSEUDO_OP 1
3705 EOF
3706
3707     fi
3708 fi
3709
3710 echo $ac_n "checking whether .eh_frame section should be read-only""... $ac_c" 1>&6
3711 echo "configure:3712: checking whether .eh_frame section should be read-only" >&5
3712 if eval "test \"`echo '$''{'libffi_cv_ro_eh_frame'+set}'`\" = set"; then
3713   echo $ac_n "(cached) $ac_c" 1>&6
3714 else
3715   
3716         libffi_cv_ro_eh_frame=no
3717         echo 'extern void foo (void); void bar (void) { foo (); foo (); }' > conftest.c
3718         if $CC $CFLAGS -S -fpic -fexceptions -o conftest.s conftest.c > /dev/null 2>&1; then
3719             if grep '.section.*eh_frame.*"a"' conftest.s > /dev/null; then
3720                 libffi_cv_ro_eh_frame=yes
3721             elif grep '.section.*eh_frame.*#alloc' conftest.c \
3722                  | grep -v '#write' > /dev/null; then
3723                 libffi_cv_ro_eh_frame=yes
3724             fi
3725         fi
3726         rm -f conftest.*
3727     
3728 fi
3729
3730 echo "$ac_t""$libffi_cv_ro_eh_frame" 1>&6
3731 if test "x$libffi_cv_ro_eh_frame" = xyes; then
3732     cat >> confdefs.h <<\EOF
3733 #define HAVE_RO_EH_FRAME 1
3734 EOF
3735
3736 fi
3737
3738
3739
3740
3741
3742
3743 # Check whether --enable-debug or --disable-debug was given.
3744 if test "${enable_debug+set}" = set; then
3745   enableval="$enable_debug"
3746   if test "$enable_debug" = "yes"; then
3747     cat >> confdefs.h <<\EOF
3748 #define FFI_DEBUG 1
3749 EOF
3750
3751   fi
3752 fi
3753
3754
3755 # Check whether --enable-structs or --disable-structs was given.
3756 if test "${enable_structs+set}" = set; then
3757   enableval="$enable_structs"
3758   if test "$enable_structs" = "no"; then
3759     cat >> confdefs.h <<\EOF
3760 #define FFI_NO_STRUCTS 1
3761 EOF
3762
3763   fi
3764 fi
3765
3766
3767 # Check whether --enable-raw-api or --disable-raw-api was given.
3768 if test "${enable_raw_api+set}" = set; then
3769   enableval="$enable_raw_api"
3770   if test "$enable_raw_api" = "no"; then
3771     cat >> confdefs.h <<\EOF
3772 #define FFI_NO_RAW_API 1
3773 EOF
3774
3775   fi
3776 fi
3777
3778
3779 # Check whether --enable-purify-safety or --disable-purify-safety was given.
3780 if test "${enable_purify_safety+set}" = set; then
3781   enableval="$enable_purify_safety"
3782   if test "$enable_purify_safety" = "yes"; then
3783     cat >> confdefs.h <<\EOF
3784 #define USING_PURIFY 1
3785 EOF
3786
3787   fi
3788 fi
3789
3790
3791 if test -n "$with_cross_host" &&
3792    test x"$with_cross_host" != x"no"; then
3793   toolexecdir='$(exec_prefix)/$(target_alias)'
3794   toolexeclibdir='$(toolexecdir)/lib'
3795 else
3796   toolexecdir='$(libdir)/gcc-lib/$(target_alias)'
3797   toolexeclibdir='$(libdir)'
3798 fi
3799 multi_os_directory=`$CC -print-multi-os-directory`
3800 case $multi_os_directory in
3801   .) ;; # Avoid trailing /.
3802   *) toolexeclibdir=$toolexeclibdir/$multi_os_directory ;;
3803 esac
3804
3805
3806
3807 if test "${multilib}" = "yes"; then
3808   multilib_arg="--enable-multilib"
3809 else
3810   multilib_arg=
3811 fi
3812
3813 trap '' 1 2 15
3814 cat > confcache <<\EOF
3815 # This file is a shell script that caches the results of configure
3816 # tests run on this system so they can be shared between configure
3817 # scripts and configure runs.  It is not useful on other systems.
3818 # If it contains results you don't want to keep, you may remove or edit it.
3819 #
3820 # By default, configure uses ./config.cache as the cache file,
3821 # creating it if it does not exist already.  You can give configure
3822 # the --cache-file=FILE option to use a different cache file; that is
3823 # what configure does when it calls configure scripts in
3824 # subdirectories, so they share the cache.
3825 # Giving --cache-file=/dev/null disables caching, for debugging configure.
3826 # config.status only pays attention to the cache file if you give it the
3827 # --recheck option to rerun configure.
3828 #
3829 EOF
3830 # The following way of writing the cache mishandles newlines in values,
3831 # but we know of no workaround that is simple, portable, and efficient.
3832 # So, don't put newlines in cache variables' values.
3833 # Ultrix sh set writes to stderr and can't be redirected directly,
3834 # and sets the high bit in the cache file unless we assign to the vars.
3835 (set) 2>&1 |
3836   case `(ac_space=' '; set | grep ac_space) 2>&1` in
3837   *ac_space=\ *)
3838     # `set' does not quote correctly, so add quotes (double-quote substitution
3839     # turns \\\\ into \\, and sed turns \\ into \).
3840     sed -n \
3841       -e "s/'/'\\\\''/g" \
3842       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
3843     ;;
3844   *)
3845     # `set' quotes correctly as required by POSIX, so do not add quotes.
3846     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
3847     ;;
3848   esac >> confcache
3849 if cmp -s $cache_file confcache; then
3850   :
3851 else
3852   if test -w $cache_file; then
3853     echo "updating cache $cache_file"
3854     cat confcache > $cache_file
3855   else
3856     echo "not updating unwritable cache $cache_file"
3857   fi
3858 fi
3859 rm -f confcache
3860
3861 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
3862
3863 test "x$prefix" = xNONE && prefix=$ac_default_prefix
3864 # Let make expand exec_prefix.
3865 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
3866
3867 # Any assignment to VPATH causes Sun make to only execute
3868 # the first set of double-colon rules, so remove it if not needed.
3869 # If there is a colon in the path, we need to keep it.
3870 if test "x$srcdir" = x.; then
3871   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
3872 fi
3873
3874 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
3875
3876 DEFS=-DHAVE_CONFIG_H
3877
3878 # Without the "./", some shells look in PATH for config.status.
3879 : ${CONFIG_STATUS=./config.status}
3880
3881 echo creating $CONFIG_STATUS
3882 rm -f $CONFIG_STATUS
3883 cat > $CONFIG_STATUS <<EOF
3884 #! /bin/sh
3885 # Generated automatically by configure.
3886 # Run this file to recreate the current configuration.
3887 # This directory was configured as follows,
3888 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
3889 #
3890 # $0 $ac_configure_args
3891 #
3892 # Compiler output produced by configure, useful for debugging
3893 # configure, is in ./config.log if it exists.
3894
3895 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
3896 for ac_option
3897 do
3898   case "\$ac_option" in
3899   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
3900     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
3901     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
3902   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
3903     echo "$CONFIG_STATUS generated by autoconf version 2.13"
3904     exit 0 ;;
3905   -help | --help | --hel | --he | --h)
3906     echo "\$ac_cs_usage"; exit 0 ;;
3907   *) echo "\$ac_cs_usage"; exit 1 ;;
3908   esac
3909 done
3910
3911 ac_given_srcdir=$srcdir
3912 ac_given_INSTALL="$INSTALL"
3913
3914 trap 'rm -fr `echo "include/Makefile testsuite/Makefile include/ffi.h Makefile fficonfig.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
3915 EOF
3916 cat >> $CONFIG_STATUS <<EOF
3917
3918 # Protect against being on the right side of a sed subst in config.status.
3919 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
3920  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
3921 $ac_vpsub
3922 $extrasub
3923 s%@SHELL@%$SHELL%g
3924 s%@CFLAGS@%$CFLAGS%g
3925 s%@CPPFLAGS@%$CPPFLAGS%g
3926 s%@CXXFLAGS@%$CXXFLAGS%g
3927 s%@FFLAGS@%$FFLAGS%g
3928 s%@DEFS@%$DEFS%g
3929 s%@LDFLAGS@%$LDFLAGS%g
3930 s%@LIBS@%$LIBS%g
3931 s%@exec_prefix@%$exec_prefix%g
3932 s%@prefix@%$prefix%g
3933 s%@program_transform_name@%$program_transform_name%g
3934 s%@bindir@%$bindir%g
3935 s%@sbindir@%$sbindir%g
3936 s%@libexecdir@%$libexecdir%g
3937 s%@datadir@%$datadir%g
3938 s%@sysconfdir@%$sysconfdir%g
3939 s%@sharedstatedir@%$sharedstatedir%g
3940 s%@localstatedir@%$localstatedir%g
3941 s%@libdir@%$libdir%g
3942 s%@includedir@%$includedir%g
3943 s%@oldincludedir@%$oldincludedir%g
3944 s%@infodir@%$infodir%g
3945 s%@mandir@%$mandir%g
3946 s%@libffi_basedir@%$libffi_basedir%g
3947 s%@host@%$host%g
3948 s%@host_alias@%$host_alias%g
3949 s%@host_cpu@%$host_cpu%g
3950 s%@host_vendor@%$host_vendor%g
3951 s%@host_os@%$host_os%g
3952 s%@target@%$target%g
3953 s%@target_alias@%$target_alias%g
3954 s%@target_cpu@%$target_cpu%g
3955 s%@target_vendor@%$target_vendor%g
3956 s%@target_os@%$target_os%g
3957 s%@build@%$build%g
3958 s%@build_alias@%$build_alias%g
3959 s%@build_cpu@%$build_cpu%g
3960 s%@build_vendor@%$build_vendor%g
3961 s%@build_os@%$build_os%g
3962 s%@CC@%$CC%g
3963 s%@LN_S@%$LN_S%g
3964 s%@OBJEXT@%$OBJEXT%g
3965 s%@EXEEXT@%$EXEEXT%g
3966 s%@RANLIB@%$RANLIB%g
3967 s%@STRIP@%$STRIP%g
3968 s%@LIBTOOL@%$LIBTOOL%g
3969 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
3970 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
3971 s%@INSTALL_DATA@%$INSTALL_DATA%g
3972 s%@PACKAGE@%$PACKAGE%g
3973 s%@VERSION@%$VERSION%g
3974 s%@ACLOCAL@%$ACLOCAL%g
3975 s%@AUTOCONF@%$AUTOCONF%g
3976 s%@AUTOMAKE@%$AUTOMAKE%g
3977 s%@AUTOHEADER@%$AUTOHEADER%g
3978 s%@MAKEINFO@%$MAKEINFO%g
3979 s%@SET_MAKE@%$SET_MAKE%g
3980 s%@MAINTAINER_MODE_TRUE@%$MAINTAINER_MODE_TRUE%g
3981 s%@MAINTAINER_MODE_FALSE@%$MAINTAINER_MODE_FALSE%g
3982 s%@MAINT@%$MAINT%g
3983 s%@TESTSUBDIR_TRUE@%$TESTSUBDIR_TRUE%g
3984 s%@TESTSUBDIR_FALSE@%$TESTSUBDIR_FALSE%g
3985 s%@AM_RUNTESTFLAGS@%$AM_RUNTESTFLAGS%g
3986 s%@MIPS_GCC_TRUE@%$MIPS_GCC_TRUE%g
3987 s%@MIPS_GCC_FALSE@%$MIPS_GCC_FALSE%g
3988 s%@MIPS_SGI_TRUE@%$MIPS_SGI_TRUE%g
3989 s%@MIPS_SGI_FALSE@%$MIPS_SGI_FALSE%g
3990 s%@MIPS_LINUX_TRUE@%$MIPS_LINUX_TRUE%g
3991 s%@MIPS_LINUX_FALSE@%$MIPS_LINUX_FALSE%g
3992 s%@SPARC_TRUE@%$SPARC_TRUE%g
3993 s%@SPARC_FALSE@%$SPARC_FALSE%g
3994 s%@X86_TRUE@%$X86_TRUE%g
3995 s%@X86_FALSE@%$X86_FALSE%g
3996 s%@X86_WIN32_TRUE@%$X86_WIN32_TRUE%g
3997 s%@X86_WIN32_FALSE@%$X86_WIN32_FALSE%g
3998 s%@ALPHA_TRUE@%$ALPHA_TRUE%g
3999 s%@ALPHA_FALSE@%$ALPHA_FALSE%g
4000 s%@IA64_TRUE@%$IA64_TRUE%g
4001 s%@IA64_FALSE@%$IA64_FALSE%g
4002 s%@M68K_TRUE@%$M68K_TRUE%g
4003 s%@M68K_FALSE@%$M68K_FALSE%g
4004 s%@POWERPC_TRUE@%$POWERPC_TRUE%g
4005 s%@POWERPC_FALSE@%$POWERPC_FALSE%g
4006 s%@POWERPC_AIX_TRUE@%$POWERPC_AIX_TRUE%g
4007 s%@POWERPC_AIX_FALSE@%$POWERPC_AIX_FALSE%g
4008 s%@POWERPC_DARWIN_TRUE@%$POWERPC_DARWIN_TRUE%g
4009 s%@POWERPC_DARWIN_FALSE@%$POWERPC_DARWIN_FALSE%g
4010 s%@ARM_TRUE@%$ARM_TRUE%g
4011 s%@ARM_FALSE@%$ARM_FALSE%g
4012 s%@S390_TRUE@%$S390_TRUE%g
4013 s%@S390_FALSE@%$S390_FALSE%g
4014 s%@X86_64_TRUE@%$X86_64_TRUE%g
4015 s%@X86_64_FALSE@%$X86_64_FALSE%g
4016 s%@SH_TRUE@%$SH_TRUE%g
4017 s%@SH_FALSE@%$SH_FALSE%g
4018 s%@SH64_TRUE@%$SH64_TRUE%g
4019 s%@SH64_FALSE@%$SH64_FALSE%g
4020 s%@CPP@%$CPP%g
4021 s%@ALLOCA@%$ALLOCA%g
4022 s%@TARGET@%$TARGET%g
4023 s%@TARGETDIR@%$TARGETDIR%g
4024 s%@toolexecdir@%$toolexecdir%g
4025 s%@toolexeclibdir@%$toolexeclibdir%g
4026
4027 CEOF
4028 EOF
4029
4030 cat >> $CONFIG_STATUS <<\EOF
4031
4032 # Split the substitutions into bite-sized pieces for seds with
4033 # small command number limits, like on Digital OSF/1 and HP-UX.
4034 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
4035 ac_file=1 # Number of current file.
4036 ac_beg=1 # First line for current file.
4037 ac_end=$ac_max_sed_cmds # Line after last line for current file.
4038 ac_more_lines=:
4039 ac_sed_cmds=""
4040 while $ac_more_lines; do
4041   if test $ac_beg -gt 1; then
4042     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
4043   else
4044     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
4045   fi
4046   if test ! -s conftest.s$ac_file; then
4047     ac_more_lines=false
4048     rm -f conftest.s$ac_file
4049   else
4050     if test -z "$ac_sed_cmds"; then
4051       ac_sed_cmds="sed -f conftest.s$ac_file"
4052     else
4053       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
4054     fi
4055     ac_file=`expr $ac_file + 1`
4056     ac_beg=$ac_end
4057     ac_end=`expr $ac_end + $ac_max_sed_cmds`
4058   fi
4059 done
4060 if test -z "$ac_sed_cmds"; then
4061   ac_sed_cmds=cat
4062 fi
4063 EOF
4064
4065 cat >> $CONFIG_STATUS <<EOF
4066
4067 CONFIG_FILES=\${CONFIG_FILES-"include/Makefile testsuite/Makefile include/ffi.h Makefile"}
4068 EOF
4069 cat >> $CONFIG_STATUS <<\EOF
4070 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
4071   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
4072   case "$ac_file" in
4073   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
4074        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
4075   *) ac_file_in="${ac_file}.in" ;;
4076   esac
4077
4078   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
4079
4080   # Remove last slash and all that follows it.  Not all systems have dirname.
4081   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
4082   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
4083     # The file is in a subdirectory.
4084     test ! -d "$ac_dir" && mkdir "$ac_dir"
4085     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
4086     # A "../" for each directory in $ac_dir_suffix.
4087     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
4088   else
4089     ac_dir_suffix= ac_dots=
4090   fi
4091
4092   case "$ac_given_srcdir" in
4093   .)  srcdir=.
4094       if test -z "$ac_dots"; then top_srcdir=.
4095       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
4096   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
4097   *) # Relative path.
4098     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
4099     top_srcdir="$ac_dots$ac_given_srcdir" ;;
4100   esac
4101
4102   case "$ac_given_INSTALL" in
4103   [/$]*) INSTALL="$ac_given_INSTALL" ;;
4104   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
4105   esac
4106
4107   echo creating "$ac_file"
4108   rm -f "$ac_file"
4109   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
4110   case "$ac_file" in
4111   *Makefile*) ac_comsub="1i\\
4112 # $configure_input" ;;
4113   *) ac_comsub= ;;
4114   esac
4115
4116   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
4117   sed -e "$ac_comsub
4118 s%@configure_input@%$configure_input%g
4119 s%@srcdir@%$srcdir%g
4120 s%@top_srcdir@%$top_srcdir%g
4121 s%@INSTALL@%$INSTALL%g
4122 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
4123 fi; done
4124 rm -f conftest.s*
4125
4126 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
4127 # NAME is the cpp macro being defined and VALUE is the value it is being given.
4128 #
4129 # ac_d sets the value in "#define NAME VALUE" lines.
4130 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
4131 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
4132 ac_dC='\3'
4133 ac_dD='%g'
4134 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
4135 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
4136 ac_uB='\([      ]\)%\1#\2define\3'
4137 ac_uC=' '
4138 ac_uD='\4%g'
4139 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
4140 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
4141 ac_eB='$%\1#\2define\3'
4142 ac_eC=' '
4143 ac_eD='%g'
4144
4145 if test "${CONFIG_HEADERS+set}" != set; then
4146 EOF
4147 cat >> $CONFIG_STATUS <<EOF
4148   CONFIG_HEADERS="fficonfig.h"
4149 EOF
4150 cat >> $CONFIG_STATUS <<\EOF
4151 fi
4152 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
4153   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
4154   case "$ac_file" in
4155   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
4156        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
4157   *) ac_file_in="${ac_file}.in" ;;
4158   esac
4159
4160   echo creating $ac_file
4161
4162   rm -f conftest.frag conftest.in conftest.out
4163   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
4164   cat $ac_file_inputs > conftest.in
4165
4166 EOF
4167
4168 # Transform confdefs.h into a sed script conftest.vals that substitutes
4169 # the proper values into config.h.in to produce config.h.  And first:
4170 # Protect against being on the right side of a sed subst in config.status.
4171 # Protect against being in an unquoted here document in config.status.
4172 rm -f conftest.vals
4173 cat > conftest.hdr <<\EOF
4174 s/[\\&%]/\\&/g
4175 s%[\\$`]%\\&%g
4176 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
4177 s%ac_d%ac_u%gp
4178 s%ac_u%ac_e%gp
4179 EOF
4180 sed -n -f conftest.hdr confdefs.h > conftest.vals
4181 rm -f conftest.hdr
4182
4183 # This sed command replaces #undef with comments.  This is necessary, for
4184 # example, in the case of _POSIX_SOURCE, which is predefined and required
4185 # on some systems where configure will not decide to define it.
4186 cat >> conftest.vals <<\EOF
4187 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
4188 EOF
4189
4190 # Break up conftest.vals because some shells have a limit on
4191 # the size of here documents, and old seds have small limits too.
4192
4193 rm -f conftest.tail
4194 while :
4195 do
4196   ac_lines=`grep -c . conftest.vals`
4197   # grep -c gives empty output for an empty file on some AIX systems.
4198   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
4199   # Write a limited-size here document to conftest.frag.
4200   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
4201   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
4202   echo 'CEOF
4203   sed -f conftest.frag conftest.in > conftest.out
4204   rm -f conftest.in
4205   mv conftest.out conftest.in
4206 ' >> $CONFIG_STATUS
4207   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
4208   rm -f conftest.vals
4209   mv conftest.tail conftest.vals
4210 done
4211 rm -f conftest.vals
4212
4213 cat >> $CONFIG_STATUS <<\EOF
4214   rm -f conftest.frag conftest.h
4215   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
4216   cat conftest.in >> conftest.h
4217   rm -f conftest.in
4218   if cmp -s $ac_file conftest.h 2>/dev/null; then
4219     echo "$ac_file is unchanged"
4220     rm -f conftest.h
4221   else
4222     # Remove last slash and all that follows it.  Not all systems have dirname.
4223       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
4224       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
4225       # The file is in a subdirectory.
4226       test ! -d "$ac_dir" && mkdir "$ac_dir"
4227     fi
4228     rm -f $ac_file
4229     mv conftest.h $ac_file
4230   fi
4231 fi; done
4232
4233 EOF
4234 cat >> $CONFIG_STATUS <<EOF
4235
4236 srcdir=${srcdir}
4237 host=${host}
4238 target=${target}
4239 with_multisubdir=${with_multisubdir}
4240 ac_configure_args="${multilib_arg} ${ac_configure_args}"
4241 CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
4242 libffi_basedir=${libffi_basedir}
4243 CC="${CC}"
4244 DEFS="$DEFS"
4245 ORIGINAL_LD_FOR_MULTILIBS="${ORIGINAL_LD_FOR_MULTILIBS}"
4246 test ! -d include && mkdir include
4247 test ! -f include/fficonfig.h && cp fficonfig.h include/fficonfig.h
4248 if cmp -s fficonfig.h include/fficonfig.h 2>/dev/null; then 
4249         echo fficonfig.h unchanged
4250 else
4251         echo Moving fficonfig.h to include/fficonfig.h
4252         cp fficonfig.h include/fficonfig.h
4253 fi
4254
4255 EOF
4256 cat >> $CONFIG_STATUS <<\EOF
4257 test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h
4258
4259 if test -n "$CONFIG_FILES"; then
4260    LD="${ORIGINAL_LD_FOR_MULTILIBS}"
4261    ac_file=Makefile . ${srcdir}/${libffi_basedir}../config-ml.in
4262 fi
4263
4264 exit 0
4265 EOF
4266 chmod +x $CONFIG_STATUS
4267 rm -fr confdefs* $ac_clean_files
4268 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
4269
4270
4271 # Make target subdirectories if required.
4272 test -d src || mkdir src
4273 test -d src/${TARGETDIR} || mkdir src/${TARGETDIR}