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