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