arm config fix from Richard Earnshaw
[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.3
5 # Copyright (C) 1992, 1993, 1994 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 bfd-assembler use BFD back end for writing object files"
16 ac_help="$ac_help
17 targets alternative target configurations besides the primary"
18
19 # Initialize some variables set by options.
20 # The variables have the same names as the options, with
21 # dashes changed to underlines.
22 build=NONE
23 cache_file=./config.cache
24 exec_prefix=NONE
25 host=NONE
26 no_create=
27 nonopt=NONE
28 no_recursion=
29 prefix=NONE
30 program_prefix=NONE
31 program_suffix=NONE
32 program_transform_name=s,x,x,
33 silent=
34 site=
35 srcdir=
36 target=NONE
37 verbose=
38 x_includes=NONE
39 x_libraries=NONE
40
41 # Initialize some other variables.
42 subdirs=
43
44 ac_prev=
45 for ac_option
46 do
47
48 # If the previous option needs an argument, assign it.
49 if test -n "$ac_prev"; then
50 eval "$ac_prev=\$ac_option"
51 ac_prev=
52 continue
53 fi
54
55 case "$ac_option" in
56 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
57 *) ac_optarg= ;;
58 esac
59
60 # Accept the important Cygnus configure options, so we can diagnose typos.
61
62 case "$ac_option" in
63
64 -build | --build | --buil | --bui | --bu | --b)
65 ac_prev=build ;;
66 -build=* | --build=* | --buil=* | --bui=* | --bu=* | --b=*)
67 build="$ac_optarg" ;;
68
69 -cache-file | --cache-file | --cache-fil | --cache-fi \
70 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
71 ac_prev=cache_file ;;
72 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
73 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
74 cache_file="$ac_optarg" ;;
75
76 -disable-* | --disable-*)
77 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
78 # Reject names that are not valid shell variable names.
79 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
80 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
81 fi
82 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
83 eval "enable_${ac_feature}=no" ;;
84
85 -enable-* | --enable-*)
86 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
87 # Reject names that are not valid shell variable names.
88 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
89 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
90 fi
91 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
92 case "$ac_option" in
93 *=*) ;;
94 *) ac_optarg=yes ;;
95 esac
96 eval "enable_${ac_feature}='$ac_optarg'" ;;
97
98 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
99 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
100 | --exec | --exe | --ex)
101 ac_prev=exec_prefix ;;
102 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
103 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
104 | --exec=* | --exe=* | --ex=*)
105 exec_prefix="$ac_optarg" ;;
106
107 -gas | --gas | --ga | --g)
108 # Obsolete; use --with-gas.
109 with_gas=yes ;;
110
111 -help | --help | --hel | --he)
112 # Omit some internal or obsolete options to make the list less imposing.
113 # This message is too long to be a string in the A/UX 3.1 sh.
114 cat << EOF
115 Usage: configure [options] [host]
116 Options: [defaults in brackets after descriptions]
117 Configuration:
118 --cache-file=FILE cache test results in FILE
119 --help print this message
120 --no-create do not create output files
121 --quiet, --silent do not print \`checking...' messages
122 --version print the version of autoconf that created configure
123 Directory and file names:
124 --prefix=PREFIX install architecture-independent files in PREFIX
125 [$ac_default_prefix]
126 --exec-prefix=PREFIX install architecture-dependent files in PREFIX
127 [same as prefix]
128 --srcdir=DIR find the sources in DIR [configure dir or ..]
129 --program-prefix=PREFIX prepend PREFIX to installed program names
130 --program-suffix=SUFFIX append SUFFIX to installed program names
131 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
132 Host type:
133 --build=BUILD configure for building on BUILD [BUILD=HOST]
134 --host=HOST configure for HOST [guessed]
135 --target=TARGET configure for TARGET [TARGET=HOST]
136 Features and packages:
137 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
138 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
139 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
140 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
141 --x-includes=DIR X include files are in DIR
142 --x-libraries=DIR X library files are in DIR
143 --enable and --with options recognized:$ac_help
144 EOF
145 exit 0 ;;
146
147 -host | --host | --hos | --ho)
148 ac_prev=host ;;
149 -host=* | --host=* | --hos=* | --ho=*)
150 host="$ac_optarg" ;;
151
152 -nfp | --nfp | --nf)
153 # Obsolete; use --without-fp.
154 with_fp=no ;;
155
156 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
157 | --no-cr | --no-c)
158 no_create=yes ;;
159
160 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
161 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
162 no_recursion=yes ;;
163
164 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
165 ac_prev=prefix ;;
166 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
167 prefix="$ac_optarg" ;;
168
169 -program-prefix | --program-prefix | --program-prefi | --program-pref \
170 | --program-pre | --program-pr | --program-p)
171 ac_prev=program_prefix ;;
172 -program-prefix=* | --program-prefix=* | --program-prefi=* \
173 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
174 program_prefix="$ac_optarg" ;;
175
176 -program-suffix | --program-suffix | --program-suffi | --program-suff \
177 | --program-suf | --program-su | --program-s)
178 ac_prev=program_suffix ;;
179 -program-suffix=* | --program-suffix=* | --program-suffi=* \
180 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
181 program_suffix="$ac_optarg" ;;
182
183 -program-transform-name | --program-transform-name \
184 | --program-transform-nam | --program-transform-na \
185 | --program-transform-n | --program-transform- \
186 | --program-transform | --program-transfor \
187 | --program-transfo | --program-transf \
188 | --program-trans | --program-tran \
189 | --progr-tra | --program-tr | --program-t)
190 ac_prev=program_transform_name ;;
191 -program-transform-name=* | --program-transform-name=* \
192 | --program-transform-nam=* | --program-transform-na=* \
193 | --program-transform-n=* | --program-transform-=* \
194 | --program-transform=* | --program-transfor=* \
195 | --program-transfo=* | --program-transf=* \
196 | --program-trans=* | --program-tran=* \
197 | --progr-tra=* | --program-tr=* | --program-t=*)
198 program_transform_name="$ac_optarg" ;;
199
200 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
201 | -silent | --silent | --silen | --sile | --sil)
202 silent=yes ;;
203
204 -site | --site | --sit)
205 ac_prev=site ;;
206 -site=* | --site=* | --sit=*)
207 site="$ac_optarg" ;;
208
209 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
210 ac_prev=srcdir ;;
211 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
212 srcdir="$ac_optarg" ;;
213
214 -target | --target | --targe | --targ | --tar | --ta | --t)
215 ac_prev=target ;;
216 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
217 target="$ac_optarg" ;;
218
219 -v | -verbose | --verbose | --verbos | --verbo | --verb)
220 verbose=yes ;;
221
222 -version | --version | --versio | --versi | --vers)
223 echo "configure generated by autoconf version 2.3"
224 exit 0 ;;
225
226 -with-* | --with-*)
227 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
228 # Reject names that are not valid shell variable names.
229 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
230 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
231 fi
232 ac_package=`echo $ac_package| sed 's/-/_/g'`
233 case "$ac_option" in
234 *=*) ;;
235 *) ac_optarg=yes ;;
236 esac
237 eval "with_${ac_package}='$ac_optarg'" ;;
238
239 -without-* | --without-*)
240 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
241 # Reject names that are not valid shell variable names.
242 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
243 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
244 fi
245 ac_package=`echo $ac_package| sed 's/-/_/g'`
246 eval "with_${ac_package}=no" ;;
247
248 --x)
249 # Obsolete; use --with-x.
250 with_x=yes ;;
251
252 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
253 | --x-incl | --x-inc | --x-in | --x-i)
254 ac_prev=x_includes ;;
255 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
256 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
257 x_includes="$ac_optarg" ;;
258
259 -x-libraries | --x-libraries | --x-librarie | --x-librari \
260 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
261 ac_prev=x_libraries ;;
262 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
263 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
264 x_libraries="$ac_optarg" ;;
265
266 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
267 ;;
268
269 *)
270 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
271 echo "configure: warning: $ac_option: invalid host type" 1>&2
272 fi
273 if test "x$nonopt" != xNONE; then
274 { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
275 fi
276 nonopt="$ac_option"
277 ;;
278
279 esac
280 done
281
282 if test -n "$ac_prev"; then
283 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
284 fi
285
286 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
287
288 # File descriptor usage:
289 # 0 standard input
290 # 1 file creation
291 # 2 errors and warnings
292 # 3 some systems may open it to /dev/tty
293 # 4 used on the Kubota Titan
294 # 6 checking for... messages and results
295 # 5 compiler messages saved in config.log
296 if test "$silent" = yes; then
297 exec 6>/dev/null
298 else
299 exec 6>&1
300 fi
301 exec 5>./config.log
302
303 echo "\
304 This file contains any messages produced by compilers while
305 running configure, to aid debugging if configure makes a mistake.
306 " 1>&5
307
308 # Strip out --no-create and --no-recursion so they do not pile up.
309 # Also quote any args containing shell metacharacters.
310 ac_configure_args=
311 for ac_arg
312 do
313 case "$ac_arg" in
314 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
315 | --no-cr | --no-c) ;;
316 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
317 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
318 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
319 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
320 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
321 esac
322 done
323
324 # NLS nuisances.
325 # Only set LANG and LC_ALL to C if already set.
326 # These must not be set unconditionally because not all systems understand
327 # e.g. LANG=C (notably SCO).
328 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
329 if test "${LANG+set}" = set; then LANG=C; export LANG; fi
330
331 # confdefs.h avoids OS command line length limits that DEFS can exceed.
332 rm -rf conftest* confdefs.h
333 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
334 echo > confdefs.h
335
336 # A filename unique to this package, relative to the directory that
337 # configure is in, which we can look for to find out if srcdir is correct.
338 ac_unique_file=as.h
339
340 # Find the source files, if location was not specified.
341 if test -z "$srcdir"; then
342 ac_srcdir_defaulted=yes
343 # Try the directory containing this script, then its parent.
344 ac_prog=$0
345 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
346 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
347 srcdir=$ac_confdir
348 if test ! -r $srcdir/$ac_unique_file; then
349 srcdir=..
350 fi
351 else
352 ac_srcdir_defaulted=no
353 fi
354 if test ! -r $srcdir/$ac_unique_file; then
355 if test "$ac_srcdir_defaulted" = yes; then
356 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
357 else
358 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
359 fi
360 fi
361 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
362
363 # Prefer explicitly selected file to automatically selected ones.
364 if test -z "$CONFIG_SITE"; then
365 if test "x$prefix" != xNONE; then
366 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
367 else
368 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
369 fi
370 fi
371 for ac_site_file in $CONFIG_SITE; do
372 if test -r "$ac_site_file"; then
373 echo "loading site script $ac_site_file"
374 . "$ac_site_file"
375 fi
376 done
377
378 if test -r "$cache_file"; then
379 echo "loading cache $cache_file"
380 . $cache_file
381 else
382 echo "creating cache $cache_file"
383 > $cache_file
384 fi
385
386 ac_ext=c
387 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
388 ac_cpp='$CPP $CPPFLAGS'
389 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5 2>&5'
390 ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5 2>&5'
391
392 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
393 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
394 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
395 ac_n= ac_c='
396 ' ac_t=' '
397 else
398 ac_n=-n ac_c= ac_t=
399 fi
400 else
401 ac_n= ac_c='\c' ac_t=
402 fi
403
404 user_bfd_gas=
405 # Check whether --enable-bfd-assembler or --disable-bfd-assembler was given.
406 enableval="$enable_bfd_assembler"
407 if test -n "$enableval"; then
408 case "${enableval}" in
409 yes) need_bfd=yes user_bfd_gas=yes ;;
410 no) user_bfd_gas=no ;;
411 *) { echo "configure: error: bad value ${enableval} given for bfd-assembler option" 1>&2; exit 1; } ;;
412 esac
413 fi
414 # Check whether --enable-targets or --disable-targets was given.
415 enableval="$enable_targets"
416 if test -n "$enableval"; then
417 case "${enableval}" in
418 yes | "") { echo "configure: error: enable-targets option must specify target names or 'all'" 1>&2; exit 1; }
419 ;;
420 no) enable_targets= ;;
421 *) enable_targets=$enableval ;;
422 esac
423 fi
424
425 # Generate a header file -- gets more post-processing by Makefile later.
426
427
428 ac_aux_dir=
429 for ac_dir in `cd $srcdir;pwd`/.. $srcdir/`cd $srcdir;pwd`/..; do
430 if test -f $ac_dir/install-sh; then
431 ac_aux_dir=$ac_dir
432 ac_install_sh="$ac_aux_dir/install-sh -c"
433 break
434 elif test -f $ac_dir/install.sh; then
435 ac_aux_dir=$ac_dir
436 ac_install_sh="$ac_aux_dir/install.sh -c"
437 break
438 fi
439 done
440 if test -z "$ac_aux_dir"; then
441 { echo "configure: error: can not find install-sh or install.sh in `cd $srcdir;pwd`/.. $srcdir/`cd $srcdir;pwd`/.." 1>&2; exit 1; }
442 fi
443 ac_config_guess=$ac_aux_dir/config.guess
444 ac_config_sub=$ac_aux_dir/config.sub
445 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
446
447
448 # Do some error checking and defaulting for the host and target type.
449 # The inputs are:
450 # configure --host=HOST --target=TARGET --build=BUILD NONOPT
451 #
452 # The rules are:
453 # 1. You are not allowed to specify --host, --target, and nonopt at the
454 # same time.
455 # 2. Host defaults to nonopt.
456 # 3. If nonopt is not specified, then host defaults to the current host,
457 # as determined by config.guess.
458 # 4. Target and build default to nonopt.
459 # 5. If nonopt is not specified, then target and build default to host.
460
461 # The aliases save the names the user supplied, while $host etc.
462 # will get canonicalized.
463 case $host---$target---$nonopt in
464 NONE---*---* | *---NONE---* | *---*---NONE) ;;
465 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
466 esac
467
468
469 # Make sure we can run config.sub.
470 if $ac_config_sub sun4 >/dev/null 2>&1; then :
471 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
472 fi
473
474 echo $ac_n "checking host system type""... $ac_c" 1>&6
475
476 host_alias=$host
477 case "$host_alias" in
478 NONE)
479 case $nonopt in
480 NONE)
481 if host_alias=`$ac_config_guess`; then :
482 else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
483 fi ;;
484 *) host_alias=$nonopt ;;
485 esac ;;
486 esac
487
488 host=`$ac_config_sub $host_alias`
489 host_cpu=`echo $host | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\1/'`
490 host_vendor=`echo $host | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\2/'`
491 host_os=`echo $host | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\3/'`
492 echo "$ac_t""$host" 1>&6
493
494 echo $ac_n "checking target system type""... $ac_c" 1>&6
495
496 target_alias=$target
497 case "$target_alias" in
498 NONE)
499 case $nonopt in
500 NONE) target_alias=$host_alias ;;
501 *) target_alias=$nonopt ;;
502 esac ;;
503 esac
504
505 target=`$ac_config_sub $target_alias`
506 target_cpu=`echo $target | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\1/'`
507 target_vendor=`echo $target | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\2/'`
508 target_os=`echo $target | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\3/'`
509 echo "$ac_t""$target" 1>&6
510
511 echo $ac_n "checking build system type""... $ac_c" 1>&6
512
513 build_alias=$build
514 case "$build_alias" in
515 NONE)
516 case $nonopt in
517 NONE) build_alias=$host_alias ;;
518 *) build_alias=$nonopt ;;
519 esac ;;
520 esac
521
522 build=`$ac_config_sub $build_alias`
523 build_cpu=`echo $build | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\1/'`
524 build_vendor=`echo $build | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\2/'`
525 build_os=`echo $build | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\3/'`
526 echo "$ac_t""$build" 1>&6
527
528 test "$host_alias" != "$target_alias" &&
529 test "$program_prefix$program_suffix$program_transform_name" = \
530 NONENONEs,x,x, &&
531 program_prefix=${target_alias}-
532
533 if test "$program_transform_name" = s,x,x,; then
534 program_transform_name=
535 else
536 # Double any \ or $.
537 echo 's,\\,\\\\,g; s,\$,$$,g' > conftestsed
538 program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
539 rm -f conftestsed
540 fi
541 test "$program_prefix" != NONE &&
542 program_transform_name="s,^,${program_prefix},; $program_transform_name"
543 # Use a double $ so make ignores it.
544 test "$program_suffix" != NONE &&
545 program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
546
547 # sed with no file args requires a program.
548 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
549
550
551 te_file=generic
552
553 # assign cpu type
554
555 # check for architecture variants
556 case ${target_cpu} in
557 armeb) cpu_type=arm endian=big ;;
558 arm*) cpu_tpye=arm endian=little ;;
559 hppa*) cpu_type=hppa ;;
560 i[45]86) cpu_type=i386 ;;
561 m680[012346]0) cpu_type=m68k ;;
562 m68008) cpu_type=m68k ;;
563 m683??) cpu_type=m68k ;;
564 m8*) cpu_type=m88k ;;
565 mips*el) cpu_type=mips endian=little;;
566 mips*) cpu_type=mips endian=big ;;
567 powerpcle*) cpu_type=ppc endian=little ;;
568 powerpc*) cpu_type=ppc endian=big ;;
569 rs6000*) cpu_type=ppc ;;
570 sparc64) cpu_type=sparc obj_format=elf
571 cat >> confdefs.h <<\EOF
572 #define sparcv9 1
573 EOF
574 ;;
575 sparclite*) cpu_type=sparc ;;
576 *) cpu_type=${target_cpu} ;;
577 esac
578
579 # do we need the opcodes library?
580 case ${cpu_type} in
581 alpha | vax)
582 ;;
583 *)
584 OPCODES_LIB="../opcodes/libopcodes.a"
585 ;;
586 esac
587
588
589 gas_target=${cpu_type}
590 this_target=${generic_target}
591
592 canon_targets=""
593 if test -n "$enable_targets" ; then
594 for t in `echo $enable_targets | sed 's/,/ /g'`; do
595 result=`$ac_config_sub $t 2>/dev/null`
596 if test -n "$result" ; then
597 canon_targets="$canon_targets $result"
598 # else
599 # # Permit "all", etc. We don't support it yet though.
600 # canon_targets="$canon_targets $t"
601 fi
602 done
603 _gas_uniq_list="$canon_targets"
604 _gas_uniq_newlist=""
605 for _gas_uniq_i in _gas_uniq_dummy $_gas_uniq_list ; do
606 case $_gas_uniq_i in
607 _gas_uniq_dummy) ;;
608 *) case " $_gas_uniq_newlist " in
609 *" $_gas_uniq_i "*) ;;
610 *) _gas_uniq_newlist="$_gas_uniq_newlist $_gas_uniq_i" ;;
611 esac ;;
612 esac
613 done
614 canon_targets=$_gas_uniq_newlist
615
616 fi
617
618 emulations=""
619
620 for this_target in $target $canon_targets ; do
621
622 eval `echo $this_target | sed 's/^\(.*\)-\(.*\)-\(.*\)$/cpu=\1 vendor=\2 os=\3/'`
623
624 # check for architecture variants
625 case ${cpu} in
626 hppa*) cpu_type=hppa ;;
627 i[45]86) cpu_type=i386 ;;
628 m680[012346]0) cpu_type=m68k ;;
629 m68008) cpu_type=m68k ;;
630 m683??) cpu_type=m68k ;;
631 m8*) cpu_type=m88k ;;
632 mips*el) cpu_type=mips endian=little;;
633 mips*) cpu_type=mips endian=big ;;
634 powerpcle*) cpu_type=ppc endian=little ;;
635 powerpc*) cpu_type=ppc endian=big ;;
636 rs6000*) cpu_type=ppc ;;
637 sparc64) cpu_type=sparc obj_format=elf want_sparcv9=true ;;
638 sparclite*) cpu_type=sparc ;;
639 *) cpu_type=${target_cpu} ;;
640 esac
641
642 if test ${this_target} = $target ; then
643 target_cpu_type=${cpu_type}
644 elif test ${target_cpu_type} != ${cpu_type} ; then
645 continue
646 fi
647
648 targ=${cpu_type}
649 generic_target=${cpu_type}-$vendor-$os
650 dev=no
651 bfd_gas=no
652 em=generic
653
654 # assign object format
655 case ${generic_target} in
656 a29k-amd-udi) fmt=coff targ=ebmon29k ;;
657 a29k-amd-ebmon) fmt=coff targ=ebmon29k ;;
658 a29k-*-vxworks*) fmt=coff ;;
659
660 alpha-*-netware*) fmt=ecoff ;;
661 alpha-*-osf*) fmt=ecoff ;;
662
663 # start-sanitize-arc
664 arc-*-elf*) fmt=elf bfd_gas=yes ;;
665 # end-sanitize-arc
666
667 arm-*-riscix*) fmt=aout targ=arm-lit
668 emulation=riscix ;;
669 arm-*-aout) fmt=aout
670 case "$endian" in
671 big) targ=arm-big ;;
672 *) targ=arm-lit ;;
673 esac
674 ;;
675 arm-*-riscix*) fmt=aout ;;
676 arm-*-pe) fmt=coff targ=armcoff em=pe ;;
677
678 hppa-*-*elf*) fmt=elf em=hppa ;;
679 hppa-*-lites*) fmt=elf em=hppa ;;
680 hppa-*-osf*) fmt=som em=hppa ;;
681 hppa-*-hpux*) fmt=som em=hppa ;;
682 hppa-*-bsd*) fmt=som em=hppa ;;
683 hppa-*-hiux*) fmt=som em=hppa ;;
684
685 h8300-*-coff) fmt=coff ;;
686
687 i386-ibm-aix*) fmt=coff targ=i386coff
688 em=i386aix ;;
689 i386-*-bsd*) fmt=aout em=386bsd ;;
690 i386-*-netbsd0.8) fmt=aout em=386bsd ;;
691 i386-*-netbsd*) fmt=aout em=nbsd bfd_gas=yes;;
692 i386-*-linux*aout*) fmt=aout em=linux ;;
693 i386-*-linux*coff*) fmt=coff em=linux
694 targ=i386coff ;;
695 i386-*-linux*) fmt=elf em=linux ;;
696 i386-*-lynxos*) fmt=coff targ=i386coff
697 em=lynx ;;
698 i386-*-sysv4* | i386-*-solaris* | i386-*-elf)
699 fmt=elf ;;
700 i386-*-coff | i386-*-sysv* | i386-*-sco* | i386-*-isc*)
701 fmt=coff targ=i386coff ;;
702 i386-*-vsta) fmt=aout ;;
703 i386-*-go32) fmt=coff targ=i386coff ;;
704 i386-*-gnu*elf*) fmt=elf ;;
705 i386-*-mach* | i386-*-gnu*)
706 fmt=aout em=mach bfd_gas=yes ;;
707 i386-*-msdos*) fmt=aout ;;
708 i386-*-pe) fmt=coff targ=i386coff em=pe ;;
709 i386-*-*nt) fmt=coff targ=i386coff em=pe ;;
710 i960-*-bout) fmt=bout ;;
711 i960-*-coff) fmt=coff em=ic960 targ=ic960coff ;;
712 i960-*-nindy*) fmt=bout ;;
713 i960-*-vxworks4*) fmt=bout ;;
714 i960-*-vxworks5.0) fmt=bout ;;
715 i960-*-vxworks5.*) fmt=coff em=ic960 targ=ic960coff ;;
716 i960-*-vxworks*) fmt=bout ;;
717
718 m68k-*-vxworks* | m68k-ericsson-ose | m68k-*-sunos*)
719 fmt=aout em=sun3 ;;
720 m68k-motorola-sysv) fmt=coff targ=m68kcoff em=delta ;;
721 m68k-bull-sysv3*) fmt=coff targ=m68kcoff em=dpx2 ;;
722 m68k-apollo-*) fmt=coff targ=apollo em=apollo ;;
723 m68k-*-coff | m68k-*-sysv*)
724 fmt=coff targ=m68kcoff ;;
725 m68k-*-elf) fmt=elf ;;
726 m68k-*-hpux*) fmt=hp300 em=hp300 ;;
727 m68k-*-lynxos*) fmt=coff targ=m68kcoff
728 em=lynx ;;
729 m68k-*-netbsd*) fmt=aout em=nbsd bfd_gas=yes ;;
730
731 m88k-*-coff*) fmt=coff targ=m88kcoff ;;
732
733 # don't change em like *-*-bsd does
734 mips-dec-bsd*) fmt=aout targ=mips-lit ;;
735 mips-sony-bsd*) fmt=ecoff targ=mips-big ;;
736 mips-*-bsd*) { echo "configure: error: Unknown vendor for mips-bsd configuration." 1>&2; exit 1; } ;;
737 mips-*-ultrix*) fmt=ecoff targ=mips-lit ;;
738 mips-*-ecoff*) fmt=ecoff
739 case "$endian" in
740 big) targ=mips-big ;;
741 *) targ=mips-lit ;;
742 esac
743 ;;
744 mips-*-ecoff*) fmt=ecoff targ=mips-big ;;
745 mips-*-gnu*) fmt=aout
746 case "$endian" in
747 big) targ=mips-big ;;
748 *) targ=mips-lit ;;
749 esac
750 ;;
751 mips-*-irix5*) fmt=elf targ=mips-big ;;
752 mips-*-irix*) fmt=ecoff targ=mips-big ;;
753 mips-*-riscos*) fmt=ecoff targ=mips-big ;;
754 mips-*-sysv*) fmt=ecoff targ=mips-big ;;
755 mips-*-elf*) fmt=elf
756 case "$endian" in
757 big) targ=mips-big ;;
758 *) targ=mips-lit ;;
759 esac
760 ;;
761 ppc-*-aix*) fmt=coff ;;
762 ppc-*-elf* | ppc-*-eabi* | ppc-*-sysv4*)
763 fmt=elf
764 case "$endian" in
765 big) targ=ppc-big ;;
766 *) targ=ppc-lit ;;
767 esac
768 ;;
769 ppc-*-netware*) fmt=elf em=ppcnw ;;
770
771 sh-*-coff) fmt=coff ;;
772
773 # start-sanitize-rce
774 rce-*-aout) fmt=aout ;;
775 # end-sanitize-rce
776
777 ns32k-pc532-mach*) fmt=aout em=pc532mach ;;
778 ns32k-pc532-netbsd*) fmt=aout em=nbsd532 ;;
779
780 sparc-*-sunos4*) fmt=aout em=sun3 ;;
781 sparc-*-aout | sparc*-*-vxworks)
782 fmt=aout ;;
783 sparc-*-coff) fmt=coff ;;
784 sparc-*-lynxos*) fmt=coff em=lynx ;;
785 sparc-fujitsu-none) fmt=aout ;;
786 sparc-*-elf | sparc*-*-solaris*)
787 fmt=elf ;;
788 sparc-*-netbsd*) fmt=aout em=nbsd bfd_gas=yes ;;
789
790 vax-*-bsd* | vax-*-ultrix*)
791 fmt=aout ;;
792 vax-*-vms) fmt=vms ;;
793
794 z8k-*-coff | z8k-*-sim)
795 fmt=coff ;;
796
797 w65-*-*) fmt=coff ;;
798
799 *-*-aout | *-*-scout)
800 fmt=aout ;;
801 *-*-nindy*)
802 fmt=bout ;;
803 *-*-bsd*)
804 fmt=aout em=sun3 ;;
805 *-*-generic) fmt=generic ;;
806 *-*-xray | *-*-hms) fmt=coff ;;
807 *-*-sim) fmt=coff ;;
808 *-*-elf | *-*-sysv4* | *-*-solaris*)
809 echo "configure: warning: GAS support for ELF format is incomplete." 1>&2
810 fmt=elf dev=yes ;;
811 *-*-vxworks) fmt=aout ;;
812 *-*-netware) fmt=elf ;;
813 esac
814
815 case ${cpu_type}-${fmt} in
816 arm-*) bfd_gas=yes ;;
817 # not yet
818 # i386-aout) bfd_gas=preferred ;;
819 mips-*) bfd_gas=yes ;;
820 ns32k-*) bfd_gas=yes ;;
821 ppc-*) bfd_gas=yes ;;
822 sparc-*) bfd_gas=yes ;;
823 *-elf) bfd_gas=yes ;;
824 *-ecoff) bfd_gas=yes ;;
825 *-som) bfd_gas=yes ;;
826 *) ;;
827 esac
828
829 # See if we really can support this configuration with the emulation code.
830
831 if test $this_target = $target ; then
832 primary_bfd_gas=$bfd_gas
833 obj_format=$fmt
834 gas_target=$targ
835 te_file=$em
836
837 if test $bfd_gas = no ; then
838 # Can't support other configurations this way.
839 break
840 fi
841 elif test $bfd_gas = no ; then
842 # Can't support this configuration.
843 break
844 fi
845
846 # From target name and format, produce a list of supported emulations.
847
848 case ${generic_target}-${fmt} in
849 mips-*-irix5*-*) emulation="mipsbelf mipslelf mipself mipsbecoff mipslecoff mipsecoff" ;;
850 mips-*-*-ecoff) case "$endian" in
851 big) emulation="mipsbecoff mipslecoff mipsecoff" ;;
852 *) emulation="mipslecoff mipsbecoff mipsecoff" ;;
853 esac ;;
854 mips-*-*-elf) case "$endian" in
855 big) emulation="mipsbelf mipslelf mipself" ;;
856 *) emulation="mipslelf mipsbelf mipself" ;;
857 esac ;;
858 esac
859
860 emulations="$emulations $emulation"
861
862 # Other random stuff.
863
864 test -n "$want_sparcv9" && cat >> confdefs.h <<\EOF
865 #define sparcv9 1
866 EOF
867
868
869 done
870
871 # Assign floating point type. Most processors with FP support
872 # IEEE FP. On those that don't support FP at all, usually IEEE
873 # is emulated.
874 case ${target_cpu} in
875 vax | tahoe ) atof=${target_cpu} ;;
876 *) atof=ieee ;;
877 esac
878
879 case "${obj_format}" in
880 "") { echo "configure: error: GAS does not know what format to use for target ${target}" 1>&2; exit 1; } ;;
881 esac
882
883
884 if test ! -r ${srcdir}/config/tc-${cpu_type}.c; then
885 { echo "configure: error: GAS does not support target CPU ${cpu_type}" 1>&2; exit 1; }
886 fi
887
888 if test ! -r ${srcdir}/config/obj-${obj_format}.c; then
889 { echo "configure: error: GAS does not have support for object file format ${obj_format}" 1>&2; exit 1; }
890 fi
891
892 # and target makefile frag
893
894 target_frag=${srcdir}/config/${gas_target}.mt
895 if test ! -r ${target_frag}; then
896 target_frag=/dev/null # ick! but subst_file can't be conditionalized
897 fi
898
899
900 case ${user_bfd_gas}-${primary_bfd_gas} in
901 yes-yes | no-no)
902 # We didn't override user's choice.
903 ;;
904 no-yes)
905 echo "configure: warning: Use of BFD is required for ${target}; overriding config options." 1>&2
906 ;;
907 no-preferred)
908 primary_bfd_gas=no
909 ;;
910 *-preferred)
911 primary_bfd_gas=yes
912 ;;
913 yes-*)
914 primary_bfd_gas=yes
915 ;;
916 -*)
917 # User specified nothing.
918 ;;
919 esac
920
921 # Some COFF configurations want these random other flags set.
922 case ${obj_format} in
923 coff)
924 case ${target_cpu_type} in
925 i386) cat >> confdefs.h <<\EOF
926 #define I386COFF 1
927 EOF
928 ;;
929 m68k) cat >> confdefs.h <<\EOF
930 #define M68KCOFF 1
931 EOF
932 ;;
933 m88k) cat >> confdefs.h <<\EOF
934 #define M88KCOFF 1
935 EOF
936 ;;
937 esac
938 ;;
939 esac
940
941 # Getting this done right is going to be a bitch. Each configuration specified
942 # with --enable-targets=... should be checked for environment, format, cpu, and
943 # bfd_gas setting.
944 #
945 # For each configuration, the necessary object file support code must be linked
946 # in. This might be only one, it might be up to four. The necessary emulation
947 # code needs to be provided, too.
948 #
949 # And then there's "--enable-targets=all"....
950 #
951 # For now, just always do it for MIPS ELF or ECOFF configurations. Sigh.
952
953 formats="${obj_format}"
954 emfiles=""
955 EMULATIONS=""
956 _gas_uniq_list="$emulations"
957 _gas_uniq_newlist=""
958 for _gas_uniq_i in _gas_uniq_dummy $_gas_uniq_list ; do
959 case $_gas_uniq_i in
960 _gas_uniq_dummy) ;;
961 *) case " $_gas_uniq_newlist " in
962 *" $_gas_uniq_i "*) ;;
963 *) _gas_uniq_newlist="$_gas_uniq_newlist $_gas_uniq_i" ;;
964 esac ;;
965 esac
966 done
967 emulations=$_gas_uniq_newlist
968
969 for em in . $emulations ; do
970 case $em in
971 .) continue ;;
972 mipsbelf | mipslelf)
973 fmt=elf file=mipself ;;
974 mipsbecoff | mipslecoff)
975 fmt=ecoff file=mipsecoff ;;
976 esac
977 formats="$formats $fmt"
978 emfiles="$emfiles e-$file.o"
979 EMULATIONS="$EMULATIONS &$em,"
980 done
981 _gas_uniq_list="$formats"
982 _gas_uniq_newlist=""
983 for _gas_uniq_i in _gas_uniq_dummy $_gas_uniq_list ; do
984 case $_gas_uniq_i in
985 _gas_uniq_dummy) ;;
986 *) case " $_gas_uniq_newlist " in
987 *" $_gas_uniq_i "*) ;;
988 *) _gas_uniq_newlist="$_gas_uniq_newlist $_gas_uniq_i" ;;
989 esac ;;
990 esac
991 done
992 formats=$_gas_uniq_newlist
993
994 _gas_uniq_list="$emfiles"
995 _gas_uniq_newlist=""
996 for _gas_uniq_i in _gas_uniq_dummy $_gas_uniq_list ; do
997 case $_gas_uniq_i in
998 _gas_uniq_dummy) ;;
999 *) case " $_gas_uniq_newlist " in
1000 *" $_gas_uniq_i "*) ;;
1001 *) _gas_uniq_newlist="$_gas_uniq_newlist $_gas_uniq_i" ;;
1002 esac ;;
1003 esac
1004 done
1005 emfiles=$_gas_uniq_newlist
1006
1007 if test `set . $formats ; shift ; echo $#` -gt 1 ; then
1008 for fmt in $formats ; do
1009 case $fmt in
1010 aout) cat >> confdefs.h <<\EOF
1011 #define OBJ_MAYBE_AOUT 1
1012 EOF
1013 ;;
1014 bout) cat >> confdefs.h <<\EOF
1015 #define OBJ_MAYBE_BOUT 1
1016 EOF
1017 ;;
1018 coff) cat >> confdefs.h <<\EOF
1019 #define OBJ_MAYBE_COFF 1
1020 EOF
1021 ;;
1022 ecoff) cat >> confdefs.h <<\EOF
1023 #define OBJ_MAYBE_ECOFF 1
1024 EOF
1025 ;;
1026 elf) cat >> confdefs.h <<\EOF
1027 #define OBJ_MAYBE_ELF 1
1028 EOF
1029 ;;
1030 generic) cat >> confdefs.h <<\EOF
1031 #define OBJ_MAYBE_GENERIC 1
1032 EOF
1033 ;;
1034 hp300) cat >> confdefs.h <<\EOF
1035 #define OBJ_MAYBE_HP300 1
1036 EOF
1037 ;;
1038 ieee) cat >> confdefs.h <<\EOF
1039 #define OBJ_MAYBE_IEEE 1
1040 EOF
1041 ;;
1042 som) cat >> confdefs.h <<\EOF
1043 #define OBJ_MAYBE_SOM 1
1044 EOF
1045 ;;
1046 vms) cat >> confdefs.h <<\EOF
1047 #define OBJ_MAYBE_VMS 1
1048 EOF
1049 ;;
1050 esac
1051 extra_objects="$extra_objects obj-$fmt.o"
1052 done
1053 obj_format=multi
1054 fi
1055 if test `set . $emfiles ; shift ; echo $#` -gt 0 ; then
1056 te_file=multi
1057 extra_objects="$extra_objects $emfiles"
1058 DEFAULT_EMULATION=`set . $emulations ; echo $2`
1059 cat >> confdefs.h <<\EOF
1060 #define USE_EMULATIONS 1
1061 EOF
1062
1063 fi
1064
1065 cat >> confdefs.h <<EOF
1066 #define EMULATIONS $EMULATIONS
1067 EOF
1068
1069 cat >> confdefs.h <<EOF
1070 #define DEFAULT_EMULATION "$DEFAULT_EMULATION"
1071 EOF
1072
1073
1074 files="config/tc-${cpu_type}.c config/tc-${cpu_type}.h \
1075 config/obj-${obj_format}.h config/obj-${obj_format}.c \
1076 config/te-${te_file}.h config/atof-${atof}.c \
1077 $extra_files"
1078 links="targ-cpu.c targ-cpu.h obj-format.h obj-format.c targ-env.h atof-targ.c \
1079 $extra_links"
1080
1081 case ${primary_bfd_gas}-${cpu_type}-${obj_format} in
1082 yes-*-coff) need_bfd=yes ;;
1083 no-*-coff) need_bfd=yes
1084 cat >> confdefs.h <<\EOF
1085 #define MANY_SEGMENTS 1
1086 EOF
1087 ;;
1088 esac
1089
1090 reject_dev_configs=yes
1091
1092 case ${reject_dev_configs}-${dev} in
1093 yes-yes) # Oops.
1094 { echo "configure: error: GAS does not support the ${generic_target} configuration." 1>&2; exit 1; }
1095 ;;
1096 esac
1097
1098
1099
1100
1101
1102
1103
1104 case "${primary_bfd_gas}" in
1105 yes) cat >> confdefs.h <<\EOF
1106 #define BFD_ASSEMBLER 1
1107 EOF
1108
1109 need_bfd=yes ;;
1110 esac
1111
1112 case "${need_bfd}" in
1113 yes) BFDLIB=../bfd/libbfd.a
1114 ALL_OBJ_DEPS="$ALL_OBJ_DEPS ../bfd/bfd.h"
1115 ;;
1116 esac
1117
1118
1119
1120 cat >> confdefs.h <<EOF
1121 #define TARGET_ALIAS "${target_alias}"
1122 EOF
1123
1124 cat >> confdefs.h <<EOF
1125 #define TARGET_CANONICAL "${target}"
1126 EOF
1127
1128 cat >> confdefs.h <<EOF
1129 #define TARGET_CPU "${target_cpu}"
1130 EOF
1131
1132 cat >> confdefs.h <<EOF
1133 #define TARGET_VENDOR "${target_vendor}"
1134 EOF
1135
1136 cat >> confdefs.h <<EOF
1137 #define TARGET_OS "${target_os}"
1138 EOF
1139
1140
1141 echo $ac_n "checking for CC""... $ac_c" 1>&6
1142 test -z "$CC" && CC=`egrep '^CC *=' ../Makefile | tail -1 | sed 's/^CC *= *//'`
1143 test -z "$CC" && CC=cc
1144 echo "$ac_t""setting CC to $CC" 1>&6
1145
1146 # Find out if we are using GNU C, under whatever name.
1147 cat > conftest.c <<EOF
1148 #ifdef __GNUC__
1149 yes
1150 #endif
1151 EOF
1152 ${CC-cc} -E conftest.c > conftest.out 2>&1
1153 if egrep yes conftest.out >/dev/null 2>&1; then
1154 GCC=yes
1155 else
1156 GCC=
1157 fi
1158 rm -f conftest*
1159
1160 # Find a good install program. We prefer a C program (faster),
1161 # so one script is as good as another. But avoid the broken or
1162 # incompatible versions:
1163 # SysV /etc/install, /usr/sbin/install
1164 # SunOS /usr/etc/install
1165 # IRIX /sbin/install
1166 # AIX /bin/install
1167 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
1168 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1169 # ./install, which can be erroneously created by make from ./install.sh.
1170 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
1171 if test -z "$INSTALL"; then
1172 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
1173 echo $ac_n "(cached) $ac_c" 1>&6
1174 else
1175 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1176 for ac_dir in $PATH; do
1177 # Account for people who put trailing slashes in PATH elements.
1178 case "$ac_dir/" in
1179 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1180 *)
1181 # OSF1 and SCO ODT 3.0 have their own names for install.
1182 for ac_prog in ginstall installbsd scoinst install; do
1183 if test -f $ac_dir/$ac_prog; then
1184 if test $ac_prog = install &&
1185 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1186 # AIX install. It has an incompatible calling convention.
1187 # OSF/1 installbsd also uses dspmsg, but is usable.
1188 :
1189 else
1190 ac_cv_path_install="$ac_dir/$ac_prog -c"
1191 break 2
1192 fi
1193 fi
1194 done
1195 ;;
1196 esac
1197 done
1198 IFS="$ac_save_ifs"
1199 # As a last resort, use the slow shell script.
1200 test -z "$ac_cv_path_install" && ac_cv_path_install="$ac_install_sh"
1201 fi
1202 INSTALL="$ac_cv_path_install"
1203 fi
1204 echo "$ac_t""$INSTALL" 1>&6
1205
1206 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1207 # It thinks the first close brace ends the variable substitution.
1208 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1209
1210 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1211
1212
1213 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
1214 # On Suns, sometimes $CPP names a directory.
1215 if test -n "$CPP" && test -d "$CPP"; then
1216 CPP=
1217 fi
1218 if test -z "$CPP"; then
1219 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1220 echo $ac_n "(cached) $ac_c" 1>&6
1221 else
1222 # This must be in double quotes, not single quotes, because CPP may get
1223 # substituted into the Makefile and "${CC-cc}" will confuse make.
1224 CPP="${CC-cc} -E"
1225 # On the NeXT, cc -E runs the code through the compiler's parser,
1226 # not just through cpp.
1227 cat > conftest.$ac_ext <<EOF
1228 #line 1229 "configure"
1229 #include "confdefs.h"
1230 #include <assert.h>
1231 Syntax Error
1232 EOF
1233 eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1234 ac_err=`grep -v '^ *+' conftest.out`
1235 if test -z "$ac_err"; then
1236 :
1237 else
1238 echo "$ac_err" >&5
1239 rm -rf conftest*
1240 CPP="${CC-cc} -E -traditional-cpp"
1241 cat > conftest.$ac_ext <<EOF
1242 #line 1243 "configure"
1243 #include "confdefs.h"
1244 #include <assert.h>
1245 Syntax Error
1246 EOF
1247 eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1248 ac_err=`grep -v '^ *+' conftest.out`
1249 if test -z "$ac_err"; then
1250 :
1251 else
1252 echo "$ac_err" >&5
1253 rm -rf conftest*
1254 CPP=/lib/cpp
1255 fi
1256 rm -f conftest*
1257 fi
1258 rm -f conftest*
1259 ac_cv_prog_CPP="$CPP"
1260 fi
1261 fi
1262 CPP="$ac_cv_prog_CPP"
1263 echo "$ac_t""$CPP" 1>&6
1264
1265 for ac_hdr in string.h stdlib.h memory.h strings.h unistd.h stdarg.h varargs.h errno.h sys/types.h
1266 do
1267 ac_safe=`echo "$ac_hdr" | tr './\055' '___'`
1268 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1269 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1270 echo $ac_n "(cached) $ac_c" 1>&6
1271 else
1272 cat > conftest.$ac_ext <<EOF
1273 #line 1274 "configure"
1274 #include "confdefs.h"
1275 #include <$ac_hdr>
1276 EOF
1277 eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1278 ac_err=`grep -v '^ *+' conftest.out`
1279 if test -z "$ac_err"; then
1280 rm -rf conftest*
1281 eval "ac_cv_header_$ac_safe=yes"
1282 else
1283 echo "$ac_err" >&5
1284 rm -rf conftest*
1285 eval "ac_cv_header_$ac_safe=no"
1286 fi
1287 rm -f conftest*
1288 fi
1289 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1290 echo "$ac_t""yes" 1>&6
1291 ac_tr_hdr=HAVE_`echo $ac_hdr | tr '[a-z]./\055' '[A-Z]___'`
1292 cat >> confdefs.h <<EOF
1293 #define $ac_tr_hdr 1
1294 EOF
1295
1296 else
1297 echo "$ac_t""no" 1>&6
1298 fi
1299 done
1300
1301
1302 # Put this here so that autoconf's "cross-compiling" message doesn't confuse
1303 # people who are not cross-compiling but are compiling cross-assemblers.
1304 echo $ac_n "checking whether compiling a cross-assembler""... $ac_c" 1>&6
1305 if test "${host}" = "${target}"; then
1306 cross_gas=no
1307 else
1308 cross_gas=yes
1309 cat >> confdefs.h <<\EOF
1310 #define CROSS_COMPILE 1
1311 EOF
1312
1313 fi
1314 echo "$ac_t""$cross_gas" 1>&6
1315
1316 # If we cannot run a trivial program, we must be cross compiling.
1317 echo $ac_n "checking whether cross-compiling""... $ac_c" 1>&6
1318 if eval "test \"`echo '$''{'ac_cv_c_cross'+set}'`\" = set"; then
1319 echo $ac_n "(cached) $ac_c" 1>&6
1320 else
1321 if test "$cross_compiling" = yes; then
1322 ac_cv_c_cross=yes
1323 else
1324 cat > conftest.$ac_ext <<EOF
1325 #line 1326 "configure"
1326 #include "confdefs.h"
1327 main(){return(0);}
1328 EOF
1329 eval $ac_link
1330 if test -s conftest && (./conftest; exit) 2>/dev/null; then
1331 ac_cv_c_cross=no
1332 else
1333 ac_cv_c_cross=yes
1334 fi
1335 fi
1336 rm -fr conftest*
1337 fi
1338 cross_compiling=$ac_cv_c_cross
1339 echo "$ac_t""$ac_cv_c_cross" 1>&6
1340
1341 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
1342 # for constant arguments. Useless!
1343 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
1344 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
1345 echo $ac_n "(cached) $ac_c" 1>&6
1346 else
1347 cat > conftest.$ac_ext <<EOF
1348 #line 1349 "configure"
1349 #include "confdefs.h"
1350 #include <alloca.h>
1351 int main() { return 0; }
1352 int t() {
1353 char *p = alloca(2 * sizeof(int));
1354 ; return 0; }
1355 EOF
1356 if eval $ac_link; then
1357 rm -rf conftest*
1358 ac_cv_header_alloca_h=yes
1359 else
1360 rm -rf conftest*
1361 ac_cv_header_alloca_h=no
1362 fi
1363 rm -f conftest*
1364
1365 fi
1366 echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
1367 if test $ac_cv_header_alloca_h = yes; then
1368 cat >> confdefs.h <<\EOF
1369 #define HAVE_ALLOCA_H 1
1370 EOF
1371
1372 fi
1373
1374 echo $ac_n "checking for alloca""... $ac_c" 1>&6
1375 if eval "test \"`echo '$''{'ac_cv_func_alloca'+set}'`\" = set"; then
1376 echo $ac_n "(cached) $ac_c" 1>&6
1377 else
1378 cat > conftest.$ac_ext <<EOF
1379 #line 1380 "configure"
1380 #include "confdefs.h"
1381
1382 #ifdef __GNUC__
1383 # define alloca __builtin_alloca
1384 #else
1385 # if HAVE_ALLOCA_H
1386 # include <alloca.h>
1387 # else
1388 # ifdef _AIX
1389 #pragma alloca
1390 # else
1391 # ifndef alloca /* predefined by HP cc +Olibcalls */
1392 char *alloca ();
1393 # endif
1394 # endif
1395 # endif
1396 #endif
1397
1398 int main() { return 0; }
1399 int t() {
1400 char *p = (char *) alloca(1);
1401 ; return 0; }
1402 EOF
1403 if eval $ac_link; then
1404 rm -rf conftest*
1405 ac_cv_func_alloca=yes
1406 else
1407 rm -rf conftest*
1408 ac_cv_func_alloca=no
1409 fi
1410 rm -f conftest*
1411
1412 fi
1413 echo "$ac_t""$ac_cv_func_alloca" 1>&6
1414 if test $ac_cv_func_alloca = yes; then
1415 cat >> confdefs.h <<\EOF
1416 #define HAVE_ALLOCA 1
1417 EOF
1418
1419 fi
1420
1421 if test $ac_cv_func_alloca = no; then
1422 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
1423 # that cause trouble. Some versions do not even contain alloca or
1424 # contain a buggy version. If you still want to use their alloca,
1425 # use ar to extract alloca.o from them instead of compiling alloca.c.
1426 ALLOCA=alloca.o
1427 cat >> confdefs.h <<\EOF
1428 #define C_ALLOCA 1
1429 EOF
1430
1431
1432 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
1433 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
1434 echo $ac_n "(cached) $ac_c" 1>&6
1435 else
1436 cat > conftest.$ac_ext <<EOF
1437 #line 1438 "configure"
1438 #include "confdefs.h"
1439 #if defined(CRAY) && ! defined(CRAY2)
1440 webecray
1441 #else
1442 wenotbecray
1443 #endif
1444
1445 EOF
1446 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1447 egrep "webecray" >/dev/null 2>&1; then
1448 rm -rf conftest*
1449 ac_cv_os_cray=yes
1450 else
1451 rm -rf conftest*
1452 ac_cv_os_cray=no
1453 fi
1454 rm -f conftest*
1455
1456 fi
1457 echo "$ac_t""$ac_cv_os_cray" 1>&6
1458 if test $ac_cv_os_cray = yes; then
1459 for ac_func in _getb67 GETB67 getb67; do
1460 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1461 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1462 echo $ac_n "(cached) $ac_c" 1>&6
1463 else
1464 cat > conftest.$ac_ext <<EOF
1465 #line 1466 "configure"
1466 #include "confdefs.h"
1467 /* System header to define __stub macros and hopefully few prototypes,
1468 which can conflict with char $ac_func(); below. */
1469 #include <assert.h>
1470 /* Override any gcc2 internal prototype to avoid an error. */
1471 char $ac_func();
1472
1473 int main() { return 0; }
1474 int t() {
1475
1476 /* The GNU C library defines this for functions which it implements
1477 to always fail with ENOSYS. Some functions are actually named
1478 something starting with __ and the normal name is an alias. */
1479 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1480 choke me
1481 #else
1482 $ac_func();
1483 #endif
1484
1485 ; return 0; }
1486 EOF
1487 if eval $ac_link; then
1488 rm -rf conftest*
1489 eval "ac_cv_func_$ac_func=yes"
1490 else
1491 rm -rf conftest*
1492 eval "ac_cv_func_$ac_func=no"
1493 fi
1494 rm -f conftest*
1495
1496 fi
1497 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1498 echo "$ac_t""yes" 1>&6
1499 cat >> confdefs.h <<EOF
1500 #define CRAY_STACKSEG_END $ac_func
1501 EOF
1502
1503 break
1504 else
1505 echo "$ac_t""no" 1>&6
1506 fi
1507
1508 done
1509 fi
1510
1511 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
1512 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
1513 echo $ac_n "(cached) $ac_c" 1>&6
1514 else
1515 if test "$cross_compiling" = yes; then
1516 ac_cv_c_stack_direction=0
1517 else
1518 cat > conftest.$ac_ext <<EOF
1519 #line 1520 "configure"
1520 #include "confdefs.h"
1521 find_stack_direction ()
1522 {
1523 static char *addr = 0;
1524 auto char dummy;
1525 if (addr == 0)
1526 {
1527 addr = &dummy;
1528 return find_stack_direction ();
1529 }
1530 else
1531 return (&dummy > addr) ? 1 : -1;
1532 }
1533 main ()
1534 {
1535 exit (find_stack_direction() < 0);
1536 }
1537 EOF
1538 eval $ac_link
1539 if test -s conftest && (./conftest; exit) 2>/dev/null; then
1540 ac_cv_c_stack_direction=1
1541 else
1542 ac_cv_c_stack_direction=-1
1543 fi
1544 fi
1545 rm -fr conftest*
1546 fi
1547 echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
1548 cat >> confdefs.h <<EOF
1549 #define STACK_DIRECTION $ac_cv_c_stack_direction
1550 EOF
1551
1552 fi
1553
1554 echo $ac_n "checking for inline""... $ac_c" 1>&6
1555 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
1556 echo $ac_n "(cached) $ac_c" 1>&6
1557 else
1558 ac_cv_c_inline=no
1559 for ac_kw in inline __inline__ __inline; do
1560 cat > conftest.$ac_ext <<EOF
1561 #line 1562 "configure"
1562 #include "confdefs.h"
1563
1564 int main() { return 0; }
1565 int t() {
1566 } $ac_kw foo() {
1567 ; return 0; }
1568 EOF
1569 if eval $ac_compile; then
1570 rm -rf conftest*
1571 ac_cv_c_inline=$ac_kw; break
1572 fi
1573 rm -f conftest*
1574
1575 done
1576
1577 fi
1578 echo "$ac_t""$ac_cv_c_inline" 1>&6
1579 case "$ac_cv_c_inline" in
1580 inline | yes) ;;
1581 no) cat >> confdefs.h <<\EOF
1582 #define inline
1583 EOF
1584 ;;
1585 *) cat >> confdefs.h <<EOF
1586 #define inline $ac_cv_c_inline
1587 EOF
1588 ;;
1589 esac
1590
1591
1592 # VMS doesn't have unlink.
1593 for ac_func in unlink remove
1594 do
1595 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1596 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1597 echo $ac_n "(cached) $ac_c" 1>&6
1598 else
1599 cat > conftest.$ac_ext <<EOF
1600 #line 1601 "configure"
1601 #include "confdefs.h"
1602 /* System header to define __stub macros and hopefully few prototypes,
1603 which can conflict with char $ac_func(); below. */
1604 #include <assert.h>
1605 /* Override any gcc2 internal prototype to avoid an error. */
1606 char $ac_func();
1607
1608 int main() { return 0; }
1609 int t() {
1610
1611 /* The GNU C library defines this for functions which it implements
1612 to always fail with ENOSYS. Some functions are actually named
1613 something starting with __ and the normal name is an alias. */
1614 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1615 choke me
1616 #else
1617 $ac_func();
1618 #endif
1619
1620 ; return 0; }
1621 EOF
1622 if eval $ac_link; then
1623 rm -rf conftest*
1624 eval "ac_cv_func_$ac_func=yes"
1625 else
1626 rm -rf conftest*
1627 eval "ac_cv_func_$ac_func=no"
1628 fi
1629 rm -f conftest*
1630
1631 fi
1632 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1633 echo "$ac_t""yes" 1>&6
1634 ac_tr_func=HAVE_`echo $ac_func | tr '[a-z]' '[A-Z]'`
1635 cat >> confdefs.h <<EOF
1636 #define $ac_tr_func 1
1637 EOF
1638 break
1639 else
1640 echo "$ac_t""no" 1>&6
1641 fi
1642 done
1643
1644
1645 # Some non-ANSI preprocessors botch requoting inside strings. That's bad
1646 # enough, but on some of those systems, the assert macro relies on requoting
1647 # working properly!
1648 echo $ac_n "checking for working assert macro""... $ac_c" 1>&6
1649 if eval "test \"`echo '$''{'gas_cv_assert_ok'+set}'`\" = set"; then
1650 echo $ac_n "(cached) $ac_c" 1>&6
1651 else
1652 cat > conftest.$ac_ext <<EOF
1653 #line 1654 "configure"
1654 #include "confdefs.h"
1655 #include <assert.h>
1656 #include <stdio.h>
1657 int main() { return 0; }
1658 int t() {
1659
1660 /* check for requoting problems */
1661 static int a, b, c, d;
1662 static char *s;
1663 assert (!strcmp(s, "foo bar baz quux"));
1664 /* check for newline handling */
1665 assert (a == b
1666 || c == d);
1667
1668 ; return 0; }
1669 EOF
1670 if eval $ac_link; then
1671 rm -rf conftest*
1672 gas_cv_assert_ok=yes
1673 else
1674 rm -rf conftest*
1675 gas_cv_assert_ok=no
1676 fi
1677 rm -f conftest*
1678
1679 fi
1680 echo "$ac_t""$gas_cv_assert_ok" 1>&6
1681 test $gas_cv_assert_ok = yes || cat >> confdefs.h <<\EOF
1682 #define BROKEN_ASSERT 1
1683 EOF
1684
1685
1686
1687 # On some systems, the system header files may not declare malloc, realloc,
1688 # and free. There are places where gas needs these functions to have been
1689 # declared -- such as when taking their addresses.
1690 gas_test_headers="
1691 #ifdef HAVE_MEMORY_H
1692 #include <memory.h>
1693 #endif
1694 #ifdef HAVE_STRING_H
1695 #include <string.h>
1696 #endif
1697 #ifdef HAVE_STDLIB_H
1698 #include <stdlib.h>
1699 #endif
1700 #ifdef HAVE_UNISTD_H
1701 #include <unistd.h>
1702 #endif
1703 "
1704
1705 echo $ac_n "checking whether declaration is required for malloc""... $ac_c" 1>&6
1706 if eval "test \"`echo '$''{'gas_cv_decl_needed_malloc'+set}'`\" = set"; then
1707 echo $ac_n "(cached) $ac_c" 1>&6
1708 else
1709 cat > conftest.$ac_ext <<EOF
1710 #line 1711 "configure"
1711 #include "confdefs.h"
1712 $gas_test_headers
1713 int main() { return 0; }
1714 int t() {
1715
1716 typedef char *(*f)();
1717 f x;
1718 x = (f) malloc;
1719
1720 ; return 0; }
1721 EOF
1722 if eval $ac_link; then
1723 rm -rf conftest*
1724 gas_cv_decl_needed_malloc=no
1725 else
1726 rm -rf conftest*
1727 gas_cv_decl_needed_malloc=yes
1728 fi
1729 rm -f conftest*
1730
1731 fi
1732 echo "$ac_t""$gas_cv_decl_needed_malloc" 1>&6
1733 test $gas_cv_decl_needed_malloc = no || {
1734 cat >> confdefs.h <<\EOF
1735 #define NEED_DECLARATION_MALLOC 1
1736 EOF
1737
1738 }
1739
1740
1741 echo $ac_n "checking whether declaration is required for free""... $ac_c" 1>&6
1742 if eval "test \"`echo '$''{'gas_cv_decl_needed_free'+set}'`\" = set"; then
1743 echo $ac_n "(cached) $ac_c" 1>&6
1744 else
1745 cat > conftest.$ac_ext <<EOF
1746 #line 1747 "configure"
1747 #include "confdefs.h"
1748 $gas_test_headers
1749 int main() { return 0; }
1750 int t() {
1751
1752 typedef int f;
1753 f x;
1754 x = (f) free;
1755
1756 ; return 0; }
1757 EOF
1758 if eval $ac_link; then
1759 rm -rf conftest*
1760 gas_cv_decl_needed_free=no
1761 else
1762 rm -rf conftest*
1763 gas_cv_decl_needed_free=yes
1764 fi
1765 rm -f conftest*
1766
1767 fi
1768 echo "$ac_t""$gas_cv_decl_needed_free" 1>&6
1769 test $gas_cv_decl_needed_free = no || {
1770 cat >> confdefs.h <<\EOF
1771 #define NEED_DECLARATION_FREE 1
1772 EOF
1773
1774 }
1775
1776
1777 # Does errno.h declare errno, or do we have to add a separate declaration
1778 # for it?
1779
1780 echo $ac_n "checking whether declaration is required for errno""... $ac_c" 1>&6
1781 if eval "test \"`echo '$''{'gas_cv_decl_needed_errno'+set}'`\" = set"; then
1782 echo $ac_n "(cached) $ac_c" 1>&6
1783 else
1784 cat > conftest.$ac_ext <<EOF
1785 #line 1786 "configure"
1786 #include "confdefs.h"
1787
1788 #ifdef HAVE_ERRNO_H
1789 #include <errno.h>
1790 #endif
1791
1792 int main() { return 0; }
1793 int t() {
1794
1795 typedef int f;
1796 f x;
1797 x = (f) errno;
1798
1799 ; return 0; }
1800 EOF
1801 if eval $ac_link; then
1802 rm -rf conftest*
1803 gas_cv_decl_needed_errno=no
1804 else
1805 rm -rf conftest*
1806 gas_cv_decl_needed_errno=yes
1807 fi
1808 rm -f conftest*
1809
1810 fi
1811 echo "$ac_t""$gas_cv_decl_needed_errno" 1>&6
1812 test $gas_cv_decl_needed_errno = no || {
1813 cat >> confdefs.h <<\EOF
1814 #define NEED_DECLARATION_ERRNO 1
1815 EOF
1816
1817 }
1818
1819
1820 subdirs="testsuite"
1821
1822
1823 trap '' 1 2 15
1824 cat > confcache <<\EOF
1825 # This file is a shell script that caches the results of configure
1826 # tests run on this system so they can be shared between configure
1827 # scripts and configure runs. It is not useful on other systems.
1828 # If it contains results you don't want to keep, you may remove or edit it.
1829 #
1830 # By default, configure uses ./config.cache as the cache file,
1831 # creating it if it does not exist already. You can give configure
1832 # the --cache-file=FILE option to use a different cache file; that is
1833 # what configure does when it calls configure scripts in
1834 # subdirectories, so they share the cache.
1835 # Giving --cache-file=/dev/null disables caching, for debugging configure.
1836 # config.status only pays attention to the cache file if you give it the
1837 # --recheck option to rerun configure.
1838 #
1839 EOF
1840 # Ultrix sh set writes to stderr and can't be redirected directly,
1841 # and sets the high bit in the cache file unless we assign to the vars.
1842 (set) 2>&1 |
1843 sed -n "s/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=\${\1='\2'}/p" \
1844 >> confcache
1845 if cmp -s $cache_file confcache; then
1846 :
1847 else
1848 if test -w $cache_file; then
1849 echo "updating cache $cache_file"
1850 cat confcache > $cache_file
1851 else
1852 echo "not updating unwritable cache $cache_file"
1853 fi
1854 fi
1855 rm -f confcache
1856
1857 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
1858
1859 test "x$prefix" = xNONE && prefix=$ac_default_prefix
1860 # Let make expand exec_prefix.
1861 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
1862
1863 # Any assignment to VPATH causes Sun make to only execute
1864 # the first set of double-colon rules, so remove it if not needed.
1865 # If there is a colon in the path, we need to keep it.
1866 if test "x$srcdir" = x.; then
1867 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
1868 fi
1869
1870 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
1871
1872 DEFS=-DHAVE_CONFIG_H
1873
1874 # Without the "./", some shells look in PATH for config.status.
1875 : ${CONFIG_STATUS=./config.status}
1876
1877 echo creating $CONFIG_STATUS
1878 rm -f $CONFIG_STATUS
1879 cat > $CONFIG_STATUS <<EOF
1880 #! /bin/sh
1881 # Generated automatically by configure.
1882 # Run this file to recreate the current configuration.
1883 # This directory was configured as follows,
1884 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
1885 #
1886 # $0 $ac_configure_args
1887 #
1888 # Compiler output produced by configure, useful for debugging
1889 # configure, is in ./config.log if it exists.
1890
1891 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
1892 for ac_option
1893 do
1894 case "\$ac_option" in
1895 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
1896 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
1897 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
1898 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
1899 echo "$CONFIG_STATUS generated by autoconf version 2.3"
1900 exit 0 ;;
1901 -help | --help | --hel | --he | --h)
1902 echo "\$ac_cs_usage"; exit 0 ;;
1903 *) echo "\$ac_cs_usage"; exit 1 ;;
1904 esac
1905 done
1906
1907 ac_given_srcdir=$srcdir
1908 ac_given_INSTALL="$INSTALL"
1909
1910 trap 'rm -fr `echo "Makefile doc/Makefile .gdbinit:gdbinit.in conf" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
1911
1912 # Protect against being on the right side of a sed subst in config.status.
1913 sed 's/%@/@@/; s/@%/@@/; s/%g$/@g/; /@g$/s/[\\\\&%]/\\\\&/g;
1914 s/@@/%@/; s/@@/@%/; s/@g$/%g/' > conftest.subs <<\CEOF
1915 $ac_vpsub
1916 $extrasub
1917 s%@CFLAGS@%$CFLAGS%g
1918 s%@CPPFLAGS@%$CPPFLAGS%g
1919 s%@CXXFLAGS@%$CXXFLAGS%g
1920 s%@DEFS@%$DEFS%g
1921 s%@LDFLAGS@%$LDFLAGS%g
1922 s%@LIBS@%$LIBS%g
1923 s%@exec_prefix@%$exec_prefix%g
1924 s%@prefix@%$prefix%g
1925 s%@program_transform_name@%$program_transform_name%g
1926 s%@host@%$host%g
1927 s%@host_alias@%$host_alias%g
1928 s%@host_cpu@%$host_cpu%g
1929 s%@host_vendor@%$host_vendor%g
1930 s%@host_os@%$host_os%g
1931 s%@target@%$target%g
1932 s%@target_alias@%$target_alias%g
1933 s%@target_cpu@%$target_cpu%g
1934 s%@target_vendor@%$target_vendor%g
1935 s%@target_os@%$target_os%g
1936 s%@build@%$build%g
1937 s%@build_alias@%$build_alias%g
1938 s%@build_cpu@%$build_cpu%g
1939 s%@build_vendor@%$build_vendor%g
1940 s%@build_os@%$build_os%g
1941 s%@OPCODES_LIB@%$OPCODES_LIB%g
1942 /@target_frag@/r $target_frag
1943 s%@target_frag@%%g
1944 s%@extra_objects@%$extra_objects%g
1945 s%@cpu_type@%$cpu_type%g
1946 s%@obj_format@%$obj_format%g
1947 s%@atof@%$atof%g
1948 s%@BFDLIB@%$BFDLIB%g
1949 s%@ALL_OBJ_DEPS@%$ALL_OBJ_DEPS%g
1950 s%@CC@%$CC%g
1951 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
1952 s%@INSTALL_DATA@%$INSTALL_DATA%g
1953 s%@CPP@%$CPP%g
1954 s%@ALLOCA@%$ALLOCA%g
1955 s%@subdirs@%$subdirs%g
1956
1957 CEOF
1958 EOF
1959 cat >> $CONFIG_STATUS <<EOF
1960
1961 CONFIG_FILES=\${CONFIG_FILES-"Makefile doc/Makefile .gdbinit:gdbinit.in"}
1962 EOF
1963 cat >> $CONFIG_STATUS <<\EOF
1964 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
1965 # Support "outfile[:infile]", defaulting infile="outfile.in".
1966 case "$ac_file" in
1967 *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'`
1968 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
1969 *) ac_file_in="${ac_file}.in" ;;
1970 esac
1971
1972 # Adjust relative srcdir, etc. for subdirectories.
1973
1974 # Remove last slash and all that follows it. Not all systems have dirname.
1975 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
1976 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
1977 # The file is in a subdirectory.
1978 test ! -d "$ac_dir" && mkdir "$ac_dir"
1979 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
1980 # A "../" for each directory in $ac_dir_suffix.
1981 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
1982 else
1983 ac_dir_suffix= ac_dots=
1984 fi
1985
1986 case "$ac_given_srcdir" in
1987 .) srcdir=.
1988 if test -z "$ac_dots"; then top_srcdir=.
1989 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
1990 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
1991 *) # Relative path.
1992 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
1993 top_srcdir="$ac_dots$ac_given_srcdir" ;;
1994 esac
1995
1996 case "$ac_given_INSTALL" in
1997 [/$]*) INSTALL="$ac_given_INSTALL" ;;
1998 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
1999 esac
2000 echo creating "$ac_file"
2001 rm -f "$ac_file"
2002 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
2003 case "$ac_file" in
2004 *Makefile*) ac_comsub="1i\\
2005 # $configure_input" ;;
2006 *) ac_comsub= ;;
2007 esac
2008 sed -e "$ac_comsub
2009 s%@configure_input@%$configure_input%g
2010 s%@srcdir@%$srcdir%g
2011 s%@top_srcdir@%$top_srcdir%g
2012 s%@INSTALL@%$INSTALL%g
2013 " -f conftest.subs $ac_given_srcdir/$ac_file_in > $ac_file
2014 fi; done
2015 rm -f conftest.subs
2016
2017 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
2018 # NAME is the cpp macro being defined and VALUE is the value it is being given.
2019 #
2020 # ac_d sets the value in "#define NAME VALUE" lines.
2021 ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
2022 ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
2023 ac_dC='\3'
2024 ac_dD='%g'
2025 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
2026 ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
2027 ac_uB='\([ ]\)%\1#\2define\3'
2028 ac_uC=' '
2029 ac_uD='\4%g'
2030 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
2031 ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
2032 ac_eB='$%\1#\2define\3'
2033 ac_eC=' '
2034 ac_eD='%g'
2035
2036 CONFIG_HEADERS=${CONFIG_HEADERS-"conf"}
2037 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
2038 # Support "outfile[:infile]", defaulting infile="outfile.in".
2039 case "$ac_file" in
2040 *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'`
2041 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
2042 *) ac_file_in="${ac_file}.in" ;;
2043 esac
2044
2045 echo creating $ac_file
2046
2047 rm -f conftest.frag conftest.in conftest.out
2048 cp $ac_given_srcdir/$ac_file_in conftest.in
2049
2050 EOF
2051
2052 # Transform confdefs.h into a sed script conftest.vals that substitutes
2053 # the proper values into config.h.in to produce config.h. And first:
2054 # Protect against being on the right side of a sed subst in config.status.
2055 # Protect against being in an unquoted here document in config.status.
2056 rm -f conftest.vals
2057 cat > conftest.hdr <<\EOF
2058 s/[\\&%]/\\&/g
2059 s%[\\$`]%\\&%g
2060 s%#define \([A-Za-z_][A-Za-z0-9_]*\) \(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
2061 s%ac_d%ac_u%gp
2062 s%ac_u%ac_e%gp
2063 EOF
2064 sed -n -f conftest.hdr confdefs.h > conftest.vals
2065 rm -f conftest.hdr
2066
2067 # This sed command replaces #undef with comments. This is necessary, for
2068 # example, in the case of _POSIX_SOURCE, which is predefined and required
2069 # on some systems where configure will not decide to define it.
2070 cat >> conftest.vals <<\EOF
2071 s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
2072 EOF
2073
2074 # Break up conftest.vals because some shells have a limit on
2075 # the size of here documents, and old seds have small limits too.
2076 # Maximum number of lines to put in a single here document.
2077 ac_max_here_lines=12
2078
2079 rm -f conftest.tail
2080 while :
2081 do
2082 ac_lines=`grep -c . conftest.vals`
2083 # grep -c gives empty output for an empty file on some AIX systems.
2084 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
2085 # Write a limited-size here document to conftest.frag.
2086 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
2087 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
2088 echo 'CEOF
2089 sed -f conftest.frag conftest.in > conftest.out
2090 rm -f conftest.in
2091 mv conftest.out conftest.in
2092 ' >> $CONFIG_STATUS
2093 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
2094 rm -f conftest.vals
2095 mv conftest.tail conftest.vals
2096 done
2097 rm -f conftest.vals
2098
2099 cat >> $CONFIG_STATUS <<\EOF
2100 rm -f conftest.frag conftest.h
2101 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
2102 cat conftest.in >> conftest.h
2103 rm -f conftest.in
2104 if cmp -s $ac_file conftest.h 2>/dev/null; then
2105 echo "$ac_file is unchanged"
2106 rm -f conftest.h
2107 else
2108 rm -f $ac_file
2109 mv conftest.h $ac_file
2110 fi
2111 fi; done
2112
2113 EOF
2114
2115 cat >> $CONFIG_STATUS <<EOF
2116 ac_sources="$files"
2117 ac_dests="$links"
2118 EOF
2119
2120 cat >> $CONFIG_STATUS <<\EOF
2121 srcdir=$ac_given_srcdir
2122 while test -n "$ac_sources"; do
2123 set $ac_dests; ac_dest=$1; shift; ac_dests=$*
2124 set $ac_sources; ac_source=$1; shift; ac_sources=$*
2125
2126 echo "linking $srcdir/$ac_source to $ac_dest"
2127
2128 if test ! -r $srcdir/$ac_source; then
2129 { echo "configure: error: $srcdir/$ac_source: File not found" 1>&2; exit 1; }
2130 fi
2131 rm -f $ac_dest
2132
2133 # Make relative symlinks.
2134 # Remove last slash and all that follows it. Not all systems have dirname.
2135 ac_dest_dir=`echo $ac_dest|sed 's%/[^/][^/]*$%%'`
2136 if test "$ac_dest_dir" != "$ac_dest" && test "$ac_dest_dir" != .; then
2137 # The dest file is in a subdirectory.
2138 test ! -d "$ac_dest_dir" && mkdir "$ac_dest_dir"
2139 ac_dest_dir_suffix="/`echo $ac_dest_dir|sed 's%^\./%%'`"
2140 # A "../" for each directory in $ac_dest_dir_suffix.
2141 ac_dots=`echo $ac_dest_dir_suffix|sed 's%/[^/]*%../%g'`
2142 else
2143 ac_dest_dir_suffix= ac_dots=
2144 fi
2145
2146 case "$srcdir" in
2147 [/$]*) ac_rel_source="$srcdir/$ac_source" ;;
2148 *) ac_rel_source="$ac_dots$srcdir/$ac_source" ;;
2149 esac
2150
2151 # Make a symlink if possible; otherwise try a hard link.
2152 if ln -s $ac_rel_source $ac_dest 2>/dev/null ||
2153 ln $srcdir/$ac_source $ac_dest; then :
2154 else
2155 { echo "configure: error: can not link $ac_dest to $srcdir/$ac_source" 1>&2; exit 1; }
2156 fi
2157 done
2158
2159
2160 exit 0
2161 EOF
2162 chmod +x $CONFIG_STATUS
2163 rm -fr confdefs* $ac_clean_files
2164 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
2165
2166 if test "$no_recursion" != yes; then
2167
2168 # Remove --cache-file and --srcdir arguments so they do not pile up.
2169 ac_sub_configure_args=
2170 ac_prev=
2171 for ac_arg in $ac_configure_args; do
2172 if test -n "$ac_prev"; then
2173 ac_prev=
2174 continue
2175 fi
2176 case "$ac_arg" in
2177 -cache-file | --cache-file | --cache-fil | --cache-fi \
2178 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
2179 ac_prev=cache_file ;;
2180 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
2181 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
2182 ;;
2183 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
2184 ac_prev=srcdir ;;
2185 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
2186 ;;
2187 *) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;;
2188 esac
2189 done
2190
2191 for ac_config_dir in testsuite; do
2192
2193 # Do not complain, so a configure script can configure whichever
2194 # parts of a large source tree are present.
2195 if test ! -d $srcdir/$ac_config_dir; then
2196 continue
2197 fi
2198
2199 echo configuring in $ac_config_dir
2200
2201 case "$srcdir" in
2202 .) ;;
2203 *)
2204 if test -d ./$ac_config_dir || mkdir ./$ac_config_dir; then :;
2205 else
2206 { echo "configure: error: can not create `pwd`/$ac_config_dir" 1>&2; exit 1; }
2207 fi
2208 ;;
2209 esac
2210
2211 ac_popdir=`pwd`
2212 cd $ac_config_dir
2213
2214 case "$srcdir" in
2215 .) # No --srcdir option. We are building in place.
2216 ac_sub_srcdir=$srcdir ;;
2217 /*) # Absolute path.
2218 ac_sub_srcdir=$srcdir/$ac_config_dir ;;
2219 *) # Relative path.
2220 ac_sub_srcdir=../$srcdir/$ac_config_dir ;;
2221 esac
2222
2223 # Check for guested configure; otherwise get Cygnus style configure.
2224 if test -f $ac_sub_srcdir/configure; then
2225 ac_sub_configure=$ac_sub_srcdir/configure
2226 elif test -f $ac_sub_srcdir/configure.in; then
2227 ac_sub_configure=$ac_configure
2228 else
2229 echo "configure: warning: no configuration information is in $ac_config_dir" 1>&2
2230 ac_sub_configure=
2231 fi
2232
2233 # The recursion is here.
2234 if test -n "$ac_sub_configure"; then
2235
2236 # Make the cache file name correct relative to the subdirectory.
2237 # A "../" for each directory in /$ac_config_dir.
2238 ac_dots=`echo $ac_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`
2239 case "$cache_file" in
2240 /*) ac_sub_cache_file=$cache_file ;;
2241 *) # Relative path.
2242 ac_sub_cache_file="$ac_dots$cache_file" ;;
2243 esac
2244 case "$ac_given_INSTALL" in
2245 [/$]*) INSTALL="$ac_given_INSTALL" ;;
2246 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
2247 esac
2248
2249 echo "running ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir"
2250 # The eval makes quoting arguments work.
2251 if eval ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir
2252 then :
2253 else
2254 { echo "configure: error: $ac_sub_configure failed for $ac_config_dir" 1>&2; exit 1; }
2255 fi
2256 fi
2257
2258 cd $ac_popdir
2259 done
2260 fi
2261