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