OSDN Git Service

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