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