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