OSDN Git Service

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