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