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