* config/tc-h8300.c (build_bytes): If an operand type is
[deliverable/binutils-gdb.git] / gas / configure
CommitLineData
833c46e1 1#! /bin/sh
fb589130 2
b11fb939 3# Guess values for system-dependent variables and create Makefiles.
df586de2
ILT
4# Generated automatically using autoconf version 2.10
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:
28d3e4a3 14ac_help="$ac_help
d7b2038f 15 --enable-bfd-assembler use BFD back end for writing object files"
e7757ad0
KR
16ac_help="$ac_help
17 targets alternative target configurations besides the primary"
1c9dbb83
ILT
18ac_help="$ac_help
19 --enable-shared build shared BFD library"
b11fb939 20
b11fb939
KR
21# Initialize some variables set by options.
22# The variables have the same names as the options, with
23# dashes changed to underlines.
24build=NONE
25cache_file=./config.cache
26exec_prefix=NONE
27host=NONE
28no_create=
29nonopt=NONE
bf111c9f 30no_recursion=
b11fb939 31prefix=NONE
bf111c9f
KR
32program_prefix=NONE
33program_suffix=NONE
ba49e48d 34program_transform_name=s,x,x,
b11fb939 35silent=
f2889110 36site=
b11fb939
KR
37srcdir=
38target=NONE
39verbose=
40x_includes=NONE
41x_libraries=NONE
1c9dbb83
ILT
42bindir='${exec_prefix}/bin'
43sbindir='${exec_prefix}/sbin'
44libexecdir='${exec_prefix}/libexec'
45datadir='${prefix}/share'
46sysconfdir='${prefix}/etc'
47sharedstatedir='${prefix}/com'
48localstatedir='${prefix}/var'
49libdir='${exec_prefix}/lib'
50includedir='${prefix}/include'
51oldincludedir='/usr/include'
52infodir='${prefix}/info'
53mandir='${prefix}/man'
b11fb939
KR
54
55# Initialize some other variables.
56subdirs=
1c9dbb83 57MFLAGS= MAKEFLAGS=
b11fb939
KR
58
59ac_prev=
60for ac_option
61do
62
63 # If the previous option needs an argument, assign it.
64 if test -n "$ac_prev"; then
65 eval "$ac_prev=\$ac_option"
66 ac_prev=
67 continue
68 fi
69
70 case "$ac_option" in
71 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
72 *) ac_optarg= ;;
73 esac
74
bf111c9f 75 # Accept the important Cygnus configure options, so we can diagnose typos.
b11fb939
KR
76
77 case "$ac_option" in
78
1c9dbb83
ILT
79 -bindir | --bindir | --bindi | --bind | --bin | --bi)
80 ac_prev=bindir ;;
81 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
82 bindir="$ac_optarg" ;;
83
84 -build | --build | --buil | --bui | --bu)
b11fb939 85 ac_prev=build ;;
1c9dbb83 86 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
b11fb939
KR
87 build="$ac_optarg" ;;
88
89 -cache-file | --cache-file | --cache-fil | --cache-fi \
90 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
91 ac_prev=cache_file ;;
92 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
93 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
94 cache_file="$ac_optarg" ;;
95
1c9dbb83
ILT
96 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
97 ac_prev=datadir ;;
98 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
99 | --da=*)
100 datadir="$ac_optarg" ;;
101
b11fb939
KR
102 -disable-* | --disable-*)
103 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
104 # Reject names that are not valid shell variable names.
105 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
ba49e48d 106 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
b11fb939
KR
107 fi
108 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
109 eval "enable_${ac_feature}=no" ;;
110
111 -enable-* | --enable-*)
112 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
113 # Reject names that are not valid shell variable names.
114 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
ba49e48d 115 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
b11fb939
KR
116 fi
117 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
118 case "$ac_option" in
119 *=*) ;;
120 *) ac_optarg=yes ;;
121 esac
122 eval "enable_${ac_feature}='$ac_optarg'" ;;
123
124 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
125 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
126 | --exec | --exe | --ex)
127 ac_prev=exec_prefix ;;
128 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
129 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
130 | --exec=* | --exe=* | --ex=*)
131 exec_prefix="$ac_optarg" ;;
132
133 -gas | --gas | --ga | --g)
134 # Obsolete; use --with-gas.
135 with_gas=yes ;;
136
137 -help | --help | --hel | --he)
f1698cb7
KR
138 # Omit some internal or obsolete options to make the list less imposing.
139 # This message is too long to be a string in the A/UX 3.1 sh.
b11fb939 140 cat << EOF
f1698cb7
KR
141Usage: configure [options] [host]
142Options: [defaults in brackets after descriptions]
143Configuration:
144 --cache-file=FILE cache test results in FILE
145 --help print this message
146 --no-create do not create output files
147 --quiet, --silent do not print \`checking...' messages
148 --version print the version of autoconf that created configure
149Directory and file names:
150 --prefix=PREFIX install architecture-independent files in PREFIX
151 [$ac_default_prefix]
1c9dbb83 152 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
f1698cb7 153 [same as prefix]
1c9dbb83
ILT
154 --bindir=DIR user executables in DIR [EPREFIX/bin]
155 --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
156 --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
157 --datadir=DIR read-only architecture-independent data in DIR
158 [PREFIX/share]
159 --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
160 --sharedstatedir=DIR modifiable architecture-independent data in DIR
161 [PREFIX/com]
162 --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
163 --libdir=DIR object code libraries in DIR [EPREFIX/lib]
164 --includedir=DIR C header files in DIR [PREFIX/include]
165 --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
166 --infodir=DIR info documentation in DIR [PREFIX/info]
167 --mandir=DIR man documentation in DIR [PREFIX/man]
f1698cb7
KR
168 --srcdir=DIR find the sources in DIR [configure dir or ..]
169 --program-prefix=PREFIX prepend PREFIX to installed program names
170 --program-suffix=SUFFIX append SUFFIX to installed program names
1c9dbb83
ILT
171 --program-transform-name=PROGRAM
172 run sed PROGRAM on installed program names
173EOF
174 cat << EOF
f1698cb7
KR
175Host type:
176 --build=BUILD configure for building on BUILD [BUILD=HOST]
177 --host=HOST configure for HOST [guessed]
178 --target=TARGET configure for TARGET [TARGET=HOST]
179Features and packages:
180 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
181 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
182 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
183 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
184 --x-includes=DIR X include files are in DIR
185 --x-libraries=DIR X library files are in DIR
b11fb939 186EOF
1c9dbb83
ILT
187 if test -n "$ac_help"; then
188 echo "--enable and --with options recognized:$ac_help"
189 fi
b11fb939
KR
190 exit 0 ;;
191
192 -host | --host | --hos | --ho)
193 ac_prev=host ;;
194 -host=* | --host=* | --hos=* | --ho=*)
195 host="$ac_optarg" ;;
196
1c9dbb83
ILT
197 -includedir | --includedir | --includedi | --included | --include \
198 | --includ | --inclu | --incl | --inc)
199 ac_prev=includedir ;;
200 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
201 | --includ=* | --inclu=* | --incl=* | --inc=*)
202 includedir="$ac_optarg" ;;
203
204 -infodir | --infodir | --infodi | --infod | --info | --inf)
205 ac_prev=infodir ;;
206 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
207 infodir="$ac_optarg" ;;
208
209 -libdir | --libdir | --libdi | --libd)
210 ac_prev=libdir ;;
211 -libdir=* | --libdir=* | --libdi=* | --libd=*)
212 libdir="$ac_optarg" ;;
213
214 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
215 | --libexe | --libex | --libe)
216 ac_prev=libexecdir ;;
217 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
218 | --libexe=* | --libex=* | --libe=*)
219 libexecdir="$ac_optarg" ;;
220
221 -localstatedir | --localstatedir | --localstatedi | --localstated \
222 | --localstate | --localstat | --localsta | --localst \
223 | --locals | --local | --loca | --loc | --lo)
224 ac_prev=localstatedir ;;
225 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
226 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
227 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
228 localstatedir="$ac_optarg" ;;
229
230 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
231 ac_prev=mandir ;;
232 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
233 mandir="$ac_optarg" ;;
234
b11fb939
KR
235 -nfp | --nfp | --nf)
236 # Obsolete; use --without-fp.
237 with_fp=no ;;
238
239 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
240 | --no-cr | --no-c)
241 no_create=yes ;;
242
bf111c9f
KR
243 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
244 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
245 no_recursion=yes ;;
b11fb939 246
1c9dbb83
ILT
247 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
248 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
249 | --oldin | --oldi | --old | --ol | --o)
250 ac_prev=oldincludedir ;;
251 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
252 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
253 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
254 oldincludedir="$ac_optarg" ;;
255
b11fb939
KR
256 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
257 ac_prev=prefix ;;
258 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
259 prefix="$ac_optarg" ;;
260
261 -program-prefix | --program-prefix | --program-prefi | --program-pref \
262 | --program-pre | --program-pr | --program-p)
263 ac_prev=program_prefix ;;
264 -program-prefix=* | --program-prefix=* | --program-prefi=* \
265 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
266 program_prefix="$ac_optarg" ;;
267
268 -program-suffix | --program-suffix | --program-suffi | --program-suff \
269 | --program-suf | --program-su | --program-s)
270 ac_prev=program_suffix ;;
271 -program-suffix=* | --program-suffix=* | --program-suffi=* \
272 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
273 program_suffix="$ac_optarg" ;;
274
275 -program-transform-name | --program-transform-name \
276 | --program-transform-nam | --program-transform-na \
277 | --program-transform-n | --program-transform- \
278 | --program-transform | --program-transfor \
279 | --program-transfo | --program-transf \
280 | --program-trans | --program-tran \
281 | --progr-tra | --program-tr | --program-t)
282 ac_prev=program_transform_name ;;
283 -program-transform-name=* | --program-transform-name=* \
284 | --program-transform-nam=* | --program-transform-na=* \
285 | --program-transform-n=* | --program-transform-=* \
286 | --program-transform=* | --program-transfor=* \
287 | --program-transfo=* | --program-transf=* \
288 | --program-trans=* | --program-tran=* \
289 | --progr-tra=* | --program-tr=* | --program-t=*)
bf111c9f 290 program_transform_name="$ac_optarg" ;;
b11fb939
KR
291
292 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
293 | -silent | --silent | --silen | --sile | --sil)
294 silent=yes ;;
295
1c9dbb83
ILT
296 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
297 ac_prev=sbindir ;;
298 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
299 | --sbi=* | --sb=*)
300 sbindir="$ac_optarg" ;;
301
302 -sharedstatedir | --sharedstatedir | --sharedstatedi \
303 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
304 | --sharedst | --shareds | --shared | --share | --shar \
305 | --sha | --sh)
306 ac_prev=sharedstatedir ;;
307 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
308 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
309 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
310 | --sha=* | --sh=*)
311 sharedstatedir="$ac_optarg" ;;
312
f2889110
KR
313 -site | --site | --sit)
314 ac_prev=site ;;
315 -site=* | --site=* | --sit=*)
316 site="$ac_optarg" ;;
317
b11fb939
KR
318 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
319 ac_prev=srcdir ;;
320 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
321 srcdir="$ac_optarg" ;;
322
1c9dbb83
ILT
323 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
324 | --syscon | --sysco | --sysc | --sys | --sy)
325 ac_prev=sysconfdir ;;
326 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
327 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
328 sysconfdir="$ac_optarg" ;;
329
b11fb939
KR
330 -target | --target | --targe | --targ | --tar | --ta | --t)
331 ac_prev=target ;;
332 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
333 target="$ac_optarg" ;;
334
335 -v | -verbose | --verbose | --verbos | --verbo | --verb)
336 verbose=yes ;;
337
338 -version | --version | --versio | --versi | --vers)
df586de2 339 echo "configure generated by autoconf version 2.10"
b11fb939
KR
340 exit 0 ;;
341
342 -with-* | --with-*)
343 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
344 # Reject names that are not valid shell variable names.
345 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
ba49e48d 346 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
b11fb939
KR
347 fi
348 ac_package=`echo $ac_package| sed 's/-/_/g'`
349 case "$ac_option" in
350 *=*) ;;
351 *) ac_optarg=yes ;;
352 esac
353 eval "with_${ac_package}='$ac_optarg'" ;;
354
355 -without-* | --without-*)
356 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
357 # Reject names that are not valid shell variable names.
358 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
ba49e48d 359 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
b11fb939
KR
360 fi
361 ac_package=`echo $ac_package| sed 's/-/_/g'`
362 eval "with_${ac_package}=no" ;;
363
364 --x)
365 # Obsolete; use --with-x.
366 with_x=yes ;;
367
368 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
369 | --x-incl | --x-inc | --x-in | --x-i)
370 ac_prev=x_includes ;;
371 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
372 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
373 x_includes="$ac_optarg" ;;
374
375 -x-libraries | --x-libraries | --x-librarie | --x-librari \
376 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
377 ac_prev=x_libraries ;;
378 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
379 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
380 x_libraries="$ac_optarg" ;;
381
ba49e48d 382 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
b11fb939
KR
383 ;;
384
1c9dbb83 385 *)
b11fb939
KR
386 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
387 echo "configure: warning: $ac_option: invalid host type" 1>&2
388 fi
389 if test "x$nonopt" != xNONE; then
ba49e48d 390 { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
b11fb939
KR
391 fi
392 nonopt="$ac_option"
393 ;;
394
395 esac
396done
397
398if test -n "$ac_prev"; then
ba49e48d 399 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
b11fb939
KR
400fi
401
833c46e1 402trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
b11fb939
KR
403
404# File descriptor usage:
833c46e1 405# 0 standard input
b11fb939
KR
406# 1 file creation
407# 2 errors and warnings
833c46e1
KR
408# 3 some systems may open it to /dev/tty
409# 4 used on the Kubota Titan
410# 6 checking for... messages and results
b11fb939
KR
411# 5 compiler messages saved in config.log
412if test "$silent" = yes; then
833c46e1 413 exec 6>/dev/null
b11fb939 414else
833c46e1 415 exec 6>&1
b11fb939
KR
416fi
417exec 5>./config.log
418
419echo "\
420This file contains any messages produced by compilers while
421running configure, to aid debugging if configure makes a mistake.
422" 1>&5
423
bf111c9f 424# Strip out --no-create and --no-recursion so they do not pile up.
e23b25ec
KR
425# Also quote any args containing shell metacharacters.
426ac_configure_args=
427for ac_arg
428do
b11fb939
KR
429 case "$ac_arg" in
430 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
431 | --no-cr | --no-c) ;;
bf111c9f
KR
432 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
433 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
e23b25ec
KR
434 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
435 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
436 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
b11fb939
KR
437 esac
438done
439
440# NLS nuisances.
441# Only set LANG and LC_ALL to C if already set.
442# These must not be set unconditionally because not all systems understand
443# e.g. LANG=C (notably SCO).
444if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
445if test "${LANG+set}" = set; then LANG=C; export LANG; fi
446
447# confdefs.h avoids OS command line length limits that DEFS can exceed.
448rm -rf conftest* confdefs.h
449# AIX cpp loses on an empty file, so make sure it contains at least a newline.
450echo > confdefs.h
451
452# A filename unique to this package, relative to the directory that
453# configure is in, which we can look for to find out if srcdir is correct.
454ac_unique_file=as.h
455
456# Find the source files, if location was not specified.
457if test -z "$srcdir"; then
458 ac_srcdir_defaulted=yes
459 # Try the directory containing this script, then its parent.
460 ac_prog=$0
461 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
462 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
463 srcdir=$ac_confdir
464 if test ! -r $srcdir/$ac_unique_file; then
465 srcdir=..
466 fi
467else
468 ac_srcdir_defaulted=no
469fi
470if test ! -r $srcdir/$ac_unique_file; then
471 if test "$ac_srcdir_defaulted" = yes; then
ba49e48d 472 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
b11fb939 473 else
ba49e48d 474 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
b11fb939
KR
475 fi
476fi
f2889110 477srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
b11fb939
KR
478
479# Prefer explicitly selected file to automatically selected ones.
bf111c9f 480if test -z "$CONFIG_SITE"; then
b11fb939 481 if test "x$prefix" != xNONE; then
f2889110 482 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
b11fb939 483 else
f2889110 484 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
b11fb939
KR
485 fi
486fi
487for ac_site_file in $CONFIG_SITE; do
488 if test -r "$ac_site_file"; then
489 echo "loading site script $ac_site_file"
490 . "$ac_site_file"
491 fi
492done
493
494if test -r "$cache_file"; then
495 echo "loading cache $cache_file"
496 . $cache_file
497else
498 echo "creating cache $cache_file"
499 > $cache_file
500fi
501
502ac_ext=c
503# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
d0352cbb
DE
504ac_cpp='$CPP $CPPFLAGS'
505ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
506ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
b11fb939 507
bf111c9f
KR
508if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
509 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
510 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
511 ac_n= ac_c='
512' ac_t=' '
513 else
514 ac_n=-n ac_c= ac_t=
515 fi
516else
517 ac_n= ac_c='\c' ac_t=
518fi
519
318b02b6 520user_bfd_gas=
b11fb939 521# Check whether --enable-bfd-assembler or --disable-bfd-assembler was given.
1c9dbb83
ILT
522if test "${enable_bfd_assembler+set}" = set; then
523 enableval="$enable_bfd_assembler"
b11fb939 524 case "${enableval}" in
318b02b6
KR
525 yes) need_bfd=yes user_bfd_gas=yes ;;
526 no) user_bfd_gas=no ;;
ba49e48d 527 *) { echo "configure: error: bad value ${enableval} given for bfd-assembler option" 1>&2; exit 1; } ;;
b11fb939
KR
528esac
529fi
e7757ad0 530# Check whether --enable-targets or --disable-targets was given.
1c9dbb83
ILT
531if test "${enable_targets+set}" = set; then
532 enableval="$enable_targets"
e7757ad0
KR
533 case "${enableval}" in
534 yes | "") { echo "configure: error: enable-targets option must specify target names or 'all'" 1>&2; exit 1; }
535 ;;
536 no) enable_targets= ;;
537 *) enable_targets=$enableval ;;
538esac
539fi
1c9dbb83
ILT
540# Check whether --enable-shared or --disable-shared was given.
541if test "${enable_shared+set}" = set; then
542 enableval="$enable_shared"
543 case "${enableval}" in
159e6ef8 544 yes) shared=true shared_bfd=true shared_opcodes=true ;;
1c9dbb83 545 no) shared=false ;;
159e6ef8
MM
546 *bfd*opcodes*) shared=true shared_bfd=true shared_opcodes=true ;;
547 *opcodes*bfd*) shared=true shared_bfd=true shared_opcodes=true ;;
548 *bfd*) shared=true shared_bfd=true ;;
549 *opcodes*) shared=true shared_opcodes=true ;;
550 *) shared=false ;;
1c9dbb83
ILT
551esac
552fi
b11fb939
KR
553
554# Generate a header file -- gets more post-processing by Makefile later.
555
556
557ac_aux_dir=
28d3e4a3 558for ac_dir in `cd $srcdir;pwd`/.. $srcdir/`cd $srcdir;pwd`/..; do
e23b25ec
KR
559 if test -f $ac_dir/install-sh; then
560 ac_aux_dir=$ac_dir
28d3e4a3 561 ac_install_sh="$ac_aux_dir/install-sh -c"
e23b25ec
KR
562 break
563 elif test -f $ac_dir/install.sh; then
564 ac_aux_dir=$ac_dir
28d3e4a3 565 ac_install_sh="$ac_aux_dir/install.sh -c"
e23b25ec 566 break
b11fb939
KR
567 fi
568done
569if test -z "$ac_aux_dir"; then
ba49e48d 570 { echo "configure: error: can not find install-sh or install.sh in `cd $srcdir;pwd`/.. $srcdir/`cd $srcdir;pwd`/.." 1>&2; exit 1; }
b11fb939 571fi
28d3e4a3
KR
572ac_config_guess=$ac_aux_dir/config.guess
573ac_config_sub=$ac_aux_dir/config.sub
574ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
b11fb939 575
fb589130 576
b11fb939
KR
577# Do some error checking and defaulting for the host and target type.
578# The inputs are:
579# configure --host=HOST --target=TARGET --build=BUILD NONOPT
580#
581# The rules are:
582# 1. You are not allowed to specify --host, --target, and nonopt at the
1c9dbb83 583# same time.
b11fb939
KR
584# 2. Host defaults to nonopt.
585# 3. If nonopt is not specified, then host defaults to the current host,
586# as determined by config.guess.
f2889110
KR
587# 4. Target and build default to nonopt.
588# 5. If nonopt is not specified, then target and build default to host.
b11fb939
KR
589
590# The aliases save the names the user supplied, while $host etc.
591# will get canonicalized.
592case $host---$target---$nonopt in
593NONE---*---* | *---NONE---* | *---*---NONE) ;;
ba49e48d 594*) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
b11fb939
KR
595esac
596
e23b25ec 597
b11fb939 598# Make sure we can run config.sub.
28d3e4a3 599if $ac_config_sub sun4 >/dev/null 2>&1; then :
ba49e48d 600else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
b11fb939
KR
601fi
602
833c46e1 603echo $ac_n "checking host system type""... $ac_c" 1>&6
b11fb939
KR
604
605host_alias=$host
28d3e4a3 606case "$host_alias" in
b11fb939
KR
607NONE)
608 case $nonopt in
609 NONE)
28d3e4a3 610 if host_alias=`$ac_config_guess`; then :
ba49e48d 611 else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
b11fb939
KR
612 fi ;;
613 *) host_alias=$nonopt ;;
614 esac ;;
615esac
616
28d3e4a3 617host=`$ac_config_sub $host_alias`
b11fb939
KR
618host_cpu=`echo $host | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\1/'`
619host_vendor=`echo $host | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\2/'`
620host_os=`echo $host | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\3/'`
833c46e1 621echo "$ac_t""$host" 1>&6
b11fb939 622
833c46e1 623echo $ac_n "checking target system type""... $ac_c" 1>&6
b11fb939
KR
624
625target_alias=$target
28d3e4a3 626case "$target_alias" in
b11fb939
KR
627NONE)
628 case $nonopt in
629 NONE) target_alias=$host_alias ;;
630 *) target_alias=$nonopt ;;
631 esac ;;
632esac
633
28d3e4a3 634target=`$ac_config_sub $target_alias`
b11fb939
KR
635target_cpu=`echo $target | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\1/'`
636target_vendor=`echo $target | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\2/'`
637target_os=`echo $target | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\3/'`
833c46e1 638echo "$ac_t""$target" 1>&6
b11fb939 639
833c46e1 640echo $ac_n "checking build system type""... $ac_c" 1>&6
b11fb939
KR
641
642build_alias=$build
28d3e4a3 643case "$build_alias" in
f2889110
KR
644NONE)
645 case $nonopt in
646 NONE) build_alias=$host_alias ;;
647 *) build_alias=$nonopt ;;
648 esac ;;
649esac
650
28d3e4a3 651build=`$ac_config_sub $build_alias`
b11fb939
KR
652build_cpu=`echo $build | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\1/'`
653build_vendor=`echo $build | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\2/'`
654build_os=`echo $build | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\3/'`
833c46e1 655echo "$ac_t""$build" 1>&6
b11fb939 656
28d3e4a3
KR
657test "$host_alias" != "$target_alias" &&
658 test "$program_prefix$program_suffix$program_transform_name" = \
833c46e1
KR
659 NONENONEs,x,x, &&
660 program_prefix=${target_alias}-
b11fb939 661
ba49e48d
KR
662if test "$program_transform_name" = s,x,x,; then
663 program_transform_name=
664else
1c9dbb83
ILT
665 # Double any \ or $. echo might interpret backslashes.
666 cat <<\EOF_SED > conftestsed
667s,\\,\\\\,g; s,\$,$$,g
668EOF_SED
28d3e4a3 669 program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
bf111c9f 670 rm -f conftestsed
318b02b6 671fi
28d3e4a3
KR
672test "$program_prefix" != NONE &&
673 program_transform_name="s,^,${program_prefix},; $program_transform_name"
bf111c9f 674# Use a double $ so make ignores it.
28d3e4a3
KR
675test "$program_suffix" != NONE &&
676 program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
318b02b6 677
bf111c9f 678# sed with no file args requires a program.
28d3e4a3 679test "$program_transform_name" = "" && program_transform_name="s,x,x,"
318b02b6 680
b11fb939 681
e7757ad0 682te_file=generic
b11fb939 683
e7757ad0
KR
684canon_targets=""
685if test -n "$enable_targets" ; then
686 for t in `echo $enable_targets | sed 's/,/ /g'`; do
687 result=`$ac_config_sub $t 2>/dev/null`
688 if test -n "$result" ; then
689 canon_targets="$canon_targets $result"
690# else
691# # Permit "all", etc. We don't support it yet though.
692# canon_targets="$canon_targets $t"
693 fi
694 done
695 _gas_uniq_list="$canon_targets"
696_gas_uniq_newlist=""
697for _gas_uniq_i in _gas_uniq_dummy $_gas_uniq_list ; do
698 case $_gas_uniq_i in
699 _gas_uniq_dummy) ;;
700 *) case " $_gas_uniq_newlist " in
701 *" $_gas_uniq_i "*) ;;
702 *) _gas_uniq_newlist="$_gas_uniq_newlist $_gas_uniq_i" ;;
703 esac ;;
704 esac
705done
706canon_targets=$_gas_uniq_newlist
b11fb939 707
e7757ad0 708fi
b11fb939 709
e7757ad0
KR
710emulations=""
711
712for this_target in $target $canon_targets ; do
713
714 eval `echo $this_target | sed 's/^\(.*\)-\(.*\)-\(.*\)$/cpu=\1 vendor=\2 os=\3/'`
715
716 # check for architecture variants
717 case ${cpu} in
ae09d880
ILT
718 armeb) cpu_type=arm endian=big ;;
719 arm*) cpu_type=arm endian=little ;;
e7757ad0 720 hppa*) cpu_type=hppa ;;
7c2fadd1 721 i[456]86) cpu_type=i386 ;;
e7757ad0
KR
722 m680[012346]0) cpu_type=m68k ;;
723 m68008) cpu_type=m68k ;;
724 m683??) cpu_type=m68k ;;
725 m8*) cpu_type=m88k ;;
726 mips*el) cpu_type=mips endian=little;;
727 mips*) cpu_type=mips endian=big ;;
728 powerpcle*) cpu_type=ppc endian=little ;;
729 powerpc*) cpu_type=ppc endian=big ;;
730 rs6000*) cpu_type=ppc ;;
6df07e7f 731 sparc64) cpu_type=sparc want_sparc_v9=true ;;
63e4edb5 732 sparc*) cpu_type=sparc ;;
a1c7c0f3 733 *) cpu_type=${cpu} ;;
e7757ad0
KR
734 esac
735
736 if test ${this_target} = $target ; then
737 target_cpu_type=${cpu_type}
738 elif test ${target_cpu_type} != ${cpu_type} ; then
739 continue
740 fi
741
742 targ=${cpu_type}
743 generic_target=${cpu_type}-$vendor-$os
744 dev=no
745 bfd_gas=no
746 em=generic
747
748 # assign object format
749 case ${generic_target} in
805e36ab 750 a29k-*-coff) fmt=coff targ=ebmon29k ;;
e7757ad0
KR
751 a29k-amd-udi) fmt=coff targ=ebmon29k ;;
752 a29k-amd-ebmon) fmt=coff targ=ebmon29k ;;
880b7429 753 a29k-nyu-sym1) fmt=coff targ=ebmon29k ;;
e7757ad0
KR
754 a29k-*-vxworks*) fmt=coff ;;
755
756 alpha-*-netware*) fmt=ecoff ;;
757 alpha-*-osf*) fmt=ecoff ;;
df586de2
ILT
758 alpha-*-linuxecoff*) fmt=ecoff ;;
759 alpha-*-linux*) fmt=elf em=linux ;;
b11fb939 760
4181c985 761# start-sanitize-arc
e7757ad0 762 arc-*-elf*) fmt=elf bfd_gas=yes ;;
4181c985
KR
763# end-sanitize-arc
764
a1c7c0f3 765 arm-*-riscix*) fmt=aout targ=arm-lit ;;
1cb0d00d
KR
766 arm-*-aout) fmt=aout
767 case "$endian" in
768 big) targ=arm-big ;;
769 *) targ=arm-lit ;;
770 esac
771 ;;
8de16e56 772 arm-*-coff) fmt=coff ;;
e7757ad0 773 arm-*-riscix*) fmt=aout ;;
1cb0d00d 774 arm-*-pe) fmt=coff targ=armcoff em=pe ;;
e7757ad0
KR
775
776 hppa-*-*elf*) fmt=elf em=hppa ;;
777 hppa-*-lites*) fmt=elf em=hppa ;;
778 hppa-*-osf*) fmt=som em=hppa ;;
779 hppa-*-hpux*) fmt=som em=hppa ;;
780 hppa-*-bsd*) fmt=som em=hppa ;;
781 hppa-*-hiux*) fmt=som em=hppa ;;
782
783 h8300-*-coff) fmt=coff ;;
784
785 i386-ibm-aix*) fmt=coff targ=i386coff
786 em=i386aix ;;
787 i386-*-bsd*) fmt=aout em=386bsd ;;
788 i386-*-netbsd0.8) fmt=aout em=386bsd ;;
789 i386-*-netbsd*) fmt=aout em=nbsd bfd_gas=yes;;
a1c7c0f3 790 i386-*-linux*aout* | i386-*-linuxoldld) fmt=aout em=linux ;;
e7757ad0
KR
791 i386-*-linux*coff*) fmt=coff em=linux
792 targ=i386coff ;;
793 i386-*-linux*) fmt=elf em=linux ;;
794 i386-*-lynxos*) fmt=coff targ=i386coff
795 em=lynx ;;
2ae5f50b 796 i386-*-sysv4* | i386-*-solaris* | i386-*-elf | i386-*-freebsdelf*)
e7757ad0 797 fmt=elf ;;
66b935da 798 i386-*-sco*elf*) fmt=elf targ=sco5 ;;
e7757ad0
KR
799 i386-*-coff | i386-*-sysv* | i386-*-sco* | i386-*-isc*)
800 fmt=coff targ=i386coff ;;
801 i386-*-vsta) fmt=aout ;;
802 i386-*-go32) fmt=coff targ=i386coff ;;
6c186c48
SC
803 i386-*-gnu*) fmt=elf ;;
804 i386-*-mach*)
e7757ad0
KR
805 fmt=aout em=mach bfd_gas=yes ;;
806 i386-*-msdos*) fmt=aout ;;
6c186c48 807 i386-*-moss*) fmt=elf ;;
d0352cbb
DE
808 i386-*-pe) fmt=coff targ=i386coff em=pe ;;
809 i386-*-cygwin32) fmt=coff targ=i386coff em=pe ;;
810 i386-*-*nt) fmt=coff targ=i386coff em=pe ;;
e7757ad0
KR
811 i960-*-bout) fmt=bout ;;
812 i960-*-coff) fmt=coff em=ic960 targ=ic960coff ;;
813 i960-*-nindy*) fmt=bout ;;
814 i960-*-vxworks4*) fmt=bout ;;
815 i960-*-vxworks5.0) fmt=bout ;;
816 i960-*-vxworks5.*) fmt=coff em=ic960 targ=ic960coff ;;
817 i960-*-vxworks*) fmt=bout ;;
818
819 m68k-*-vxworks* | m68k-ericsson-ose | m68k-*-sunos*)
820 fmt=aout em=sun3 ;;
880b7429 821 m68k-motorola-sysv*) fmt=coff targ=m68kcoff em=delta ;;
e7757ad0
KR
822 m68k-bull-sysv3*) fmt=coff targ=m68kcoff em=dpx2 ;;
823 m68k-apollo-*) fmt=coff targ=apollo em=apollo ;;
9d5aef80
KR
824 m68k-*-sysv4 | m68k-*-elf) # must be before -sysv*
825 fmt=elf ;;
e7757ad0
KR
826 m68k-*-coff | m68k-*-sysv*)
827 fmt=coff targ=m68kcoff ;;
e7757ad0 828 m68k-*-hpux*) fmt=hp300 em=hp300 ;;
535cfd0f
ILT
829 m68k-*-linux*aout*) fmt=aout em=linux ;;
830 m68k-*-linux*) fmt=elf em=linux ;;
e7757ad0
KR
831 m68k-*-lynxos*) fmt=coff targ=m68kcoff
832 em=lynx ;;
833 m68k-*-netbsd*) fmt=aout em=nbsd bfd_gas=yes ;;
2b37714a
ILT
834 m68k-apple-aux*) fmt=coff targ=m68kcoff em=aux ;;
835 m68k-*-psos*) fmt=elf em=psos;;
e7757ad0 836
880b7429 837 m88k-motorola-sysv3*) fmt=coff targ=m88kcoff em=delt88 ;;
e7757ad0
KR
838 m88k-*-coff*) fmt=coff targ=m88kcoff ;;
839
840 # don't change em like *-*-bsd does
4cbbec31 841 mips-dec-netbsd*) fmt=elf targ=mips-lit endian=little ;;
e7757ad0
KR
842 mips-dec-bsd*) fmt=aout targ=mips-lit ;;
843 mips-sony-bsd*) fmt=ecoff targ=mips-big ;;
844 mips-*-bsd*) { echo "configure: error: Unknown vendor for mips-bsd configuration." 1>&2; exit 1; } ;;
70f4dbce 845 mips-*-ultrix*) fmt=ecoff targ=mips-lit endian=little ;;
e7757ad0
KR
846 mips-*-ecoff*) fmt=ecoff
847 case "$endian" in
848 big) targ=mips-big ;;
849 *) targ=mips-lit ;;
850 esac
851 ;;
852 mips-*-ecoff*) fmt=ecoff targ=mips-big ;;
853 mips-*-gnu*) fmt=aout
854 case "$endian" in
855 big) targ=mips-big ;;
856 *) targ=mips-lit ;;
857 esac
858 ;;
859 mips-*-irix5*) fmt=elf targ=mips-big ;;
860 mips-*-irix*) fmt=ecoff targ=mips-big ;;
861 mips-*-riscos*) fmt=ecoff targ=mips-big ;;
862 mips-*-sysv*) fmt=ecoff targ=mips-big ;;
863 mips-*-elf*) fmt=elf
864 case "$endian" in
865 big) targ=mips-big ;;
866 *) targ=mips-lit ;;
867 esac
868 ;;
0ff513d9
SC
869 ppc-*-pe | ppc-*-cygwin32 | ppc-*-winnt*)
870 fmt=coff em=pe
85cc2190
KK
871 case "$endian" in
872 big) targ=ppc-big ;;
873 *) targ=ppc-lit ;;
874 esac
875 ;;
e7757ad0
KR
876 ppc-*-aix*) fmt=coff ;;
877 ppc-*-elf* | ppc-*-eabi* | ppc-*-sysv4*)
878 fmt=elf
879 case "$endian" in
880 big) targ=ppc-big ;;
881 *) targ=ppc-lit ;;
882 esac
883 ;;
159e6ef8
MM
884 ppc-*-linux*) fmt=elf
885 case "$endian" in
886 big) targ=ppc-big ;;
887 *) { echo "configure: error: Linux must be configured big endian" 1>&2; exit 1; } ;;
888 esac
889 ;;
890 ppc-*-solaris*) fmt=elf
891 case "$endian" in
892 big) { echo "configure: error: Solaris must be configured little endian" 1>&2; exit 1; } ;;
893 *) targ=ppc-sol ;;
894 esac
895 ;;
880b7429
KR
896 ppc-*-macos* | ppc-*-mpw*)
897 fmt=coff em=macos ;;
e7757ad0
KR
898 ppc-*-netware*) fmt=elf em=ppcnw ;;
899
900 sh-*-coff) fmt=coff ;;
b11fb939 901
5f757edc
ILT
902 ns32k-pc532-mach* | ns32k-pc532-ux*) fmt=aout em=pc532mach ;;
903 ns32k-pc532-netbsd* | ns32k-pc532-lites*) fmt=aout em=nbsd532 ;;
e7757ad0
KR
904
905 sparc-*-sunos4*) fmt=aout em=sun3 ;;
df586de2 906 sparc-*-aout | sparc*-*-vxworks*)
e7757ad0
KR
907 fmt=aout ;;
908 sparc-*-coff) fmt=coff ;;
909 sparc-*-lynxos*) fmt=coff em=lynx ;;
910 sparc-fujitsu-none) fmt=aout ;;
d0352cbb 911 sparc-*-elf | sparc-*-solaris*)
e7757ad0
KR
912 fmt=elf ;;
913 sparc-*-netbsd*) fmt=aout em=nbsd bfd_gas=yes ;;
914
915 vax-*-bsd* | vax-*-ultrix*)
916 fmt=aout ;;
917 vax-*-vms) fmt=vms ;;
918
919 z8k-*-coff | z8k-*-sim)
920 fmt=coff ;;
921
922 w65-*-*) fmt=coff ;;
923
924 *-*-aout | *-*-scout)
925 fmt=aout ;;
926 *-*-nindy*)
927 fmt=bout ;;
928 *-*-bsd*)
929 fmt=aout em=sun3 ;;
930 *-*-generic) fmt=generic ;;
931 *-*-xray | *-*-hms) fmt=coff ;;
932 *-*-sim) fmt=coff ;;
933 *-*-elf | *-*-sysv4* | *-*-solaris*)
6df07e7f 934 echo "configure: warning: GAS support for ${generic_target} is incomplete." 1>&2
e7757ad0
KR
935 fmt=elf dev=yes ;;
936 *-*-vxworks) fmt=aout ;;
937 *-*-netware) fmt=elf ;;
938 esac
939
940 case ${cpu_type}-${fmt} in
df586de2 941 alpha-*) bfd_gas=yes ;;
e7757ad0
KR
942 arm-*) bfd_gas=yes ;;
943 # not yet
944 # i386-aout) bfd_gas=preferred ;;
945 mips-*) bfd_gas=yes ;;
946 ns32k-*) bfd_gas=yes ;;
947 ppc-*) bfd_gas=yes ;;
948 sparc-*) bfd_gas=yes ;;
949 *-elf) bfd_gas=yes ;;
950 *-ecoff) bfd_gas=yes ;;
951 *-som) bfd_gas=yes ;;
952 *) ;;
953 esac
954
5f757edc
ILT
955# Other random stuff.
956
ae09d880
ILT
957 # do we need the opcodes library?
958 case ${cpu_type} in
df586de2 959 vax | i386)
7c2fadd1
ILT
960 ;;
961 *)
962 need_opcodes=yes
159e6ef8 963 if test "${shared_opcodes}" = "true"; then
7c2fadd1
ILT
964 # A shared libopcodes must be linked against libbfd.
965 need_bfd=yes
966 fi
967 ;;
ae09d880
ILT
968 esac
969
6df07e7f
DE
970 test -n "$want_sparc_v9" && cat >> confdefs.h <<\EOF
971#define SPARC_V9 1
5f757edc
ILT
972EOF
973
974
6df07e7f
DE
975 case ${cpu}-${vendor}-${os} in
976 sparc64-*-elf*) cat >> confdefs.h <<\EOF
977#define SPARC_ARCH64 1
978EOF
979 ;;
980 esac
981
5f757edc 982 case ${cpu_type} in
1c9dbb83
ILT
983 m68k)
984 case ${extra_objects} in
985 *m68k-parse.o*) ;;
986 *) extra_objects="$extra_objects m68k-parse.o" ;;
987 esac
988 ;;
5f757edc
ILT
989 esac
990
e7757ad0
KR
991# See if we really can support this configuration with the emulation code.
992
993 if test $this_target = $target ; then
994 primary_bfd_gas=$bfd_gas
995 obj_format=$fmt
996 gas_target=$targ
997 te_file=$em
998
999 if test $bfd_gas = no ; then
1000 # Can't support other configurations this way.
1001 break
1002 fi
1003 elif test $bfd_gas = no ; then
1004 # Can't support this configuration.
1005 break
1006 fi
1007
1008# From target name and format, produce a list of supported emulations.
1009
1010 case ${generic_target}-${fmt} in
1cb0d00d 1011 mips-*-irix5*-*) emulation="mipsbelf mipslelf mipself mipsbecoff mipslecoff mipsecoff" ;;
e7757ad0 1012 mips-*-*-ecoff) case "$endian" in
1cb0d00d
KR
1013 big) emulation="mipsbecoff mipslecoff mipsecoff" ;;
1014 *) emulation="mipslecoff mipsbecoff mipsecoff" ;;
e7757ad0
KR
1015 esac ;;
1016 mips-*-*-elf) case "$endian" in
1cb0d00d
KR
1017 big) emulation="mipsbelf mipslelf mipself" ;;
1018 *) emulation="mipslelf mipsbelf mipself" ;;
e7757ad0
KR
1019 esac ;;
1020 esac
1021
1022 emulations="$emulations $emulation"
1023
e7757ad0 1024done
b11fb939
KR
1025
1026# Assign floating point type. Most processors with FP support
1027# IEEE FP. On those that don't support FP at all, usually IEEE
1028# is emulated.
1029case ${target_cpu} in
1030 vax | tahoe ) atof=${target_cpu} ;;
e7757ad0 1031 *) atof=ieee ;;
b11fb939
KR
1032esac
1033
1034case "${obj_format}" in
ba49e48d 1035 "") { echo "configure: error: GAS does not know what format to use for target ${target}" 1>&2; exit 1; } ;;
b11fb939
KR
1036esac
1037
1038
bf4bd1fc
ILT
1039if test ! -r ${srcdir}/config/tc-${target_cpu_type}.c; then
1040 { echo "configure: error: GAS does not support target CPU ${target_cpu_type}" 1>&2; exit 1; }
b11fb939
KR
1041fi
1042
fb589130 1043if test ! -r ${srcdir}/config/obj-${obj_format}.c; then
ba49e48d 1044 { echo "configure: error: GAS does not have support for object file format ${obj_format}" 1>&2; exit 1; }
b11fb939
KR
1045fi
1046
b11fb939
KR
1047# and target makefile frag
1048
1049target_frag=${srcdir}/config/${gas_target}.mt
f2889110
KR
1050if test ! -r ${target_frag}; then
1051 target_frag=/dev/null # ick! but subst_file can't be conditionalized
1052fi
b11fb939 1053
4cbbec31 1054
e7757ad0 1055case ${user_bfd_gas}-${primary_bfd_gas} in
b11fb939
KR
1056 yes-yes | no-no)
1057 # We didn't override user's choice.
1058 ;;
1059 no-yes)
1060 echo "configure: warning: Use of BFD is required for ${target}; overriding config options." 1>&2
1061 ;;
1062 no-preferred)
e7757ad0 1063 primary_bfd_gas=no
b11fb939
KR
1064 ;;
1065 *-preferred)
e7757ad0 1066 primary_bfd_gas=yes
b11fb939 1067 ;;
ba49e48d 1068 yes-*)
e7757ad0 1069 primary_bfd_gas=yes
ba49e48d 1070 ;;
b11fb939
KR
1071 -*)
1072 # User specified nothing.
1073 ;;
1074esac
1075
e7757ad0
KR
1076# Some COFF configurations want these random other flags set.
1077case ${obj_format} in
1078 coff)
1079 case ${target_cpu_type} in
1080 i386) cat >> confdefs.h <<\EOF
1081#define I386COFF 1
1082EOF
1083 ;;
1084 m68k) cat >> confdefs.h <<\EOF
1085#define M68KCOFF 1
1086EOF
1087 ;;
1088 m88k) cat >> confdefs.h <<\EOF
1089#define M88KCOFF 1
1090EOF
1091 ;;
1092 esac
1093 ;;
1094esac
1095
1096# Getting this done right is going to be a bitch. Each configuration specified
1097# with --enable-targets=... should be checked for environment, format, cpu, and
1098# bfd_gas setting.
1099#
1100# For each configuration, the necessary object file support code must be linked
1101# in. This might be only one, it might be up to four. The necessary emulation
1102# code needs to be provided, too.
1103#
1104# And then there's "--enable-targets=all"....
1105#
1106# For now, just always do it for MIPS ELF or ECOFF configurations. Sigh.
1107
1108formats="${obj_format}"
1109emfiles=""
1110EMULATIONS=""
1111_gas_uniq_list="$emulations"
1112_gas_uniq_newlist=""
1113for _gas_uniq_i in _gas_uniq_dummy $_gas_uniq_list ; do
1114 case $_gas_uniq_i in
1115 _gas_uniq_dummy) ;;
1116 *) case " $_gas_uniq_newlist " in
1117 *" $_gas_uniq_i "*) ;;
1118 *) _gas_uniq_newlist="$_gas_uniq_newlist $_gas_uniq_i" ;;
1119 esac ;;
1120 esac
1121done
1122emulations=$_gas_uniq_newlist
1123
1124for em in . $emulations ; do
1125 case $em in
1126 .) continue ;;
1127 mipsbelf | mipslelf)
1128 fmt=elf file=mipself ;;
1129 mipsbecoff | mipslecoff)
1130 fmt=ecoff file=mipsecoff ;;
1131 esac
1132 formats="$formats $fmt"
1133 emfiles="$emfiles e-$file.o"
1134 EMULATIONS="$EMULATIONS &$em,"
1135done
1136_gas_uniq_list="$formats"
1137_gas_uniq_newlist=""
1138for _gas_uniq_i in _gas_uniq_dummy $_gas_uniq_list ; do
1139 case $_gas_uniq_i in
1140 _gas_uniq_dummy) ;;
1141 *) case " $_gas_uniq_newlist " in
1142 *" $_gas_uniq_i "*) ;;
1143 *) _gas_uniq_newlist="$_gas_uniq_newlist $_gas_uniq_i" ;;
1144 esac ;;
1145 esac
1146done
1147formats=$_gas_uniq_newlist
1148
1149_gas_uniq_list="$emfiles"
1150_gas_uniq_newlist=""
1151for _gas_uniq_i in _gas_uniq_dummy $_gas_uniq_list ; do
1152 case $_gas_uniq_i in
1153 _gas_uniq_dummy) ;;
1154 *) case " $_gas_uniq_newlist " in
1155 *" $_gas_uniq_i "*) ;;
1156 *) _gas_uniq_newlist="$_gas_uniq_newlist $_gas_uniq_i" ;;
1157 esac ;;
1158 esac
1159done
1160emfiles=$_gas_uniq_newlist
1161
1162if test `set . $formats ; shift ; echo $#` -gt 1 ; then
1163 for fmt in $formats ; do
1164 case $fmt in
1165 aout) cat >> confdefs.h <<\EOF
1166#define OBJ_MAYBE_AOUT 1
1167EOF
1168 ;;
1169 bout) cat >> confdefs.h <<\EOF
1170#define OBJ_MAYBE_BOUT 1
1171EOF
1172 ;;
1173 coff) cat >> confdefs.h <<\EOF
1174#define OBJ_MAYBE_COFF 1
1175EOF
1176 ;;
1177 ecoff) cat >> confdefs.h <<\EOF
1178#define OBJ_MAYBE_ECOFF 1
1179EOF
1180 ;;
1181 elf) cat >> confdefs.h <<\EOF
1182#define OBJ_MAYBE_ELF 1
1183EOF
1184 ;;
1185 generic) cat >> confdefs.h <<\EOF
1186#define OBJ_MAYBE_GENERIC 1
1187EOF
1188 ;;
1189 hp300) cat >> confdefs.h <<\EOF
1190#define OBJ_MAYBE_HP300 1
1191EOF
1192 ;;
1193 ieee) cat >> confdefs.h <<\EOF
1194#define OBJ_MAYBE_IEEE 1
1195EOF
1196 ;;
1197 som) cat >> confdefs.h <<\EOF
1198#define OBJ_MAYBE_SOM 1
1199EOF
1200 ;;
1201 vms) cat >> confdefs.h <<\EOF
1202#define OBJ_MAYBE_VMS 1
1203EOF
1204 ;;
1205 esac
1206 extra_objects="$extra_objects obj-$fmt.o"
1207 done
1208 obj_format=multi
1209fi
1210if test `set . $emfiles ; shift ; echo $#` -gt 0 ; then
1211 te_file=multi
1212 extra_objects="$extra_objects $emfiles"
1213 DEFAULT_EMULATION=`set . $emulations ; echo $2`
1214 cat >> confdefs.h <<\EOF
1215#define USE_EMULATIONS 1
1216EOF
1217
1218fi
1219
1220cat >> confdefs.h <<EOF
1221#define EMULATIONS $EMULATIONS
1222EOF
1223
1224cat >> confdefs.h <<EOF
1225#define DEFAULT_EMULATION "$DEFAULT_EMULATION"
1226EOF
1227
1228
bf4bd1fc 1229files="config/tc-${target_cpu_type}.c config/tc-${target_cpu_type}.h \
e7757ad0
KR
1230 config/obj-${obj_format}.h config/obj-${obj_format}.c \
1231 config/te-${te_file}.h config/atof-${atof}.c \
1232 $extra_files"
1233links="targ-cpu.c targ-cpu.h obj-format.h obj-format.c targ-env.h atof-targ.c \
1234 $extra_links"
1235
bf4bd1fc 1236case ${primary_bfd_gas}-${target_cpu_type}-${obj_format} in
318b02b6
KR
1237 yes-*-coff) need_bfd=yes ;;
1238 no-*-coff) need_bfd=yes
1239 cat >> confdefs.h <<\EOF
1240#define MANY_SEGMENTS 1
1241EOF
1242 ;;
1243esac
1244
b11fb939
KR
1245reject_dev_configs=yes
1246
1247case ${reject_dev_configs}-${dev} in
1248 yes-yes) # Oops.
ba49e48d 1249 { echo "configure: error: GAS does not support the ${generic_target} configuration." 1>&2; exit 1; }
b11fb939
KR
1250 ;;
1251esac
1252
b11fb939
KR
1253
1254
833c46e1
KR
1255
1256
1257
1258
e7757ad0 1259case "${primary_bfd_gas}" in
b11fb939
KR
1260 yes) cat >> confdefs.h <<\EOF
1261#define BFD_ASSEMBLER 1
1262EOF
1263
1264 need_bfd=yes ;;
1265esac
1266
ae09d880
ILT
1267# do we need the opcodes library?
1268case "${need_opcodes}" in
1269 yes)
1270 OPCODES_DEP=../opcodes/libopcodes.a
1271 OPCODES_LIB='-L../opcodes -lopcodes'
1272
1273 # We need to handle some special cases if opcodes was built shared.
159e6ef8 1274 if test "${shared_opcodes}" = "true"; then
ae09d880
ILT
1275 case "${host}" in
1276 *-*-sunos*)
1277 # On SunOS, we must link against the name we are going to install,
1278 # not -lbfd, since SunOS does not support SONAME.
1279 OPCODES_LIB='-L../opcodes -l`echo opcodes | sed '"'"'$(program_transform_name)'"'"'`'
1280 ;;
1281 esac
1282 fi
1283 ;;
1284esac
1285
1286
1287
b11fb939 1288case "${need_bfd}" in
ae09d880
ILT
1289 yes)
1290 BFDDEP=../bfd/libbfd.a
1291 BFDLIB='-L../bfd -lbfd'
1292 ALL_OBJ_DEPS="$ALL_OBJ_DEPS ../bfd/bfd.h"
1293
1294 # We need to handle some special cases if BFD was built shared.
159e6ef8 1295 if test "${shared_bfd}" = "true"; then
ae09d880
ILT
1296 case "${host}" in
1297 *-*-sunos*)
1298 # On SunOS, we must link against the name we are going to install,
1299 # not -lbfd, since SunOS does not support SONAME.
1300 BFDLIB='-L../bfd -l`echo bfd | sed '"'"'$(program_transform_name)'"'"'`'
b11fb939 1301 ;;
ae09d880
ILT
1302 esac
1303 fi
1304 ;;
b11fb939
KR
1305esac
1306
1307
1308
1c9dbb83 1309
b11fb939
KR
1310cat >> confdefs.h <<EOF
1311#define TARGET_ALIAS "${target_alias}"
1312EOF
1313
1314cat >> confdefs.h <<EOF
1315#define TARGET_CANONICAL "${target}"
1316EOF
1317
1318cat >> confdefs.h <<EOF
1319#define TARGET_CPU "${target_cpu}"
1320EOF
1321
1322cat >> confdefs.h <<EOF
1323#define TARGET_VENDOR "${target_vendor}"
1324EOF
1325
1326cat >> confdefs.h <<EOF
1327#define TARGET_OS "${target_os}"
1328EOF
1329
1330
330add8a
ILT
1331# Extract the first word of "gcc", so it can be a program name with args.
1332set dummy gcc; ac_word=$2
1333echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1334if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1335 echo $ac_n "(cached) $ac_c" 1>&6
1336else
1337 if test -n "$CC"; then
1338 ac_cv_prog_CC="$CC" # Let the user override the test.
1339else
1340 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1341 for ac_dir in $PATH; do
1342 test -z "$ac_dir" && ac_dir=.
1343 if test -f $ac_dir/$ac_word; then
1344 ac_cv_prog_CC="gcc"
1345 break
1346 fi
1347 done
1348 IFS="$ac_save_ifs"
330add8a
ILT
1349fi
1350fi
1351CC="$ac_cv_prog_CC"
1352if test -n "$CC"; then
1353 echo "$ac_t""$CC" 1>&6
1354else
1355 echo "$ac_t""no" 1>&6
1356fi
1357
d0352cbb
DE
1358if test -z "$CC"; then
1359 # Extract the first word of "cc", so it can be a program name with args.
1360set dummy cc; ac_word=$2
1361echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1362if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1363 echo $ac_n "(cached) $ac_c" 1>&6
1364else
1365 if test -n "$CC"; then
1366 ac_cv_prog_CC="$CC" # Let the user override the test.
1367else
1368 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1369 ac_prog_rejected=no
1370 for ac_dir in $PATH; do
1371 test -z "$ac_dir" && ac_dir=.
1372 if test -f $ac_dir/$ac_word; then
1373 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1374 ac_prog_rejected=yes
1375 continue
1376 fi
1377 ac_cv_prog_CC="cc"
1378 break
1379 fi
1380 done
1381 IFS="$ac_save_ifs"
1382if test $ac_prog_rejected = yes; then
1383 # We found a bogon in the path, so make sure we never use it.
1384 set dummy $ac_cv_prog_CC
1385 shift
1386 if test $# -gt 0; then
1387 # We chose a different compiler from the bogus one.
1388 # However, it has the same basename, so the bogon will be chosen
1389 # first if we set CC to just the basename; use the full file name.
1390 shift
1391 set dummy "$ac_dir/$ac_word" "$@"
1392 shift
1393 ac_cv_prog_CC="$@"
1394 fi
1395fi
1396fi
1397fi
1398CC="$ac_cv_prog_CC"
1399if test -n "$CC"; then
1400 echo "$ac_t""$CC" 1>&6
1401else
1402 echo "$ac_t""no" 1>&6
1403fi
1404
1405 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1406fi
b11fb939 1407
330add8a
ILT
1408echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1409if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
1410 echo $ac_n "(cached) $ac_c" 1>&6
1411else
1412 cat > conftest.c <<EOF
b11fb939 1413#ifdef __GNUC__
330add8a 1414 yes;
b11fb939
KR
1415#endif
1416EOF
df586de2 1417if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1418: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
330add8a
ILT
1418 ac_cv_prog_gcc=yes
1419else
1420 ac_cv_prog_gcc=no
1421fi
1422fi
1c9dbb83 1423
330add8a
ILT
1424echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1425if test $ac_cv_prog_gcc = yes; then
b11fb939 1426 GCC=yes
330add8a
ILT
1427 if test "${CFLAGS+set}" != set; then
1428 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1429if eval "test \"`echo '$''{'ac_cv_prog_gcc_g'+set}'`\" = set"; then
1430 echo $ac_n "(cached) $ac_c" 1>&6
b11fb939 1431else
330add8a
ILT
1432 echo 'void f(){}' > conftest.c
1433if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1434 ac_cv_prog_gcc_g=yes
1435else
1436 ac_cv_prog_gcc_g=no
b11fb939
KR
1437fi
1438rm -f conftest*
1439
330add8a 1440fi
1c9dbb83
ILT
1441
1442echo "$ac_t""$ac_cv_prog_gcc_g" 1>&6
330add8a
ILT
1443 if test $ac_cv_prog_gcc_g = yes; then
1444 CFLAGS="-g -O"
1445 else
1446 CFLAGS="-O"
1447 fi
1448 fi
1449else
1450 GCC=
1451 test "${CFLAGS+set}" = set || CFLAGS="-g"
1452fi
1453
bf111c9f
KR
1454# Find a good install program. We prefer a C program (faster),
1455# so one script is as good as another. But avoid the broken or
1456# incompatible versions:
b11fb939
KR
1457# SysV /etc/install, /usr/sbin/install
1458# SunOS /usr/etc/install
1459# IRIX /sbin/install
1460# AIX /bin/install
1461# AFS /usr/afsws/bin/install, which mishandles nonexistent args
1462# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1463# ./install, which can be erroneously created by make from ./install.sh.
833c46e1 1464echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
28d3e4a3 1465if test -z "$INSTALL"; then
833c46e1
KR
1466if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
1467 echo $ac_n "(cached) $ac_c" 1>&6
b11fb939
KR
1468else
1469 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1470 for ac_dir in $PATH; do
833c46e1
KR
1471 # Account for people who put trailing slashes in PATH elements.
1472 case "$ac_dir/" in
1473 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
b11fb939
KR
1474 *)
1475 # OSF1 and SCO ODT 3.0 have their own names for install.
1476 for ac_prog in ginstall installbsd scoinst install; do
1477 if test -f $ac_dir/$ac_prog; then
1478 if test $ac_prog = install &&
1479 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1480 # AIX install. It has an incompatible calling convention.
1481 # OSF/1 installbsd also uses dspmsg, but is usable.
1482 :
1483 else
1484 ac_cv_path_install="$ac_dir/$ac_prog -c"
1485 break 2
1486 fi
1487 fi
1488 done
1489 ;;
1490 esac
1491 done
1492 IFS="$ac_save_ifs"
1c9dbb83 1493
b11fb939 1494fi
1c9dbb83
ILT
1495 if test "${ac_cv_path_install+set}" = set; then
1496 INSTALL="$ac_cv_path_install"
1497 else
1498 # As a last resort, use the slow shell script. We don't cache a
1499 # path for INSTALL within a source directory, because that will
1500 # break other packages using the cache if that directory is
1501 # removed, or if the path is relative.
1502 INSTALL="$ac_install_sh"
1503 fi
b11fb939 1504fi
833c46e1 1505echo "$ac_t""$INSTALL" 1>&6
b11fb939
KR
1506
1507# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1508# It thinks the first close brace ends the variable substitution.
1509test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1510
1511test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1512
1513
833c46e1 1514echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
b11fb939
KR
1515# On Suns, sometimes $CPP names a directory.
1516if test -n "$CPP" && test -d "$CPP"; then
1517 CPP=
1518fi
1519if test -z "$CPP"; then
833c46e1
KR
1520if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1521 echo $ac_n "(cached) $ac_c" 1>&6
b11fb939
KR
1522else
1523 # This must be in double quotes, not single quotes, because CPP may get
1524 # substituted into the Makefile and "${CC-cc}" will confuse make.
1525 CPP="${CC-cc} -E"
1526 # On the NeXT, cc -E runs the code through the compiler's parser,
1527 # not just through cpp.
28d3e4a3 1528 cat > conftest.$ac_ext <<EOF
df586de2 1529#line 1530 "configure"
b11fb939 1530#include "confdefs.h"
f2889110 1531#include <assert.h>
b11fb939
KR
1532Syntax Error
1533EOF
d0352cbb 1534ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
df586de2 1535{ (eval echo configure:1536: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
bf111c9f 1536ac_err=`grep -v '^ *+' conftest.out`
b11fb939
KR
1537if test -z "$ac_err"; then
1538 :
1539else
fb589130 1540 echo "$ac_err" >&5
b11fb939
KR
1541 rm -rf conftest*
1542 CPP="${CC-cc} -E -traditional-cpp"
28d3e4a3 1543 cat > conftest.$ac_ext <<EOF
df586de2 1544#line 1545 "configure"
b11fb939 1545#include "confdefs.h"
f2889110 1546#include <assert.h>
b11fb939
KR
1547Syntax Error
1548EOF
d0352cbb 1549ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
df586de2 1550{ (eval echo configure:1551: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
bf111c9f 1551ac_err=`grep -v '^ *+' conftest.out`
b11fb939
KR
1552if test -z "$ac_err"; then
1553 :
1554else
fb589130 1555 echo "$ac_err" >&5
b11fb939
KR
1556 rm -rf conftest*
1557 CPP=/lib/cpp
1558fi
1559rm -f conftest*
1560fi
1561rm -f conftest*
1562 ac_cv_prog_CPP="$CPP"
1563fi
e63c594d
FF
1564 CPP="$ac_cv_prog_CPP"
1565else
1566 ac_cv_prog_CPP="$CPP"
b11fb939 1567fi
833c46e1 1568echo "$ac_t""$CPP" 1>&6
fb589130
KR
1569
1570for ac_hdr in string.h stdlib.h memory.h strings.h unistd.h stdarg.h varargs.h errno.h sys/types.h
1571do
f2889110 1572ac_safe=`echo "$ac_hdr" | tr './\055' '___'`
833c46e1
KR
1573echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1574if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1575 echo $ac_n "(cached) $ac_c" 1>&6
b11fb939 1576else
28d3e4a3 1577 cat > conftest.$ac_ext <<EOF
df586de2 1578#line 1579 "configure"
b11fb939 1579#include "confdefs.h"
28d3e4a3 1580#include <$ac_hdr>
b11fb939 1581EOF
d0352cbb 1582ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
df586de2 1583{ (eval echo configure:1584: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
bf111c9f 1584ac_err=`grep -v '^ *+' conftest.out`
b11fb939
KR
1585if test -z "$ac_err"; then
1586 rm -rf conftest*
fb589130 1587 eval "ac_cv_header_$ac_safe=yes"
b11fb939 1588else
fb589130 1589 echo "$ac_err" >&5
b11fb939 1590 rm -rf conftest*
fb589130 1591 eval "ac_cv_header_$ac_safe=no"
b11fb939
KR
1592fi
1593rm -f conftest*
b11fb939 1594fi
fb589130 1595if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
833c46e1 1596 echo "$ac_t""yes" 1>&6
1c9dbb83 1597 ac_tr_hdr=HAVE_`echo $ac_hdr | tr 'abcdefghijklmnopqrstuvwxyz./\055' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ___'`
fb589130 1598 cat >> confdefs.h <<EOF
28d3e4a3 1599#define $ac_tr_hdr 1
b11fb939 1600EOF
fb589130 1601
b11fb939 1602else
833c46e1 1603 echo "$ac_t""no" 1>&6
b11fb939 1604fi
fb589130 1605done
b11fb939 1606
b11fb939 1607
bf111c9f
KR
1608# Put this here so that autoconf's "cross-compiling" message doesn't confuse
1609# people who are not cross-compiling but are compiling cross-assemblers.
833c46e1 1610echo $ac_n "checking whether compiling a cross-assembler""... $ac_c" 1>&6
bf111c9f 1611if test "${host}" = "${target}"; then
ba49e48d
KR
1612 cross_gas=no
1613else
bf111c9f
KR
1614 cross_gas=yes
1615 cat >> confdefs.h <<\EOF
1616#define CROSS_COMPILE 1
1617EOF
1618
bf111c9f 1619fi
833c46e1 1620echo "$ac_t""$cross_gas" 1>&6
bf111c9f 1621
b11fb939 1622# If we cannot run a trivial program, we must be cross compiling.
833c46e1
KR
1623echo $ac_n "checking whether cross-compiling""... $ac_c" 1>&6
1624if eval "test \"`echo '$''{'ac_cv_c_cross'+set}'`\" = set"; then
1625 echo $ac_n "(cached) $ac_c" 1>&6
b11fb939
KR
1626else
1627 if test "$cross_compiling" = yes; then
833c46e1 1628 ac_cv_c_cross=yes
b11fb939 1629else
28d3e4a3 1630cat > conftest.$ac_ext <<EOF
df586de2 1631#line 1632 "configure"
b11fb939 1632#include "confdefs.h"
bf111c9f 1633main(){return(0);}
b11fb939 1634EOF
df586de2 1635{ (eval echo configure:1636: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
b11fb939
KR
1636if test -s conftest && (./conftest; exit) 2>/dev/null; then
1637 ac_cv_c_cross=no
1638else
1639 ac_cv_c_cross=yes
1640fi
1641fi
1642rm -fr conftest*
1643fi
1c9dbb83 1644
0ff513d9 1645echo "$ac_t""$ac_cv_c_cross" 1>&6
1c9dbb83 1646cross_compiling=$ac_cv_c_cross
b11fb939
KR
1647
1648# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
1649# for constant arguments. Useless!
833c46e1
KR
1650echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
1651if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
1652 echo $ac_n "(cached) $ac_c" 1>&6
b11fb939 1653else
28d3e4a3 1654 cat > conftest.$ac_ext <<EOF
df586de2 1655#line 1656 "configure"
b11fb939
KR
1656#include "confdefs.h"
1657#include <alloca.h>
1658int main() { return 0; }
1659int t() {
1660char *p = alloca(2 * sizeof(int));
1661; return 0; }
1662EOF
df586de2 1663if { (eval echo configure:1664: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
b11fb939
KR
1664 rm -rf conftest*
1665 ac_cv_header_alloca_h=yes
1666else
1667 rm -rf conftest*
1668 ac_cv_header_alloca_h=no
1669fi
1670rm -f conftest*
1671
1672fi
1c9dbb83 1673
833c46e1 1674echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
b11fb939
KR
1675if test $ac_cv_header_alloca_h = yes; then
1676 cat >> confdefs.h <<\EOF
1677#define HAVE_ALLOCA_H 1
1678EOF
1679
1680fi
1681
833c46e1
KR
1682echo $ac_n "checking for alloca""... $ac_c" 1>&6
1683if eval "test \"`echo '$''{'ac_cv_func_alloca'+set}'`\" = set"; then
1684 echo $ac_n "(cached) $ac_c" 1>&6
b11fb939 1685else
28d3e4a3 1686 cat > conftest.$ac_ext <<EOF
df586de2 1687#line 1688 "configure"
b11fb939
KR
1688#include "confdefs.h"
1689
1690#ifdef __GNUC__
1691# define alloca __builtin_alloca
1692#else
1693# if HAVE_ALLOCA_H
1694# include <alloca.h>
1695# else
1696# ifdef _AIX
1697 #pragma alloca
1698# else
1699# ifndef alloca /* predefined by HP cc +Olibcalls */
1700char *alloca ();
1701# endif
1702# endif
1703# endif
1704#endif
1705
1706int main() { return 0; }
1707int t() {
1708char *p = (char *) alloca(1);
1709; return 0; }
1710EOF
df586de2 1711if { (eval echo configure:1712: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
b11fb939
KR
1712 rm -rf conftest*
1713 ac_cv_func_alloca=yes
1714else
1715 rm -rf conftest*
1716 ac_cv_func_alloca=no
1717fi
1718rm -f conftest*
1719
1720fi
1c9dbb83 1721
833c46e1 1722echo "$ac_t""$ac_cv_func_alloca" 1>&6
b11fb939
KR
1723if test $ac_cv_func_alloca = yes; then
1724 cat >> confdefs.h <<\EOF
1725#define HAVE_ALLOCA 1
1726EOF
1727
1728fi
1729
1730if test $ac_cv_func_alloca = no; then
1731 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
1732 # that cause trouble. Some versions do not even contain alloca or
1733 # contain a buggy version. If you still want to use their alloca,
1734 # use ar to extract alloca.o from them instead of compiling alloca.c.
1735 ALLOCA=alloca.o
1736 cat >> confdefs.h <<\EOF
1737#define C_ALLOCA 1
1738EOF
1739
1740
833c46e1
KR
1741echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
1742if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
1743 echo $ac_n "(cached) $ac_c" 1>&6
b11fb939 1744else
28d3e4a3 1745 cat > conftest.$ac_ext <<EOF
df586de2 1746#line 1747 "configure"
b11fb939
KR
1747#include "confdefs.h"
1748#if defined(CRAY) && ! defined(CRAY2)
1749webecray
1750#else
1751wenotbecray
1752#endif
1753
1754EOF
28d3e4a3 1755if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
fb589130 1756 egrep "webecray" >/dev/null 2>&1; then
b11fb939
KR
1757 rm -rf conftest*
1758 ac_cv_os_cray=yes
1759else
1760 rm -rf conftest*
1761 ac_cv_os_cray=no
1762fi
1763rm -f conftest*
1764
1765fi
1c9dbb83 1766
833c46e1 1767echo "$ac_t""$ac_cv_os_cray" 1>&6
b11fb939 1768if test $ac_cv_os_cray = yes; then
833c46e1
KR
1769for ac_func in _getb67 GETB67 getb67; do
1770 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1771if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1772 echo $ac_n "(cached) $ac_c" 1>&6
b11fb939 1773else
28d3e4a3 1774 cat > conftest.$ac_ext <<EOF
df586de2 1775#line 1776 "configure"
b11fb939 1776#include "confdefs.h"
833c46e1
KR
1777/* System header to define __stub macros and hopefully few prototypes,
1778 which can conflict with char $ac_func(); below. */
1779#include <assert.h>
f1698cb7 1780/* Override any gcc2 internal prototype to avoid an error. */
df586de2
ILT
1781/* We use char because int might match the return type of a gcc2
1782 builtin and then its argument prototype would still apply. */
1c9dbb83 1783char $ac_func();
f1698cb7 1784
b11fb939
KR
1785int main() { return 0; }
1786int t() {
1787
1788/* The GNU C library defines this for functions which it implements
1789 to always fail with ENOSYS. Some functions are actually named
1790 something starting with __ and the normal name is an alias. */
833c46e1 1791#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
b11fb939
KR
1792choke me
1793#else
833c46e1 1794$ac_func();
b11fb939
KR
1795#endif
1796
1797; return 0; }
1798EOF
159e6ef8 1799if { (eval echo configure:1800: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
b11fb939 1800 rm -rf conftest*
833c46e1 1801 eval "ac_cv_func_$ac_func=yes"
b11fb939
KR
1802else
1803 rm -rf conftest*
833c46e1 1804 eval "ac_cv_func_$ac_func=no"
b11fb939
KR
1805fi
1806rm -f conftest*
1807
1808fi
833c46e1
KR
1809if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1810 echo "$ac_t""yes" 1>&6
1811 cat >> confdefs.h <<EOF
1812#define CRAY_STACKSEG_END $ac_func
b11fb939
KR
1813EOF
1814
833c46e1 1815 break
b11fb939 1816else
833c46e1 1817 echo "$ac_t""no" 1>&6
b11fb939
KR
1818fi
1819
833c46e1 1820done
b11fb939
KR
1821fi
1822
833c46e1
KR
1823echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
1824if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
1825 echo $ac_n "(cached) $ac_c" 1>&6
b11fb939
KR
1826else
1827 if test "$cross_compiling" = yes; then
bf111c9f 1828 ac_cv_c_stack_direction=0
b11fb939 1829else
28d3e4a3 1830cat > conftest.$ac_ext <<EOF
159e6ef8 1831#line 1832 "configure"
b11fb939
KR
1832#include "confdefs.h"
1833find_stack_direction ()
1834{
1835 static char *addr = 0;
1836 auto char dummy;
1837 if (addr == 0)
1838 {
1839 addr = &dummy;
1840 return find_stack_direction ();
1841 }
1842 else
1843 return (&dummy > addr) ? 1 : -1;
1844}
1845main ()
1846{
1847 exit (find_stack_direction() < 0);
1848}
1849EOF
159e6ef8 1850{ (eval echo configure:1851: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
b11fb939
KR
1851if test -s conftest && (./conftest; exit) 2>/dev/null; then
1852 ac_cv_c_stack_direction=1
1853else
1854 ac_cv_c_stack_direction=-1
1855fi
1856fi
1857rm -fr conftest*
1858fi
1c9dbb83 1859
833c46e1 1860echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
b11fb939
KR
1861cat >> confdefs.h <<EOF
1862#define STACK_DIRECTION $ac_cv_c_stack_direction
1863EOF
1864
1865fi
1866
833c46e1
KR
1867echo $ac_n "checking for inline""... $ac_c" 1>&6
1868if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
1869 echo $ac_n "(cached) $ac_c" 1>&6
b11fb939 1870else
833c46e1
KR
1871 ac_cv_c_inline=no
1872for ac_kw in inline __inline__ __inline; do
1873 cat > conftest.$ac_ext <<EOF
159e6ef8 1874#line 1875 "configure"
b11fb939
KR
1875#include "confdefs.h"
1876
1877int main() { return 0; }
1878int t() {
833c46e1 1879} $ac_kw foo() {
b11fb939
KR
1880; return 0; }
1881EOF
159e6ef8 1882if { (eval echo configure:1883: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
b11fb939 1883 rm -rf conftest*
833c46e1 1884 ac_cv_c_inline=$ac_kw; break
b11fb939
KR
1885fi
1886rm -f conftest*
1887
833c46e1 1888done
b11fb939
KR
1889
1890fi
1c9dbb83 1891
833c46e1
KR
1892echo "$ac_t""$ac_cv_c_inline" 1>&6
1893case "$ac_cv_c_inline" in
1894 inline | yes) ;;
1895 no) cat >> confdefs.h <<\EOF
1896#define inline
1897EOF
1898 ;;
1899 *) cat >> confdefs.h <<EOF
1900#define inline $ac_cv_c_inline
1901EOF
1902 ;;
1903esac
b11fb939
KR
1904
1905
ba49e48d
KR
1906# VMS doesn't have unlink.
1907for ac_func in unlink remove
b9419dd2 1908do
833c46e1
KR
1909echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1910if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1911 echo $ac_n "(cached) $ac_c" 1>&6
28d3e4a3
KR
1912else
1913 cat > conftest.$ac_ext <<EOF
159e6ef8 1914#line 1915 "configure"
28d3e4a3 1915#include "confdefs.h"
833c46e1
KR
1916/* System header to define __stub macros and hopefully few prototypes,
1917 which can conflict with char $ac_func(); below. */
1918#include <assert.h>
f1698cb7 1919/* Override any gcc2 internal prototype to avoid an error. */
df586de2
ILT
1920/* We use char because int might match the return type of a gcc2
1921 builtin and then its argument prototype would still apply. */
1c9dbb83 1922char $ac_func();
f1698cb7 1923
28d3e4a3
KR
1924int main() { return 0; }
1925int t() {
1926
1927/* The GNU C library defines this for functions which it implements
1928 to always fail with ENOSYS. Some functions are actually named
1929 something starting with __ and the normal name is an alias. */
b9419dd2 1930#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
28d3e4a3
KR
1931choke me
1932#else
f1698cb7 1933$ac_func();
28d3e4a3
KR
1934#endif
1935
1936; return 0; }
1937EOF
df586de2 1938if { (eval echo configure:1939: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
28d3e4a3 1939 rm -rf conftest*
b9419dd2 1940 eval "ac_cv_func_$ac_func=yes"
28d3e4a3
KR
1941else
1942 rm -rf conftest*
b9419dd2 1943 eval "ac_cv_func_$ac_func=no"
28d3e4a3
KR
1944fi
1945rm -f conftest*
1946
1947fi
b9419dd2 1948if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
833c46e1 1949 echo "$ac_t""yes" 1>&6
1c9dbb83 1950 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
b9419dd2
KR
1951 cat >> confdefs.h <<EOF
1952#define $ac_tr_func 1
28d3e4a3 1953EOF
b9419dd2 1954 break
28d3e4a3 1955else
833c46e1 1956 echo "$ac_t""no" 1>&6
28d3e4a3 1957fi
b9419dd2 1958done
28d3e4a3
KR
1959
1960
e63c594d
FF
1961# Some systems don't have sbrk().
1962for ac_func in sbrk
1963do
1964echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1965if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1966 echo $ac_n "(cached) $ac_c" 1>&6
1967else
1968 cat > conftest.$ac_ext <<EOF
df586de2 1969#line 1970 "configure"
e63c594d
FF
1970#include "confdefs.h"
1971/* System header to define __stub macros and hopefully few prototypes,
1972 which can conflict with char $ac_func(); below. */
1973#include <assert.h>
1974/* Override any gcc2 internal prototype to avoid an error. */
df586de2
ILT
1975/* We use char because int might match the return type of a gcc2
1976 builtin and then its argument prototype would still apply. */
1c9dbb83 1977char $ac_func();
e63c594d
FF
1978
1979int main() { return 0; }
1980int t() {
1981
1982/* The GNU C library defines this for functions which it implements
1983 to always fail with ENOSYS. Some functions are actually named
1984 something starting with __ and the normal name is an alias. */
1985#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1986choke me
1987#else
1988$ac_func();
1989#endif
1990
1991; return 0; }
1992EOF
df586de2 1993if { (eval echo configure:1994: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
e63c594d
FF
1994 rm -rf conftest*
1995 eval "ac_cv_func_$ac_func=yes"
1996else
1997 rm -rf conftest*
1998 eval "ac_cv_func_$ac_func=no"
1999fi
2000rm -f conftest*
2001
2002fi
2003if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2004 echo "$ac_t""yes" 1>&6
1c9dbb83 2005 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
e63c594d
FF
2006 cat >> confdefs.h <<EOF
2007#define $ac_tr_func 1
2008EOF
2009
2010else
2011 echo "$ac_t""no" 1>&6
2012fi
2013done
2014
2015
b11fb939
KR
2016# Some non-ANSI preprocessors botch requoting inside strings. That's bad
2017# enough, but on some of those systems, the assert macro relies on requoting
2018# working properly!
833c46e1
KR
2019echo $ac_n "checking for working assert macro""... $ac_c" 1>&6
2020if eval "test \"`echo '$''{'gas_cv_assert_ok'+set}'`\" = set"; then
2021 echo $ac_n "(cached) $ac_c" 1>&6
fb589130 2022else
28d3e4a3 2023 cat > conftest.$ac_ext <<EOF
df586de2 2024#line 2025 "configure"
b11fb939
KR
2025#include "confdefs.h"
2026#include <assert.h>
2027#include <stdio.h>
2028int main() { return 0; }
2029int t() {
2030
2031/* check for requoting problems */
2032static int a, b, c, d;
2033static char *s;
2034assert (!strcmp(s, "foo bar baz quux"));
2035/* check for newline handling */
2036assert (a == b
2037 || c == d);
2038
2039; return 0; }
2040EOF
df586de2 2041if { (eval echo configure:2042: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
fb589130
KR
2042 rm -rf conftest*
2043 gas_cv_assert_ok=yes
b11fb939
KR
2044else
2045 rm -rf conftest*
fb589130 2046 gas_cv_assert_ok=no
b11fb939
KR
2047fi
2048rm -f conftest*
2049
fb589130 2050fi
833c46e1 2051echo "$ac_t""$gas_cv_assert_ok" 1>&6
fb589130
KR
2052test $gas_cv_assert_ok = yes || cat >> confdefs.h <<\EOF
2053#define BROKEN_ASSERT 1
2054EOF
2055
b11fb939 2056
bf111c9f 2057
b11fb939
KR
2058# On some systems, the system header files may not declare malloc, realloc,
2059# and free. There are places where gas needs these functions to have been
2060# declared -- such as when taking their addresses.
bf111c9f 2061gas_test_headers="
b11fb939
KR
2062#ifdef HAVE_MEMORY_H
2063#include <memory.h>
2064#endif
2065#ifdef HAVE_STRING_H
2066#include <string.h>
2067#endif
2068#ifdef HAVE_STDLIB_H
2069#include <stdlib.h>
2070#endif
2071#ifdef HAVE_UNISTD_H
2072#include <unistd.h>
2073#endif
bf111c9f 2074"
b11fb939 2075
833c46e1
KR
2076echo $ac_n "checking whether declaration is required for malloc""... $ac_c" 1>&6
2077if eval "test \"`echo '$''{'gas_cv_decl_needed_malloc'+set}'`\" = set"; then
2078 echo $ac_n "(cached) $ac_c" 1>&6
bf111c9f 2079else
28d3e4a3 2080 cat > conftest.$ac_ext <<EOF
df586de2 2081#line 2082 "configure"
bf111c9f
KR
2082#include "confdefs.h"
2083$gas_test_headers
b11fb939
KR
2084int main() { return 0; }
2085int t() {
2086
bf111c9f
KR
2087typedef char *(*f)();
2088f x;
2089x = (f) malloc;
b11fb939
KR
2090
2091; return 0; }
2092EOF
df586de2 2093if { (eval echo configure:2094: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
fb589130 2094 rm -rf conftest*
bf111c9f 2095 gas_cv_decl_needed_malloc=no
b11fb939
KR
2096else
2097 rm -rf conftest*
bf111c9f 2098 gas_cv_decl_needed_malloc=yes
fb589130
KR
2099fi
2100rm -f conftest*
2101
2102fi
833c46e1 2103echo "$ac_t""$gas_cv_decl_needed_malloc" 1>&6
bf111c9f
KR
2104test $gas_cv_decl_needed_malloc = no || {
2105 cat >> confdefs.h <<\EOF
2106#define NEED_DECLARATION_MALLOC 1
b11fb939
KR
2107EOF
2108
bf111c9f
KR
2109}
2110
b11fb939 2111
833c46e1
KR
2112echo $ac_n "checking whether declaration is required for free""... $ac_c" 1>&6
2113if eval "test \"`echo '$''{'gas_cv_decl_needed_free'+set}'`\" = set"; then
2114 echo $ac_n "(cached) $ac_c" 1>&6
fb589130 2115else
28d3e4a3 2116 cat > conftest.$ac_ext <<EOF
df586de2 2117#line 2118 "configure"
b11fb939 2118#include "confdefs.h"
bf111c9f 2119$gas_test_headers
b11fb939
KR
2120int main() { return 0; }
2121int t() {
2122
5f757edc 2123typedef void (*f)();
bf111c9f
KR
2124f x;
2125x = (f) free;
b11fb939
KR
2126
2127; return 0; }
2128EOF
df586de2 2129if { (eval echo configure:2130: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
fb589130 2130 rm -rf conftest*
bf111c9f 2131 gas_cv_decl_needed_free=no
b11fb939
KR
2132else
2133 rm -rf conftest*
bf111c9f 2134 gas_cv_decl_needed_free=yes
b11fb939
KR
2135fi
2136rm -f conftest*
2137
fb589130 2138fi
833c46e1 2139echo "$ac_t""$gas_cv_decl_needed_free" 1>&6
bf111c9f
KR
2140test $gas_cv_decl_needed_free = no || {
2141 cat >> confdefs.h <<\EOF
2142#define NEED_DECLARATION_FREE 1
fb589130
KR
2143EOF
2144
bf111c9f
KR
2145}
2146
b11fb939
KR
2147
2148# Does errno.h declare errno, or do we have to add a separate declaration
2149# for it?
bf111c9f 2150
833c46e1
KR
2151echo $ac_n "checking whether declaration is required for errno""... $ac_c" 1>&6
2152if eval "test \"`echo '$''{'gas_cv_decl_needed_errno'+set}'`\" = set"; then
2153 echo $ac_n "(cached) $ac_c" 1>&6
fb589130 2154else
28d3e4a3 2155 cat > conftest.$ac_ext <<EOF
df586de2 2156#line 2157 "configure"
b11fb939
KR
2157#include "confdefs.h"
2158
2159#ifdef HAVE_ERRNO_H
2160#include <errno.h>
2161#endif
2162
2163int main() { return 0; }
2164int t() {
2165
bf111c9f
KR
2166typedef int f;
2167f x;
2168x = (f) errno;
b11fb939
KR
2169
2170; return 0; }
2171EOF
df586de2 2172if { (eval echo configure:2173: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
fb589130 2173 rm -rf conftest*
bf111c9f 2174 gas_cv_decl_needed_errno=no
b11fb939
KR
2175else
2176 rm -rf conftest*
bf111c9f 2177 gas_cv_decl_needed_errno=yes
b11fb939
KR
2178fi
2179rm -f conftest*
2180
fb589130 2181fi
833c46e1 2182echo "$ac_t""$gas_cv_decl_needed_errno" 1>&6
bf111c9f
KR
2183test $gas_cv_decl_needed_errno = no || {
2184 cat >> confdefs.h <<\EOF
2185#define NEED_DECLARATION_ERRNO 1
fb589130
KR
2186EOF
2187
bf111c9f
KR
2188}
2189
b11fb939 2190
1c9dbb83 2191HLDFLAGS=
1a2f3c3f 2192RPATH_ENVVAR=LD_LIBRARY_PATH
1c9dbb83
ILT
2193# If we have shared libraries, try to set rpath reasonably.
2194if test "${shared}" = "true"; then
2195 case "${host}" in
56f9773f
ILT
2196 *-*-hpux*)
2197 HLDFLAGS='-Wl,+s,+b,$(libdir)'
1a2f3c3f 2198 RPATH_ENVVAR=SHLIB_PATH
56f9773f 2199 ;;
1c9dbb83
ILT
2200 *-*-irix5*)
2201 HLDFLAGS='-Wl,-rpath,$(libdir)'
2202 ;;
2203 *-*-linux*aout*)
2204 ;;
2205 *-*-linux*)
2206 HLDFLAGS='-Wl,-rpath,$(libdir)'
2207 ;;
2208 *-*-sysv4* | *-*-solaris*)
2209 HLDFLAGS='-R $(libdir)'
2210 ;;
2211 esac
2212fi
2213
2214# On SunOS, if the linker supports the -rpath option, use it to
2215# prevent ../bfd and ../opcodes from being included in the run time
2216# search path.
2217case "${host}" in
2218 *-*-sunos*)
2219 echo 'main () { }' > conftest.c
2220 ${CC} -o conftest -Wl,-rpath= conftest.c >/dev/null 2>conftest.t
2221 if grep 'unrecognized' conftest.t >/dev/null 2>&1; then
2222 :
2223 elif grep 'No such file' conftest.t >/dev/null 2>&1; then
2224 :
7925f4d4
ILT
2225 elif grep 'do not mix' conftest.t >/dev/null 2>&1; then
2226 :
1c9dbb83
ILT
2227 elif test "${shared}" = "true"; then
2228 HLDFLAGS='-Wl,-rpath=$(libdir)'
2229 else
2230 HLDFLAGS='-Wl,-rpath='
2231 fi
2232 rm -f conftest.t conftest.c conftest
2233 ;;
2234esac
2235
2236
1a2f3c3f 2237
ba49e48d 2238trap '' 1 2 15
833c46e1 2239cat > confcache <<\EOF
b11fb939
KR
2240# This file is a shell script that caches the results of configure
2241# tests run on this system so they can be shared between configure
2242# scripts and configure runs. It is not useful on other systems.
bf111c9f 2243# If it contains results you don't want to keep, you may remove or edit it.
b11fb939
KR
2244#
2245# By default, configure uses ./config.cache as the cache file,
2246# creating it if it does not exist already. You can give configure
2247# the --cache-file=FILE option to use a different cache file; that is
2248# what configure does when it calls configure scripts in
2249# subdirectories, so they share the cache.
2250# Giving --cache-file=/dev/null disables caching, for debugging configure.
2251# config.status only pays attention to the cache file if you give it the
2252# --recheck option to rerun configure.
e23b25ec 2253#
b11fb939 2254EOF
833c46e1
KR
2255# Ultrix sh set writes to stderr and can't be redirected directly,
2256# and sets the high bit in the cache file unless we assign to the vars.
e23b25ec 2257(set) 2>&1 |
833c46e1
KR
2258 sed -n "s/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=\${\1='\2'}/p" \
2259 >> confcache
2260if cmp -s $cache_file confcache; then
2261 :
b11fb939 2262else
833c46e1
KR
2263 if test -w $cache_file; then
2264 echo "updating cache $cache_file"
2265 cat confcache > $cache_file
2266 else
2267 echo "not updating unwritable cache $cache_file"
2268 fi
b11fb939 2269fi
833c46e1 2270rm -f confcache
b11fb939 2271
833c46e1 2272trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
b11fb939 2273
f2889110 2274test "x$prefix" = xNONE && prefix=$ac_default_prefix
b11fb939
KR
2275# Let make expand exec_prefix.
2276test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
2277
2278# Any assignment to VPATH causes Sun make to only execute
2279# the first set of double-colon rules, so remove it if not needed.
2280# If there is a colon in the path, we need to keep it.
2281if test "x$srcdir" = x.; then
2282 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
2283fi
2284
2285trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
2286
2287DEFS=-DHAVE_CONFIG_H
2288
2289# Without the "./", some shells look in PATH for config.status.
2290: ${CONFIG_STATUS=./config.status}
2291
28d3e4a3
KR
2292echo creating $CONFIG_STATUS
2293rm -f $CONFIG_STATUS
2294cat > $CONFIG_STATUS <<EOF
833c46e1 2295#! /bin/sh
b11fb939
KR
2296# Generated automatically by configure.
2297# Run this file to recreate the current configuration.
2298# This directory was configured as follows,
2299# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
2300#
e23b25ec 2301# $0 $ac_configure_args
b11fb939
KR
2302#
2303# Compiler output produced by configure, useful for debugging
2304# configure, is in ./config.log if it exists.
2305
28d3e4a3 2306ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
b11fb939
KR
2307for ac_option
2308do
2309 case "\$ac_option" in
2310 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
e23b25ec
KR
2311 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
2312 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
b11fb939 2313 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
df586de2 2314 echo "$CONFIG_STATUS generated by autoconf version 2.10"
b11fb939
KR
2315 exit 0 ;;
2316 -help | --help | --hel | --he | --h)
2317 echo "\$ac_cs_usage"; exit 0 ;;
2318 *) echo "\$ac_cs_usage"; exit 1 ;;
2319 esac
2320done
2321
2322ac_given_srcdir=$srcdir
2323ac_given_INSTALL="$INSTALL"
2324
833c46e1 2325trap 'rm -fr `echo "Makefile doc/Makefile .gdbinit:gdbinit.in conf" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
1c9dbb83
ILT
2326EOF
2327cat >> $CONFIG_STATUS <<EOF
b11fb939 2328
1c9dbb83
ILT
2329# Protect against being on the right side of a sed subst in config.status.
2330sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
2331 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
b11fb939
KR
2332$ac_vpsub
2333$extrasub
b11fb939 2334s%@CFLAGS@%$CFLAGS%g
b11fb939 2335s%@CPPFLAGS@%$CPPFLAGS%g
bf111c9f
KR
2336s%@CXXFLAGS@%$CXXFLAGS%g
2337s%@DEFS@%$DEFS%g
b11fb939 2338s%@LDFLAGS@%$LDFLAGS%g
bf111c9f
KR
2339s%@LIBS@%$LIBS%g
2340s%@exec_prefix@%$exec_prefix%g
2341s%@prefix@%$prefix%g
ba49e48d 2342s%@program_transform_name@%$program_transform_name%g
1c9dbb83
ILT
2343s%@bindir@%$bindir%g
2344s%@sbindir@%$sbindir%g
2345s%@libexecdir@%$libexecdir%g
2346s%@datadir@%$datadir%g
2347s%@sysconfdir@%$sysconfdir%g
2348s%@sharedstatedir@%$sharedstatedir%g
2349s%@localstatedir@%$localstatedir%g
2350s%@libdir@%$libdir%g
2351s%@includedir@%$includedir%g
2352s%@oldincludedir@%$oldincludedir%g
2353s%@infodir@%$infodir%g
2354s%@mandir@%$mandir%g
b11fb939
KR
2355s%@host@%$host%g
2356s%@host_alias@%$host_alias%g
2357s%@host_cpu@%$host_cpu%g
2358s%@host_vendor@%$host_vendor%g
2359s%@host_os@%$host_os%g
2360s%@target@%$target%g
2361s%@target_alias@%$target_alias%g
2362s%@target_cpu@%$target_cpu%g
2363s%@target_vendor@%$target_vendor%g
2364s%@target_os@%$target_os%g
2365s%@build@%$build%g
2366s%@build_alias@%$build_alias%g
2367s%@build_cpu@%$build_cpu%g
2368s%@build_vendor@%$build_vendor%g
2369s%@build_os@%$build_os%g
b11fb939
KR
2370/@target_frag@/r $target_frag
2371s%@target_frag@%%g
e7757ad0 2372s%@extra_objects@%$extra_objects%g
bf4bd1fc 2373s%@target_cpu_type@%$target_cpu_type%g
833c46e1
KR
2374s%@obj_format@%$obj_format%g
2375s%@atof@%$atof%g
ae09d880
ILT
2376s%@OPCODES_DEP@%$OPCODES_DEP%g
2377s%@OPCODES_LIB@%$OPCODES_LIB%g
1c9dbb83 2378s%@BFDDEP@%$BFDDEP%g
b11fb939
KR
2379s%@BFDLIB@%$BFDLIB%g
2380s%@ALL_OBJ_DEPS@%$ALL_OBJ_DEPS%g
2381s%@CC@%$CC%g
2382s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
2383s%@INSTALL_DATA@%$INSTALL_DATA%g
2384s%@CPP@%$CPP%g
2385s%@ALLOCA@%$ALLOCA%g
1c9dbb83 2386s%@HLDFLAGS@%$HLDFLAGS%g
1a2f3c3f 2387s%@RPATH_ENVVAR@%$RPATH_ENVVAR%g
b11fb939
KR
2388
2389CEOF
2390EOF
28d3e4a3 2391cat >> $CONFIG_STATUS <<EOF
b11fb939 2392
28d3e4a3 2393CONFIG_FILES=\${CONFIG_FILES-"Makefile doc/Makefile .gdbinit:gdbinit.in"}
bf111c9f 2394EOF
28d3e4a3
KR
2395cat >> $CONFIG_STATUS <<\EOF
2396for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
b11fb939
KR
2397 # Support "outfile[:infile]", defaulting infile="outfile.in".
2398 case "$ac_file" in
2399 *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'`
2400 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
2401 *) ac_file_in="${ac_file}.in" ;;
2402 esac
2403
2404 # Adjust relative srcdir, etc. for subdirectories.
2405
2406 # Remove last slash and all that follows it. Not all systems have dirname.
2407 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
2408 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
2409 # The file is in a subdirectory.
2410 test ! -d "$ac_dir" && mkdir "$ac_dir"
833c46e1 2411 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
b11fb939
KR
2412 # A "../" for each directory in $ac_dir_suffix.
2413 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
2414 else
2415 ac_dir_suffix= ac_dots=
2416 fi
2417
2418 case "$ac_given_srcdir" in
2419 .) srcdir=.
2420 if test -z "$ac_dots"; then top_srcdir=.
2421 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
2422 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
2423 *) # Relative path.
2424 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
2425 top_srcdir="$ac_dots$ac_given_srcdir" ;;
2426 esac
2427
2428 case "$ac_given_INSTALL" in
2429 [/$]*) INSTALL="$ac_given_INSTALL" ;;
28d3e4a3 2430 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
b11fb939
KR
2431 esac
2432 echo creating "$ac_file"
2433 rm -f "$ac_file"
28d3e4a3 2434 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
ba49e48d
KR
2435 case "$ac_file" in
2436 *Makefile*) ac_comsub="1i\\
2437# $configure_input" ;;
2438 *) ac_comsub= ;;
2439 esac
2440 sed -e "$ac_comsub
28d3e4a3 2441s%@configure_input@%$configure_input%g
b11fb939
KR
2442s%@srcdir@%$srcdir%g
2443s%@top_srcdir@%$top_srcdir%g
2444s%@INSTALL@%$INSTALL%g
2445" -f conftest.subs $ac_given_srcdir/$ac_file_in > $ac_file
2446fi; done
2447rm -f conftest.subs
2448
2449# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
2450# NAME is the cpp macro being defined and VALUE is the value it is being given.
2451#
2452# ac_d sets the value in "#define NAME VALUE" lines.
2453ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
2454ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
2455ac_dC='\3'
2456ac_dD='%g'
2457# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
2458ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
2459ac_uB='\([ ]\)%\1#\2define\3'
2460ac_uC=' '
2461ac_uD='\4%g'
2462# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
2463ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
2464ac_eB='$%\1#\2define\3'
2465ac_eC=' '
2466ac_eD='%g'
2467
2468CONFIG_HEADERS=${CONFIG_HEADERS-"conf"}
28d3e4a3 2469for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
b11fb939
KR
2470 # Support "outfile[:infile]", defaulting infile="outfile.in".
2471 case "$ac_file" in
2472 *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'`
2473 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
2474 *) ac_file_in="${ac_file}.in" ;;
2475 esac
2476
2477 echo creating $ac_file
2478
2479 rm -f conftest.frag conftest.in conftest.out
2480 cp $ac_given_srcdir/$ac_file_in conftest.in
2481
2482EOF
2483
2484# Transform confdefs.h into a sed script conftest.vals that substitutes
fb589130 2485# the proper values into config.h.in to produce config.h. And first:
1c9dbb83 2486# Protect against being on the right side of a sed subst in config.status.
fb589130 2487# Protect against being in an unquoted here document in config.status.
b11fb939
KR
2488rm -f conftest.vals
2489cat > conftest.hdr <<\EOF
b11fb939 2490s/[\\&%]/\\&/g
b11fb939 2491s%[\\$`]%\\&%g
df586de2 2492s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
b11fb939
KR
2493s%ac_d%ac_u%gp
2494s%ac_u%ac_e%gp
2495EOF
2496sed -n -f conftest.hdr confdefs.h > conftest.vals
2497rm -f conftest.hdr
2498
2499# This sed command replaces #undef with comments. This is necessary, for
2500# example, in the case of _POSIX_SOURCE, which is predefined and required
2501# on some systems where configure will not decide to define it.
2502cat >> conftest.vals <<\EOF
2503s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
2504EOF
2505
2506# Break up conftest.vals because some shells have a limit on
2507# the size of here documents, and old seds have small limits too.
2508# Maximum number of lines to put in a single here document.
2509ac_max_here_lines=12
2510
2511rm -f conftest.tail
2512while :
2513do
2514 ac_lines=`grep -c . conftest.vals`
2515 # grep -c gives empty output for an empty file on some AIX systems.
2516 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
2517 # Write a limited-size here document to conftest.frag.
28d3e4a3
KR
2518 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
2519 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
b11fb939
KR
2520 echo 'CEOF
2521 sed -f conftest.frag conftest.in > conftest.out
2522 rm -f conftest.in
2523 mv conftest.out conftest.in
28d3e4a3 2524' >> $CONFIG_STATUS
b11fb939
KR
2525 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
2526 rm -f conftest.vals
2527 mv conftest.tail conftest.vals
2528done
2529rm -f conftest.vals
2530
28d3e4a3 2531cat >> $CONFIG_STATUS <<\EOF
b11fb939
KR
2532 rm -f conftest.frag conftest.h
2533 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
2534 cat conftest.in >> conftest.h
2535 rm -f conftest.in
2536 if cmp -s $ac_file conftest.h 2>/dev/null; then
2537 echo "$ac_file is unchanged"
2538 rm -f conftest.h
2539 else
df586de2
ILT
2540 # Remove last slash and all that follows it. Not all systems have dirname.
2541 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
2542 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
2543 # The file is in a subdirectory.
2544 test ! -d "$ac_dir" && mkdir "$ac_dir"
2545 fi
b11fb939
KR
2546 rm -f $ac_file
2547 mv conftest.h $ac_file
2548 fi
2549fi; done
2550
2551EOF
2552
28d3e4a3 2553cat >> $CONFIG_STATUS <<EOF
e7757ad0
KR
2554ac_sources="$files"
2555ac_dests="$links"
b11fb939
KR
2556EOF
2557
28d3e4a3 2558cat >> $CONFIG_STATUS <<\EOF
bf111c9f 2559srcdir=$ac_given_srcdir
28d3e4a3
KR
2560while test -n "$ac_sources"; do
2561 set $ac_dests; ac_dest=$1; shift; ac_dests=$*
2562 set $ac_sources; ac_source=$1; shift; ac_sources=$*
b11fb939 2563
28d3e4a3
KR
2564 echo "linking $srcdir/$ac_source to $ac_dest"
2565
2566 if test ! -r $srcdir/$ac_source; then
ba49e48d 2567 { echo "configure: error: $srcdir/$ac_source: File not found" 1>&2; exit 1; }
28d3e4a3
KR
2568 fi
2569 rm -f $ac_dest
b11fb939 2570
28d3e4a3
KR
2571 # Make relative symlinks.
2572 # Remove last slash and all that follows it. Not all systems have dirname.
2573 ac_dest_dir=`echo $ac_dest|sed 's%/[^/][^/]*$%%'`
2574 if test "$ac_dest_dir" != "$ac_dest" && test "$ac_dest_dir" != .; then
2575 # The dest file is in a subdirectory.
2576 test ! -d "$ac_dest_dir" && mkdir "$ac_dest_dir"
833c46e1 2577 ac_dest_dir_suffix="/`echo $ac_dest_dir|sed 's%^\./%%'`"
28d3e4a3
KR
2578 # A "../" for each directory in $ac_dest_dir_suffix.
2579 ac_dots=`echo $ac_dest_dir_suffix|sed 's%/[^/]*%../%g'`
2580 else
2581 ac_dest_dir_suffix= ac_dots=
b11fb939 2582 fi
28d3e4a3
KR
2583
2584 case "$srcdir" in
2585 [/$]*) ac_rel_source="$srcdir/$ac_source" ;;
2586 *) ac_rel_source="$ac_dots$srcdir/$ac_source" ;;
2587 esac
2588
b11fb939 2589 # Make a symlink if possible; otherwise try a hard link.
28d3e4a3
KR
2590 if ln -s $ac_rel_source $ac_dest 2>/dev/null ||
2591 ln $srcdir/$ac_source $ac_dest; then :
b11fb939 2592 else
ba49e48d 2593 { echo "configure: error: can not link $ac_dest to $srcdir/$ac_source" 1>&2; exit 1; }
b11fb939
KR
2594 fi
2595done
2596
bf111c9f 2597
36e889af 2598exit 0
b11fb939 2599EOF
28d3e4a3 2600chmod +x $CONFIG_STATUS
bf111c9f 2601rm -fr confdefs* $ac_clean_files
833c46e1 2602test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
b11fb939 2603
This page took 0.223691 seconds and 4 git commands to generate.