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