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