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