OSDN Git Service

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