OSDN Git Service

Port to sparc 32 and 64 Linux.
[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 sparc-*-linux*) TARGET=SPARC; TARGETDIR=sparc;;
1634 sparc64-*-linux*) TARGET=SPARC; TARGETDIR=sparc;;
1635 alpha*-*-linux* | alpha*-*-osf*) TARGET=ALPHA; TARGETDIR=alpha;;
1636 ia64*-*-*) TARGET=IA64; TARGETDIR=ia64;;
1637 m68k-*-linux*) TARGET=M68K; TARGETDIR=m68k;;
1638 powerpc-*-linux* | powerpc-*-sysv*) TARGET=POWERPC; TARGETDIR=powerpc;;
1639 powerpc-*-beos*) TARGET=POWERPC; TARGETDIR=powerpc;;
1640 arm-*-linux-*) TARGET=ARM; TARGETDIR=arm;;
1641 esac
1642
1643 if test $TARGETDIR = unknown; then
1644   { echo "configure: error: "libffi has not been ported to $host."" 1>&2; exit 1; }
1645 fi
1646
1647
1648
1649 if test ${TARGET}${ac_cv_prog_gcc} = MIPSyes; then
1650   MIPS_GCC_TRUE=
1651   MIPS_GCC_FALSE='#'
1652 else
1653   MIPS_GCC_TRUE='#'
1654   MIPS_GCC_FALSE=
1655 fi
1656
1657
1658 if test ${TARGET}${ac_cv_prog_gcc} = MIPSno; then
1659   MIPS_SGI_TRUE=
1660   MIPS_SGI_FALSE='#'
1661 else
1662   MIPS_SGI_TRUE='#'
1663   MIPS_SGI_FALSE=
1664 fi
1665
1666
1667 if test x$TARGET = xSPARC; then
1668   SPARC_TRUE=
1669   SPARC_FALSE='#'
1670 else
1671   SPARC_TRUE='#'
1672   SPARC_FALSE=
1673 fi
1674
1675
1676 if test x$TARGET = xX86; then
1677   X86_TRUE=
1678   X86_FALSE='#'
1679 else
1680   X86_TRUE='#'
1681   X86_FALSE=
1682 fi
1683
1684
1685 if test x$TARGET = xALPHA; then
1686   ALPHA_TRUE=
1687   ALPHA_FALSE='#'
1688 else
1689   ALPHA_TRUE='#'
1690   ALPHA_FALSE=
1691 fi
1692
1693
1694 if test x$TARGET = xIA64; then
1695   IA64_TRUE=
1696   IA64_FALSE='#'
1697 else
1698   IA64_TRUE='#'
1699   IA64_FALSE=
1700 fi
1701
1702
1703 if test x$TARGET = xM68K; then
1704   M68K_TRUE=
1705   M68K_FALSE='#'
1706 else
1707   M68K_TRUE='#'
1708   M68K_FALSE=
1709 fi
1710
1711
1712 if test x$TARGET = xPOWERPC; then
1713   POWERPC_TRUE=
1714   POWERPC_FALSE='#'
1715 else
1716   POWERPC_TRUE='#'
1717   POWERPC_FALSE=
1718 fi
1719
1720
1721 if test x$TARGET = xARM; then
1722   ARM_TRUE=
1723   ARM_FALSE='#'
1724 else
1725   ARM_TRUE='#'
1726   ARM_FALSE=
1727 fi
1728
1729 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
1730 echo "configure:1729: checking how to run the C preprocessor" >&5
1731 # On Suns, sometimes $CPP names a directory.
1732 if test -n "$CPP" && test -d "$CPP"; then
1733   CPP=
1734 fi
1735 if test -z "$CPP"; then
1736 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1737   echo $ac_n "(cached) $ac_c" 1>&6
1738 else
1739     # This must be in double quotes, not single quotes, because CPP may get
1740   # substituted into the Makefile and "${CC-cc}" will confuse make.
1741   CPP="${CC-cc} -E"
1742   # On the NeXT, cc -E runs the code through the compiler's parser,
1743   # not just through cpp.
1744   cat > conftest.$ac_ext <<EOF
1745 #line 1744 "configure"
1746 #include "confdefs.h"
1747 #include <assert.h>
1748 Syntax Error
1749 EOF
1750 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1751 { (eval echo configure:1750: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1752 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1753 if test -z "$ac_err"; then
1754   :
1755 else
1756   echo "$ac_err" >&5
1757   echo "configure: failed program was:" >&5
1758   cat conftest.$ac_ext >&5
1759   rm -rf conftest*
1760   CPP="${CC-cc} -E -traditional-cpp"
1761   cat > conftest.$ac_ext <<EOF
1762 #line 1761 "configure"
1763 #include "confdefs.h"
1764 #include <assert.h>
1765 Syntax Error
1766 EOF
1767 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1768 { (eval echo configure:1767: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1769 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1770 if test -z "$ac_err"; then
1771   :
1772 else
1773   echo "$ac_err" >&5
1774   echo "configure: failed program was:" >&5
1775   cat conftest.$ac_ext >&5
1776   rm -rf conftest*
1777   CPP="${CC-cc} -nologo -E"
1778   cat > conftest.$ac_ext <<EOF
1779 #line 1778 "configure"
1780 #include "confdefs.h"
1781 #include <assert.h>
1782 Syntax Error
1783 EOF
1784 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1785 { (eval echo configure:1784: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1786 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1787 if test -z "$ac_err"; then
1788   :
1789 else
1790   echo "$ac_err" >&5
1791   echo "configure: failed program was:" >&5
1792   cat conftest.$ac_ext >&5
1793   rm -rf conftest*
1794   CPP=/lib/cpp
1795 fi
1796 rm -f conftest*
1797 fi
1798 rm -f conftest*
1799 fi
1800 rm -f conftest*
1801   ac_cv_prog_CPP="$CPP"
1802 fi
1803   CPP="$ac_cv_prog_CPP"
1804 else
1805   ac_cv_prog_CPP="$CPP"
1806 fi
1807 echo "$ac_t""$CPP" 1>&6
1808
1809 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
1810 echo "configure:1809: checking for ANSI C header files" >&5
1811 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1812   echo $ac_n "(cached) $ac_c" 1>&6
1813 else
1814   cat > conftest.$ac_ext <<EOF
1815 #line 1814 "configure"
1816 #include "confdefs.h"
1817 #include <stdlib.h>
1818 #include <stdarg.h>
1819 #include <string.h>
1820 #include <float.h>
1821 EOF
1822 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1823 { (eval echo configure:1822: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1824 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1825 if test -z "$ac_err"; then
1826   rm -rf conftest*
1827   ac_cv_header_stdc=yes
1828 else
1829   echo "$ac_err" >&5
1830   echo "configure: failed program was:" >&5
1831   cat conftest.$ac_ext >&5
1832   rm -rf conftest*
1833   ac_cv_header_stdc=no
1834 fi
1835 rm -f conftest*
1836
1837 if test $ac_cv_header_stdc = yes; then
1838   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1839 cat > conftest.$ac_ext <<EOF
1840 #line 1839 "configure"
1841 #include "confdefs.h"
1842 #include <string.h>
1843 EOF
1844 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1845   egrep "memchr" >/dev/null 2>&1; then
1846   :
1847 else
1848   rm -rf conftest*
1849   ac_cv_header_stdc=no
1850 fi
1851 rm -f conftest*
1852
1853 fi
1854
1855 if test $ac_cv_header_stdc = yes; then
1856   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1857 cat > conftest.$ac_ext <<EOF
1858 #line 1857 "configure"
1859 #include "confdefs.h"
1860 #include <stdlib.h>
1861 EOF
1862 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1863   egrep "free" >/dev/null 2>&1; then
1864   :
1865 else
1866   rm -rf conftest*
1867   ac_cv_header_stdc=no
1868 fi
1869 rm -f conftest*
1870
1871 fi
1872
1873 if test $ac_cv_header_stdc = yes; then
1874   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1875 if test "$cross_compiling" = yes; then
1876   :
1877 else
1878   cat > conftest.$ac_ext <<EOF
1879 #line 1878 "configure"
1880 #include "confdefs.h"
1881 #include <ctype.h>
1882 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1883 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
1884 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
1885 int main () { int i; for (i = 0; i < 256; i++)
1886 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1887 exit (0); }
1888
1889 EOF
1890 if { (eval echo configure:1889: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1891 then
1892   :
1893 else
1894   echo "configure: failed program was:" >&5
1895   cat conftest.$ac_ext >&5
1896   rm -fr conftest*
1897   ac_cv_header_stdc=no
1898 fi
1899 rm -fr conftest*
1900 fi
1901
1902 fi
1903 fi
1904
1905 echo "$ac_t""$ac_cv_header_stdc" 1>&6
1906 if test $ac_cv_header_stdc = yes; then
1907   cat >> confdefs.h <<\EOF
1908 #define STDC_HEADERS 1
1909 EOF
1910
1911 fi
1912
1913 for ac_func in memcpy
1914 do
1915 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1916 echo "configure:1915: checking for $ac_func" >&5
1917 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1918   echo $ac_n "(cached) $ac_c" 1>&6
1919 else
1920   cat > conftest.$ac_ext <<EOF
1921 #line 1920 "configure"
1922 #include "confdefs.h"
1923 /* System header to define __stub macros and hopefully few prototypes,
1924     which can conflict with char $ac_func(); below.  */
1925 #include <assert.h>
1926 /* Override any gcc2 internal prototype to avoid an error.  */
1927 /* We use char because int might match the return type of a gcc2
1928     builtin and then its argument prototype would still apply.  */
1929 char $ac_func();
1930
1931 int main() {
1932
1933 /* The GNU C library defines this for functions which it implements
1934     to always fail with ENOSYS.  Some functions are actually named
1935     something starting with __ and the normal name is an alias.  */
1936 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1937 choke me
1938 #else
1939 $ac_func();
1940 #endif
1941
1942 ; return 0; }
1943 EOF
1944 if { (eval echo configure:1943: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1945   rm -rf conftest*
1946   eval "ac_cv_func_$ac_func=yes"
1947 else
1948   echo "configure: failed program was:" >&5
1949   cat conftest.$ac_ext >&5
1950   rm -rf conftest*
1951   eval "ac_cv_func_$ac_func=no"
1952 fi
1953 rm -f conftest*
1954 fi
1955
1956 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1957   echo "$ac_t""yes" 1>&6
1958     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1959   cat >> confdefs.h <<EOF
1960 #define $ac_tr_func 1
1961 EOF
1962  
1963 else
1964   echo "$ac_t""no" 1>&6
1965 fi
1966 done
1967
1968 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
1969 # for constant arguments.  Useless!
1970 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
1971 echo "configure:1970: checking for working alloca.h" >&5
1972 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
1973   echo $ac_n "(cached) $ac_c" 1>&6
1974 else
1975   cat > conftest.$ac_ext <<EOF
1976 #line 1975 "configure"
1977 #include "confdefs.h"
1978 #include <alloca.h>
1979 int main() {
1980 char *p = alloca(2 * sizeof(int));
1981 ; return 0; }
1982 EOF
1983 if { (eval echo configure:1982: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1984   rm -rf conftest*
1985   ac_cv_header_alloca_h=yes
1986 else
1987   echo "configure: failed program was:" >&5
1988   cat conftest.$ac_ext >&5
1989   rm -rf conftest*
1990   ac_cv_header_alloca_h=no
1991 fi
1992 rm -f conftest*
1993 fi
1994
1995 echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
1996 if test $ac_cv_header_alloca_h = yes; then
1997   cat >> confdefs.h <<\EOF
1998 #define HAVE_ALLOCA_H 1
1999 EOF
2000
2001 fi
2002
2003 echo $ac_n "checking for alloca""... $ac_c" 1>&6
2004 echo "configure:2003: checking for alloca" >&5
2005 if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
2006   echo $ac_n "(cached) $ac_c" 1>&6
2007 else
2008   cat > conftest.$ac_ext <<EOF
2009 #line 2008 "configure"
2010 #include "confdefs.h"
2011
2012 #ifdef __GNUC__
2013 # define alloca __builtin_alloca
2014 #else
2015 # ifdef _MSC_VER
2016 #  include <malloc.h>
2017 #  define alloca _alloca
2018 # else
2019 #  if HAVE_ALLOCA_H
2020 #   include <alloca.h>
2021 #  else
2022 #   ifdef _AIX
2023  #pragma alloca
2024 #   else
2025 #    ifndef alloca /* predefined by HP cc +Olibcalls */
2026 char *alloca ();
2027 #    endif
2028 #   endif
2029 #  endif
2030 # endif
2031 #endif
2032
2033 int main() {
2034 char *p = (char *) alloca(1);
2035 ; return 0; }
2036 EOF
2037 if { (eval echo configure:2036: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2038   rm -rf conftest*
2039   ac_cv_func_alloca_works=yes
2040 else
2041   echo "configure: failed program was:" >&5
2042   cat conftest.$ac_ext >&5
2043   rm -rf conftest*
2044   ac_cv_func_alloca_works=no
2045 fi
2046 rm -f conftest*
2047 fi
2048
2049 echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
2050 if test $ac_cv_func_alloca_works = yes; then
2051   cat >> confdefs.h <<\EOF
2052 #define HAVE_ALLOCA 1
2053 EOF
2054
2055 fi
2056
2057 if test $ac_cv_func_alloca_works = no; then
2058   # The SVR3 libPW and SVR4 libucb both contain incompatible functions
2059   # that cause trouble.  Some versions do not even contain alloca or
2060   # contain a buggy version.  If you still want to use their alloca,
2061   # use ar to extract alloca.o from them instead of compiling alloca.c.
2062   ALLOCA=alloca.${ac_objext}
2063   cat >> confdefs.h <<\EOF
2064 #define C_ALLOCA 1
2065 EOF
2066
2067
2068 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
2069 echo "configure:2068: checking whether alloca needs Cray hooks" >&5
2070 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
2071   echo $ac_n "(cached) $ac_c" 1>&6
2072 else
2073   cat > conftest.$ac_ext <<EOF
2074 #line 2073 "configure"
2075 #include "confdefs.h"
2076 #if defined(CRAY) && ! defined(CRAY2)
2077 webecray
2078 #else
2079 wenotbecray
2080 #endif
2081
2082 EOF
2083 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2084   egrep "webecray" >/dev/null 2>&1; then
2085   rm -rf conftest*
2086   ac_cv_os_cray=yes
2087 else
2088   rm -rf conftest*
2089   ac_cv_os_cray=no
2090 fi
2091 rm -f conftest*
2092
2093 fi
2094
2095 echo "$ac_t""$ac_cv_os_cray" 1>&6
2096 if test $ac_cv_os_cray = yes; then
2097 for ac_func in _getb67 GETB67 getb67; do
2098   echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2099 echo "configure:2098: checking for $ac_func" >&5
2100 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2101   echo $ac_n "(cached) $ac_c" 1>&6
2102 else
2103   cat > conftest.$ac_ext <<EOF
2104 #line 2103 "configure"
2105 #include "confdefs.h"
2106 /* System header to define __stub macros and hopefully few prototypes,
2107     which can conflict with char $ac_func(); below.  */
2108 #include <assert.h>
2109 /* Override any gcc2 internal prototype to avoid an error.  */
2110 /* We use char because int might match the return type of a gcc2
2111     builtin and then its argument prototype would still apply.  */
2112 char $ac_func();
2113
2114 int main() {
2115
2116 /* The GNU C library defines this for functions which it implements
2117     to always fail with ENOSYS.  Some functions are actually named
2118     something starting with __ and the normal name is an alias.  */
2119 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2120 choke me
2121 #else
2122 $ac_func();
2123 #endif
2124
2125 ; return 0; }
2126 EOF
2127 if { (eval echo configure:2126: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2128   rm -rf conftest*
2129   eval "ac_cv_func_$ac_func=yes"
2130 else
2131   echo "configure: failed program was:" >&5
2132   cat conftest.$ac_ext >&5
2133   rm -rf conftest*
2134   eval "ac_cv_func_$ac_func=no"
2135 fi
2136 rm -f conftest*
2137 fi
2138
2139 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2140   echo "$ac_t""yes" 1>&6
2141   cat >> confdefs.h <<EOF
2142 #define CRAY_STACKSEG_END $ac_func
2143 EOF
2144
2145   break
2146 else
2147   echo "$ac_t""no" 1>&6
2148 fi
2149
2150 done
2151 fi
2152
2153 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
2154 echo "configure:2153: checking stack direction for C alloca" >&5
2155 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
2156   echo $ac_n "(cached) $ac_c" 1>&6
2157 else
2158   if test "$cross_compiling" = yes; then
2159   ac_cv_c_stack_direction=0
2160 else
2161   cat > conftest.$ac_ext <<EOF
2162 #line 2161 "configure"
2163 #include "confdefs.h"
2164 find_stack_direction ()
2165 {
2166   static char *addr = 0;
2167   auto char dummy;
2168   if (addr == 0)
2169     {
2170       addr = &dummy;
2171       return find_stack_direction ();
2172     }
2173   else
2174     return (&dummy > addr) ? 1 : -1;
2175 }
2176 main ()
2177 {
2178   exit (find_stack_direction() < 0);
2179 }
2180 EOF
2181 if { (eval echo configure:2180: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2182 then
2183   ac_cv_c_stack_direction=1
2184 else
2185   echo "configure: failed program was:" >&5
2186   cat conftest.$ac_ext >&5
2187   rm -fr conftest*
2188   ac_cv_c_stack_direction=-1
2189 fi
2190 rm -fr conftest*
2191 fi
2192
2193 fi
2194
2195 echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
2196 cat >> confdefs.h <<EOF
2197 #define STACK_DIRECTION $ac_cv_c_stack_direction
2198 EOF
2199
2200 fi
2201
2202
2203 echo $ac_n "checking size of short""... $ac_c" 1>&6
2204 echo "configure:2203: checking size of short" >&5
2205 if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
2206   echo $ac_n "(cached) $ac_c" 1>&6
2207 else
2208   if test "$cross_compiling" = yes; then
2209     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2210 else
2211   cat > conftest.$ac_ext <<EOF
2212 #line 2211 "configure"
2213 #include "confdefs.h"
2214 #include <stdio.h>
2215 main()
2216 {
2217   FILE *f=fopen("conftestval", "w");
2218   if (!f) exit(1);
2219   fprintf(f, "%d\n", sizeof(short));
2220   exit(0);
2221 }
2222 EOF
2223 if { (eval echo configure:2222: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2224 then
2225   ac_cv_sizeof_short=`cat conftestval`
2226 else
2227   echo "configure: failed program was:" >&5
2228   cat conftest.$ac_ext >&5
2229   rm -fr conftest*
2230   ac_cv_sizeof_short=0
2231 fi
2232 rm -fr conftest*
2233 fi
2234
2235 fi
2236 echo "$ac_t""$ac_cv_sizeof_short" 1>&6
2237 cat >> confdefs.h <<EOF
2238 #define SIZEOF_SHORT $ac_cv_sizeof_short
2239 EOF
2240
2241
2242 echo $ac_n "checking size of int""... $ac_c" 1>&6
2243 echo "configure:2242: checking size of int" >&5
2244 if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
2245   echo $ac_n "(cached) $ac_c" 1>&6
2246 else
2247   if test "$cross_compiling" = yes; then
2248     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2249 else
2250   cat > conftest.$ac_ext <<EOF
2251 #line 2250 "configure"
2252 #include "confdefs.h"
2253 #include <stdio.h>
2254 main()
2255 {
2256   FILE *f=fopen("conftestval", "w");
2257   if (!f) exit(1);
2258   fprintf(f, "%d\n", sizeof(int));
2259   exit(0);
2260 }
2261 EOF
2262 if { (eval echo configure:2261: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2263 then
2264   ac_cv_sizeof_int=`cat conftestval`
2265 else
2266   echo "configure: failed program was:" >&5
2267   cat conftest.$ac_ext >&5
2268   rm -fr conftest*
2269   ac_cv_sizeof_int=0
2270 fi
2271 rm -fr conftest*
2272 fi
2273
2274 fi
2275 echo "$ac_t""$ac_cv_sizeof_int" 1>&6
2276 cat >> confdefs.h <<EOF
2277 #define SIZEOF_INT $ac_cv_sizeof_int
2278 EOF
2279
2280
2281 echo $ac_n "checking size of long""... $ac_c" 1>&6
2282 echo "configure:2281: checking size of long" >&5
2283 if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
2284   echo $ac_n "(cached) $ac_c" 1>&6
2285 else
2286   if test "$cross_compiling" = yes; then
2287     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2288 else
2289   cat > conftest.$ac_ext <<EOF
2290 #line 2289 "configure"
2291 #include "confdefs.h"
2292 #include <stdio.h>
2293 main()
2294 {
2295   FILE *f=fopen("conftestval", "w");
2296   if (!f) exit(1);
2297   fprintf(f, "%d\n", sizeof(long));
2298   exit(0);
2299 }
2300 EOF
2301 if { (eval echo configure:2300: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2302 then
2303   ac_cv_sizeof_long=`cat conftestval`
2304 else
2305   echo "configure: failed program was:" >&5
2306   cat conftest.$ac_ext >&5
2307   rm -fr conftest*
2308   ac_cv_sizeof_long=0
2309 fi
2310 rm -fr conftest*
2311 fi
2312
2313 fi
2314 echo "$ac_t""$ac_cv_sizeof_long" 1>&6
2315 cat >> confdefs.h <<EOF
2316 #define SIZEOF_LONG $ac_cv_sizeof_long
2317 EOF
2318
2319
2320 echo $ac_n "checking size of long long""... $ac_c" 1>&6
2321 echo "configure:2320: checking size of long long" >&5
2322 if eval "test \"`echo '$''{'ac_cv_sizeof_long_long'+set}'`\" = set"; then
2323   echo $ac_n "(cached) $ac_c" 1>&6
2324 else
2325   if test "$cross_compiling" = yes; then
2326     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2327 else
2328   cat > conftest.$ac_ext <<EOF
2329 #line 2328 "configure"
2330 #include "confdefs.h"
2331 #include <stdio.h>
2332 main()
2333 {
2334   FILE *f=fopen("conftestval", "w");
2335   if (!f) exit(1);
2336   fprintf(f, "%d\n", sizeof(long long));
2337   exit(0);
2338 }
2339 EOF
2340 if { (eval echo configure:2339: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2341 then
2342   ac_cv_sizeof_long_long=`cat conftestval`
2343 else
2344   echo "configure: failed program was:" >&5
2345   cat conftest.$ac_ext >&5
2346   rm -fr conftest*
2347   ac_cv_sizeof_long_long=0
2348 fi
2349 rm -fr conftest*
2350 fi
2351
2352 fi
2353 echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6
2354 cat >> confdefs.h <<EOF
2355 #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
2356 EOF
2357
2358
2359 echo $ac_n "checking size of float""... $ac_c" 1>&6
2360 echo "configure:2359: checking size of float" >&5
2361 if eval "test \"`echo '$''{'ac_cv_sizeof_float'+set}'`\" = set"; then
2362   echo $ac_n "(cached) $ac_c" 1>&6
2363 else
2364   if test "$cross_compiling" = yes; then
2365     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2366 else
2367   cat > conftest.$ac_ext <<EOF
2368 #line 2367 "configure"
2369 #include "confdefs.h"
2370 #include <stdio.h>
2371 main()
2372 {
2373   FILE *f=fopen("conftestval", "w");
2374   if (!f) exit(1);
2375   fprintf(f, "%d\n", sizeof(float));
2376   exit(0);
2377 }
2378 EOF
2379 if { (eval echo configure:2378: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2380 then
2381   ac_cv_sizeof_float=`cat conftestval`
2382 else
2383   echo "configure: failed program was:" >&5
2384   cat conftest.$ac_ext >&5
2385   rm -fr conftest*
2386   ac_cv_sizeof_float=0
2387 fi
2388 rm -fr conftest*
2389 fi
2390
2391 fi
2392 echo "$ac_t""$ac_cv_sizeof_float" 1>&6
2393 cat >> confdefs.h <<EOF
2394 #define SIZEOF_FLOAT $ac_cv_sizeof_float
2395 EOF
2396
2397
2398 echo $ac_n "checking size of double""... $ac_c" 1>&6
2399 echo "configure:2398: checking size of double" >&5
2400 if eval "test \"`echo '$''{'ac_cv_sizeof_double'+set}'`\" = set"; then
2401   echo $ac_n "(cached) $ac_c" 1>&6
2402 else
2403   if test "$cross_compiling" = yes; then
2404     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2405 else
2406   cat > conftest.$ac_ext <<EOF
2407 #line 2406 "configure"
2408 #include "confdefs.h"
2409 #include <stdio.h>
2410 main()
2411 {
2412   FILE *f=fopen("conftestval", "w");
2413   if (!f) exit(1);
2414   fprintf(f, "%d\n", sizeof(double));
2415   exit(0);
2416 }
2417 EOF
2418 if { (eval echo configure:2417: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2419 then
2420   ac_cv_sizeof_double=`cat conftestval`
2421 else
2422   echo "configure: failed program was:" >&5
2423   cat conftest.$ac_ext >&5
2424   rm -fr conftest*
2425   ac_cv_sizeof_double=0
2426 fi
2427 rm -fr conftest*
2428 fi
2429
2430 fi
2431 echo "$ac_t""$ac_cv_sizeof_double" 1>&6
2432 cat >> confdefs.h <<EOF
2433 #define SIZEOF_DOUBLE $ac_cv_sizeof_double
2434 EOF
2435
2436
2437 echo $ac_n "checking size of long double""... $ac_c" 1>&6
2438 echo "configure:2437: checking size of long double" >&5
2439 if eval "test \"`echo '$''{'ac_cv_sizeof_long_double'+set}'`\" = set"; then
2440   echo $ac_n "(cached) $ac_c" 1>&6
2441 else
2442   if test "$cross_compiling" = yes; then
2443     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2444 else
2445   cat > conftest.$ac_ext <<EOF
2446 #line 2445 "configure"
2447 #include "confdefs.h"
2448 #include <stdio.h>
2449 main()
2450 {
2451   FILE *f=fopen("conftestval", "w");
2452   if (!f) exit(1);
2453   fprintf(f, "%d\n", sizeof(long double));
2454   exit(0);
2455 }
2456 EOF
2457 if { (eval echo configure:2456: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2458 then
2459   ac_cv_sizeof_long_double=`cat conftestval`
2460 else
2461   echo "configure: failed program was:" >&5
2462   cat conftest.$ac_ext >&5
2463   rm -fr conftest*
2464   ac_cv_sizeof_long_double=0
2465 fi
2466 rm -fr conftest*
2467 fi
2468
2469 fi
2470 echo "$ac_t""$ac_cv_sizeof_long_double" 1>&6
2471 cat >> confdefs.h <<EOF
2472 #define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
2473 EOF
2474
2475
2476
2477 echo $ac_n "checking size of void *""... $ac_c" 1>&6
2478 echo "configure:2477: checking size of void *" >&5
2479 if eval "test \"`echo '$''{'ac_cv_sizeof_void_p'+set}'`\" = set"; then
2480   echo $ac_n "(cached) $ac_c" 1>&6
2481 else
2482   if test "$cross_compiling" = yes; then
2483     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2484 else
2485   cat > conftest.$ac_ext <<EOF
2486 #line 2485 "configure"
2487 #include "confdefs.h"
2488 #include <stdio.h>
2489 main()
2490 {
2491   FILE *f=fopen("conftestval", "w");
2492   if (!f) exit(1);
2493   fprintf(f, "%d\n", sizeof(void *));
2494   exit(0);
2495 }
2496 EOF
2497 if { (eval echo configure:2496: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2498 then
2499   ac_cv_sizeof_void_p=`cat conftestval`
2500 else
2501   echo "configure: failed program was:" >&5
2502   cat conftest.$ac_ext >&5
2503   rm -fr conftest*
2504   ac_cv_sizeof_void_p=0
2505 fi
2506 rm -fr conftest*
2507 fi
2508
2509 fi
2510 echo "$ac_t""$ac_cv_sizeof_void_p" 1>&6
2511 cat >> confdefs.h <<EOF
2512 #define SIZEOF_VOID_P $ac_cv_sizeof_void_p
2513 EOF
2514
2515
2516 echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
2517 echo "configure:2516: checking whether byte ordering is bigendian" >&5
2518 if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
2519   echo $ac_n "(cached) $ac_c" 1>&6
2520 else
2521   ac_cv_c_bigendian=unknown
2522 # See if sys/param.h defines the BYTE_ORDER macro.
2523 cat > conftest.$ac_ext <<EOF
2524 #line 2523 "configure"
2525 #include "confdefs.h"
2526 #include <sys/types.h>
2527 #include <sys/param.h>
2528 int main() {
2529
2530 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
2531  bogus endian macros
2532 #endif
2533 ; return 0; }
2534 EOF
2535 if { (eval echo configure:2534: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2536   rm -rf conftest*
2537   # It does; now see whether it defined to BIG_ENDIAN or not.
2538 cat > conftest.$ac_ext <<EOF
2539 #line 2538 "configure"
2540 #include "confdefs.h"
2541 #include <sys/types.h>
2542 #include <sys/param.h>
2543 int main() {
2544
2545 #if BYTE_ORDER != BIG_ENDIAN
2546  not big endian
2547 #endif
2548 ; return 0; }
2549 EOF
2550 if { (eval echo configure:2549: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2551   rm -rf conftest*
2552   ac_cv_c_bigendian=yes
2553 else
2554   echo "configure: failed program was:" >&5
2555   cat conftest.$ac_ext >&5
2556   rm -rf conftest*
2557   ac_cv_c_bigendian=no
2558 fi
2559 rm -f conftest*
2560 else
2561   echo "configure: failed program was:" >&5
2562   cat conftest.$ac_ext >&5
2563 fi
2564 rm -f conftest*
2565 if test $ac_cv_c_bigendian = unknown; then
2566 if test "$cross_compiling" = yes; then
2567     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2568 else
2569   cat > conftest.$ac_ext <<EOF
2570 #line 2569 "configure"
2571 #include "confdefs.h"
2572 main () {
2573   /* Are we little or big endian?  From Harbison&Steele.  */
2574   union
2575   {
2576     long l;
2577     char c[sizeof (long)];
2578   } u;
2579   u.l = 1;
2580   exit (u.c[sizeof (long) - 1] == 1);
2581 }
2582 EOF
2583 if { (eval echo configure:2582: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2584 then
2585   ac_cv_c_bigendian=no
2586 else
2587   echo "configure: failed program was:" >&5
2588   cat conftest.$ac_ext >&5
2589   rm -fr conftest*
2590   ac_cv_c_bigendian=yes
2591 fi
2592 rm -fr conftest*
2593 fi
2594
2595 fi
2596 fi
2597
2598 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
2599 if test $ac_cv_c_bigendian = yes; then
2600   cat >> confdefs.h <<\EOF
2601 #define WORDS_BIGENDIAN 1
2602 EOF
2603
2604 fi
2605
2606
2607
2608
2609
2610
2611
2612 # Check whether --enable-debug or --disable-debug was given.
2613 if test "${enable_debug+set}" = set; then
2614   enableval="$enable_debug"
2615   cat >> confdefs.h <<\EOF
2616 #define FFI_DEBUG 1
2617 EOF
2618
2619 fi
2620
2621
2622 # Check whether --enable-debug or --disable-debug was given.
2623 if test "${enable_debug+set}" = set; then
2624   enableval="$enable_debug"
2625   cat >> confdefs.h <<\EOF
2626 #define FFI_NO_STRUCTS 1
2627 EOF
2628
2629 fi
2630
2631
2632 # Check whether --enable-debug or --disable-debug was given.
2633 if test "${enable_debug+set}" = set; then
2634   enableval="$enable_debug"
2635   cat >> confdefs.h <<\EOF
2636 #define FFI_NO_RAW_API 1
2637 EOF
2638
2639 fi
2640
2641
2642 # Check whether --enable-purify-safety or --disable-purify-safety was given.
2643 if test "${enable_purify_safety+set}" = set; then
2644   enableval="$enable_purify_safety"
2645   cat >> confdefs.h <<\EOF
2646 #define USING_PURIFY 1
2647 EOF
2648
2649 fi
2650
2651
2652
2653
2654 if test -z "$with_cross_host"; then
2655   USE_LIBDIR_TRUE=
2656   USE_LIBDIR_FALSE='#'
2657 else
2658   USE_LIBDIR_TRUE='#'
2659   USE_LIBDIR_FALSE=
2660 fi
2661
2662 if test "${multilib}" = "yes"; then
2663   multilib_arg="--enable-multilib"
2664 else
2665   multilib_arg=
2666 fi
2667
2668 trap '' 1 2 15
2669 cat > confcache <<\EOF
2670 # This file is a shell script that caches the results of configure
2671 # tests run on this system so they can be shared between configure
2672 # scripts and configure runs.  It is not useful on other systems.
2673 # If it contains results you don't want to keep, you may remove or edit it.
2674 #
2675 # By default, configure uses ./config.cache as the cache file,
2676 # creating it if it does not exist already.  You can give configure
2677 # the --cache-file=FILE option to use a different cache file; that is
2678 # what configure does when it calls configure scripts in
2679 # subdirectories, so they share the cache.
2680 # Giving --cache-file=/dev/null disables caching, for debugging configure.
2681 # config.status only pays attention to the cache file if you give it the
2682 # --recheck option to rerun configure.
2683 #
2684 EOF
2685 # The following way of writing the cache mishandles newlines in values,
2686 # but we know of no workaround that is simple, portable, and efficient.
2687 # So, don't put newlines in cache variables' values.
2688 # Ultrix sh set writes to stderr and can't be redirected directly,
2689 # and sets the high bit in the cache file unless we assign to the vars.
2690 (set) 2>&1 |
2691   case `(ac_space=' '; set | grep ac_space) 2>&1` in
2692   *ac_space=\ *)
2693     # `set' does not quote correctly, so add quotes (double-quote substitution
2694     # turns \\\\ into \\, and sed turns \\ into \).
2695     sed -n \
2696       -e "s/'/'\\\\''/g" \
2697       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
2698     ;;
2699   *)
2700     # `set' quotes correctly as required by POSIX, so do not add quotes.
2701     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
2702     ;;
2703   esac >> confcache
2704 if cmp -s $cache_file confcache; then
2705   :
2706 else
2707   if test -w $cache_file; then
2708     echo "updating cache $cache_file"
2709     cat confcache > $cache_file
2710   else
2711     echo "not updating unwritable cache $cache_file"
2712   fi
2713 fi
2714 rm -f confcache
2715
2716 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
2717
2718 test "x$prefix" = xNONE && prefix=$ac_default_prefix
2719 # Let make expand exec_prefix.
2720 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
2721
2722 # Any assignment to VPATH causes Sun make to only execute
2723 # the first set of double-colon rules, so remove it if not needed.
2724 # If there is a colon in the path, we need to keep it.
2725 if test "x$srcdir" = x.; then
2726   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
2727 fi
2728
2729 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
2730
2731 DEFS=-DHAVE_CONFIG_H
2732
2733 # Without the "./", some shells look in PATH for config.status.
2734 : ${CONFIG_STATUS=./config.status}
2735
2736 echo creating $CONFIG_STATUS
2737 rm -f $CONFIG_STATUS
2738 cat > $CONFIG_STATUS <<EOF
2739 #! /bin/sh
2740 # Generated automatically by configure.
2741 # Run this file to recreate the current configuration.
2742 # This directory was configured as follows,
2743 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
2744 #
2745 # $0 $ac_configure_args
2746 #
2747 # Compiler output produced by configure, useful for debugging
2748 # configure, is in ./config.log if it exists.
2749
2750 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
2751 for ac_option
2752 do
2753   case "\$ac_option" in
2754   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
2755     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
2756     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
2757   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
2758     echo "$CONFIG_STATUS generated by autoconf version 2.13"
2759     exit 0 ;;
2760   -help | --help | --hel | --he | --h)
2761     echo "\$ac_cs_usage"; exit 0 ;;
2762   *) echo "\$ac_cs_usage"; exit 1 ;;
2763   esac
2764 done
2765
2766 ac_given_srcdir=$srcdir
2767 ac_given_INSTALL="$INSTALL"
2768
2769 trap 'rm -fr `echo "include/Makefile include/ffi.h Makefile fficonfig.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
2770 EOF
2771 cat >> $CONFIG_STATUS <<EOF
2772
2773 # Protect against being on the right side of a sed subst in config.status.
2774 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
2775  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
2776 $ac_vpsub
2777 $extrasub
2778 s%@SHELL@%$SHELL%g
2779 s%@CFLAGS@%$CFLAGS%g
2780 s%@CPPFLAGS@%$CPPFLAGS%g
2781 s%@CXXFLAGS@%$CXXFLAGS%g
2782 s%@FFLAGS@%$FFLAGS%g
2783 s%@DEFS@%$DEFS%g
2784 s%@LDFLAGS@%$LDFLAGS%g
2785 s%@LIBS@%$LIBS%g
2786 s%@exec_prefix@%$exec_prefix%g
2787 s%@prefix@%$prefix%g
2788 s%@program_transform_name@%$program_transform_name%g
2789 s%@bindir@%$bindir%g
2790 s%@sbindir@%$sbindir%g
2791 s%@libexecdir@%$libexecdir%g
2792 s%@datadir@%$datadir%g
2793 s%@sysconfdir@%$sysconfdir%g
2794 s%@sharedstatedir@%$sharedstatedir%g
2795 s%@localstatedir@%$localstatedir%g
2796 s%@libdir@%$libdir%g
2797 s%@includedir@%$includedir%g
2798 s%@oldincludedir@%$oldincludedir%g
2799 s%@infodir@%$infodir%g
2800 s%@mandir@%$mandir%g
2801 s%@libffi_basedir@%$libffi_basedir%g
2802 s%@host@%$host%g
2803 s%@host_alias@%$host_alias%g
2804 s%@host_cpu@%$host_cpu%g
2805 s%@host_vendor@%$host_vendor%g
2806 s%@host_os@%$host_os%g
2807 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
2808 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
2809 s%@INSTALL_DATA@%$INSTALL_DATA%g
2810 s%@PACKAGE@%$PACKAGE%g
2811 s%@VERSION@%$VERSION%g
2812 s%@ACLOCAL@%$ACLOCAL%g
2813 s%@AUTOCONF@%$AUTOCONF%g
2814 s%@AUTOMAKE@%$AUTOMAKE%g
2815 s%@AUTOHEADER@%$AUTOHEADER%g
2816 s%@MAKEINFO@%$MAKEINFO%g
2817 s%@SET_MAKE@%$SET_MAKE%g
2818 s%@EXEEXT@%$EXEEXT%g
2819 s%@MAINTAINER_MODE_TRUE@%$MAINTAINER_MODE_TRUE%g
2820 s%@MAINTAINER_MODE_FALSE@%$MAINTAINER_MODE_FALSE%g
2821 s%@MAINT@%$MAINT%g
2822 s%@CC@%$CC%g
2823 s%@build@%$build%g
2824 s%@build_alias@%$build_alias%g
2825 s%@build_cpu@%$build_cpu%g
2826 s%@build_vendor@%$build_vendor%g
2827 s%@build_os@%$build_os%g
2828 s%@RANLIB@%$RANLIB%g
2829 s%@LN_S@%$LN_S%g
2830 s%@LIBTOOL@%$LIBTOOL%g
2831 s%@MIPS_GCC_TRUE@%$MIPS_GCC_TRUE%g
2832 s%@MIPS_GCC_FALSE@%$MIPS_GCC_FALSE%g
2833 s%@MIPS_SGI_TRUE@%$MIPS_SGI_TRUE%g
2834 s%@MIPS_SGI_FALSE@%$MIPS_SGI_FALSE%g
2835 s%@SPARC_TRUE@%$SPARC_TRUE%g
2836 s%@SPARC_FALSE@%$SPARC_FALSE%g
2837 s%@X86_TRUE@%$X86_TRUE%g
2838 s%@X86_FALSE@%$X86_FALSE%g
2839 s%@ALPHA_TRUE@%$ALPHA_TRUE%g
2840 s%@ALPHA_FALSE@%$ALPHA_FALSE%g
2841 s%@IA64_TRUE@%$IA64_TRUE%g
2842 s%@IA64_FALSE@%$IA64_FALSE%g
2843 s%@M68K_TRUE@%$M68K_TRUE%g
2844 s%@M68K_FALSE@%$M68K_FALSE%g
2845 s%@POWERPC_TRUE@%$POWERPC_TRUE%g
2846 s%@POWERPC_FALSE@%$POWERPC_FALSE%g
2847 s%@ARM_TRUE@%$ARM_TRUE%g
2848 s%@ARM_FALSE@%$ARM_FALSE%g
2849 s%@CPP@%$CPP%g
2850 s%@ALLOCA@%$ALLOCA%g
2851 s%@TARGET@%$TARGET%g
2852 s%@TARGETDIR@%$TARGETDIR%g
2853 s%@USE_LIBDIR_TRUE@%$USE_LIBDIR_TRUE%g
2854 s%@USE_LIBDIR_FALSE@%$USE_LIBDIR_FALSE%g
2855
2856 CEOF
2857 EOF
2858
2859 cat >> $CONFIG_STATUS <<\EOF
2860
2861 # Split the substitutions into bite-sized pieces for seds with
2862 # small command number limits, like on Digital OSF/1 and HP-UX.
2863 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
2864 ac_file=1 # Number of current file.
2865 ac_beg=1 # First line for current file.
2866 ac_end=$ac_max_sed_cmds # Line after last line for current file.
2867 ac_more_lines=:
2868 ac_sed_cmds=""
2869 while $ac_more_lines; do
2870   if test $ac_beg -gt 1; then
2871     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
2872   else
2873     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
2874   fi
2875   if test ! -s conftest.s$ac_file; then
2876     ac_more_lines=false
2877     rm -f conftest.s$ac_file
2878   else
2879     if test -z "$ac_sed_cmds"; then
2880       ac_sed_cmds="sed -f conftest.s$ac_file"
2881     else
2882       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
2883     fi
2884     ac_file=`expr $ac_file + 1`
2885     ac_beg=$ac_end
2886     ac_end=`expr $ac_end + $ac_max_sed_cmds`
2887   fi
2888 done
2889 if test -z "$ac_sed_cmds"; then
2890   ac_sed_cmds=cat
2891 fi
2892 EOF
2893
2894 cat >> $CONFIG_STATUS <<EOF
2895
2896 CONFIG_FILES=\${CONFIG_FILES-"include/Makefile include/ffi.h Makefile"}
2897 EOF
2898 cat >> $CONFIG_STATUS <<\EOF
2899 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
2900   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
2901   case "$ac_file" in
2902   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
2903        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
2904   *) ac_file_in="${ac_file}.in" ;;
2905   esac
2906
2907   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
2908
2909   # Remove last slash and all that follows it.  Not all systems have dirname.
2910   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
2911   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
2912     # The file is in a subdirectory.
2913     test ! -d "$ac_dir" && mkdir "$ac_dir"
2914     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
2915     # A "../" for each directory in $ac_dir_suffix.
2916     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
2917   else
2918     ac_dir_suffix= ac_dots=
2919   fi
2920
2921   case "$ac_given_srcdir" in
2922   .)  srcdir=.
2923       if test -z "$ac_dots"; then top_srcdir=.
2924       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
2925   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
2926   *) # Relative path.
2927     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
2928     top_srcdir="$ac_dots$ac_given_srcdir" ;;
2929   esac
2930
2931   case "$ac_given_INSTALL" in
2932   [/$]*) INSTALL="$ac_given_INSTALL" ;;
2933   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
2934   esac
2935
2936   echo creating "$ac_file"
2937   rm -f "$ac_file"
2938   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
2939   case "$ac_file" in
2940   *Makefile*) ac_comsub="1i\\
2941 # $configure_input" ;;
2942   *) ac_comsub= ;;
2943   esac
2944
2945   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
2946   sed -e "$ac_comsub
2947 s%@configure_input@%$configure_input%g
2948 s%@srcdir@%$srcdir%g
2949 s%@top_srcdir@%$top_srcdir%g
2950 s%@INSTALL@%$INSTALL%g
2951 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
2952 fi; done
2953 rm -f conftest.s*
2954
2955 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
2956 # NAME is the cpp macro being defined and VALUE is the value it is being given.
2957 #
2958 # ac_d sets the value in "#define NAME VALUE" lines.
2959 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
2960 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
2961 ac_dC='\3'
2962 ac_dD='%g'
2963 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
2964 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
2965 ac_uB='\([      ]\)%\1#\2define\3'
2966 ac_uC=' '
2967 ac_uD='\4%g'
2968 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
2969 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
2970 ac_eB='$%\1#\2define\3'
2971 ac_eC=' '
2972 ac_eD='%g'
2973
2974 if test "${CONFIG_HEADERS+set}" != set; then
2975 EOF
2976 cat >> $CONFIG_STATUS <<EOF
2977   CONFIG_HEADERS="fficonfig.h"
2978 EOF
2979 cat >> $CONFIG_STATUS <<\EOF
2980 fi
2981 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
2982   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
2983   case "$ac_file" in
2984   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
2985        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
2986   *) ac_file_in="${ac_file}.in" ;;
2987   esac
2988
2989   echo creating $ac_file
2990
2991   rm -f conftest.frag conftest.in conftest.out
2992   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
2993   cat $ac_file_inputs > conftest.in
2994
2995 EOF
2996
2997 # Transform confdefs.h into a sed script conftest.vals that substitutes
2998 # the proper values into config.h.in to produce config.h.  And first:
2999 # Protect against being on the right side of a sed subst in config.status.
3000 # Protect against being in an unquoted here document in config.status.
3001 rm -f conftest.vals
3002 cat > conftest.hdr <<\EOF
3003 s/[\\&%]/\\&/g
3004 s%[\\$`]%\\&%g
3005 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
3006 s%ac_d%ac_u%gp
3007 s%ac_u%ac_e%gp
3008 EOF
3009 sed -n -f conftest.hdr confdefs.h > conftest.vals
3010 rm -f conftest.hdr
3011
3012 # This sed command replaces #undef with comments.  This is necessary, for
3013 # example, in the case of _POSIX_SOURCE, which is predefined and required
3014 # on some systems where configure will not decide to define it.
3015 cat >> conftest.vals <<\EOF
3016 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
3017 EOF
3018
3019 # Break up conftest.vals because some shells have a limit on
3020 # the size of here documents, and old seds have small limits too.
3021
3022 rm -f conftest.tail
3023 while :
3024 do
3025   ac_lines=`grep -c . conftest.vals`
3026   # grep -c gives empty output for an empty file on some AIX systems.
3027   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
3028   # Write a limited-size here document to conftest.frag.
3029   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
3030   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
3031   echo 'CEOF
3032   sed -f conftest.frag conftest.in > conftest.out
3033   rm -f conftest.in
3034   mv conftest.out conftest.in
3035 ' >> $CONFIG_STATUS
3036   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
3037   rm -f conftest.vals
3038   mv conftest.tail conftest.vals
3039 done
3040 rm -f conftest.vals
3041
3042 cat >> $CONFIG_STATUS <<\EOF
3043   rm -f conftest.frag conftest.h
3044   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
3045   cat conftest.in >> conftest.h
3046   rm -f conftest.in
3047   if cmp -s $ac_file conftest.h 2>/dev/null; then
3048     echo "$ac_file is unchanged"
3049     rm -f conftest.h
3050   else
3051     # Remove last slash and all that follows it.  Not all systems have dirname.
3052       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
3053       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
3054       # The file is in a subdirectory.
3055       test ! -d "$ac_dir" && mkdir "$ac_dir"
3056     fi
3057     rm -f $ac_file
3058     mv conftest.h $ac_file
3059   fi
3060 fi; done
3061
3062 EOF
3063 cat >> $CONFIG_STATUS <<EOF
3064
3065 srcdir=${srcdir}
3066 host=${host}
3067 target=${target}
3068 with_multisubdir=${with_multisubdir}
3069 ac_configure_args="${multilib_arg} ${ac_configure_args}"
3070 CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
3071 libffi_basedir=${libffi_basedir}
3072 CC="${CC}"
3073 DEFS="$DEFS"
3074 test ! -d include && mkdir include
3075 test ! -f include/fficonfig.h && cp fficonfig.h include/fficonfig.h
3076 if cmp -s fficonfig.h include/fficonfig.h 2>/dev/null; then 
3077         echo fficonfig.h unchanged
3078 else
3079         echo Moving fficonfig.h to include/fficonfig.h
3080         cp fficonfig.h include/fficonfig.h
3081 fi
3082
3083 EOF
3084 cat >> $CONFIG_STATUS <<\EOF
3085 test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h
3086
3087 if test -n "$CONFIG_FILES"; then
3088    ac_file=Makefile . ${libffi_basedir}/../config-ml.in
3089 fi
3090
3091 exit 0
3092 EOF
3093 chmod +x $CONFIG_STATUS
3094 rm -fr confdefs* $ac_clean_files
3095 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
3096