]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blob - gas/configure
* configure.in (sparc-*-aout): Set `em'.
[thirdparty/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-*-*vms*) fmt=evax ;;
757 alpha-*-netware*) fmt=ecoff ;;
758 alpha-*-osf*) fmt=ecoff ;;
759 alpha-*-linuxecoff*) fmt=ecoff ;;
760 alpha-*-linux*) fmt=elf em=linux ;;
761
762 # start-sanitize-arc
763 arc-*-elf*) fmt=elf bfd_gas=yes ;;
764 # end-sanitize-arc
765
766 arm-*-riscix*) fmt=aout targ=arm-lit em=riscix ;;
767 arm-*-aout) fmt=aout
768 case "$endian" in
769 big) targ=arm-big ;;
770 *) targ=arm-lit ;;
771 esac
772 ;;
773 arm-*-coff) fmt=coff ;;
774 arm-*-riscix*) fmt=aout ;;
775 arm-*-pe) fmt=coff targ=armcoff em=pe ;;
776
777 # start-sanitize-d10v
778 d10v-*-*) fmt=elf bfd_gas=yes ;;
779 # end-sanitize-d10v
780
781 hppa-*-*elf*) fmt=elf em=hppa ;;
782 hppa-*-lites*) fmt=elf em=hppa ;;
783 hppa-*-osf*) fmt=som em=hppa ;;
784 hppa-*-hpux*) fmt=som em=hppa ;;
785 hppa-*-bsd*) fmt=som em=hppa ;;
786 hppa-*-hiux*) fmt=som em=hppa ;;
787
788 h8300-*-coff) fmt=coff ;;
789
790 i386-ibm-aix*) fmt=coff targ=i386coff
791 em=i386aix ;;
792 i386-*-bsd*) fmt=aout em=386bsd ;;
793 i386-*-netbsd0.8) fmt=aout em=386bsd ;;
794 i386-*-netbsd*) fmt=aout em=nbsd bfd_gas=yes;;
795 i386-*-linux*aout* | i386-*-linuxoldld) fmt=aout em=linux ;;
796 i386-*-linux*coff*) fmt=coff em=linux
797 targ=i386coff ;;
798 i386-*-linux*) fmt=elf em=linux ;;
799 i386-*-lynxos*) fmt=coff targ=i386coff
800 em=lynx ;;
801 i386-*-sysv4* | i386-*-solaris* | i386-*-elf | i386-*-freebsdelf*)
802 fmt=elf ;;
803 i386-*-sco*elf*) fmt=elf targ=sco5 ;;
804 i386-*-coff | i386-*-sysv* | i386-*-sco* | i386-*-isc*)
805 fmt=coff targ=i386coff ;;
806 i386-*-vsta) fmt=aout ;;
807 i386-*-go32) fmt=coff targ=i386coff ;;
808 i386-*-rtems*) fmt=coff targ=i386coff ;;
809 i386-*-gnu*) fmt=elf ;;
810 i386-*-mach*)
811 fmt=aout em=mach bfd_gas=yes ;;
812 i386-*-msdos*) fmt=aout ;;
813 i386-*-moss*) fmt=elf ;;
814 i386-*-pe) fmt=coff targ=i386coff em=pe ;;
815 i386-*-cygwin32) fmt=coff targ=i386coff em=pe ;;
816 i386-*-*nt) fmt=coff targ=i386coff em=pe ;;
817 i960-*-bout) fmt=bout ;;
818 i960-*-coff) fmt=coff em=ic960 targ=ic960coff ;;
819 i960-*-rtems*) fmt=coff em=ic960 targ=ic960coff ;;
820 i960-*-nindy*) fmt=bout ;;
821 i960-*-vxworks4*) fmt=bout ;;
822 i960-*-vxworks5.0) fmt=bout ;;
823 i960-*-vxworks5.*) fmt=coff em=ic960 targ=ic960coff ;;
824 i960-*-vxworks*) fmt=bout ;;
825
826 m68k-*-vxworks* | m68k-ericsson-ose | m68k-*-sunos*)
827 fmt=aout em=sun3 ;;
828 m68k-motorola-sysv*) fmt=coff targ=m68kcoff em=delta ;;
829 m68k-bull-sysv3*) fmt=coff targ=m68kcoff em=dpx2 ;;
830 m68k-apollo-*) fmt=coff targ=apollo em=apollo ;;
831 m68k-*-sysv4 | m68k-*-elf) # must be before -sysv*
832 fmt=elf ;;
833 m68k-*-coff | m68k-*-sysv* | m68k-*-rtems*)
834 fmt=coff targ=m68kcoff ;;
835 m68k-*-hpux*) fmt=hp300 em=hp300 ;;
836 m68k-*-linux*aout*) fmt=aout em=linux ;;
837 m68k-*-linux*) fmt=elf em=linux ;;
838 m68k-*-lynxos*) fmt=coff targ=m68kcoff
839 em=lynx ;;
840 m68k-*-netbsd*) fmt=aout em=nbsd bfd_gas=yes ;;
841 m68k-apple-aux*) fmt=coff targ=m68kcoff em=aux ;;
842 m68k-*-psos*) fmt=elf em=psos;;
843
844 m88k-motorola-sysv3*) fmt=coff targ=m88kcoff em=delt88 ;;
845 m88k-*-coff*) fmt=coff targ=m88kcoff ;;
846
847 # don't change em like *-*-bsd does
848 mips-dec-netbsd*) fmt=elf targ=mips-lit endian=little ;;
849 mips-dec-bsd*) fmt=aout targ=mips-lit ;;
850 mips-sony-bsd*) fmt=ecoff targ=mips-big ;;
851 mips-*-bsd*) { echo "configure: error: Unknown vendor for mips-bsd configuration." 1>&2; exit 1; } ;;
852 mips-*-ultrix*) fmt=ecoff targ=mips-lit endian=little ;;
853 mips-*-osf*) fmt=ecoff targ=mips-lit endian=little ;;
854 mips-*-ecoff*) fmt=ecoff
855 case "$endian" in
856 big) targ=mips-big ;;
857 *) targ=mips-lit ;;
858 esac
859 ;;
860 mips-*-ecoff*) fmt=ecoff targ=mips-big ;;
861 mips-*-gnu*) fmt=aout
862 case "$endian" in
863 big) targ=mips-big ;;
864 *) targ=mips-lit ;;
865 esac
866 ;;
867 mips-*-irix6*) fmt=elf targ=mips-big ;;
868 mips-*-irix5*) fmt=elf targ=mips-big ;;
869 mips-*-irix*) fmt=ecoff targ=mips-big ;;
870 mips-*-riscos*) fmt=ecoff targ=mips-big ;;
871 mips-*-sysv*) fmt=ecoff targ=mips-big ;;
872 mips-*-elf*) fmt=elf
873 case "$endian" in
874 big) targ=mips-big ;;
875 *) targ=mips-lit ;;
876 esac
877 ;;
878 ppc-*-pe | ppc-*-cygwin32 | ppc-*-winnt*)
879 fmt=coff em=pe
880 case "$endian" in
881 big) targ=ppc-big ;;
882 *) targ=ppc-lit ;;
883 esac
884 ;;
885 ppc-*-aix*) fmt=coff ;;
886 ppc-*-elf* | ppc-*-eabi* | ppc-*-sysv4*)
887 fmt=elf
888 case "$endian" in
889 big) targ=ppc-big ;;
890 *) targ=ppc-lit ;;
891 esac
892 ;;
893 ppc-*-linux*) fmt=elf
894 case "$endian" in
895 big) targ=ppc-big ;;
896 *) { echo "configure: error: Linux must be configured big endian" 1>&2; exit 1; } ;;
897 esac
898 ;;
899 ppc-*-solaris*) fmt=elf
900 case "$endian" in
901 big) { echo "configure: error: Solaris must be configured little endian" 1>&2; exit 1; } ;;
902 *) targ=ppc-sol ;;
903 esac
904 ;;
905 ppc-*-rtems*)
906 fmt=elf
907 case "$endian" in
908 big) targ=ppc-big ;;
909 *) targ=ppc-lit ;;
910 esac
911 ;;
912 ppc-*-macos* | ppc-*-mpw*)
913 fmt=coff em=macos ;;
914 ppc-*-netware*) fmt=elf em=ppcnw ;;
915
916 sh-*-elf*) fmt=elf ;;
917 sh-*-coff*) fmt=coff ;;
918
919 ns32k-pc532-mach* | ns32k-pc532-ux*) fmt=aout em=pc532mach ;;
920 ns32k-pc532-netbsd* | ns32k-pc532-lites*) fmt=aout em=nbsd532 ;;
921
922 sparc-*-rtems*) fmt=aout ;;
923 sparc-*-sunos4*) fmt=aout em=sun3 ;;
924 sparc-*-aout | sparc*-*-vxworks*)
925 fmt=aout em=sparcaout ;;
926 sparc-*-coff) fmt=coff ;;
927 sparc-*-lynxos*) fmt=coff em=lynx ;;
928 sparc-fujitsu-none) fmt=aout ;;
929 sparc-*-elf | sparc-*-sysv4* | sparc-*-solaris*)
930 fmt=elf ;;
931 sparc-*-netbsd*) fmt=aout em=nbsd bfd_gas=yes ;;
932
933 v850-*-*) fmt=elf bfd_gas=yes ;;
934
935 vax-*-bsd* | vax-*-ultrix*)
936 fmt=aout ;;
937 vax-*-vms) fmt=vms ;;
938
939 z8k-*-coff | z8k-*-sim)
940 fmt=coff ;;
941
942 w65-*-*) fmt=coff ;;
943
944 *-*-aout | *-*-scout)
945 fmt=aout ;;
946 *-*-nindy*)
947 fmt=bout ;;
948 *-*-bsd*)
949 fmt=aout em=sun3 ;;
950 *-*-generic) fmt=generic ;;
951 *-*-xray | *-*-hms) fmt=coff ;;
952 *-*-sim) fmt=coff ;;
953 *-*-elf | *-*-sysv4* | *-*-solaris*)
954 echo "configure: warning: GAS support for ${generic_target} is incomplete." 1>&2
955 fmt=elf dev=yes ;;
956 *-*-vxworks) fmt=aout ;;
957 *-*-netware) fmt=elf ;;
958 esac
959
960 case ${cpu_type}-${fmt} in
961 alpha-*) bfd_gas=yes ;;
962 arm-*) bfd_gas=yes ;;
963 # not yet
964 # i386-aout) bfd_gas=preferred ;;
965 mips-*) bfd_gas=yes ;;
966 ns32k-*) bfd_gas=yes ;;
967 ppc-*) bfd_gas=yes ;;
968 sparc-*) bfd_gas=yes ;;
969 *-elf) bfd_gas=yes ;;
970 *-ecoff) bfd_gas=yes ;;
971 *-som) bfd_gas=yes ;;
972 *) ;;
973 esac
974
975 # Other random stuff.
976
977 # do we need the opcodes library?
978 case ${cpu_type} in
979 vax | i386)
980 ;;
981 *)
982 need_opcodes=yes
983 if test "${shared_opcodes}" = "true"; then
984 # A shared libopcodes must be linked against libbfd.
985 need_bfd=yes
986 fi
987 ;;
988 esac
989
990 test -n "$want_sparc_v9" && cat >> confdefs.h <<\EOF
991 #define SPARC_V9 1
992 EOF
993
994
995 case ${cpu}-${vendor}-${os} in
996 sparc64-*-elf*) cat >> confdefs.h <<\EOF
997 #define SPARC_ARCH64 1
998 EOF
999 ;;
1000 esac
1001
1002 case ${cpu_type} in
1003 m68k)
1004 case ${extra_objects} in
1005 *m68k-parse.o*) ;;
1006 *) extra_objects="$extra_objects m68k-parse.o" ;;
1007 esac
1008 ;;
1009 esac
1010
1011 # See if we really can support this configuration with the emulation code.
1012
1013 if test $this_target = $target ; then
1014 primary_bfd_gas=$bfd_gas
1015 obj_format=$fmt
1016 gas_target=$targ
1017 te_file=$em
1018
1019 if test $bfd_gas = no ; then
1020 # Can't support other configurations this way.
1021 break
1022 fi
1023 elif test $bfd_gas = no ; then
1024 # Can't support this configuration.
1025 break
1026 fi
1027
1028 # From target name and format, produce a list of supported emulations.
1029
1030 case ${generic_target}-${fmt} in
1031 mips-*-irix5*-*) emulation="mipsbelf mipslelf mipself mipsbecoff mipslecoff mipsecoff" ;;
1032 mips-*-*-ecoff) case "$endian" in
1033 big) emulation="mipsbecoff mipslecoff mipsecoff" ;;
1034 *) emulation="mipslecoff mipsbecoff mipsecoff" ;;
1035 esac ;;
1036 mips-*-*-elf) case "$endian" in
1037 big) emulation="mipsbelf mipslelf mipself" ;;
1038 *) emulation="mipslelf mipsbelf mipself" ;;
1039 esac ;;
1040 esac
1041
1042 emulations="$emulations $emulation"
1043
1044 done
1045
1046 # Assign floating point type. Most processors with FP support
1047 # IEEE FP. On those that don't support FP at all, usually IEEE
1048 # is emulated.
1049 case ${target_cpu} in
1050 vax | tahoe ) atof=${target_cpu} ;;
1051 *) atof=ieee ;;
1052 esac
1053
1054 case "${obj_format}" in
1055 "") { echo "configure: error: GAS does not know what format to use for target ${target}" 1>&2; exit 1; } ;;
1056 esac
1057
1058
1059 if test ! -r ${srcdir}/config/tc-${target_cpu_type}.c; then
1060 { echo "configure: error: GAS does not support target CPU ${target_cpu_type}" 1>&2; exit 1; }
1061 fi
1062
1063 if test ! -r ${srcdir}/config/obj-${obj_format}.c; then
1064 { echo "configure: error: GAS does not have support for object file format ${obj_format}" 1>&2; exit 1; }
1065 fi
1066
1067 # and target makefile frag
1068
1069 target_frag=${srcdir}/config/${gas_target}.mt
1070 if test ! -r ${target_frag}; then
1071 target_frag=/dev/null # ick! but subst_file can't be conditionalized
1072 fi
1073
1074
1075 case ${user_bfd_gas}-${primary_bfd_gas} in
1076 yes-yes | no-no)
1077 # We didn't override user's choice.
1078 ;;
1079 no-yes)
1080 echo "configure: warning: Use of BFD is required for ${target}; overriding config options." 1>&2
1081 ;;
1082 no-preferred)
1083 primary_bfd_gas=no
1084 ;;
1085 *-preferred)
1086 primary_bfd_gas=yes
1087 ;;
1088 yes-*)
1089 primary_bfd_gas=yes
1090 ;;
1091 -*)
1092 # User specified nothing.
1093 ;;
1094 esac
1095
1096 # Some COFF configurations want these random other flags set.
1097 case ${obj_format} in
1098 coff)
1099 case ${target_cpu_type} in
1100 i386) cat >> confdefs.h <<\EOF
1101 #define I386COFF 1
1102 EOF
1103 ;;
1104 m68k) cat >> confdefs.h <<\EOF
1105 #define M68KCOFF 1
1106 EOF
1107 ;;
1108 m88k) cat >> confdefs.h <<\EOF
1109 #define M88KCOFF 1
1110 EOF
1111 ;;
1112 esac
1113 ;;
1114 esac
1115
1116 # Getting this done right is going to be a bitch. Each configuration specified
1117 # with --enable-targets=... should be checked for environment, format, cpu, and
1118 # bfd_gas setting.
1119 #
1120 # For each configuration, the necessary object file support code must be linked
1121 # in. This might be only one, it might be up to four. The necessary emulation
1122 # code needs to be provided, too.
1123 #
1124 # And then there's "--enable-targets=all"....
1125 #
1126 # For now, just always do it for MIPS ELF or ECOFF configurations. Sigh.
1127
1128 formats="${obj_format}"
1129 emfiles=""
1130 EMULATIONS=""
1131 _gas_uniq_list="$emulations"
1132 _gas_uniq_newlist=""
1133 for _gas_uniq_i in _gas_uniq_dummy $_gas_uniq_list ; do
1134 case $_gas_uniq_i in
1135 _gas_uniq_dummy) ;;
1136 *) case " $_gas_uniq_newlist " in
1137 *" $_gas_uniq_i "*) ;;
1138 *) _gas_uniq_newlist="$_gas_uniq_newlist $_gas_uniq_i" ;;
1139 esac ;;
1140 esac
1141 done
1142 emulations=$_gas_uniq_newlist
1143
1144 for em in . $emulations ; do
1145 case $em in
1146 .) continue ;;
1147 mipsbelf | mipslelf)
1148 fmt=elf file=mipself ;;
1149 mipsbecoff | mipslecoff)
1150 fmt=ecoff file=mipsecoff ;;
1151 esac
1152 formats="$formats $fmt"
1153 emfiles="$emfiles e-$file.o"
1154 EMULATIONS="$EMULATIONS &$em,"
1155 done
1156 _gas_uniq_list="$formats"
1157 _gas_uniq_newlist=""
1158 for _gas_uniq_i in _gas_uniq_dummy $_gas_uniq_list ; do
1159 case $_gas_uniq_i in
1160 _gas_uniq_dummy) ;;
1161 *) case " $_gas_uniq_newlist " in
1162 *" $_gas_uniq_i "*) ;;
1163 *) _gas_uniq_newlist="$_gas_uniq_newlist $_gas_uniq_i" ;;
1164 esac ;;
1165 esac
1166 done
1167 formats=$_gas_uniq_newlist
1168
1169 _gas_uniq_list="$emfiles"
1170 _gas_uniq_newlist=""
1171 for _gas_uniq_i in _gas_uniq_dummy $_gas_uniq_list ; do
1172 case $_gas_uniq_i in
1173 _gas_uniq_dummy) ;;
1174 *) case " $_gas_uniq_newlist " in
1175 *" $_gas_uniq_i "*) ;;
1176 *) _gas_uniq_newlist="$_gas_uniq_newlist $_gas_uniq_i" ;;
1177 esac ;;
1178 esac
1179 done
1180 emfiles=$_gas_uniq_newlist
1181
1182 if test `set . $formats ; shift ; echo $#` -gt 1 ; then
1183 for fmt in $formats ; do
1184 case $fmt in
1185 aout) cat >> confdefs.h <<\EOF
1186 #define OBJ_MAYBE_AOUT 1
1187 EOF
1188 ;;
1189 bout) cat >> confdefs.h <<\EOF
1190 #define OBJ_MAYBE_BOUT 1
1191 EOF
1192 ;;
1193 coff) cat >> confdefs.h <<\EOF
1194 #define OBJ_MAYBE_COFF 1
1195 EOF
1196 ;;
1197 ecoff) cat >> confdefs.h <<\EOF
1198 #define OBJ_MAYBE_ECOFF 1
1199 EOF
1200 ;;
1201 elf) cat >> confdefs.h <<\EOF
1202 #define OBJ_MAYBE_ELF 1
1203 EOF
1204 ;;
1205 generic) cat >> confdefs.h <<\EOF
1206 #define OBJ_MAYBE_GENERIC 1
1207 EOF
1208 ;;
1209 hp300) cat >> confdefs.h <<\EOF
1210 #define OBJ_MAYBE_HP300 1
1211 EOF
1212 ;;
1213 ieee) cat >> confdefs.h <<\EOF
1214 #define OBJ_MAYBE_IEEE 1
1215 EOF
1216 ;;
1217 som) cat >> confdefs.h <<\EOF
1218 #define OBJ_MAYBE_SOM 1
1219 EOF
1220 ;;
1221 vms) cat >> confdefs.h <<\EOF
1222 #define OBJ_MAYBE_VMS 1
1223 EOF
1224 ;;
1225 esac
1226 extra_objects="$extra_objects obj-$fmt.o"
1227 done
1228 obj_format=multi
1229 fi
1230 if test `set . $emfiles ; shift ; echo $#` -gt 0 ; then
1231 te_file=multi
1232 extra_objects="$extra_objects $emfiles"
1233 DEFAULT_EMULATION=`set . $emulations ; echo $2`
1234 cat >> confdefs.h <<\EOF
1235 #define USE_EMULATIONS 1
1236 EOF
1237
1238 fi
1239
1240 cat >> confdefs.h <<EOF
1241 #define EMULATIONS $EMULATIONS
1242 EOF
1243
1244 cat >> confdefs.h <<EOF
1245 #define DEFAULT_EMULATION "$DEFAULT_EMULATION"
1246 EOF
1247
1248
1249 files="config/tc-${target_cpu_type}.c config/tc-${target_cpu_type}.h \
1250 config/obj-${obj_format}.h config/obj-${obj_format}.c \
1251 config/te-${te_file}.h config/atof-${atof}.c \
1252 $extra_files"
1253 links="targ-cpu.c targ-cpu.h obj-format.h obj-format.c targ-env.h atof-targ.c \
1254 $extra_links"
1255
1256 case ${primary_bfd_gas}-${target_cpu_type}-${obj_format} in
1257 yes-*-coff) need_bfd=yes ;;
1258 no-*-coff) need_bfd=yes
1259 cat >> confdefs.h <<\EOF
1260 #define MANY_SEGMENTS 1
1261 EOF
1262 ;;
1263 esac
1264
1265 reject_dev_configs=yes
1266
1267 case ${reject_dev_configs}-${dev} in
1268 yes-yes) # Oops.
1269 { echo "configure: error: GAS does not support the ${generic_target} configuration." 1>&2; exit 1; }
1270 ;;
1271 esac
1272
1273
1274
1275
1276
1277
1278
1279 case "${primary_bfd_gas}" in
1280 yes) cat >> confdefs.h <<\EOF
1281 #define BFD_ASSEMBLER 1
1282 EOF
1283
1284 need_bfd=yes ;;
1285 esac
1286
1287 # do we need the opcodes library?
1288 case "${need_opcodes}" in
1289 yes)
1290 OPCODES_DEP=../opcodes/libopcodes.a
1291 OPCODES_LIB='-L../opcodes -lopcodes'
1292
1293 # We need to handle some special cases for shared libraries.
1294 case "${host}" in
1295 *-*-sunos*)
1296 # On SunOS, we must link against the name we are going to install,
1297 # not -lbfd, since SunOS does not support SONAME.
1298 if test "${shared_opcodes}" = "true"; then
1299 OPCODES_LIB='-L../opcodes -l`echo opcodes | sed '"'"'$(program_transform_name)'"'"'`'
1300 fi
1301 ;;
1302 alpha*-*-osf*)
1303 # On Alpha OSF/1, the native linker searches all the -L
1304 # directories for any LIB.so files, and only then searches for any
1305 # LIB.a files. That means that if there is an installed
1306 # libbfd.so, but this build is not done with --enable-shared, the
1307 # link will wind up being against the install libbfd.so rather
1308 # than the newly built libbfd. To avoid this, we must explicitly
1309 # link against libbfd.a when --enable-shared is not used.
1310 if test "${shared_opcodes}" != "true"; then
1311 OPCODES_LIB='../opcodes/libopcodes.a'
1312 fi
1313 ;;
1314 esac
1315 ;;
1316 esac
1317
1318
1319
1320 case "${need_bfd}" in
1321 yes)
1322 BFDDEP=../bfd/libbfd.a
1323 BFDLIB='-L../bfd -lbfd'
1324 ALL_OBJ_DEPS="$ALL_OBJ_DEPS ../bfd/bfd.h"
1325
1326 # We need to handle some special cases for shared libraries
1327 case "${host}" in
1328 *-*-sunos*)
1329 # On SunOS, we must link against the name we are going to install,
1330 # not -lbfd, since SunOS does not support SONAME.
1331 if test "${shared_bfd}" = "true"; then
1332 BFDLIB='-L../bfd -l`echo bfd | sed '"'"'$(program_transform_name)'"'"'`'
1333 fi
1334 ;;
1335 alpha*-*-osf*)
1336 # On Alpha OSF/1, the native linker searches all the -L
1337 # directories for any LIB.so files, and only then searches for any
1338 # LIB.a files. That means that if there is an installed
1339 # libbfd.so, but this build is not done with --enable-shared, the
1340 # link will wind up being against the install libbfd.so rather
1341 # than the newly built libbfd. To avoid this, we must explicitly
1342 # link against libbfd.a when --enable-shared is not used.
1343 if test "${shared_bfd}" != "true"; then
1344 BFDLIB='../bfd/libbfd.a'
1345 fi
1346 ;;
1347 esac
1348 ;;
1349 esac
1350
1351
1352
1353
1354 cat >> confdefs.h <<EOF
1355 #define TARGET_ALIAS "${target_alias}"
1356 EOF
1357
1358 cat >> confdefs.h <<EOF
1359 #define TARGET_CANONICAL "${target}"
1360 EOF
1361
1362 cat >> confdefs.h <<EOF
1363 #define TARGET_CPU "${target_cpu}"
1364 EOF
1365
1366 cat >> confdefs.h <<EOF
1367 #define TARGET_VENDOR "${target_vendor}"
1368 EOF
1369
1370 cat >> confdefs.h <<EOF
1371 #define TARGET_OS "${target_os}"
1372 EOF
1373
1374
1375 # Extract the first word of "gcc", so it can be a program name with args.
1376 set dummy gcc; ac_word=$2
1377 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1378 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1379 echo $ac_n "(cached) $ac_c" 1>&6
1380 else
1381 if test -n "$CC"; then
1382 ac_cv_prog_CC="$CC" # Let the user override the test.
1383 else
1384 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1385 for ac_dir in $PATH; do
1386 test -z "$ac_dir" && ac_dir=.
1387 if test -f $ac_dir/$ac_word; then
1388 ac_cv_prog_CC="gcc"
1389 break
1390 fi
1391 done
1392 IFS="$ac_save_ifs"
1393 fi
1394 fi
1395 CC="$ac_cv_prog_CC"
1396 if test -n "$CC"; then
1397 echo "$ac_t""$CC" 1>&6
1398 else
1399 echo "$ac_t""no" 1>&6
1400 fi
1401
1402 if test -z "$CC"; then
1403 # Extract the first word of "cc", so it can be a program name with args.
1404 set dummy cc; ac_word=$2
1405 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1406 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1407 echo $ac_n "(cached) $ac_c" 1>&6
1408 else
1409 if test -n "$CC"; then
1410 ac_cv_prog_CC="$CC" # Let the user override the test.
1411 else
1412 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1413 ac_prog_rejected=no
1414 for ac_dir in $PATH; do
1415 test -z "$ac_dir" && ac_dir=.
1416 if test -f $ac_dir/$ac_word; then
1417 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1418 ac_prog_rejected=yes
1419 continue
1420 fi
1421 ac_cv_prog_CC="cc"
1422 break
1423 fi
1424 done
1425 IFS="$ac_save_ifs"
1426 if test $ac_prog_rejected = yes; then
1427 # We found a bogon in the path, so make sure we never use it.
1428 set dummy $ac_cv_prog_CC
1429 shift
1430 if test $# -gt 0; then
1431 # We chose a different compiler from the bogus one.
1432 # However, it has the same basename, so the bogon will be chosen
1433 # first if we set CC to just the basename; use the full file name.
1434 shift
1435 set dummy "$ac_dir/$ac_word" "$@"
1436 shift
1437 ac_cv_prog_CC="$@"
1438 fi
1439 fi
1440 fi
1441 fi
1442 CC="$ac_cv_prog_CC"
1443 if test -n "$CC"; then
1444 echo "$ac_t""$CC" 1>&6
1445 else
1446 echo "$ac_t""no" 1>&6
1447 fi
1448
1449 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1450 fi
1451
1452 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1453 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
1454 echo $ac_n "(cached) $ac_c" 1>&6
1455 else
1456 cat > conftest.c <<EOF
1457 #ifdef __GNUC__
1458 yes;
1459 #endif
1460 EOF
1461 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1462: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1462 ac_cv_prog_gcc=yes
1463 else
1464 ac_cv_prog_gcc=no
1465 fi
1466 fi
1467
1468 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1469 if test $ac_cv_prog_gcc = yes; then
1470 GCC=yes
1471 if test "${CFLAGS+set}" != set; then
1472 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1473 if eval "test \"`echo '$''{'ac_cv_prog_gcc_g'+set}'`\" = set"; then
1474 echo $ac_n "(cached) $ac_c" 1>&6
1475 else
1476 echo 'void f(){}' > conftest.c
1477 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1478 ac_cv_prog_gcc_g=yes
1479 else
1480 ac_cv_prog_gcc_g=no
1481 fi
1482 rm -f conftest*
1483
1484 fi
1485
1486 echo "$ac_t""$ac_cv_prog_gcc_g" 1>&6
1487 if test $ac_cv_prog_gcc_g = yes; then
1488 CFLAGS="-g -O"
1489 else
1490 CFLAGS="-O"
1491 fi
1492 fi
1493 else
1494 GCC=
1495 test "${CFLAGS+set}" = set || CFLAGS="-g"
1496 fi
1497
1498 # Find a good install program. We prefer a C program (faster),
1499 # so one script is as good as another. But avoid the broken or
1500 # incompatible versions:
1501 # SysV /etc/install, /usr/sbin/install
1502 # SunOS /usr/etc/install
1503 # IRIX /sbin/install
1504 # AIX /bin/install
1505 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
1506 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1507 # ./install, which can be erroneously created by make from ./install.sh.
1508 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
1509 if test -z "$INSTALL"; then
1510 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
1511 echo $ac_n "(cached) $ac_c" 1>&6
1512 else
1513 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1514 for ac_dir in $PATH; do
1515 # Account for people who put trailing slashes in PATH elements.
1516 case "$ac_dir/" in
1517 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1518 *)
1519 # OSF1 and SCO ODT 3.0 have their own names for install.
1520 for ac_prog in ginstall installbsd scoinst install; do
1521 if test -f $ac_dir/$ac_prog; then
1522 if test $ac_prog = install &&
1523 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1524 # AIX install. It has an incompatible calling convention.
1525 # OSF/1 installbsd also uses dspmsg, but is usable.
1526 :
1527 else
1528 ac_cv_path_install="$ac_dir/$ac_prog -c"
1529 break 2
1530 fi
1531 fi
1532 done
1533 ;;
1534 esac
1535 done
1536 IFS="$ac_save_ifs"
1537
1538 fi
1539 if test "${ac_cv_path_install+set}" = set; then
1540 INSTALL="$ac_cv_path_install"
1541 else
1542 # As a last resort, use the slow shell script. We don't cache a
1543 # path for INSTALL within a source directory, because that will
1544 # break other packages using the cache if that directory is
1545 # removed, or if the path is relative.
1546 INSTALL="$ac_install_sh"
1547 fi
1548 fi
1549 echo "$ac_t""$INSTALL" 1>&6
1550
1551 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1552 # It thinks the first close brace ends the variable substitution.
1553 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1554
1555 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1556
1557
1558 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
1559 # On Suns, sometimes $CPP names a directory.
1560 if test -n "$CPP" && test -d "$CPP"; then
1561 CPP=
1562 fi
1563 if test -z "$CPP"; then
1564 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1565 echo $ac_n "(cached) $ac_c" 1>&6
1566 else
1567 # This must be in double quotes, not single quotes, because CPP may get
1568 # substituted into the Makefile and "${CC-cc}" will confuse make.
1569 CPP="${CC-cc} -E"
1570 # On the NeXT, cc -E runs the code through the compiler's parser,
1571 # not just through cpp.
1572 cat > conftest.$ac_ext <<EOF
1573 #line 1574 "configure"
1574 #include "confdefs.h"
1575 #include <assert.h>
1576 Syntax Error
1577 EOF
1578 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1579 { (eval echo configure:1580: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1580 ac_err=`grep -v '^ *+' conftest.out`
1581 if test -z "$ac_err"; then
1582 :
1583 else
1584 echo "$ac_err" >&5
1585 rm -rf conftest*
1586 CPP="${CC-cc} -E -traditional-cpp"
1587 cat > conftest.$ac_ext <<EOF
1588 #line 1589 "configure"
1589 #include "confdefs.h"
1590 #include <assert.h>
1591 Syntax Error
1592 EOF
1593 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1594 { (eval echo configure:1595: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1595 ac_err=`grep -v '^ *+' conftest.out`
1596 if test -z "$ac_err"; then
1597 :
1598 else
1599 echo "$ac_err" >&5
1600 rm -rf conftest*
1601 CPP=/lib/cpp
1602 fi
1603 rm -f conftest*
1604 fi
1605 rm -f conftest*
1606 ac_cv_prog_CPP="$CPP"
1607 fi
1608 CPP="$ac_cv_prog_CPP"
1609 else
1610 ac_cv_prog_CPP="$CPP"
1611 fi
1612 echo "$ac_t""$CPP" 1>&6
1613
1614 for ac_hdr in string.h stdlib.h memory.h strings.h unistd.h stdarg.h varargs.h errno.h sys/types.h
1615 do
1616 ac_safe=`echo "$ac_hdr" | tr './\055' '___'`
1617 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1618 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1619 echo $ac_n "(cached) $ac_c" 1>&6
1620 else
1621 cat > conftest.$ac_ext <<EOF
1622 #line 1623 "configure"
1623 #include "confdefs.h"
1624 #include <$ac_hdr>
1625 EOF
1626 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1627 { (eval echo configure:1628: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1628 ac_err=`grep -v '^ *+' conftest.out`
1629 if test -z "$ac_err"; then
1630 rm -rf conftest*
1631 eval "ac_cv_header_$ac_safe=yes"
1632 else
1633 echo "$ac_err" >&5
1634 rm -rf conftest*
1635 eval "ac_cv_header_$ac_safe=no"
1636 fi
1637 rm -f conftest*
1638 fi
1639 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1640 echo "$ac_t""yes" 1>&6
1641 ac_tr_hdr=HAVE_`echo $ac_hdr | tr 'abcdefghijklmnopqrstuvwxyz./\055' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ___'`
1642 cat >> confdefs.h <<EOF
1643 #define $ac_tr_hdr 1
1644 EOF
1645
1646 else
1647 echo "$ac_t""no" 1>&6
1648 fi
1649 done
1650
1651
1652 # Put this here so that autoconf's "cross-compiling" message doesn't confuse
1653 # people who are not cross-compiling but are compiling cross-assemblers.
1654 echo $ac_n "checking whether compiling a cross-assembler""... $ac_c" 1>&6
1655 if test "${host}" = "${target}"; then
1656 cross_gas=no
1657 else
1658 cross_gas=yes
1659 cat >> confdefs.h <<\EOF
1660 #define CROSS_COMPILE 1
1661 EOF
1662
1663 fi
1664 echo "$ac_t""$cross_gas" 1>&6
1665
1666 # If we cannot run a trivial program, we must be cross compiling.
1667 echo $ac_n "checking whether cross-compiling""... $ac_c" 1>&6
1668 if eval "test \"`echo '$''{'ac_cv_c_cross'+set}'`\" = set"; then
1669 echo $ac_n "(cached) $ac_c" 1>&6
1670 else
1671 if test "$cross_compiling" = yes; then
1672 ac_cv_c_cross=yes
1673 else
1674 cat > conftest.$ac_ext <<EOF
1675 #line 1676 "configure"
1676 #include "confdefs.h"
1677 main(){return(0);}
1678 EOF
1679 { (eval echo configure:1680: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
1680 if test -s conftest && (./conftest; exit) 2>/dev/null; then
1681 ac_cv_c_cross=no
1682 else
1683 ac_cv_c_cross=yes
1684 fi
1685 fi
1686 rm -fr conftest*
1687 fi
1688
1689 echo "$ac_t""$ac_cv_c_cross" 1>&6
1690 cross_compiling=$ac_cv_c_cross
1691
1692 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
1693 # for constant arguments. Useless!
1694 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
1695 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
1696 echo $ac_n "(cached) $ac_c" 1>&6
1697 else
1698 cat > conftest.$ac_ext <<EOF
1699 #line 1700 "configure"
1700 #include "confdefs.h"
1701 #include <alloca.h>
1702 int main() { return 0; }
1703 int t() {
1704 char *p = alloca(2 * sizeof(int));
1705 ; return 0; }
1706 EOF
1707 if { (eval echo configure:1708: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
1708 rm -rf conftest*
1709 ac_cv_header_alloca_h=yes
1710 else
1711 rm -rf conftest*
1712 ac_cv_header_alloca_h=no
1713 fi
1714 rm -f conftest*
1715
1716 fi
1717
1718 echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
1719 if test $ac_cv_header_alloca_h = yes; then
1720 cat >> confdefs.h <<\EOF
1721 #define HAVE_ALLOCA_H 1
1722 EOF
1723
1724 fi
1725
1726 echo $ac_n "checking for alloca""... $ac_c" 1>&6
1727 if eval "test \"`echo '$''{'ac_cv_func_alloca'+set}'`\" = set"; then
1728 echo $ac_n "(cached) $ac_c" 1>&6
1729 else
1730 cat > conftest.$ac_ext <<EOF
1731 #line 1732 "configure"
1732 #include "confdefs.h"
1733
1734 #ifdef __GNUC__
1735 # define alloca __builtin_alloca
1736 #else
1737 # if HAVE_ALLOCA_H
1738 # include <alloca.h>
1739 # else
1740 # ifdef _AIX
1741 #pragma alloca
1742 # else
1743 # ifndef alloca /* predefined by HP cc +Olibcalls */
1744 char *alloca ();
1745 # endif
1746 # endif
1747 # endif
1748 #endif
1749
1750 int main() { return 0; }
1751 int t() {
1752 char *p = (char *) alloca(1);
1753 ; return 0; }
1754 EOF
1755 if { (eval echo configure:1756: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
1756 rm -rf conftest*
1757 ac_cv_func_alloca=yes
1758 else
1759 rm -rf conftest*
1760 ac_cv_func_alloca=no
1761 fi
1762 rm -f conftest*
1763
1764 fi
1765
1766 echo "$ac_t""$ac_cv_func_alloca" 1>&6
1767 if test $ac_cv_func_alloca = yes; then
1768 cat >> confdefs.h <<\EOF
1769 #define HAVE_ALLOCA 1
1770 EOF
1771
1772 fi
1773
1774 if test $ac_cv_func_alloca = no; then
1775 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
1776 # that cause trouble. Some versions do not even contain alloca or
1777 # contain a buggy version. If you still want to use their alloca,
1778 # use ar to extract alloca.o from them instead of compiling alloca.c.
1779 ALLOCA=alloca.o
1780 cat >> confdefs.h <<\EOF
1781 #define C_ALLOCA 1
1782 EOF
1783
1784
1785 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
1786 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
1787 echo $ac_n "(cached) $ac_c" 1>&6
1788 else
1789 cat > conftest.$ac_ext <<EOF
1790 #line 1791 "configure"
1791 #include "confdefs.h"
1792 #if defined(CRAY) && ! defined(CRAY2)
1793 webecray
1794 #else
1795 wenotbecray
1796 #endif
1797
1798 EOF
1799 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1800 egrep "webecray" >/dev/null 2>&1; then
1801 rm -rf conftest*
1802 ac_cv_os_cray=yes
1803 else
1804 rm -rf conftest*
1805 ac_cv_os_cray=no
1806 fi
1807 rm -f conftest*
1808
1809 fi
1810
1811 echo "$ac_t""$ac_cv_os_cray" 1>&6
1812 if test $ac_cv_os_cray = yes; then
1813 for ac_func in _getb67 GETB67 getb67; do
1814 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1815 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1816 echo $ac_n "(cached) $ac_c" 1>&6
1817 else
1818 cat > conftest.$ac_ext <<EOF
1819 #line 1820 "configure"
1820 #include "confdefs.h"
1821 /* System header to define __stub macros and hopefully few prototypes,
1822 which can conflict with char $ac_func(); below. */
1823 #include <assert.h>
1824 /* Override any gcc2 internal prototype to avoid an error. */
1825 /* We use char because int might match the return type of a gcc2
1826 builtin and then its argument prototype would still apply. */
1827 char $ac_func();
1828
1829 int main() { return 0; }
1830 int t() {
1831
1832 /* The GNU C library defines this for functions which it implements
1833 to always fail with ENOSYS. Some functions are actually named
1834 something starting with __ and the normal name is an alias. */
1835 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1836 choke me
1837 #else
1838 $ac_func();
1839 #endif
1840
1841 ; return 0; }
1842 EOF
1843 if { (eval echo configure:1844: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
1844 rm -rf conftest*
1845 eval "ac_cv_func_$ac_func=yes"
1846 else
1847 rm -rf conftest*
1848 eval "ac_cv_func_$ac_func=no"
1849 fi
1850 rm -f conftest*
1851
1852 fi
1853 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1854 echo "$ac_t""yes" 1>&6
1855 cat >> confdefs.h <<EOF
1856 #define CRAY_STACKSEG_END $ac_func
1857 EOF
1858
1859 break
1860 else
1861 echo "$ac_t""no" 1>&6
1862 fi
1863
1864 done
1865 fi
1866
1867 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
1868 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
1869 echo $ac_n "(cached) $ac_c" 1>&6
1870 else
1871 if test "$cross_compiling" = yes; then
1872 ac_cv_c_stack_direction=0
1873 else
1874 cat > conftest.$ac_ext <<EOF
1875 #line 1876 "configure"
1876 #include "confdefs.h"
1877 find_stack_direction ()
1878 {
1879 static char *addr = 0;
1880 auto char dummy;
1881 if (addr == 0)
1882 {
1883 addr = &dummy;
1884 return find_stack_direction ();
1885 }
1886 else
1887 return (&dummy > addr) ? 1 : -1;
1888 }
1889 main ()
1890 {
1891 exit (find_stack_direction() < 0);
1892 }
1893 EOF
1894 { (eval echo configure:1895: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
1895 if test -s conftest && (./conftest; exit) 2>/dev/null; then
1896 ac_cv_c_stack_direction=1
1897 else
1898 ac_cv_c_stack_direction=-1
1899 fi
1900 fi
1901 rm -fr conftest*
1902 fi
1903
1904 echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
1905 cat >> confdefs.h <<EOF
1906 #define STACK_DIRECTION $ac_cv_c_stack_direction
1907 EOF
1908
1909 fi
1910
1911 echo $ac_n "checking for inline""... $ac_c" 1>&6
1912 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
1913 echo $ac_n "(cached) $ac_c" 1>&6
1914 else
1915 ac_cv_c_inline=no
1916 for ac_kw in inline __inline__ __inline; do
1917 cat > conftest.$ac_ext <<EOF
1918 #line 1919 "configure"
1919 #include "confdefs.h"
1920
1921 int main() { return 0; }
1922 int t() {
1923 } $ac_kw foo() {
1924 ; return 0; }
1925 EOF
1926 if { (eval echo configure:1927: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1927 rm -rf conftest*
1928 ac_cv_c_inline=$ac_kw; break
1929 fi
1930 rm -f conftest*
1931
1932 done
1933
1934 fi
1935
1936 echo "$ac_t""$ac_cv_c_inline" 1>&6
1937 case "$ac_cv_c_inline" in
1938 inline | yes) ;;
1939 no) cat >> confdefs.h <<\EOF
1940 #define inline
1941 EOF
1942 ;;
1943 *) cat >> confdefs.h <<EOF
1944 #define inline $ac_cv_c_inline
1945 EOF
1946 ;;
1947 esac
1948
1949
1950 # VMS doesn't have unlink.
1951 for ac_func in unlink remove
1952 do
1953 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1954 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1955 echo $ac_n "(cached) $ac_c" 1>&6
1956 else
1957 cat > conftest.$ac_ext <<EOF
1958 #line 1959 "configure"
1959 #include "confdefs.h"
1960 /* System header to define __stub macros and hopefully few prototypes,
1961 which can conflict with char $ac_func(); below. */
1962 #include <assert.h>
1963 /* Override any gcc2 internal prototype to avoid an error. */
1964 /* We use char because int might match the return type of a gcc2
1965 builtin and then its argument prototype would still apply. */
1966 char $ac_func();
1967
1968 int main() { return 0; }
1969 int t() {
1970
1971 /* The GNU C library defines this for functions which it implements
1972 to always fail with ENOSYS. Some functions are actually named
1973 something starting with __ and the normal name is an alias. */
1974 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1975 choke me
1976 #else
1977 $ac_func();
1978 #endif
1979
1980 ; return 0; }
1981 EOF
1982 if { (eval echo configure:1983: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
1983 rm -rf conftest*
1984 eval "ac_cv_func_$ac_func=yes"
1985 else
1986 rm -rf conftest*
1987 eval "ac_cv_func_$ac_func=no"
1988 fi
1989 rm -f conftest*
1990
1991 fi
1992 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1993 echo "$ac_t""yes" 1>&6
1994 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1995 cat >> confdefs.h <<EOF
1996 #define $ac_tr_func 1
1997 EOF
1998 break
1999 else
2000 echo "$ac_t""no" 1>&6
2001 fi
2002 done
2003
2004
2005 # Some systems don't have sbrk().
2006 for ac_func in sbrk
2007 do
2008 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2009 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2010 echo $ac_n "(cached) $ac_c" 1>&6
2011 else
2012 cat > conftest.$ac_ext <<EOF
2013 #line 2014 "configure"
2014 #include "confdefs.h"
2015 /* System header to define __stub macros and hopefully few prototypes,
2016 which can conflict with char $ac_func(); below. */
2017 #include <assert.h>
2018 /* Override any gcc2 internal prototype to avoid an error. */
2019 /* We use char because int might match the return type of a gcc2
2020 builtin and then its argument prototype would still apply. */
2021 char $ac_func();
2022
2023 int main() { return 0; }
2024 int t() {
2025
2026 /* The GNU C library defines this for functions which it implements
2027 to always fail with ENOSYS. Some functions are actually named
2028 something starting with __ and the normal name is an alias. */
2029 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2030 choke me
2031 #else
2032 $ac_func();
2033 #endif
2034
2035 ; return 0; }
2036 EOF
2037 if { (eval echo configure:2038: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
2038 rm -rf conftest*
2039 eval "ac_cv_func_$ac_func=yes"
2040 else
2041 rm -rf conftest*
2042 eval "ac_cv_func_$ac_func=no"
2043 fi
2044 rm -f conftest*
2045
2046 fi
2047 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2048 echo "$ac_t""yes" 1>&6
2049 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2050 cat >> confdefs.h <<EOF
2051 #define $ac_tr_func 1
2052 EOF
2053
2054 else
2055 echo "$ac_t""no" 1>&6
2056 fi
2057 done
2058
2059
2060 # Some non-ANSI preprocessors botch requoting inside strings. That's bad
2061 # enough, but on some of those systems, the assert macro relies on requoting
2062 # working properly!
2063 echo $ac_n "checking for working assert macro""... $ac_c" 1>&6
2064 if eval "test \"`echo '$''{'gas_cv_assert_ok'+set}'`\" = set"; then
2065 echo $ac_n "(cached) $ac_c" 1>&6
2066 else
2067 cat > conftest.$ac_ext <<EOF
2068 #line 2069 "configure"
2069 #include "confdefs.h"
2070 #include <assert.h>
2071 #include <stdio.h>
2072 int main() { return 0; }
2073 int t() {
2074
2075 /* check for requoting problems */
2076 static int a, b, c, d;
2077 static char *s;
2078 assert (!strcmp(s, "foo bar baz quux"));
2079 /* check for newline handling */
2080 assert (a == b
2081 || c == d);
2082
2083 ; return 0; }
2084 EOF
2085 if { (eval echo configure:2086: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
2086 rm -rf conftest*
2087 gas_cv_assert_ok=yes
2088 else
2089 rm -rf conftest*
2090 gas_cv_assert_ok=no
2091 fi
2092 rm -f conftest*
2093
2094 fi
2095 echo "$ac_t""$gas_cv_assert_ok" 1>&6
2096 test $gas_cv_assert_ok = yes || cat >> confdefs.h <<\EOF
2097 #define BROKEN_ASSERT 1
2098 EOF
2099
2100
2101
2102 # On some systems, the system header files may not declare malloc, realloc,
2103 # and free. There are places where gas needs these functions to have been
2104 # declared -- such as when taking their addresses.
2105 gas_test_headers="
2106 #ifdef HAVE_MEMORY_H
2107 #include <memory.h>
2108 #endif
2109 #ifdef HAVE_STRING_H
2110 #include <string.h>
2111 #else
2112 #ifdef HAVE_STRINGS_H
2113 #include <strings.h>
2114 #endif
2115 #endif
2116 #ifdef HAVE_STDLIB_H
2117 #include <stdlib.h>
2118 #endif
2119 #ifdef HAVE_UNISTD_H
2120 #include <unistd.h>
2121 #endif
2122 "
2123
2124 echo $ac_n "checking whether declaration is required for strstr""... $ac_c" 1>&6
2125 if eval "test \"`echo '$''{'gas_cv_decl_needed_strstr'+set}'`\" = set"; then
2126 echo $ac_n "(cached) $ac_c" 1>&6
2127 else
2128 cat > conftest.$ac_ext <<EOF
2129 #line 2130 "configure"
2130 #include "confdefs.h"
2131 $gas_test_headers
2132 int main() { return 0; }
2133 int t() {
2134
2135 typedef char *(*f)();
2136 f x;
2137 x = (f) strstr;
2138
2139 ; return 0; }
2140 EOF
2141 if { (eval echo configure:2142: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
2142 rm -rf conftest*
2143 gas_cv_decl_needed_strstr=no
2144 else
2145 rm -rf conftest*
2146 gas_cv_decl_needed_strstr=yes
2147 fi
2148 rm -f conftest*
2149
2150 fi
2151 echo "$ac_t""$gas_cv_decl_needed_strstr" 1>&6
2152 test $gas_cv_decl_needed_strstr = no || {
2153 cat >> confdefs.h <<\EOF
2154 #define NEED_DECLARATION_STRSTR 1
2155 EOF
2156
2157 }
2158
2159
2160 echo $ac_n "checking whether declaration is required for malloc""... $ac_c" 1>&6
2161 if eval "test \"`echo '$''{'gas_cv_decl_needed_malloc'+set}'`\" = set"; then
2162 echo $ac_n "(cached) $ac_c" 1>&6
2163 else
2164 cat > conftest.$ac_ext <<EOF
2165 #line 2166 "configure"
2166 #include "confdefs.h"
2167 $gas_test_headers
2168 int main() { return 0; }
2169 int t() {
2170
2171 typedef char *(*f)();
2172 f x;
2173 x = (f) malloc;
2174
2175 ; return 0; }
2176 EOF
2177 if { (eval echo configure:2178: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
2178 rm -rf conftest*
2179 gas_cv_decl_needed_malloc=no
2180 else
2181 rm -rf conftest*
2182 gas_cv_decl_needed_malloc=yes
2183 fi
2184 rm -f conftest*
2185
2186 fi
2187 echo "$ac_t""$gas_cv_decl_needed_malloc" 1>&6
2188 test $gas_cv_decl_needed_malloc = no || {
2189 cat >> confdefs.h <<\EOF
2190 #define NEED_DECLARATION_MALLOC 1
2191 EOF
2192
2193 }
2194
2195
2196 echo $ac_n "checking whether declaration is required for free""... $ac_c" 1>&6
2197 if eval "test \"`echo '$''{'gas_cv_decl_needed_free'+set}'`\" = set"; then
2198 echo $ac_n "(cached) $ac_c" 1>&6
2199 else
2200 cat > conftest.$ac_ext <<EOF
2201 #line 2202 "configure"
2202 #include "confdefs.h"
2203 $gas_test_headers
2204 int main() { return 0; }
2205 int t() {
2206
2207 typedef void (*f)();
2208 f x;
2209 x = (f) free;
2210
2211 ; return 0; }
2212 EOF
2213 if { (eval echo configure:2214: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
2214 rm -rf conftest*
2215 gas_cv_decl_needed_free=no
2216 else
2217 rm -rf conftest*
2218 gas_cv_decl_needed_free=yes
2219 fi
2220 rm -f conftest*
2221
2222 fi
2223 echo "$ac_t""$gas_cv_decl_needed_free" 1>&6
2224 test $gas_cv_decl_needed_free = no || {
2225 cat >> confdefs.h <<\EOF
2226 #define NEED_DECLARATION_FREE 1
2227 EOF
2228
2229 }
2230
2231
2232 echo $ac_n "checking whether declaration is required for sbrk""... $ac_c" 1>&6
2233 if eval "test \"`echo '$''{'gas_cv_decl_needed_sbrk'+set}'`\" = set"; then
2234 echo $ac_n "(cached) $ac_c" 1>&6
2235 else
2236 cat > conftest.$ac_ext <<EOF
2237 #line 2238 "configure"
2238 #include "confdefs.h"
2239 $gas_test_headers
2240 int main() { return 0; }
2241 int t() {
2242
2243 typedef char *(*f)();
2244 f x;
2245 x = (f) sbrk;
2246
2247 ; return 0; }
2248 EOF
2249 if { (eval echo configure:2250: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
2250 rm -rf conftest*
2251 gas_cv_decl_needed_sbrk=no
2252 else
2253 rm -rf conftest*
2254 gas_cv_decl_needed_sbrk=yes
2255 fi
2256 rm -f conftest*
2257
2258 fi
2259 echo "$ac_t""$gas_cv_decl_needed_sbrk" 1>&6
2260 test $gas_cv_decl_needed_sbrk = no || {
2261 cat >> confdefs.h <<\EOF
2262 #define NEED_DECLARATION_SBRK 1
2263 EOF
2264
2265 }
2266
2267
2268 # Does errno.h declare errno, or do we have to add a separate declaration
2269 # for it?
2270
2271 echo $ac_n "checking whether declaration is required for errno""... $ac_c" 1>&6
2272 if eval "test \"`echo '$''{'gas_cv_decl_needed_errno'+set}'`\" = set"; then
2273 echo $ac_n "(cached) $ac_c" 1>&6
2274 else
2275 cat > conftest.$ac_ext <<EOF
2276 #line 2277 "configure"
2277 #include "confdefs.h"
2278
2279 #ifdef HAVE_ERRNO_H
2280 #include <errno.h>
2281 #endif
2282
2283 int main() { return 0; }
2284 int t() {
2285
2286 typedef int f;
2287 f x;
2288 x = (f) errno;
2289
2290 ; return 0; }
2291 EOF
2292 if { (eval echo configure:2293: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
2293 rm -rf conftest*
2294 gas_cv_decl_needed_errno=no
2295 else
2296 rm -rf conftest*
2297 gas_cv_decl_needed_errno=yes
2298 fi
2299 rm -f conftest*
2300
2301 fi
2302 echo "$ac_t""$gas_cv_decl_needed_errno" 1>&6
2303 test $gas_cv_decl_needed_errno = no || {
2304 cat >> confdefs.h <<\EOF
2305 #define NEED_DECLARATION_ERRNO 1
2306 EOF
2307
2308 }
2309
2310
2311 HLDFLAGS=
2312 HLDENV=
2313 RPATH_ENVVAR=LD_LIBRARY_PATH
2314 # If we have shared libraries, try to set rpath reasonably.
2315 if test "${shared}" = "true"; then
2316 case "${host}" in
2317 *-*-hpux*)
2318 HLDFLAGS='-Wl,+s,+b,$(libdir)'
2319 RPATH_ENVVAR=SHLIB_PATH
2320 ;;
2321 *-*-irix5* | *-*-irix6*)
2322 HLDFLAGS='-Wl,-rpath,$(libdir)'
2323 ;;
2324 *-*-linux*aout*)
2325 ;;
2326 *-*-linux*)
2327 HLDFLAGS='-Wl,-rpath,$(libdir)'
2328 ;;
2329 *-*-solaris*)
2330 HLDFLAGS='-R $(libdir)'
2331 ;;
2332 *-*-sysv4*)
2333 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;'
2334 ;;
2335 esac
2336 fi
2337
2338 # On SunOS, if the linker supports the -rpath option, use it to
2339 # prevent ../bfd and ../opcodes from being included in the run time
2340 # search path.
2341 case "${host}" in
2342 *-*-sunos*)
2343 echo 'main () { }' > conftest.c
2344 ${CC} -o conftest -Wl,-rpath= conftest.c >/dev/null 2>conftest.t
2345 if grep 'unrecognized' conftest.t >/dev/null 2>&1; then
2346 :
2347 elif grep 'No such file' conftest.t >/dev/null 2>&1; then
2348 :
2349 elif grep 'do not mix' conftest.t >/dev/null 2>&1; then
2350 :
2351 elif test "${shared}" = "true"; then
2352 HLDFLAGS='-Wl,-rpath=$(libdir)'
2353 else
2354 HLDFLAGS='-Wl,-rpath='
2355 fi
2356 rm -f conftest.t conftest.c conftest
2357 ;;
2358 esac
2359
2360
2361
2362
2363 trap '' 1 2 15
2364 cat > confcache <<\EOF
2365 # This file is a shell script that caches the results of configure
2366 # tests run on this system so they can be shared between configure
2367 # scripts and configure runs. It is not useful on other systems.
2368 # If it contains results you don't want to keep, you may remove or edit it.
2369 #
2370 # By default, configure uses ./config.cache as the cache file,
2371 # creating it if it does not exist already. You can give configure
2372 # the --cache-file=FILE option to use a different cache file; that is
2373 # what configure does when it calls configure scripts in
2374 # subdirectories, so they share the cache.
2375 # Giving --cache-file=/dev/null disables caching, for debugging configure.
2376 # config.status only pays attention to the cache file if you give it the
2377 # --recheck option to rerun configure.
2378 #
2379 EOF
2380 # Ultrix sh set writes to stderr and can't be redirected directly,
2381 # and sets the high bit in the cache file unless we assign to the vars.
2382 (set) 2>&1 |
2383 sed -n "s/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=\${\1='\2'}/p" \
2384 >> confcache
2385 if cmp -s $cache_file confcache; then
2386 :
2387 else
2388 if test -w $cache_file; then
2389 echo "updating cache $cache_file"
2390 cat confcache > $cache_file
2391 else
2392 echo "not updating unwritable cache $cache_file"
2393 fi
2394 fi
2395 rm -f confcache
2396
2397 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
2398
2399 test "x$prefix" = xNONE && prefix=$ac_default_prefix
2400 # Let make expand exec_prefix.
2401 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
2402
2403 # Any assignment to VPATH causes Sun make to only execute
2404 # the first set of double-colon rules, so remove it if not needed.
2405 # If there is a colon in the path, we need to keep it.
2406 if test "x$srcdir" = x.; then
2407 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
2408 fi
2409
2410 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
2411
2412 DEFS=-DHAVE_CONFIG_H
2413
2414 # Without the "./", some shells look in PATH for config.status.
2415 : ${CONFIG_STATUS=./config.status}
2416
2417 echo creating $CONFIG_STATUS
2418 rm -f $CONFIG_STATUS
2419 cat > $CONFIG_STATUS <<EOF
2420 #! /bin/sh
2421 # Generated automatically by configure.
2422 # Run this file to recreate the current configuration.
2423 # This directory was configured as follows,
2424 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
2425 #
2426 # $0 $ac_configure_args
2427 #
2428 # Compiler output produced by configure, useful for debugging
2429 # configure, is in ./config.log if it exists.
2430
2431 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
2432 for ac_option
2433 do
2434 case "\$ac_option" in
2435 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
2436 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
2437 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
2438 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
2439 echo "$CONFIG_STATUS generated by autoconf version 2.10"
2440 exit 0 ;;
2441 -help | --help | --hel | --he | --h)
2442 echo "\$ac_cs_usage"; exit 0 ;;
2443 *) echo "\$ac_cs_usage"; exit 1 ;;
2444 esac
2445 done
2446
2447 ac_given_srcdir=$srcdir
2448 ac_given_INSTALL="$INSTALL"
2449
2450 trap 'rm -fr `echo "Makefile doc/Makefile .gdbinit:gdbinit.in conf" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
2451 EOF
2452 cat >> $CONFIG_STATUS <<EOF
2453
2454 # Protect against being on the right side of a sed subst in config.status.
2455 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
2456 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
2457 $ac_vpsub
2458 $extrasub
2459 s%@CFLAGS@%$CFLAGS%g
2460 s%@CPPFLAGS@%$CPPFLAGS%g
2461 s%@CXXFLAGS@%$CXXFLAGS%g
2462 s%@DEFS@%$DEFS%g
2463 s%@LDFLAGS@%$LDFLAGS%g
2464 s%@LIBS@%$LIBS%g
2465 s%@exec_prefix@%$exec_prefix%g
2466 s%@prefix@%$prefix%g
2467 s%@program_transform_name@%$program_transform_name%g
2468 s%@bindir@%$bindir%g
2469 s%@sbindir@%$sbindir%g
2470 s%@libexecdir@%$libexecdir%g
2471 s%@datadir@%$datadir%g
2472 s%@sysconfdir@%$sysconfdir%g
2473 s%@sharedstatedir@%$sharedstatedir%g
2474 s%@localstatedir@%$localstatedir%g
2475 s%@libdir@%$libdir%g
2476 s%@includedir@%$includedir%g
2477 s%@oldincludedir@%$oldincludedir%g
2478 s%@infodir@%$infodir%g
2479 s%@mandir@%$mandir%g
2480 s%@host@%$host%g
2481 s%@host_alias@%$host_alias%g
2482 s%@host_cpu@%$host_cpu%g
2483 s%@host_vendor@%$host_vendor%g
2484 s%@host_os@%$host_os%g
2485 s%@target@%$target%g
2486 s%@target_alias@%$target_alias%g
2487 s%@target_cpu@%$target_cpu%g
2488 s%@target_vendor@%$target_vendor%g
2489 s%@target_os@%$target_os%g
2490 s%@build@%$build%g
2491 s%@build_alias@%$build_alias%g
2492 s%@build_cpu@%$build_cpu%g
2493 s%@build_vendor@%$build_vendor%g
2494 s%@build_os@%$build_os%g
2495 /@target_frag@/r $target_frag
2496 s%@target_frag@%%g
2497 s%@extra_objects@%$extra_objects%g
2498 s%@target_cpu_type@%$target_cpu_type%g
2499 s%@obj_format@%$obj_format%g
2500 s%@atof@%$atof%g
2501 s%@OPCODES_DEP@%$OPCODES_DEP%g
2502 s%@OPCODES_LIB@%$OPCODES_LIB%g
2503 s%@BFDDEP@%$BFDDEP%g
2504 s%@BFDLIB@%$BFDLIB%g
2505 s%@ALL_OBJ_DEPS@%$ALL_OBJ_DEPS%g
2506 s%@CC@%$CC%g
2507 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
2508 s%@INSTALL_DATA@%$INSTALL_DATA%g
2509 s%@CPP@%$CPP%g
2510 s%@ALLOCA@%$ALLOCA%g
2511 s%@HLDFLAGS@%$HLDFLAGS%g
2512 s%@HLDENV@%$HLDENV%g
2513 s%@RPATH_ENVVAR@%$RPATH_ENVVAR%g
2514
2515 CEOF
2516 EOF
2517 cat >> $CONFIG_STATUS <<EOF
2518
2519 CONFIG_FILES=\${CONFIG_FILES-"Makefile doc/Makefile .gdbinit:gdbinit.in"}
2520 EOF
2521 cat >> $CONFIG_STATUS <<\EOF
2522 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
2523 # Support "outfile[:infile]", defaulting infile="outfile.in".
2524 case "$ac_file" in
2525 *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'`
2526 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
2527 *) ac_file_in="${ac_file}.in" ;;
2528 esac
2529
2530 # Adjust relative srcdir, etc. for subdirectories.
2531
2532 # Remove last slash and all that follows it. Not all systems have dirname.
2533 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
2534 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
2535 # The file is in a subdirectory.
2536 test ! -d "$ac_dir" && mkdir "$ac_dir"
2537 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
2538 # A "../" for each directory in $ac_dir_suffix.
2539 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
2540 else
2541 ac_dir_suffix= ac_dots=
2542 fi
2543
2544 case "$ac_given_srcdir" in
2545 .) srcdir=.
2546 if test -z "$ac_dots"; then top_srcdir=.
2547 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
2548 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
2549 *) # Relative path.
2550 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
2551 top_srcdir="$ac_dots$ac_given_srcdir" ;;
2552 esac
2553
2554 case "$ac_given_INSTALL" in
2555 [/$]*) INSTALL="$ac_given_INSTALL" ;;
2556 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
2557 esac
2558 echo creating "$ac_file"
2559 rm -f "$ac_file"
2560 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
2561 case "$ac_file" in
2562 *Makefile*) ac_comsub="1i\\
2563 # $configure_input" ;;
2564 *) ac_comsub= ;;
2565 esac
2566 sed -e "$ac_comsub
2567 s%@configure_input@%$configure_input%g
2568 s%@srcdir@%$srcdir%g
2569 s%@top_srcdir@%$top_srcdir%g
2570 s%@INSTALL@%$INSTALL%g
2571 " -f conftest.subs $ac_given_srcdir/$ac_file_in > $ac_file
2572 fi; done
2573 rm -f conftest.subs
2574
2575 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
2576 # NAME is the cpp macro being defined and VALUE is the value it is being given.
2577 #
2578 # ac_d sets the value in "#define NAME VALUE" lines.
2579 ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
2580 ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
2581 ac_dC='\3'
2582 ac_dD='%g'
2583 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
2584 ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
2585 ac_uB='\([ ]\)%\1#\2define\3'
2586 ac_uC=' '
2587 ac_uD='\4%g'
2588 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
2589 ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
2590 ac_eB='$%\1#\2define\3'
2591 ac_eC=' '
2592 ac_eD='%g'
2593
2594 CONFIG_HEADERS=${CONFIG_HEADERS-"conf"}
2595 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
2596 # Support "outfile[:infile]", defaulting infile="outfile.in".
2597 case "$ac_file" in
2598 *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'`
2599 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
2600 *) ac_file_in="${ac_file}.in" ;;
2601 esac
2602
2603 echo creating $ac_file
2604
2605 rm -f conftest.frag conftest.in conftest.out
2606 cp $ac_given_srcdir/$ac_file_in conftest.in
2607
2608 EOF
2609
2610 # Transform confdefs.h into a sed script conftest.vals that substitutes
2611 # the proper values into config.h.in to produce config.h. And first:
2612 # Protect against being on the right side of a sed subst in config.status.
2613 # Protect against being in an unquoted here document in config.status.
2614 rm -f conftest.vals
2615 cat > conftest.hdr <<\EOF
2616 s/[\\&%]/\\&/g
2617 s%[\\$`]%\\&%g
2618 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
2619 s%ac_d%ac_u%gp
2620 s%ac_u%ac_e%gp
2621 EOF
2622 sed -n -f conftest.hdr confdefs.h > conftest.vals
2623 rm -f conftest.hdr
2624
2625 # This sed command replaces #undef with comments. This is necessary, for
2626 # example, in the case of _POSIX_SOURCE, which is predefined and required
2627 # on some systems where configure will not decide to define it.
2628 cat >> conftest.vals <<\EOF
2629 s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
2630 EOF
2631
2632 # Break up conftest.vals because some shells have a limit on
2633 # the size of here documents, and old seds have small limits too.
2634 # Maximum number of lines to put in a single here document.
2635 ac_max_here_lines=12
2636
2637 rm -f conftest.tail
2638 while :
2639 do
2640 ac_lines=`grep -c . conftest.vals`
2641 # grep -c gives empty output for an empty file on some AIX systems.
2642 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
2643 # Write a limited-size here document to conftest.frag.
2644 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
2645 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
2646 echo 'CEOF
2647 sed -f conftest.frag conftest.in > conftest.out
2648 rm -f conftest.in
2649 mv conftest.out conftest.in
2650 ' >> $CONFIG_STATUS
2651 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
2652 rm -f conftest.vals
2653 mv conftest.tail conftest.vals
2654 done
2655 rm -f conftest.vals
2656
2657 cat >> $CONFIG_STATUS <<\EOF
2658 rm -f conftest.frag conftest.h
2659 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
2660 cat conftest.in >> conftest.h
2661 rm -f conftest.in
2662 if cmp -s $ac_file conftest.h 2>/dev/null; then
2663 echo "$ac_file is unchanged"
2664 rm -f conftest.h
2665 else
2666 # Remove last slash and all that follows it. Not all systems have dirname.
2667 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
2668 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
2669 # The file is in a subdirectory.
2670 test ! -d "$ac_dir" && mkdir "$ac_dir"
2671 fi
2672 rm -f $ac_file
2673 mv conftest.h $ac_file
2674 fi
2675 fi; done
2676
2677 EOF
2678
2679 cat >> $CONFIG_STATUS <<EOF
2680 ac_sources="$files"
2681 ac_dests="$links"
2682 EOF
2683
2684 cat >> $CONFIG_STATUS <<\EOF
2685 srcdir=$ac_given_srcdir
2686 while test -n "$ac_sources"; do
2687 set $ac_dests; ac_dest=$1; shift; ac_dests=$*
2688 set $ac_sources; ac_source=$1; shift; ac_sources=$*
2689
2690 echo "linking $srcdir/$ac_source to $ac_dest"
2691
2692 if test ! -r $srcdir/$ac_source; then
2693 { echo "configure: error: $srcdir/$ac_source: File not found" 1>&2; exit 1; }
2694 fi
2695 rm -f $ac_dest
2696
2697 # Make relative symlinks.
2698 # Remove last slash and all that follows it. Not all systems have dirname.
2699 ac_dest_dir=`echo $ac_dest|sed 's%/[^/][^/]*$%%'`
2700 if test "$ac_dest_dir" != "$ac_dest" && test "$ac_dest_dir" != .; then
2701 # The dest file is in a subdirectory.
2702 test ! -d "$ac_dest_dir" && mkdir "$ac_dest_dir"
2703 ac_dest_dir_suffix="/`echo $ac_dest_dir|sed 's%^\./%%'`"
2704 # A "../" for each directory in $ac_dest_dir_suffix.
2705 ac_dots=`echo $ac_dest_dir_suffix|sed 's%/[^/]*%../%g'`
2706 else
2707 ac_dest_dir_suffix= ac_dots=
2708 fi
2709
2710 case "$srcdir" in
2711 [/$]*) ac_rel_source="$srcdir/$ac_source" ;;
2712 *) ac_rel_source="$ac_dots$srcdir/$ac_source" ;;
2713 esac
2714
2715 # Make a symlink if possible; otherwise try a hard link.
2716 if ln -s $ac_rel_source $ac_dest 2>/dev/null ||
2717 ln $srcdir/$ac_source $ac_dest; then :
2718 else
2719 { echo "configure: error: can not link $ac_dest to $srcdir/$ac_source" 1>&2; exit 1; }
2720 fi
2721 done
2722
2723
2724 exit 0
2725 EOF
2726 chmod +x $CONFIG_STATUS
2727 rm -fr confdefs* $ac_clean_files
2728 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
2729