OSDN Git Service

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