OSDN Git Service

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