* Makefile.am: New file, based on old Makefile.in.
[deliverable/binutils-gdb.git] / gas / configure
CommitLineData
833c46e1 1#! /bin/sh
fb589130 2
b11fb939 3# Guess values for system-dependent variables and create Makefiles.
e2b4bd2a 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)
e2b4bd2a 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.
e2b4bd2a 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)
e2b4bd2a 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
e2b4bd2a 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
e2b4bd2a 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
e2b4bd2a
ILT
634build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
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
1083 /*)
1084 ac_cv_path_LD="$LD" # Let the user override the test with a path.
1085 ;;
1086 *)
1087 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1088 for ac_dir in $PATH; do
1089 test -z "$ac_dir" && ac_dir=.
1090 if test -f "$ac_dir/ld"; then
1091 ac_cv_path_LD="$ac_dir/ld"
1092 # Check to see if the program is GNU ld. I'd rather use --version,
1093 # but apparently some GNU ld's only accept -v.
1094 # Break only if it was the GNU/non-GNU ld that we prefer.
1095 if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU ld|with BFD)' > /dev/null; then
1096 test "$with_gnu_ld" = yes && break
1097 else
1098 test "$with_gnu_ld" != yes && break
1099 fi
1100 fi
1101 done
1102 IFS="$ac_save_ifs"
1103 ;;
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
1292 case ${cpu} in
ae09d880
ILT
1293 armeb) cpu_type=arm endian=big ;;
1294 arm*) cpu_type=arm endian=little ;;
76fb6d2f 1295 thumb*) cpu_type=arm endian=little ;;
e7757ad0 1296 hppa*) cpu_type=hppa ;;
7c2fadd1 1297 i[456]86) cpu_type=i386 ;;
e7757ad0
KR
1298 m680[012346]0) cpu_type=m68k ;;
1299 m68008) cpu_type=m68k ;;
1300 m683??) cpu_type=m68k ;;
1301 m8*) cpu_type=m88k ;;
e16b9537 1302 mips*el) cpu_type=mips endian=little ;;
ea1c39ce 1303 mips*5900*) cpu_type=mips endian=little ;;
e7757ad0
KR
1304 mips*) cpu_type=mips endian=big ;;
1305 powerpcle*) cpu_type=ppc endian=little ;;
1306 powerpc*) cpu_type=ppc endian=big ;;
1307 rs6000*) cpu_type=ppc ;;
6df07e7f 1308 sparc64) cpu_type=sparc want_sparc_v9=true ;;
63e4edb5 1309 sparc*) cpu_type=sparc ;;
a1c7c0f3 1310 *) cpu_type=${cpu} ;;
e7757ad0
KR
1311 esac
1312
1313 if test ${this_target} = $target ; then
1314 target_cpu_type=${cpu_type}
1315 elif test ${target_cpu_type} != ${cpu_type} ; then
1316 continue
1317 fi
1318
1319 targ=${cpu_type}
1320 generic_target=${cpu_type}-$vendor-$os
1321 dev=no
1322 bfd_gas=no
1323 em=generic
1324
1325 # assign object format
1326 case ${generic_target} in
805e36ab 1327 a29k-*-coff) fmt=coff targ=ebmon29k ;;
e7757ad0
KR
1328 a29k-amd-udi) fmt=coff targ=ebmon29k ;;
1329 a29k-amd-ebmon) fmt=coff targ=ebmon29k ;;
880b7429 1330 a29k-nyu-sym1) fmt=coff targ=ebmon29k ;;
e7757ad0
KR
1331 a29k-*-vxworks*) fmt=coff ;;
1332
c6aa56bc 1333 alpha-*-*vms*) fmt=evax ;;
e7757ad0 1334 alpha-*-netware*) fmt=ecoff ;;
894cca25 1335 alpha-*-openbsd*) fmt=ecoff ;;
e7757ad0 1336 alpha-*-osf*) fmt=ecoff ;;
df586de2
ILT
1337 alpha-*-linuxecoff*) fmt=ecoff ;;
1338 alpha-*-linux*) fmt=elf em=linux ;;
b11fb939 1339
4181c985 1340# start-sanitize-arc
e7757ad0 1341 arc-*-elf*) fmt=elf bfd_gas=yes ;;
4181c985
KR
1342# end-sanitize-arc
1343
7be9a312 1344 arm-*-riscix*) fmt=aout targ=arm-lit em=riscix ;;
1cb0d00d
KR
1345 arm-*-aout) fmt=aout
1346 case "$endian" in
1347 big) targ=arm-big ;;
1348 *) targ=arm-lit ;;
1349 esac
1350 ;;
76fb6d2f 1351 arm-*-coff | thumb-*-coff) fmt=coff ;;
e7757ad0 1352 arm-*-riscix*) fmt=aout ;;
1cb0d00d 1353 arm-*-pe) fmt=coff targ=armcoff em=pe ;;
e7757ad0 1354
cbe7dccb 1355 d10v-*-*) fmt=elf bfd_gas=yes ;;
7d0f8249
MH
1356# start-sanitize-d30v
1357 d30v-*-*) fmt=elf bfd_gas=yes ;;
1358# end-sanitize-d30v
7be9a312 1359
e7757ad0
KR
1360 hppa-*-*elf*) fmt=elf em=hppa ;;
1361 hppa-*-lites*) fmt=elf em=hppa ;;
1362 hppa-*-osf*) fmt=som em=hppa ;;
332d5c49 1363 hppa-*-rtems*) fmt=elf em=hppa ;;
e7757ad0
KR
1364 hppa-*-hpux*) fmt=som em=hppa ;;
1365 hppa-*-bsd*) fmt=som em=hppa ;;
1366 hppa-*-hiux*) fmt=som em=hppa ;;
1367
1368 h8300-*-coff) fmt=coff ;;
1369
1370 i386-ibm-aix*) fmt=coff targ=i386coff
1371 em=i386aix ;;
7d0f8249 1372 i386-sequent-bsd*) fmt=aout em=dynix bfd_gas=yes ;;
e7757ad0
KR
1373 i386-*-bsd*) fmt=aout em=386bsd ;;
1374 i386-*-netbsd0.8) fmt=aout em=386bsd ;;
1375 i386-*-netbsd*) fmt=aout em=nbsd bfd_gas=yes;;
76fb6d2f 1376 i386-*-openbsd*) fmt=aout em=nbsd bfd_gas=yes;;
a1c7c0f3 1377 i386-*-linux*aout* | i386-*-linuxoldld) fmt=aout em=linux ;;
e7757ad0
KR
1378 i386-*-linux*coff*) fmt=coff em=linux
1379 targ=i386coff ;;
1380 i386-*-linux*) fmt=elf em=linux ;;
1381 i386-*-lynxos*) fmt=coff targ=i386coff
1382 em=lynx ;;
2ae5f50b 1383 i386-*-sysv4* | i386-*-solaris* | i386-*-elf | i386-*-freebsdelf*)
e7757ad0 1384 fmt=elf ;;
66b935da 1385 i386-*-sco*elf*) fmt=elf targ=sco5 ;;
e7757ad0
KR
1386 i386-*-coff | i386-*-sysv* | i386-*-sco* | i386-*-isc*)
1387 fmt=coff targ=i386coff ;;
1388 i386-*-vsta) fmt=aout ;;
ea1c39ce
ILT
1389 i386-*-msdosdjgpp* | i386-*-go32*)
1390 fmt=coff targ=coffgo32 em=go32;;
7be9a312 1391 i386-*-rtems*) fmt=coff targ=i386coff ;;
6c186c48
SC
1392 i386-*-gnu*) fmt=elf ;;
1393 i386-*-mach*)
e7757ad0
KR
1394 fmt=aout em=mach bfd_gas=yes ;;
1395 i386-*-msdos*) fmt=aout ;;
6c186c48 1396 i386-*-moss*) fmt=elf ;;
d0352cbb 1397 i386-*-pe) fmt=coff targ=i386coff em=pe ;;
76fb6d2f 1398 i386-*-cygwin32) fmt=coff targ=i386coff em=pe bfd_gas=yes ;;
d0352cbb 1399 i386-*-*nt) fmt=coff targ=i386coff em=pe ;;
e7757ad0
KR
1400 i960-*-bout) fmt=bout ;;
1401 i960-*-coff) fmt=coff em=ic960 targ=ic960coff ;;
7be9a312 1402 i960-*-rtems*) fmt=coff em=ic960 targ=ic960coff ;;
e7757ad0
KR
1403 i960-*-nindy*) fmt=bout ;;
1404 i960-*-vxworks4*) fmt=bout ;;
1405 i960-*-vxworks5.0) fmt=bout ;;
1406 i960-*-vxworks5.*) fmt=coff em=ic960 targ=ic960coff ;;
1407 i960-*-vxworks*) fmt=bout ;;
1408
374bdac7
DE
1409 m32r-*-*) fmt=elf bfd_gas=yes ;;
1410
e7757ad0
KR
1411 m68k-*-vxworks* | m68k-ericsson-ose | m68k-*-sunos*)
1412 fmt=aout em=sun3 ;;
880b7429 1413 m68k-motorola-sysv*) fmt=coff targ=m68kcoff em=delta ;;
e7757ad0
KR
1414 m68k-bull-sysv3*) fmt=coff targ=m68kcoff em=dpx2 ;;
1415 m68k-apollo-*) fmt=coff targ=apollo em=apollo ;;
fee3e248
ILT
1416 m68k-*-sysv4*) # must be before -sysv*
1417 fmt=elf em=svr4 ;;
1418 m68k-*-elf*) fmt=elf ;;
7be9a312 1419 m68k-*-coff | m68k-*-sysv* | m68k-*-rtems*)
e7757ad0 1420 fmt=coff targ=m68kcoff ;;
e7757ad0 1421 m68k-*-hpux*) fmt=hp300 em=hp300 ;;
535cfd0f
ILT
1422 m68k-*-linux*aout*) fmt=aout em=linux ;;
1423 m68k-*-linux*) fmt=elf em=linux ;;
e7757ad0
KR
1424 m68k-*-lynxos*) fmt=coff targ=m68kcoff
1425 em=lynx ;;
1426 m68k-*-netbsd*) fmt=aout em=nbsd bfd_gas=yes ;;
76fb6d2f 1427 m68k-*-openbsd*) fmt=aout em=nbsd bfd_gas=yes ;;
2b37714a
ILT
1428 m68k-apple-aux*) fmt=coff targ=m68kcoff em=aux ;;
1429 m68k-*-psos*) fmt=elf em=psos;;
e7757ad0 1430
880b7429 1431 m88k-motorola-sysv3*) fmt=coff targ=m88kcoff em=delt88 ;;
e7757ad0
KR
1432 m88k-*-coff*) fmt=coff targ=m88kcoff ;;
1433
1434 # don't change em like *-*-bsd does
4cbbec31 1435 mips-dec-netbsd*) fmt=elf targ=mips-lit endian=little ;;
76fb6d2f 1436 mips-dec-openbsd*) fmt=elf targ=mips-lit endian=little ;;
e7757ad0
KR
1437 mips-dec-bsd*) fmt=aout targ=mips-lit ;;
1438 mips-sony-bsd*) fmt=ecoff targ=mips-big ;;
1439 mips-*-bsd*) { echo "configure: error: Unknown vendor for mips-bsd configuration." 1>&2; exit 1; } ;;
70f4dbce 1440 mips-*-ultrix*) fmt=ecoff targ=mips-lit endian=little ;;
7be9a312 1441 mips-*-osf*) fmt=ecoff targ=mips-lit endian=little ;;
e7757ad0
KR
1442 mips-*-ecoff*) fmt=ecoff
1443 case "$endian" in
1444 big) targ=mips-big ;;
1445 *) targ=mips-lit ;;
1446 esac
1447 ;;
1448 mips-*-ecoff*) fmt=ecoff targ=mips-big ;;
cbe7dccb 1449 mips-*-irix6*) fmt=elf targ=mips-big ;;
e7757ad0
KR
1450 mips-*-irix5*) fmt=elf targ=mips-big ;;
1451 mips-*-irix*) fmt=ecoff targ=mips-big ;;
515c7142 1452 mips-*-lnews*) fmt=ecoff targ=mips-lit em=lnews ;;
e7757ad0
KR
1453 mips-*-riscos*) fmt=ecoff targ=mips-big ;;
1454 mips-*-sysv*) fmt=ecoff targ=mips-big ;;
fc984eb0 1455 mips-*-elf* | mips-*-rtems* | mips-*-linux* | mips-*-gnu* | mips-*-openbsd*)
fed13a5e 1456 fmt=elf
e7757ad0
KR
1457 case "$endian" in
1458 big) targ=mips-big ;;
1459 *) targ=mips-lit ;;
1460 esac
1461 ;;
ae1b99e4
JL
1462 mn10200-*-*) fmt=elf bfd_gas=yes ;;
1463 mn10300-*-*) fmt=elf bfd_gas=yes ;;
0ff513d9
SC
1464 ppc-*-pe | ppc-*-cygwin32 | ppc-*-winnt*)
1465 fmt=coff em=pe
85cc2190
KK
1466 case "$endian" in
1467 big) targ=ppc-big ;;
1468 *) targ=ppc-lit ;;
1469 esac
1470 ;;
e7757ad0 1471 ppc-*-aix*) fmt=coff ;;
515c7142 1472 ppc-*-beos*) fmt=coff ;;
76fb6d2f 1473 ppc-*-*bsd* | ppc-*-elf* | ppc-*-eabi* | ppc-*-sysv4*)
e7757ad0
KR
1474 fmt=elf
1475 case "$endian" in
1476 big) targ=ppc-big ;;
1477 *) targ=ppc-lit ;;
1478 esac
1479 ;;
159e6ef8
MM
1480 ppc-*-linux*) fmt=elf
1481 case "$endian" in
1482 big) targ=ppc-big ;;
1483 *) { echo "configure: error: Linux must be configured big endian" 1>&2; exit 1; } ;;
1484 esac
1485 ;;
1486 ppc-*-solaris*) fmt=elf
1487 case "$endian" in
1488 big) { echo "configure: error: Solaris must be configured little endian" 1>&2; exit 1; } ;;
1489 *) targ=ppc-sol ;;
1490 esac
1491 ;;
7be9a312
MH
1492 ppc-*-rtems*)
1493 fmt=elf
1494 case "$endian" in
1495 big) targ=ppc-big ;;
1496 *) targ=ppc-lit ;;
1497 esac
1498 ;;
880b7429
KR
1499 ppc-*-macos* | ppc-*-mpw*)
1500 fmt=coff em=macos ;;
e7757ad0
KR
1501 ppc-*-netware*) fmt=elf em=ppcnw ;;
1502
df4021c1
DE
1503 sh-*-elf*) fmt=elf ;;
1504 sh-*-coff*) fmt=coff ;;
b11fb939 1505
5f757edc
ILT
1506 ns32k-pc532-mach* | ns32k-pc532-ux*) fmt=aout em=pc532mach ;;
1507 ns32k-pc532-netbsd* | ns32k-pc532-lites*) fmt=aout em=nbsd532 ;;
76fb6d2f 1508 ns32k-pc532-openbsd*) fmt=aout em=nbsd532 ;;
e7757ad0 1509
7be9a312 1510 sparc-*-rtems*) fmt=aout ;;
e7757ad0 1511 sparc-*-sunos4*) fmt=aout em=sun3 ;;
df586de2 1512 sparc-*-aout | sparc*-*-vxworks*)
df4021c1 1513 fmt=aout em=sparcaout ;;
e7757ad0 1514 sparc-*-coff) fmt=coff ;;
2e013bb7
ILT
1515 sparc-*-linux*aout*) fmt=aout em=linux ;;
1516 sparc-*-linux*) fmt=elf em=linux ;;
e7757ad0
KR
1517 sparc-*-lynxos*) fmt=coff em=lynx ;;
1518 sparc-fujitsu-none) fmt=aout ;;
0b27ea39 1519 sparc-*-elf | sparc-*-sysv4* | sparc-*-solaris*)
e7757ad0
KR
1520 fmt=elf ;;
1521 sparc-*-netbsd*) fmt=aout em=nbsd bfd_gas=yes ;;
76fb6d2f 1522 sparc-*-openbsd*) fmt=aout em=nbsd bfd_gas=yes ;;
e7757ad0 1523
64556643 1524# start-sanitize-tic80
7d0f8249 1525 tic80-*-*) fmt=coff targ=tic80coff;;
64556643 1526# end-sanitize-tic80
ec2f730d 1527# start-sanitize-v850
c6aa56bc
C
1528 v850-*-*) fmt=elf bfd_gas=yes ;;
1529
ec2f730d 1530# end-sanitize-v850
e7757ad0
KR
1531 vax-*-bsd* | vax-*-ultrix*)
1532 fmt=aout ;;
1533 vax-*-vms) fmt=vms ;;
1534
1535 z8k-*-coff | z8k-*-sim)
1536 fmt=coff ;;
1537
1538 w65-*-*) fmt=coff ;;
1539
1540 *-*-aout | *-*-scout)
1541 fmt=aout ;;
1542 *-*-nindy*)
1543 fmt=bout ;;
1544 *-*-bsd*)
1545 fmt=aout em=sun3 ;;
1546 *-*-generic) fmt=generic ;;
1547 *-*-xray | *-*-hms) fmt=coff ;;
1548 *-*-sim) fmt=coff ;;
1549 *-*-elf | *-*-sysv4* | *-*-solaris*)
6df07e7f 1550 echo "configure: warning: GAS support for ${generic_target} is incomplete." 1>&2
e7757ad0
KR
1551 fmt=elf dev=yes ;;
1552 *-*-vxworks) fmt=aout ;;
1553 *-*-netware) fmt=elf ;;
1554 esac
1555
1556 case ${cpu_type}-${fmt} in
df586de2 1557 alpha-*) bfd_gas=yes ;;
e7757ad0
KR
1558 arm-*) bfd_gas=yes ;;
1559 # not yet
1560 # i386-aout) bfd_gas=preferred ;;
1561 mips-*) bfd_gas=yes ;;
1562 ns32k-*) bfd_gas=yes ;;
1563 ppc-*) bfd_gas=yes ;;
1564 sparc-*) bfd_gas=yes ;;
1565 *-elf) bfd_gas=yes ;;
1566 *-ecoff) bfd_gas=yes ;;
1567 *-som) bfd_gas=yes ;;
1568 *) ;;
1569 esac
1570
5f757edc
ILT
1571# Other random stuff.
1572
ae09d880
ILT
1573 # do we need the opcodes library?
1574 case ${cpu_type} in
df586de2 1575 vax | i386)
7c2fadd1
ILT
1576 ;;
1577 *)
1578 need_opcodes=yes
159e6ef8 1579 if test "${shared_opcodes}" = "true"; then
7c2fadd1
ILT
1580 # A shared libopcodes must be linked against libbfd.
1581 need_bfd=yes
1582 fi
1583 ;;
ae09d880
ILT
1584 esac
1585
6df07e7f
DE
1586 test -n "$want_sparc_v9" && cat >> confdefs.h <<\EOF
1587#define SPARC_V9 1
5f757edc
ILT
1588EOF
1589
1590
6df07e7f
DE
1591 case ${cpu}-${vendor}-${os} in
1592 sparc64-*-elf*) cat >> confdefs.h <<\EOF
1593#define SPARC_ARCH64 1
1594EOF
1595 ;;
1596 esac
1597
5f757edc 1598 case ${cpu_type} in
374bdac7
DE
1599 m32r)
1600 case ${extra_objects} in
1601 *cgen.o*) ;;
1602 *) extra_objects="$extra_objects cgen.o"
374bdac7
DE
1603 cat >> confdefs.h <<\EOF
1604#define USING_CGEN 1
1605EOF
1606
1607 ;;
1608 esac
1609 ;;
1610
1c9dbb83
ILT
1611 m68k)
1612 case ${extra_objects} in
1613 *m68k-parse.o*) ;;
1614 *) extra_objects="$extra_objects m68k-parse.o" ;;
1615 esac
1616 ;;
efec4a28
DP
1617
1618 mips)
1619 echo ${extra_objects} | grep -s "itbl-parse.o"
1620 if test $? -ne 0 ; then
515c7142 1621 extra_objects="$extra_objects itbl-parse.o"
efec4a28
DP
1622 fi
1623
1624 echo ${extra_objects} | grep -s "itbl-lex.o"
1625 if test $? -ne 0 ; then
515c7142 1626 extra_objects="$extra_objects itbl-lex.o"
efec4a28
DP
1627 fi
1628
1629 echo ${extra_objects} | grep -s "itbl-ops.o"
1630 if test $? -ne 0 ; then
515c7142 1631 extra_objects="$extra_objects itbl-ops.o"
efec4a28
DP
1632 fi
1633 ;;
1634
1635 *)
1636 ;;
5f757edc
ILT
1637 esac
1638
e7757ad0
KR
1639# See if we really can support this configuration with the emulation code.
1640
1641 if test $this_target = $target ; then
1642 primary_bfd_gas=$bfd_gas
1643 obj_format=$fmt
1644 gas_target=$targ
1645 te_file=$em
1646
1647 if test $bfd_gas = no ; then
1648 # Can't support other configurations this way.
1649 break
1650 fi
1651 elif test $bfd_gas = no ; then
1652 # Can't support this configuration.
1653 break
1654 fi
1655
1656# From target name and format, produce a list of supported emulations.
1657
1658 case ${generic_target}-${fmt} in
1cb0d00d 1659 mips-*-irix5*-*) emulation="mipsbelf mipslelf mipself mipsbecoff mipslecoff mipsecoff" ;;
515c7142
ILT
1660 mips-*-linux*-*) case "$endian" in
1661 big) emulation="mipsbelf mipslelf mipself mipsbecoff mipslecoff mipsecoff" ;;
1662 *) emulation="mipslelf mipsbelf mipself mipslecoff mipsbecoff mipsecoff" ;;
1663 esac ;;
1664 mips-*-lnews*-ecoff) ;;
e7757ad0 1665 mips-*-*-ecoff) case "$endian" in
1cb0d00d
KR
1666 big) emulation="mipsbecoff mipslecoff mipsecoff" ;;
1667 *) emulation="mipslecoff mipsbecoff mipsecoff" ;;
e7757ad0
KR
1668 esac ;;
1669 mips-*-*-elf) case "$endian" in
1cb0d00d
KR
1670 big) emulation="mipsbelf mipslelf mipself" ;;
1671 *) emulation="mipslelf mipsbelf mipself" ;;
515c7142
ILT
1672 # Uncommenting the next line will turn on support for i386 COFF
1673 # in any i386 ELF configuration. This probably doesn't work
1674 # correctly.
1675 # i386-*-*-elf) emulation="i386coff i386elf" ;;
e7757ad0
KR
1676 esac ;;
1677 esac
1678
1679 emulations="$emulations $emulation"
1680
e7757ad0 1681done
b11fb939
KR
1682
1683# Assign floating point type. Most processors with FP support
1684# IEEE FP. On those that don't support FP at all, usually IEEE
1685# is emulated.
1686case ${target_cpu} in
1687 vax | tahoe ) atof=${target_cpu} ;;
e7757ad0 1688 *) atof=ieee ;;
b11fb939
KR
1689esac
1690
1691case "${obj_format}" in
ba49e48d 1692 "") { echo "configure: error: GAS does not know what format to use for target ${target}" 1>&2; exit 1; } ;;
b11fb939
KR
1693esac
1694
1695
bf4bd1fc
ILT
1696if test ! -r ${srcdir}/config/tc-${target_cpu_type}.c; then
1697 { echo "configure: error: GAS does not support target CPU ${target_cpu_type}" 1>&2; exit 1; }
b11fb939
KR
1698fi
1699
fb589130 1700if test ! -r ${srcdir}/config/obj-${obj_format}.c; then
ba49e48d 1701 { echo "configure: error: GAS does not have support for object file format ${obj_format}" 1>&2; exit 1; }
b11fb939
KR
1702fi
1703
b11fb939
KR
1704# and target makefile frag
1705
1706target_frag=${srcdir}/config/${gas_target}.mt
f2889110
KR
1707if test ! -r ${target_frag}; then
1708 target_frag=/dev/null # ick! but subst_file can't be conditionalized
1709fi
b11fb939 1710
4cbbec31 1711
e7757ad0 1712case ${user_bfd_gas}-${primary_bfd_gas} in
b11fb939
KR
1713 yes-yes | no-no)
1714 # We didn't override user's choice.
1715 ;;
1716 no-yes)
1717 echo "configure: warning: Use of BFD is required for ${target}; overriding config options." 1>&2
1718 ;;
1719 no-preferred)
e7757ad0 1720 primary_bfd_gas=no
b11fb939
KR
1721 ;;
1722 *-preferred)
e7757ad0 1723 primary_bfd_gas=yes
b11fb939 1724 ;;
ba49e48d 1725 yes-*)
e7757ad0 1726 primary_bfd_gas=yes
ba49e48d 1727 ;;
b11fb939
KR
1728 -*)
1729 # User specified nothing.
1730 ;;
1731esac
1732
e7757ad0
KR
1733# Some COFF configurations want these random other flags set.
1734case ${obj_format} in
1735 coff)
1736 case ${target_cpu_type} in
1737 i386) cat >> confdefs.h <<\EOF
1738#define I386COFF 1
1739EOF
1740 ;;
1741 m68k) cat >> confdefs.h <<\EOF
1742#define M68KCOFF 1
1743EOF
1744 ;;
1745 m88k) cat >> confdefs.h <<\EOF
1746#define M88KCOFF 1
1747EOF
1748 ;;
1749 esac
1750 ;;
1751esac
1752
1753# Getting this done right is going to be a bitch. Each configuration specified
1754# with --enable-targets=... should be checked for environment, format, cpu, and
1755# bfd_gas setting.
1756#
1757# For each configuration, the necessary object file support code must be linked
1758# in. This might be only one, it might be up to four. The necessary emulation
1759# code needs to be provided, too.
1760#
1761# And then there's "--enable-targets=all"....
1762#
1763# For now, just always do it for MIPS ELF or ECOFF configurations. Sigh.
1764
1765formats="${obj_format}"
1766emfiles=""
1767EMULATIONS=""
1768_gas_uniq_list="$emulations"
1769_gas_uniq_newlist=""
1770for _gas_uniq_i in _gas_uniq_dummy $_gas_uniq_list ; do
1771 case $_gas_uniq_i in
1772 _gas_uniq_dummy) ;;
1773 *) case " $_gas_uniq_newlist " in
1774 *" $_gas_uniq_i "*) ;;
1775 *) _gas_uniq_newlist="$_gas_uniq_newlist $_gas_uniq_i" ;;
1776 esac ;;
1777 esac
1778done
1779emulations=$_gas_uniq_newlist
1780
1781for em in . $emulations ; do
1782 case $em in
1783 .) continue ;;
1784 mipsbelf | mipslelf)
1785 fmt=elf file=mipself ;;
1786 mipsbecoff | mipslecoff)
1787 fmt=ecoff file=mipsecoff ;;
515c7142
ILT
1788 i386coff)
1789 fmt=coff file=i386coff ;;
1790 i386elf)
1791 fmt=elf file=i386elf ;;
e7757ad0
KR
1792 esac
1793 formats="$formats $fmt"
1794 emfiles="$emfiles e-$file.o"
1795 EMULATIONS="$EMULATIONS &$em,"
1796done
1797_gas_uniq_list="$formats"
1798_gas_uniq_newlist=""
1799for _gas_uniq_i in _gas_uniq_dummy $_gas_uniq_list ; do
1800 case $_gas_uniq_i in
1801 _gas_uniq_dummy) ;;
1802 *) case " $_gas_uniq_newlist " in
1803 *" $_gas_uniq_i "*) ;;
1804 *) _gas_uniq_newlist="$_gas_uniq_newlist $_gas_uniq_i" ;;
1805 esac ;;
1806 esac
1807done
1808formats=$_gas_uniq_newlist
1809
1810_gas_uniq_list="$emfiles"
1811_gas_uniq_newlist=""
1812for _gas_uniq_i in _gas_uniq_dummy $_gas_uniq_list ; do
1813 case $_gas_uniq_i in
1814 _gas_uniq_dummy) ;;
1815 *) case " $_gas_uniq_newlist " in
1816 *" $_gas_uniq_i "*) ;;
1817 *) _gas_uniq_newlist="$_gas_uniq_newlist $_gas_uniq_i" ;;
1818 esac ;;
1819 esac
1820done
1821emfiles=$_gas_uniq_newlist
1822
1823if test `set . $formats ; shift ; echo $#` -gt 1 ; then
1824 for fmt in $formats ; do
1825 case $fmt in
1826 aout) cat >> confdefs.h <<\EOF
1827#define OBJ_MAYBE_AOUT 1
1828EOF
1829 ;;
1830 bout) cat >> confdefs.h <<\EOF
1831#define OBJ_MAYBE_BOUT 1
1832EOF
1833 ;;
1834 coff) cat >> confdefs.h <<\EOF
1835#define OBJ_MAYBE_COFF 1
1836EOF
1837 ;;
1838 ecoff) cat >> confdefs.h <<\EOF
1839#define OBJ_MAYBE_ECOFF 1
1840EOF
1841 ;;
1842 elf) cat >> confdefs.h <<\EOF
1843#define OBJ_MAYBE_ELF 1
1844EOF
1845 ;;
1846 generic) cat >> confdefs.h <<\EOF
1847#define OBJ_MAYBE_GENERIC 1
1848EOF
1849 ;;
1850 hp300) cat >> confdefs.h <<\EOF
1851#define OBJ_MAYBE_HP300 1
1852EOF
1853 ;;
1854 ieee) cat >> confdefs.h <<\EOF
1855#define OBJ_MAYBE_IEEE 1
1856EOF
1857 ;;
1858 som) cat >> confdefs.h <<\EOF
1859#define OBJ_MAYBE_SOM 1
1860EOF
1861 ;;
1862 vms) cat >> confdefs.h <<\EOF
1863#define OBJ_MAYBE_VMS 1
1864EOF
1865 ;;
1866 esac
1867 extra_objects="$extra_objects obj-$fmt.o"
1868 done
1869 obj_format=multi
1870fi
1871if test `set . $emfiles ; shift ; echo $#` -gt 0 ; then
1872 te_file=multi
1873 extra_objects="$extra_objects $emfiles"
1874 DEFAULT_EMULATION=`set . $emulations ; echo $2`
1875 cat >> confdefs.h <<\EOF
1876#define USE_EMULATIONS 1
1877EOF
1878
1879fi
1880
1881cat >> confdefs.h <<EOF
1882#define EMULATIONS $EMULATIONS
1883EOF
1884
1885cat >> confdefs.h <<EOF
1886#define DEFAULT_EMULATION "$DEFAULT_EMULATION"
1887EOF
1888
1889
bf4bd1fc 1890case ${primary_bfd_gas}-${target_cpu_type}-${obj_format} in
318b02b6
KR
1891 yes-*-coff) need_bfd=yes ;;
1892 no-*-coff) need_bfd=yes
1893 cat >> confdefs.h <<\EOF
1894#define MANY_SEGMENTS 1
1895EOF
1896 ;;
1897esac
1898
b11fb939
KR
1899reject_dev_configs=yes
1900
1901case ${reject_dev_configs}-${dev} in
1902 yes-yes) # Oops.
ba49e48d 1903 { echo "configure: error: GAS does not support the ${generic_target} configuration." 1>&2; exit 1; }
b11fb939
KR
1904 ;;
1905esac
1906
b11fb939
KR
1907
1908
833c46e1
KR
1909
1910
1911
e7757ad0 1912case "${primary_bfd_gas}" in
b11fb939
KR
1913 yes) cat >> confdefs.h <<\EOF
1914#define BFD_ASSEMBLER 1
1915EOF
1916
1917 need_bfd=yes ;;
1918esac
1919
ae09d880
ILT
1920# do we need the opcodes library?
1921case "${need_opcodes}" in
7be9a312 1922yes)
e2b4bd2a 1923 OPCODES_LIB=../opcodes/libopcodes.la
7be9a312 1924 ;;
ae09d880
ILT
1925esac
1926
b11fb939 1927case "${need_bfd}" in
7be9a312 1928yes)
e2b4bd2a 1929 BFDLIB=../bfd/libbfd.la
7be9a312 1930 ALL_OBJ_DEPS="$ALL_OBJ_DEPS ../bfd/bfd.h"
7be9a312 1931 ;;
b11fb939
KR
1932esac
1933
1934
1935
1c9dbb83 1936
2e013bb7
ILT
1937
1938
b11fb939
KR
1939cat >> confdefs.h <<EOF
1940#define TARGET_ALIAS "${target_alias}"
1941EOF
1942
1943cat >> confdefs.h <<EOF
1944#define TARGET_CANONICAL "${target}"
1945EOF
1946
1947cat >> confdefs.h <<EOF
1948#define TARGET_CPU "${target_cpu}"
1949EOF
1950
1951cat >> confdefs.h <<EOF
1952#define TARGET_VENDOR "${target_vendor}"
1953EOF
1954
1955cat >> confdefs.h <<EOF
1956#define TARGET_OS "${target_os}"
1957EOF
1958
1959
330add8a
ILT
1960# Extract the first word of "gcc", so it can be a program name with args.
1961set dummy gcc; ac_word=$2
1962echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
e2b4bd2a 1963echo "configure:1964: checking for $ac_word" >&5
330add8a
ILT
1964if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1965 echo $ac_n "(cached) $ac_c" 1>&6
1966else
1967 if test -n "$CC"; then
1968 ac_cv_prog_CC="$CC" # Let the user override the test.
1969else
1970 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1971 for ac_dir in $PATH; do
1972 test -z "$ac_dir" && ac_dir=.
1973 if test -f $ac_dir/$ac_word; then
1974 ac_cv_prog_CC="gcc"
1975 break
1976 fi
1977 done
1978 IFS="$ac_save_ifs"
330add8a
ILT
1979fi
1980fi
1981CC="$ac_cv_prog_CC"
1982if test -n "$CC"; then
1983 echo "$ac_t""$CC" 1>&6
1984else
1985 echo "$ac_t""no" 1>&6
1986fi
1987
d0352cbb
DE
1988if test -z "$CC"; then
1989 # Extract the first word of "cc", so it can be a program name with args.
1990set dummy cc; ac_word=$2
1991echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
e2b4bd2a 1992echo "configure:1993: checking for $ac_word" >&5
d0352cbb
DE
1993if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1994 echo $ac_n "(cached) $ac_c" 1>&6
1995else
1996 if test -n "$CC"; then
1997 ac_cv_prog_CC="$CC" # Let the user override the test.
1998else
1999 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2000 ac_prog_rejected=no
2001 for ac_dir in $PATH; do
2002 test -z "$ac_dir" && ac_dir=.
2003 if test -f $ac_dir/$ac_word; then
2004 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
2005 ac_prog_rejected=yes
2006 continue
2007 fi
2008 ac_cv_prog_CC="cc"
2009 break
2010 fi
2011 done
2012 IFS="$ac_save_ifs"
2013if test $ac_prog_rejected = yes; then
2014 # We found a bogon in the path, so make sure we never use it.
2015 set dummy $ac_cv_prog_CC
2016 shift
2017 if test $# -gt 0; then
2018 # We chose a different compiler from the bogus one.
2019 # However, it has the same basename, so the bogon will be chosen
2020 # first if we set CC to just the basename; use the full file name.
2021 shift
2022 set dummy "$ac_dir/$ac_word" "$@"
2023 shift
2024 ac_cv_prog_CC="$@"
2025 fi
2026fi
2027fi
2028fi
2029CC="$ac_cv_prog_CC"
2030if test -n "$CC"; then
2031 echo "$ac_t""$CC" 1>&6
2032else
2033 echo "$ac_t""no" 1>&6
2034fi
2035
2036 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
2037fi
b11fb939 2038
c6c7035c 2039echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
e2b4bd2a 2040echo "configure:2041: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
c6c7035c
MM
2041
2042ac_ext=c
2043# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2044ac_cpp='$CPP $CPPFLAGS'
2045ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2046ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2047cross_compiling=$ac_cv_prog_cc_cross
2048
2049cat > conftest.$ac_ext <<EOF
e2b4bd2a 2050#line 2051 "configure"
c6c7035c
MM
2051#include "confdefs.h"
2052main(){return(0);}
2053EOF
e2b4bd2a 2054if { (eval echo configure:2055: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
c6c7035c
MM
2055 ac_cv_prog_cc_works=yes
2056 # If we can't run a trivial program, we are probably using a cross compiler.
2057 if (./conftest; exit) 2>/dev/null; then
2058 ac_cv_prog_cc_cross=no
2059 else
2060 ac_cv_prog_cc_cross=yes
2061 fi
2062else
2063 echo "configure: failed program was:" >&5
2064 cat conftest.$ac_ext >&5
2065 ac_cv_prog_cc_works=no
2066fi
2067rm -fr conftest*
2068
2069echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
2070if test $ac_cv_prog_cc_works = no; then
2071 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
2072fi
2073echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
e2b4bd2a 2074echo "configure:2075: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
c6c7035c
MM
2075echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
2076cross_compiling=$ac_cv_prog_cc_cross
2077
330add8a 2078echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
e2b4bd2a 2079echo "configure:2080: checking whether we are using GNU C" >&5
330add8a
ILT
2080if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
2081 echo $ac_n "(cached) $ac_c" 1>&6
2082else
2083 cat > conftest.c <<EOF
b11fb939 2084#ifdef __GNUC__
330add8a 2085 yes;
b11fb939
KR
2086#endif
2087EOF
e2b4bd2a 2088if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2089: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
330add8a
ILT
2089 ac_cv_prog_gcc=yes
2090else
2091 ac_cv_prog_gcc=no
2092fi
2093fi
1c9dbb83 2094
330add8a 2095echo "$ac_t""$ac_cv_prog_gcc" 1>&6
c6c7035c 2096
330add8a 2097if test $ac_cv_prog_gcc = yes; then
b11fb939 2098 GCC=yes
c6c7035c
MM
2099 ac_test_CFLAGS="${CFLAGS+set}"
2100 ac_save_CFLAGS="$CFLAGS"
2101 CFLAGS=
2102 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
e2b4bd2a 2103echo "configure:2104: checking whether ${CC-cc} accepts -g" >&5
c6c7035c 2104if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
330add8a 2105 echo $ac_n "(cached) $ac_c" 1>&6
b11fb939 2106else
330add8a
ILT
2107 echo 'void f(){}' > conftest.c
2108if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
c6c7035c 2109 ac_cv_prog_cc_g=yes
330add8a 2110else
c6c7035c 2111 ac_cv_prog_cc_g=no
b11fb939
KR
2112fi
2113rm -f conftest*
2114
330add8a 2115fi
1c9dbb83 2116
c6c7035c
MM
2117echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
2118 if test "$ac_test_CFLAGS" = set; then
2119 CFLAGS="$ac_save_CFLAGS"
2120 elif test $ac_cv_prog_cc_g = yes; then
2121 CFLAGS="-g -O2"
2122 else
2123 CFLAGS="-O2"
330add8a
ILT
2124 fi
2125else
2126 GCC=
2127 test "${CFLAGS+set}" = set || CFLAGS="-g"
2128fi
2129
bf111c9f
KR
2130# Find a good install program. We prefer a C program (faster),
2131# so one script is as good as another. But avoid the broken or
2132# incompatible versions:
b11fb939
KR
2133# SysV /etc/install, /usr/sbin/install
2134# SunOS /usr/etc/install
2135# IRIX /sbin/install
2136# AIX /bin/install
2137# AFS /usr/afsws/bin/install, which mishandles nonexistent args
2138# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2139# ./install, which can be erroneously created by make from ./install.sh.
833c46e1 2140echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
e2b4bd2a 2141echo "configure:2142: checking for a BSD compatible install" >&5
28d3e4a3 2142if test -z "$INSTALL"; then
833c46e1
KR
2143if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
2144 echo $ac_n "(cached) $ac_c" 1>&6
b11fb939 2145else
c6c7035c 2146 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="${IFS}:"
b11fb939 2147 for ac_dir in $PATH; do
833c46e1
KR
2148 # Account for people who put trailing slashes in PATH elements.
2149 case "$ac_dir/" in
2150 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
b11fb939
KR
2151 *)
2152 # OSF1 and SCO ODT 3.0 have their own names for install.
2153 for ac_prog in ginstall installbsd scoinst install; do
2154 if test -f $ac_dir/$ac_prog; then
2155 if test $ac_prog = install &&
2156 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
2157 # AIX install. It has an incompatible calling convention.
2158 # OSF/1 installbsd also uses dspmsg, but is usable.
2159 :
2160 else
2161 ac_cv_path_install="$ac_dir/$ac_prog -c"
2162 break 2
2163 fi
2164 fi
2165 done
2166 ;;
2167 esac
2168 done
c6c7035c 2169 IFS="$ac_save_IFS"
1c9dbb83 2170
b11fb939 2171fi
1c9dbb83
ILT
2172 if test "${ac_cv_path_install+set}" = set; then
2173 INSTALL="$ac_cv_path_install"
2174 else
2175 # As a last resort, use the slow shell script. We don't cache a
2176 # path for INSTALL within a source directory, because that will
2177 # break other packages using the cache if that directory is
2178 # removed, or if the path is relative.
2179 INSTALL="$ac_install_sh"
2180 fi
b11fb939 2181fi
833c46e1 2182echo "$ac_t""$INSTALL" 1>&6
b11fb939
KR
2183
2184# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2185# It thinks the first close brace ends the variable substitution.
2186test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2187
2188test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2189
2190
e2b4bd2a
ILT
2191for ac_prog in 'bison -y' byacc
2192do
2193# Extract the first word of "$ac_prog", so it can be a program name with args.
2194set dummy $ac_prog; ac_word=$2
2195echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2196echo "configure:2197: checking for $ac_word" >&5
2197if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then
2198 echo $ac_n "(cached) $ac_c" 1>&6
2199else
2200 if test -n "$YACC"; then
2201 ac_cv_prog_YACC="$YACC" # Let the user override the test.
2202else
2203 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2204 for ac_dir in $PATH; do
2205 test -z "$ac_dir" && ac_dir=.
2206 if test -f $ac_dir/$ac_word; then
2207 ac_cv_prog_YACC="$ac_prog"
2208 break
2209 fi
2210 done
2211 IFS="$ac_save_ifs"
2212fi
2213fi
2214YACC="$ac_cv_prog_YACC"
2215if test -n "$YACC"; then
2216 echo "$ac_t""$YACC" 1>&6
2217else
2218 echo "$ac_t""no" 1>&6
2219fi
2220
2221test -n "$YACC" && break
2222done
2223test -n "$YACC" || YACC="yacc"
2224
2225# Extract the first word of "flex", so it can be a program name with args.
2226set dummy flex; ac_word=$2
2227echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2228echo "configure:2229: checking for $ac_word" >&5
2229if eval "test \"`echo '$''{'ac_cv_prog_LEX'+set}'`\" = set"; then
2230 echo $ac_n "(cached) $ac_c" 1>&6
2231else
2232 if test -n "$LEX"; then
2233 ac_cv_prog_LEX="$LEX" # Let the user override the test.
2234else
2235 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2236 for ac_dir in $PATH; do
2237 test -z "$ac_dir" && ac_dir=.
2238 if test -f $ac_dir/$ac_word; then
2239 ac_cv_prog_LEX="flex"
2240 break
2241 fi
2242 done
2243 IFS="$ac_save_ifs"
2244 test -z "$ac_cv_prog_LEX" && ac_cv_prog_LEX="lex"
2245fi
2246fi
2247LEX="$ac_cv_prog_LEX"
2248if test -n "$LEX"; then
2249 echo "$ac_t""$LEX" 1>&6
2250else
2251 echo "$ac_t""no" 1>&6
2252fi
2253
2254if test -z "$LEXLIB"
2255then
2256 case "$LEX" in
2257 flex*) ac_lib=fl ;;
2258 *) ac_lib=l ;;
2259 esac
2260 echo $ac_n "checking for yywrap in -l$ac_lib""... $ac_c" 1>&6
2261echo "configure:2262: checking for yywrap in -l$ac_lib" >&5
2262ac_lib_var=`echo $ac_lib'_'yywrap | sed 'y%./+-%__p_%'`
2263if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2264 echo $ac_n "(cached) $ac_c" 1>&6
2265else
2266 ac_save_LIBS="$LIBS"
2267LIBS="-l$ac_lib $LIBS"
2268cat > conftest.$ac_ext <<EOF
2269#line 2270 "configure"
2270#include "confdefs.h"
2271/* Override any gcc2 internal prototype to avoid an error. */
2272/* We use char because int might match the return type of a gcc2
2273 builtin and then its argument prototype would still apply. */
2274char yywrap();
2275
2276int main() {
2277yywrap()
2278; return 0; }
2279EOF
2280if { (eval echo configure:2281: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2281 rm -rf conftest*
2282 eval "ac_cv_lib_$ac_lib_var=yes"
2283else
2284 echo "configure: failed program was:" >&5
2285 cat conftest.$ac_ext >&5
2286 rm -rf conftest*
2287 eval "ac_cv_lib_$ac_lib_var=no"
2288fi
2289rm -f conftest*
2290LIBS="$ac_save_LIBS"
2291
2292fi
2293if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2294 echo "$ac_t""yes" 1>&6
2295 LEXLIB="-l$ac_lib"
2296else
2297 echo "$ac_t""no" 1>&6
2298fi
2299
2300fi
2301
833c46e1 2302echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
e2b4bd2a 2303echo "configure:2304: checking how to run the C preprocessor" >&5
b11fb939
KR
2304# On Suns, sometimes $CPP names a directory.
2305if test -n "$CPP" && test -d "$CPP"; then
2306 CPP=
2307fi
2308if test -z "$CPP"; then
833c46e1
KR
2309if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
2310 echo $ac_n "(cached) $ac_c" 1>&6
b11fb939
KR
2311else
2312 # This must be in double quotes, not single quotes, because CPP may get
2313 # substituted into the Makefile and "${CC-cc}" will confuse make.
2314 CPP="${CC-cc} -E"
2315 # On the NeXT, cc -E runs the code through the compiler's parser,
2316 # not just through cpp.
28d3e4a3 2317 cat > conftest.$ac_ext <<EOF
e2b4bd2a 2318#line 2319 "configure"
b11fb939 2319#include "confdefs.h"
f2889110 2320#include <assert.h>
b11fb939
KR
2321Syntax Error
2322EOF
d0352cbb 2323ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
e2b4bd2a 2324{ (eval echo configure:2325: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
bf111c9f 2325ac_err=`grep -v '^ *+' conftest.out`
b11fb939
KR
2326if test -z "$ac_err"; then
2327 :
2328else
fb589130 2329 echo "$ac_err" >&5
c6c7035c
MM
2330 echo "configure: failed program was:" >&5
2331 cat conftest.$ac_ext >&5
b11fb939
KR
2332 rm -rf conftest*
2333 CPP="${CC-cc} -E -traditional-cpp"
28d3e4a3 2334 cat > conftest.$ac_ext <<EOF
e2b4bd2a 2335#line 2336 "configure"
b11fb939 2336#include "confdefs.h"
f2889110 2337#include <assert.h>
b11fb939
KR
2338Syntax Error
2339EOF
d0352cbb 2340ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
e2b4bd2a 2341{ (eval echo configure:2342: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
bf111c9f 2342ac_err=`grep -v '^ *+' conftest.out`
b11fb939
KR
2343if test -z "$ac_err"; then
2344 :
2345else
fb589130 2346 echo "$ac_err" >&5
c6c7035c
MM
2347 echo "configure: failed program was:" >&5
2348 cat conftest.$ac_ext >&5
b11fb939
KR
2349 rm -rf conftest*
2350 CPP=/lib/cpp
2351fi
2352rm -f conftest*
2353fi
2354rm -f conftest*
2355 ac_cv_prog_CPP="$CPP"
2356fi
e63c594d
FF
2357 CPP="$ac_cv_prog_CPP"
2358else
2359 ac_cv_prog_CPP="$CPP"
b11fb939 2360fi
833c46e1 2361echo "$ac_t""$CPP" 1>&6
fb589130 2362
e2b4bd2a
ILT
2363echo $ac_n "checking lex output file root""... $ac_c" 1>&6
2364echo "configure:2365: checking lex output file root" >&5
2365if eval "test \"`echo '$''{'ac_cv_prog_lex_root'+set}'`\" = set"; then
833c46e1 2366 echo $ac_n "(cached) $ac_c" 1>&6
b11fb939 2367else
e2b4bd2a
ILT
2368 # The minimal lex program is just a single line: %%. But some broken lexes
2369# (Solaris, I think it was) want two %% lines, so accommodate them.
2370echo '%%
2371%%' | $LEX
2372if test -f lex.yy.c; then
2373 ac_cv_prog_lex_root=lex.yy
2374elif test -f lexyy.c; then
2375 ac_cv_prog_lex_root=lexyy
2376else
2377 { echo "configure: error: cannot find output from $LEX; giving up" 1>&2; exit 1; }
2378fi
2379fi
2380
2381echo "$ac_t""$ac_cv_prog_lex_root" 1>&6
2382LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root
2383
2384echo $ac_n "checking whether yytext is a pointer""... $ac_c" 1>&6
2385echo "configure:2386: checking whether yytext is a pointer" >&5
2386if eval "test \"`echo '$''{'ac_cv_prog_lex_yytext_pointer'+set}'`\" = set"; then
2387 echo $ac_n "(cached) $ac_c" 1>&6
2388else
2389 # POSIX says lex can declare yytext either as a pointer or an array; the
2390# default is implementation-dependent. Figure out which it is, since
2391# not all implementations provide the %pointer and %array declarations.
2392ac_cv_prog_lex_yytext_pointer=no
2393echo 'extern char *yytext;' >>$LEX_OUTPUT_ROOT.c
2394ac_save_LIBS="$LIBS"
2395LIBS="$LIBS $LEXLIB"
2396cat > conftest.$ac_ext <<EOF
2397#line 2398 "configure"
b11fb939 2398#include "confdefs.h"
e2b4bd2a
ILT
2399`cat $LEX_OUTPUT_ROOT.c`
2400int main() {
2401
2402; return 0; }
b11fb939 2403EOF
e2b4bd2a 2404if { (eval echo configure:2405: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
b11fb939 2405 rm -rf conftest*
e2b4bd2a 2406 ac_cv_prog_lex_yytext_pointer=yes
b11fb939 2407else
c6c7035c
MM
2408 echo "configure: failed program was:" >&5
2409 cat conftest.$ac_ext >&5
b11fb939
KR
2410fi
2411rm -f conftest*
e2b4bd2a
ILT
2412LIBS="$ac_save_LIBS"
2413rm -f "${LEX_OUTPUT_ROOT}.c"
2414
b11fb939 2415fi
e2b4bd2a
ILT
2416
2417echo "$ac_t""$ac_cv_prog_lex_yytext_pointer" 1>&6
2418if test $ac_cv_prog_lex_yytext_pointer = yes; then
2419 cat >> confdefs.h <<\EOF
2420#define YYTEXT_POINTER 1
b11fb939 2421EOF
e2b4bd2a 2422
b11fb939 2423fi
b11fb939 2424
b11fb939 2425
e2b4bd2a
ILT
2426echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
2427echo "configure:2428: checking whether to enable maintainer-specific portions of Makefiles" >&5
2428 # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
2429if test "${enable_maintainer_mode+set}" = set; then
2430 enableval="$enable_maintainer_mode"
2431 USE_MAINTAINER_MODE=$enableval
ba49e48d 2432else
e2b4bd2a 2433 USE_MAINTAINER_MODE=no
bf111c9f 2434fi
bf111c9f 2435
e2b4bd2a
ILT
2436 echo "$ac_t""$USE_MAINTAINER_MODE" 1>&6
2437 if test $USE_MAINTAINER_MODE = yes; then
2438 MAINT=
2439 else
2440 MAINT='#M#'
2441 fi
2442
2443
e42b2520 2444echo $ac_n "checking for Cygwin32 environment""... $ac_c" 1>&6
e2b4bd2a 2445echo "configure:2446: checking for Cygwin32 environment" >&5
e42b2520
RS
2446if eval "test \"`echo '$''{'am_cv_cygwin32'+set}'`\" = set"; then
2447 echo $ac_n "(cached) $ac_c" 1>&6
2448else
2449 cat > conftest.$ac_ext <<EOF
e2b4bd2a 2450#line 2451 "configure"
e42b2520
RS
2451#include "confdefs.h"
2452
2453int main() {
2454int main () { return __CYGWIN32__; }
2455; return 0; }
2456EOF
e2b4bd2a 2457if { (eval echo configure:2458: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
e42b2520
RS
2458 rm -rf conftest*
2459 am_cv_cygwin32=yes
2460else
2461 echo "configure: failed program was:" >&5
2462 cat conftest.$ac_ext >&5
2463 rm -rf conftest*
2464 am_cv_cygwin32=no
2465fi
2466rm -f conftest*
2467rm -f conftest*
2468fi
2469
2470echo "$ac_t""$am_cv_cygwin32" 1>&6
2471CYGWIN32=
2472test "$am_cv_cygwin32" = yes && CYGWIN32=yes
e2b4bd2a 2473
e42b2520 2474echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
e2b4bd2a 2475echo "configure:2476: checking for executable suffix" >&5
e42b2520
RS
2476if eval "test \"`echo '$''{'am_cv_exeext'+set}'`\" = set"; then
2477 echo $ac_n "(cached) $ac_c" 1>&6
2478else
2479 if test "$CYGWIN32" = yes; then
2480am_cv_exeext=.exe
2481else
2482cat > am_c_test.c << 'EOF'
2483int main() {
2484/* Nothing needed here */
2485}
2486EOF
2487${CC-cc} -o am_c_test $CFLAGS $CPPFLAGS $LDFLAGS am_c_test.c $LIBS 1>&5
e2b4bd2a 2488am_cv_exeext=`echo am_c_test.* | grep -v am_c_test.c | sed -e s/am_c_test//`
e42b2520
RS
2489rm -f am_c_test*
2490fi
2491
2492test x"${am_cv_exeext}" = x && am_cv_exeext=no
2493fi
2494EXEEXT=""
2495test x"${am_cv_exeext}" != xno && EXEEXT=${am_cv_exeext}
2496echo "$ac_t""${am_cv_exeext}" 1>&6
2497
2498
e2b4bd2a
ILT
2499for ac_hdr in string.h stdlib.h memory.h strings.h unistd.h stdarg.h varargs.h errno.h sys/types.h
2500do
2501ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2502echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2503echo "configure:2504: checking for $ac_hdr" >&5
2504if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2505 echo $ac_n "(cached) $ac_c" 1>&6
2506else
2507 cat > conftest.$ac_ext <<EOF
2508#line 2509 "configure"
2509#include "confdefs.h"
2510#include <$ac_hdr>
2511EOF
2512ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2513{ (eval echo configure:2514: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2514ac_err=`grep -v '^ *+' conftest.out`
2515if test -z "$ac_err"; then
2516 rm -rf conftest*
2517 eval "ac_cv_header_$ac_safe=yes"
2518else
2519 echo "$ac_err" >&5
2520 echo "configure: failed program was:" >&5
2521 cat conftest.$ac_ext >&5
2522 rm -rf conftest*
2523 eval "ac_cv_header_$ac_safe=no"
2524fi
2525rm -f conftest*
2526fi
2527if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2528 echo "$ac_t""yes" 1>&6
2529 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2530 cat >> confdefs.h <<EOF
2531#define $ac_tr_hdr 1
2532EOF
2533
2534else
2535 echo "$ac_t""no" 1>&6
2536fi
2537done
2538
2539
2540# Put this here so that autoconf's "cross-compiling" message doesn't confuse
2541# people who are not cross-compiling but are compiling cross-assemblers.
2542echo $ac_n "checking whether compiling a cross-assembler""... $ac_c" 1>&6
2543echo "configure:2544: checking whether compiling a cross-assembler" >&5
2544if test "${host}" = "${target}"; then
2545 cross_gas=no
2546else
2547 cross_gas=yes
2548 cat >> confdefs.h <<\EOF
2549#define CROSS_COMPILE 1
2550EOF
2551
2552fi
2553echo "$ac_t""$cross_gas" 1>&6
2554
b11fb939
KR
2555# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
2556# for constant arguments. Useless!
833c46e1 2557echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
e2b4bd2a 2558echo "configure:2559: checking for working alloca.h" >&5
833c46e1
KR
2559if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
2560 echo $ac_n "(cached) $ac_c" 1>&6
b11fb939 2561else
28d3e4a3 2562 cat > conftest.$ac_ext <<EOF
e2b4bd2a 2563#line 2564 "configure"
b11fb939
KR
2564#include "confdefs.h"
2565#include <alloca.h>
c6c7035c 2566int main() {
b11fb939
KR
2567char *p = alloca(2 * sizeof(int));
2568; return 0; }
2569EOF
e2b4bd2a 2570if { (eval echo configure:2571: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
b11fb939
KR
2571 rm -rf conftest*
2572 ac_cv_header_alloca_h=yes
2573else
c6c7035c
MM
2574 echo "configure: failed program was:" >&5
2575 cat conftest.$ac_ext >&5
b11fb939
KR
2576 rm -rf conftest*
2577 ac_cv_header_alloca_h=no
2578fi
2579rm -f conftest*
b11fb939 2580fi
1c9dbb83 2581
833c46e1 2582echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
b11fb939
KR
2583if test $ac_cv_header_alloca_h = yes; then
2584 cat >> confdefs.h <<\EOF
2585#define HAVE_ALLOCA_H 1
2586EOF
2587
2588fi
2589
833c46e1 2590echo $ac_n "checking for alloca""... $ac_c" 1>&6
e2b4bd2a 2591echo "configure:2592: checking for alloca" >&5
c6c7035c 2592if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
833c46e1 2593 echo $ac_n "(cached) $ac_c" 1>&6
b11fb939 2594else
28d3e4a3 2595 cat > conftest.$ac_ext <<EOF
e2b4bd2a 2596#line 2597 "configure"
b11fb939
KR
2597#include "confdefs.h"
2598
2599#ifdef __GNUC__
2600# define alloca __builtin_alloca
2601#else
2602# if HAVE_ALLOCA_H
2603# include <alloca.h>
2604# else
2605# ifdef _AIX
2606 #pragma alloca
2607# else
2608# ifndef alloca /* predefined by HP cc +Olibcalls */
2609char *alloca ();
2610# endif
2611# endif
2612# endif
2613#endif
2614
c6c7035c 2615int main() {
b11fb939
KR
2616char *p = (char *) alloca(1);
2617; return 0; }
2618EOF
e2b4bd2a 2619if { (eval echo configure:2620: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
b11fb939 2620 rm -rf conftest*
c6c7035c 2621 ac_cv_func_alloca_works=yes
b11fb939 2622else
c6c7035c
MM
2623 echo "configure: failed program was:" >&5
2624 cat conftest.$ac_ext >&5
b11fb939 2625 rm -rf conftest*
c6c7035c 2626 ac_cv_func_alloca_works=no
b11fb939
KR
2627fi
2628rm -f conftest*
b11fb939 2629fi
1c9dbb83 2630
c6c7035c
MM
2631echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
2632if test $ac_cv_func_alloca_works = yes; then
b11fb939
KR
2633 cat >> confdefs.h <<\EOF
2634#define HAVE_ALLOCA 1
2635EOF
2636
2637fi
2638
c6c7035c 2639if test $ac_cv_func_alloca_works = no; then
b11fb939
KR
2640 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
2641 # that cause trouble. Some versions do not even contain alloca or
2642 # contain a buggy version. If you still want to use their alloca,
2643 # use ar to extract alloca.o from them instead of compiling alloca.c.
2644 ALLOCA=alloca.o
2645 cat >> confdefs.h <<\EOF
2646#define C_ALLOCA 1
2647EOF
2648
2649
833c46e1 2650echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
e2b4bd2a 2651echo "configure:2652: checking whether alloca needs Cray hooks" >&5
833c46e1
KR
2652if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
2653 echo $ac_n "(cached) $ac_c" 1>&6
b11fb939 2654else
28d3e4a3 2655 cat > conftest.$ac_ext <<EOF
e2b4bd2a 2656#line 2657 "configure"
b11fb939
KR
2657#include "confdefs.h"
2658#if defined(CRAY) && ! defined(CRAY2)
2659webecray
2660#else
2661wenotbecray
2662#endif
2663
2664EOF
28d3e4a3 2665if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
fb589130 2666 egrep "webecray" >/dev/null 2>&1; then
b11fb939
KR
2667 rm -rf conftest*
2668 ac_cv_os_cray=yes
2669else
2670 rm -rf conftest*
2671 ac_cv_os_cray=no
2672fi
2673rm -f conftest*
2674
2675fi
1c9dbb83 2676
833c46e1 2677echo "$ac_t""$ac_cv_os_cray" 1>&6
b11fb939 2678if test $ac_cv_os_cray = yes; then
833c46e1
KR
2679for ac_func in _getb67 GETB67 getb67; do
2680 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
e2b4bd2a 2681echo "configure:2682: checking for $ac_func" >&5
833c46e1
KR
2682if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2683 echo $ac_n "(cached) $ac_c" 1>&6
b11fb939 2684else
28d3e4a3 2685 cat > conftest.$ac_ext <<EOF
e2b4bd2a 2686#line 2687 "configure"
b11fb939 2687#include "confdefs.h"
833c46e1
KR
2688/* System header to define __stub macros and hopefully few prototypes,
2689 which can conflict with char $ac_func(); below. */
2690#include <assert.h>
f1698cb7 2691/* Override any gcc2 internal prototype to avoid an error. */
df586de2
ILT
2692/* We use char because int might match the return type of a gcc2
2693 builtin and then its argument prototype would still apply. */
1c9dbb83 2694char $ac_func();
f1698cb7 2695
c6c7035c 2696int main() {
b11fb939
KR
2697
2698/* The GNU C library defines this for functions which it implements
2699 to always fail with ENOSYS. Some functions are actually named
2700 something starting with __ and the normal name is an alias. */
833c46e1 2701#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
b11fb939
KR
2702choke me
2703#else
833c46e1 2704$ac_func();
b11fb939
KR
2705#endif
2706
2707; return 0; }
2708EOF
e2b4bd2a 2709if { (eval echo configure:2710: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
b11fb939 2710 rm -rf conftest*
833c46e1 2711 eval "ac_cv_func_$ac_func=yes"
b11fb939 2712else
c6c7035c
MM
2713 echo "configure: failed program was:" >&5
2714 cat conftest.$ac_ext >&5
b11fb939 2715 rm -rf conftest*
833c46e1 2716 eval "ac_cv_func_$ac_func=no"
b11fb939
KR
2717fi
2718rm -f conftest*
7d0f8249 2719fi
c6c7035c 2720
833c46e1
KR
2721if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2722 echo "$ac_t""yes" 1>&6
2723 cat >> confdefs.h <<EOF
2724#define CRAY_STACKSEG_END $ac_func
b11fb939
KR
2725EOF
2726
833c46e1 2727 break
b11fb939 2728else
833c46e1 2729 echo "$ac_t""no" 1>&6
b11fb939
KR
2730fi
2731
833c46e1 2732done
b11fb939
KR
2733fi
2734
833c46e1 2735echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
e2b4bd2a 2736echo "configure:2737: checking stack direction for C alloca" >&5
833c46e1
KR
2737if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
2738 echo $ac_n "(cached) $ac_c" 1>&6
b11fb939
KR
2739else
2740 if test "$cross_compiling" = yes; then
bf111c9f 2741 ac_cv_c_stack_direction=0
b11fb939 2742else
c6c7035c 2743 cat > conftest.$ac_ext <<EOF
e2b4bd2a 2744#line 2745 "configure"
b11fb939
KR
2745#include "confdefs.h"
2746find_stack_direction ()
2747{
2748 static char *addr = 0;
2749 auto char dummy;
2750 if (addr == 0)
2751 {
2752 addr = &dummy;
2753 return find_stack_direction ();
2754 }
2755 else
2756 return (&dummy > addr) ? 1 : -1;
2757}
2758main ()
2759{
2760 exit (find_stack_direction() < 0);
2761}
2762EOF
e2b4bd2a 2763if { (eval echo configure:2764: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
c6c7035c 2764then
b11fb939
KR
2765 ac_cv_c_stack_direction=1
2766else
c6c7035c
MM
2767 echo "configure: failed program was:" >&5
2768 cat conftest.$ac_ext >&5
2769 rm -fr conftest*
b11fb939
KR
2770 ac_cv_c_stack_direction=-1
2771fi
7d0f8249 2772rm -fr conftest*
64556643
FF
2773fi
2774
c6c7035c
MM
2775fi
2776
833c46e1 2777echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
b11fb939
KR
2778cat >> confdefs.h <<EOF
2779#define STACK_DIRECTION $ac_cv_c_stack_direction
2780EOF
2781
2782fi
2783
833c46e1 2784echo $ac_n "checking for inline""... $ac_c" 1>&6
e2b4bd2a 2785echo "configure:2786: checking for inline" >&5
833c46e1
KR
2786if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
2787 echo $ac_n "(cached) $ac_c" 1>&6
b11fb939 2788else
833c46e1
KR
2789 ac_cv_c_inline=no
2790for ac_kw in inline __inline__ __inline; do
2791 cat > conftest.$ac_ext <<EOF
e2b4bd2a 2792#line 2793 "configure"
b11fb939
KR
2793#include "confdefs.h"
2794
c6c7035c 2795int main() {
833c46e1 2796} $ac_kw foo() {
b11fb939
KR
2797; return 0; }
2798EOF
e2b4bd2a 2799if { (eval echo configure:2800: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
b11fb939 2800 rm -rf conftest*
833c46e1 2801 ac_cv_c_inline=$ac_kw; break
c6c7035c
MM
2802else
2803 echo "configure: failed program was:" >&5
2804 cat conftest.$ac_ext >&5
b11fb939
KR
2805fi
2806rm -f conftest*
833c46e1 2807done
b11fb939
KR
2808
2809fi
1c9dbb83 2810
833c46e1
KR
2811echo "$ac_t""$ac_cv_c_inline" 1>&6
2812case "$ac_cv_c_inline" in
2813 inline | yes) ;;
2814 no) cat >> confdefs.h <<\EOF
2815#define inline
2816EOF
2817 ;;
2818 *) cat >> confdefs.h <<EOF
2819#define inline $ac_cv_c_inline
2820EOF
2821 ;;
2822esac
b11fb939
KR
2823
2824
ba49e48d
KR
2825# VMS doesn't have unlink.
2826for ac_func in unlink remove
b9419dd2 2827do
833c46e1 2828echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
e2b4bd2a 2829echo "configure:2830: checking for $ac_func" >&5
833c46e1
KR
2830if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2831 echo $ac_n "(cached) $ac_c" 1>&6
28d3e4a3
KR
2832else
2833 cat > conftest.$ac_ext <<EOF
e2b4bd2a 2834#line 2835 "configure"
28d3e4a3 2835#include "confdefs.h"
833c46e1
KR
2836/* System header to define __stub macros and hopefully few prototypes,
2837 which can conflict with char $ac_func(); below. */
2838#include <assert.h>
f1698cb7 2839/* Override any gcc2 internal prototype to avoid an error. */
df586de2
ILT
2840/* We use char because int might match the return type of a gcc2
2841 builtin and then its argument prototype would still apply. */
1c9dbb83 2842char $ac_func();
f1698cb7 2843
c6c7035c 2844int main() {
28d3e4a3
KR
2845
2846/* The GNU C library defines this for functions which it implements
2847 to always fail with ENOSYS. Some functions are actually named
2848 something starting with __ and the normal name is an alias. */
b9419dd2 2849#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
28d3e4a3
KR
2850choke me
2851#else
f1698cb7 2852$ac_func();
28d3e4a3
KR
2853#endif
2854
2855; return 0; }
2856EOF
e2b4bd2a 2857if { (eval echo configure:2858: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
28d3e4a3 2858 rm -rf conftest*
b9419dd2 2859 eval "ac_cv_func_$ac_func=yes"
28d3e4a3 2860else
c6c7035c
MM
2861 echo "configure: failed program was:" >&5
2862 cat conftest.$ac_ext >&5
28d3e4a3 2863 rm -rf conftest*
b9419dd2 2864 eval "ac_cv_func_$ac_func=no"
28d3e4a3
KR
2865fi
2866rm -f conftest*
7d0f8249 2867fi
c6c7035c 2868
b9419dd2 2869if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
833c46e1 2870 echo "$ac_t""yes" 1>&6
1c9dbb83 2871 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
b9419dd2
KR
2872 cat >> confdefs.h <<EOF
2873#define $ac_tr_func 1
28d3e4a3 2874EOF
b9419dd2 2875 break
28d3e4a3 2876else
833c46e1 2877 echo "$ac_t""no" 1>&6
28d3e4a3 2878fi
b9419dd2 2879done
28d3e4a3
KR
2880
2881
e63c594d
FF
2882# Some systems don't have sbrk().
2883for ac_func in sbrk
2884do
2885echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
e2b4bd2a 2886echo "configure:2887: checking for $ac_func" >&5
e63c594d
FF
2887if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2888 echo $ac_n "(cached) $ac_c" 1>&6
2889else
2890 cat > conftest.$ac_ext <<EOF
e2b4bd2a 2891#line 2892 "configure"
e63c594d
FF
2892#include "confdefs.h"
2893/* System header to define __stub macros and hopefully few prototypes,
2894 which can conflict with char $ac_func(); below. */
2895#include <assert.h>
2896/* Override any gcc2 internal prototype to avoid an error. */
df586de2
ILT
2897/* We use char because int might match the return type of a gcc2
2898 builtin and then its argument prototype would still apply. */
1c9dbb83 2899char $ac_func();
e63c594d 2900
c6c7035c 2901int main() {
e63c594d
FF
2902
2903/* The GNU C library defines this for functions which it implements
2904 to always fail with ENOSYS. Some functions are actually named
2905 something starting with __ and the normal name is an alias. */
2906#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2907choke me
2908#else
2909$ac_func();
2910#endif
2911
2912; return 0; }
2913EOF
e2b4bd2a 2914if { (eval echo configure:2915: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
e63c594d
FF
2915 rm -rf conftest*
2916 eval "ac_cv_func_$ac_func=yes"
2917else
c6c7035c
MM
2918 echo "configure: failed program was:" >&5
2919 cat conftest.$ac_ext >&5
e63c594d
FF
2920 rm -rf conftest*
2921 eval "ac_cv_func_$ac_func=no"
2922fi
2923rm -f conftest*
7d0f8249 2924fi
c6c7035c 2925
e63c594d
FF
2926if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2927 echo "$ac_t""yes" 1>&6
1c9dbb83 2928 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
e63c594d
FF
2929 cat >> confdefs.h <<EOF
2930#define $ac_tr_func 1
2931EOF
2932
2933else
2934 echo "$ac_t""no" 1>&6
2935fi
2936done
2937
2938
b11fb939
KR
2939# Some non-ANSI preprocessors botch requoting inside strings. That's bad
2940# enough, but on some of those systems, the assert macro relies on requoting
2941# working properly!
833c46e1 2942echo $ac_n "checking for working assert macro""... $ac_c" 1>&6
e2b4bd2a 2943echo "configure:2944: checking for working assert macro" >&5
833c46e1
KR
2944if eval "test \"`echo '$''{'gas_cv_assert_ok'+set}'`\" = set"; then
2945 echo $ac_n "(cached) $ac_c" 1>&6
fb589130 2946else
28d3e4a3 2947 cat > conftest.$ac_ext <<EOF
e2b4bd2a 2948#line 2949 "configure"
b11fb939
KR
2949#include "confdefs.h"
2950#include <assert.h>
2951#include <stdio.h>
c6c7035c 2952int main() {
b11fb939
KR
2953
2954/* check for requoting problems */
2955static int a, b, c, d;
2956static char *s;
2957assert (!strcmp(s, "foo bar baz quux"));
2958/* check for newline handling */
2959assert (a == b
2960 || c == d);
2961
2962; return 0; }
2963EOF
e2b4bd2a 2964if { (eval echo configure:2965: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
fb589130
KR
2965 rm -rf conftest*
2966 gas_cv_assert_ok=yes
b11fb939 2967else
c6c7035c
MM
2968 echo "configure: failed program was:" >&5
2969 cat conftest.$ac_ext >&5
b11fb939 2970 rm -rf conftest*
fb589130 2971 gas_cv_assert_ok=no
b11fb939
KR
2972fi
2973rm -f conftest*
fb589130 2974fi
833c46e1 2975echo "$ac_t""$gas_cv_assert_ok" 1>&6
fb589130
KR
2976test $gas_cv_assert_ok = yes || cat >> confdefs.h <<\EOF
2977#define BROKEN_ASSERT 1
2978EOF
2979
b11fb939 2980
bf111c9f 2981
b11fb939
KR
2982# On some systems, the system header files may not declare malloc, realloc,
2983# and free. There are places where gas needs these functions to have been
2984# declared -- such as when taking their addresses.
bf111c9f 2985gas_test_headers="
b11fb939
KR
2986#ifdef HAVE_MEMORY_H
2987#include <memory.h>
2988#endif
2989#ifdef HAVE_STRING_H
2990#include <string.h>
5cece526
ILT
2991#else
2992#ifdef HAVE_STRINGS_H
2993#include <strings.h>
2994#endif
b11fb939
KR
2995#endif
2996#ifdef HAVE_STDLIB_H
2997#include <stdlib.h>
2998#endif
2999#ifdef HAVE_UNISTD_H
3000#include <unistd.h>
3001#endif
bf111c9f 3002"
b11fb939 3003
5cece526 3004echo $ac_n "checking whether declaration is required for strstr""... $ac_c" 1>&6
e2b4bd2a 3005echo "configure:3006: checking whether declaration is required for strstr" >&5
5cece526
ILT
3006if eval "test \"`echo '$''{'gas_cv_decl_needed_strstr'+set}'`\" = set"; then
3007 echo $ac_n "(cached) $ac_c" 1>&6
3008else
3009 cat > conftest.$ac_ext <<EOF
e2b4bd2a 3010#line 3011 "configure"
5cece526
ILT
3011#include "confdefs.h"
3012$gas_test_headers
c6c7035c 3013int main() {
5cece526
ILT
3014
3015typedef char *(*f)();
3016f x;
3017x = (f) strstr;
3018
3019; return 0; }
3020EOF
e2b4bd2a 3021if { (eval echo configure:3022: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
5cece526
ILT
3022 rm -rf conftest*
3023 gas_cv_decl_needed_strstr=no
3024else
c6c7035c
MM
3025 echo "configure: failed program was:" >&5
3026 cat conftest.$ac_ext >&5
5cece526
ILT
3027 rm -rf conftest*
3028 gas_cv_decl_needed_strstr=yes
3029fi
3030rm -f conftest*
5cece526
ILT
3031fi
3032echo "$ac_t""$gas_cv_decl_needed_strstr" 1>&6
3033test $gas_cv_decl_needed_strstr = no || {
3034 cat >> confdefs.h <<\EOF
3035#define NEED_DECLARATION_STRSTR 1
3036EOF
3037
3038}
3039
3040
833c46e1 3041echo $ac_n "checking whether declaration is required for malloc""... $ac_c" 1>&6
e2b4bd2a 3042echo "configure:3043: checking whether declaration is required for malloc" >&5
833c46e1
KR
3043if eval "test \"`echo '$''{'gas_cv_decl_needed_malloc'+set}'`\" = set"; then
3044 echo $ac_n "(cached) $ac_c" 1>&6
bf111c9f 3045else
28d3e4a3 3046 cat > conftest.$ac_ext <<EOF
e2b4bd2a 3047#line 3048 "configure"
bf111c9f
KR
3048#include "confdefs.h"
3049$gas_test_headers
c6c7035c 3050int main() {
b11fb939 3051
bf111c9f
KR
3052typedef char *(*f)();
3053f x;
3054x = (f) malloc;
b11fb939
KR
3055
3056; return 0; }
3057EOF
e2b4bd2a 3058if { (eval echo configure:3059: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
fb589130 3059 rm -rf conftest*
bf111c9f 3060 gas_cv_decl_needed_malloc=no
b11fb939 3061else
c6c7035c
MM
3062 echo "configure: failed program was:" >&5
3063 cat conftest.$ac_ext >&5
b11fb939 3064 rm -rf conftest*
bf111c9f 3065 gas_cv_decl_needed_malloc=yes
fb589130
KR
3066fi
3067rm -f conftest*
fb589130 3068fi
833c46e1 3069echo "$ac_t""$gas_cv_decl_needed_malloc" 1>&6
bf111c9f
KR
3070test $gas_cv_decl_needed_malloc = no || {
3071 cat >> confdefs.h <<\EOF
3072#define NEED_DECLARATION_MALLOC 1
b11fb939
KR
3073EOF
3074
bf111c9f
KR
3075}
3076
b11fb939 3077
833c46e1 3078echo $ac_n "checking whether declaration is required for free""... $ac_c" 1>&6
e2b4bd2a 3079echo "configure:3080: checking whether declaration is required for free" >&5
833c46e1
KR
3080if eval "test \"`echo '$''{'gas_cv_decl_needed_free'+set}'`\" = set"; then
3081 echo $ac_n "(cached) $ac_c" 1>&6
fb589130 3082else
28d3e4a3 3083 cat > conftest.$ac_ext <<EOF
e2b4bd2a 3084#line 3085 "configure"
b11fb939 3085#include "confdefs.h"
bf111c9f 3086$gas_test_headers
c6c7035c 3087int main() {
b11fb939 3088
5f757edc 3089typedef void (*f)();
bf111c9f
KR
3090f x;
3091x = (f) free;
b11fb939
KR
3092
3093; return 0; }
3094EOF
e2b4bd2a 3095if { (eval echo configure:3096: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
fb589130 3096 rm -rf conftest*
bf111c9f 3097 gas_cv_decl_needed_free=no
b11fb939 3098else
c6c7035c
MM
3099 echo "configure: failed program was:" >&5
3100 cat conftest.$ac_ext >&5
b11fb939 3101 rm -rf conftest*
bf111c9f 3102 gas_cv_decl_needed_free=yes
b11fb939
KR
3103fi
3104rm -f conftest*
fb589130 3105fi
833c46e1 3106echo "$ac_t""$gas_cv_decl_needed_free" 1>&6
bf111c9f
KR
3107test $gas_cv_decl_needed_free = no || {
3108 cat >> confdefs.h <<\EOF
3109#define NEED_DECLARATION_FREE 1
fb589130
KR
3110EOF
3111
bf111c9f
KR
3112}
3113
b11fb939 3114
5cece526 3115echo $ac_n "checking whether declaration is required for sbrk""... $ac_c" 1>&6
e2b4bd2a 3116echo "configure:3117: checking whether declaration is required for sbrk" >&5
5cece526
ILT
3117if eval "test \"`echo '$''{'gas_cv_decl_needed_sbrk'+set}'`\" = set"; then
3118 echo $ac_n "(cached) $ac_c" 1>&6
3119else
3120 cat > conftest.$ac_ext <<EOF
e2b4bd2a 3121#line 3122 "configure"
5cece526
ILT
3122#include "confdefs.h"
3123$gas_test_headers
c6c7035c 3124int main() {
5cece526
ILT
3125
3126typedef char *(*f)();
3127f x;
3128x = (f) sbrk;
3129
3130; return 0; }
3131EOF
e2b4bd2a 3132if { (eval echo configure:3133: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
5cece526
ILT
3133 rm -rf conftest*
3134 gas_cv_decl_needed_sbrk=no
3135else
c6c7035c
MM
3136 echo "configure: failed program was:" >&5
3137 cat conftest.$ac_ext >&5
5cece526
ILT
3138 rm -rf conftest*
3139 gas_cv_decl_needed_sbrk=yes
3140fi
3141rm -f conftest*
5cece526
ILT
3142fi
3143echo "$ac_t""$gas_cv_decl_needed_sbrk" 1>&6
3144test $gas_cv_decl_needed_sbrk = no || {
3145 cat >> confdefs.h <<\EOF
3146#define NEED_DECLARATION_SBRK 1
3147EOF
3148
3149}
3150
3151
b11fb939
KR
3152# Does errno.h declare errno, or do we have to add a separate declaration
3153# for it?
bf111c9f 3154
833c46e1 3155echo $ac_n "checking whether declaration is required for errno""... $ac_c" 1>&6
e2b4bd2a 3156echo "configure:3157: checking whether declaration is required for errno" >&5
833c46e1
KR
3157if eval "test \"`echo '$''{'gas_cv_decl_needed_errno'+set}'`\" = set"; then
3158 echo $ac_n "(cached) $ac_c" 1>&6
fb589130 3159else
28d3e4a3 3160 cat > conftest.$ac_ext <<EOF
e2b4bd2a 3161#line 3162 "configure"
b11fb939
KR
3162#include "confdefs.h"
3163
3164#ifdef HAVE_ERRNO_H
3165#include <errno.h>
3166#endif
3167
c6c7035c 3168int main() {
b11fb939 3169
bf111c9f
KR
3170typedef int f;
3171f x;
3172x = (f) errno;
b11fb939
KR
3173
3174; return 0; }
3175EOF
e2b4bd2a 3176if { (eval echo configure:3177: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
fb589130 3177 rm -rf conftest*
bf111c9f 3178 gas_cv_decl_needed_errno=no
b11fb939 3179else
c6c7035c
MM
3180 echo "configure: failed program was:" >&5
3181 cat conftest.$ac_ext >&5
b11fb939 3182 rm -rf conftest*
bf111c9f 3183 gas_cv_decl_needed_errno=yes
b11fb939
KR
3184fi
3185rm -f conftest*
fb589130 3186fi
833c46e1 3187echo "$ac_t""$gas_cv_decl_needed_errno" 1>&6
bf111c9f
KR
3188test $gas_cv_decl_needed_errno = no || {
3189 cat >> confdefs.h <<\EOF
3190#define NEED_DECLARATION_ERRNO 1
fb589130
KR
3191EOF
3192
bf111c9f
KR
3193}
3194
b11fb939 3195
515c7142
ILT
3196
3197
ba49e48d 3198trap '' 1 2 15
833c46e1 3199cat > confcache <<\EOF
b11fb939
KR
3200# This file is a shell script that caches the results of configure
3201# tests run on this system so they can be shared between configure
3202# scripts and configure runs. It is not useful on other systems.
bf111c9f 3203# If it contains results you don't want to keep, you may remove or edit it.
b11fb939
KR
3204#
3205# By default, configure uses ./config.cache as the cache file,
3206# creating it if it does not exist already. You can give configure
3207# the --cache-file=FILE option to use a different cache file; that is
3208# what configure does when it calls configure scripts in
3209# subdirectories, so they share the cache.
3210# Giving --cache-file=/dev/null disables caching, for debugging configure.
3211# config.status only pays attention to the cache file if you give it the
3212# --recheck option to rerun configure.
e23b25ec 3213#
b11fb939 3214EOF
c6c7035c
MM
3215# The following way of writing the cache mishandles newlines in values,
3216# but we know of no workaround that is simple, portable, and efficient.
3217# So, don't put newlines in cache variables' values.
833c46e1
KR
3218# Ultrix sh set writes to stderr and can't be redirected directly,
3219# and sets the high bit in the cache file unless we assign to the vars.
e23b25ec 3220(set) 2>&1 |
c6c7035c
MM
3221 case `(ac_space=' '; set) 2>&1` in
3222 *ac_space=\ *)
3223 # `set' does not quote correctly, so add quotes (double-quote substitution
3224 # turns \\\\ into \\, and sed turns \\ into \).
3225 sed -n \
3226 -e "s/'/'\\\\''/g" \
3227 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
3228 ;;
3229 *)
3230 # `set' quotes correctly as required by POSIX, so do not add quotes.
3231 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
3232 ;;
3233 esac >> confcache
833c46e1
KR
3234if cmp -s $cache_file confcache; then
3235 :
b11fb939 3236else
833c46e1
KR
3237 if test -w $cache_file; then
3238 echo "updating cache $cache_file"
3239 cat confcache > $cache_file
3240 else
3241 echo "not updating unwritable cache $cache_file"
3242 fi
b11fb939 3243fi
833c46e1 3244rm -f confcache
b11fb939 3245
833c46e1 3246trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
b11fb939 3247
f2889110 3248test "x$prefix" = xNONE && prefix=$ac_default_prefix
b11fb939
KR
3249# Let make expand exec_prefix.
3250test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
3251
3252# Any assignment to VPATH causes Sun make to only execute
3253# the first set of double-colon rules, so remove it if not needed.
3254# If there is a colon in the path, we need to keep it.
3255if test "x$srcdir" = x.; then
3256 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
3257fi
3258
3259trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
3260
3261DEFS=-DHAVE_CONFIG_H
3262
3263# Without the "./", some shells look in PATH for config.status.
3264: ${CONFIG_STATUS=./config.status}
3265
28d3e4a3
KR
3266echo creating $CONFIG_STATUS
3267rm -f $CONFIG_STATUS
3268cat > $CONFIG_STATUS <<EOF
833c46e1 3269#! /bin/sh
b11fb939
KR
3270# Generated automatically by configure.
3271# Run this file to recreate the current configuration.
3272# This directory was configured as follows,
3273# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
3274#
e23b25ec 3275# $0 $ac_configure_args
b11fb939
KR
3276#
3277# Compiler output produced by configure, useful for debugging
3278# configure, is in ./config.log if it exists.
3279
28d3e4a3 3280ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
b11fb939
KR
3281for ac_option
3282do
3283 case "\$ac_option" in
3284 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
e23b25ec
KR
3285 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
3286 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
b11fb939 3287 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
e2b4bd2a 3288 echo "$CONFIG_STATUS generated by autoconf version 2.12.1"
b11fb939
KR
3289 exit 0 ;;
3290 -help | --help | --hel | --he | --h)
3291 echo "\$ac_cs_usage"; exit 0 ;;
3292 *) echo "\$ac_cs_usage"; exit 1 ;;
3293 esac
3294done
3295
3296ac_given_srcdir=$srcdir
3297ac_given_INSTALL="$INSTALL"
3298
e2b4bd2a 3299trap 'rm -fr `echo "Makefile doc/Makefile .gdbinit:gdbinit.in config.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
1c9dbb83
ILT
3300EOF
3301cat >> $CONFIG_STATUS <<EOF
b11fb939 3302
1c9dbb83
ILT
3303# Protect against being on the right side of a sed subst in config.status.
3304sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
3305 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
b11fb939
KR
3306$ac_vpsub
3307$extrasub
b11fb939 3308s%@CFLAGS@%$CFLAGS%g
b11fb939 3309s%@CPPFLAGS@%$CPPFLAGS%g
bf111c9f
KR
3310s%@CXXFLAGS@%$CXXFLAGS%g
3311s%@DEFS@%$DEFS%g
b11fb939 3312s%@LDFLAGS@%$LDFLAGS%g
bf111c9f
KR
3313s%@LIBS@%$LIBS%g
3314s%@exec_prefix@%$exec_prefix%g
3315s%@prefix@%$prefix%g
ba49e48d 3316s%@program_transform_name@%$program_transform_name%g
1c9dbb83
ILT
3317s%@bindir@%$bindir%g
3318s%@sbindir@%$sbindir%g
3319s%@libexecdir@%$libexecdir%g
3320s%@datadir@%$datadir%g
3321s%@sysconfdir@%$sysconfdir%g
3322s%@sharedstatedir@%$sharedstatedir%g
3323s%@localstatedir@%$localstatedir%g
3324s%@libdir@%$libdir%g
3325s%@includedir@%$includedir%g
3326s%@oldincludedir@%$oldincludedir%g
3327s%@infodir@%$infodir%g
3328s%@mandir@%$mandir%g
b11fb939
KR
3329s%@host@%$host%g
3330s%@host_alias@%$host_alias%g
3331s%@host_cpu@%$host_cpu%g
3332s%@host_vendor@%$host_vendor%g
3333s%@host_os@%$host_os%g
3334s%@target@%$target%g
3335s%@target_alias@%$target_alias%g
3336s%@target_cpu@%$target_cpu%g
3337s%@target_vendor@%$target_vendor%g
3338s%@target_os@%$target_os%g
3339s%@build@%$build%g
3340s%@build_alias@%$build_alias%g
3341s%@build_cpu@%$build_cpu%g
3342s%@build_vendor@%$build_vendor%g
3343s%@build_os@%$build_os%g
e2b4bd2a
ILT
3344s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
3345s%@INSTALL_DATA@%$INSTALL_DATA%g
3346s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
3347s%@PACKAGE@%$PACKAGE%g
3348s%@VERSION@%$VERSION%g
3349s%@ACLOCAL@%$ACLOCAL%g
3350s%@AUTOCONF@%$AUTOCONF%g
3351s%@AUTOMAKE@%$AUTOMAKE%g
3352s%@AUTOHEADER@%$AUTOHEADER%g
3353s%@MAKEINFO@%$MAKEINFO%g
3354s%@SET_MAKE@%$SET_MAKE%g
3355s%@CC@%$CC%g
3356s%@RANLIB@%$RANLIB%g
3357s%@LD@%$LD%g
3358s%@LN_S@%$LN_S%g
3359s%@LIBTOOL@%$LIBTOOL%g
b11fb939
KR
3360/@target_frag@/r $target_frag
3361s%@target_frag@%%g
e7757ad0 3362s%@extra_objects@%$extra_objects%g
bf4bd1fc 3363s%@target_cpu_type@%$target_cpu_type%g
833c46e1 3364s%@obj_format@%$obj_format%g
515c7142 3365s%@te_file@%$te_file%g
833c46e1 3366s%@atof@%$atof%g
b11fb939 3367s%@BFDLIB@%$BFDLIB%g
2e013bb7 3368s%@OPCODES_LIB@%$OPCODES_LIB%g
b11fb939 3369s%@ALL_OBJ_DEPS@%$ALL_OBJ_DEPS%g
e2b4bd2a
ILT
3370s%@YACC@%$YACC%g
3371s%@LEX@%$LEX%g
3372s%@LEXLIB@%$LEXLIB%g
b11fb939 3373s%@CPP@%$CPP%g
e2b4bd2a
ILT
3374s%@LEX_OUTPUT_ROOT@%$LEX_OUTPUT_ROOT%g
3375s%@MAINT@%$MAINT%g
e42b2520 3376s%@EXEEXT@%$EXEEXT%g
b11fb939 3377s%@ALLOCA@%$ALLOCA%g
b11fb939
KR
3378
3379CEOF
3380EOF
c6c7035c
MM
3381
3382cat >> $CONFIG_STATUS <<\EOF
3383
3384# Split the substitutions into bite-sized pieces for seds with
3385# small command number limits, like on Digital OSF/1 and HP-UX.
3386ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
3387ac_file=1 # Number of current file.
3388ac_beg=1 # First line for current file.
3389ac_end=$ac_max_sed_cmds # Line after last line for current file.
3390ac_more_lines=:
3391ac_sed_cmds=""
3392while $ac_more_lines; do
3393 if test $ac_beg -gt 1; then
3394 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
3395 else
3396 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
3397 fi
3398 if test ! -s conftest.s$ac_file; then
3399 ac_more_lines=false
3400 rm -f conftest.s$ac_file
3401 else
3402 if test -z "$ac_sed_cmds"; then
3403 ac_sed_cmds="sed -f conftest.s$ac_file"
3404 else
3405 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
3406 fi
3407 ac_file=`expr $ac_file + 1`
3408 ac_beg=$ac_end
3409 ac_end=`expr $ac_end + $ac_max_sed_cmds`
3410 fi
3411done
3412if test -z "$ac_sed_cmds"; then
3413 ac_sed_cmds=cat
3414fi
3415EOF
3416
28d3e4a3 3417cat >> $CONFIG_STATUS <<EOF
b11fb939 3418
28d3e4a3 3419CONFIG_FILES=\${CONFIG_FILES-"Makefile doc/Makefile .gdbinit:gdbinit.in"}
bf111c9f 3420EOF
28d3e4a3
KR
3421cat >> $CONFIG_STATUS <<\EOF
3422for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
c6c7035c 3423 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
b11fb939 3424 case "$ac_file" in
c6c7035c 3425 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
b11fb939
KR
3426 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
3427 *) ac_file_in="${ac_file}.in" ;;
3428 esac
3429
c6c7035c 3430 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
b11fb939
KR
3431
3432 # Remove last slash and all that follows it. Not all systems have dirname.
3433 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
3434 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
3435 # The file is in a subdirectory.
3436 test ! -d "$ac_dir" && mkdir "$ac_dir"
833c46e1 3437 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
b11fb939
KR
3438 # A "../" for each directory in $ac_dir_suffix.
3439 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
3440 else
3441 ac_dir_suffix= ac_dots=
3442 fi
3443
3444 case "$ac_given_srcdir" in
3445 .) srcdir=.
3446 if test -z "$ac_dots"; then top_srcdir=.
3447 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
3448 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
3449 *) # Relative path.
3450 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
3451 top_srcdir="$ac_dots$ac_given_srcdir" ;;
3452 esac
3453
3454 case "$ac_given_INSTALL" in
3455 [/$]*) INSTALL="$ac_given_INSTALL" ;;
28d3e4a3 3456 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
b11fb939 3457 esac
c6c7035c 3458
b11fb939
KR
3459 echo creating "$ac_file"
3460 rm -f "$ac_file"
28d3e4a3 3461 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
ba49e48d
KR
3462 case "$ac_file" in
3463 *Makefile*) ac_comsub="1i\\
3464# $configure_input" ;;
3465 *) ac_comsub= ;;
3466 esac
c6c7035c 3467
e2b4bd2a 3468 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
ba49e48d 3469 sed -e "$ac_comsub
28d3e4a3 3470s%@configure_input@%$configure_input%g
b11fb939
KR
3471s%@srcdir@%$srcdir%g
3472s%@top_srcdir@%$top_srcdir%g
3473s%@INSTALL@%$INSTALL%g
c6c7035c 3474" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
b11fb939 3475fi; done
c6c7035c 3476rm -f conftest.s*
b11fb939
KR
3477
3478# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
3479# NAME is the cpp macro being defined and VALUE is the value it is being given.
3480#
3481# ac_d sets the value in "#define NAME VALUE" lines.
3482ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
3483ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
3484ac_dC='\3'
3485ac_dD='%g'
3486# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
3487ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
3488ac_uB='\([ ]\)%\1#\2define\3'
3489ac_uC=' '
3490ac_uD='\4%g'
3491# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
3492ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
3493ac_eB='$%\1#\2define\3'
3494ac_eC=' '
3495ac_eD='%g'
3496
c6c7035c
MM
3497if test "${CONFIG_HEADERS+set}" != set; then
3498EOF
3499cat >> $CONFIG_STATUS <<EOF
e2b4bd2a 3500 CONFIG_HEADERS="config.h:config.in"
c6c7035c
MM
3501EOF
3502cat >> $CONFIG_STATUS <<\EOF
3503fi
28d3e4a3 3504for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
c6c7035c 3505 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
b11fb939 3506 case "$ac_file" in
c6c7035c 3507 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
b11fb939
KR
3508 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
3509 *) ac_file_in="${ac_file}.in" ;;
3510 esac
3511
3512 echo creating $ac_file
3513
3514 rm -f conftest.frag conftest.in conftest.out
e2b4bd2a 3515 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
c6c7035c 3516 cat $ac_file_inputs > conftest.in
b11fb939
KR
3517
3518EOF
3519
3520# Transform confdefs.h into a sed script conftest.vals that substitutes
fb589130 3521# the proper values into config.h.in to produce config.h. And first:
1c9dbb83 3522# Protect against being on the right side of a sed subst in config.status.
fb589130 3523# Protect against being in an unquoted here document in config.status.
b11fb939
KR
3524rm -f conftest.vals
3525cat > conftest.hdr <<\EOF
b11fb939 3526s/[\\&%]/\\&/g
b11fb939 3527s%[\\$`]%\\&%g
df586de2 3528s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
b11fb939
KR
3529s%ac_d%ac_u%gp
3530s%ac_u%ac_e%gp
3531EOF
3532sed -n -f conftest.hdr confdefs.h > conftest.vals
3533rm -f conftest.hdr
3534
3535# This sed command replaces #undef with comments. This is necessary, for
3536# example, in the case of _POSIX_SOURCE, which is predefined and required
3537# on some systems where configure will not decide to define it.
3538cat >> conftest.vals <<\EOF
3539s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
3540EOF
3541
3542# Break up conftest.vals because some shells have a limit on
3543# the size of here documents, and old seds have small limits too.
b11fb939
KR
3544
3545rm -f conftest.tail
3546while :
3547do
3548 ac_lines=`grep -c . conftest.vals`
3549 # grep -c gives empty output for an empty file on some AIX systems.
3550 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
3551 # Write a limited-size here document to conftest.frag.
28d3e4a3
KR
3552 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
3553 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
b11fb939
KR
3554 echo 'CEOF
3555 sed -f conftest.frag conftest.in > conftest.out
3556 rm -f conftest.in
3557 mv conftest.out conftest.in
28d3e4a3 3558' >> $CONFIG_STATUS
b11fb939
KR
3559 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
3560 rm -f conftest.vals
3561 mv conftest.tail conftest.vals
3562done
3563rm -f conftest.vals
3564
28d3e4a3 3565cat >> $CONFIG_STATUS <<\EOF
b11fb939
KR
3566 rm -f conftest.frag conftest.h
3567 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
3568 cat conftest.in >> conftest.h
3569 rm -f conftest.in
3570 if cmp -s $ac_file conftest.h 2>/dev/null; then
3571 echo "$ac_file is unchanged"
3572 rm -f conftest.h
3573 else
df586de2
ILT
3574 # Remove last slash and all that follows it. Not all systems have dirname.
3575 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
3576 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
3577 # The file is in a subdirectory.
3578 test ! -d "$ac_dir" && mkdir "$ac_dir"
3579 fi
b11fb939
KR
3580 rm -f $ac_file
3581 mv conftest.h $ac_file
3582 fi
3583fi; done
3584
c6c7035c
MM
3585EOF
3586cat >> $CONFIG_STATUS <<EOF
e2b4bd2a 3587
515c7142
ILT
3588target_cpu_type=${target_cpu_type}
3589 obj_format=${obj_format}
3590 te_file=${te_file}
c6c7035c
MM
3591EOF
3592cat >> $CONFIG_STATUS <<\EOF
e2b4bd2a 3593test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h
515c7142
ILT
3594rm -f targ-cpu.c targ-cpu.h obj-format.h obj-format.c targ-env.h atof-targ.c itbl-cpu.h
3595 echo '#include "tc-'"${target_cpu_type}"'.h"' > targ-cpu.h
3596 echo '#include "obj-'"${obj_format}"'.h"' > obj-format.h
3597 echo '#include "te-'"${te_file}"'.h"' > targ-env.h
3598 echo '#include "itbl-'"${target_cpu_type}"'.h"' > itbl-cpu.h
39ffbb4d
DE
3599 case ${target_cpu_type} in
3600 m32r) echo '#include "opcodes/'"${target_cpu_type}"'-opc.h"' > cgen-opc.h ;;
3601 esac
36e889af 3602exit 0
b11fb939 3603EOF
28d3e4a3 3604chmod +x $CONFIG_STATUS
bf111c9f 3605rm -fr confdefs* $ac_clean_files
833c46e1 3606test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
b11fb939 3607
This page took 0.486382 seconds and 4 git commands to generate.