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