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