OSDN Git Service

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