source: branches/libc-0.6/src/gcc/libffi/configure

Last change on this file was 1479, checked in by bird, 21 years ago

Joined gcc 3.3.4 with head.

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