OSDN Git Service

* fixinc/fixtests.c (TEST_FOR_FIX_PROC_HEAD): Fix to allow
[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_CMD'
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* |pw32*)
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_CMD'; 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_CMD'+set}'`\" = set"; then
1635   echo $ac_n "(cached) $ac_c" 1>&6
1636 else
1637   case "$MAGIC_CMD" in
1638   /*)
1639   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
1640   ;;
1641   ?:/*)
1642   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
1643   ;;
1644   *)
1645   ac_save_MAGIC_CMD="$MAGIC_CMD"
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_CMD="$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_CMD="$lt_cv_path_MAGIC_CMD"
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_CMD="$ac_save_MAGIC_CMD"
1681   ;;
1682 esac
1683 fi
1684
1685 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
1686 if test -n "$MAGIC_CMD"; then
1687   echo "$ac_t""$MAGIC_CMD" 1>&6
1688 else
1689   echo "$ac_t""no" 1>&6
1690 fi
1691
1692 if test -z "$lt_cv_path_MAGIC_CMD"; 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_CMD'+set}'`\" = set"; then
1697   echo $ac_n "(cached) $ac_c" 1>&6
1698 else
1699   case "$MAGIC_CMD" in
1700   /*)
1701   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
1702   ;;
1703   ?:/*)
1704   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
1705   ;;
1706   *)
1707   ac_save_MAGIC_CMD="$MAGIC_CMD"
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_CMD="$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_CMD="$lt_cv_path_MAGIC_CMD"
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_CMD="$ac_save_MAGIC_CMD"
1743   ;;
1744 esac
1745 fi
1746
1747 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
1748 if test -n "$MAGIC_CMD"; then
1749   echo "$ac_t""$MAGIC_CMD" 1>&6
1750 else
1751   echo "$ac_t""no" 1>&6
1752 fi
1753
1754   else
1755     MAGIC_CMD=:
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_CMD="$MAGIC_CMD" 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
2091 TARGETDIR="unknown"
2092 case "$host" in
2093 mips-sgi-irix5.* | mips-sgi-irix6.*) TARGET=MIPS; TARGETDIR=mips;;
2094 i*86-*-linux*) TARGET=X86; TARGETDIR=x86;;
2095 i*86-*-solaris*) TARGET=X86; TARGETDIR=x86;;
2096 i*86-*-beos*) TARGET=X86; TARGETDIR=x86;;
2097 i*86-*-freebsd*) TARGET=X86; TARGETDIR=x86;;
2098 sparc-sun-4*) TARGET=SPARC; TARGETDIR=sparc;;
2099 sparc-sun-*) TARGET=SPARC; TARGETDIR=sparc;;
2100 sparc-*-linux*) TARGET=SPARC; TARGETDIR=sparc;;
2101 sparc64-*-linux*) TARGET=SPARC; TARGETDIR=sparc;;
2102 alpha*-*-linux* | alpha*-*-osf*) TARGET=ALPHA; TARGETDIR=alpha;;
2103 ia64*-*-*) TARGET=IA64; TARGETDIR=ia64;;
2104 m68k-*-linux*) TARGET=M68K; TARGETDIR=m68k;;
2105 powerpc-*-linux* | powerpc-*-sysv*) TARGET=POWERPC; TARGETDIR=powerpc;;
2106 powerpc-*-beos*) TARGET=POWERPC; TARGETDIR=powerpc;;
2107 arm*-*-linux-*) TARGET=ARM; TARGETDIR=arm;;
2108 esac
2109
2110 if test $TARGETDIR = unknown; then
2111   { echo "configure: error: "libffi has not been ported to $host."" 1>&2; exit 1; }
2112 fi
2113
2114
2115
2116 if test ${TARGET}${ac_cv_prog_gcc} = MIPSyes; then
2117   MIPS_GCC_TRUE=
2118   MIPS_GCC_FALSE='#'
2119 else
2120   MIPS_GCC_TRUE='#'
2121   MIPS_GCC_FALSE=
2122 fi
2123
2124
2125 if test ${TARGET}${ac_cv_prog_gcc} = MIPSno; then
2126   MIPS_SGI_TRUE=
2127   MIPS_SGI_FALSE='#'
2128 else
2129   MIPS_SGI_TRUE='#'
2130   MIPS_SGI_FALSE=
2131 fi
2132
2133
2134 if test x$TARGET = xSPARC; then
2135   SPARC_TRUE=
2136   SPARC_FALSE='#'
2137 else
2138   SPARC_TRUE='#'
2139   SPARC_FALSE=
2140 fi
2141
2142
2143 if test x$TARGET = xX86; then
2144   X86_TRUE=
2145   X86_FALSE='#'
2146 else
2147   X86_TRUE='#'
2148   X86_FALSE=
2149 fi
2150
2151
2152 if test x$TARGET = xALPHA; then
2153   ALPHA_TRUE=
2154   ALPHA_FALSE='#'
2155 else
2156   ALPHA_TRUE='#'
2157   ALPHA_FALSE=
2158 fi
2159
2160
2161 if test x$TARGET = xIA64; then
2162   IA64_TRUE=
2163   IA64_FALSE='#'
2164 else
2165   IA64_TRUE='#'
2166   IA64_FALSE=
2167 fi
2168
2169
2170 if test x$TARGET = xM68K; then
2171   M68K_TRUE=
2172   M68K_FALSE='#'
2173 else
2174   M68K_TRUE='#'
2175   M68K_FALSE=
2176 fi
2177
2178
2179 if test x$TARGET = xPOWERPC; then
2180   POWERPC_TRUE=
2181   POWERPC_FALSE='#'
2182 else
2183   POWERPC_TRUE='#'
2184   POWERPC_FALSE=
2185 fi
2186
2187
2188 if test x$TARGET = xARM; then
2189   ARM_TRUE=
2190   ARM_FALSE='#'
2191 else
2192   ARM_TRUE='#'
2193   ARM_FALSE=
2194 fi
2195
2196 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
2197 echo "configure:2198: checking how to run the C preprocessor" >&5
2198 # On Suns, sometimes $CPP names a directory.
2199 if test -n "$CPP" && test -d "$CPP"; then
2200   CPP=
2201 fi
2202 if test -z "$CPP"; then
2203 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
2204   echo $ac_n "(cached) $ac_c" 1>&6
2205 else
2206     # This must be in double quotes, not single quotes, because CPP may get
2207   # substituted into the Makefile and "${CC-cc}" will confuse make.
2208   CPP="${CC-cc} -E"
2209   # On the NeXT, cc -E runs the code through the compiler's parser,
2210   # not just through cpp.
2211   cat > conftest.$ac_ext <<EOF
2212 #line 2213 "configure"
2213 #include "confdefs.h"
2214 #include <assert.h>
2215 Syntax Error
2216 EOF
2217 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2218 { (eval echo configure:2219: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2219 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2220 if test -z "$ac_err"; then
2221   :
2222 else
2223   echo "$ac_err" >&5
2224   echo "configure: failed program was:" >&5
2225   cat conftest.$ac_ext >&5
2226   rm -rf conftest*
2227   CPP="${CC-cc} -E -traditional-cpp"
2228   cat > conftest.$ac_ext <<EOF
2229 #line 2230 "configure"
2230 #include "confdefs.h"
2231 #include <assert.h>
2232 Syntax Error
2233 EOF
2234 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2235 { (eval echo configure:2236: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2236 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2237 if test -z "$ac_err"; then
2238   :
2239 else
2240   echo "$ac_err" >&5
2241   echo "configure: failed program was:" >&5
2242   cat conftest.$ac_ext >&5
2243   rm -rf conftest*
2244   CPP="${CC-cc} -nologo -E"
2245   cat > conftest.$ac_ext <<EOF
2246 #line 2247 "configure"
2247 #include "confdefs.h"
2248 #include <assert.h>
2249 Syntax Error
2250 EOF
2251 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2252 { (eval echo configure:2253: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2253 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2254 if test -z "$ac_err"; then
2255   :
2256 else
2257   echo "$ac_err" >&5
2258   echo "configure: failed program was:" >&5
2259   cat conftest.$ac_ext >&5
2260   rm -rf conftest*
2261   CPP=/lib/cpp
2262 fi
2263 rm -f conftest*
2264 fi
2265 rm -f conftest*
2266 fi
2267 rm -f conftest*
2268   ac_cv_prog_CPP="$CPP"
2269 fi
2270   CPP="$ac_cv_prog_CPP"
2271 else
2272   ac_cv_prog_CPP="$CPP"
2273 fi
2274 echo "$ac_t""$CPP" 1>&6
2275
2276 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
2277 echo "configure:2278: checking for ANSI C header files" >&5
2278 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
2279   echo $ac_n "(cached) $ac_c" 1>&6
2280 else
2281   cat > conftest.$ac_ext <<EOF
2282 #line 2283 "configure"
2283 #include "confdefs.h"
2284 #include <stdlib.h>
2285 #include <stdarg.h>
2286 #include <string.h>
2287 #include <float.h>
2288 EOF
2289 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2290 { (eval echo configure:2291: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2291 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2292 if test -z "$ac_err"; then
2293   rm -rf conftest*
2294   ac_cv_header_stdc=yes
2295 else
2296   echo "$ac_err" >&5
2297   echo "configure: failed program was:" >&5
2298   cat conftest.$ac_ext >&5
2299   rm -rf conftest*
2300   ac_cv_header_stdc=no
2301 fi
2302 rm -f conftest*
2303
2304 if test $ac_cv_header_stdc = yes; then
2305   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
2306 cat > conftest.$ac_ext <<EOF
2307 #line 2308 "configure"
2308 #include "confdefs.h"
2309 #include <string.h>
2310 EOF
2311 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2312   egrep "memchr" >/dev/null 2>&1; then
2313   :
2314 else
2315   rm -rf conftest*
2316   ac_cv_header_stdc=no
2317 fi
2318 rm -f conftest*
2319
2320 fi
2321
2322 if test $ac_cv_header_stdc = yes; then
2323   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
2324 cat > conftest.$ac_ext <<EOF
2325 #line 2326 "configure"
2326 #include "confdefs.h"
2327 #include <stdlib.h>
2328 EOF
2329 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2330   egrep "free" >/dev/null 2>&1; then
2331   :
2332 else
2333   rm -rf conftest*
2334   ac_cv_header_stdc=no
2335 fi
2336 rm -f conftest*
2337
2338 fi
2339
2340 if test $ac_cv_header_stdc = yes; then
2341   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
2342 if test "$cross_compiling" = yes; then
2343   :
2344 else
2345   cat > conftest.$ac_ext <<EOF
2346 #line 2347 "configure"
2347 #include "confdefs.h"
2348 #include <ctype.h>
2349 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
2350 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
2351 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
2352 int main () { int i; for (i = 0; i < 256; i++)
2353 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
2354 exit (0); }
2355
2356 EOF
2357 if { (eval echo configure:2358: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2358 then
2359   :
2360 else
2361   echo "configure: failed program was:" >&5
2362   cat conftest.$ac_ext >&5
2363   rm -fr conftest*
2364   ac_cv_header_stdc=no
2365 fi
2366 rm -fr conftest*
2367 fi
2368
2369 fi
2370 fi
2371
2372 echo "$ac_t""$ac_cv_header_stdc" 1>&6
2373 if test $ac_cv_header_stdc = yes; then
2374   cat >> confdefs.h <<\EOF
2375 #define STDC_HEADERS 1
2376 EOF
2377
2378 fi
2379
2380 for ac_func in memcpy
2381 do
2382 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2383 echo "configure:2384: checking for $ac_func" >&5
2384 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2385   echo $ac_n "(cached) $ac_c" 1>&6
2386 else
2387   cat > conftest.$ac_ext <<EOF
2388 #line 2389 "configure"
2389 #include "confdefs.h"
2390 /* System header to define __stub macros and hopefully few prototypes,
2391     which can conflict with char $ac_func(); below.  */
2392 #include <assert.h>
2393 /* Override any gcc2 internal prototype to avoid an error.  */
2394 /* We use char because int might match the return type of a gcc2
2395     builtin and then its argument prototype would still apply.  */
2396 char $ac_func();
2397
2398 int main() {
2399
2400 /* The GNU C library defines this for functions which it implements
2401     to always fail with ENOSYS.  Some functions are actually named
2402     something starting with __ and the normal name is an alias.  */
2403 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2404 choke me
2405 #else
2406 $ac_func();
2407 #endif
2408
2409 ; return 0; }
2410 EOF
2411 if { (eval echo configure:2412: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2412   rm -rf conftest*
2413   eval "ac_cv_func_$ac_func=yes"
2414 else
2415   echo "configure: failed program was:" >&5
2416   cat conftest.$ac_ext >&5
2417   rm -rf conftest*
2418   eval "ac_cv_func_$ac_func=no"
2419 fi
2420 rm -f conftest*
2421 fi
2422
2423 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2424   echo "$ac_t""yes" 1>&6
2425     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2426   cat >> confdefs.h <<EOF
2427 #define $ac_tr_func 1
2428 EOF
2429  
2430 else
2431   echo "$ac_t""no" 1>&6
2432 fi
2433 done
2434
2435 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
2436 # for constant arguments.  Useless!
2437 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
2438 echo "configure:2439: checking for working alloca.h" >&5
2439 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
2440   echo $ac_n "(cached) $ac_c" 1>&6
2441 else
2442   cat > conftest.$ac_ext <<EOF
2443 #line 2444 "configure"
2444 #include "confdefs.h"
2445 #include <alloca.h>
2446 int main() {
2447 char *p = alloca(2 * sizeof(int));
2448 ; return 0; }
2449 EOF
2450 if { (eval echo configure:2451: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2451   rm -rf conftest*
2452   ac_cv_header_alloca_h=yes
2453 else
2454   echo "configure: failed program was:" >&5
2455   cat conftest.$ac_ext >&5
2456   rm -rf conftest*
2457   ac_cv_header_alloca_h=no
2458 fi
2459 rm -f conftest*
2460 fi
2461
2462 echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
2463 if test $ac_cv_header_alloca_h = yes; then
2464   cat >> confdefs.h <<\EOF
2465 #define HAVE_ALLOCA_H 1
2466 EOF
2467
2468 fi
2469
2470 echo $ac_n "checking for alloca""... $ac_c" 1>&6
2471 echo "configure:2472: checking for alloca" >&5
2472 if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
2473   echo $ac_n "(cached) $ac_c" 1>&6
2474 else
2475   cat > conftest.$ac_ext <<EOF
2476 #line 2477 "configure"
2477 #include "confdefs.h"
2478
2479 #ifdef __GNUC__
2480 # define alloca __builtin_alloca
2481 #else
2482 # ifdef _MSC_VER
2483 #  include <malloc.h>
2484 #  define alloca _alloca
2485 # else
2486 #  if HAVE_ALLOCA_H
2487 #   include <alloca.h>
2488 #  else
2489 #   ifdef _AIX
2490  #pragma alloca
2491 #   else
2492 #    ifndef alloca /* predefined by HP cc +Olibcalls */
2493 char *alloca ();
2494 #    endif
2495 #   endif
2496 #  endif
2497 # endif
2498 #endif
2499
2500 int main() {
2501 char *p = (char *) alloca(1);
2502 ; return 0; }
2503 EOF
2504 if { (eval echo configure:2505: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2505   rm -rf conftest*
2506   ac_cv_func_alloca_works=yes
2507 else
2508   echo "configure: failed program was:" >&5
2509   cat conftest.$ac_ext >&5
2510   rm -rf conftest*
2511   ac_cv_func_alloca_works=no
2512 fi
2513 rm -f conftest*
2514 fi
2515
2516 echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
2517 if test $ac_cv_func_alloca_works = yes; then
2518   cat >> confdefs.h <<\EOF
2519 #define HAVE_ALLOCA 1
2520 EOF
2521
2522 fi
2523
2524 if test $ac_cv_func_alloca_works = no; then
2525   # The SVR3 libPW and SVR4 libucb both contain incompatible functions
2526   # that cause trouble.  Some versions do not even contain alloca or
2527   # contain a buggy version.  If you still want to use their alloca,
2528   # use ar to extract alloca.o from them instead of compiling alloca.c.
2529   ALLOCA=alloca.${ac_objext}
2530   cat >> confdefs.h <<\EOF
2531 #define C_ALLOCA 1
2532 EOF
2533
2534
2535 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
2536 echo "configure:2537: checking whether alloca needs Cray hooks" >&5
2537 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
2538   echo $ac_n "(cached) $ac_c" 1>&6
2539 else
2540   cat > conftest.$ac_ext <<EOF
2541 #line 2542 "configure"
2542 #include "confdefs.h"
2543 #if defined(CRAY) && ! defined(CRAY2)
2544 webecray
2545 #else
2546 wenotbecray
2547 #endif
2548
2549 EOF
2550 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2551   egrep "webecray" >/dev/null 2>&1; then
2552   rm -rf conftest*
2553   ac_cv_os_cray=yes
2554 else
2555   rm -rf conftest*
2556   ac_cv_os_cray=no
2557 fi
2558 rm -f conftest*
2559
2560 fi
2561
2562 echo "$ac_t""$ac_cv_os_cray" 1>&6
2563 if test $ac_cv_os_cray = yes; then
2564 for ac_func in _getb67 GETB67 getb67; do
2565   echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2566 echo "configure:2567: checking for $ac_func" >&5
2567 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2568   echo $ac_n "(cached) $ac_c" 1>&6
2569 else
2570   cat > conftest.$ac_ext <<EOF
2571 #line 2572 "configure"
2572 #include "confdefs.h"
2573 /* System header to define __stub macros and hopefully few prototypes,
2574     which can conflict with char $ac_func(); below.  */
2575 #include <assert.h>
2576 /* Override any gcc2 internal prototype to avoid an error.  */
2577 /* We use char because int might match the return type of a gcc2
2578     builtin and then its argument prototype would still apply.  */
2579 char $ac_func();
2580
2581 int main() {
2582
2583 /* The GNU C library defines this for functions which it implements
2584     to always fail with ENOSYS.  Some functions are actually named
2585     something starting with __ and the normal name is an alias.  */
2586 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2587 choke me
2588 #else
2589 $ac_func();
2590 #endif
2591
2592 ; return 0; }
2593 EOF
2594 if { (eval echo configure:2595: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2595   rm -rf conftest*
2596   eval "ac_cv_func_$ac_func=yes"
2597 else
2598   echo "configure: failed program was:" >&5
2599   cat conftest.$ac_ext >&5
2600   rm -rf conftest*
2601   eval "ac_cv_func_$ac_func=no"
2602 fi
2603 rm -f conftest*
2604 fi
2605
2606 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2607   echo "$ac_t""yes" 1>&6
2608   cat >> confdefs.h <<EOF
2609 #define CRAY_STACKSEG_END $ac_func
2610 EOF
2611
2612   break
2613 else
2614   echo "$ac_t""no" 1>&6
2615 fi
2616
2617 done
2618 fi
2619
2620 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
2621 echo "configure:2622: checking stack direction for C alloca" >&5
2622 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
2623   echo $ac_n "(cached) $ac_c" 1>&6
2624 else
2625   if test "$cross_compiling" = yes; then
2626   ac_cv_c_stack_direction=0
2627 else
2628   cat > conftest.$ac_ext <<EOF
2629 #line 2630 "configure"
2630 #include "confdefs.h"
2631 find_stack_direction ()
2632 {
2633   static char *addr = 0;
2634   auto char dummy;
2635   if (addr == 0)
2636     {
2637       addr = &dummy;
2638       return find_stack_direction ();
2639     }
2640   else
2641     return (&dummy > addr) ? 1 : -1;
2642 }
2643 main ()
2644 {
2645   exit (find_stack_direction() < 0);
2646 }
2647 EOF
2648 if { (eval echo configure:2649: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2649 then
2650   ac_cv_c_stack_direction=1
2651 else
2652   echo "configure: failed program was:" >&5
2653   cat conftest.$ac_ext >&5
2654   rm -fr conftest*
2655   ac_cv_c_stack_direction=-1
2656 fi
2657 rm -fr conftest*
2658 fi
2659
2660 fi
2661
2662 echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
2663 cat >> confdefs.h <<EOF
2664 #define STACK_DIRECTION $ac_cv_c_stack_direction
2665 EOF
2666
2667 fi
2668
2669
2670 echo $ac_n "checking size of short""... $ac_c" 1>&6
2671 echo "configure:2672: checking size of short" >&5
2672 if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
2673   echo $ac_n "(cached) $ac_c" 1>&6
2674 else
2675   if test "$cross_compiling" = yes; then
2676     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2677 else
2678   cat > conftest.$ac_ext <<EOF
2679 #line 2680 "configure"
2680 #include "confdefs.h"
2681 #include <stdio.h>
2682 main()
2683 {
2684   FILE *f=fopen("conftestval", "w");
2685   if (!f) exit(1);
2686   fprintf(f, "%d\n", sizeof(short));
2687   exit(0);
2688 }
2689 EOF
2690 if { (eval echo configure:2691: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2691 then
2692   ac_cv_sizeof_short=`cat conftestval`
2693 else
2694   echo "configure: failed program was:" >&5
2695   cat conftest.$ac_ext >&5
2696   rm -fr conftest*
2697   ac_cv_sizeof_short=0
2698 fi
2699 rm -fr conftest*
2700 fi
2701
2702 fi
2703 echo "$ac_t""$ac_cv_sizeof_short" 1>&6
2704 cat >> confdefs.h <<EOF
2705 #define SIZEOF_SHORT $ac_cv_sizeof_short
2706 EOF
2707
2708
2709 echo $ac_n "checking size of int""... $ac_c" 1>&6
2710 echo "configure:2711: checking size of int" >&5
2711 if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
2712   echo $ac_n "(cached) $ac_c" 1>&6
2713 else
2714   if test "$cross_compiling" = yes; then
2715     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2716 else
2717   cat > conftest.$ac_ext <<EOF
2718 #line 2719 "configure"
2719 #include "confdefs.h"
2720 #include <stdio.h>
2721 main()
2722 {
2723   FILE *f=fopen("conftestval", "w");
2724   if (!f) exit(1);
2725   fprintf(f, "%d\n", sizeof(int));
2726   exit(0);
2727 }
2728 EOF
2729 if { (eval echo configure:2730: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2730 then
2731   ac_cv_sizeof_int=`cat conftestval`
2732 else
2733   echo "configure: failed program was:" >&5
2734   cat conftest.$ac_ext >&5
2735   rm -fr conftest*
2736   ac_cv_sizeof_int=0
2737 fi
2738 rm -fr conftest*
2739 fi
2740
2741 fi
2742 echo "$ac_t""$ac_cv_sizeof_int" 1>&6
2743 cat >> confdefs.h <<EOF
2744 #define SIZEOF_INT $ac_cv_sizeof_int
2745 EOF
2746
2747
2748 echo $ac_n "checking size of long""... $ac_c" 1>&6
2749 echo "configure:2750: checking size of long" >&5
2750 if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
2751   echo $ac_n "(cached) $ac_c" 1>&6
2752 else
2753   if test "$cross_compiling" = yes; then
2754     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2755 else
2756   cat > conftest.$ac_ext <<EOF
2757 #line 2758 "configure"
2758 #include "confdefs.h"
2759 #include <stdio.h>
2760 main()
2761 {
2762   FILE *f=fopen("conftestval", "w");
2763   if (!f) exit(1);
2764   fprintf(f, "%d\n", sizeof(long));
2765   exit(0);
2766 }
2767 EOF
2768 if { (eval echo configure:2769: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2769 then
2770   ac_cv_sizeof_long=`cat conftestval`
2771 else
2772   echo "configure: failed program was:" >&5
2773   cat conftest.$ac_ext >&5
2774   rm -fr conftest*
2775   ac_cv_sizeof_long=0
2776 fi
2777 rm -fr conftest*
2778 fi
2779
2780 fi
2781 echo "$ac_t""$ac_cv_sizeof_long" 1>&6
2782 cat >> confdefs.h <<EOF
2783 #define SIZEOF_LONG $ac_cv_sizeof_long
2784 EOF
2785
2786
2787 echo $ac_n "checking size of long long""... $ac_c" 1>&6
2788 echo "configure:2789: checking size of long long" >&5
2789 if eval "test \"`echo '$''{'ac_cv_sizeof_long_long'+set}'`\" = set"; then
2790   echo $ac_n "(cached) $ac_c" 1>&6
2791 else
2792   if test "$cross_compiling" = yes; then
2793     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2794 else
2795   cat > conftest.$ac_ext <<EOF
2796 #line 2797 "configure"
2797 #include "confdefs.h"
2798 #include <stdio.h>
2799 main()
2800 {
2801   FILE *f=fopen("conftestval", "w");
2802   if (!f) exit(1);
2803   fprintf(f, "%d\n", sizeof(long long));
2804   exit(0);
2805 }
2806 EOF
2807 if { (eval echo configure:2808: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2808 then
2809   ac_cv_sizeof_long_long=`cat conftestval`
2810 else
2811   echo "configure: failed program was:" >&5
2812   cat conftest.$ac_ext >&5
2813   rm -fr conftest*
2814   ac_cv_sizeof_long_long=0
2815 fi
2816 rm -fr conftest*
2817 fi
2818
2819 fi
2820 echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6
2821 cat >> confdefs.h <<EOF
2822 #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
2823 EOF
2824
2825
2826 echo $ac_n "checking size of float""... $ac_c" 1>&6
2827 echo "configure:2828: checking size of float" >&5
2828 if eval "test \"`echo '$''{'ac_cv_sizeof_float'+set}'`\" = set"; then
2829   echo $ac_n "(cached) $ac_c" 1>&6
2830 else
2831   if test "$cross_compiling" = yes; then
2832     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2833 else
2834   cat > conftest.$ac_ext <<EOF
2835 #line 2836 "configure"
2836 #include "confdefs.h"
2837 #include <stdio.h>
2838 main()
2839 {
2840   FILE *f=fopen("conftestval", "w");
2841   if (!f) exit(1);
2842   fprintf(f, "%d\n", sizeof(float));
2843   exit(0);
2844 }
2845 EOF
2846 if { (eval echo configure:2847: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2847 then
2848   ac_cv_sizeof_float=`cat conftestval`
2849 else
2850   echo "configure: failed program was:" >&5
2851   cat conftest.$ac_ext >&5
2852   rm -fr conftest*
2853   ac_cv_sizeof_float=0
2854 fi
2855 rm -fr conftest*
2856 fi
2857
2858 fi
2859 echo "$ac_t""$ac_cv_sizeof_float" 1>&6
2860 cat >> confdefs.h <<EOF
2861 #define SIZEOF_FLOAT $ac_cv_sizeof_float
2862 EOF
2863
2864
2865 echo $ac_n "checking size of double""... $ac_c" 1>&6
2866 echo "configure:2867: checking size of double" >&5
2867 if eval "test \"`echo '$''{'ac_cv_sizeof_double'+set}'`\" = set"; then
2868   echo $ac_n "(cached) $ac_c" 1>&6
2869 else
2870   if test "$cross_compiling" = yes; then
2871     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2872 else
2873   cat > conftest.$ac_ext <<EOF
2874 #line 2875 "configure"
2875 #include "confdefs.h"
2876 #include <stdio.h>
2877 main()
2878 {
2879   FILE *f=fopen("conftestval", "w");
2880   if (!f) exit(1);
2881   fprintf(f, "%d\n", sizeof(double));
2882   exit(0);
2883 }
2884 EOF
2885 if { (eval echo configure:2886: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2886 then
2887   ac_cv_sizeof_double=`cat conftestval`
2888 else
2889   echo "configure: failed program was:" >&5
2890   cat conftest.$ac_ext >&5
2891   rm -fr conftest*
2892   ac_cv_sizeof_double=0
2893 fi
2894 rm -fr conftest*
2895 fi
2896
2897 fi
2898 echo "$ac_t""$ac_cv_sizeof_double" 1>&6
2899 cat >> confdefs.h <<EOF
2900 #define SIZEOF_DOUBLE $ac_cv_sizeof_double
2901 EOF
2902
2903
2904 echo $ac_n "checking size of long double""... $ac_c" 1>&6
2905 echo "configure:2906: checking size of long double" >&5
2906 if eval "test \"`echo '$''{'ac_cv_sizeof_long_double'+set}'`\" = set"; then
2907   echo $ac_n "(cached) $ac_c" 1>&6
2908 else
2909   if test "$cross_compiling" = yes; then
2910     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2911 else
2912   cat > conftest.$ac_ext <<EOF
2913 #line 2914 "configure"
2914 #include "confdefs.h"
2915 #include <stdio.h>
2916 main()
2917 {
2918   FILE *f=fopen("conftestval", "w");
2919   if (!f) exit(1);
2920   fprintf(f, "%d\n", sizeof(long double));
2921   exit(0);
2922 }
2923 EOF
2924 if { (eval echo configure:2925: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2925 then
2926   ac_cv_sizeof_long_double=`cat conftestval`
2927 else
2928   echo "configure: failed program was:" >&5
2929   cat conftest.$ac_ext >&5
2930   rm -fr conftest*
2931   ac_cv_sizeof_long_double=0
2932 fi
2933 rm -fr conftest*
2934 fi
2935
2936 fi
2937 echo "$ac_t""$ac_cv_sizeof_long_double" 1>&6
2938 cat >> confdefs.h <<EOF
2939 #define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
2940 EOF
2941
2942
2943
2944 echo $ac_n "checking size of void *""... $ac_c" 1>&6
2945 echo "configure:2946: checking size of void *" >&5
2946 if eval "test \"`echo '$''{'ac_cv_sizeof_void_p'+set}'`\" = set"; then
2947   echo $ac_n "(cached) $ac_c" 1>&6
2948 else
2949   if test "$cross_compiling" = yes; then
2950     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2951 else
2952   cat > conftest.$ac_ext <<EOF
2953 #line 2954 "configure"
2954 #include "confdefs.h"
2955 #include <stdio.h>
2956 main()
2957 {
2958   FILE *f=fopen("conftestval", "w");
2959   if (!f) exit(1);
2960   fprintf(f, "%d\n", sizeof(void *));
2961   exit(0);
2962 }
2963 EOF
2964 if { (eval echo configure:2965: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2965 then
2966   ac_cv_sizeof_void_p=`cat conftestval`
2967 else
2968   echo "configure: failed program was:" >&5
2969   cat conftest.$ac_ext >&5
2970   rm -fr conftest*
2971   ac_cv_sizeof_void_p=0
2972 fi
2973 rm -fr conftest*
2974 fi
2975
2976 fi
2977 echo "$ac_t""$ac_cv_sizeof_void_p" 1>&6
2978 cat >> confdefs.h <<EOF
2979 #define SIZEOF_VOID_P $ac_cv_sizeof_void_p
2980 EOF
2981
2982
2983 echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
2984 echo "configure:2985: checking whether byte ordering is bigendian" >&5
2985 if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
2986   echo $ac_n "(cached) $ac_c" 1>&6
2987 else
2988   ac_cv_c_bigendian=unknown
2989 # See if sys/param.h defines the BYTE_ORDER macro.
2990 cat > conftest.$ac_ext <<EOF
2991 #line 2992 "configure"
2992 #include "confdefs.h"
2993 #include <sys/types.h>
2994 #include <sys/param.h>
2995 int main() {
2996
2997 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
2998  bogus endian macros
2999 #endif
3000 ; return 0; }
3001 EOF
3002 if { (eval echo configure:3003: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3003   rm -rf conftest*
3004   # It does; now see whether it defined to BIG_ENDIAN or not.
3005 cat > conftest.$ac_ext <<EOF
3006 #line 3007 "configure"
3007 #include "confdefs.h"
3008 #include <sys/types.h>
3009 #include <sys/param.h>
3010 int main() {
3011
3012 #if BYTE_ORDER != BIG_ENDIAN
3013  not big endian
3014 #endif
3015 ; return 0; }
3016 EOF
3017 if { (eval echo configure:3018: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3018   rm -rf conftest*
3019   ac_cv_c_bigendian=yes
3020 else
3021   echo "configure: failed program was:" >&5
3022   cat conftest.$ac_ext >&5
3023   rm -rf conftest*
3024   ac_cv_c_bigendian=no
3025 fi
3026 rm -f conftest*
3027 else
3028   echo "configure: failed program was:" >&5
3029   cat conftest.$ac_ext >&5
3030 fi
3031 rm -f conftest*
3032 if test $ac_cv_c_bigendian = unknown; then
3033 if test "$cross_compiling" = yes; then
3034     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
3035 else
3036   cat > conftest.$ac_ext <<EOF
3037 #line 3038 "configure"
3038 #include "confdefs.h"
3039 main () {
3040   /* Are we little or big endian?  From Harbison&Steele.  */
3041   union
3042   {
3043     long l;
3044     char c[sizeof (long)];
3045   } u;
3046   u.l = 1;
3047   exit (u.c[sizeof (long) - 1] == 1);
3048 }
3049 EOF
3050 if { (eval echo configure:3051: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3051 then
3052   ac_cv_c_bigendian=no
3053 else
3054   echo "configure: failed program was:" >&5
3055   cat conftest.$ac_ext >&5
3056   rm -fr conftest*
3057   ac_cv_c_bigendian=yes
3058 fi
3059 rm -fr conftest*
3060 fi
3061
3062 fi
3063 fi
3064
3065 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
3066 if test $ac_cv_c_bigendian = yes; then
3067   cat >> confdefs.h <<\EOF
3068 #define WORDS_BIGENDIAN 1
3069 EOF
3070
3071 fi
3072
3073
3074
3075
3076
3077
3078
3079 # Check whether --enable-debug or --disable-debug was given.
3080 if test "${enable_debug+set}" = set; then
3081   enableval="$enable_debug"
3082   cat >> confdefs.h <<\EOF
3083 #define FFI_DEBUG 1
3084 EOF
3085
3086 fi
3087
3088
3089 # Check whether --enable-debug or --disable-debug was given.
3090 if test "${enable_debug+set}" = set; then
3091   enableval="$enable_debug"
3092   cat >> confdefs.h <<\EOF
3093 #define FFI_NO_STRUCTS 1
3094 EOF
3095
3096 fi
3097
3098
3099 # Check whether --enable-debug or --disable-debug was given.
3100 if test "${enable_debug+set}" = set; then
3101   enableval="$enable_debug"
3102   cat >> confdefs.h <<\EOF
3103 #define FFI_NO_RAW_API 1
3104 EOF
3105
3106 fi
3107
3108
3109 # Check whether --enable-purify-safety or --disable-purify-safety was given.
3110 if test "${enable_purify_safety+set}" = set; then
3111   enableval="$enable_purify_safety"
3112   cat >> confdefs.h <<\EOF
3113 #define USING_PURIFY 1
3114 EOF
3115
3116 fi
3117
3118
3119
3120
3121 if test -z "$with_cross_host"; then
3122   USE_LIBDIR_TRUE=
3123   USE_LIBDIR_FALSE='#'
3124 else
3125   USE_LIBDIR_TRUE='#'
3126   USE_LIBDIR_FALSE=
3127 fi
3128
3129 if test "${multilib}" = "yes"; then
3130   multilib_arg="--enable-multilib"
3131 else
3132   multilib_arg=
3133 fi
3134
3135 trap '' 1 2 15
3136 cat > confcache <<\EOF
3137 # This file is a shell script that caches the results of configure
3138 # tests run on this system so they can be shared between configure
3139 # scripts and configure runs.  It is not useful on other systems.
3140 # If it contains results you don't want to keep, you may remove or edit it.
3141 #
3142 # By default, configure uses ./config.cache as the cache file,
3143 # creating it if it does not exist already.  You can give configure
3144 # the --cache-file=FILE option to use a different cache file; that is
3145 # what configure does when it calls configure scripts in
3146 # subdirectories, so they share the cache.
3147 # Giving --cache-file=/dev/null disables caching, for debugging configure.
3148 # config.status only pays attention to the cache file if you give it the
3149 # --recheck option to rerun configure.
3150 #
3151 EOF
3152 # The following way of writing the cache mishandles newlines in values,
3153 # but we know of no workaround that is simple, portable, and efficient.
3154 # So, don't put newlines in cache variables' values.
3155 # Ultrix sh set writes to stderr and can't be redirected directly,
3156 # and sets the high bit in the cache file unless we assign to the vars.
3157 (set) 2>&1 |
3158   case `(ac_space=' '; set | grep ac_space) 2>&1` in
3159   *ac_space=\ *)
3160     # `set' does not quote correctly, so add quotes (double-quote substitution
3161     # turns \\\\ into \\, and sed turns \\ into \).
3162     sed -n \
3163       -e "s/'/'\\\\''/g" \
3164       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
3165     ;;
3166   *)
3167     # `set' quotes correctly as required by POSIX, so do not add quotes.
3168     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
3169     ;;
3170   esac >> confcache
3171 if cmp -s $cache_file confcache; then
3172   :
3173 else
3174   if test -w $cache_file; then
3175     echo "updating cache $cache_file"
3176     cat confcache > $cache_file
3177   else
3178     echo "not updating unwritable cache $cache_file"
3179   fi
3180 fi
3181 rm -f confcache
3182
3183 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
3184
3185 test "x$prefix" = xNONE && prefix=$ac_default_prefix
3186 # Let make expand exec_prefix.
3187 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
3188
3189 # Any assignment to VPATH causes Sun make to only execute
3190 # the first set of double-colon rules, so remove it if not needed.
3191 # If there is a colon in the path, we need to keep it.
3192 if test "x$srcdir" = x.; then
3193   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
3194 fi
3195
3196 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
3197
3198 DEFS=-DHAVE_CONFIG_H
3199
3200 # Without the "./", some shells look in PATH for config.status.
3201 : ${CONFIG_STATUS=./config.status}
3202
3203 echo creating $CONFIG_STATUS
3204 rm -f $CONFIG_STATUS
3205 cat > $CONFIG_STATUS <<EOF
3206 #! /bin/sh
3207 # Generated automatically by configure.
3208 # Run this file to recreate the current configuration.
3209 # This directory was configured as follows,
3210 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
3211 #
3212 # $0 $ac_configure_args
3213 #
3214 # Compiler output produced by configure, useful for debugging
3215 # configure, is in ./config.log if it exists.
3216
3217 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
3218 for ac_option
3219 do
3220   case "\$ac_option" in
3221   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
3222     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
3223     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
3224   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
3225     echo "$CONFIG_STATUS generated by autoconf version 2.13"
3226     exit 0 ;;
3227   -help | --help | --hel | --he | --h)
3228     echo "\$ac_cs_usage"; exit 0 ;;
3229   *) echo "\$ac_cs_usage"; exit 1 ;;
3230   esac
3231 done
3232
3233 ac_given_srcdir=$srcdir
3234 ac_given_INSTALL="$INSTALL"
3235
3236 trap 'rm -fr `echo "include/Makefile include/ffi.h Makefile fficonfig.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
3237 EOF
3238 cat >> $CONFIG_STATUS <<EOF
3239
3240 # Protect against being on the right side of a sed subst in config.status.
3241 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
3242  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
3243 $ac_vpsub
3244 $extrasub
3245 s%@SHELL@%$SHELL%g
3246 s%@CFLAGS@%$CFLAGS%g
3247 s%@CPPFLAGS@%$CPPFLAGS%g
3248 s%@CXXFLAGS@%$CXXFLAGS%g
3249 s%@FFLAGS@%$FFLAGS%g
3250 s%@DEFS@%$DEFS%g
3251 s%@LDFLAGS@%$LDFLAGS%g
3252 s%@LIBS@%$LIBS%g
3253 s%@exec_prefix@%$exec_prefix%g
3254 s%@prefix@%$prefix%g
3255 s%@program_transform_name@%$program_transform_name%g
3256 s%@bindir@%$bindir%g
3257 s%@sbindir@%$sbindir%g
3258 s%@libexecdir@%$libexecdir%g
3259 s%@datadir@%$datadir%g
3260 s%@sysconfdir@%$sysconfdir%g
3261 s%@sharedstatedir@%$sharedstatedir%g
3262 s%@localstatedir@%$localstatedir%g
3263 s%@libdir@%$libdir%g
3264 s%@includedir@%$includedir%g
3265 s%@oldincludedir@%$oldincludedir%g
3266 s%@infodir@%$infodir%g
3267 s%@mandir@%$mandir%g
3268 s%@libffi_basedir@%$libffi_basedir%g
3269 s%@host@%$host%g
3270 s%@host_alias@%$host_alias%g
3271 s%@host_cpu@%$host_cpu%g
3272 s%@host_vendor@%$host_vendor%g
3273 s%@host_os@%$host_os%g
3274 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
3275 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
3276 s%@INSTALL_DATA@%$INSTALL_DATA%g
3277 s%@PACKAGE@%$PACKAGE%g
3278 s%@VERSION@%$VERSION%g
3279 s%@ACLOCAL@%$ACLOCAL%g
3280 s%@AUTOCONF@%$AUTOCONF%g
3281 s%@AUTOMAKE@%$AUTOMAKE%g
3282 s%@AUTOHEADER@%$AUTOHEADER%g
3283 s%@MAKEINFO@%$MAKEINFO%g
3284 s%@SET_MAKE@%$SET_MAKE%g
3285 s%@EXEEXT@%$EXEEXT%g
3286 s%@MAINTAINER_MODE_TRUE@%$MAINTAINER_MODE_TRUE%g
3287 s%@MAINTAINER_MODE_FALSE@%$MAINTAINER_MODE_FALSE%g
3288 s%@MAINT@%$MAINT%g
3289 s%@CC@%$CC%g
3290 s%@build@%$build%g
3291 s%@build_alias@%$build_alias%g
3292 s%@build_cpu@%$build_cpu%g
3293 s%@build_vendor@%$build_vendor%g
3294 s%@build_os@%$build_os%g
3295 s%@LN_S@%$LN_S%g
3296 s%@OBJEXT@%$OBJEXT%g
3297 s%@RANLIB@%$RANLIB%g
3298 s%@STRIP@%$STRIP%g
3299 s%@LIBTOOL@%$LIBTOOL%g
3300 s%@MIPS_GCC_TRUE@%$MIPS_GCC_TRUE%g
3301 s%@MIPS_GCC_FALSE@%$MIPS_GCC_FALSE%g
3302 s%@MIPS_SGI_TRUE@%$MIPS_SGI_TRUE%g
3303 s%@MIPS_SGI_FALSE@%$MIPS_SGI_FALSE%g
3304 s%@SPARC_TRUE@%$SPARC_TRUE%g
3305 s%@SPARC_FALSE@%$SPARC_FALSE%g
3306 s%@X86_TRUE@%$X86_TRUE%g
3307 s%@X86_FALSE@%$X86_FALSE%g
3308 s%@ALPHA_TRUE@%$ALPHA_TRUE%g
3309 s%@ALPHA_FALSE@%$ALPHA_FALSE%g
3310 s%@IA64_TRUE@%$IA64_TRUE%g
3311 s%@IA64_FALSE@%$IA64_FALSE%g
3312 s%@M68K_TRUE@%$M68K_TRUE%g
3313 s%@M68K_FALSE@%$M68K_FALSE%g
3314 s%@POWERPC_TRUE@%$POWERPC_TRUE%g
3315 s%@POWERPC_FALSE@%$POWERPC_FALSE%g
3316 s%@ARM_TRUE@%$ARM_TRUE%g
3317 s%@ARM_FALSE@%$ARM_FALSE%g
3318 s%@CPP@%$CPP%g
3319 s%@ALLOCA@%$ALLOCA%g
3320 s%@TARGET@%$TARGET%g
3321 s%@TARGETDIR@%$TARGETDIR%g
3322 s%@USE_LIBDIR_TRUE@%$USE_LIBDIR_TRUE%g
3323 s%@USE_LIBDIR_FALSE@%$USE_LIBDIR_FALSE%g
3324
3325 CEOF
3326 EOF
3327
3328 cat >> $CONFIG_STATUS <<\EOF
3329
3330 # Split the substitutions into bite-sized pieces for seds with
3331 # small command number limits, like on Digital OSF/1 and HP-UX.
3332 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
3333 ac_file=1 # Number of current file.
3334 ac_beg=1 # First line for current file.
3335 ac_end=$ac_max_sed_cmds # Line after last line for current file.
3336 ac_more_lines=:
3337 ac_sed_cmds=""
3338 while $ac_more_lines; do
3339   if test $ac_beg -gt 1; then
3340     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
3341   else
3342     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
3343   fi
3344   if test ! -s conftest.s$ac_file; then
3345     ac_more_lines=false
3346     rm -f conftest.s$ac_file
3347   else
3348     if test -z "$ac_sed_cmds"; then
3349       ac_sed_cmds="sed -f conftest.s$ac_file"
3350     else
3351       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
3352     fi
3353     ac_file=`expr $ac_file + 1`
3354     ac_beg=$ac_end
3355     ac_end=`expr $ac_end + $ac_max_sed_cmds`
3356   fi
3357 done
3358 if test -z "$ac_sed_cmds"; then
3359   ac_sed_cmds=cat
3360 fi
3361 EOF
3362
3363 cat >> $CONFIG_STATUS <<EOF
3364
3365 CONFIG_FILES=\${CONFIG_FILES-"include/Makefile include/ffi.h Makefile"}
3366 EOF
3367 cat >> $CONFIG_STATUS <<\EOF
3368 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
3369   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
3370   case "$ac_file" in
3371   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
3372        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
3373   *) ac_file_in="${ac_file}.in" ;;
3374   esac
3375
3376   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
3377
3378   # Remove last slash and all that follows it.  Not all systems have dirname.
3379   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
3380   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
3381     # The file is in a subdirectory.
3382     test ! -d "$ac_dir" && mkdir "$ac_dir"
3383     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
3384     # A "../" for each directory in $ac_dir_suffix.
3385     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
3386   else
3387     ac_dir_suffix= ac_dots=
3388   fi
3389
3390   case "$ac_given_srcdir" in
3391   .)  srcdir=.
3392       if test -z "$ac_dots"; then top_srcdir=.
3393       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
3394   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
3395   *) # Relative path.
3396     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
3397     top_srcdir="$ac_dots$ac_given_srcdir" ;;
3398   esac
3399
3400   case "$ac_given_INSTALL" in
3401   [/$]*) INSTALL="$ac_given_INSTALL" ;;
3402   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
3403   esac
3404
3405   echo creating "$ac_file"
3406   rm -f "$ac_file"
3407   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
3408   case "$ac_file" in
3409   *Makefile*) ac_comsub="1i\\
3410 # $configure_input" ;;
3411   *) ac_comsub= ;;
3412   esac
3413
3414   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
3415   sed -e "$ac_comsub
3416 s%@configure_input@%$configure_input%g
3417 s%@srcdir@%$srcdir%g
3418 s%@top_srcdir@%$top_srcdir%g
3419 s%@INSTALL@%$INSTALL%g
3420 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
3421 fi; done
3422 rm -f conftest.s*
3423
3424 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
3425 # NAME is the cpp macro being defined and VALUE is the value it is being given.
3426 #
3427 # ac_d sets the value in "#define NAME VALUE" lines.
3428 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
3429 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
3430 ac_dC='\3'
3431 ac_dD='%g'
3432 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
3433 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
3434 ac_uB='\([      ]\)%\1#\2define\3'
3435 ac_uC=' '
3436 ac_uD='\4%g'
3437 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
3438 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
3439 ac_eB='$%\1#\2define\3'
3440 ac_eC=' '
3441 ac_eD='%g'
3442
3443 if test "${CONFIG_HEADERS+set}" != set; then
3444 EOF
3445 cat >> $CONFIG_STATUS <<EOF
3446   CONFIG_HEADERS="fficonfig.h"
3447 EOF
3448 cat >> $CONFIG_STATUS <<\EOF
3449 fi
3450 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
3451   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
3452   case "$ac_file" in
3453   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
3454        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
3455   *) ac_file_in="${ac_file}.in" ;;
3456   esac
3457
3458   echo creating $ac_file
3459
3460   rm -f conftest.frag conftest.in conftest.out
3461   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
3462   cat $ac_file_inputs > conftest.in
3463
3464 EOF
3465
3466 # Transform confdefs.h into a sed script conftest.vals that substitutes
3467 # the proper values into config.h.in to produce config.h.  And first:
3468 # Protect against being on the right side of a sed subst in config.status.
3469 # Protect against being in an unquoted here document in config.status.
3470 rm -f conftest.vals
3471 cat > conftest.hdr <<\EOF
3472 s/[\\&%]/\\&/g
3473 s%[\\$`]%\\&%g
3474 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
3475 s%ac_d%ac_u%gp
3476 s%ac_u%ac_e%gp
3477 EOF
3478 sed -n -f conftest.hdr confdefs.h > conftest.vals
3479 rm -f conftest.hdr
3480
3481 # This sed command replaces #undef with comments.  This is necessary, for
3482 # example, in the case of _POSIX_SOURCE, which is predefined and required
3483 # on some systems where configure will not decide to define it.
3484 cat >> conftest.vals <<\EOF
3485 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
3486 EOF
3487
3488 # Break up conftest.vals because some shells have a limit on
3489 # the size of here documents, and old seds have small limits too.
3490
3491 rm -f conftest.tail
3492 while :
3493 do
3494   ac_lines=`grep -c . conftest.vals`
3495   # grep -c gives empty output for an empty file on some AIX systems.
3496   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
3497   # Write a limited-size here document to conftest.frag.
3498   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
3499   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
3500   echo 'CEOF
3501   sed -f conftest.frag conftest.in > conftest.out
3502   rm -f conftest.in
3503   mv conftest.out conftest.in
3504 ' >> $CONFIG_STATUS
3505   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
3506   rm -f conftest.vals
3507   mv conftest.tail conftest.vals
3508 done
3509 rm -f conftest.vals
3510
3511 cat >> $CONFIG_STATUS <<\EOF
3512   rm -f conftest.frag conftest.h
3513   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
3514   cat conftest.in >> conftest.h
3515   rm -f conftest.in
3516   if cmp -s $ac_file conftest.h 2>/dev/null; then
3517     echo "$ac_file is unchanged"
3518     rm -f conftest.h
3519   else
3520     # Remove last slash and all that follows it.  Not all systems have dirname.
3521       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
3522       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
3523       # The file is in a subdirectory.
3524       test ! -d "$ac_dir" && mkdir "$ac_dir"
3525     fi
3526     rm -f $ac_file
3527     mv conftest.h $ac_file
3528   fi
3529 fi; done
3530
3531 EOF
3532 cat >> $CONFIG_STATUS <<EOF
3533
3534 srcdir=${srcdir}
3535 host=${host}
3536 target=${target}
3537 with_multisubdir=${with_multisubdir}
3538 ac_configure_args="${multilib_arg} ${ac_configure_args}"
3539 CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
3540 libffi_basedir=${libffi_basedir}
3541 CC="${CC}"
3542 DEFS="$DEFS"
3543 test ! -d include && mkdir include
3544 test ! -f include/fficonfig.h && cp fficonfig.h include/fficonfig.h
3545 if cmp -s fficonfig.h include/fficonfig.h 2>/dev/null; then 
3546         echo fficonfig.h unchanged
3547 else
3548         echo Moving fficonfig.h to include/fficonfig.h
3549         cp fficonfig.h include/fficonfig.h
3550 fi
3551
3552 EOF
3553 cat >> $CONFIG_STATUS <<\EOF
3554 test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h
3555
3556 if test -n "$CONFIG_FILES"; then
3557    ac_file=Makefile . ${libffi_basedir}/../config-ml.in
3558 fi
3559
3560 exit 0
3561 EOF
3562 chmod +x $CONFIG_STATUS
3563 rm -fr confdefs* $ac_clean_files
3564 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
3565