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:
11ac_help=
12ac_default_prefix=/usr/local
13# Any additions from configure.in:
14ac_help="$ac_help
15  --enable-multilib       build many library versions (default)"
16ac_help="$ac_help
17  --enable-shared[=PKGS]  build shared libraries [default=yes]"
18ac_help="$ac_help
19  --enable-static[=PKGS]  build static libraries [default=yes]"
20ac_help="$ac_help
21  --enable-fast-install[=PKGS]  optimize for fast installation [default=yes]"
22ac_help="$ac_help
23  --with-gnu-ld           assume the C compiler uses GNU ld [default=no]"
24ac_help="$ac_help
25  --disable-libtool-lock  avoid locking (might break parallel builds)"
26ac_help="$ac_help
27  --with-pic              try to use only PIC/non-PIC objects [default=use both]"
28ac_help="$ac_help
29  --enable-maintainer-mode enable make rules and dependencies not useful
30                          (and sometimes confusing) to the casual installer"
31ac_help="$ac_help
32  --enable-debug          debugging mode"
33ac_help="$ac_help
34  --disable-structs       omit code for struct support"
35ac_help="$ac_help
36  --disable-raw-api       make the raw api unavailable"
37ac_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.
43build=NONE
44cache_file=./config.cache
45exec_prefix=NONE
46host=NONE
47no_create=
48nonopt=NONE
49no_recursion=
50prefix=NONE
51program_prefix=NONE
52program_suffix=NONE
53program_transform_name=s,x,x,
54silent=
55site=
56srcdir=
57target=NONE
58verbose=
59x_includes=NONE
60x_libraries=NONE
61bindir='${exec_prefix}/bin'
62sbindir='${exec_prefix}/sbin'
63libexecdir='${exec_prefix}/libexec'
64datadir='${prefix}/share'
65sysconfdir='${prefix}/etc'
66sharedstatedir='${prefix}/com'
67localstatedir='${prefix}/var'
68libdir='${exec_prefix}/lib'
69includedir='${prefix}/include'
70oldincludedir='/usr/include'
71infodir='${prefix}/info'
72mandir='${prefix}/man'
73
74# Initialize some other variables.
75subdirs=
76MFLAGS= MAKEFLAGS=
77SHELL=${CONFIG_SHELL-/bin/sh}
78# Maximum number of lines to put in a shell here document.
79ac_max_here_lines=12
80
81ac_prev=
82for ac_option
83do
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
163Usage: configure [options] [host]
164Options: [defaults in brackets after descriptions]
165Configuration:
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
171Directory 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
195EOF
196    cat << EOF
197Host 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]
201Features 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
208EOF
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
418done
419
420if test -n "$ac_prev"; then
421  { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
422fi
423
424trap '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
434if test "$silent" = yes; then
435  exec 6>/dev/null
436else
437  exec 6>&1
438fi
439exec 5>./config.log
440
441echo "\
442This file contains any messages produced by compilers while
443running 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.
448ac_configure_args=
449for ac_arg
450do
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
460done
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.
467if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
468if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
469if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
470if 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.
473rm -rf conftest* confdefs.h
474# AIX cpp loses on an empty file, so make sure it contains at least a newline.
475echo > 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.
479ac_unique_file=fficonfig.h.in
480
481# Find the source files, if location was not specified.
482if 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
492else
493  ac_srcdir_defaulted=no
494fi
495if 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
501fi
502srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
503
504# Prefer explicitly selected file to automatically selected ones.
505if 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
511fi
512for 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
517done
518
519if test -r "$cache_file"; then
520  echo "loading cache $cache_file"
521  . $cache_file
522else
523  echo "creating cache $cache_file"
524  > $cache_file
525fi
526
527ac_ext=c
528# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
529ac_cpp='$CPP $CPPFLAGS'
530ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
531ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
532cross_compiling=$ac_cv_prog_cc_cross
533
534ac_exeext=
535ac_objext=o
536if (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
544else
545  ac_n= ac_c='\c' ac_t=
546fi
547
548echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
549echo "configure:550: checking for Cygwin environment" >&5
550if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
551  echo $ac_n "(cached) $ac_c" 1>&6
552else
553  cat > conftest.$ac_ext <<EOF
554#line 555 "configure"
555#include "confdefs.h"
556
557int main() {
558
559#ifndef __CYGWIN__
560#define __CYGWIN__ __CYGWIN32__
561#endif
562return __CYGWIN__;
563; return 0; }
564EOF
565if { (eval echo configure:566: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
566  rm -rf conftest*
567  ac_cv_cygwin=yes
568else
569  echo "configure: failed program was:" >&5
570  cat conftest.$ac_ext >&5
571  rm -rf conftest*
572  ac_cv_cygwin=no
573fi
574rm -f conftest*
575rm -f conftest*
576fi
577
578echo "$ac_t""$ac_cv_cygwin" 1>&6
579CYGWIN=
580test "$ac_cv_cygwin" = yes && CYGWIN=yes
581echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
582echo "configure:583: checking for mingw32 environment" >&5
583if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
584  echo $ac_n "(cached) $ac_c" 1>&6
585else
586  cat > conftest.$ac_ext <<EOF
587#line 588 "configure"
588#include "confdefs.h"
589
590int main() {
591return __MINGW32__;
592; return 0; }
593EOF
594if { (eval echo configure:595: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
595  rm -rf conftest*
596  ac_cv_mingw32=yes
597else
598  echo "configure: failed program was:" >&5
599  cat conftest.$ac_ext >&5
600  rm -rf conftest*
601  ac_cv_mingw32=no
602fi
603rm -f conftest*
604rm -f conftest*
605fi
606
607echo "$ac_t""$ac_cv_mingw32" 1>&6
608MINGW32=
609test "$ac_cv_mingw32" = yes && MINGW32=yes
610
611
612
613
614
615# This works around the fact that libtool configuration may change LD
616# for this particular configuration, but some shells, instead of
617# keeping the changes in LD private, export them just because LD is
618# exported.
619ORIGINAL_LD_FOR_MULTILIBS=$LD
620
621# Check whether --enable-multilib or --disable-multilib was given.
622if test "${enable_multilib+set}" = set; then
623  enableval="$enable_multilib"
624  case "${enableval}" in
625  yes) multilib=yes ;;
626  no)  multilib=no ;;
627  *)   { echo "configure: error: bad value ${enableval} for multilib option" 1>&2; exit 1; } ;;
628 esac
629else
630  multilib=yes
631fi
632
633
634if test "${srcdir}" = "."; then
635  if test "${with_target_subdir}" != "."; then
636    libffi_basedir="${with_multisrctop}../"
637  else
638    libffi_basedir="${with_multisrctop}"
639  fi
640else
641  libffi_basedir=
642fi
643
644ac_aux_dir=
645for ac_dir in ${libffi_basedir}.. $srcdir/${libffi_basedir}..; do
646  if test -f $ac_dir/install-sh; then
647    ac_aux_dir=$ac_dir
648    ac_install_sh="$ac_aux_dir/install-sh -c"
649    break
650  elif test -f $ac_dir/install.sh; then
651    ac_aux_dir=$ac_dir
652    ac_install_sh="$ac_aux_dir/install.sh -c"
653    break
654  fi
655done
656if test -z "$ac_aux_dir"; then
657  { echo "configure: error: can not find install-sh or install.sh in ${libffi_basedir}.. $srcdir/${libffi_basedir}.." 1>&2; exit 1; }
658fi
659ac_config_guess=$ac_aux_dir/config.guess
660ac_config_sub=$ac_aux_dir/config.sub
661ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
662
663
664
665# Do some error checking and defaulting for the host and target type.
666# The inputs are:
667#    configure --host=HOST --target=TARGET --build=BUILD NONOPT
668#
669# The rules are:
670# 1. You are not allowed to specify --host, --target, and nonopt at the
671#    same time.
672# 2. Host defaults to nonopt.
673# 3. If nonopt is not specified, then host defaults to the current host,
674#    as determined by config.guess.
675# 4. Target and build default to nonopt.
676# 5. If nonopt is not specified, then target and build default to host.
677
678# The aliases save the names the user supplied, while $host etc.
679# will get canonicalized.
680case $host---$target---$nonopt in
681NONE---*---* | *---NONE---* | *---*---NONE) ;;
682*) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
683esac
684
685
686# Make sure we can run config.sub.
687if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
688else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
689fi
690
691echo $ac_n "checking host system type""... $ac_c" 1>&6
692echo "configure:693: checking host system type" >&5
693
694host_alias=$host
695case "$host_alias" in
696NONE)
697  case $nonopt in
698  NONE)
699    if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
700    else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
701    fi ;;
702  *) host_alias=$nonopt ;;
703  esac ;;
704esac
705
706host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
707host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
708host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
709host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
710echo "$ac_t""$host" 1>&6
711
712echo $ac_n "checking target system type""... $ac_c" 1>&6
713echo "configure:714: checking target system type" >&5
714
715target_alias=$target
716case "$target_alias" in
717NONE)
718  case $nonopt in
719  NONE) target_alias=$host_alias ;;
720  *) target_alias=$nonopt ;;
721  esac ;;
722esac
723
724target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
725target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
726target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
727target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
728echo "$ac_t""$target" 1>&6
729
730echo $ac_n "checking build system type""... $ac_c" 1>&6
731echo "configure:732: checking build system type" >&5
732
733build_alias=$build
734case "$build_alias" in
735NONE)
736  case $nonopt in
737  NONE) build_alias=$host_alias ;;
738  *) build_alias=$nonopt ;;
739  esac ;;
740esac
741
742build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
743build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
744build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
745build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
746echo "$ac_t""$build" 1>&6
747
748test "$host_alias" != "$target_alias" &&
749  test "$program_prefix$program_suffix$program_transform_name" = \
750    NONENONEs,x,x, &&
751  program_prefix=${target_alias}-
752
753target_alias=${target_alias-$host_alias}
754
755# Check whether --enable-shared or --disable-shared was given.
756if test "${enable_shared+set}" = set; then
757  enableval="$enable_shared"
758  p=${PACKAGE-default}
759case $enableval in
760yes) enable_shared=yes ;;
761no) enable_shared=no ;;
762*)
763  enable_shared=no
764  # Look at the argument we got.  We use all the common list separators.
765  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
766  for pkg in $enableval; do
767    if test "X$pkg" = "X$p"; then
768      enable_shared=yes
769    fi
770  done
771  IFS="$ac_save_ifs"
772  ;;
773esac
774else
775  enable_shared=yes
776fi
777
778# Check whether --enable-static or --disable-static was given.
779if test "${enable_static+set}" = set; then
780  enableval="$enable_static"
781  p=${PACKAGE-default}
782case $enableval in
783yes) enable_static=yes ;;
784no) enable_static=no ;;
785*)
786  enable_static=no
787  # Look at the argument we got.  We use all the common list separators.
788  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
789  for pkg in $enableval; do
790    if test "X$pkg" = "X$p"; then
791      enable_static=yes
792    fi
793  done
794  IFS="$ac_save_ifs"
795  ;;
796esac
797else
798  enable_static=yes
799fi
800
801# Check whether --enable-fast-install or --disable-fast-install was given.
802if test "${enable_fast_install+set}" = set; then
803  enableval="$enable_fast_install"
804  p=${PACKAGE-default}
805case $enableval in
806yes) enable_fast_install=yes ;;
807no) enable_fast_install=no ;;
808*)
809  enable_fast_install=no
810  # Look at the argument we got.  We use all the common list separators.
811  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
812  for pkg in $enableval; do
813    if test "X$pkg" = "X$p"; then
814      enable_fast_install=yes
815    fi
816  done
817  IFS="$ac_save_ifs"
818  ;;
819esac
820else
821  enable_fast_install=yes
822fi
823
824# Extract the first word of "gcc", so it can be a program name with args.
825set dummy gcc; ac_word=$2
826echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
827echo "configure:828: checking for $ac_word" >&5
828if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
829  echo $ac_n "(cached) $ac_c" 1>&6
830else
831  if test -n "$CC"; then
832  ac_cv_prog_CC="$CC" # Let the user override the test.
833else
834  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
835  ac_dummy="$PATH"
836  for ac_dir in $ac_dummy; do
837    test -z "$ac_dir" && ac_dir=.
838    if test -f $ac_dir/$ac_word; then
839      ac_cv_prog_CC="gcc"
840      break
841    fi
842  done
843  IFS="$ac_save_ifs"
844fi
845fi
846CC="$ac_cv_prog_CC"
847if test -n "$CC"; then
848  echo "$ac_t""$CC" 1>&6
849else
850  echo "$ac_t""no" 1>&6
851fi
852
853if test -z "$CC"; then
854  # Extract the first word of "cc", so it can be a program name with args.
855set dummy cc; ac_word=$2
856echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
857echo "configure:858: checking for $ac_word" >&5
858if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
859  echo $ac_n "(cached) $ac_c" 1>&6
860else
861  if test -n "$CC"; then
862  ac_cv_prog_CC="$CC" # Let the user override the test.
863else
864  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
865  ac_prog_rejected=no
866  ac_dummy="$PATH"
867  for ac_dir in $ac_dummy; do
868    test -z "$ac_dir" && ac_dir=.
869    if test -f $ac_dir/$ac_word; then
870      if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
871        ac_prog_rejected=yes
872	continue
873      fi
874      ac_cv_prog_CC="cc"
875      break
876    fi
877  done
878  IFS="$ac_save_ifs"
879if test $ac_prog_rejected = yes; then
880  # We found a bogon in the path, so make sure we never use it.
881  set dummy $ac_cv_prog_CC
882  shift
883  if test $# -gt 0; then
884    # We chose a different compiler from the bogus one.
885    # However, it has the same basename, so the bogon will be chosen
886    # first if we set CC to just the basename; use the full file name.
887    shift
888    set dummy "$ac_dir/$ac_word" "$@"
889    shift
890    ac_cv_prog_CC="$@"
891  fi
892fi
893fi
894fi
895CC="$ac_cv_prog_CC"
896if test -n "$CC"; then
897  echo "$ac_t""$CC" 1>&6
898else
899  echo "$ac_t""no" 1>&6
900fi
901
902  if test -z "$CC"; then
903    case "`uname -s`" in
904    *win32* | *WIN32*)
905      # Extract the first word of "cl", so it can be a program name with args.
906set dummy cl; ac_word=$2
907echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
908echo "configure:909: checking for $ac_word" >&5
909if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
910  echo $ac_n "(cached) $ac_c" 1>&6
911else
912  if test -n "$CC"; then
913  ac_cv_prog_CC="$CC" # Let the user override the test.
914else
915  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
916  ac_dummy="$PATH"
917  for ac_dir in $ac_dummy; do
918    test -z "$ac_dir" && ac_dir=.
919    if test -f $ac_dir/$ac_word; then
920      ac_cv_prog_CC="cl"
921      break
922    fi
923  done
924  IFS="$ac_save_ifs"
925fi
926fi
927CC="$ac_cv_prog_CC"
928if test -n "$CC"; then
929  echo "$ac_t""$CC" 1>&6
930else
931  echo "$ac_t""no" 1>&6
932fi
933 ;;
934    esac
935  fi
936  test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
937fi
938
939echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
940echo "configure:941: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
941
942ac_ext=c
943# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
944ac_cpp='$CPP $CPPFLAGS'
945ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
946ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
947cross_compiling=$ac_cv_prog_cc_cross
948
949cat > conftest.$ac_ext << EOF
950
951#line 952 "configure"
952#include "confdefs.h"
953
954main(){return(0);}
955EOF
956if { (eval echo configure:957: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
957  ac_cv_prog_cc_works=yes
958  # If we can't run a trivial program, we are probably using a cross compiler.
959  if (./conftest; exit) 2>/dev/null; then
960    ac_cv_prog_cc_cross=no
961  else
962    ac_cv_prog_cc_cross=yes
963  fi
964else
965  echo "configure: failed program was:" >&5
966  cat conftest.$ac_ext >&5
967  ac_cv_prog_cc_works=no
968fi
969rm -fr conftest*
970ac_ext=c
971# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
972ac_cpp='$CPP $CPPFLAGS'
973ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
974ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
975cross_compiling=$ac_cv_prog_cc_cross
976
977echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
978if test $ac_cv_prog_cc_works = no; then
979  { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
980fi
981echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
982echo "configure:983: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
983echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
984cross_compiling=$ac_cv_prog_cc_cross
985
986echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
987echo "configure:988: checking whether we are using GNU C" >&5
988if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
989  echo $ac_n "(cached) $ac_c" 1>&6
990else
991  cat > conftest.c <<EOF
992#ifdef __GNUC__
993  yes;
994#endif
995EOF
996if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:997: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
997  ac_cv_prog_gcc=yes
998else
999  ac_cv_prog_gcc=no
1000fi
1001fi
1002
1003echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1004
1005if test $ac_cv_prog_gcc = yes; then
1006  GCC=yes
1007else
1008  GCC=
1009fi
1010
1011ac_test_CFLAGS="${CFLAGS+set}"
1012ac_save_CFLAGS="$CFLAGS"
1013CFLAGS=
1014echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1015echo "configure:1016: checking whether ${CC-cc} accepts -g" >&5
1016if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
1017  echo $ac_n "(cached) $ac_c" 1>&6
1018else
1019  echo 'void f(){}' > conftest.c
1020if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1021  ac_cv_prog_cc_g=yes
1022else
1023  ac_cv_prog_cc_g=no
1024fi
1025rm -f conftest*
1026
1027fi
1028
1029echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1030if test "$ac_test_CFLAGS" = set; then
1031  CFLAGS="$ac_save_CFLAGS"
1032elif test $ac_cv_prog_cc_g = yes; then
1033  if test "$GCC" = yes; then
1034    CFLAGS="-g -O2"
1035  else
1036    CFLAGS="-g"
1037  fi
1038else
1039  if test "$GCC" = yes; then
1040    CFLAGS="-O2"
1041  else
1042    CFLAGS=
1043  fi
1044fi
1045
1046# Check whether --with-gnu-ld or --without-gnu-ld was given.
1047if test "${with_gnu_ld+set}" = set; then
1048  withval="$with_gnu_ld"
1049  test "$withval" = no || with_gnu_ld=yes
1050else
1051  with_gnu_ld=no
1052fi
1053
1054ac_prog=ld
1055if test "$GCC" = yes; then
1056  # Check if gcc -print-prog-name=ld gives a path.
1057  echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
1058echo "configure:1059: checking for ld used by GCC" >&5
1059  case $host in
1060  *-*-mingw*)
1061    # gcc leaves a trailing carriage return which upsets mingw
1062    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
1063  *)
1064    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
1065  esac
1066  case $ac_prog in
1067    # Accept absolute paths.
1068    [\\/]* | [A-Za-z]:[\\/]*)
1069      re_direlt='/[^/][^/]*/\.\./'
1070      # Canonicalize the path of ld
1071      ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
1072      while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
1073	ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
1074      done
1075      test -z "$LD" && LD="$ac_prog"
1076      ;;
1077  "")
1078    # If it fails, then pretend we aren't using GCC.
1079    ac_prog=ld
1080    ;;
1081  *)
1082    # If it is relative, then search for the first ld in PATH.
1083    with_gnu_ld=unknown
1084    ;;
1085  esac
1086elif test "$with_gnu_ld" = yes; then
1087  echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
1088echo "configure:1089: checking for GNU ld" >&5
1089else
1090  echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
1091echo "configure:1092: checking for non-GNU ld" >&5
1092fi
1093if eval "test \"`echo '$''{'lt_cv_path_LD'+set}'`\" = set"; then
1094  echo $ac_n "(cached) $ac_c" 1>&6
1095else
1096  if test -z "$LD"; then
1097  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
1098  for ac_dir in $PATH; do
1099    test -z "$ac_dir" && ac_dir=.
1100    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
1101      lt_cv_path_LD="$ac_dir/$ac_prog"
1102      # Check to see if the program is GNU ld.  I'd rather use --version,
1103      # but apparently some GNU ld's only accept -v.
1104      # Break only if it was the GNU/non-GNU ld that we prefer.
1105      if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
1106	test "$with_gnu_ld" != no && break
1107      else
1108	test "$with_gnu_ld" != yes && break
1109      fi
1110    fi
1111  done
1112  IFS="$ac_save_ifs"
1113else
1114  lt_cv_path_LD="$LD" # Let the user override the test with a path.
1115fi
1116fi
1117
1118LD="$lt_cv_path_LD"
1119if test -n "$LD"; then
1120  echo "$ac_t""$LD" 1>&6
1121else
1122  echo "$ac_t""no" 1>&6
1123fi
1124test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
1125echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
1126echo "configure:1127: checking if the linker ($LD) is GNU ld" >&5
1127if eval "test \"`echo '$''{'lt_cv_prog_gnu_ld'+set}'`\" = set"; then
1128  echo $ac_n "(cached) $ac_c" 1>&6
1129else
1130  # I'd rather use --version here, but apparently some GNU ld's only accept -v.
1131if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
1132  lt_cv_prog_gnu_ld=yes
1133else
1134  lt_cv_prog_gnu_ld=no
1135fi
1136fi
1137
1138echo "$ac_t""$lt_cv_prog_gnu_ld" 1>&6
1139with_gnu_ld=$lt_cv_prog_gnu_ld
1140
1141
1142echo $ac_n "checking for $LD option to reload object files""... $ac_c" 1>&6
1143echo "configure:1144: checking for $LD option to reload object files" >&5
1144if eval "test \"`echo '$''{'lt_cv_ld_reload_flag'+set}'`\" = set"; then
1145  echo $ac_n "(cached) $ac_c" 1>&6
1146else
1147  lt_cv_ld_reload_flag='-r'
1148fi
1149
1150echo "$ac_t""$lt_cv_ld_reload_flag" 1>&6
1151reload_flag=$lt_cv_ld_reload_flag
1152test -n "$reload_flag" && reload_flag=" $reload_flag"
1153
1154echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
1155echo "configure:1156: checking for BSD-compatible nm" >&5
1156if eval "test \"`echo '$''{'lt_cv_path_NM'+set}'`\" = set"; then
1157  echo $ac_n "(cached) $ac_c" 1>&6
1158else
1159  if test -n "$NM"; then
1160  # Let the user override the test.
1161  lt_cv_path_NM="$NM"
1162else
1163  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
1164  for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
1165    test -z "$ac_dir" && ac_dir=.
1166    tmp_nm=$ac_dir/${ac_tool_prefix}nm
1167    if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then
1168      # Check to see if the nm accepts a BSD-compat flag.
1169      # Adding the `sed 1q' prevents false positives on HP-UX, which says:
1170      #   nm: unknown option "B" ignored
1171      # Tru64's nm complains that /dev/null is an invalid object file
1172      if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
1173	lt_cv_path_NM="$tmp_nm -B"
1174	break
1175      elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
1176	lt_cv_path_NM="$tmp_nm -p"
1177	break
1178      else
1179	lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
1180	continue # so that we can try to find one that supports BSD flags
1181      fi
1182    fi
1183  done
1184  IFS="$ac_save_ifs"
1185  test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
1186fi
1187fi
1188
1189NM="$lt_cv_path_NM"
1190echo "$ac_t""$NM" 1>&6
1191
1192echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
1193echo "configure:1194: checking whether ln -s works" >&5
1194if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
1195  echo $ac_n "(cached) $ac_c" 1>&6
1196else
1197  rm -f conftestdata
1198if ln -s X conftestdata 2>/dev/null
1199then
1200  rm -f conftestdata
1201  ac_cv_prog_LN_S="ln -s"
1202else
1203  ac_cv_prog_LN_S=ln
1204fi
1205fi
1206LN_S="$ac_cv_prog_LN_S"
1207if test "$ac_cv_prog_LN_S" = "ln -s"; then
1208  echo "$ac_t""yes" 1>&6
1209else
1210  echo "$ac_t""no" 1>&6
1211fi
1212
1213echo $ac_n "checking how to recognise dependant libraries""... $ac_c" 1>&6
1214echo "configure:1215: checking how to recognise dependant libraries" >&5
1215if eval "test \"`echo '$''{'lt_cv_deplibs_check_method'+set}'`\" = set"; then
1216  echo $ac_n "(cached) $ac_c" 1>&6
1217else
1218  lt_cv_file_magic_cmd='$MAGIC_CMD'
1219lt_cv_file_magic_test_file=
1220lt_cv_deplibs_check_method='unknown'
1221# Need to set the preceding variable on all platforms that support
1222# interlibrary dependencies.
1223# 'none' -- dependencies not supported.
1224# `unknown' -- same as none, but documents that we really don't know.
1225# 'pass_all' -- all dependencies passed with no checks.
1226# 'test_compile' -- check by making test program.
1227# 'file_magic [regex]' -- check by looking for files in library path
1228# which responds to the $file_magic_cmd with a given egrep regex.
1229# If you have `file' or equivalent on your system and you're not sure
1230# whether `pass_all' will *always* work, you probably want this one.
1231
1232case $host_os in
1233aix*)
1234  lt_cv_deplibs_check_method=pass_all
1235  ;;
1236
1237beos*)
1238  lt_cv_deplibs_check_method=pass_all
1239  ;;
1240
1241bsdi4*)
1242  lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
1243  lt_cv_file_magic_cmd='/usr/bin/file -L'
1244  lt_cv_file_magic_test_file=/shlib/libc.so
1245  ;;
1246
1247cygwin* | mingw* |pw32*)
1248  lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
1249  lt_cv_file_magic_cmd='$OBJDUMP -f'
1250  ;;
1251
1252darwin* | rhapsody*)
1253  # this will be overwritten by pass_all, but leave it in just in case
1254  lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
1255  lt_cv_file_magic_cmd='/usr/bin/file -L'
1256  case "$host_os" in
1257  rhapsody* | darwin1.012)
1258    lt_cv_file_magic_test_file='/System/Library/Frameworks/System.framework/System'
1259    ;;
1260  *) # Darwin 1.3 on
1261    lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
1262    ;;
1263  esac
1264  lt_cv_deplibs_check_method=pass_all
1265  ;;
1266
1267freebsd* )
1268  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
1269    case $host_cpu in
1270    i*86 )
1271      # Not sure whether the presence of OpenBSD here was a mistake.
1272      # Let's accept both of them until this is cleared up.
1273      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library'
1274      lt_cv_file_magic_cmd=/usr/bin/file
1275      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
1276      ;;
1277    esac
1278  else
1279    lt_cv_deplibs_check_method=pass_all
1280  fi
1281  ;;
1282
1283gnu*)
1284  lt_cv_deplibs_check_method=pass_all
1285  ;;
1286
1287hpux10.20*|hpux11*)
1288  case $host_cpu in
1289  hppa*)
1290    lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
1291    lt_cv_file_magic_cmd=/usr/bin/file
1292    lt_cv_file_magic_test_file=/usr/lib/libc.sl
1293    ;;
1294  ia64*)
1295    lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64'
1296    lt_cv_file_magic_cmd=/usr/bin/file
1297    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
1298    ;;
1299  esac
1300  ;;
1301
1302irix5* | irix6*)
1303  case $host_os in
1304  irix5*)
1305    # this will be overridden with pass_all, but let us keep it just in case
1306    lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
1307    ;;
1308  *)
1309    case $LD in
1310    *-32|*"-32 ") libmagic=32-bit;;
1311    *-n32|*"-n32 ") libmagic=N32;;
1312    *-64|*"-64 ") libmagic=64-bit;;
1313    *) libmagic=never-match;;
1314    esac
1315    # this will be overridden with pass_all, but let us keep it just in case
1316    lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1"
1317    ;;
1318  esac
1319  lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
1320  lt_cv_deplibs_check_method=pass_all
1321  ;;
1322
1323# This must be Linux ELF.
1324linux-gnu*)
1325  case $host_cpu in
1326  alpha* | mips* | hppa* | i*86 | powerpc* | sparc* | ia64* | sh* )
1327    lt_cv_deplibs_check_method=pass_all ;;
1328  *)
1329    # glibc up to 2.1.1 does not perform some relocations on ARM
1330    lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;;
1331  esac
1332  lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
1333  ;;
1334
1335netbsd*)
1336  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
1337    lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
1338  else
1339    lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so$'
1340  fi
1341  ;;
1342
1343newsos6)
1344  lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
1345  lt_cv_file_magic_cmd=/usr/bin/file
1346  lt_cv_file_magic_test_file=/usr/lib/libnls.so
1347  ;;
1348
1349osf3* | osf4* | osf5*)
1350  # this will be overridden with pass_all, but let us keep it just in case
1351  lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
1352  lt_cv_file_magic_test_file=/shlib/libc.so
1353  lt_cv_deplibs_check_method=pass_all
1354  ;;
1355
1356sco3.2v5*)
1357  lt_cv_deplibs_check_method=pass_all
1358  ;;
1359
1360solaris*)
1361  lt_cv_deplibs_check_method=pass_all
1362  lt_cv_file_magic_test_file=/lib/libc.so
1363  ;;
1364
1365sysv5uw[78]* | sysv4*uw2*)
1366  lt_cv_deplibs_check_method=pass_all
1367  ;;
1368
1369sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
1370  case $host_vendor in
1371  ncr)
1372    lt_cv_deplibs_check_method=pass_all
1373    ;;
1374  motorola)
1375    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]'
1376    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
1377    ;;
1378  esac
1379  ;;
1380esac
1381
1382fi
1383
1384echo "$ac_t""$lt_cv_deplibs_check_method" 1>&6
1385file_magic_cmd=$lt_cv_file_magic_cmd
1386deplibs_check_method=$lt_cv_deplibs_check_method
1387
1388echo $ac_n "checking for object suffix""... $ac_c" 1>&6
1389echo "configure:1390: checking for object suffix" >&5
1390if eval "test \"`echo '$''{'ac_cv_objext'+set}'`\" = set"; then
1391  echo $ac_n "(cached) $ac_c" 1>&6
1392else
1393  rm -f conftest*
1394echo 'int i = 1;' > conftest.$ac_ext
1395if { (eval echo configure:1396: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1396  for ac_file in conftest.*; do
1397    case $ac_file in
1398    *.c) ;;
1399    *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
1400    esac
1401  done
1402else
1403  { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
1404fi
1405rm -f conftest*
1406fi
1407
1408echo "$ac_t""$ac_cv_objext" 1>&6
1409OBJEXT=$ac_cv_objext
1410ac_objext=$ac_cv_objext
1411
1412
1413
1414echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
1415echo "configure:1416: checking for executable suffix" >&5
1416if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
1417  echo $ac_n "(cached) $ac_c" 1>&6
1418else
1419  if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
1420  ac_cv_exeext=.exe
1421else
1422  rm -f conftest*
1423  echo 'int main () { return 0; }' > conftest.$ac_ext
1424  ac_cv_exeext=
1425  if { (eval echo configure:1426: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
1426    for file in conftest.*; do
1427      case $file in
1428      *.c | *.o | *.obj) ;;
1429      *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
1430      esac
1431    done
1432  else
1433    { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
1434  fi
1435  rm -f conftest*
1436  test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
1437fi
1438fi
1439
1440EXEEXT=""
1441test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
1442echo "$ac_t""${ac_cv_exeext}" 1>&6
1443ac_exeext=$EXEEXT
1444
1445if test $host != $build; then
1446  ac_tool_prefix=${host_alias}-
1447else
1448  ac_tool_prefix=
1449fi
1450
1451# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
1452
1453# Only perform the check for file, if the check method requires it
1454case $deplibs_check_method in
1455file_magic*)
1456  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
1457    echo $ac_n "checking for ${ac_tool_prefix}file""... $ac_c" 1>&6
1458echo "configure:1459: checking for ${ac_tool_prefix}file" >&5
1459if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then
1460  echo $ac_n "(cached) $ac_c" 1>&6
1461else
1462  case $MAGIC_CMD in
1463  /*)
1464  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
1465  ;;
1466  ?:/*)
1467  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
1468  ;;
1469  *)
1470  ac_save_MAGIC_CMD="$MAGIC_CMD"
1471  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1472  ac_dummy="/usr/bin:$PATH"
1473  for ac_dir in $ac_dummy; do
1474    test -z "$ac_dir" && ac_dir=.
1475    if test -f $ac_dir/${ac_tool_prefix}file; then
1476      lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
1477      if test -n "$file_magic_test_file"; then
1478	case $deplibs_check_method in
1479	"file_magic "*)
1480	  file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
1481	  MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
1482	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
1483	    egrep "$file_magic_regex" > /dev/null; then
1484	    :
1485	  else
1486	    cat <<EOF 1>&2
1487
1488*** Warning: the command libtool uses to detect shared libraries,
1489*** $file_magic_cmd, produces output that libtool cannot recognize.
1490*** The result is that libtool may fail to recognize shared libraries
1491*** as such.  This will affect the creation of libtool libraries that
1492*** depend on shared libraries, but programs linked with such libtool
1493*** libraries will work regardless of this problem.  Nevertheless, you
1494*** may want to report the problem to your system manager and/or to
1495*** bug-libtool@gnu.org
1496
1497EOF
1498	  fi ;;
1499	esac
1500      fi
1501      break
1502    fi
1503  done
1504  IFS="$ac_save_ifs"
1505  MAGIC_CMD="$ac_save_MAGIC_CMD"
1506  ;;
1507esac
1508fi
1509
1510MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
1511if test -n "$MAGIC_CMD"; then
1512  echo "$ac_t""$MAGIC_CMD" 1>&6
1513else
1514  echo "$ac_t""no" 1>&6
1515fi
1516
1517if test -z "$lt_cv_path_MAGIC_CMD"; then
1518  if test -n "$ac_tool_prefix"; then
1519    echo $ac_n "checking for file""... $ac_c" 1>&6
1520echo "configure:1521: checking for file" >&5
1521if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then
1522  echo $ac_n "(cached) $ac_c" 1>&6
1523else
1524  case $MAGIC_CMD in
1525  /*)
1526  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
1527  ;;
1528  ?:/*)
1529  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
1530  ;;
1531  *)
1532  ac_save_MAGIC_CMD="$MAGIC_CMD"
1533  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1534  ac_dummy="/usr/bin:$PATH"
1535  for ac_dir in $ac_dummy; do
1536    test -z "$ac_dir" && ac_dir=.
1537    if test -f $ac_dir/file; then
1538      lt_cv_path_MAGIC_CMD="$ac_dir/file"
1539      if test -n "$file_magic_test_file"; then
1540	case $deplibs_check_method in
1541	"file_magic "*)
1542	  file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
1543	  MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
1544	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
1545	    egrep "$file_magic_regex" > /dev/null; then
1546	    :
1547	  else
1548	    cat <<EOF 1>&2
1549
1550*** Warning: the command libtool uses to detect shared libraries,
1551*** $file_magic_cmd, produces output that libtool cannot recognize.
1552*** The result is that libtool may fail to recognize shared libraries
1553*** as such.  This will affect the creation of libtool libraries that
1554*** depend on shared libraries, but programs linked with such libtool
1555*** libraries will work regardless of this problem.  Nevertheless, you
1556*** may want to report the problem to your system manager and/or to
1557*** bug-libtool@gnu.org
1558
1559EOF
1560	  fi ;;
1561	esac
1562      fi
1563      break
1564    fi
1565  done
1566  IFS="$ac_save_ifs"
1567  MAGIC_CMD="$ac_save_MAGIC_CMD"
1568  ;;
1569esac
1570fi
1571
1572MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
1573if test -n "$MAGIC_CMD"; then
1574  echo "$ac_t""$MAGIC_CMD" 1>&6
1575else
1576  echo "$ac_t""no" 1>&6
1577fi
1578
1579  else
1580    MAGIC_CMD=:
1581  fi
1582fi
1583
1584  fi
1585  ;;
1586esac
1587
1588# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
1589set dummy ${ac_tool_prefix}ranlib; ac_word=$2
1590echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1591echo "configure:1592: checking for $ac_word" >&5
1592if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1593  echo $ac_n "(cached) $ac_c" 1>&6
1594else
1595  if test -n "$RANLIB"; then
1596  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1597else
1598  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
1599  ac_dummy="$PATH"
1600  for ac_dir in $ac_dummy; do
1601    test -z "$ac_dir" && ac_dir=.
1602    if test -f $ac_dir/$ac_word; then
1603      ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
1604      break
1605    fi
1606  done
1607  IFS="$ac_save_ifs"
1608fi
1609fi
1610RANLIB="$ac_cv_prog_RANLIB"
1611if test -n "$RANLIB"; then
1612  echo "$ac_t""$RANLIB" 1>&6
1613else
1614  echo "$ac_t""no" 1>&6
1615fi
1616
1617
1618if test -z "$ac_cv_prog_RANLIB"; then
1619if test -n "$ac_tool_prefix"; then
1620  # Extract the first word of "ranlib", so it can be a program name with args.
1621set dummy ranlib; ac_word=$2
1622echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1623echo "configure:1624: checking for $ac_word" >&5
1624if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1625  echo $ac_n "(cached) $ac_c" 1>&6
1626else
1627  if test -n "$RANLIB"; then
1628  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1629else
1630  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
1631  ac_dummy="$PATH"
1632  for ac_dir in $ac_dummy; do
1633    test -z "$ac_dir" && ac_dir=.
1634    if test -f $ac_dir/$ac_word; then
1635      ac_cv_prog_RANLIB="ranlib"
1636      break
1637    fi
1638  done
1639  IFS="$ac_save_ifs"
1640  test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1641fi
1642fi
1643RANLIB="$ac_cv_prog_RANLIB"
1644if test -n "$RANLIB"; then
1645  echo "$ac_t""$RANLIB" 1>&6
1646else
1647  echo "$ac_t""no" 1>&6
1648fi
1649
1650else
1651  RANLIB=":"
1652fi
1653fi
1654
1655# Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
1656set dummy ${ac_tool_prefix}strip; ac_word=$2
1657echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1658echo "configure:1659: checking for $ac_word" >&5
1659if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
1660  echo $ac_n "(cached) $ac_c" 1>&6
1661else
1662  if test -n "$STRIP"; then
1663  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
1664else
1665  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
1666  ac_dummy="$PATH"
1667  for ac_dir in $ac_dummy; do
1668    test -z "$ac_dir" && ac_dir=.
1669    if test -f $ac_dir/$ac_word; then
1670      ac_cv_prog_STRIP="${ac_tool_prefix}strip"
1671      break
1672    fi
1673  done
1674  IFS="$ac_save_ifs"
1675fi
1676fi
1677STRIP="$ac_cv_prog_STRIP"
1678if test -n "$STRIP"; then
1679  echo "$ac_t""$STRIP" 1>&6
1680else
1681  echo "$ac_t""no" 1>&6
1682fi
1683
1684
1685if test -z "$ac_cv_prog_STRIP"; then
1686if test -n "$ac_tool_prefix"; then
1687  # Extract the first word of "strip", so it can be a program name with args.
1688set dummy strip; ac_word=$2
1689echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1690echo "configure:1691: checking for $ac_word" >&5
1691if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
1692  echo $ac_n "(cached) $ac_c" 1>&6
1693else
1694  if test -n "$STRIP"; then
1695  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
1696else
1697  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
1698  ac_dummy="$PATH"
1699  for ac_dir in $ac_dummy; do
1700    test -z "$ac_dir" && ac_dir=.
1701    if test -f $ac_dir/$ac_word; then
1702      ac_cv_prog_STRIP="strip"
1703      break
1704    fi
1705  done
1706  IFS="$ac_save_ifs"
1707  test -z "$ac_cv_prog_STRIP" && ac_cv_prog_STRIP=":"
1708fi
1709fi
1710STRIP="$ac_cv_prog_STRIP"
1711if test -n "$STRIP"; then
1712  echo "$ac_t""$STRIP" 1>&6
1713else
1714  echo "$ac_t""no" 1>&6
1715fi
1716
1717else
1718  STRIP=":"
1719fi
1720fi
1721
1722
1723# Check for any special flags to pass to ltconfig.
1724libtool_flags="--cache-file=$cache_file"
1725test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
1726test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
1727test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
1728test "$GCC" = yes && libtool_flags="$libtool_flags --with-gcc"
1729test "$lt_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
1730
1731
1732# Check whether --enable-libtool-lock or --disable-libtool-lock was given.
1733if test "${enable_libtool_lock+set}" = set; then
1734  enableval="$enable_libtool_lock"
1735  :
1736fi
1737
1738test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
1739test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
1740
1741# Check whether --with-pic or --without-pic was given.
1742if test "${with_pic+set}" = set; then
1743  withval="$with_pic"
1744  pic_mode="$withval"
1745else
1746  pic_mode=default
1747fi
1748
1749test x"$pic_mode" = xyes && libtool_flags="$libtool_flags --prefer-pic"
1750test x"$pic_mode" = xno && libtool_flags="$libtool_flags --prefer-non-pic"
1751
1752# Some flags need to be propagated to the compiler or linker for good
1753# libtool support.
1754case $host in
1755*-*-irix6*)
1756  # Find out which ABI we are using.
1757  echo '#line 1758 "configure"' > conftest.$ac_ext
1758  if { (eval echo configure:1759: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1759   if test "$lt_cv_prog_gnu_ld" = yes; then
1760    case `/usr/bin/file conftest.$ac_objext` in
1761    *32-bit*)
1762      LD="${LD-ld} -melf32bsmip"
1763      ;;
1764    *N32*)
1765      LD="${LD-ld} -melf32bmipn32"
1766      ;;
1767    *64-bit*)
1768      LD="${LD-ld} -melf64bmip"
1769      ;;
1770    esac
1771   else
1772    case `/usr/bin/file conftest.$ac_objext` in
1773    *32-bit*)
1774      LD="${LD-ld} -32"
1775      ;;
1776    *N32*)
1777      LD="${LD-ld} -n32"
1778      ;;
1779    *64-bit*)
1780      LD="${LD-ld} -64"
1781      ;;
1782    esac
1783   fi
1784  fi
1785  rm -rf conftest*
1786  ;;
1787
1788ia64-*-hpux*)
1789  # Find out which ABI we are using.
1790  echo 'int i;' > conftest.$ac_ext
1791  if { (eval echo configure:1792: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1792    case "`/usr/bin/file conftest.o`" in
1793    *ELF-32*)
1794      HPUX_IA64_MODE="32"
1795      ;;
1796    *ELF-64*)
1797      HPUX_IA64_MODE="64"
1798      ;;
1799    esac
1800  fi
1801  rm -rf conftest*
1802  ;;
1803
1804x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
1805  # Find out which ABI we are using.
1806  echo 'int i;' > conftest.$ac_ext
1807  if { (eval echo configure:1808: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1808    case "`/usr/bin/file conftest.o`" in
1809    *32-bit*)
1810      case $host in
1811        x86_64-*linux*)
1812          LD="${LD-ld} -m elf_i386"
1813          ;;
1814        ppc64-*linux*|powerpc64-*linux*)
1815          LD="${LD-ld} -m elf32ppclinux"
1816          ;;
1817        s390x-*linux*)
1818          LD="${LD-ld} -m elf_s390"
1819          ;;
1820        sparc64-*linux*)
1821          LD="${LD-ld} -m elf32_sparc"
1822          ;;
1823      esac
1824      ;;
1825    *64-bit*)
1826      case $host in
1827        x86_64-*linux*)
1828          LD="${LD-ld} -m elf_x86_64"
1829          ;;
1830        ppc*-*linux*|powerpc*-*linux*)
1831          LD="${LD-ld} -m elf64ppc"
1832          ;;
1833        s390*-*linux*)
1834          LD="${LD-ld} -m elf64_s390"
1835          ;;
1836        sparc*-*linux*)
1837          LD="${LD-ld} -m elf64_sparc"
1838          ;;
1839      esac
1840      ;;
1841    esac
1842  fi
1843  rm -rf conftest*
1844  ;;
1845
1846*-*-sco3.2v5*)
1847  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
1848  SAVE_CFLAGS="$CFLAGS"
1849  CFLAGS="$CFLAGS -belf"
1850  echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
1851echo "configure:1852: checking whether the C compiler needs -belf" >&5
1852if eval "test \"`echo '$''{'lt_cv_cc_needs_belf'+set}'`\" = set"; then
1853  echo $ac_n "(cached) $ac_c" 1>&6
1854else
1855
1856     ac_ext=c
1857# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1858ac_cpp='$CPP $CPPFLAGS'
1859ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1860ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1861cross_compiling=$ac_cv_prog_cc_cross
1862
1863     cat > conftest.$ac_ext <<EOF
1864#line 1865 "configure"
1865#include "confdefs.h"
1866
1867int main() {
1868
1869; return 0; }
1870EOF
1871if { (eval echo configure:1872: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1872  rm -rf conftest*
1873  lt_cv_cc_needs_belf=yes
1874else
1875  echo "configure: failed program was:" >&5
1876  cat conftest.$ac_ext >&5
1877  rm -rf conftest*
1878  lt_cv_cc_needs_belf=no
1879fi
1880rm -f conftest*
1881     ac_ext=c
1882# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1883ac_cpp='$CPP $CPPFLAGS'
1884ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1885ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1886cross_compiling=$ac_cv_prog_cc_cross
1887
1888fi
1889
1890echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
1891  if test x"$lt_cv_cc_needs_belf" != x"yes"; then
1892    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
1893    CFLAGS="$SAVE_CFLAGS"
1894  fi
1895  ;;
1896
1897
1898esac
1899
1900
1901# Save cache, so that ltconfig can load it
1902cat > confcache <<\EOF
1903# This file is a shell script that caches the results of configure
1904# tests run on this system so they can be shared between configure
1905# scripts and configure runs.  It is not useful on other systems.
1906# If it contains results you don't want to keep, you may remove or edit it.
1907#
1908# By default, configure uses ./config.cache as the cache file,
1909# creating it if it does not exist already.  You can give configure
1910# the --cache-file=FILE option to use a different cache file; that is
1911# what configure does when it calls configure scripts in
1912# subdirectories, so they share the cache.
1913# Giving --cache-file=/dev/null disables caching, for debugging configure.
1914# config.status only pays attention to the cache file if you give it the
1915# --recheck option to rerun configure.
1916#
1917EOF
1918# The following way of writing the cache mishandles newlines in values,
1919# but we know of no workaround that is simple, portable, and efficient.
1920# So, don't put newlines in cache variables' values.
1921# Ultrix sh set writes to stderr and can't be redirected directly,
1922# and sets the high bit in the cache file unless we assign to the vars.
1923(set) 2>&1 |
1924  case `(ac_space=' '; set | grep ac_space) 2>&1` in
1925  *ac_space=\ *)
1926    # `set' does not quote correctly, so add quotes (double-quote substitution
1927    # turns \\\\ into \\, and sed turns \\ into \).
1928    sed -n \
1929      -e "s/'/'\\\\''/g" \
1930      -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
1931    ;;
1932  *)
1933    # `set' quotes correctly as required by POSIX, so do not add quotes.
1934    sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
1935    ;;
1936  esac >> confcache
1937if cmp -s $cache_file confcache; then
1938  :
1939else
1940  if test -w $cache_file; then
1941    echo "updating cache $cache_file"
1942    cat confcache > $cache_file
1943  else
1944    echo "not updating unwritable cache $cache_file"
1945  fi
1946fi
1947rm -f confcache
1948
1949
1950# Actually configure libtool.  ac_aux_dir is where install-sh is found.
1951AR="$AR" LTCC="$CC" CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
1952MAGIC_CMD="$MAGIC_CMD" LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
1953LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" STRIP="$STRIP" \
1954AS="$AS" DLLTOOL="$DLLTOOL" OBJDUMP="$OBJDUMP" \
1955objext="$OBJEXT" exeext="$EXEEXT" reload_flag="$reload_flag" \
1956deplibs_check_method="$deplibs_check_method" file_magic_cmd="$file_magic_cmd" \
1957${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
1958$libtool_flags --no-verify --build="$build" $ac_aux_dir/ltmain.sh $host \
1959|| { echo "configure: error: libtool configure failed" 1>&2; exit 1; }
1960
1961# Reload cache, that may have been modified by ltconfig
1962if test -r "$cache_file"; then
1963  echo "loading cache $cache_file"
1964  . $cache_file
1965else
1966  echo "creating cache $cache_file"
1967  > $cache_file
1968fi
1969
1970
1971# This can be used to rebuild libtool when needed
1972LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh $ac_aux_dir/ltcf-c.sh"
1973
1974# Always use our own libtool.
1975LIBTOOL='$(SHELL) $(top_builddir)/libtool'
1976
1977# Redirect the config.log output again, so that the ltconfig log is not
1978# clobbered by the next message.
1979exec 5>>./config.log
1980
1981
1982
1983
1984
1985
1986
1987# Find a good install program.  We prefer a C program (faster),
1988# so one script is as good as another.  But avoid the broken or
1989# incompatible versions:
1990# SysV /etc/install, /usr/sbin/install
1991# SunOS /usr/etc/install
1992# IRIX /sbin/install
1993# AIX /bin/install
1994# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
1995# AFS /usr/afsws/bin/install, which mishandles nonexistent args
1996# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1997# ./install, which can be erroneously created by make from ./install.sh.
1998echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
1999echo "configure:2000: checking for a BSD compatible install" >&5
2000if test -z "$INSTALL"; then
2001if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
2002  echo $ac_n "(cached) $ac_c" 1>&6
2003else
2004    IFS="${IFS= 	}"; ac_save_IFS="$IFS"; IFS=":"
2005  for ac_dir in $PATH; do
2006    # Account for people who put trailing slashes in PATH elements.
2007    case "$ac_dir/" in
2008    /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
2009    *)
2010      # OSF1 and SCO ODT 3.0 have their own names for install.
2011      # Don't use installbsd from OSF since it installs stuff as root
2012      # by default.
2013      for ac_prog in ginstall scoinst install; do
2014        if test -f $ac_dir/$ac_prog; then
2015	  if test $ac_prog = install &&
2016            grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
2017	    # AIX install.  It has an incompatible calling convention.
2018	    :
2019	  else
2020	    ac_cv_path_install="$ac_dir/$ac_prog -c"
2021	    break 2
2022	  fi
2023	fi
2024      done
2025      ;;
2026    esac
2027  done
2028  IFS="$ac_save_IFS"
2029
2030fi
2031  if test "${ac_cv_path_install+set}" = set; then
2032    INSTALL="$ac_cv_path_install"
2033  else
2034    # As a last resort, use the slow shell script.  We don't cache a
2035    # path for INSTALL within a source directory, because that will
2036    # break other packages using the cache if that directory is
2037    # removed, or if the path is relative.
2038    INSTALL="$ac_install_sh"
2039  fi
2040fi
2041echo "$ac_t""$INSTALL" 1>&6
2042
2043# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2044# It thinks the first close brace ends the variable substitution.
2045test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2046
2047test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
2048
2049test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2050
2051echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
2052echo "configure:2053: checking whether build environment is sane" >&5
2053# Just in case
2054sleep 1
2055echo timestamp > conftestfile
2056# Do `set' in a subshell so we don't clobber the current shell's
2057# arguments.  Must try -L first in case configure is actually a
2058# symlink; some systems play weird games with the mod time of symlinks
2059# (eg FreeBSD returns the mod time of the symlink's containing
2060# directory).
2061if (
2062   set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
2063   if test "$*" = "X"; then
2064      # -L didn't work.
2065      set X `ls -t $srcdir/configure conftestfile`
2066   fi
2067   if test "$*" != "X $srcdir/configure conftestfile" \
2068      && test "$*" != "X conftestfile $srcdir/configure"; then
2069
2070      # If neither matched, then we have a broken ls.  This can happen
2071      # if, for instance, CONFIG_SHELL is bash and it inherits a
2072      # broken ls alias from the environment.  This has actually
2073      # happened.  Such a system could not be considered "sane".
2074      { echo "configure: error: ls -t appears to fail.  Make sure there is not a broken
2075alias in your environment" 1>&2; exit 1; }
2076   fi
2077
2078   test "$2" = conftestfile
2079   )
2080then
2081   # Ok.
2082   :
2083else
2084   { echo "configure: error: newly created file is older than distributed files!
2085Check your system clock" 1>&2; exit 1; }
2086fi
2087rm -f conftest*
2088echo "$ac_t""yes" 1>&6
2089if test "$program_transform_name" = s,x,x,; then
2090  program_transform_name=
2091else
2092  # Double any \ or $.  echo might interpret backslashes.
2093  cat <<\EOF_SED > conftestsed
2094s,\\,\\\\,g; s,\$,$$,g
2095EOF_SED
2096  program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
2097  rm -f conftestsed
2098fi
2099test "$program_prefix" != NONE &&
2100  program_transform_name="s,^,${program_prefix},; $program_transform_name"
2101# Use a double $ so make ignores it.
2102test "$program_suffix" != NONE &&
2103  program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
2104
2105# sed with no file args requires a program.
2106test "$program_transform_name" = "" && program_transform_name="s,x,x,"
2107
2108echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
2109echo "configure:2110: checking whether ${MAKE-make} sets \${MAKE}" >&5
2110set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
2111if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
2112  echo $ac_n "(cached) $ac_c" 1>&6
2113else
2114  cat > conftestmake <<\EOF
2115all:
2116	@echo 'ac_maketemp="${MAKE}"'
2117EOF
2118# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
2119eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
2120if test -n "$ac_maketemp"; then
2121  eval ac_cv_prog_make_${ac_make}_set=yes
2122else
2123  eval ac_cv_prog_make_${ac_make}_set=no
2124fi
2125rm -f conftestmake
2126fi
2127if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
2128  echo "$ac_t""yes" 1>&6
2129  SET_MAKE=
2130else
2131  echo "$ac_t""no" 1>&6
2132  SET_MAKE="MAKE=${MAKE-make}"
2133fi
2134
2135
2136PACKAGE=libffi
2137
2138VERSION=2.00-beta
2139
2140if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
2141  { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
2142fi
2143
2144
2145
2146missing_dir=`cd $ac_aux_dir && pwd`
2147echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
2148echo "configure:2149: checking for working aclocal" >&5
2149# Run test in a subshell; some versions of sh will print an error if
2150# an executable is not found, even if stderr is redirected.
2151# Redirect stdin to placate older versions of autoconf.  Sigh.
2152if (aclocal --version) < /dev/null > /dev/null 2>&1; then
2153   ACLOCAL=aclocal
2154   echo "$ac_t""found" 1>&6
2155else
2156   ACLOCAL="$missing_dir/missing aclocal"
2157   echo "$ac_t""missing" 1>&6
2158fi
2159
2160echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
2161echo "configure:2162: checking for working autoconf" >&5
2162# Run test in a subshell; some versions of sh will print an error if
2163# an executable is not found, even if stderr is redirected.
2164# Redirect stdin to placate older versions of autoconf.  Sigh.
2165if (autoconf --version) < /dev/null > /dev/null 2>&1; then
2166   AUTOCONF=autoconf
2167   echo "$ac_t""found" 1>&6
2168else
2169   AUTOCONF="$missing_dir/missing autoconf"
2170   echo "$ac_t""missing" 1>&6
2171fi
2172
2173echo $ac_n "checking for working automake""... $ac_c" 1>&6
2174echo "configure:2175: checking for working automake" >&5
2175# Run test in a subshell; some versions of sh will print an error if
2176# an executable is not found, even if stderr is redirected.
2177# Redirect stdin to placate older versions of autoconf.  Sigh.
2178if (automake --version) < /dev/null > /dev/null 2>&1; then
2179   AUTOMAKE=automake
2180   echo "$ac_t""found" 1>&6
2181else
2182   AUTOMAKE="$missing_dir/missing automake"
2183   echo "$ac_t""missing" 1>&6
2184fi
2185
2186echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
2187echo "configure:2188: checking for working autoheader" >&5
2188# Run test in a subshell; some versions of sh will print an error if
2189# an executable is not found, even if stderr is redirected.
2190# Redirect stdin to placate older versions of autoconf.  Sigh.
2191if (autoheader --version) < /dev/null > /dev/null 2>&1; then
2192   AUTOHEADER=autoheader
2193   echo "$ac_t""found" 1>&6
2194else
2195   AUTOHEADER="$missing_dir/missing autoheader"
2196   echo "$ac_t""missing" 1>&6
2197fi
2198
2199echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
2200echo "configure:2201: checking for working makeinfo" >&5
2201# Run test in a subshell; some versions of sh will print an error if
2202# an executable is not found, even if stderr is redirected.
2203# Redirect stdin to placate older versions of autoconf.  Sigh.
2204if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
2205   MAKEINFO=makeinfo
2206   echo "$ac_t""found" 1>&6
2207else
2208   MAKEINFO="$missing_dir/missing makeinfo"
2209   echo "$ac_t""missing" 1>&6
2210fi
2211
2212
2213
2214
2215
2216echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
2217echo "configure:2218: checking for executable suffix" >&5
2218if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
2219  echo $ac_n "(cached) $ac_c" 1>&6
2220else
2221  if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
2222  ac_cv_exeext=.exe
2223else
2224  rm -f conftest*
2225  echo 'int main () { return 0; }' > conftest.$ac_ext
2226  ac_cv_exeext=
2227  if { (eval echo configure:2228: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
2228    for file in conftest.*; do
2229      case $file in
2230      *.c | *.o | *.obj) ;;
2231      *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
2232      esac
2233    done
2234  else
2235    { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
2236  fi
2237  rm -f conftest*
2238  test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
2239fi
2240fi
2241
2242EXEEXT=""
2243test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
2244echo "$ac_t""${ac_cv_exeext}" 1>&6
2245ac_exeext=$EXEEXT
2246
2247echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
2248echo "configure:2249: checking whether to enable maintainer-specific portions of Makefiles" >&5
2249    # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
2250if test "${enable_maintainer_mode+set}" = set; then
2251  enableval="$enable_maintainer_mode"
2252  USE_MAINTAINER_MODE=$enableval
2253else
2254  USE_MAINTAINER_MODE=no
2255fi
2256
2257  echo "$ac_t""$USE_MAINTAINER_MODE" 1>&6
2258
2259
2260if test $USE_MAINTAINER_MODE = yes; then
2261  MAINTAINER_MODE_TRUE=
2262  MAINTAINER_MODE_FALSE='#'
2263else
2264  MAINTAINER_MODE_TRUE='#'
2265  MAINTAINER_MODE_FALSE=
2266fi
2267  MAINT=$MAINTAINER_MODE_TRUE
2268
2269
2270
2271# Extract the first word of "gcc", so it can be a program name with args.
2272set dummy gcc; ac_word=$2
2273echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2274echo "configure:2275: checking for $ac_word" >&5
2275if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
2276  echo $ac_n "(cached) $ac_c" 1>&6
2277else
2278  if test -n "$CC"; then
2279  ac_cv_prog_CC="$CC" # Let the user override the test.
2280else
2281  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
2282  ac_dummy="$PATH"
2283  for ac_dir in $ac_dummy; do
2284    test -z "$ac_dir" && ac_dir=.
2285    if test -f $ac_dir/$ac_word; then
2286      ac_cv_prog_CC="gcc"
2287      break
2288    fi
2289  done
2290  IFS="$ac_save_ifs"
2291fi
2292fi
2293CC="$ac_cv_prog_CC"
2294if test -n "$CC"; then
2295  echo "$ac_t""$CC" 1>&6
2296else
2297  echo "$ac_t""no" 1>&6
2298fi
2299
2300if test -z "$CC"; then
2301  # Extract the first word of "cc", so it can be a program name with args.
2302set dummy cc; ac_word=$2
2303echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2304echo "configure:2305: checking for $ac_word" >&5
2305if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
2306  echo $ac_n "(cached) $ac_c" 1>&6
2307else
2308  if test -n "$CC"; then
2309  ac_cv_prog_CC="$CC" # Let the user override the test.
2310else
2311  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
2312  ac_prog_rejected=no
2313  ac_dummy="$PATH"
2314  for ac_dir in $ac_dummy; do
2315    test -z "$ac_dir" && ac_dir=.
2316    if test -f $ac_dir/$ac_word; then
2317      if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
2318        ac_prog_rejected=yes
2319	continue
2320      fi
2321      ac_cv_prog_CC="cc"
2322      break
2323    fi
2324  done
2325  IFS="$ac_save_ifs"
2326if test $ac_prog_rejected = yes; then
2327  # We found a bogon in the path, so make sure we never use it.
2328  set dummy $ac_cv_prog_CC
2329  shift
2330  if test $# -gt 0; then
2331    # We chose a different compiler from the bogus one.
2332    # However, it has the same basename, so the bogon will be chosen
2333    # first if we set CC to just the basename; use the full file name.
2334    shift
2335    set dummy "$ac_dir/$ac_word" "$@"
2336    shift
2337    ac_cv_prog_CC="$@"
2338  fi
2339fi
2340fi
2341fi
2342CC="$ac_cv_prog_CC"
2343if test -n "$CC"; then
2344  echo "$ac_t""$CC" 1>&6
2345else
2346  echo "$ac_t""no" 1>&6
2347fi
2348
2349  if test -z "$CC"; then
2350    case "`uname -s`" in
2351    *win32* | *WIN32*)
2352      # Extract the first word of "cl", so it can be a program name with args.
2353set dummy cl; ac_word=$2
2354echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2355echo "configure:2356: checking for $ac_word" >&5
2356if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
2357  echo $ac_n "(cached) $ac_c" 1>&6
2358else
2359  if test -n "$CC"; then
2360  ac_cv_prog_CC="$CC" # Let the user override the test.
2361else
2362  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
2363  ac_dummy="$PATH"
2364  for ac_dir in $ac_dummy; do
2365    test -z "$ac_dir" && ac_dir=.
2366    if test -f $ac_dir/$ac_word; then
2367      ac_cv_prog_CC="cl"
2368      break
2369    fi
2370  done
2371  IFS="$ac_save_ifs"
2372fi
2373fi
2374CC="$ac_cv_prog_CC"
2375if test -n "$CC"; then
2376  echo "$ac_t""$CC" 1>&6
2377else
2378  echo "$ac_t""no" 1>&6
2379fi
2380 ;;
2381    esac
2382  fi
2383  test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
2384fi
2385
2386echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
2387echo "configure:2388: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
2388
2389ac_ext=c
2390# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2391ac_cpp='$CPP $CPPFLAGS'
2392ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2393ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2394cross_compiling=$ac_cv_prog_cc_cross
2395
2396cat > conftest.$ac_ext << EOF
2397
2398#line 2399 "configure"
2399#include "confdefs.h"
2400
2401main(){return(0);}
2402EOF
2403if { (eval echo configure:2404: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2404  ac_cv_prog_cc_works=yes
2405  # If we can't run a trivial program, we are probably using a cross compiler.
2406  if (./conftest; exit) 2>/dev/null; then
2407    ac_cv_prog_cc_cross=no
2408  else
2409    ac_cv_prog_cc_cross=yes
2410  fi
2411else
2412  echo "configure: failed program was:" >&5
2413  cat conftest.$ac_ext >&5
2414  ac_cv_prog_cc_works=no
2415fi
2416rm -fr conftest*
2417ac_ext=c
2418# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2419ac_cpp='$CPP $CPPFLAGS'
2420ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2421ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2422cross_compiling=$ac_cv_prog_cc_cross
2423
2424echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
2425if test $ac_cv_prog_cc_works = no; then
2426  { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
2427fi
2428echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
2429echo "configure:2430: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
2430echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
2431cross_compiling=$ac_cv_prog_cc_cross
2432
2433echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
2434echo "configure:2435: checking whether we are using GNU C" >&5
2435if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
2436  echo $ac_n "(cached) $ac_c" 1>&6
2437else
2438  cat > conftest.c <<EOF
2439#ifdef __GNUC__
2440  yes;
2441#endif
2442EOF
2443if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2444: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
2444  ac_cv_prog_gcc=yes
2445else
2446  ac_cv_prog_gcc=no
2447fi
2448fi
2449
2450echo "$ac_t""$ac_cv_prog_gcc" 1>&6
2451
2452if test $ac_cv_prog_gcc = yes; then
2453  GCC=yes
2454else
2455  GCC=
2456fi
2457
2458ac_test_CFLAGS="${CFLAGS+set}"
2459ac_save_CFLAGS="$CFLAGS"
2460CFLAGS=
2461echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
2462echo "configure:2463: checking whether ${CC-cc} accepts -g" >&5
2463if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
2464  echo $ac_n "(cached) $ac_c" 1>&6
2465else
2466  echo 'void f(){}' > conftest.c
2467if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
2468  ac_cv_prog_cc_g=yes
2469else
2470  ac_cv_prog_cc_g=no
2471fi
2472rm -f conftest*
2473
2474fi
2475
2476echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
2477if test "$ac_test_CFLAGS" = set; then
2478  CFLAGS="$ac_save_CFLAGS"
2479elif test $ac_cv_prog_cc_g = yes; then
2480  if test "$GCC" = yes; then
2481    CFLAGS="-g -O2"
2482  else
2483    CFLAGS="-g"
2484  fi
2485else
2486  if test "$GCC" = yes; then
2487    CFLAGS="-O2"
2488  else
2489    CFLAGS=
2490  fi
2491fi
2492
2493
2494
2495
2496
2497
2498
2499
2500echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
2501echo "configure:2502: checking how to run the C preprocessor" >&5
2502# On Suns, sometimes $CPP names a directory.
2503if test -n "$CPP" && test -d "$CPP"; then
2504  CPP=
2505fi
2506if test -z "$CPP"; then
2507if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
2508  echo $ac_n "(cached) $ac_c" 1>&6
2509else
2510    # This must be in double quotes, not single quotes, because CPP may get
2511  # substituted into the Makefile and "${CC-cc}" will confuse make.
2512  CPP="${CC-cc} -E"
2513  # On the NeXT, cc -E runs the code through the compiler's parser,
2514  # not just through cpp.
2515  cat > conftest.$ac_ext <<EOF
2516#line 2517 "configure"
2517#include "confdefs.h"
2518#include <assert.h>
2519Syntax Error
2520EOF
2521ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2522{ (eval echo configure:2523: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2523ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2524if test -z "$ac_err"; then
2525  :
2526else
2527  echo "$ac_err" >&5
2528  echo "configure: failed program was:" >&5
2529  cat conftest.$ac_ext >&5
2530  rm -rf conftest*
2531  CPP="${CC-cc} -E -traditional-cpp"
2532  cat > conftest.$ac_ext <<EOF
2533#line 2534 "configure"
2534#include "confdefs.h"
2535#include <assert.h>
2536Syntax Error
2537EOF
2538ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2539{ (eval echo configure:2540: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2540ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2541if test -z "$ac_err"; then
2542  :
2543else
2544  echo "$ac_err" >&5
2545  echo "configure: failed program was:" >&5
2546  cat conftest.$ac_ext >&5
2547  rm -rf conftest*
2548  CPP="${CC-cc} -nologo -E"
2549  cat > conftest.$ac_ext <<EOF
2550#line 2551 "configure"
2551#include "confdefs.h"
2552#include <assert.h>
2553Syntax Error
2554EOF
2555ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2556{ (eval echo configure:2557: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2557ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2558if test -z "$ac_err"; then
2559  :
2560else
2561  echo "$ac_err" >&5
2562  echo "configure: failed program was:" >&5
2563  cat conftest.$ac_ext >&5
2564  rm -rf conftest*
2565  CPP=/lib/cpp
2566fi
2567rm -f conftest*
2568fi
2569rm -f conftest*
2570fi
2571rm -f conftest*
2572  ac_cv_prog_CPP="$CPP"
2573fi
2574  CPP="$ac_cv_prog_CPP"
2575else
2576  ac_cv_prog_CPP="$CPP"
2577fi
2578echo "$ac_t""$CPP" 1>&6
2579
2580for ac_hdr in sys/mman.h
2581do
2582ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2583echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2584echo "configure:2585: checking for $ac_hdr" >&5
2585if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2586  echo $ac_n "(cached) $ac_c" 1>&6
2587else
2588  cat > conftest.$ac_ext <<EOF
2589#line 2590 "configure"
2590#include "confdefs.h"
2591#include <$ac_hdr>
2592EOF
2593ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2594{ (eval echo configure:2595: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2595ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2596if test -z "$ac_err"; then
2597  rm -rf conftest*
2598  eval "ac_cv_header_$ac_safe=yes"
2599else
2600  echo "$ac_err" >&5
2601  echo "configure: failed program was:" >&5
2602  cat conftest.$ac_ext >&5
2603  rm -rf conftest*
2604  eval "ac_cv_header_$ac_safe=no"
2605fi
2606rm -f conftest*
2607fi
2608if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2609  echo "$ac_t""yes" 1>&6
2610    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2611  cat >> confdefs.h <<EOF
2612#define $ac_tr_hdr 1
2613EOF
2614
2615else
2616  echo "$ac_t""no" 1>&6
2617fi
2618done
2619
2620for ac_func in mmap
2621do
2622echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2623echo "configure:2624: checking for $ac_func" >&5
2624if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2625  echo $ac_n "(cached) $ac_c" 1>&6
2626else
2627  cat > conftest.$ac_ext <<EOF
2628#line 2629 "configure"
2629#include "confdefs.h"
2630/* System header to define __stub macros and hopefully few prototypes,
2631    which can conflict with char $ac_func(); below.  */
2632#include <assert.h>
2633/* Override any gcc2 internal prototype to avoid an error.  */
2634/* We use char because int might match the return type of a gcc2
2635    builtin and then its argument prototype would still apply.  */
2636char $ac_func();
2637
2638int main() {
2639
2640/* The GNU C library defines this for functions which it implements
2641    to always fail with ENOSYS.  Some functions are actually named
2642    something starting with __ and the normal name is an alias.  */
2643#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2644choke me
2645#else
2646$ac_func();
2647#endif
2648
2649; return 0; }
2650EOF
2651if { (eval echo configure:2652: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2652  rm -rf conftest*
2653  eval "ac_cv_func_$ac_func=yes"
2654else
2655  echo "configure: failed program was:" >&5
2656  cat conftest.$ac_ext >&5
2657  rm -rf conftest*
2658  eval "ac_cv_func_$ac_func=no"
2659fi
2660rm -f conftest*
2661fi
2662
2663if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2664  echo "$ac_t""yes" 1>&6
2665    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2666  cat >> confdefs.h <<EOF
2667#define $ac_tr_func 1
2668EOF
2669
2670else
2671  echo "$ac_t""no" 1>&6
2672fi
2673done
2674
2675if test $ac_cv_header_sys_mman_h != yes \
2676 || test $ac_cv_func_mmap != yes; then
2677   ac_cv_func_mmap_file=no
2678   ac_cv_func_mmap_dev_zero=no
2679   ac_cv_func_mmap_anon=no
2680else
2681   echo $ac_n "checking whether read-only mmap of a plain file works""... $ac_c" 1>&6
2682echo "configure:2683: checking whether read-only mmap of a plain file works" >&5
2683if eval "test \"`echo '$''{'ac_cv_func_mmap_file'+set}'`\" = set"; then
2684  echo $ac_n "(cached) $ac_c" 1>&6
2685else
2686  # Add a system to this blacklist if
2687   # mmap(0, stat_size, PROT_READ, MAP_PRIVATE, fd, 0) doesn't return a
2688   # memory area containing the same data that you'd get if you applied
2689   # read() to the same fd.  The only system known to have a problem here
2690   # is VMS, where text files have record structure.
2691   case "$host_os" in
2692     vms* | ultrix*)
2693	ac_cv_func_mmap_file=no ;;
2694     *)
2695	ac_cv_func_mmap_file=yes;;
2696   esac
2697fi
2698
2699echo "$ac_t""$ac_cv_func_mmap_file" 1>&6
2700   echo $ac_n "checking whether mmap from /dev/zero works""... $ac_c" 1>&6
2701echo "configure:2702: checking whether mmap from /dev/zero works" >&5
2702if eval "test \"`echo '$''{'ac_cv_func_mmap_dev_zero'+set}'`\" = set"; then
2703  echo $ac_n "(cached) $ac_c" 1>&6
2704else
2705  # Add a system to this blacklist if it has mmap() but /dev/zero
2706   # does not exist, or if mmapping /dev/zero does not give anonymous
2707   # zeroed pages with both the following properties:
2708   # 1. If you map N consecutive pages in with one call, and then
2709   #    unmap any subset of those pages, the pages that were not
2710   #    explicitly unmapped remain accessible.
2711   # 2. If you map two adjacent blocks of memory and then unmap them
2712   #    both at once, they must both go away.
2713   # Systems known to be in this category are Windows (all variants),
2714   # VMS, and Darwin.
2715   case "$host_os" in
2716     vms* | cygwin* | pe | mingw* | darwin* | ultrix* | hpux10* | hpux11.00)
2717	ac_cv_func_mmap_dev_zero=no ;;
2718     *)
2719	ac_cv_func_mmap_dev_zero=yes;;
2720   esac
2721fi
2722
2723echo "$ac_t""$ac_cv_func_mmap_dev_zero" 1>&6
2724
2725   # Unlike /dev/zero, the MAP_ANON(YMOUS) defines can be probed for.
2726   echo $ac_n "checking for MAP_ANON(YMOUS)""... $ac_c" 1>&6
2727echo "configure:2728: checking for MAP_ANON(YMOUS)" >&5
2728if eval "test \"`echo '$''{'ac_cv_decl_map_anon'+set}'`\" = set"; then
2729  echo $ac_n "(cached) $ac_c" 1>&6
2730else
2731  cat > conftest.$ac_ext <<EOF
2732#line 2733 "configure"
2733#include "confdefs.h"
2734#include <sys/types.h>
2735#include <sys/mman.h>
2736#include <unistd.h>
2737
2738#ifndef MAP_ANONYMOUS
2739#define MAP_ANONYMOUS MAP_ANON
2740#endif
2741
2742int main() {
2743int n = MAP_ANONYMOUS;
2744; return 0; }
2745EOF
2746if { (eval echo configure:2747: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2747  rm -rf conftest*
2748  ac_cv_decl_map_anon=yes
2749else
2750  echo "configure: failed program was:" >&5
2751  cat conftest.$ac_ext >&5
2752  rm -rf conftest*
2753  ac_cv_decl_map_anon=no
2754fi
2755rm -f conftest*
2756fi
2757
2758echo "$ac_t""$ac_cv_decl_map_anon" 1>&6
2759
2760   if test $ac_cv_decl_map_anon = no; then
2761     ac_cv_func_mmap_anon=no
2762   else
2763     echo $ac_n "checking whether mmap with MAP_ANON(YMOUS) works""... $ac_c" 1>&6
2764echo "configure:2765: checking whether mmap with MAP_ANON(YMOUS) works" >&5
2765if eval "test \"`echo '$''{'ac_cv_func_mmap_anon'+set}'`\" = set"; then
2766  echo $ac_n "(cached) $ac_c" 1>&6
2767else
2768  # Add a system to this blacklist if it has mmap() and MAP_ANON or
2769   # MAP_ANONYMOUS, but using mmap(..., MAP_PRIVATE|MAP_ANONYMOUS, -1, 0)
2770   # doesn't give anonymous zeroed pages with the same properties listed
2771   # above for use of /dev/zero.
2772   # Systems known to be in this category are Windows, VMS, and SCO Unix.
2773   case "$host_os" in
2774     vms* | cygwin* | pe | mingw* | sco* | udk* )
2775	ac_cv_func_mmap_anon=no ;;
2776     *)
2777	ac_cv_func_mmap_anon=yes;;
2778   esac
2779fi
2780
2781echo "$ac_t""$ac_cv_func_mmap_anon" 1>&6
2782   fi
2783fi
2784
2785if test $ac_cv_func_mmap_file = yes; then
2786  cat >> confdefs.h <<\EOF
2787#define HAVE_MMAP_FILE 1
2788EOF
2789
2790fi
2791if test $ac_cv_func_mmap_dev_zero = yes; then
2792  cat >> confdefs.h <<\EOF
2793#define HAVE_MMAP_DEV_ZERO 1
2794EOF
2795
2796fi
2797if test $ac_cv_func_mmap_anon = yes; then
2798  cat >> confdefs.h <<\EOF
2799#define HAVE_MMAP_ANON 1
2800EOF
2801
2802fi
2803
2804
2805
2806
2807if test -d $srcdir/testsuite; then
2808  TESTSUBDIR_TRUE=
2809  TESTSUBDIR_FALSE='#'
2810else
2811  TESTSUBDIR_TRUE='#'
2812  TESTSUBDIR_FALSE=
2813fi
2814
2815
2816TARGETDIR="unknown"
2817case "$host" in
2818i*86-*-linux*) TARGET=X86; TARGETDIR=x86;;
2819i*86-*-solaris*) TARGET=X86; TARGETDIR=x86;;
2820i*86-*-beos*) TARGET=X86; TARGETDIR=x86;;
2821i*86-*-freebsd*) TARGET=X86; TARGETDIR=x86;;
2822i*86-*-netbsdelf*) TARGET=X86; TARGETDIR=x86;;
2823i*86-*-win32*) TARGET=X86_WIN32; TARGETDIR=x86;;
2824i*86-*-cygwin*) TARGET=X86_WIN32; TARGETDIR=x86;;
2825i*86-*-mingw*) TARGET=X86_WIN32; TARGETDIR=x86;;
2826sparc-sun-4*) TARGET=SPARC; TARGETDIR=sparc;;
2827sparc*-sun-*) TARGET=SPARC; TARGETDIR=sparc;;
2828sparc-*-linux* | sparc-*-netbsdelf*) TARGET=SPARC; TARGETDIR=sparc;;
2829sparc64-*-linux* | sparc64-*-netbsd*) TARGET=SPARC; TARGETDIR=sparc;;
2830alpha*-*-linux* | alpha*-*-osf* | alpha*-*-freebsd* | alpha*-*-netbsd*) TARGET=ALPHA; TARGETDIR=alpha;;
2831ia64*-*-*) TARGET=IA64; TARGETDIR=ia64;;
2832m68k-*-linux*) TARGET=M68K; TARGETDIR=m68k;;
2833mips64*-*);;
2834mips-sgi-irix5.* | mips-sgi-irix6.*) TARGET=MIPS_IRIX; TARGETDIR=mips;;
2835mips*-*-linux*) TARGET=MIPS_LINUX; TARGETDIR=mips;;
2836powerpc*-*-linux* | powerpc-*-sysv*) TARGET=POWERPC; TARGETDIR=powerpc;;
2837powerpc-*-beos*) TARGET=POWERPC; TARGETDIR=powerpc;;
2838powerpc-*-darwin*) TARGET=POWERPC_DARWIN; TARGETDIR=powerpc;;
2839powerpc-*-aix*) TARGET=POWERPC_AIX; TARGETDIR=powerpc;;
2840rs6000-*-aix*) TARGET=POWERPC_AIX; TARGETDIR=powerpc;;
2841arm*-*-linux-*) TARGET=ARM; TARGETDIR=arm;;
2842arm*-*-netbsdelf*) TARGET=ARM; TARGETDIR=arm;;
2843s390-*-linux-*) TARGET=S390; TARGETDIR=s390;;
2844s390x-*-linux-*) TARGET=S390; TARGETDIR=s390;;
2845x86_64-*-linux*) TARGET=X86_64; TARGETDIR=x86;;
2846sh-*-linux* | sh[34]*-*-linux*) TARGET=SH; TARGETDIR=sh;;
2847sh64-*-linux* | sh5*-*-linux*) TARGET=SH64; TARGETDIR=sh64;;
2848esac
2849
2850
2851
2852if test $TARGETDIR = unknown; then
2853  { echo "configure: error: "libffi has not been ported to $host."" 1>&2; exit 1; }
2854fi
2855
2856
2857
2858if test x$TARGET = xMIPS_IRIX; then
2859  MIPS_IRIX_TRUE=
2860  MIPS_IRIX_FALSE='#'
2861else
2862  MIPS_IRIX_TRUE='#'
2863  MIPS_IRIX_FALSE=
2864fi
2865
2866
2867if test x$TARGET = xMIPS_LINUX; then
2868  MIPS_LINUX_TRUE=
2869  MIPS_LINUX_FALSE='#'
2870else
2871  MIPS_LINUX_TRUE='#'
2872  MIPS_LINUX_FALSE=
2873fi
2874
2875
2876if test x$TARGET = xSPARC; then
2877  SPARC_TRUE=
2878  SPARC_FALSE='#'
2879else
2880  SPARC_TRUE='#'
2881  SPARC_FALSE=
2882fi
2883
2884
2885if test x$TARGET = xX86; then
2886  X86_TRUE=
2887  X86_FALSE='#'
2888else
2889  X86_TRUE='#'
2890  X86_FALSE=
2891fi
2892
2893
2894if test x$TARGET = xX86_WIN32; then
2895  X86_WIN32_TRUE=
2896  X86_WIN32_FALSE='#'
2897else
2898  X86_WIN32_TRUE='#'
2899  X86_WIN32_FALSE=
2900fi
2901
2902
2903if test x$TARGET = xALPHA; then
2904  ALPHA_TRUE=
2905  ALPHA_FALSE='#'
2906else
2907  ALPHA_TRUE='#'
2908  ALPHA_FALSE=
2909fi
2910
2911
2912if test x$TARGET = xIA64; then
2913  IA64_TRUE=
2914  IA64_FALSE='#'
2915else
2916  IA64_TRUE='#'
2917  IA64_FALSE=
2918fi
2919
2920
2921if test x$TARGET = xM68K; then
2922  M68K_TRUE=
2923  M68K_FALSE='#'
2924else
2925  M68K_TRUE='#'
2926  M68K_FALSE=
2927fi
2928
2929
2930if test x$TARGET = xPOWERPC; then
2931  POWERPC_TRUE=
2932  POWERPC_FALSE='#'
2933else
2934  POWERPC_TRUE='#'
2935  POWERPC_FALSE=
2936fi
2937
2938
2939if test x$TARGET = xPOWERPC_AIX; then
2940  POWERPC_AIX_TRUE=
2941  POWERPC_AIX_FALSE='#'
2942else
2943  POWERPC_AIX_TRUE='#'
2944  POWERPC_AIX_FALSE=
2945fi
2946
2947
2948if test x$TARGET = xPOWERPC_DARWIN; then
2949  POWERPC_DARWIN_TRUE=
2950  POWERPC_DARWIN_FALSE='#'
2951else
2952  POWERPC_DARWIN_TRUE='#'
2953  POWERPC_DARWIN_FALSE=
2954fi
2955
2956
2957if test x$TARGET = xARM; then
2958  ARM_TRUE=
2959  ARM_FALSE='#'
2960else
2961  ARM_TRUE='#'
2962  ARM_FALSE=
2963fi
2964
2965
2966if test x$TARGET = xS390; then
2967  S390_TRUE=
2968  S390_FALSE='#'
2969else
2970  S390_TRUE='#'
2971  S390_FALSE=
2972fi
2973
2974
2975if test x$TARGET = xX86_64; then
2976  X86_64_TRUE=
2977  X86_64_FALSE='#'
2978else
2979  X86_64_TRUE='#'
2980  X86_64_FALSE=
2981fi
2982
2983
2984if test x$TARGET = xSH; then
2985  SH_TRUE=
2986  SH_FALSE='#'
2987else
2988  SH_TRUE='#'
2989  SH_FALSE=
2990fi
2991
2992
2993if test x$TARGET = xSH64; then
2994  SH64_TRUE=
2995  SH64_FALSE='#'
2996else
2997  SH64_TRUE='#'
2998  SH64_FALSE=
2999fi
3000
3001case x$TARGET in
3002  xMIPS*) TARGET=MIPS ;;
3003  *) ;;
3004esac
3005
3006echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
3007echo "configure:3008: checking for ANSI C header files" >&5
3008if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
3009  echo $ac_n "(cached) $ac_c" 1>&6
3010else
3011  cat > conftest.$ac_ext <<EOF
3012#line 3013 "configure"
3013#include "confdefs.h"
3014#include <stdlib.h>
3015#include <stdarg.h>
3016#include <string.h>
3017#include <float.h>
3018EOF
3019ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3020{ (eval echo configure:3021: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3021ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3022if test -z "$ac_err"; then
3023  rm -rf conftest*
3024  ac_cv_header_stdc=yes
3025else
3026  echo "$ac_err" >&5
3027  echo "configure: failed program was:" >&5
3028  cat conftest.$ac_ext >&5
3029  rm -rf conftest*
3030  ac_cv_header_stdc=no
3031fi
3032rm -f conftest*
3033
3034if test $ac_cv_header_stdc = yes; then
3035  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
3036cat > conftest.$ac_ext <<EOF
3037#line 3038 "configure"
3038#include "confdefs.h"
3039#include <string.h>
3040EOF
3041if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3042  egrep "memchr" >/dev/null 2>&1; then
3043  :
3044else
3045  rm -rf conftest*
3046  ac_cv_header_stdc=no
3047fi
3048rm -f conftest*
3049
3050fi
3051
3052if test $ac_cv_header_stdc = yes; then
3053  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
3054cat > conftest.$ac_ext <<EOF
3055#line 3056 "configure"
3056#include "confdefs.h"
3057#include <stdlib.h>
3058EOF
3059if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3060  egrep "free" >/dev/null 2>&1; then
3061  :
3062else
3063  rm -rf conftest*
3064  ac_cv_header_stdc=no
3065fi
3066rm -f conftest*
3067
3068fi
3069
3070if test $ac_cv_header_stdc = yes; then
3071  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
3072if test "$cross_compiling" = yes; then
3073  :
3074else
3075  cat > conftest.$ac_ext <<EOF
3076#line 3077 "configure"
3077#include "confdefs.h"
3078#include <ctype.h>
3079#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3080#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3081#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3082int main () { int i; for (i = 0; i < 256; i++)
3083if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
3084exit (0); }
3085
3086EOF
3087if { (eval echo configure:3088: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3088then
3089  :
3090else
3091  echo "configure: failed program was:" >&5
3092  cat conftest.$ac_ext >&5
3093  rm -fr conftest*
3094  ac_cv_header_stdc=no
3095fi
3096rm -fr conftest*
3097fi
3098
3099fi
3100fi
3101
3102echo "$ac_t""$ac_cv_header_stdc" 1>&6
3103if test $ac_cv_header_stdc = yes; then
3104  cat >> confdefs.h <<\EOF
3105#define STDC_HEADERS 1
3106EOF
3107
3108fi
3109
3110for ac_func in memcpy
3111do
3112echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3113echo "configure:3114: checking for $ac_func" >&5
3114if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3115  echo $ac_n "(cached) $ac_c" 1>&6
3116else
3117  cat > conftest.$ac_ext <<EOF
3118#line 3119 "configure"
3119#include "confdefs.h"
3120/* System header to define __stub macros and hopefully few prototypes,
3121    which can conflict with char $ac_func(); below.  */
3122#include <assert.h>
3123/* Override any gcc2 internal prototype to avoid an error.  */
3124/* We use char because int might match the return type of a gcc2
3125    builtin and then its argument prototype would still apply.  */
3126char $ac_func();
3127
3128int main() {
3129
3130/* The GNU C library defines this for functions which it implements
3131    to always fail with ENOSYS.  Some functions are actually named
3132    something starting with __ and the normal name is an alias.  */
3133#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3134choke me
3135#else
3136$ac_func();
3137#endif
3138
3139; return 0; }
3140EOF
3141if { (eval echo configure:3142: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3142  rm -rf conftest*
3143  eval "ac_cv_func_$ac_func=yes"
3144else
3145  echo "configure: failed program was:" >&5
3146  cat conftest.$ac_ext >&5
3147  rm -rf conftest*
3148  eval "ac_cv_func_$ac_func=no"
3149fi
3150rm -f conftest*
3151fi
3152
3153if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3154  echo "$ac_t""yes" 1>&6
3155    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3156  cat >> confdefs.h <<EOF
3157#define $ac_tr_func 1
3158EOF
3159
3160else
3161  echo "$ac_t""no" 1>&6
3162fi
3163done
3164
3165# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
3166# for constant arguments.  Useless!
3167echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
3168echo "configure:3169: checking for working alloca.h" >&5
3169if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
3170  echo $ac_n "(cached) $ac_c" 1>&6
3171else
3172  cat > conftest.$ac_ext <<EOF
3173#line 3174 "configure"
3174#include "confdefs.h"
3175#include <alloca.h>
3176int main() {
3177char *p = alloca(2 * sizeof(int));
3178; return 0; }
3179EOF
3180if { (eval echo configure:3181: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3181  rm -rf conftest*
3182  ac_cv_header_alloca_h=yes
3183else
3184  echo "configure: failed program was:" >&5
3185  cat conftest.$ac_ext >&5
3186  rm -rf conftest*
3187  ac_cv_header_alloca_h=no
3188fi
3189rm -f conftest*
3190fi
3191
3192echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
3193if test $ac_cv_header_alloca_h = yes; then
3194  cat >> confdefs.h <<\EOF
3195#define HAVE_ALLOCA_H 1
3196EOF
3197
3198fi
3199
3200echo $ac_n "checking for alloca""... $ac_c" 1>&6
3201echo "configure:3202: checking for alloca" >&5
3202if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
3203  echo $ac_n "(cached) $ac_c" 1>&6
3204else
3205  cat > conftest.$ac_ext <<EOF
3206#line 3207 "configure"
3207#include "confdefs.h"
3208
3209#ifdef __GNUC__
3210# define alloca __builtin_alloca
3211#else
3212# ifdef _MSC_VER
3213#  include <malloc.h>
3214#  define alloca _alloca
3215# else
3216#  if HAVE_ALLOCA_H
3217#   include <alloca.h>
3218#  else
3219#   ifdef _AIX
3220 #pragma alloca
3221#   else
3222#    ifndef alloca /* predefined by HP cc +Olibcalls */
3223char *alloca ();
3224#    endif
3225#   endif
3226#  endif
3227# endif
3228#endif
3229
3230int main() {
3231char *p = (char *) alloca(1);
3232; return 0; }
3233EOF
3234if { (eval echo configure:3235: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3235  rm -rf conftest*
3236  ac_cv_func_alloca_works=yes
3237else
3238  echo "configure: failed program was:" >&5
3239  cat conftest.$ac_ext >&5
3240  rm -rf conftest*
3241  ac_cv_func_alloca_works=no
3242fi
3243rm -f conftest*
3244fi
3245
3246echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
3247if test $ac_cv_func_alloca_works = yes; then
3248  cat >> confdefs.h <<\EOF
3249#define HAVE_ALLOCA 1
3250EOF
3251
3252fi
3253
3254if test $ac_cv_func_alloca_works = no; then
3255  # The SVR3 libPW and SVR4 libucb both contain incompatible functions
3256  # that cause trouble.  Some versions do not even contain alloca or
3257  # contain a buggy version.  If you still want to use their alloca,
3258  # use ar to extract alloca.o from them instead of compiling alloca.c.
3259  ALLOCA=alloca.${ac_objext}
3260  cat >> confdefs.h <<\EOF
3261#define C_ALLOCA 1
3262EOF
3263
3264
3265echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
3266echo "configure:3267: checking whether alloca needs Cray hooks" >&5
3267if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
3268  echo $ac_n "(cached) $ac_c" 1>&6
3269else
3270  cat > conftest.$ac_ext <<EOF
3271#line 3272 "configure"
3272#include "confdefs.h"
3273#if defined(CRAY) && ! defined(CRAY2)
3274webecray
3275#else
3276wenotbecray
3277#endif
3278
3279EOF
3280if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3281  egrep "webecray" >/dev/null 2>&1; then
3282  rm -rf conftest*
3283  ac_cv_os_cray=yes
3284else
3285  rm -rf conftest*
3286  ac_cv_os_cray=no
3287fi
3288rm -f conftest*
3289
3290fi
3291
3292echo "$ac_t""$ac_cv_os_cray" 1>&6
3293if test $ac_cv_os_cray = yes; then
3294for ac_func in _getb67 GETB67 getb67; do
3295  echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3296echo "configure:3297: checking for $ac_func" >&5
3297if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3298  echo $ac_n "(cached) $ac_c" 1>&6
3299else
3300  cat > conftest.$ac_ext <<EOF
3301#line 3302 "configure"
3302#include "confdefs.h"
3303/* System header to define __stub macros and hopefully few prototypes,
3304    which can conflict with char $ac_func(); below.  */
3305#include <assert.h>
3306/* Override any gcc2 internal prototype to avoid an error.  */
3307/* We use char because int might match the return type of a gcc2
3308    builtin and then its argument prototype would still apply.  */
3309char $ac_func();
3310
3311int main() {
3312
3313/* The GNU C library defines this for functions which it implements
3314    to always fail with ENOSYS.  Some functions are actually named
3315    something starting with __ and the normal name is an alias.  */
3316#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3317choke me
3318#else
3319$ac_func();
3320#endif
3321
3322; return 0; }
3323EOF
3324if { (eval echo configure:3325: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3325  rm -rf conftest*
3326  eval "ac_cv_func_$ac_func=yes"
3327else
3328  echo "configure: failed program was:" >&5
3329  cat conftest.$ac_ext >&5
3330  rm -rf conftest*
3331  eval "ac_cv_func_$ac_func=no"
3332fi
3333rm -f conftest*
3334fi
3335
3336if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3337  echo "$ac_t""yes" 1>&6
3338  cat >> confdefs.h <<EOF
3339#define CRAY_STACKSEG_END $ac_func
3340EOF
3341
3342  break
3343else
3344  echo "$ac_t""no" 1>&6
3345fi
3346
3347done
3348fi
3349
3350echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
3351echo "configure:3352: checking stack direction for C alloca" >&5
3352if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
3353  echo $ac_n "(cached) $ac_c" 1>&6
3354else
3355  if test "$cross_compiling" = yes; then
3356  ac_cv_c_stack_direction=0
3357else
3358  cat > conftest.$ac_ext <<EOF
3359#line 3360 "configure"
3360#include "confdefs.h"
3361find_stack_direction ()
3362{
3363  static char *addr = 0;
3364  auto char dummy;
3365  if (addr == 0)
3366    {
3367      addr = &dummy;
3368      return find_stack_direction ();
3369    }
3370  else
3371    return (&dummy > addr) ? 1 : -1;
3372}
3373main ()
3374{
3375  exit (find_stack_direction() < 0);
3376}
3377EOF
3378if { (eval echo configure:3379: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3379then
3380  ac_cv_c_stack_direction=1
3381else
3382  echo "configure: failed program was:" >&5
3383  cat conftest.$ac_ext >&5
3384  rm -fr conftest*
3385  ac_cv_c_stack_direction=-1
3386fi
3387rm -fr conftest*
3388fi
3389
3390fi
3391
3392echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
3393cat >> confdefs.h <<EOF
3394#define STACK_DIRECTION $ac_cv_c_stack_direction
3395EOF
3396
3397fi
3398
3399
3400echo $ac_n "checking size of double""... $ac_c" 1>&6
3401echo "configure:3402: checking size of double" >&5
3402if eval "test \"`echo '$''{'ac_cv_sizeof_double'+set}'`\" = set"; then
3403  echo $ac_n "(cached) $ac_c" 1>&6
3404else
3405  for ac_size in 4 8 1 2 16 12  ; do # List sizes in rough order of prevalence.
3406  cat > conftest.$ac_ext <<EOF
3407#line 3408 "configure"
3408#include "confdefs.h"
3409#include "confdefs.h"
3410#include <sys/types.h>
3411
3412
3413int main() {
3414switch (0) case 0: case (sizeof (double) == $ac_size):;
3415; return 0; }
3416EOF
3417if { (eval echo configure:3418: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3418  rm -rf conftest*
3419  ac_cv_sizeof_double=$ac_size
3420else
3421  echo "configure: failed program was:" >&5
3422  cat conftest.$ac_ext >&5
3423fi
3424rm -f conftest*
3425  if test x$ac_cv_sizeof_double != x ; then break; fi
3426done
3427
3428fi
3429
3430if test x$ac_cv_sizeof_double = x ; then
3431  { echo "configure: error: cannot determine a size for double" 1>&2; exit 1; }
3432fi
3433echo "$ac_t""$ac_cv_sizeof_double" 1>&6
3434cat >> confdefs.h <<EOF
3435#define SIZEOF_DOUBLE $ac_cv_sizeof_double
3436EOF
3437
3438
3439echo $ac_n "checking size of long double""... $ac_c" 1>&6
3440echo "configure:3441: checking size of long double" >&5
3441if eval "test \"`echo '$''{'ac_cv_sizeof_long_double'+set}'`\" = set"; then
3442  echo $ac_n "(cached) $ac_c" 1>&6
3443else
3444  for ac_size in 4 8 1 2 16 12  ; do # List sizes in rough order of prevalence.
3445  cat > conftest.$ac_ext <<EOF
3446#line 3447 "configure"
3447#include "confdefs.h"
3448#include "confdefs.h"
3449#include <sys/types.h>
3450
3451
3452int main() {
3453switch (0) case 0: case (sizeof (long double) == $ac_size):;
3454; return 0; }
3455EOF
3456if { (eval echo configure:3457: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3457  rm -rf conftest*
3458  ac_cv_sizeof_long_double=$ac_size
3459else
3460  echo "configure: failed program was:" >&5
3461  cat conftest.$ac_ext >&5
3462fi
3463rm -f conftest*
3464  if test x$ac_cv_sizeof_long_double != x ; then break; fi
3465done
3466
3467fi
3468
3469if test x$ac_cv_sizeof_long_double = x ; then
3470  { echo "configure: error: cannot determine a size for long double" 1>&2; exit 1; }
3471fi
3472echo "$ac_t""$ac_cv_sizeof_long_double" 1>&6
3473cat >> confdefs.h <<EOF
3474#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
3475EOF
3476
3477
3478
3479# Also AC_SUBST this variable for ffi.h.
3480HAVE_LONG_DOUBLE=0
3481if test $ac_cv_sizeof_double != $ac_cv_sizeof_long_double; then
3482  if test $ac_cv_sizeof_long_double != 0; then
3483    HAVE_LONG_DOUBLE=1
3484    cat >> confdefs.h <<\EOF
3485#define HAVE_LONG_DOUBLE 1
3486EOF
3487
3488  fi
3489fi
3490
3491
3492echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
3493echo "configure:3494: checking whether byte ordering is bigendian" >&5
3494if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
3495  echo $ac_n "(cached) $ac_c" 1>&6
3496else
3497  ac_cv_c_bigendian=unknown
3498# See if sys/param.h defines the BYTE_ORDER macro.
3499cat > conftest.$ac_ext <<EOF
3500#line 3501 "configure"
3501#include "confdefs.h"
3502#include <sys/types.h>
3503#include <sys/param.h>
3504int main() {
3505
3506#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
3507 bogus endian macros
3508#endif
3509; return 0; }
3510EOF
3511if { (eval echo configure:3512: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3512  rm -rf conftest*
3513  # It does; now see whether it defined to BIG_ENDIAN or not.
3514cat > conftest.$ac_ext <<EOF
3515#line 3516 "configure"
3516#include "confdefs.h"
3517#include <sys/types.h>
3518#include <sys/param.h>
3519int main() {
3520
3521#if BYTE_ORDER != BIG_ENDIAN
3522 not big endian
3523#endif
3524; return 0; }
3525EOF
3526if { (eval echo configure:3527: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3527  rm -rf conftest*
3528  ac_cv_c_bigendian=yes
3529else
3530  echo "configure: failed program was:" >&5
3531  cat conftest.$ac_ext >&5
3532  rm -rf conftest*
3533  ac_cv_c_bigendian=no
3534fi
3535rm -f conftest*
3536else
3537  echo "configure: failed program was:" >&5
3538  cat conftest.$ac_ext >&5
3539fi
3540rm -f conftest*
3541if test $ac_cv_c_bigendian = unknown; then
3542if test "$cross_compiling" = yes; then
3543   echo $ac_n "cross-compiling... " 2>&6
3544else
3545  cat > conftest.$ac_ext <<EOF
3546#line 3547 "configure"
3547#include "confdefs.h"
3548main () {
3549  /* Are we little or big endian?  From Harbison&Steele.  */
3550  union
3551  {
3552    long l;
3553    char c[sizeof (long)];
3554  } u;
3555  u.l = 1;
3556  exit (u.c[sizeof (long) - 1] == 1);
3557}
3558EOF
3559if { (eval echo configure:3560: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3560then
3561  ac_cv_c_bigendian=no
3562else
3563  echo "configure: failed program was:" >&5
3564  cat conftest.$ac_ext >&5
3565  rm -fr conftest*
3566  ac_cv_c_bigendian=yes
3567fi
3568rm -fr conftest*
3569fi
3570
3571fi
3572fi
3573
3574echo "$ac_t""$ac_cv_c_bigendian" 1>&6
3575if test $ac_cv_c_bigendian = unknown; then
3576echo $ac_n "checking to probe for byte ordering""... $ac_c" 1>&6
3577echo "configure:3578: checking to probe for byte ordering" >&5
3578
3579cat >conftest.c <<EOF
3580short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
3581short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
3582void _ascii() { char* s = (char*) ascii_mm; s = (char*) ascii_ii; }
3583short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
3584short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
3585void _ebcdic() { char* s = (char*) ebcdic_mm; s = (char*) ebcdic_ii; }
3586int main() { _ascii (); _ebcdic (); return 0; }
3587EOF
3588 if test -f conftest.c ; then
3589     if ${CC-cc} ${CFLAGS} conftest.c -o conftest.o && test -f conftest.o ; then
3590        if test `grep -l BIGenDianSyS conftest.o` ; then
3591           echo $ac_n ' big endian probe OK, ' 1>&6
3592           ac_cv_c_bigendian=yes
3593        fi
3594        if test `grep -l LiTTleEnDian conftest.o` ; then
3595           echo $ac_n ' little endian probe OK, ' 1>&6
3596           if test $ac_cv_c_bigendian = yes ; then
3597            ac_cv_c_bigendian=unknown;
3598           else
3599            ac_cv_c_bigendian=no
3600           fi
3601        fi
3602        echo $ac_n 'guessing bigendian ...  ' >&6
3603     fi
3604  fi
3605echo "$ac_t""$ac_cv_c_bigendian" 1>&6
3606fi
3607if test $ac_cv_c_bigendian = yes; then
3608  cat >> confdefs.h <<\EOF
3609#define WORDS_BIGENDIAN 1
3610EOF
3611
3612  cat >> confdefs.h <<\EOF
3613#define HOST_WORDS_BIG_ENDIAN 1
3614EOF
3615
3616  BYTEORDER=4321
3617else
3618  BYTEORDER=1234
3619fi
3620cat >> confdefs.h <<EOF
3621#define BYTEORDER $BYTEORDER
3622EOF
3623
3624if test $ac_cv_c_bigendian = unknown; then
3625  { echo "configure: error: unknown endianess - sorry" 1>&2; exit 1; }
3626fi
3627
3628
3629if test x$TARGET = xSPARC; then
3630    echo $ac_n "checking assembler and linker support unaligned pc related relocs""... $ac_c" 1>&6
3631echo "configure:3632: checking assembler and linker support unaligned pc related relocs" >&5
3632if eval "test \"`echo '$''{'libffi_cv_as_sparc_ua_pcrel'+set}'`\" = set"; then
3633  echo $ac_n "(cached) $ac_c" 1>&6
3634else
3635
3636	save_CFLAGS="$CFLAGS"
3637	save_LDFLAGS="$LDFLAGS"
3638	CFLAGS="$CFLAGS -fpic"
3639	LDFLAGS="$LDFLAGS -shared"
3640	cat > conftest.$ac_ext <<EOF
3641#line 3642 "configure"
3642#include "confdefs.h"
3643asm (".text; foo: nop; .data; .align 4; .byte 0; .uaword %r_disp32(foo); .text");
3644int main() {
3645
3646; return 0; }
3647EOF
3648if { (eval echo configure:3649: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3649  rm -rf conftest*
3650  libffi_cv_as_sparc_ua_pcrel=yes
3651else
3652  echo "configure: failed program was:" >&5
3653  cat conftest.$ac_ext >&5
3654  rm -rf conftest*
3655  libffi_cv_as_sparc_ua_pcrel=no
3656fi
3657rm -f conftest*
3658	CFLAGS="$save_CFLAGS"
3659	LDFLAGS="$save_LDFLAGS"
3660fi
3661
3662echo "$ac_t""$libffi_cv_as_sparc_ua_pcrel" 1>&6
3663    if test "x$libffi_cv_as_sparc_ua_pcrel" = xyes; then
3664	cat >> confdefs.h <<\EOF
3665#define HAVE_AS_SPARC_UA_PCREL 1
3666EOF
3667
3668    fi
3669
3670    echo $ac_n "checking assembler .register pseudo-op support""... $ac_c" 1>&6
3671echo "configure:3672: checking assembler .register pseudo-op support" >&5
3672if eval "test \"`echo '$''{'libffi_cv_as_register_pseudo_op'+set}'`\" = set"; then
3673  echo $ac_n "(cached) $ac_c" 1>&6
3674else
3675
3676       libffi_cv_as_register_pseudo_op=unknown
3677       # Check if we have .register
3678       cat > conftest.$ac_ext <<EOF
3679#line 3680 "configure"
3680#include "confdefs.h"
3681asm (".register %g2, #scratch");
3682int main() {
3683
3684; return 0; }
3685EOF
3686if { (eval echo configure:3687: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3687  rm -rf conftest*
3688  libffi_cv_as_register_pseudo_op=yes
3689else
3690  echo "configure: failed program was:" >&5
3691  cat conftest.$ac_ext >&5
3692  rm -rf conftest*
3693  libffi_cv_as_register_pseudo_op=no
3694fi
3695rm -f conftest*
3696
3697fi
3698
3699echo "$ac_t""$libffi_cv_as_register_pseudo_op" 1>&6
3700    if test "x$libffi_cv_as_register_pseudo_op" = xyes; then
3701       cat >> confdefs.h <<\EOF
3702#define HAVE_AS_REGISTER_PSEUDO_OP 1
3703EOF
3704
3705    fi
3706fi
3707
3708echo $ac_n "checking whether .eh_frame section should be read-only""... $ac_c" 1>&6
3709echo "configure:3710: checking whether .eh_frame section should be read-only" >&5
3710if eval "test \"`echo '$''{'libffi_cv_ro_eh_frame'+set}'`\" = set"; then
3711  echo $ac_n "(cached) $ac_c" 1>&6
3712else
3713
3714	libffi_cv_ro_eh_frame=no
3715	echo 'extern void foo (void); void bar (void) { foo (); foo (); }' > conftest.c
3716	if $CC $CFLAGS -S -fpic -fexceptions -o conftest.s conftest.c > /dev/null 2>&1; then
3717	    if grep '.section.*eh_frame.*"a"' conftest.s > /dev/null; then
3718		libffi_cv_ro_eh_frame=yes
3719	    elif grep '.section.*eh_frame.*#alloc' conftest.c \
3720		 | grep -v '#write' > /dev/null; then
3721		libffi_cv_ro_eh_frame=yes
3722	    fi
3723	fi
3724	rm -f conftest.*
3725
3726fi
3727
3728echo "$ac_t""$libffi_cv_ro_eh_frame" 1>&6
3729if test "x$libffi_cv_ro_eh_frame" = xyes; then
3730    cat >> confdefs.h <<\EOF
3731#define HAVE_RO_EH_FRAME 1
3732EOF
3733
3734    cat >> confdefs.h <<\EOF
3735#define EH_FRAME_FLAGS "a"
3736EOF
3737
3738else
3739    cat >> confdefs.h <<\EOF
3740#define EH_FRAME_FLAGS "aw"
3741EOF
3742
3743fi
3744
3745
3746
3747
3748
3749
3750# Check whether --enable-debug or --disable-debug was given.
3751if test "${enable_debug+set}" = set; then
3752  enableval="$enable_debug"
3753  if test "$enable_debug" = "yes"; then
3754    cat >> confdefs.h <<\EOF
3755#define FFI_DEBUG 1
3756EOF
3757
3758  fi
3759fi
3760
3761
3762# Check whether --enable-structs or --disable-structs was given.
3763if test "${enable_structs+set}" = set; then
3764  enableval="$enable_structs"
3765  if test "$enable_structs" = "no"; then
3766    cat >> confdefs.h <<\EOF
3767#define FFI_NO_STRUCTS 1
3768EOF
3769
3770  fi
3771fi
3772
3773
3774# Check whether --enable-raw-api or --disable-raw-api was given.
3775if test "${enable_raw_api+set}" = set; then
3776  enableval="$enable_raw_api"
3777  if test "$enable_raw_api" = "no"; then
3778    cat >> confdefs.h <<\EOF
3779#define FFI_NO_RAW_API 1
3780EOF
3781
3782  fi
3783fi
3784
3785
3786# Check whether --enable-purify-safety or --disable-purify-safety was given.
3787if test "${enable_purify_safety+set}" = set; then
3788  enableval="$enable_purify_safety"
3789  if test "$enable_purify_safety" = "yes"; then
3790    cat >> confdefs.h <<\EOF
3791#define USING_PURIFY 1
3792EOF
3793
3794  fi
3795fi
3796
3797
3798if test -n "$with_cross_host" &&
3799   test x"$with_cross_host" != x"no"; then
3800  toolexecdir='$(exec_prefix)/$(target_alias)'
3801  toolexeclibdir='$(toolexecdir)/lib'
3802else
3803  toolexecdir='$(libdir)/gcc-lib/$(target_alias)'
3804  toolexeclibdir='$(libdir)'
3805fi
3806multi_os_directory=`$CC -print-multi-os-directory`
3807case $multi_os_directory in
3808  .) ;; # Avoid trailing /.
3809  *) toolexeclibdir=$toolexeclibdir/$multi_os_directory ;;
3810esac
3811
3812
3813
3814#Figure out where generated headers like ffitarget.h get installed.
3815gcc_version_trigger=${srcdir}/../gcc/version.c
3816gcc_version_full=`grep version_string ${gcc_version_trigger} | sed -e 's/.*\"\([^\"]*\)\".*/\1/'`
3817gcc_version=`echo ${gcc_version_full} | sed -e 's/\([^ ]*\) .*/\1/'`
3818tool_include_dir='$(libdir)/gcc/$(target_alias)/'${gcc_version}/include
3819
3820
3821
3822
3823if test "${multilib}" = "yes"; then
3824  multilib_arg="--enable-multilib"
3825else
3826  multilib_arg=
3827fi
3828
3829trap '' 1 2 15
3830cat > confcache <<\EOF
3831# This file is a shell script that caches the results of configure
3832# tests run on this system so they can be shared between configure
3833# scripts and configure runs.  It is not useful on other systems.
3834# If it contains results you don't want to keep, you may remove or edit it.
3835#
3836# By default, configure uses ./config.cache as the cache file,
3837# creating it if it does not exist already.  You can give configure
3838# the --cache-file=FILE option to use a different cache file; that is
3839# what configure does when it calls configure scripts in
3840# subdirectories, so they share the cache.
3841# Giving --cache-file=/dev/null disables caching, for debugging configure.
3842# config.status only pays attention to the cache file if you give it the
3843# --recheck option to rerun configure.
3844#
3845EOF
3846# The following way of writing the cache mishandles newlines in values,
3847# but we know of no workaround that is simple, portable, and efficient.
3848# So, don't put newlines in cache variables' values.
3849# Ultrix sh set writes to stderr and can't be redirected directly,
3850# and sets the high bit in the cache file unless we assign to the vars.
3851(set) 2>&1 |
3852  case `(ac_space=' '; set | grep ac_space) 2>&1` in
3853  *ac_space=\ *)
3854    # `set' does not quote correctly, so add quotes (double-quote substitution
3855    # turns \\\\ into \\, and sed turns \\ into \).
3856    sed -n \
3857      -e "s/'/'\\\\''/g" \
3858      -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
3859    ;;
3860  *)
3861    # `set' quotes correctly as required by POSIX, so do not add quotes.
3862    sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
3863    ;;
3864  esac >> confcache
3865if cmp -s $cache_file confcache; then
3866  :
3867else
3868  if test -w $cache_file; then
3869    echo "updating cache $cache_file"
3870    cat confcache > $cache_file
3871  else
3872    echo "not updating unwritable cache $cache_file"
3873  fi
3874fi
3875rm -f confcache
3876
3877trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
3878
3879test "x$prefix" = xNONE && prefix=$ac_default_prefix
3880# Let make expand exec_prefix.
3881test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
3882
3883# Any assignment to VPATH causes Sun make to only execute
3884# the first set of double-colon rules, so remove it if not needed.
3885# If there is a colon in the path, we need to keep it.
3886if test "x$srcdir" = x.; then
3887  ac_vpsub='/^[ 	]*VPATH[ 	]*=[^:]*$/d'
3888fi
3889
3890trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
3891
3892DEFS=-DHAVE_CONFIG_H
3893
3894# Without the "./", some shells look in PATH for config.status.
3895: ${CONFIG_STATUS=./config.status}
3896
3897echo creating $CONFIG_STATUS
3898rm -f $CONFIG_STATUS
3899cat > $CONFIG_STATUS <<EOF
3900#! /bin/sh
3901# Generated automatically by configure.
3902# Run this file to recreate the current configuration.
3903# This directory was configured as follows,
3904# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
3905#
3906# $0 $ac_configure_args
3907#
3908# Compiler output produced by configure, useful for debugging
3909# configure, is in ./config.log if it exists.
3910
3911ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
3912for ac_option
3913do
3914  case "\$ac_option" in
3915  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
3916    echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
3917    exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
3918  -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
3919    echo "$CONFIG_STATUS generated by autoconf version 2.13"
3920    exit 0 ;;
3921  -help | --help | --hel | --he | --h)
3922    echo "\$ac_cs_usage"; exit 0 ;;
3923  *) echo "\$ac_cs_usage"; exit 1 ;;
3924  esac
3925done
3926
3927ac_given_srcdir=$srcdir
3928ac_given_INSTALL="$INSTALL"
3929
3930trap 'rm -fr `echo "include/Makefile testsuite/Makefile include/ffi.h Makefile fficonfig.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
3931EOF
3932cat >> $CONFIG_STATUS <<EOF
3933
3934# Protect against being on the right side of a sed subst in config.status.
3935sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
3936 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
3937$ac_vpsub
3938$extrasub
3939s%@SHELL@%$SHELL%g
3940s%@CFLAGS@%$CFLAGS%g
3941s%@CPPFLAGS@%$CPPFLAGS%g
3942s%@CXXFLAGS@%$CXXFLAGS%g
3943s%@FFLAGS@%$FFLAGS%g
3944s%@DEFS@%$DEFS%g
3945s%@LDFLAGS@%$LDFLAGS%g
3946s%@LIBS@%$LIBS%g
3947s%@exec_prefix@%$exec_prefix%g
3948s%@prefix@%$prefix%g
3949s%@program_transform_name@%$program_transform_name%g
3950s%@bindir@%$bindir%g
3951s%@sbindir@%$sbindir%g
3952s%@libexecdir@%$libexecdir%g
3953s%@datadir@%$datadir%g
3954s%@sysconfdir@%$sysconfdir%g
3955s%@sharedstatedir@%$sharedstatedir%g
3956s%@localstatedir@%$localstatedir%g
3957s%@libdir@%$libdir%g
3958s%@includedir@%$includedir%g
3959s%@oldincludedir@%$oldincludedir%g
3960s%@infodir@%$infodir%g
3961s%@mandir@%$mandir%g
3962s%@libffi_basedir@%$libffi_basedir%g
3963s%@host@%$host%g
3964s%@host_alias@%$host_alias%g
3965s%@host_cpu@%$host_cpu%g
3966s%@host_vendor@%$host_vendor%g
3967s%@host_os@%$host_os%g
3968s%@target@%$target%g
3969s%@target_alias@%$target_alias%g
3970s%@target_cpu@%$target_cpu%g
3971s%@target_vendor@%$target_vendor%g
3972s%@target_os@%$target_os%g
3973s%@build@%$build%g
3974s%@build_alias@%$build_alias%g
3975s%@build_cpu@%$build_cpu%g
3976s%@build_vendor@%$build_vendor%g
3977s%@build_os@%$build_os%g
3978s%@CC@%$CC%g
3979s%@LN_S@%$LN_S%g
3980s%@OBJEXT@%$OBJEXT%g
3981s%@EXEEXT@%$EXEEXT%g
3982s%@RANLIB@%$RANLIB%g
3983s%@STRIP@%$STRIP%g
3984s%@LIBTOOL@%$LIBTOOL%g
3985s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
3986s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
3987s%@INSTALL_DATA@%$INSTALL_DATA%g
3988s%@PACKAGE@%$PACKAGE%g
3989s%@VERSION@%$VERSION%g
3990s%@ACLOCAL@%$ACLOCAL%g
3991s%@AUTOCONF@%$AUTOCONF%g
3992s%@AUTOMAKE@%$AUTOMAKE%g
3993s%@AUTOHEADER@%$AUTOHEADER%g
3994s%@MAKEINFO@%$MAKEINFO%g
3995s%@SET_MAKE@%$SET_MAKE%g
3996s%@MAINTAINER_MODE_TRUE@%$MAINTAINER_MODE_TRUE%g
3997s%@MAINTAINER_MODE_FALSE@%$MAINTAINER_MODE_FALSE%g
3998s%@MAINT@%$MAINT%g
3999s%@CPP@%$CPP%g
4000s%@TESTSUBDIR_TRUE@%$TESTSUBDIR_TRUE%g
4001s%@TESTSUBDIR_FALSE@%$TESTSUBDIR_FALSE%g
4002s%@AM_RUNTESTFLAGS@%$AM_RUNTESTFLAGS%g
4003s%@MIPS_IRIX_TRUE@%$MIPS_IRIX_TRUE%g
4004s%@MIPS_IRIX_FALSE@%$MIPS_IRIX_FALSE%g
4005s%@MIPS_LINUX_TRUE@%$MIPS_LINUX_TRUE%g
4006s%@MIPS_LINUX_FALSE@%$MIPS_LINUX_FALSE%g
4007s%@SPARC_TRUE@%$SPARC_TRUE%g
4008s%@SPARC_FALSE@%$SPARC_FALSE%g
4009s%@X86_TRUE@%$X86_TRUE%g
4010s%@X86_FALSE@%$X86_FALSE%g
4011s%@X86_WIN32_TRUE@%$X86_WIN32_TRUE%g
4012s%@X86_WIN32_FALSE@%$X86_WIN32_FALSE%g
4013s%@ALPHA_TRUE@%$ALPHA_TRUE%g
4014s%@ALPHA_FALSE@%$ALPHA_FALSE%g
4015s%@IA64_TRUE@%$IA64_TRUE%g
4016s%@IA64_FALSE@%$IA64_FALSE%g
4017s%@M68K_TRUE@%$M68K_TRUE%g
4018s%@M68K_FALSE@%$M68K_FALSE%g
4019s%@POWERPC_TRUE@%$POWERPC_TRUE%g
4020s%@POWERPC_FALSE@%$POWERPC_FALSE%g
4021s%@POWERPC_AIX_TRUE@%$POWERPC_AIX_TRUE%g
4022s%@POWERPC_AIX_FALSE@%$POWERPC_AIX_FALSE%g
4023s%@POWERPC_DARWIN_TRUE@%$POWERPC_DARWIN_TRUE%g
4024s%@POWERPC_DARWIN_FALSE@%$POWERPC_DARWIN_FALSE%g
4025s%@ARM_TRUE@%$ARM_TRUE%g
4026s%@ARM_FALSE@%$ARM_FALSE%g
4027s%@S390_TRUE@%$S390_TRUE%g
4028s%@S390_FALSE@%$S390_FALSE%g
4029s%@X86_64_TRUE@%$X86_64_TRUE%g
4030s%@X86_64_FALSE@%$X86_64_FALSE%g
4031s%@SH_TRUE@%$SH_TRUE%g
4032s%@SH_FALSE@%$SH_FALSE%g
4033s%@SH64_TRUE@%$SH64_TRUE%g
4034s%@SH64_FALSE@%$SH64_FALSE%g
4035s%@ALLOCA@%$ALLOCA%g
4036s%@HAVE_LONG_DOUBLE@%$HAVE_LONG_DOUBLE%g
4037s%@TARGET@%$TARGET%g
4038s%@TARGETDIR@%$TARGETDIR%g
4039s%@toolexecdir@%$toolexecdir%g
4040s%@toolexeclibdir@%$toolexeclibdir%g
4041s%@tool_include_dir@%$tool_include_dir%g
4042s%@gcc_version@%$gcc_version%g
4043
4044CEOF
4045EOF
4046
4047cat >> $CONFIG_STATUS <<\EOF
4048
4049# Split the substitutions into bite-sized pieces for seds with
4050# small command number limits, like on Digital OSF/1 and HP-UX.
4051ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
4052ac_file=1 # Number of current file.
4053ac_beg=1 # First line for current file.
4054ac_end=$ac_max_sed_cmds # Line after last line for current file.
4055ac_more_lines=:
4056ac_sed_cmds=""
4057while $ac_more_lines; do
4058  if test $ac_beg -gt 1; then
4059    sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
4060  else
4061    sed "${ac_end}q" conftest.subs > conftest.s$ac_file
4062  fi
4063  if test ! -s conftest.s$ac_file; then
4064    ac_more_lines=false
4065    rm -f conftest.s$ac_file
4066  else
4067    if test -z "$ac_sed_cmds"; then
4068      ac_sed_cmds="sed -f conftest.s$ac_file"
4069    else
4070      ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
4071    fi
4072    ac_file=`expr $ac_file + 1`
4073    ac_beg=$ac_end
4074    ac_end=`expr $ac_end + $ac_max_sed_cmds`
4075  fi
4076done
4077if test -z "$ac_sed_cmds"; then
4078  ac_sed_cmds=cat
4079fi
4080EOF
4081
4082cat >> $CONFIG_STATUS <<EOF
4083
4084CONFIG_FILES=\${CONFIG_FILES-"include/Makefile testsuite/Makefile include/ffi.h Makefile"}
4085EOF
4086cat >> $CONFIG_STATUS <<\EOF
4087for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
4088  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
4089  case "$ac_file" in
4090  *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
4091       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
4092  *) ac_file_in="${ac_file}.in" ;;
4093  esac
4094
4095  # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
4096
4097  # Remove last slash and all that follows it.  Not all systems have dirname.
4098  ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
4099  if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
4100    # The file is in a subdirectory.
4101    test ! -d "$ac_dir" && mkdir "$ac_dir"
4102    ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
4103    # A "../" for each directory in $ac_dir_suffix.
4104    ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
4105  else
4106    ac_dir_suffix= ac_dots=
4107  fi
4108
4109  case "$ac_given_srcdir" in
4110  .)  srcdir=.
4111      if test -z "$ac_dots"; then top_srcdir=.
4112      else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
4113  /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
4114  *) # Relative path.
4115    srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
4116    top_srcdir="$ac_dots$ac_given_srcdir" ;;
4117  esac
4118
4119  case "$ac_given_INSTALL" in
4120  [/$]*) INSTALL="$ac_given_INSTALL" ;;
4121  *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
4122  esac
4123
4124  echo creating "$ac_file"
4125  rm -f "$ac_file"
4126  configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
4127  case "$ac_file" in
4128  *Makefile*) ac_comsub="1i\\
4129# $configure_input" ;;
4130  *) ac_comsub= ;;
4131  esac
4132
4133  ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
4134  sed -e "$ac_comsub
4135s%@configure_input@%$configure_input%g
4136s%@srcdir@%$srcdir%g
4137s%@top_srcdir@%$top_srcdir%g
4138s%@INSTALL@%$INSTALL%g
4139" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
4140fi; done
4141rm -f conftest.s*
4142
4143# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
4144# NAME is the cpp macro being defined and VALUE is the value it is being given.
4145#
4146# ac_d sets the value in "#define NAME VALUE" lines.
4147ac_dA='s%^\([ 	]*\)#\([ 	]*define[ 	][ 	]*\)'
4148ac_dB='\([ 	][ 	]*\)[^ 	]*%\1#\2'
4149ac_dC='\3'
4150ac_dD='%g'
4151# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
4152ac_uA='s%^\([ 	]*\)#\([ 	]*\)undef\([ 	][ 	]*\)'
4153ac_uB='\([ 	]\)%\1#\2define\3'
4154ac_uC=' '
4155ac_uD='\4%g'
4156# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
4157ac_eA='s%^\([ 	]*\)#\([ 	]*\)undef\([ 	][ 	]*\)'
4158ac_eB='$%\1#\2define\3'
4159ac_eC=' '
4160ac_eD='%g'
4161
4162if test "${CONFIG_HEADERS+set}" != set; then
4163EOF
4164cat >> $CONFIG_STATUS <<EOF
4165  CONFIG_HEADERS="fficonfig.h"
4166EOF
4167cat >> $CONFIG_STATUS <<\EOF
4168fi
4169for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
4170  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
4171  case "$ac_file" in
4172  *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
4173       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
4174  *) ac_file_in="${ac_file}.in" ;;
4175  esac
4176
4177  echo creating $ac_file
4178
4179  rm -f conftest.frag conftest.in conftest.out
4180  ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
4181  cat $ac_file_inputs > conftest.in
4182
4183EOF
4184
4185# Transform confdefs.h into a sed script conftest.vals that substitutes
4186# the proper values into config.h.in to produce config.h.  And first:
4187# Protect against being on the right side of a sed subst in config.status.
4188# Protect against being in an unquoted here document in config.status.
4189rm -f conftest.vals
4190cat > conftest.hdr <<\EOF
4191s/[\\&%]/\\&/g
4192s%[\\$`]%\\&%g
4193s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
4194s%ac_d%ac_u%gp
4195s%ac_u%ac_e%gp
4196EOF
4197sed -n -f conftest.hdr confdefs.h > conftest.vals
4198rm -f conftest.hdr
4199
4200# This sed command replaces #undef with comments.  This is necessary, for
4201# example, in the case of _POSIX_SOURCE, which is predefined and required
4202# on some systems where configure will not decide to define it.
4203cat >> conftest.vals <<\EOF
4204s%^[ 	]*#[ 	]*undef[ 	][ 	]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
4205EOF
4206
4207# Break up conftest.vals because some shells have a limit on
4208# the size of here documents, and old seds have small limits too.
4209
4210rm -f conftest.tail
4211while :
4212do
4213  ac_lines=`grep -c . conftest.vals`
4214  # grep -c gives empty output for an empty file on some AIX systems.
4215  if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
4216  # Write a limited-size here document to conftest.frag.
4217  echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
4218  sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
4219  echo 'CEOF
4220  sed -f conftest.frag conftest.in > conftest.out
4221  rm -f conftest.in
4222  mv conftest.out conftest.in
4223' >> $CONFIG_STATUS
4224  sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
4225  rm -f conftest.vals
4226  mv conftest.tail conftest.vals
4227done
4228rm -f conftest.vals
4229
4230cat >> $CONFIG_STATUS <<\EOF
4231  rm -f conftest.frag conftest.h
4232  echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
4233  cat conftest.in >> conftest.h
4234  rm -f conftest.in
4235  if cmp -s $ac_file conftest.h 2>/dev/null; then
4236    echo "$ac_file is unchanged"
4237    rm -f conftest.h
4238  else
4239    # Remove last slash and all that follows it.  Not all systems have dirname.
4240      ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
4241      if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
4242      # The file is in a subdirectory.
4243      test ! -d "$ac_dir" && mkdir "$ac_dir"
4244    fi
4245    rm -f $ac_file
4246    mv conftest.h $ac_file
4247  fi
4248fi; done
4249
4250EOF
4251
4252cat >> $CONFIG_STATUS <<EOF
4253ac_sources="src/$TARGETDIR/ffitarget.h"
4254ac_dests="include/ffitarget.h"
4255EOF
4256
4257cat >> $CONFIG_STATUS <<\EOF
4258srcdir=$ac_given_srcdir
4259while test -n "$ac_sources"; do
4260  set $ac_dests; ac_dest=$1; shift; ac_dests=$*
4261  set $ac_sources; ac_source=$1; shift; ac_sources=$*
4262
4263  echo "linking $srcdir/$ac_source to $ac_dest"
4264
4265  if test ! -r $srcdir/$ac_source; then
4266    { echo "configure: error: $srcdir/$ac_source: File not found" 1>&2; exit 1; }
4267  fi
4268  rm -f $ac_dest
4269
4270  # Make relative symlinks.
4271  # Remove last slash and all that follows it.  Not all systems have dirname.
4272  ac_dest_dir=`echo $ac_dest|sed 's%/[^/][^/]*$%%'`
4273  if test "$ac_dest_dir" != "$ac_dest" && test "$ac_dest_dir" != .; then
4274    # The dest file is in a subdirectory.
4275    test ! -d "$ac_dest_dir" && mkdir "$ac_dest_dir"
4276    ac_dest_dir_suffix="/`echo $ac_dest_dir|sed 's%^\./%%'`"
4277    # A "../" for each directory in $ac_dest_dir_suffix.
4278    ac_dots=`echo $ac_dest_dir_suffix|sed 's%/[^/]*%../%g'`
4279  else
4280    ac_dest_dir_suffix= ac_dots=
4281  fi
4282
4283  case "$srcdir" in
4284  [/$]*) ac_rel_source="$srcdir/$ac_source" ;;
4285  *) ac_rel_source="$ac_dots$srcdir/$ac_source" ;;
4286  esac
4287
4288  # Make a symlink if possible; otherwise try a hard link.
4289  if ln -s $ac_rel_source $ac_dest 2>/dev/null ||
4290    ln $srcdir/$ac_source $ac_dest; then :
4291  else
4292    { echo "configure: error: can not link $ac_dest to $srcdir/$ac_source" 1>&2; exit 1; }
4293  fi
4294done
4295EOF
4296cat >> $CONFIG_STATUS <<EOF
4297
4298srcdir=${srcdir}
4299host=${host}
4300target=${target}
4301with_multisubdir=${with_multisubdir}
4302ac_configure_args="${multilib_arg} ${ac_configure_args}"
4303CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
4304libffi_basedir=${libffi_basedir}
4305CC="${CC}"
4306DEFS="$DEFS"
4307ORIGINAL_LD_FOR_MULTILIBS="${ORIGINAL_LD_FOR_MULTILIBS}"
4308
4309# Make target subdirectories if required.
4310test -d src || mkdir src
4311test -d src/${TARGETDIR} || mkdir src/${TARGETDIR}
4312test -d include || mkdir include
4313
4314
4315
4316EOF
4317cat >> $CONFIG_STATUS <<\EOF
4318test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h
4319
4320if test -n "$CONFIG_FILES"; then
4321   LD="${ORIGINAL_LD_FOR_MULTILIBS}"
4322   ac_file=Makefile . ${srcdir}/${libffi_basedir}../config-ml.in
4323fi
4324
4325exit 0
4326EOF
4327chmod +x $CONFIG_STATUS
4328rm -fr confdefs* $ac_clean_files
4329test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
4330
4331