OSDN Git Service

37ea9b48dd0792d865afb4c383529a6cc75cbe5c
[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   case $host_cpu in
1253   hppa*)
1254     lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
1255     lt_cv_file_magic_cmd=/usr/bin/file
1256     lt_cv_file_magic_test_file=/usr/lib/libc.sl
1257     ;;
1258   ia64*)
1259     lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64'
1260     lt_cv_file_magic_cmd=/usr/bin/file
1261     lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
1262     ;;
1263   esac
1264   ;;
1265
1266 irix5* | irix6*)
1267   case $host_os in
1268   irix5*)
1269     # this will be overridden with pass_all, but let us keep it just in case
1270     lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
1271     ;;
1272   *)
1273     case $LD in
1274     *-32|*"-32 ") libmagic=32-bit;;
1275     *-n32|*"-n32 ") libmagic=N32;;
1276     *-64|*"-64 ") libmagic=64-bit;;
1277     *) libmagic=never-match;;
1278     esac
1279     # this will be overridden with pass_all, but let us keep it just in case
1280     lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1"
1281     ;;
1282   esac
1283   lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
1284   lt_cv_deplibs_check_method=pass_all
1285   ;;
1286
1287 # This must be Linux ELF.
1288 linux-gnu*)
1289   case $host_cpu in
1290   alpha* | hppa* | i*86 | powerpc* | sparc* | ia64* )
1291     lt_cv_deplibs_check_method=pass_all ;;
1292   *)
1293     # glibc up to 2.1.1 does not perform some relocations on ARM
1294     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;;
1295   esac
1296   lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
1297   ;;
1298
1299 netbsd*)
1300   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
1301     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
1302   else
1303     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so$'
1304   fi
1305   ;;
1306
1307 newsos6)
1308   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
1309   lt_cv_file_magic_cmd=/usr/bin/file
1310   lt_cv_file_magic_test_file=/usr/lib/libnls.so
1311   ;;
1312
1313 osf3* | osf4* | osf5*)
1314   # this will be overridden with pass_all, but let us keep it just in case
1315   lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
1316   lt_cv_file_magic_test_file=/shlib/libc.so
1317   lt_cv_deplibs_check_method=pass_all
1318   ;;
1319
1320 sco3.2v5*)
1321   lt_cv_deplibs_check_method=pass_all
1322   ;;
1323
1324 solaris*)
1325   lt_cv_deplibs_check_method=pass_all
1326   lt_cv_file_magic_test_file=/lib/libc.so
1327   ;;
1328
1329 sysv5uw[78]* | sysv4*uw2*)
1330   lt_cv_deplibs_check_method=pass_all
1331   ;;
1332
1333 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
1334   case $host_vendor in
1335   ncr)
1336     lt_cv_deplibs_check_method=pass_all
1337     ;;
1338   motorola)
1339     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]'
1340     lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
1341     ;;
1342   esac
1343   ;;
1344 esac
1345
1346 fi
1347
1348 echo "$ac_t""$lt_cv_deplibs_check_method" 1>&6
1349 file_magic_cmd=$lt_cv_file_magic_cmd
1350 deplibs_check_method=$lt_cv_deplibs_check_method
1351
1352 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
1353 echo "configure:1354: checking for object suffix" >&5
1354 if eval "test \"`echo '$''{'ac_cv_objext'+set}'`\" = set"; then
1355   echo $ac_n "(cached) $ac_c" 1>&6
1356 else
1357   rm -f conftest*
1358 echo 'int i = 1;' > conftest.$ac_ext
1359 if { (eval echo configure:1360: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1360   for ac_file in conftest.*; do
1361     case $ac_file in
1362     *.c) ;;
1363     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
1364     esac
1365   done
1366 else
1367   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
1368 fi
1369 rm -f conftest*
1370 fi
1371
1372 echo "$ac_t""$ac_cv_objext" 1>&6
1373 OBJEXT=$ac_cv_objext
1374 ac_objext=$ac_cv_objext
1375
1376
1377
1378 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
1379 echo "configure:1380: checking for executable suffix" >&5
1380 if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
1381   echo $ac_n "(cached) $ac_c" 1>&6
1382 else
1383   if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
1384   ac_cv_exeext=.exe
1385 else
1386   rm -f conftest*
1387   echo 'int main () { return 0; }' > conftest.$ac_ext
1388   ac_cv_exeext=
1389   if { (eval echo configure:1390: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
1390     for file in conftest.*; do
1391       case $file in
1392       *.c | *.o | *.obj | *.ilk | *.pdb) ;;
1393       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
1394       esac
1395     done
1396   else
1397     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
1398   fi
1399   rm -f conftest*
1400   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
1401 fi
1402 fi
1403
1404 EXEEXT=""
1405 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
1406 echo "$ac_t""${ac_cv_exeext}" 1>&6
1407 ac_exeext=$EXEEXT
1408
1409 if test $host != $build; then
1410   ac_tool_prefix=${host_alias}-
1411 else
1412   ac_tool_prefix=
1413 fi
1414
1415 # Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
1416
1417 # Only perform the check for file, if the check method requires it
1418 case $deplibs_check_method in
1419 file_magic*)
1420   if test "$file_magic_cmd" = '$MAGIC_CMD'; then
1421     echo $ac_n "checking for ${ac_tool_prefix}file""... $ac_c" 1>&6
1422 echo "configure:1423: checking for ${ac_tool_prefix}file" >&5
1423 if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then
1424   echo $ac_n "(cached) $ac_c" 1>&6
1425 else
1426   case $MAGIC_CMD in
1427   /*)
1428   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
1429   ;;
1430   ?:/*)
1431   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
1432   ;;
1433   *)
1434   ac_save_MAGIC_CMD="$MAGIC_CMD"
1435   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1436   ac_dummy="/usr/bin:$PATH"
1437   for ac_dir in $ac_dummy; do
1438     test -z "$ac_dir" && ac_dir=.
1439     if test -f $ac_dir/${ac_tool_prefix}file; then
1440       lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
1441       if test -n "$file_magic_test_file"; then
1442         case $deplibs_check_method in
1443         "file_magic "*)
1444           file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
1445           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
1446           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
1447             egrep "$file_magic_regex" > /dev/null; then
1448             :
1449           else
1450             cat <<EOF 1>&2
1451
1452 *** Warning: the command libtool uses to detect shared libraries,
1453 *** $file_magic_cmd, produces output that libtool cannot recognize.
1454 *** The result is that libtool may fail to recognize shared libraries
1455 *** as such.  This will affect the creation of libtool libraries that
1456 *** depend on shared libraries, but programs linked with such libtool
1457 *** libraries will work regardless of this problem.  Nevertheless, you
1458 *** may want to report the problem to your system manager and/or to
1459 *** bug-libtool@gnu.org
1460
1461 EOF
1462           fi ;;
1463         esac
1464       fi
1465       break
1466     fi
1467   done
1468   IFS="$ac_save_ifs"
1469   MAGIC_CMD="$ac_save_MAGIC_CMD"
1470   ;;
1471 esac
1472 fi
1473
1474 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
1475 if test -n "$MAGIC_CMD"; then
1476   echo "$ac_t""$MAGIC_CMD" 1>&6
1477 else
1478   echo "$ac_t""no" 1>&6
1479 fi
1480
1481 if test -z "$lt_cv_path_MAGIC_CMD"; then
1482   if test -n "$ac_tool_prefix"; then
1483     echo $ac_n "checking for file""... $ac_c" 1>&6
1484 echo "configure:1485: checking for file" >&5
1485 if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then
1486   echo $ac_n "(cached) $ac_c" 1>&6
1487 else
1488   case $MAGIC_CMD in
1489   /*)
1490   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
1491   ;;
1492   ?:/*)
1493   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
1494   ;;
1495   *)
1496   ac_save_MAGIC_CMD="$MAGIC_CMD"
1497   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1498   ac_dummy="/usr/bin:$PATH"
1499   for ac_dir in $ac_dummy; do
1500     test -z "$ac_dir" && ac_dir=.
1501     if test -f $ac_dir/file; then
1502       lt_cv_path_MAGIC_CMD="$ac_dir/file"
1503       if test -n "$file_magic_test_file"; then
1504         case $deplibs_check_method in
1505         "file_magic "*)
1506           file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
1507           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
1508           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
1509             egrep "$file_magic_regex" > /dev/null; then
1510             :
1511           else
1512             cat <<EOF 1>&2
1513
1514 *** Warning: the command libtool uses to detect shared libraries,
1515 *** $file_magic_cmd, produces output that libtool cannot recognize.
1516 *** The result is that libtool may fail to recognize shared libraries
1517 *** as such.  This will affect the creation of libtool libraries that
1518 *** depend on shared libraries, but programs linked with such libtool
1519 *** libraries will work regardless of this problem.  Nevertheless, you
1520 *** may want to report the problem to your system manager and/or to
1521 *** bug-libtool@gnu.org
1522
1523 EOF
1524           fi ;;
1525         esac
1526       fi
1527       break
1528     fi
1529   done
1530   IFS="$ac_save_ifs"
1531   MAGIC_CMD="$ac_save_MAGIC_CMD"
1532   ;;
1533 esac
1534 fi
1535
1536 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
1537 if test -n "$MAGIC_CMD"; then
1538   echo "$ac_t""$MAGIC_CMD" 1>&6
1539 else
1540   echo "$ac_t""no" 1>&6
1541 fi
1542
1543   else
1544     MAGIC_CMD=:
1545   fi
1546 fi
1547
1548   fi
1549   ;;
1550 esac
1551
1552 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
1553 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
1554 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1555 echo "configure:1556: checking for $ac_word" >&5
1556 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1557   echo $ac_n "(cached) $ac_c" 1>&6
1558 else
1559   if test -n "$RANLIB"; then
1560   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1561 else
1562   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1563   ac_dummy="$PATH"
1564   for ac_dir in $ac_dummy; do
1565     test -z "$ac_dir" && ac_dir=.
1566     if test -f $ac_dir/$ac_word; then
1567       ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
1568       break
1569     fi
1570   done
1571   IFS="$ac_save_ifs"
1572 fi
1573 fi
1574 RANLIB="$ac_cv_prog_RANLIB"
1575 if test -n "$RANLIB"; then
1576   echo "$ac_t""$RANLIB" 1>&6
1577 else
1578   echo "$ac_t""no" 1>&6
1579 fi
1580
1581
1582 if test -z "$ac_cv_prog_RANLIB"; then
1583 if test -n "$ac_tool_prefix"; then
1584   # Extract the first word of "ranlib", so it can be a program name with args.
1585 set dummy ranlib; ac_word=$2
1586 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1587 echo "configure:1588: checking for $ac_word" >&5
1588 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1589   echo $ac_n "(cached) $ac_c" 1>&6
1590 else
1591   if test -n "$RANLIB"; then
1592   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1593 else
1594   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1595   ac_dummy="$PATH"
1596   for ac_dir in $ac_dummy; do
1597     test -z "$ac_dir" && ac_dir=.
1598     if test -f $ac_dir/$ac_word; then
1599       ac_cv_prog_RANLIB="ranlib"
1600       break
1601     fi
1602   done
1603   IFS="$ac_save_ifs"
1604   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1605 fi
1606 fi
1607 RANLIB="$ac_cv_prog_RANLIB"
1608 if test -n "$RANLIB"; then
1609   echo "$ac_t""$RANLIB" 1>&6
1610 else
1611   echo "$ac_t""no" 1>&6
1612 fi
1613
1614 else
1615   RANLIB=":"
1616 fi
1617 fi
1618
1619 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
1620 set dummy ${ac_tool_prefix}strip; ac_word=$2
1621 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1622 echo "configure:1623: checking for $ac_word" >&5
1623 if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
1624   echo $ac_n "(cached) $ac_c" 1>&6
1625 else
1626   if test -n "$STRIP"; then
1627   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
1628 else
1629   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1630   ac_dummy="$PATH"
1631   for ac_dir in $ac_dummy; do
1632     test -z "$ac_dir" && ac_dir=.
1633     if test -f $ac_dir/$ac_word; then
1634       ac_cv_prog_STRIP="${ac_tool_prefix}strip"
1635       break
1636     fi
1637   done
1638   IFS="$ac_save_ifs"
1639 fi
1640 fi
1641 STRIP="$ac_cv_prog_STRIP"
1642 if test -n "$STRIP"; then
1643   echo "$ac_t""$STRIP" 1>&6
1644 else
1645   echo "$ac_t""no" 1>&6
1646 fi
1647
1648
1649 if test -z "$ac_cv_prog_STRIP"; then
1650 if test -n "$ac_tool_prefix"; then
1651   # Extract the first word of "strip", so it can be a program name with args.
1652 set dummy strip; ac_word=$2
1653 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1654 echo "configure:1655: checking for $ac_word" >&5
1655 if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
1656   echo $ac_n "(cached) $ac_c" 1>&6
1657 else
1658   if test -n "$STRIP"; then
1659   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
1660 else
1661   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1662   ac_dummy="$PATH"
1663   for ac_dir in $ac_dummy; do
1664     test -z "$ac_dir" && ac_dir=.
1665     if test -f $ac_dir/$ac_word; then
1666       ac_cv_prog_STRIP="strip"
1667       break
1668     fi
1669   done
1670   IFS="$ac_save_ifs"
1671   test -z "$ac_cv_prog_STRIP" && ac_cv_prog_STRIP=":"
1672 fi
1673 fi
1674 STRIP="$ac_cv_prog_STRIP"
1675 if test -n "$STRIP"; then
1676   echo "$ac_t""$STRIP" 1>&6
1677 else
1678   echo "$ac_t""no" 1>&6
1679 fi
1680
1681 else
1682   STRIP=":"
1683 fi
1684 fi
1685
1686
1687 # Check for any special flags to pass to ltconfig.
1688 libtool_flags="--cache-file=$cache_file"
1689 test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
1690 test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
1691 test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
1692 test "$GCC" = yes && libtool_flags="$libtool_flags --with-gcc"
1693 test "$lt_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
1694
1695
1696 # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
1697 if test "${enable_libtool_lock+set}" = set; then
1698   enableval="$enable_libtool_lock"
1699   :
1700 fi
1701
1702 test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
1703 test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
1704
1705 # Check whether --with-pic or --without-pic was given.
1706 if test "${with_pic+set}" = set; then
1707   withval="$with_pic"
1708   pic_mode="$withval"
1709 else
1710   pic_mode=default
1711 fi
1712
1713 test x"$pic_mode" = xyes && libtool_flags="$libtool_flags --prefer-pic"
1714 test x"$pic_mode" = xno && libtool_flags="$libtool_flags --prefer-non-pic"
1715
1716 # Some flags need to be propagated to the compiler or linker for good
1717 # libtool support.
1718 case $host in
1719 *-*-irix6*)
1720   # Find out which ABI we are using.
1721   echo '#line 1722 "configure"' > conftest.$ac_ext
1722   if { (eval echo configure:1723: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1723     case `/usr/bin/file conftest.$ac_objext` in
1724     *32-bit*)
1725       LD="${LD-ld} -32"
1726       ;;
1727     *N32*)
1728       LD="${LD-ld} -n32"
1729       ;;
1730     *64-bit*)
1731       LD="${LD-ld} -64"
1732       ;;
1733     esac
1734   fi
1735   rm -rf conftest*
1736   ;;
1737
1738 ia64-*-hpux*)
1739   # Find out which ABI we are using.
1740   echo 'int i;' > conftest.$ac_ext
1741   if { (eval echo configure:1742: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1742     case "`/usr/bin/file conftest.o`" in
1743     *ELF-32*)
1744       HPUX_IA64_MODE="32"
1745       ;;
1746     *ELF-64*)
1747       HPUX_IA64_MODE="64"
1748       ;;
1749     esac
1750   fi
1751   rm -rf conftest*
1752   ;;
1753
1754 *-*-sco3.2v5*)
1755   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
1756   SAVE_CFLAGS="$CFLAGS"
1757   CFLAGS="$CFLAGS -belf"
1758   echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
1759 echo "configure:1760: checking whether the C compiler needs -belf" >&5
1760 if eval "test \"`echo '$''{'lt_cv_cc_needs_belf'+set}'`\" = set"; then
1761   echo $ac_n "(cached) $ac_c" 1>&6
1762 else
1763   
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      cat > conftest.$ac_ext <<EOF
1772 #line 1773 "configure"
1773 #include "confdefs.h"
1774
1775 int main() {
1776
1777 ; return 0; }
1778 EOF
1779 if { (eval echo configure:1780: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1780   rm -rf conftest*
1781   lt_cv_cc_needs_belf=yes
1782 else
1783   echo "configure: failed program was:" >&5
1784   cat conftest.$ac_ext >&5
1785   rm -rf conftest*
1786   lt_cv_cc_needs_belf=no
1787 fi
1788 rm -f conftest*
1789      ac_ext=c
1790 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1791 ac_cpp='$CPP $CPPFLAGS'
1792 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1793 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1794 cross_compiling=$ac_cv_prog_cc_cross
1795
1796 fi
1797
1798 echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
1799   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
1800     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
1801     CFLAGS="$SAVE_CFLAGS"
1802   fi
1803   ;;
1804
1805
1806 esac
1807
1808
1809 # Save cache, so that ltconfig can load it
1810 cat > confcache <<\EOF
1811 # This file is a shell script that caches the results of configure
1812 # tests run on this system so they can be shared between configure
1813 # scripts and configure runs.  It is not useful on other systems.
1814 # If it contains results you don't want to keep, you may remove or edit it.
1815 #
1816 # By default, configure uses ./config.cache as the cache file,
1817 # creating it if it does not exist already.  You can give configure
1818 # the --cache-file=FILE option to use a different cache file; that is
1819 # what configure does when it calls configure scripts in
1820 # subdirectories, so they share the cache.
1821 # Giving --cache-file=/dev/null disables caching, for debugging configure.
1822 # config.status only pays attention to the cache file if you give it the
1823 # --recheck option to rerun configure.
1824 #
1825 EOF
1826 # The following way of writing the cache mishandles newlines in values,
1827 # but we know of no workaround that is simple, portable, and efficient.
1828 # So, don't put newlines in cache variables' values.
1829 # Ultrix sh set writes to stderr and can't be redirected directly,
1830 # and sets the high bit in the cache file unless we assign to the vars.
1831 (set) 2>&1 |
1832   case `(ac_space=' '; set | grep ac_space) 2>&1` in
1833   *ac_space=\ *)
1834     # `set' does not quote correctly, so add quotes (double-quote substitution
1835     # turns \\\\ into \\, and sed turns \\ into \).
1836     sed -n \
1837       -e "s/'/'\\\\''/g" \
1838       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
1839     ;;
1840   *)
1841     # `set' quotes correctly as required by POSIX, so do not add quotes.
1842     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
1843     ;;
1844   esac >> confcache
1845 if cmp -s $cache_file confcache; then
1846   :
1847 else
1848   if test -w $cache_file; then
1849     echo "updating cache $cache_file"
1850     cat confcache > $cache_file
1851   else
1852     echo "not updating unwritable cache $cache_file"
1853   fi
1854 fi
1855 rm -f confcache
1856
1857
1858 # Actually configure libtool.  ac_aux_dir is where install-sh is found.
1859 AR="$AR" LTCC="$CC" CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
1860 MAGIC_CMD="$MAGIC_CMD" LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
1861 LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" STRIP="$STRIP" \
1862 AS="$AS" DLLTOOL="$DLLTOOL" OBJDUMP="$OBJDUMP" \
1863 objext="$OBJEXT" exeext="$EXEEXT" reload_flag="$reload_flag" \
1864 deplibs_check_method="$deplibs_check_method" file_magic_cmd="$file_magic_cmd" \
1865 ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
1866 $libtool_flags --no-verify --build="$build" $ac_aux_dir/ltmain.sh $host \
1867 || { echo "configure: error: libtool configure failed" 1>&2; exit 1; }
1868
1869 # Reload cache, that may have been modified by ltconfig
1870 if test -r "$cache_file"; then
1871   echo "loading cache $cache_file"
1872   . $cache_file
1873 else
1874   echo "creating cache $cache_file"
1875   > $cache_file
1876 fi
1877
1878
1879 # This can be used to rebuild libtool when needed
1880 LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh $ac_aux_dir/ltcf-c.sh"
1881
1882 # Always use our own libtool.
1883 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
1884
1885 # Redirect the config.log output again, so that the ltconfig log is not
1886 # clobbered by the next message.
1887 exec 5>>./config.log
1888
1889   
1890
1891   
1892          
1893          
1894
1895 # Find a good install program.  We prefer a C program (faster),
1896 # so one script is as good as another.  But avoid the broken or
1897 # incompatible versions:
1898 # SysV /etc/install, /usr/sbin/install
1899 # SunOS /usr/etc/install
1900 # IRIX /sbin/install
1901 # AIX /bin/install
1902 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
1903 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
1904 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1905 # ./install, which can be erroneously created by make from ./install.sh.
1906 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
1907 echo "configure:1908: checking for a BSD compatible install" >&5
1908 if test -z "$INSTALL"; then
1909 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
1910   echo $ac_n "(cached) $ac_c" 1>&6
1911 else
1912     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
1913   for ac_dir in $PATH; do
1914     # Account for people who put trailing slashes in PATH elements.
1915     case "$ac_dir/" in
1916     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1917     *)
1918       # OSF1 and SCO ODT 3.0 have their own names for install.
1919       # Don't use installbsd from OSF since it installs stuff as root
1920       # by default.
1921       for ac_prog in ginstall scoinst install; do
1922         if test -f $ac_dir/$ac_prog; then
1923           if test $ac_prog = install &&
1924             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1925             # AIX install.  It has an incompatible calling convention.
1926             :
1927           else
1928             ac_cv_path_install="$ac_dir/$ac_prog -c"
1929             break 2
1930           fi
1931         fi
1932       done
1933       ;;
1934     esac
1935   done
1936   IFS="$ac_save_IFS"
1937
1938 fi
1939   if test "${ac_cv_path_install+set}" = set; then
1940     INSTALL="$ac_cv_path_install"
1941   else
1942     # As a last resort, use the slow shell script.  We don't cache a
1943     # path for INSTALL within a source directory, because that will
1944     # break other packages using the cache if that directory is
1945     # removed, or if the path is relative.
1946     INSTALL="$ac_install_sh"
1947   fi
1948 fi
1949 echo "$ac_t""$INSTALL" 1>&6
1950
1951 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1952 # It thinks the first close brace ends the variable substitution.
1953 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1954
1955 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
1956
1957 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1958
1959 echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
1960 echo "configure:1961: checking whether build environment is sane" >&5
1961 # Just in case
1962 sleep 1
1963 echo timestamp > conftestfile
1964 # Do `set' in a subshell so we don't clobber the current shell's
1965 # arguments.  Must try -L first in case configure is actually a
1966 # symlink; some systems play weird games with the mod time of symlinks
1967 # (eg FreeBSD returns the mod time of the symlink's containing
1968 # directory).
1969 if (
1970    set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
1971    if test "$*" = "X"; then
1972       # -L didn't work.
1973       set X `ls -t $srcdir/configure conftestfile`
1974    fi
1975    if test "$*" != "X $srcdir/configure conftestfile" \
1976       && test "$*" != "X conftestfile $srcdir/configure"; then
1977
1978       # If neither matched, then we have a broken ls.  This can happen
1979       # if, for instance, CONFIG_SHELL is bash and it inherits a
1980       # broken ls alias from the environment.  This has actually
1981       # happened.  Such a system could not be considered "sane".
1982       { echo "configure: error: ls -t appears to fail.  Make sure there is not a broken
1983 alias in your environment" 1>&2; exit 1; }
1984    fi
1985
1986    test "$2" = conftestfile
1987    )
1988 then
1989    # Ok.
1990    :
1991 else
1992    { echo "configure: error: newly created file is older than distributed files!
1993 Check your system clock" 1>&2; exit 1; }
1994 fi
1995 rm -f conftest*
1996 echo "$ac_t""yes" 1>&6
1997 if test "$program_transform_name" = s,x,x,; then
1998   program_transform_name=
1999 else
2000   # Double any \ or $.  echo might interpret backslashes.
2001   cat <<\EOF_SED > conftestsed
2002 s,\\,\\\\,g; s,\$,$$,g
2003 EOF_SED
2004   program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
2005   rm -f conftestsed
2006 fi
2007 test "$program_prefix" != NONE &&
2008   program_transform_name="s,^,${program_prefix},; $program_transform_name"
2009 # Use a double $ so make ignores it.
2010 test "$program_suffix" != NONE &&
2011   program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
2012
2013 # sed with no file args requires a program.
2014 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
2015
2016 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
2017 echo "configure:2018: checking whether ${MAKE-make} sets \${MAKE}" >&5
2018 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
2019 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
2020   echo $ac_n "(cached) $ac_c" 1>&6
2021 else
2022   cat > conftestmake <<\EOF
2023 all:
2024         @echo 'ac_maketemp="${MAKE}"'
2025 EOF
2026 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
2027 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
2028 if test -n "$ac_maketemp"; then
2029   eval ac_cv_prog_make_${ac_make}_set=yes
2030 else
2031   eval ac_cv_prog_make_${ac_make}_set=no
2032 fi
2033 rm -f conftestmake
2034 fi
2035 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
2036   echo "$ac_t""yes" 1>&6
2037   SET_MAKE=
2038 else
2039   echo "$ac_t""no" 1>&6
2040   SET_MAKE="MAKE=${MAKE-make}"
2041 fi
2042
2043
2044 PACKAGE=libffi
2045
2046 VERSION=2.00-beta
2047
2048 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
2049   { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
2050 fi
2051
2052
2053
2054 missing_dir=`cd $ac_aux_dir && pwd`
2055 echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
2056 echo "configure:2057: checking for working aclocal" >&5
2057 # Run test in a subshell; some versions of sh will print an error if
2058 # an executable is not found, even if stderr is redirected.
2059 # Redirect stdin to placate older versions of autoconf.  Sigh.
2060 if (aclocal --version) < /dev/null > /dev/null 2>&1; then
2061    ACLOCAL=aclocal
2062    echo "$ac_t""found" 1>&6
2063 else
2064    ACLOCAL="$missing_dir/missing aclocal"
2065    echo "$ac_t""missing" 1>&6
2066 fi
2067
2068 echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
2069 echo "configure:2070: checking for working autoconf" >&5
2070 # Run test in a subshell; some versions of sh will print an error if
2071 # an executable is not found, even if stderr is redirected.
2072 # Redirect stdin to placate older versions of autoconf.  Sigh.
2073 if (autoconf --version) < /dev/null > /dev/null 2>&1; then
2074    AUTOCONF=autoconf
2075    echo "$ac_t""found" 1>&6
2076 else
2077    AUTOCONF="$missing_dir/missing autoconf"
2078    echo "$ac_t""missing" 1>&6
2079 fi
2080
2081 echo $ac_n "checking for working automake""... $ac_c" 1>&6
2082 echo "configure:2083: checking for working automake" >&5
2083 # Run test in a subshell; some versions of sh will print an error if
2084 # an executable is not found, even if stderr is redirected.
2085 # Redirect stdin to placate older versions of autoconf.  Sigh.
2086 if (automake --version) < /dev/null > /dev/null 2>&1; then
2087    AUTOMAKE=automake
2088    echo "$ac_t""found" 1>&6
2089 else
2090    AUTOMAKE="$missing_dir/missing automake"
2091    echo "$ac_t""missing" 1>&6
2092 fi
2093
2094 echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
2095 echo "configure:2096: checking for working autoheader" >&5
2096 # Run test in a subshell; some versions of sh will print an error if
2097 # an executable is not found, even if stderr is redirected.
2098 # Redirect stdin to placate older versions of autoconf.  Sigh.
2099 if (autoheader --version) < /dev/null > /dev/null 2>&1; then
2100    AUTOHEADER=autoheader
2101    echo "$ac_t""found" 1>&6
2102 else
2103    AUTOHEADER="$missing_dir/missing autoheader"
2104    echo "$ac_t""missing" 1>&6
2105 fi
2106
2107 echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
2108 echo "configure:2109: checking for working makeinfo" >&5
2109 # Run test in a subshell; some versions of sh will print an error if
2110 # an executable is not found, even if stderr is redirected.
2111 # Redirect stdin to placate older versions of autoconf.  Sigh.
2112 if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
2113    MAKEINFO=makeinfo
2114    echo "$ac_t""found" 1>&6
2115 else
2116    MAKEINFO="$missing_dir/missing makeinfo"
2117    echo "$ac_t""missing" 1>&6
2118 fi
2119
2120
2121
2122
2123
2124 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
2125 echo "configure:2126: checking for executable suffix" >&5
2126 if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
2127   echo $ac_n "(cached) $ac_c" 1>&6
2128 else
2129   if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
2130   ac_cv_exeext=.exe
2131 else
2132   rm -f conftest*
2133   echo 'int main () { return 0; }' > conftest.$ac_ext
2134   ac_cv_exeext=
2135   if { (eval echo configure:2136: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
2136     for file in conftest.*; do
2137       case $file in
2138       *.c | *.o | *.obj | *.ilk | *.pdb) ;;
2139       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
2140       esac
2141     done
2142   else
2143     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
2144   fi
2145   rm -f conftest*
2146   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
2147 fi
2148 fi
2149
2150 EXEEXT=""
2151 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
2152 echo "$ac_t""${ac_cv_exeext}" 1>&6
2153 ac_exeext=$EXEEXT
2154
2155 echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
2156 echo "configure:2157: checking whether to enable maintainer-specific portions of Makefiles" >&5
2157     # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
2158 if test "${enable_maintainer_mode+set}" = set; then
2159   enableval="$enable_maintainer_mode"
2160   USE_MAINTAINER_MODE=$enableval
2161 else
2162   USE_MAINTAINER_MODE=no
2163 fi
2164
2165   echo "$ac_t""$USE_MAINTAINER_MODE" 1>&6
2166   
2167
2168 if test $USE_MAINTAINER_MODE = yes; then
2169   MAINTAINER_MODE_TRUE=
2170   MAINTAINER_MODE_FALSE='#'
2171 else
2172   MAINTAINER_MODE_TRUE='#'
2173   MAINTAINER_MODE_FALSE=
2174 fi
2175   MAINT=$MAINTAINER_MODE_TRUE
2176   
2177
2178
2179 # Extract the first word of "gcc", so it can be a program name with args.
2180 set dummy gcc; ac_word=$2
2181 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2182 echo "configure:2183: checking for $ac_word" >&5
2183 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
2184   echo $ac_n "(cached) $ac_c" 1>&6
2185 else
2186   if test -n "$CC"; then
2187   ac_cv_prog_CC="$CC" # Let the user override the test.
2188 else
2189   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2190   ac_dummy="$PATH"
2191   for ac_dir in $ac_dummy; do
2192     test -z "$ac_dir" && ac_dir=.
2193     if test -f $ac_dir/$ac_word; then
2194       ac_cv_prog_CC="gcc"
2195       break
2196     fi
2197   done
2198   IFS="$ac_save_ifs"
2199 fi
2200 fi
2201 CC="$ac_cv_prog_CC"
2202 if test -n "$CC"; then
2203   echo "$ac_t""$CC" 1>&6
2204 else
2205   echo "$ac_t""no" 1>&6
2206 fi
2207
2208 if test -z "$CC"; then
2209   # Extract the first word of "cc", so it can be a program name with args.
2210 set dummy cc; ac_word=$2
2211 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2212 echo "configure:2213: checking for $ac_word" >&5
2213 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
2214   echo $ac_n "(cached) $ac_c" 1>&6
2215 else
2216   if test -n "$CC"; then
2217   ac_cv_prog_CC="$CC" # Let the user override the test.
2218 else
2219   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2220   ac_prog_rejected=no
2221   ac_dummy="$PATH"
2222   for ac_dir in $ac_dummy; do
2223     test -z "$ac_dir" && ac_dir=.
2224     if test -f $ac_dir/$ac_word; then
2225       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
2226         ac_prog_rejected=yes
2227         continue
2228       fi
2229       ac_cv_prog_CC="cc"
2230       break
2231     fi
2232   done
2233   IFS="$ac_save_ifs"
2234 if test $ac_prog_rejected = yes; then
2235   # We found a bogon in the path, so make sure we never use it.
2236   set dummy $ac_cv_prog_CC
2237   shift
2238   if test $# -gt 0; then
2239     # We chose a different compiler from the bogus one.
2240     # However, it has the same basename, so the bogon will be chosen
2241     # first if we set CC to just the basename; use the full file name.
2242     shift
2243     set dummy "$ac_dir/$ac_word" "$@"
2244     shift
2245     ac_cv_prog_CC="$@"
2246   fi
2247 fi
2248 fi
2249 fi
2250 CC="$ac_cv_prog_CC"
2251 if test -n "$CC"; then
2252   echo "$ac_t""$CC" 1>&6
2253 else
2254   echo "$ac_t""no" 1>&6
2255 fi
2256
2257   if test -z "$CC"; then
2258     case "`uname -s`" in
2259     *win32* | *WIN32*)
2260       # Extract the first word of "cl", so it can be a program name with args.
2261 set dummy cl; ac_word=$2
2262 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2263 echo "configure:2264: checking for $ac_word" >&5
2264 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
2265   echo $ac_n "(cached) $ac_c" 1>&6
2266 else
2267   if test -n "$CC"; then
2268   ac_cv_prog_CC="$CC" # Let the user override the test.
2269 else
2270   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2271   ac_dummy="$PATH"
2272   for ac_dir in $ac_dummy; do
2273     test -z "$ac_dir" && ac_dir=.
2274     if test -f $ac_dir/$ac_word; then
2275       ac_cv_prog_CC="cl"
2276       break
2277     fi
2278   done
2279   IFS="$ac_save_ifs"
2280 fi
2281 fi
2282 CC="$ac_cv_prog_CC"
2283 if test -n "$CC"; then
2284   echo "$ac_t""$CC" 1>&6
2285 else
2286   echo "$ac_t""no" 1>&6
2287 fi
2288  ;;
2289     esac
2290   fi
2291   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
2292 fi
2293
2294 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
2295 echo "configure:2296: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
2296
2297 ac_ext=c
2298 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2299 ac_cpp='$CPP $CPPFLAGS'
2300 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2301 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2302 cross_compiling=$ac_cv_prog_cc_cross
2303
2304 cat > conftest.$ac_ext << EOF
2305
2306 #line 2307 "configure"
2307 #include "confdefs.h"
2308
2309 main(){return(0);}
2310 EOF
2311 if { (eval echo configure:2312: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2312   ac_cv_prog_cc_works=yes
2313   # If we can't run a trivial program, we are probably using a cross compiler.
2314   if (./conftest; exit) 2>/dev/null; then
2315     ac_cv_prog_cc_cross=no
2316   else
2317     ac_cv_prog_cc_cross=yes
2318   fi
2319 else
2320   echo "configure: failed program was:" >&5
2321   cat conftest.$ac_ext >&5
2322   ac_cv_prog_cc_works=no
2323 fi
2324 rm -fr conftest*
2325 ac_ext=c
2326 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2327 ac_cpp='$CPP $CPPFLAGS'
2328 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2329 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2330 cross_compiling=$ac_cv_prog_cc_cross
2331
2332 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
2333 if test $ac_cv_prog_cc_works = no; then
2334   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
2335 fi
2336 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
2337 echo "configure:2338: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
2338 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
2339 cross_compiling=$ac_cv_prog_cc_cross
2340
2341 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
2342 echo "configure:2343: checking whether we are using GNU C" >&5
2343 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
2344   echo $ac_n "(cached) $ac_c" 1>&6
2345 else
2346   cat > conftest.c <<EOF
2347 #ifdef __GNUC__
2348   yes;
2349 #endif
2350 EOF
2351 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2352: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
2352   ac_cv_prog_gcc=yes
2353 else
2354   ac_cv_prog_gcc=no
2355 fi
2356 fi
2357
2358 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
2359
2360 if test $ac_cv_prog_gcc = yes; then
2361   GCC=yes
2362 else
2363   GCC=
2364 fi
2365
2366 ac_test_CFLAGS="${CFLAGS+set}"
2367 ac_save_CFLAGS="$CFLAGS"
2368 CFLAGS=
2369 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
2370 echo "configure:2371: checking whether ${CC-cc} accepts -g" >&5
2371 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
2372   echo $ac_n "(cached) $ac_c" 1>&6
2373 else
2374   echo 'void f(){}' > conftest.c
2375 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
2376   ac_cv_prog_cc_g=yes
2377 else
2378   ac_cv_prog_cc_g=no
2379 fi
2380 rm -f conftest*
2381
2382 fi
2383
2384 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
2385 if test "$ac_test_CFLAGS" = set; then
2386   CFLAGS="$ac_save_CFLAGS"
2387 elif test $ac_cv_prog_cc_g = yes; then
2388   if test "$GCC" = yes; then
2389     CFLAGS="-g -O2"
2390   else
2391     CFLAGS="-g"
2392   fi
2393 else
2394   if test "$GCC" = yes; then
2395     CFLAGS="-O2"
2396   else
2397     CFLAGS=
2398   fi
2399 fi
2400
2401   
2402
2403   
2404          
2405          
2406
2407 TARGETDIR="unknown"
2408 case "$host" in
2409 mips-sgi-irix5.* | mips-sgi-irix6.*) TARGET=MIPS; TARGETDIR=mips;;
2410 i*86-*-linux*) TARGET=X86; TARGETDIR=x86;;
2411 i*86-*-solaris*) TARGET=X86; TARGETDIR=x86;;
2412 i*86-*-beos*) TARGET=X86; TARGETDIR=x86;;
2413 i*86-*-freebsd*) TARGET=X86; TARGETDIR=x86;;
2414 i*86-*-netbsdelf*) TARGET=X86; TARGETDIR=x86;;
2415 i*86-*-win32*) TARGET=X86_WIN32; TARGETDIR=x86;;
2416 i*86-*-cygwin*) TARGET=X86_WIN32; TARGETDIR=x86;;
2417 i*86-*-mingw*) TARGET=X86_WIN32; TARGETDIR=x86;;
2418 sparc-sun-4*) TARGET=SPARC; TARGETDIR=sparc;;
2419 sparc*-sun-*) TARGET=SPARC; TARGETDIR=sparc;;
2420 sparc-*-linux* | sparc-*-netbsdelf*) TARGET=SPARC; TARGETDIR=sparc;;
2421 sparc64-*-linux* | sparc64-*-netbsd*) TARGET=SPARC; TARGETDIR=sparc;;
2422 alpha*-*-linux* | alpha*-*-osf* | alpha*-*-freebsd* | alpha*-*-netbsd*) TARGET=ALPHA; TARGETDIR=alpha;;
2423 ia64*-*-*) TARGET=IA64; TARGETDIR=ia64;;
2424 m68k-*-linux*) TARGET=M68K; TARGETDIR=m68k;;
2425 mips64*-*);;
2426 mips*-*-linux*) TARGET=MIPS_LINUX; TARGETDIR=mips;;
2427 powerpc-*-linux* | powerpc-*-sysv*) TARGET=POWERPC; TARGETDIR=powerpc;;
2428 powerpc-*-beos*) TARGET=POWERPC; TARGETDIR=powerpc;;
2429 powerpc-*-darwin*) TARGET=POWERPC_DARWIN; TARGETDIR=powerpc;;
2430 powerpc-*-aix*) TARGET=POWERPC_AIX; TARGETDIR=powerpc;;
2431 rs6000-*-aix*) TARGET=POWERPC_AIX; TARGETDIR=powerpc;;
2432 arm*-*-linux-*) TARGET=ARM; TARGETDIR=arm;;
2433 s390-*-linux-*) TARGET=S390; TARGETDIR=s390;;
2434 s390x-*-linux-*) TARGET=S390; TARGETDIR=s390;;
2435 x86_64-*-linux*) TARGET=X86_64; TARGETDIR=x86;;
2436 sh-*-linux* | sh[34]*-*-linux*) TARGET=SH; TARGETDIR=sh;;
2437 esac
2438
2439 if test $TARGETDIR = unknown; then
2440   { echo "configure: error: "libffi has not been ported to $host."" 1>&2; exit 1; }
2441 fi
2442
2443
2444
2445 if test ${TARGET}${ac_cv_prog_gcc} = MIPSyes; then
2446   MIPS_GCC_TRUE=
2447   MIPS_GCC_FALSE='#'
2448 else
2449   MIPS_GCC_TRUE='#'
2450   MIPS_GCC_FALSE=
2451 fi
2452
2453
2454 if test ${TARGET}${ac_cv_prog_gcc} = MIPSno; then
2455   MIPS_SGI_TRUE=
2456   MIPS_SGI_FALSE='#'
2457 else
2458   MIPS_SGI_TRUE='#'
2459   MIPS_SGI_FALSE=
2460 fi
2461
2462
2463 if test x$TARGET = xMIPS_LINUX; then
2464   MIPS_LINUX_TRUE=
2465   MIPS_LINUX_FALSE='#'
2466 else
2467   MIPS_LINUX_TRUE='#'
2468   MIPS_LINUX_FALSE=
2469 fi
2470
2471
2472 if test x$TARGET = xSPARC; then
2473   SPARC_TRUE=
2474   SPARC_FALSE='#'
2475 else
2476   SPARC_TRUE='#'
2477   SPARC_FALSE=
2478 fi
2479
2480
2481 if test x$TARGET = xX86; then
2482   X86_TRUE=
2483   X86_FALSE='#'
2484 else
2485   X86_TRUE='#'
2486   X86_FALSE=
2487 fi
2488
2489
2490 if test x$TARGET = xX86_WIN32; then
2491   X86_WIN32_TRUE=
2492   X86_WIN32_FALSE='#'
2493 else
2494   X86_WIN32_TRUE='#'
2495   X86_WIN32_FALSE=
2496 fi
2497
2498
2499 if test x$TARGET = xALPHA; then
2500   ALPHA_TRUE=
2501   ALPHA_FALSE='#'
2502 else
2503   ALPHA_TRUE='#'
2504   ALPHA_FALSE=
2505 fi
2506
2507
2508 if test x$TARGET = xIA64; then
2509   IA64_TRUE=
2510   IA64_FALSE='#'
2511 else
2512   IA64_TRUE='#'
2513   IA64_FALSE=
2514 fi
2515
2516
2517 if test x$TARGET = xM68K; then
2518   M68K_TRUE=
2519   M68K_FALSE='#'
2520 else
2521   M68K_TRUE='#'
2522   M68K_FALSE=
2523 fi
2524
2525
2526 if test x$TARGET = xPOWERPC; then
2527   POWERPC_TRUE=
2528   POWERPC_FALSE='#'
2529 else
2530   POWERPC_TRUE='#'
2531   POWERPC_FALSE=
2532 fi
2533
2534
2535 if test x$TARGET = xPOWERPC_AIX; then
2536   POWERPC_AIX_TRUE=
2537   POWERPC_AIX_FALSE='#'
2538 else
2539   POWERPC_AIX_TRUE='#'
2540   POWERPC_AIX_FALSE=
2541 fi
2542
2543
2544 if test x$TARGET = xPOWERPC_DARWIN; then
2545   POWERPC_DARWIN_TRUE=
2546   POWERPC_DARWIN_FALSE='#'
2547 else
2548   POWERPC_DARWIN_TRUE='#'
2549   POWERPC_DARWIN_FALSE=
2550 fi
2551
2552
2553 if test x$TARGET = xARM; then
2554   ARM_TRUE=
2555   ARM_FALSE='#'
2556 else
2557   ARM_TRUE='#'
2558   ARM_FALSE=
2559 fi
2560
2561
2562 if test x$TARGET = xS390; then
2563   S390_TRUE=
2564   S390_FALSE='#'
2565 else
2566   S390_TRUE='#'
2567   S390_FALSE=
2568 fi
2569
2570
2571 if test x$TARGET = xX86_64; then
2572   X86_64_TRUE=
2573   X86_64_FALSE='#'
2574 else
2575   X86_64_TRUE='#'
2576   X86_64_FALSE=
2577 fi
2578
2579
2580 if test x$TARGET = xSH; then
2581   SH_TRUE=
2582   SH_FALSE='#'
2583 else
2584   SH_TRUE='#'
2585   SH_FALSE=
2586 fi
2587
2588 if test x$TARGET = xMIPS_LINUX; then
2589   TARGET=MIPS
2590 fi
2591
2592 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
2593 echo "configure:2594: checking how to run the C preprocessor" >&5
2594 # On Suns, sometimes $CPP names a directory.
2595 if test -n "$CPP" && test -d "$CPP"; then
2596   CPP=
2597 fi
2598 if test -z "$CPP"; then
2599 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
2600   echo $ac_n "(cached) $ac_c" 1>&6
2601 else
2602     # This must be in double quotes, not single quotes, because CPP may get
2603   # substituted into the Makefile and "${CC-cc}" will confuse make.
2604   CPP="${CC-cc} -E"
2605   # On the NeXT, cc -E runs the code through the compiler's parser,
2606   # not just through cpp.
2607   cat > conftest.$ac_ext <<EOF
2608 #line 2609 "configure"
2609 #include "confdefs.h"
2610 #include <assert.h>
2611 Syntax Error
2612 EOF
2613 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2614 { (eval echo configure:2615: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2615 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2616 if test -z "$ac_err"; then
2617   :
2618 else
2619   echo "$ac_err" >&5
2620   echo "configure: failed program was:" >&5
2621   cat conftest.$ac_ext >&5
2622   rm -rf conftest*
2623   CPP="${CC-cc} -E -traditional-cpp"
2624   cat > conftest.$ac_ext <<EOF
2625 #line 2626 "configure"
2626 #include "confdefs.h"
2627 #include <assert.h>
2628 Syntax Error
2629 EOF
2630 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2631 { (eval echo configure:2632: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2632 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2633 if test -z "$ac_err"; then
2634   :
2635 else
2636   echo "$ac_err" >&5
2637   echo "configure: failed program was:" >&5
2638   cat conftest.$ac_ext >&5
2639   rm -rf conftest*
2640   CPP="${CC-cc} -nologo -E"
2641   cat > conftest.$ac_ext <<EOF
2642 #line 2643 "configure"
2643 #include "confdefs.h"
2644 #include <assert.h>
2645 Syntax Error
2646 EOF
2647 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2648 { (eval echo configure:2649: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2649 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2650 if test -z "$ac_err"; then
2651   :
2652 else
2653   echo "$ac_err" >&5
2654   echo "configure: failed program was:" >&5
2655   cat conftest.$ac_ext >&5
2656   rm -rf conftest*
2657   CPP=/lib/cpp
2658 fi
2659 rm -f conftest*
2660 fi
2661 rm -f conftest*
2662 fi
2663 rm -f conftest*
2664   ac_cv_prog_CPP="$CPP"
2665 fi
2666   CPP="$ac_cv_prog_CPP"
2667 else
2668   ac_cv_prog_CPP="$CPP"
2669 fi
2670 echo "$ac_t""$CPP" 1>&6
2671
2672 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
2673 echo "configure:2674: checking for ANSI C header files" >&5
2674 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
2675   echo $ac_n "(cached) $ac_c" 1>&6
2676 else
2677   cat > conftest.$ac_ext <<EOF
2678 #line 2679 "configure"
2679 #include "confdefs.h"
2680 #include <stdlib.h>
2681 #include <stdarg.h>
2682 #include <string.h>
2683 #include <float.h>
2684 EOF
2685 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2686 { (eval echo configure:2687: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2687 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2688 if test -z "$ac_err"; then
2689   rm -rf conftest*
2690   ac_cv_header_stdc=yes
2691 else
2692   echo "$ac_err" >&5
2693   echo "configure: failed program was:" >&5
2694   cat conftest.$ac_ext >&5
2695   rm -rf conftest*
2696   ac_cv_header_stdc=no
2697 fi
2698 rm -f conftest*
2699
2700 if test $ac_cv_header_stdc = yes; then
2701   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
2702 cat > conftest.$ac_ext <<EOF
2703 #line 2704 "configure"
2704 #include "confdefs.h"
2705 #include <string.h>
2706 EOF
2707 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2708   egrep "memchr" >/dev/null 2>&1; then
2709   :
2710 else
2711   rm -rf conftest*
2712   ac_cv_header_stdc=no
2713 fi
2714 rm -f conftest*
2715
2716 fi
2717
2718 if test $ac_cv_header_stdc = yes; then
2719   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
2720 cat > conftest.$ac_ext <<EOF
2721 #line 2722 "configure"
2722 #include "confdefs.h"
2723 #include <stdlib.h>
2724 EOF
2725 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2726   egrep "free" >/dev/null 2>&1; then
2727   :
2728 else
2729   rm -rf conftest*
2730   ac_cv_header_stdc=no
2731 fi
2732 rm -f conftest*
2733
2734 fi
2735
2736 if test $ac_cv_header_stdc = yes; then
2737   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
2738 if test "$cross_compiling" = yes; then
2739   :
2740 else
2741   cat > conftest.$ac_ext <<EOF
2742 #line 2743 "configure"
2743 #include "confdefs.h"
2744 #include <ctype.h>
2745 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
2746 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
2747 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
2748 int main () { int i; for (i = 0; i < 256; i++)
2749 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
2750 exit (0); }
2751
2752 EOF
2753 if { (eval echo configure:2754: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2754 then
2755   :
2756 else
2757   echo "configure: failed program was:" >&5
2758   cat conftest.$ac_ext >&5
2759   rm -fr conftest*
2760   ac_cv_header_stdc=no
2761 fi
2762 rm -fr conftest*
2763 fi
2764
2765 fi
2766 fi
2767
2768 echo "$ac_t""$ac_cv_header_stdc" 1>&6
2769 if test $ac_cv_header_stdc = yes; then
2770   cat >> confdefs.h <<\EOF
2771 #define STDC_HEADERS 1
2772 EOF
2773
2774 fi
2775
2776 for ac_func in memcpy
2777 do
2778 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2779 echo "configure:2780: checking for $ac_func" >&5
2780 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2781   echo $ac_n "(cached) $ac_c" 1>&6
2782 else
2783   cat > conftest.$ac_ext <<EOF
2784 #line 2785 "configure"
2785 #include "confdefs.h"
2786 /* System header to define __stub macros and hopefully few prototypes,
2787     which can conflict with char $ac_func(); below.  */
2788 #include <assert.h>
2789 /* Override any gcc2 internal prototype to avoid an error.  */
2790 /* We use char because int might match the return type of a gcc2
2791     builtin and then its argument prototype would still apply.  */
2792 char $ac_func();
2793
2794 int main() {
2795
2796 /* The GNU C library defines this for functions which it implements
2797     to always fail with ENOSYS.  Some functions are actually named
2798     something starting with __ and the normal name is an alias.  */
2799 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2800 choke me
2801 #else
2802 $ac_func();
2803 #endif
2804
2805 ; return 0; }
2806 EOF
2807 if { (eval echo configure:2808: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2808   rm -rf conftest*
2809   eval "ac_cv_func_$ac_func=yes"
2810 else
2811   echo "configure: failed program was:" >&5
2812   cat conftest.$ac_ext >&5
2813   rm -rf conftest*
2814   eval "ac_cv_func_$ac_func=no"
2815 fi
2816 rm -f conftest*
2817 fi
2818
2819 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2820   echo "$ac_t""yes" 1>&6
2821     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2822   cat >> confdefs.h <<EOF
2823 #define $ac_tr_func 1
2824 EOF
2825  
2826 else
2827   echo "$ac_t""no" 1>&6
2828 fi
2829 done
2830
2831 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
2832 # for constant arguments.  Useless!
2833 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
2834 echo "configure:2835: checking for working alloca.h" >&5
2835 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
2836   echo $ac_n "(cached) $ac_c" 1>&6
2837 else
2838   cat > conftest.$ac_ext <<EOF
2839 #line 2840 "configure"
2840 #include "confdefs.h"
2841 #include <alloca.h>
2842 int main() {
2843 char *p = alloca(2 * sizeof(int));
2844 ; return 0; }
2845 EOF
2846 if { (eval echo configure:2847: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2847   rm -rf conftest*
2848   ac_cv_header_alloca_h=yes
2849 else
2850   echo "configure: failed program was:" >&5
2851   cat conftest.$ac_ext >&5
2852   rm -rf conftest*
2853   ac_cv_header_alloca_h=no
2854 fi
2855 rm -f conftest*
2856 fi
2857
2858 echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
2859 if test $ac_cv_header_alloca_h = yes; then
2860   cat >> confdefs.h <<\EOF
2861 #define HAVE_ALLOCA_H 1
2862 EOF
2863
2864 fi
2865
2866 echo $ac_n "checking for alloca""... $ac_c" 1>&6
2867 echo "configure:2868: checking for alloca" >&5
2868 if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
2869   echo $ac_n "(cached) $ac_c" 1>&6
2870 else
2871   cat > conftest.$ac_ext <<EOF
2872 #line 2873 "configure"
2873 #include "confdefs.h"
2874
2875 #ifdef __GNUC__
2876 # define alloca __builtin_alloca
2877 #else
2878 # ifdef _MSC_VER
2879 #  include <malloc.h>
2880 #  define alloca _alloca
2881 # else
2882 #  if HAVE_ALLOCA_H
2883 #   include <alloca.h>
2884 #  else
2885 #   ifdef _AIX
2886  #pragma alloca
2887 #   else
2888 #    ifndef alloca /* predefined by HP cc +Olibcalls */
2889 char *alloca ();
2890 #    endif
2891 #   endif
2892 #  endif
2893 # endif
2894 #endif
2895
2896 int main() {
2897 char *p = (char *) alloca(1);
2898 ; return 0; }
2899 EOF
2900 if { (eval echo configure:2901: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2901   rm -rf conftest*
2902   ac_cv_func_alloca_works=yes
2903 else
2904   echo "configure: failed program was:" >&5
2905   cat conftest.$ac_ext >&5
2906   rm -rf conftest*
2907   ac_cv_func_alloca_works=no
2908 fi
2909 rm -f conftest*
2910 fi
2911
2912 echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
2913 if test $ac_cv_func_alloca_works = yes; then
2914   cat >> confdefs.h <<\EOF
2915 #define HAVE_ALLOCA 1
2916 EOF
2917
2918 fi
2919
2920 if test $ac_cv_func_alloca_works = no; then
2921   # The SVR3 libPW and SVR4 libucb both contain incompatible functions
2922   # that cause trouble.  Some versions do not even contain alloca or
2923   # contain a buggy version.  If you still want to use their alloca,
2924   # use ar to extract alloca.o from them instead of compiling alloca.c.
2925   ALLOCA=alloca.${ac_objext}
2926   cat >> confdefs.h <<\EOF
2927 #define C_ALLOCA 1
2928 EOF
2929
2930
2931 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
2932 echo "configure:2933: checking whether alloca needs Cray hooks" >&5
2933 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
2934   echo $ac_n "(cached) $ac_c" 1>&6
2935 else
2936   cat > conftest.$ac_ext <<EOF
2937 #line 2938 "configure"
2938 #include "confdefs.h"
2939 #if defined(CRAY) && ! defined(CRAY2)
2940 webecray
2941 #else
2942 wenotbecray
2943 #endif
2944
2945 EOF
2946 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2947   egrep "webecray" >/dev/null 2>&1; then
2948   rm -rf conftest*
2949   ac_cv_os_cray=yes
2950 else
2951   rm -rf conftest*
2952   ac_cv_os_cray=no
2953 fi
2954 rm -f conftest*
2955
2956 fi
2957
2958 echo "$ac_t""$ac_cv_os_cray" 1>&6
2959 if test $ac_cv_os_cray = yes; then
2960 for ac_func in _getb67 GETB67 getb67; do
2961   echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2962 echo "configure:2963: checking for $ac_func" >&5
2963 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2964   echo $ac_n "(cached) $ac_c" 1>&6
2965 else
2966   cat > conftest.$ac_ext <<EOF
2967 #line 2968 "configure"
2968 #include "confdefs.h"
2969 /* System header to define __stub macros and hopefully few prototypes,
2970     which can conflict with char $ac_func(); below.  */
2971 #include <assert.h>
2972 /* Override any gcc2 internal prototype to avoid an error.  */
2973 /* We use char because int might match the return type of a gcc2
2974     builtin and then its argument prototype would still apply.  */
2975 char $ac_func();
2976
2977 int main() {
2978
2979 /* The GNU C library defines this for functions which it implements
2980     to always fail with ENOSYS.  Some functions are actually named
2981     something starting with __ and the normal name is an alias.  */
2982 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2983 choke me
2984 #else
2985 $ac_func();
2986 #endif
2987
2988 ; return 0; }
2989 EOF
2990 if { (eval echo configure:2991: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2991   rm -rf conftest*
2992   eval "ac_cv_func_$ac_func=yes"
2993 else
2994   echo "configure: failed program was:" >&5
2995   cat conftest.$ac_ext >&5
2996   rm -rf conftest*
2997   eval "ac_cv_func_$ac_func=no"
2998 fi
2999 rm -f conftest*
3000 fi
3001
3002 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3003   echo "$ac_t""yes" 1>&6
3004   cat >> confdefs.h <<EOF
3005 #define CRAY_STACKSEG_END $ac_func
3006 EOF
3007
3008   break
3009 else
3010   echo "$ac_t""no" 1>&6
3011 fi
3012
3013 done
3014 fi
3015
3016 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
3017 echo "configure:3018: checking stack direction for C alloca" >&5
3018 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
3019   echo $ac_n "(cached) $ac_c" 1>&6
3020 else
3021   if test "$cross_compiling" = yes; then
3022   ac_cv_c_stack_direction=0
3023 else
3024   cat > conftest.$ac_ext <<EOF
3025 #line 3026 "configure"
3026 #include "confdefs.h"
3027 find_stack_direction ()
3028 {
3029   static char *addr = 0;
3030   auto char dummy;
3031   if (addr == 0)
3032     {
3033       addr = &dummy;
3034       return find_stack_direction ();
3035     }
3036   else
3037     return (&dummy > addr) ? 1 : -1;
3038 }
3039 main ()
3040 {
3041   exit (find_stack_direction() < 0);
3042 }
3043 EOF
3044 if { (eval echo configure:3045: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3045 then
3046   ac_cv_c_stack_direction=1
3047 else
3048   echo "configure: failed program was:" >&5
3049   cat conftest.$ac_ext >&5
3050   rm -fr conftest*
3051   ac_cv_c_stack_direction=-1
3052 fi
3053 rm -fr conftest*
3054 fi
3055
3056 fi
3057
3058 echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
3059 cat >> confdefs.h <<EOF
3060 #define STACK_DIRECTION $ac_cv_c_stack_direction
3061 EOF
3062
3063 fi
3064
3065
3066 echo $ac_n "checking size of short""... $ac_c" 1>&6
3067 echo "configure:3068: checking size of short" >&5
3068 if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
3069   echo $ac_n "(cached) $ac_c" 1>&6
3070 else
3071   for ac_size in 4 8 1 2 16 12  ; do # List sizes in rough order of prevalence.
3072   cat > conftest.$ac_ext <<EOF
3073 #line 3074 "configure"
3074 #include "confdefs.h"
3075 #include "confdefs.h"
3076 #include <sys/types.h>
3077
3078
3079 int main() {
3080 switch (0) case 0: case (sizeof (short) == $ac_size):;
3081 ; return 0; }
3082 EOF
3083 if { (eval echo configure:3084: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3084   rm -rf conftest*
3085   ac_cv_sizeof_short=$ac_size
3086 else
3087   echo "configure: failed program was:" >&5
3088   cat conftest.$ac_ext >&5
3089 fi
3090 rm -f conftest*
3091   if test x$ac_cv_sizeof_short != x ; then break; fi
3092 done
3093
3094 fi
3095
3096 if test x$ac_cv_sizeof_short = x ; then
3097   { echo "configure: error: cannot determine a size for short" 1>&2; exit 1; }
3098 fi
3099 echo "$ac_t""$ac_cv_sizeof_short" 1>&6
3100 cat >> confdefs.h <<EOF
3101 #define SIZEOF_SHORT $ac_cv_sizeof_short
3102 EOF
3103
3104
3105 echo $ac_n "checking size of int""... $ac_c" 1>&6
3106 echo "configure:3107: checking size of int" >&5
3107 if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
3108   echo $ac_n "(cached) $ac_c" 1>&6
3109 else
3110   for ac_size in 4 8 1 2 16 12  ; do # List sizes in rough order of prevalence.
3111   cat > conftest.$ac_ext <<EOF
3112 #line 3113 "configure"
3113 #include "confdefs.h"
3114 #include "confdefs.h"
3115 #include <sys/types.h>
3116
3117
3118 int main() {
3119 switch (0) case 0: case (sizeof (int) == $ac_size):;
3120 ; return 0; }
3121 EOF
3122 if { (eval echo configure:3123: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3123   rm -rf conftest*
3124   ac_cv_sizeof_int=$ac_size
3125 else
3126   echo "configure: failed program was:" >&5
3127   cat conftest.$ac_ext >&5
3128 fi
3129 rm -f conftest*
3130   if test x$ac_cv_sizeof_int != x ; then break; fi
3131 done
3132
3133 fi
3134
3135 if test x$ac_cv_sizeof_int = x ; then
3136   { echo "configure: error: cannot determine a size for int" 1>&2; exit 1; }
3137 fi
3138 echo "$ac_t""$ac_cv_sizeof_int" 1>&6
3139 cat >> confdefs.h <<EOF
3140 #define SIZEOF_INT $ac_cv_sizeof_int
3141 EOF
3142
3143
3144 echo $ac_n "checking size of long""... $ac_c" 1>&6
3145 echo "configure:3146: checking size of long" >&5
3146 if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
3147   echo $ac_n "(cached) $ac_c" 1>&6
3148 else
3149   for ac_size in 4 8 1 2 16 12  ; do # List sizes in rough order of prevalence.
3150   cat > conftest.$ac_ext <<EOF
3151 #line 3152 "configure"
3152 #include "confdefs.h"
3153 #include "confdefs.h"
3154 #include <sys/types.h>
3155
3156
3157 int main() {
3158 switch (0) case 0: case (sizeof (long) == $ac_size):;
3159 ; return 0; }
3160 EOF
3161 if { (eval echo configure:3162: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3162   rm -rf conftest*
3163   ac_cv_sizeof_long=$ac_size
3164 else
3165   echo "configure: failed program was:" >&5
3166   cat conftest.$ac_ext >&5
3167 fi
3168 rm -f conftest*
3169   if test x$ac_cv_sizeof_long != x ; then break; fi
3170 done
3171
3172 fi
3173
3174 if test x$ac_cv_sizeof_long = x ; then
3175   { echo "configure: error: cannot determine a size for long" 1>&2; exit 1; }
3176 fi
3177 echo "$ac_t""$ac_cv_sizeof_long" 1>&6
3178 cat >> confdefs.h <<EOF
3179 #define SIZEOF_LONG $ac_cv_sizeof_long
3180 EOF
3181
3182
3183 echo $ac_n "checking size of long long""... $ac_c" 1>&6
3184 echo "configure:3185: checking size of long long" >&5
3185 if eval "test \"`echo '$''{'ac_cv_sizeof_long_long'+set}'`\" = set"; then
3186   echo $ac_n "(cached) $ac_c" 1>&6
3187 else
3188   for ac_size in 4 8 1 2 16 12  ; do # List sizes in rough order of prevalence.
3189   cat > conftest.$ac_ext <<EOF
3190 #line 3191 "configure"
3191 #include "confdefs.h"
3192 #include "confdefs.h"
3193 #include <sys/types.h>
3194
3195
3196 int main() {
3197 switch (0) case 0: case (sizeof (long long) == $ac_size):;
3198 ; return 0; }
3199 EOF
3200 if { (eval echo configure:3201: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3201   rm -rf conftest*
3202   ac_cv_sizeof_long_long=$ac_size
3203 else
3204   echo "configure: failed program was:" >&5
3205   cat conftest.$ac_ext >&5
3206 fi
3207 rm -f conftest*
3208   if test x$ac_cv_sizeof_long_long != x ; then break; fi
3209 done
3210
3211 fi
3212
3213 if test x$ac_cv_sizeof_long_long = x ; then
3214   { echo "configure: error: cannot determine a size for long long" 1>&2; exit 1; }
3215 fi
3216 echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6
3217 cat >> confdefs.h <<EOF
3218 #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
3219 EOF
3220
3221
3222 echo $ac_n "checking size of float""... $ac_c" 1>&6
3223 echo "configure:3224: checking size of float" >&5
3224 if eval "test \"`echo '$''{'ac_cv_sizeof_float'+set}'`\" = set"; then
3225   echo $ac_n "(cached) $ac_c" 1>&6
3226 else
3227   for ac_size in 4 8 1 2 16 12  ; do # List sizes in rough order of prevalence.
3228   cat > conftest.$ac_ext <<EOF
3229 #line 3230 "configure"
3230 #include "confdefs.h"
3231 #include "confdefs.h"
3232 #include <sys/types.h>
3233
3234
3235 int main() {
3236 switch (0) case 0: case (sizeof (float) == $ac_size):;
3237 ; return 0; }
3238 EOF
3239 if { (eval echo configure:3240: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3240   rm -rf conftest*
3241   ac_cv_sizeof_float=$ac_size
3242 else
3243   echo "configure: failed program was:" >&5
3244   cat conftest.$ac_ext >&5
3245 fi
3246 rm -f conftest*
3247   if test x$ac_cv_sizeof_float != x ; then break; fi
3248 done
3249
3250 fi
3251
3252 if test x$ac_cv_sizeof_float = x ; then
3253   { echo "configure: error: cannot determine a size for float" 1>&2; exit 1; }
3254 fi
3255 echo "$ac_t""$ac_cv_sizeof_float" 1>&6
3256 cat >> confdefs.h <<EOF
3257 #define SIZEOF_FLOAT $ac_cv_sizeof_float
3258 EOF
3259
3260
3261 echo $ac_n "checking size of double""... $ac_c" 1>&6
3262 echo "configure:3263: checking size of double" >&5
3263 if eval "test \"`echo '$''{'ac_cv_sizeof_double'+set}'`\" = set"; then
3264   echo $ac_n "(cached) $ac_c" 1>&6
3265 else
3266   for ac_size in 4 8 1 2 16 12  ; do # List sizes in rough order of prevalence.
3267   cat > conftest.$ac_ext <<EOF
3268 #line 3269 "configure"
3269 #include "confdefs.h"
3270 #include "confdefs.h"
3271 #include <sys/types.h>
3272
3273
3274 int main() {
3275 switch (0) case 0: case (sizeof (double) == $ac_size):;
3276 ; return 0; }
3277 EOF
3278 if { (eval echo configure:3279: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3279   rm -rf conftest*
3280   ac_cv_sizeof_double=$ac_size
3281 else
3282   echo "configure: failed program was:" >&5
3283   cat conftest.$ac_ext >&5
3284 fi
3285 rm -f conftest*
3286   if test x$ac_cv_sizeof_double != x ; then break; fi
3287 done
3288
3289 fi
3290
3291 if test x$ac_cv_sizeof_double = x ; then
3292   { echo "configure: error: cannot determine a size for double" 1>&2; exit 1; }
3293 fi
3294 echo "$ac_t""$ac_cv_sizeof_double" 1>&6
3295 cat >> confdefs.h <<EOF
3296 #define SIZEOF_DOUBLE $ac_cv_sizeof_double
3297 EOF
3298
3299
3300 echo $ac_n "checking size of long double""... $ac_c" 1>&6
3301 echo "configure:3302: checking size of long double" >&5
3302 if eval "test \"`echo '$''{'ac_cv_sizeof_long_double'+set}'`\" = set"; then
3303   echo $ac_n "(cached) $ac_c" 1>&6
3304 else
3305   for ac_size in 4 8 1 2 16 12  ; do # List sizes in rough order of prevalence.
3306   cat > conftest.$ac_ext <<EOF
3307 #line 3308 "configure"
3308 #include "confdefs.h"
3309 #include "confdefs.h"
3310 #include <sys/types.h>
3311
3312
3313 int main() {
3314 switch (0) case 0: case (sizeof (long double) == $ac_size):;
3315 ; return 0; }
3316 EOF
3317 if { (eval echo configure:3318: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3318   rm -rf conftest*
3319   ac_cv_sizeof_long_double=$ac_size
3320 else
3321   echo "configure: failed program was:" >&5
3322   cat conftest.$ac_ext >&5
3323 fi
3324 rm -f conftest*
3325   if test x$ac_cv_sizeof_long_double != x ; then break; fi
3326 done
3327
3328 fi
3329
3330 if test x$ac_cv_sizeof_long_double = x ; then
3331   { echo "configure: error: cannot determine a size for long double" 1>&2; exit 1; }
3332 fi
3333 echo "$ac_t""$ac_cv_sizeof_long_double" 1>&6
3334 cat >> confdefs.h <<EOF
3335 #define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
3336 EOF
3337
3338
3339
3340 echo $ac_n "checking size of void *""... $ac_c" 1>&6
3341 echo "configure:3342: checking size of void *" >&5
3342 if eval "test \"`echo '$''{'ac_cv_sizeof_void_p'+set}'`\" = set"; then
3343   echo $ac_n "(cached) $ac_c" 1>&6
3344 else
3345   for ac_size in 4 8 1 2 16 12  ; do # List sizes in rough order of prevalence.
3346   cat > conftest.$ac_ext <<EOF
3347 #line 3348 "configure"
3348 #include "confdefs.h"
3349 #include "confdefs.h"
3350 #include <sys/types.h>
3351
3352
3353 int main() {
3354 switch (0) case 0: case (sizeof (void *) == $ac_size):;
3355 ; return 0; }
3356 EOF
3357 if { (eval echo configure:3358: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3358   rm -rf conftest*
3359   ac_cv_sizeof_void_p=$ac_size
3360 else
3361   echo "configure: failed program was:" >&5
3362   cat conftest.$ac_ext >&5
3363 fi
3364 rm -f conftest*
3365   if test x$ac_cv_sizeof_void_p != x ; then break; fi
3366 done
3367
3368 fi
3369
3370 if test x$ac_cv_sizeof_void_p = x ; then
3371   { echo "configure: error: cannot determine a size for void *" 1>&2; exit 1; }
3372 fi
3373 echo "$ac_t""$ac_cv_sizeof_void_p" 1>&6
3374 cat >> confdefs.h <<EOF
3375 #define SIZEOF_VOID_P $ac_cv_sizeof_void_p
3376 EOF
3377
3378
3379 echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
3380 echo "configure:3381: checking whether byte ordering is bigendian" >&5
3381 if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
3382   echo $ac_n "(cached) $ac_c" 1>&6
3383 else
3384   ac_cv_c_bigendian=unknown
3385 # See if sys/param.h defines the BYTE_ORDER macro.
3386 cat > conftest.$ac_ext <<EOF
3387 #line 3388 "configure"
3388 #include "confdefs.h"
3389 #include <sys/types.h>
3390 #include <sys/param.h>
3391 int main() {
3392
3393 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
3394  bogus endian macros
3395 #endif
3396 ; return 0; }
3397 EOF
3398 if { (eval echo configure:3399: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3399   rm -rf conftest*
3400   # It does; now see whether it defined to BIG_ENDIAN or not.
3401 cat > conftest.$ac_ext <<EOF
3402 #line 3403 "configure"
3403 #include "confdefs.h"
3404 #include <sys/types.h>
3405 #include <sys/param.h>
3406 int main() {
3407
3408 #if BYTE_ORDER != BIG_ENDIAN
3409  not big endian
3410 #endif
3411 ; return 0; }
3412 EOF
3413 if { (eval echo configure:3414: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3414   rm -rf conftest*
3415   ac_cv_c_bigendian=yes
3416 else
3417   echo "configure: failed program was:" >&5
3418   cat conftest.$ac_ext >&5
3419   rm -rf conftest*
3420   ac_cv_c_bigendian=no
3421 fi
3422 rm -f conftest*
3423 else
3424   echo "configure: failed program was:" >&5
3425   cat conftest.$ac_ext >&5
3426 fi
3427 rm -f conftest*
3428 if test $ac_cv_c_bigendian = unknown; then
3429 if test "$cross_compiling" = yes; then
3430    echo $ac_n "cross-compiling... " 2>&6 
3431 else
3432   cat > conftest.$ac_ext <<EOF
3433 #line 3434 "configure"
3434 #include "confdefs.h"
3435 main () {
3436   /* Are we little or big endian?  From Harbison&Steele.  */
3437   union
3438   {
3439     long l;
3440     char c[sizeof (long)];
3441   } u;
3442   u.l = 1;
3443   exit (u.c[sizeof (long) - 1] == 1);
3444 }
3445 EOF
3446 if { (eval echo configure:3447: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3447 then
3448   ac_cv_c_bigendian=no
3449 else
3450   echo "configure: failed program was:" >&5
3451   cat conftest.$ac_ext >&5
3452   rm -fr conftest*
3453   ac_cv_c_bigendian=yes
3454 fi
3455 rm -fr conftest*
3456 fi
3457
3458 fi
3459 fi
3460
3461 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
3462 if test $ac_cv_c_bigendian = unknown; then
3463 echo $ac_n "checking to probe for byte ordering""... $ac_c" 1>&6
3464 echo "configure:3465: checking to probe for byte ordering" >&5
3465
3466 cat >conftest.c <<EOF
3467 short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
3468 short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
3469 void _ascii() { char* s = (char*) ascii_mm; s = (char*) ascii_ii; }
3470 short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
3471 short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
3472 void _ebcdic() { char* s = (char*) ebcdic_mm; s = (char*) ebcdic_ii; }
3473 int main() { _ascii (); _ebcdic (); return 0; }
3474 EOF
3475  if test -f conftest.c ; then
3476      if ${CC-cc} ${CFLAGS} conftest.c -o conftest.o && test -f conftest.o ; then
3477         if test `grep -l BIGenDianSyS conftest.o` ; then
3478            echo $ac_n ' big endian probe OK, ' 1>&6
3479            ac_cv_c_bigendian=yes
3480         fi
3481         if test `grep -l LiTTleEnDian conftest.o` ; then
3482            echo $ac_n ' little endian probe OK, ' 1>&6
3483            if test $ac_cv_c_bigendian = yes ; then
3484             ac_cv_c_bigendian=unknown;
3485            else
3486             ac_cv_c_bigendian=no
3487            fi
3488         fi
3489         echo $ac_n 'guessing bigendian ...  ' >&6
3490      fi
3491   fi
3492 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
3493 fi
3494 if test $ac_cv_c_bigendian = yes; then
3495   cat >> confdefs.h <<\EOF
3496 #define WORDS_BIGENDIAN 1
3497 EOF
3498
3499   BYTEORDER=4321
3500 else
3501   BYTEORDER=1234
3502 fi
3503 cat >> confdefs.h <<EOF
3504 #define BYTEORDER $BYTEORDER
3505 EOF
3506
3507 if test $ac_cv_c_bigendian = unknown; then
3508   { echo "configure: error: unknown endianess - sorry" 1>&2; exit 1; }
3509 fi
3510
3511
3512 if test x$TARGET = xSPARC; then
3513     echo $ac_n "checking assembler and linker support unaligned pc related relocs""... $ac_c" 1>&6
3514 echo "configure:3515: checking assembler and linker support unaligned pc related relocs" >&5
3515 if eval "test \"`echo '$''{'libffi_cv_as_sparc_ua_pcrel'+set}'`\" = set"; then
3516   echo $ac_n "(cached) $ac_c" 1>&6
3517 else
3518   
3519         save_CFLAGS="$CFLAGS"
3520         save_LDFLAGS="$LDFLAGS"
3521         CFLAGS="$CFLAGS -fpic"
3522         LDFLAGS="$LDFLAGS -shared"
3523         cat > conftest.$ac_ext <<EOF
3524 #line 3525 "configure"
3525 #include "confdefs.h"
3526 asm (".text; foo: nop; .data; .align 4; .byte 0; .uaword %r_disp32(foo); .text");
3527 int main() {
3528
3529 ; return 0; }
3530 EOF
3531 if { (eval echo configure:3532: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3532   rm -rf conftest*
3533   libffi_cv_as_sparc_ua_pcrel=yes
3534 else
3535   echo "configure: failed program was:" >&5
3536   cat conftest.$ac_ext >&5
3537   rm -rf conftest*
3538   libffi_cv_as_sparc_ua_pcrel=no
3539 fi
3540 rm -f conftest*
3541         CFLAGS="$save_CFLAGS"
3542         LDFLAGS="$save_LDFLAGS"
3543 fi
3544
3545 echo "$ac_t""$libffi_cv_as_sparc_ua_pcrel" 1>&6
3546     if test "x$libffi_cv_as_sparc_ua_pcrel" = xyes; then
3547         cat >> confdefs.h <<\EOF
3548 #define HAVE_AS_SPARC_UA_PCREL 1
3549 EOF
3550
3551     fi
3552 fi
3553
3554
3555
3556
3557
3558
3559 # Check whether --enable-debug or --disable-debug was given.
3560 if test "${enable_debug+set}" = set; then
3561   enableval="$enable_debug"
3562   if test "$enable_debug" = "yes"; then
3563     cat >> confdefs.h <<\EOF
3564 #define FFI_DEBUG 1
3565 EOF
3566
3567   fi
3568 fi
3569
3570
3571 # Check whether --enable-structs or --disable-structs was given.
3572 if test "${enable_structs+set}" = set; then
3573   enableval="$enable_structs"
3574   if test "$enable_structs" = "no"; then
3575     cat >> confdefs.h <<\EOF
3576 #define FFI_NO_STRUCTS 1
3577 EOF
3578
3579   fi
3580 fi
3581
3582
3583 # Check whether --enable-raw-api or --disable-raw-api was given.
3584 if test "${enable_raw_api+set}" = set; then
3585   enableval="$enable_raw_api"
3586   if test "$enable_raw_api" = "no"; then
3587     cat >> confdefs.h <<\EOF
3588 #define FFI_NO_RAW_API 1
3589 EOF
3590
3591   fi
3592 fi
3593
3594
3595 # Check whether --enable-purify-safety or --disable-purify-safety was given.
3596 if test "${enable_purify_safety+set}" = set; then
3597   enableval="$enable_purify_safety"
3598   if test "$enable_purify_safety" = "yes"; then
3599     cat >> confdefs.h <<\EOF
3600 #define USING_PURIFY 1
3601 EOF
3602
3603   fi
3604 fi
3605
3606
3607
3608
3609 if test -z "$with_cross_host"; then
3610   USE_LIBDIR_TRUE=
3611   USE_LIBDIR_FALSE='#'
3612 else
3613   USE_LIBDIR_TRUE='#'
3614   USE_LIBDIR_FALSE=
3615 fi
3616
3617 if test "${multilib}" = "yes"; then
3618   multilib_arg="--enable-multilib"
3619 else
3620   multilib_arg=
3621 fi
3622
3623 trap '' 1 2 15
3624 cat > confcache <<\EOF
3625 # This file is a shell script that caches the results of configure
3626 # tests run on this system so they can be shared between configure
3627 # scripts and configure runs.  It is not useful on other systems.
3628 # If it contains results you don't want to keep, you may remove or edit it.
3629 #
3630 # By default, configure uses ./config.cache as the cache file,
3631 # creating it if it does not exist already.  You can give configure
3632 # the --cache-file=FILE option to use a different cache file; that is
3633 # what configure does when it calls configure scripts in
3634 # subdirectories, so they share the cache.
3635 # Giving --cache-file=/dev/null disables caching, for debugging configure.
3636 # config.status only pays attention to the cache file if you give it the
3637 # --recheck option to rerun configure.
3638 #
3639 EOF
3640 # The following way of writing the cache mishandles newlines in values,
3641 # but we know of no workaround that is simple, portable, and efficient.
3642 # So, don't put newlines in cache variables' values.
3643 # Ultrix sh set writes to stderr and can't be redirected directly,
3644 # and sets the high bit in the cache file unless we assign to the vars.
3645 (set) 2>&1 |
3646   case `(ac_space=' '; set | grep ac_space) 2>&1` in
3647   *ac_space=\ *)
3648     # `set' does not quote correctly, so add quotes (double-quote substitution
3649     # turns \\\\ into \\, and sed turns \\ into \).
3650     sed -n \
3651       -e "s/'/'\\\\''/g" \
3652       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
3653     ;;
3654   *)
3655     # `set' quotes correctly as required by POSIX, so do not add quotes.
3656     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
3657     ;;
3658   esac >> confcache
3659 if cmp -s $cache_file confcache; then
3660   :
3661 else
3662   if test -w $cache_file; then
3663     echo "updating cache $cache_file"
3664     cat confcache > $cache_file
3665   else
3666     echo "not updating unwritable cache $cache_file"
3667   fi
3668 fi
3669 rm -f confcache
3670
3671 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
3672
3673 test "x$prefix" = xNONE && prefix=$ac_default_prefix
3674 # Let make expand exec_prefix.
3675 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
3676
3677 # Any assignment to VPATH causes Sun make to only execute
3678 # the first set of double-colon rules, so remove it if not needed.
3679 # If there is a colon in the path, we need to keep it.
3680 if test "x$srcdir" = x.; then
3681   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
3682 fi
3683
3684 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
3685
3686 DEFS=-DHAVE_CONFIG_H
3687
3688 # Without the "./", some shells look in PATH for config.status.
3689 : ${CONFIG_STATUS=./config.status}
3690
3691 echo creating $CONFIG_STATUS
3692 rm -f $CONFIG_STATUS
3693 cat > $CONFIG_STATUS <<EOF
3694 #! /bin/sh
3695 # Generated automatically by configure.
3696 # Run this file to recreate the current configuration.
3697 # This directory was configured as follows,
3698 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
3699 #
3700 # $0 $ac_configure_args
3701 #
3702 # Compiler output produced by configure, useful for debugging
3703 # configure, is in ./config.log if it exists.
3704
3705 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
3706 for ac_option
3707 do
3708   case "\$ac_option" in
3709   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
3710     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
3711     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
3712   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
3713     echo "$CONFIG_STATUS generated by autoconf version 2.13"
3714     exit 0 ;;
3715   -help | --help | --hel | --he | --h)
3716     echo "\$ac_cs_usage"; exit 0 ;;
3717   *) echo "\$ac_cs_usage"; exit 1 ;;
3718   esac
3719 done
3720
3721 ac_given_srcdir=$srcdir
3722 ac_given_INSTALL="$INSTALL"
3723
3724 trap 'rm -fr `echo "include/Makefile include/ffi.h Makefile fficonfig.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
3725 EOF
3726 cat >> $CONFIG_STATUS <<EOF
3727
3728 # Protect against being on the right side of a sed subst in config.status.
3729 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
3730  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
3731 $ac_vpsub
3732 $extrasub
3733 s%@SHELL@%$SHELL%g
3734 s%@CFLAGS@%$CFLAGS%g
3735 s%@CPPFLAGS@%$CPPFLAGS%g
3736 s%@CXXFLAGS@%$CXXFLAGS%g
3737 s%@FFLAGS@%$FFLAGS%g
3738 s%@DEFS@%$DEFS%g
3739 s%@LDFLAGS@%$LDFLAGS%g
3740 s%@LIBS@%$LIBS%g
3741 s%@exec_prefix@%$exec_prefix%g
3742 s%@prefix@%$prefix%g
3743 s%@program_transform_name@%$program_transform_name%g
3744 s%@bindir@%$bindir%g
3745 s%@sbindir@%$sbindir%g
3746 s%@libexecdir@%$libexecdir%g
3747 s%@datadir@%$datadir%g
3748 s%@sysconfdir@%$sysconfdir%g
3749 s%@sharedstatedir@%$sharedstatedir%g
3750 s%@localstatedir@%$localstatedir%g
3751 s%@libdir@%$libdir%g
3752 s%@includedir@%$includedir%g
3753 s%@oldincludedir@%$oldincludedir%g
3754 s%@infodir@%$infodir%g
3755 s%@mandir@%$mandir%g
3756 s%@libffi_basedir@%$libffi_basedir%g
3757 s%@host@%$host%g
3758 s%@host_alias@%$host_alias%g
3759 s%@host_cpu@%$host_cpu%g
3760 s%@host_vendor@%$host_vendor%g
3761 s%@host_os@%$host_os%g
3762 s%@build@%$build%g
3763 s%@build_alias@%$build_alias%g
3764 s%@build_cpu@%$build_cpu%g
3765 s%@build_vendor@%$build_vendor%g
3766 s%@build_os@%$build_os%g
3767 s%@CC@%$CC%g
3768 s%@LN_S@%$LN_S%g
3769 s%@OBJEXT@%$OBJEXT%g
3770 s%@EXEEXT@%$EXEEXT%g
3771 s%@RANLIB@%$RANLIB%g
3772 s%@STRIP@%$STRIP%g
3773 s%@LIBTOOL@%$LIBTOOL%g
3774 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
3775 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
3776 s%@INSTALL_DATA@%$INSTALL_DATA%g
3777 s%@PACKAGE@%$PACKAGE%g
3778 s%@VERSION@%$VERSION%g
3779 s%@ACLOCAL@%$ACLOCAL%g
3780 s%@AUTOCONF@%$AUTOCONF%g
3781 s%@AUTOMAKE@%$AUTOMAKE%g
3782 s%@AUTOHEADER@%$AUTOHEADER%g
3783 s%@MAKEINFO@%$MAKEINFO%g
3784 s%@SET_MAKE@%$SET_MAKE%g
3785 s%@MAINTAINER_MODE_TRUE@%$MAINTAINER_MODE_TRUE%g
3786 s%@MAINTAINER_MODE_FALSE@%$MAINTAINER_MODE_FALSE%g
3787 s%@MAINT@%$MAINT%g
3788 s%@MIPS_GCC_TRUE@%$MIPS_GCC_TRUE%g
3789 s%@MIPS_GCC_FALSE@%$MIPS_GCC_FALSE%g
3790 s%@MIPS_SGI_TRUE@%$MIPS_SGI_TRUE%g
3791 s%@MIPS_SGI_FALSE@%$MIPS_SGI_FALSE%g
3792 s%@MIPS_LINUX_TRUE@%$MIPS_LINUX_TRUE%g
3793 s%@MIPS_LINUX_FALSE@%$MIPS_LINUX_FALSE%g
3794 s%@SPARC_TRUE@%$SPARC_TRUE%g
3795 s%@SPARC_FALSE@%$SPARC_FALSE%g
3796 s%@X86_TRUE@%$X86_TRUE%g
3797 s%@X86_FALSE@%$X86_FALSE%g
3798 s%@X86_WIN32_TRUE@%$X86_WIN32_TRUE%g
3799 s%@X86_WIN32_FALSE@%$X86_WIN32_FALSE%g
3800 s%@ALPHA_TRUE@%$ALPHA_TRUE%g
3801 s%@ALPHA_FALSE@%$ALPHA_FALSE%g
3802 s%@IA64_TRUE@%$IA64_TRUE%g
3803 s%@IA64_FALSE@%$IA64_FALSE%g
3804 s%@M68K_TRUE@%$M68K_TRUE%g
3805 s%@M68K_FALSE@%$M68K_FALSE%g
3806 s%@POWERPC_TRUE@%$POWERPC_TRUE%g
3807 s%@POWERPC_FALSE@%$POWERPC_FALSE%g
3808 s%@POWERPC_AIX_TRUE@%$POWERPC_AIX_TRUE%g
3809 s%@POWERPC_AIX_FALSE@%$POWERPC_AIX_FALSE%g
3810 s%@POWERPC_DARWIN_TRUE@%$POWERPC_DARWIN_TRUE%g
3811 s%@POWERPC_DARWIN_FALSE@%$POWERPC_DARWIN_FALSE%g
3812 s%@ARM_TRUE@%$ARM_TRUE%g
3813 s%@ARM_FALSE@%$ARM_FALSE%g
3814 s%@S390_TRUE@%$S390_TRUE%g
3815 s%@S390_FALSE@%$S390_FALSE%g
3816 s%@X86_64_TRUE@%$X86_64_TRUE%g
3817 s%@X86_64_FALSE@%$X86_64_FALSE%g
3818 s%@SH_TRUE@%$SH_TRUE%g
3819 s%@SH_FALSE@%$SH_FALSE%g
3820 s%@CPP@%$CPP%g
3821 s%@ALLOCA@%$ALLOCA%g
3822 s%@TARGET@%$TARGET%g
3823 s%@TARGETDIR@%$TARGETDIR%g
3824 s%@USE_LIBDIR_TRUE@%$USE_LIBDIR_TRUE%g
3825 s%@USE_LIBDIR_FALSE@%$USE_LIBDIR_FALSE%g
3826
3827 CEOF
3828 EOF
3829
3830 cat >> $CONFIG_STATUS <<\EOF
3831
3832 # Split the substitutions into bite-sized pieces for seds with
3833 # small command number limits, like on Digital OSF/1 and HP-UX.
3834 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
3835 ac_file=1 # Number of current file.
3836 ac_beg=1 # First line for current file.
3837 ac_end=$ac_max_sed_cmds # Line after last line for current file.
3838 ac_more_lines=:
3839 ac_sed_cmds=""
3840 while $ac_more_lines; do
3841   if test $ac_beg -gt 1; then
3842     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
3843   else
3844     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
3845   fi
3846   if test ! -s conftest.s$ac_file; then
3847     ac_more_lines=false
3848     rm -f conftest.s$ac_file
3849   else
3850     if test -z "$ac_sed_cmds"; then
3851       ac_sed_cmds="sed -f conftest.s$ac_file"
3852     else
3853       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
3854     fi
3855     ac_file=`expr $ac_file + 1`
3856     ac_beg=$ac_end
3857     ac_end=`expr $ac_end + $ac_max_sed_cmds`
3858   fi
3859 done
3860 if test -z "$ac_sed_cmds"; then
3861   ac_sed_cmds=cat
3862 fi
3863 EOF
3864
3865 cat >> $CONFIG_STATUS <<EOF
3866
3867 CONFIG_FILES=\${CONFIG_FILES-"include/Makefile include/ffi.h Makefile"}
3868 EOF
3869 cat >> $CONFIG_STATUS <<\EOF
3870 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
3871   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
3872   case "$ac_file" in
3873   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
3874        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
3875   *) ac_file_in="${ac_file}.in" ;;
3876   esac
3877
3878   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
3879
3880   # Remove last slash and all that follows it.  Not all systems have dirname.
3881   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
3882   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
3883     # The file is in a subdirectory.
3884     test ! -d "$ac_dir" && mkdir "$ac_dir"
3885     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
3886     # A "../" for each directory in $ac_dir_suffix.
3887     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
3888   else
3889     ac_dir_suffix= ac_dots=
3890   fi
3891
3892   case "$ac_given_srcdir" in
3893   .)  srcdir=.
3894       if test -z "$ac_dots"; then top_srcdir=.
3895       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
3896   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
3897   *) # Relative path.
3898     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
3899     top_srcdir="$ac_dots$ac_given_srcdir" ;;
3900   esac
3901
3902   case "$ac_given_INSTALL" in
3903   [/$]*) INSTALL="$ac_given_INSTALL" ;;
3904   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
3905   esac
3906
3907   echo creating "$ac_file"
3908   rm -f "$ac_file"
3909   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
3910   case "$ac_file" in
3911   *Makefile*) ac_comsub="1i\\
3912 # $configure_input" ;;
3913   *) ac_comsub= ;;
3914   esac
3915
3916   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
3917   sed -e "$ac_comsub
3918 s%@configure_input@%$configure_input%g
3919 s%@srcdir@%$srcdir%g
3920 s%@top_srcdir@%$top_srcdir%g
3921 s%@INSTALL@%$INSTALL%g
3922 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
3923 fi; done
3924 rm -f conftest.s*
3925
3926 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
3927 # NAME is the cpp macro being defined and VALUE is the value it is being given.
3928 #
3929 # ac_d sets the value in "#define NAME VALUE" lines.
3930 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
3931 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
3932 ac_dC='\3'
3933 ac_dD='%g'
3934 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
3935 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
3936 ac_uB='\([      ]\)%\1#\2define\3'
3937 ac_uC=' '
3938 ac_uD='\4%g'
3939 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
3940 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
3941 ac_eB='$%\1#\2define\3'
3942 ac_eC=' '
3943 ac_eD='%g'
3944
3945 if test "${CONFIG_HEADERS+set}" != set; then
3946 EOF
3947 cat >> $CONFIG_STATUS <<EOF
3948   CONFIG_HEADERS="fficonfig.h"
3949 EOF
3950 cat >> $CONFIG_STATUS <<\EOF
3951 fi
3952 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
3953   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
3954   case "$ac_file" in
3955   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
3956        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
3957   *) ac_file_in="${ac_file}.in" ;;
3958   esac
3959
3960   echo creating $ac_file
3961
3962   rm -f conftest.frag conftest.in conftest.out
3963   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
3964   cat $ac_file_inputs > conftest.in
3965
3966 EOF
3967
3968 # Transform confdefs.h into a sed script conftest.vals that substitutes
3969 # the proper values into config.h.in to produce config.h.  And first:
3970 # Protect against being on the right side of a sed subst in config.status.
3971 # Protect against being in an unquoted here document in config.status.
3972 rm -f conftest.vals
3973 cat > conftest.hdr <<\EOF
3974 s/[\\&%]/\\&/g
3975 s%[\\$`]%\\&%g
3976 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
3977 s%ac_d%ac_u%gp
3978 s%ac_u%ac_e%gp
3979 EOF
3980 sed -n -f conftest.hdr confdefs.h > conftest.vals
3981 rm -f conftest.hdr
3982
3983 # This sed command replaces #undef with comments.  This is necessary, for
3984 # example, in the case of _POSIX_SOURCE, which is predefined and required
3985 # on some systems where configure will not decide to define it.
3986 cat >> conftest.vals <<\EOF
3987 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
3988 EOF
3989
3990 # Break up conftest.vals because some shells have a limit on
3991 # the size of here documents, and old seds have small limits too.
3992
3993 rm -f conftest.tail
3994 while :
3995 do
3996   ac_lines=`grep -c . conftest.vals`
3997   # grep -c gives empty output for an empty file on some AIX systems.
3998   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
3999   # Write a limited-size here document to conftest.frag.
4000   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
4001   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
4002   echo 'CEOF
4003   sed -f conftest.frag conftest.in > conftest.out
4004   rm -f conftest.in
4005   mv conftest.out conftest.in
4006 ' >> $CONFIG_STATUS
4007   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
4008   rm -f conftest.vals
4009   mv conftest.tail conftest.vals
4010 done
4011 rm -f conftest.vals
4012
4013 cat >> $CONFIG_STATUS <<\EOF
4014   rm -f conftest.frag conftest.h
4015   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
4016   cat conftest.in >> conftest.h
4017   rm -f conftest.in
4018   if cmp -s $ac_file conftest.h 2>/dev/null; then
4019     echo "$ac_file is unchanged"
4020     rm -f conftest.h
4021   else
4022     # Remove last slash and all that follows it.  Not all systems have dirname.
4023       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
4024       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
4025       # The file is in a subdirectory.
4026       test ! -d "$ac_dir" && mkdir "$ac_dir"
4027     fi
4028     rm -f $ac_file
4029     mv conftest.h $ac_file
4030   fi
4031 fi; done
4032
4033 EOF
4034 cat >> $CONFIG_STATUS <<EOF
4035
4036 srcdir=${srcdir}
4037 host=${host}
4038 target=${target}
4039 with_multisubdir=${with_multisubdir}
4040 ac_configure_args="${multilib_arg} ${ac_configure_args}"
4041 CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
4042 libffi_basedir=${libffi_basedir}
4043 CC="${CC}"
4044 DEFS="$DEFS"
4045 test ! -d include && mkdir include
4046 test ! -f include/fficonfig.h && cp fficonfig.h include/fficonfig.h
4047 if cmp -s fficonfig.h include/fficonfig.h 2>/dev/null; then 
4048         echo fficonfig.h unchanged
4049 else
4050         echo Moving fficonfig.h to include/fficonfig.h
4051         cp fficonfig.h include/fficonfig.h
4052 fi
4053
4054 EOF
4055 cat >> $CONFIG_STATUS <<\EOF
4056 test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h
4057
4058 if test -n "$CONFIG_FILES"; then
4059    LD="${ORIGINAL_LD_FOR_MULTILIBS}"
4060    ac_file=Makefile . ${libffi_basedir}/../config-ml.in
4061 fi
4062
4063 exit 0
4064 EOF
4065 chmod +x $CONFIG_STATUS
4066 rm -fr confdefs* $ac_clean_files
4067 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
4068
4069
4070 # Make target subdirectories if required.
4071 test -d src || mkdir src
4072 test -d src/${TARGETDIR} || mkdir src/${TARGETDIR}