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