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