OSDN Git Service

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