forgot to regenerate after last change
[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 hppa*) cpu_type=hppa ;;
558 i[45]86) cpu_type=i386 ;;
559 m680[012346]0) cpu_type=m68k ;;
560 m68008) cpu_type=m68k ;;
561 m683??) cpu_type=m68k ;;
562 m8*) cpu_type=m88k ;;
563 mips*el) cpu_type=mips endian=little;;
564 mips*) cpu_type=mips endian=big ;;
565 powerpcle*) cpu_type=ppc endian=little ;;
566 powerpc*) cpu_type=ppc endian=big ;;
567 rs6000*) cpu_type=ppc ;;
568 sparc64) cpu_type=sparc obj_format=elf
569 cat >> confdefs.h <<\EOF
570 #define sparcv9 1
571 EOF
572 ;;
573 sparclite*) cpu_type=sparc ;;
574 *) cpu_type=${target_cpu} ;;
575 esac
576
577 # do we need the opcodes library?
578 case ${cpu_type} in
579 alpha | vax)
580 ;;
581 *)
582 OPCODES_LIB="../opcodes/libopcodes.a"
583 ;;
584 esac
585
586
587 gas_target=${cpu_type}
588 this_target=${generic_target}
589
590 canon_targets=""
591 if test -n "$enable_targets" ; then
592 for t in `echo $enable_targets | sed 's/,/ /g'`; do
593 result=`$ac_config_sub $t 2>/dev/null`
594 if test -n "$result" ; then
595 canon_targets="$canon_targets $result"
596 # else
597 # # Permit "all", etc. We don't support it yet though.
598 # canon_targets="$canon_targets $t"
599 fi
600 done
601 _gas_uniq_list="$canon_targets"
602 _gas_uniq_newlist=""
603 for _gas_uniq_i in _gas_uniq_dummy $_gas_uniq_list ; do
604 case $_gas_uniq_i in
605 _gas_uniq_dummy) ;;
606 *) case " $_gas_uniq_newlist " in
607 *" $_gas_uniq_i "*) ;;
608 *) _gas_uniq_newlist="$_gas_uniq_newlist $_gas_uniq_i" ;;
609 esac ;;
610 esac
611 done
612 canon_targets=$_gas_uniq_newlist
613
614 fi
615
616 emulations=""
617
618 for this_target in $target $canon_targets ; do
619
620 eval `echo $this_target | sed 's/^\(.*\)-\(.*\)-\(.*\)$/cpu=\1 vendor=\2 os=\3/'`
621
622 # check for architecture variants
623 case ${cpu} in
624 hppa*) cpu_type=hppa ;;
625 i[45]86) cpu_type=i386 ;;
626 m680[012346]0) cpu_type=m68k ;;
627 m68008) cpu_type=m68k ;;
628 m683??) cpu_type=m68k ;;
629 m8*) cpu_type=m88k ;;
630 mips*el) cpu_type=mips endian=little;;
631 mips*) cpu_type=mips endian=big ;;
632 powerpcle*) cpu_type=ppc endian=little ;;
633 powerpc*) cpu_type=ppc endian=big ;;
634 rs6000*) cpu_type=ppc ;;
635 sparc64) cpu_type=sparc obj_format=elf want_sparcv9=true ;;
636 sparclite*) cpu_type=sparc ;;
637 *) cpu_type=${target_cpu} ;;
638 esac
639
640 if test ${this_target} = $target ; then
641 target_cpu_type=${cpu_type}
642 elif test ${target_cpu_type} != ${cpu_type} ; then
643 continue
644 fi
645
646 targ=${cpu_type}
647 generic_target=${cpu_type}-$vendor-$os
648 dev=no
649 bfd_gas=no
650 em=generic
651
652 # assign object format
653 case ${generic_target} in
654 a29k-amd-udi) fmt=coff targ=ebmon29k ;;
655 a29k-amd-ebmon) fmt=coff targ=ebmon29k ;;
656 a29k-*-vxworks*) fmt=coff ;;
657
658 alpha-*-netware*) fmt=ecoff ;;
659 alpha-*-osf*) fmt=ecoff ;;
660
661 # start-sanitize-arc
662 arc-*-elf*) fmt=elf bfd_gas=yes ;;
663 # end-sanitize-arc
664
665 arm-*-riscix*) fmt=aout ;;
666
667 hppa-*-*elf*) fmt=elf em=hppa ;;
668 hppa-*-lites*) fmt=elf em=hppa ;;
669 hppa-*-osf*) fmt=som em=hppa ;;
670 hppa-*-hpux*) fmt=som em=hppa ;;
671 hppa-*-bsd*) fmt=som em=hppa ;;
672 hppa-*-hiux*) fmt=som em=hppa ;;
673
674 h8300-*-coff) fmt=coff ;;
675
676 i386-ibm-aix*) fmt=coff targ=i386coff
677 em=i386aix ;;
678 i386-*-bsd*) fmt=aout em=386bsd ;;
679 i386-*-netbsd0.8) fmt=aout em=386bsd ;;
680 i386-*-netbsd*) fmt=aout em=nbsd bfd_gas=yes;;
681 i386-*-linux*aout*) fmt=aout em=linux ;;
682 i386-*-linux*coff*) fmt=coff em=linux
683 targ=i386coff ;;
684 i386-*-linux*) fmt=elf em=linux ;;
685 i386-*-lynxos*) fmt=coff targ=i386coff
686 em=lynx ;;
687 i386-*-sysv4* | i386-*-solaris* | i386-*-elf)
688 fmt=elf ;;
689 i386-*-coff | i386-*-sysv* | i386-*-sco* | i386-*-isc*)
690 fmt=coff targ=i386coff ;;
691 i386-*-vsta) fmt=aout ;;
692 i386-*-go32) fmt=coff targ=i386coff ;;
693 i386-*-gnu*elf*) fmt=elf ;;
694 i386-*-mach* | i386-*-gnu*)
695 fmt=aout em=mach bfd_gas=yes ;;
696 i386-*-msdos*) fmt=aout ;;
697
698 i960-*-bout) fmt=bout ;;
699 i960-*-coff) fmt=coff em=ic960 targ=ic960coff ;;
700 i960-*-nindy*) fmt=bout ;;
701 i960-*-vxworks4*) fmt=bout ;;
702 i960-*-vxworks5.0) fmt=bout ;;
703 i960-*-vxworks5.*) fmt=coff em=ic960 targ=ic960coff ;;
704 i960-*-vxworks*) fmt=bout ;;
705
706 m68k-*-vxworks* | m68k-ericsson-ose | m68k-*-sunos*)
707 fmt=aout em=sun3 ;;
708 m68k-motorola-sysv) fmt=coff targ=m68kcoff em=delta ;;
709 m68k-bull-sysv3*) fmt=coff targ=m68kcoff em=dpx2 ;;
710 m68k-apollo-*) fmt=coff targ=apollo em=apollo ;;
711 m68k-*-coff | m68k-*-sysv*)
712 fmt=coff targ=m68kcoff ;;
713 m68k-*-elf) fmt=elf ;;
714 m68k-*-hpux*) fmt=hp300 em=hp300 ;;
715 m68k-*-lynxos*) fmt=coff targ=m68kcoff
716 em=lynx ;;
717 m68k-*-netbsd*) fmt=aout em=nbsd bfd_gas=yes ;;
718
719 m88k-*-coff*) fmt=coff targ=m88kcoff ;;
720
721 # don't change em like *-*-bsd does
722 mips-dec-bsd*) fmt=aout targ=mips-lit ;;
723 mips-sony-bsd*) fmt=ecoff targ=mips-big ;;
724 mips-*-bsd*) { echo "configure: error: Unknown vendor for mips-bsd configuration." 1>&2; exit 1; } ;;
725 mips-*-ultrix*) fmt=ecoff targ=mips-lit ;;
726 mips-*-ecoff*) fmt=ecoff
727 case "$endian" in
728 big) targ=mips-big ;;
729 *) targ=mips-lit ;;
730 esac
731 ;;
732 mips-*-ecoff*) fmt=ecoff targ=mips-big ;;
733 mips-*-gnu*) fmt=aout
734 case "$endian" in
735 big) targ=mips-big ;;
736 *) targ=mips-lit ;;
737 esac
738 ;;
739 mips-*-irix5*) fmt=elf targ=mips-big ;;
740 mips-*-irix*) fmt=ecoff targ=mips-big ;;
741 mips-*-riscos*) fmt=ecoff targ=mips-big ;;
742 mips-*-sysv*) fmt=ecoff targ=mips-big ;;
743 mips-*-elf*) fmt=elf
744 case "$endian" in
745 big) targ=mips-big ;;
746 *) targ=mips-lit ;;
747 esac
748 ;;
749 ppc-*-aix*) fmt=coff ;;
750 ppc-*-elf* | ppc-*-eabi* | ppc-*-sysv4*)
751 fmt=elf
752 case "$endian" in
753 big) targ=ppc-big ;;
754 *) targ=ppc-lit ;;
755 esac
756 ;;
757 ppc-*-netware*) fmt=elf em=ppcnw ;;
758
759 sh-*-coff) fmt=coff ;;
760
761 # start-sanitize-rce
762 rce-*-aout) fmt=aout ;;
763 # end-sanitize-rce
764
765 ns32k-pc532-mach*) fmt=aout em=pc532mach ;;
766 ns32k-pc532-netbsd*) fmt=aout em=nbsd532 ;;
767
768 sparc-*-sunos4*) fmt=aout em=sun3 ;;
769 sparc-*-aout | sparc*-*-vxworks)
770 fmt=aout ;;
771 sparc-*-coff) fmt=coff ;;
772 sparc-*-lynxos*) fmt=coff em=lynx ;;
773 sparc-fujitsu-none) fmt=aout ;;
774 sparc-*-elf | sparc*-*-solaris*)
775 fmt=elf ;;
776 sparc-*-netbsd*) fmt=aout em=nbsd bfd_gas=yes ;;
777
778 vax-*-bsd* | vax-*-ultrix*)
779 fmt=aout ;;
780 vax-*-vms) fmt=vms ;;
781
782 z8k-*-coff | z8k-*-sim)
783 fmt=coff ;;
784
785 w65-*-*) fmt=coff ;;
786
787 *-*-aout | *-*-scout)
788 fmt=aout ;;
789 *-*-nindy*)
790 fmt=bout ;;
791 *-*-bsd*)
792 fmt=aout em=sun3 ;;
793 *-*-generic) fmt=generic ;;
794 *-*-xray | *-*-hms) fmt=coff ;;
795 *-*-sim) fmt=coff ;;
796 *-*-elf | *-*-sysv4* | *-*-solaris*)
797 echo "configure: warning: GAS support for ELF format is incomplete." 1>&2
798 fmt=elf dev=yes ;;
799 *-*-vxworks) fmt=aout ;;
800 *-*-netware) fmt=elf ;;
801 esac
802
803 case ${cpu_type}-${fmt} in
804 arm-*) bfd_gas=yes ;;
805 # not yet
806 # i386-aout) bfd_gas=preferred ;;
807 mips-*) bfd_gas=yes ;;
808 ns32k-*) bfd_gas=yes ;;
809 ppc-*) bfd_gas=yes ;;
810 sparc-*) bfd_gas=yes ;;
811 *-elf) bfd_gas=yes ;;
812 *-ecoff) bfd_gas=yes ;;
813 *-som) bfd_gas=yes ;;
814 *) ;;
815 esac
816
817 # See if we really can support this configuration with the emulation code.
818
819 if test $this_target = $target ; then
820 primary_bfd_gas=$bfd_gas
821 obj_format=$fmt
822 gas_target=$targ
823 te_file=$em
824
825 if test $bfd_gas = no ; then
826 # Can't support other configurations this way.
827 break
828 fi
829 elif test $bfd_gas = no ; then
830 # Can't support this configuration.
831 break
832 fi
833
834 # From target name and format, produce a list of supported emulations.
835
836 case ${generic_target}-${fmt} in
837 mips-*-irix5*-*) emulation="mipsbelf mipslelf mipsbecoff mipslecoff" ;;
838 mips-*-*-ecoff) case "$endian" in
839 big) emulation="mipsbecoff mipslecoff" ;;
840 *) emulation="mipslecoff mipsbecoff" ;;
841 esac ;;
842 mips-*-*-elf) case "$endian" in
843 big) emulation="mipsbelf mipslelf" ;;
844 *) emulation="mipslelf mipsbelf" ;;
845 esac ;;
846 esac
847
848 emulations="$emulations $emulation"
849
850 # Other random stuff.
851
852 test -n "$want_sparcv9" && cat >> confdefs.h <<\EOF
853 #define sparcv9 1
854 EOF
855
856
857 done
858
859 # Assign floating point type. Most processors with FP support
860 # IEEE FP. On those that don't support FP at all, usually IEEE
861 # is emulated.
862 case ${target_cpu} in
863 vax | tahoe ) atof=${target_cpu} ;;
864 *) atof=ieee ;;
865 esac
866
867 case "${obj_format}" in
868 "") { echo "configure: error: GAS does not know what format to use for target ${target}" 1>&2; exit 1; } ;;
869 esac
870
871
872 if test ! -r ${srcdir}/config/tc-${cpu_type}.c; then
873 { echo "configure: error: GAS does not support target CPU ${cpu_type}" 1>&2; exit 1; }
874 fi
875
876 if test ! -r ${srcdir}/config/obj-${obj_format}.c; then
877 { echo "configure: error: GAS does not have support for object file format ${obj_format}" 1>&2; exit 1; }
878 fi
879
880 # and target makefile frag
881
882 target_frag=${srcdir}/config/${gas_target}.mt
883 if test ! -r ${target_frag}; then
884 target_frag=/dev/null # ick! but subst_file can't be conditionalized
885 fi
886
887
888 case ${user_bfd_gas}-${primary_bfd_gas} in
889 yes-yes | no-no)
890 # We didn't override user's choice.
891 ;;
892 no-yes)
893 echo "configure: warning: Use of BFD is required for ${target}; overriding config options." 1>&2
894 ;;
895 no-preferred)
896 primary_bfd_gas=no
897 ;;
898 *-preferred)
899 primary_bfd_gas=yes
900 ;;
901 yes-*)
902 primary_bfd_gas=yes
903 ;;
904 -*)
905 # User specified nothing.
906 ;;
907 esac
908
909 # Some COFF configurations want these random other flags set.
910 case ${obj_format} in
911 coff)
912 case ${target_cpu_type} in
913 i386) cat >> confdefs.h <<\EOF
914 #define I386COFF 1
915 EOF
916 ;;
917 m68k) cat >> confdefs.h <<\EOF
918 #define M68KCOFF 1
919 EOF
920 ;;
921 m88k) cat >> confdefs.h <<\EOF
922 #define M88KCOFF 1
923 EOF
924 ;;
925 esac
926 ;;
927 esac
928
929 # Getting this done right is going to be a bitch. Each configuration specified
930 # with --enable-targets=... should be checked for environment, format, cpu, and
931 # bfd_gas setting.
932 #
933 # For each configuration, the necessary object file support code must be linked
934 # in. This might be only one, it might be up to four. The necessary emulation
935 # code needs to be provided, too.
936 #
937 # And then there's "--enable-targets=all"....
938 #
939 # For now, just always do it for MIPS ELF or ECOFF configurations. Sigh.
940
941 formats="${obj_format}"
942 emfiles=""
943 EMULATIONS=""
944 _gas_uniq_list="$emulations"
945 _gas_uniq_newlist=""
946 for _gas_uniq_i in _gas_uniq_dummy $_gas_uniq_list ; do
947 case $_gas_uniq_i in
948 _gas_uniq_dummy) ;;
949 *) case " $_gas_uniq_newlist " in
950 *" $_gas_uniq_i "*) ;;
951 *) _gas_uniq_newlist="$_gas_uniq_newlist $_gas_uniq_i" ;;
952 esac ;;
953 esac
954 done
955 emulations=$_gas_uniq_newlist
956
957 for em in . $emulations ; do
958 case $em in
959 .) continue ;;
960 mipsbelf | mipslelf)
961 fmt=elf file=mipself ;;
962 mipsbecoff | mipslecoff)
963 fmt=ecoff file=mipsecoff ;;
964 esac
965 formats="$formats $fmt"
966 emfiles="$emfiles e-$file.o"
967 EMULATIONS="$EMULATIONS &$em,"
968 done
969 _gas_uniq_list="$formats"
970 _gas_uniq_newlist=""
971 for _gas_uniq_i in _gas_uniq_dummy $_gas_uniq_list ; do
972 case $_gas_uniq_i in
973 _gas_uniq_dummy) ;;
974 *) case " $_gas_uniq_newlist " in
975 *" $_gas_uniq_i "*) ;;
976 *) _gas_uniq_newlist="$_gas_uniq_newlist $_gas_uniq_i" ;;
977 esac ;;
978 esac
979 done
980 formats=$_gas_uniq_newlist
981
982 _gas_uniq_list="$emfiles"
983 _gas_uniq_newlist=""
984 for _gas_uniq_i in _gas_uniq_dummy $_gas_uniq_list ; do
985 case $_gas_uniq_i in
986 _gas_uniq_dummy) ;;
987 *) case " $_gas_uniq_newlist " in
988 *" $_gas_uniq_i "*) ;;
989 *) _gas_uniq_newlist="$_gas_uniq_newlist $_gas_uniq_i" ;;
990 esac ;;
991 esac
992 done
993 emfiles=$_gas_uniq_newlist
994
995 if test `set . $formats ; shift ; echo $#` -gt 1 ; then
996 for fmt in $formats ; do
997 case $fmt in
998 aout) cat >> confdefs.h <<\EOF
999 #define OBJ_MAYBE_AOUT 1
1000 EOF
1001 ;;
1002 bout) cat >> confdefs.h <<\EOF
1003 #define OBJ_MAYBE_BOUT 1
1004 EOF
1005 ;;
1006 coff) cat >> confdefs.h <<\EOF
1007 #define OBJ_MAYBE_COFF 1
1008 EOF
1009 ;;
1010 ecoff) cat >> confdefs.h <<\EOF
1011 #define OBJ_MAYBE_ECOFF 1
1012 EOF
1013 ;;
1014 elf) cat >> confdefs.h <<\EOF
1015 #define OBJ_MAYBE_ELF 1
1016 EOF
1017 ;;
1018 generic) cat >> confdefs.h <<\EOF
1019 #define OBJ_MAYBE_GENERIC 1
1020 EOF
1021 ;;
1022 hp300) cat >> confdefs.h <<\EOF
1023 #define OBJ_MAYBE_HP300 1
1024 EOF
1025 ;;
1026 ieee) cat >> confdefs.h <<\EOF
1027 #define OBJ_MAYBE_IEEE 1
1028 EOF
1029 ;;
1030 som) cat >> confdefs.h <<\EOF
1031 #define OBJ_MAYBE_SOM 1
1032 EOF
1033 ;;
1034 vms) cat >> confdefs.h <<\EOF
1035 #define OBJ_MAYBE_VMS 1
1036 EOF
1037 ;;
1038 esac
1039 extra_objects="$extra_objects obj-$fmt.o"
1040 done
1041 obj_format=multi
1042 fi
1043 if test `set . $emfiles ; shift ; echo $#` -gt 0 ; then
1044 te_file=multi
1045 extra_objects="$extra_objects $emfiles"
1046 DEFAULT_EMULATION=`set . $emulations ; echo $2`
1047 cat >> confdefs.h <<\EOF
1048 #define USE_EMULATIONS 1
1049 EOF
1050
1051 fi
1052
1053 cat >> confdefs.h <<EOF
1054 #define EMULATIONS $EMULATIONS
1055 EOF
1056
1057 cat >> confdefs.h <<EOF
1058 #define DEFAULT_EMULATION "$DEFAULT_EMULATION"
1059 EOF
1060
1061
1062 files="config/tc-${cpu_type}.c config/tc-${cpu_type}.h \
1063 config/obj-${obj_format}.h config/obj-${obj_format}.c \
1064 config/te-${te_file}.h config/atof-${atof}.c \
1065 $extra_files"
1066 links="targ-cpu.c targ-cpu.h obj-format.h obj-format.c targ-env.h atof-targ.c \
1067 $extra_links"
1068
1069 case ${primary_bfd_gas}-${cpu_type}-${obj_format} in
1070 yes-*-coff) need_bfd=yes ;;
1071 no-*-coff) need_bfd=yes
1072 cat >> confdefs.h <<\EOF
1073 #define MANY_SEGMENTS 1
1074 EOF
1075 ;;
1076 esac
1077
1078 reject_dev_configs=yes
1079
1080 case ${reject_dev_configs}-${dev} in
1081 yes-yes) # Oops.
1082 { echo "configure: error: GAS does not support the ${generic_target} configuration." 1>&2; exit 1; }
1083 ;;
1084 esac
1085
1086
1087
1088
1089
1090
1091
1092 case "${primary_bfd_gas}" in
1093 yes) cat >> confdefs.h <<\EOF
1094 #define BFD_ASSEMBLER 1
1095 EOF
1096
1097 need_bfd=yes ;;
1098 esac
1099
1100 case "${need_bfd}" in
1101 yes) BFDLIB=../bfd/libbfd.a
1102 ALL_OBJ_DEPS="$ALL_OBJ_DEPS ../bfd/bfd.h"
1103 ;;
1104 esac
1105
1106
1107
1108 cat >> confdefs.h <<EOF
1109 #define TARGET_ALIAS "${target_alias}"
1110 EOF
1111
1112 cat >> confdefs.h <<EOF
1113 #define TARGET_CANONICAL "${target}"
1114 EOF
1115
1116 cat >> confdefs.h <<EOF
1117 #define TARGET_CPU "${target_cpu}"
1118 EOF
1119
1120 cat >> confdefs.h <<EOF
1121 #define TARGET_VENDOR "${target_vendor}"
1122 EOF
1123
1124 cat >> confdefs.h <<EOF
1125 #define TARGET_OS "${target_os}"
1126 EOF
1127
1128
1129 echo $ac_n "checking for CC""... $ac_c" 1>&6
1130 test -z "$CC" && CC=`egrep '^CC *=' ../Makefile | tail -1 | sed 's/^CC *= *//'`
1131 test -z "$CC" && CC=cc
1132 echo "$ac_t""setting CC to $CC" 1>&6
1133
1134 # Find out if we are using GNU C, under whatever name.
1135 cat > conftest.c <<EOF
1136 #ifdef __GNUC__
1137 yes
1138 #endif
1139 EOF
1140 ${CC-cc} -E conftest.c > conftest.out 2>&1
1141 if egrep yes conftest.out >/dev/null 2>&1; then
1142 GCC=yes
1143 else
1144 GCC=
1145 fi
1146 rm -f conftest*
1147
1148 # Find a good install program. We prefer a C program (faster),
1149 # so one script is as good as another. But avoid the broken or
1150 # incompatible versions:
1151 # SysV /etc/install, /usr/sbin/install
1152 # SunOS /usr/etc/install
1153 # IRIX /sbin/install
1154 # AIX /bin/install
1155 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
1156 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1157 # ./install, which can be erroneously created by make from ./install.sh.
1158 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
1159 if test -z "$INSTALL"; then
1160 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
1161 echo $ac_n "(cached) $ac_c" 1>&6
1162 else
1163 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1164 for ac_dir in $PATH; do
1165 # Account for people who put trailing slashes in PATH elements.
1166 case "$ac_dir/" in
1167 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1168 *)
1169 # OSF1 and SCO ODT 3.0 have their own names for install.
1170 for ac_prog in ginstall installbsd scoinst install; do
1171 if test -f $ac_dir/$ac_prog; then
1172 if test $ac_prog = install &&
1173 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1174 # AIX install. It has an incompatible calling convention.
1175 # OSF/1 installbsd also uses dspmsg, but is usable.
1176 :
1177 else
1178 ac_cv_path_install="$ac_dir/$ac_prog -c"
1179 break 2
1180 fi
1181 fi
1182 done
1183 ;;
1184 esac
1185 done
1186 IFS="$ac_save_ifs"
1187 # As a last resort, use the slow shell script.
1188 test -z "$ac_cv_path_install" && ac_cv_path_install="$ac_install_sh"
1189 fi
1190 INSTALL="$ac_cv_path_install"
1191 fi
1192 echo "$ac_t""$INSTALL" 1>&6
1193
1194 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1195 # It thinks the first close brace ends the variable substitution.
1196 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1197
1198 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1199
1200
1201 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
1202 # On Suns, sometimes $CPP names a directory.
1203 if test -n "$CPP" && test -d "$CPP"; then
1204 CPP=
1205 fi
1206 if test -z "$CPP"; then
1207 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1208 echo $ac_n "(cached) $ac_c" 1>&6
1209 else
1210 # This must be in double quotes, not single quotes, because CPP may get
1211 # substituted into the Makefile and "${CC-cc}" will confuse make.
1212 CPP="${CC-cc} -E"
1213 # On the NeXT, cc -E runs the code through the compiler's parser,
1214 # not just through cpp.
1215 cat > conftest.$ac_ext <<EOF
1216 #line 1217 "configure"
1217 #include "confdefs.h"
1218 #include <assert.h>
1219 Syntax Error
1220 EOF
1221 eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1222 ac_err=`grep -v '^ *+' conftest.out`
1223 if test -z "$ac_err"; then
1224 :
1225 else
1226 echo "$ac_err" >&5
1227 rm -rf conftest*
1228 CPP="${CC-cc} -E -traditional-cpp"
1229 cat > conftest.$ac_ext <<EOF
1230 #line 1231 "configure"
1231 #include "confdefs.h"
1232 #include <assert.h>
1233 Syntax Error
1234 EOF
1235 eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1236 ac_err=`grep -v '^ *+' conftest.out`
1237 if test -z "$ac_err"; then
1238 :
1239 else
1240 echo "$ac_err" >&5
1241 rm -rf conftest*
1242 CPP=/lib/cpp
1243 fi
1244 rm -f conftest*
1245 fi
1246 rm -f conftest*
1247 ac_cv_prog_CPP="$CPP"
1248 fi
1249 fi
1250 CPP="$ac_cv_prog_CPP"
1251 echo "$ac_t""$CPP" 1>&6
1252
1253 for ac_hdr in string.h stdlib.h memory.h strings.h unistd.h stdarg.h varargs.h errno.h sys/types.h
1254 do
1255 ac_safe=`echo "$ac_hdr" | tr './\055' '___'`
1256 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1257 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1258 echo $ac_n "(cached) $ac_c" 1>&6
1259 else
1260 cat > conftest.$ac_ext <<EOF
1261 #line 1262 "configure"
1262 #include "confdefs.h"
1263 #include <$ac_hdr>
1264 EOF
1265 eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1266 ac_err=`grep -v '^ *+' conftest.out`
1267 if test -z "$ac_err"; then
1268 rm -rf conftest*
1269 eval "ac_cv_header_$ac_safe=yes"
1270 else
1271 echo "$ac_err" >&5
1272 rm -rf conftest*
1273 eval "ac_cv_header_$ac_safe=no"
1274 fi
1275 rm -f conftest*
1276 fi
1277 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1278 echo "$ac_t""yes" 1>&6
1279 ac_tr_hdr=HAVE_`echo $ac_hdr | tr '[a-z]./\055' '[A-Z]___'`
1280 cat >> confdefs.h <<EOF
1281 #define $ac_tr_hdr 1
1282 EOF
1283
1284 else
1285 echo "$ac_t""no" 1>&6
1286 fi
1287 done
1288
1289
1290 # Put this here so that autoconf's "cross-compiling" message doesn't confuse
1291 # people who are not cross-compiling but are compiling cross-assemblers.
1292 echo $ac_n "checking whether compiling a cross-assembler""... $ac_c" 1>&6
1293 if test "${host}" = "${target}"; then
1294 cross_gas=no
1295 else
1296 cross_gas=yes
1297 cat >> confdefs.h <<\EOF
1298 #define CROSS_COMPILE 1
1299 EOF
1300
1301 fi
1302 echo "$ac_t""$cross_gas" 1>&6
1303
1304 # If we cannot run a trivial program, we must be cross compiling.
1305 echo $ac_n "checking whether cross-compiling""... $ac_c" 1>&6
1306 if eval "test \"`echo '$''{'ac_cv_c_cross'+set}'`\" = set"; then
1307 echo $ac_n "(cached) $ac_c" 1>&6
1308 else
1309 if test "$cross_compiling" = yes; then
1310 ac_cv_c_cross=yes
1311 else
1312 cat > conftest.$ac_ext <<EOF
1313 #line 1314 "configure"
1314 #include "confdefs.h"
1315 main(){return(0);}
1316 EOF
1317 eval $ac_link
1318 if test -s conftest && (./conftest; exit) 2>/dev/null; then
1319 ac_cv_c_cross=no
1320 else
1321 ac_cv_c_cross=yes
1322 fi
1323 fi
1324 rm -fr conftest*
1325 fi
1326 cross_compiling=$ac_cv_c_cross
1327 echo "$ac_t""$ac_cv_c_cross" 1>&6
1328
1329 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
1330 # for constant arguments. Useless!
1331 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
1332 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
1333 echo $ac_n "(cached) $ac_c" 1>&6
1334 else
1335 cat > conftest.$ac_ext <<EOF
1336 #line 1337 "configure"
1337 #include "confdefs.h"
1338 #include <alloca.h>
1339 int main() { return 0; }
1340 int t() {
1341 char *p = alloca(2 * sizeof(int));
1342 ; return 0; }
1343 EOF
1344 if eval $ac_link; then
1345 rm -rf conftest*
1346 ac_cv_header_alloca_h=yes
1347 else
1348 rm -rf conftest*
1349 ac_cv_header_alloca_h=no
1350 fi
1351 rm -f conftest*
1352
1353 fi
1354 echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
1355 if test $ac_cv_header_alloca_h = yes; then
1356 cat >> confdefs.h <<\EOF
1357 #define HAVE_ALLOCA_H 1
1358 EOF
1359
1360 fi
1361
1362 echo $ac_n "checking for alloca""... $ac_c" 1>&6
1363 if eval "test \"`echo '$''{'ac_cv_func_alloca'+set}'`\" = set"; then
1364 echo $ac_n "(cached) $ac_c" 1>&6
1365 else
1366 cat > conftest.$ac_ext <<EOF
1367 #line 1368 "configure"
1368 #include "confdefs.h"
1369
1370 #ifdef __GNUC__
1371 # define alloca __builtin_alloca
1372 #else
1373 # if HAVE_ALLOCA_H
1374 # include <alloca.h>
1375 # else
1376 # ifdef _AIX
1377 #pragma alloca
1378 # else
1379 # ifndef alloca /* predefined by HP cc +Olibcalls */
1380 char *alloca ();
1381 # endif
1382 # endif
1383 # endif
1384 #endif
1385
1386 int main() { return 0; }
1387 int t() {
1388 char *p = (char *) alloca(1);
1389 ; return 0; }
1390 EOF
1391 if eval $ac_link; then
1392 rm -rf conftest*
1393 ac_cv_func_alloca=yes
1394 else
1395 rm -rf conftest*
1396 ac_cv_func_alloca=no
1397 fi
1398 rm -f conftest*
1399
1400 fi
1401 echo "$ac_t""$ac_cv_func_alloca" 1>&6
1402 if test $ac_cv_func_alloca = yes; then
1403 cat >> confdefs.h <<\EOF
1404 #define HAVE_ALLOCA 1
1405 EOF
1406
1407 fi
1408
1409 if test $ac_cv_func_alloca = no; then
1410 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
1411 # that cause trouble. Some versions do not even contain alloca or
1412 # contain a buggy version. If you still want to use their alloca,
1413 # use ar to extract alloca.o from them instead of compiling alloca.c.
1414 ALLOCA=alloca.o
1415 cat >> confdefs.h <<\EOF
1416 #define C_ALLOCA 1
1417 EOF
1418
1419
1420 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
1421 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
1422 echo $ac_n "(cached) $ac_c" 1>&6
1423 else
1424 cat > conftest.$ac_ext <<EOF
1425 #line 1426 "configure"
1426 #include "confdefs.h"
1427 #if defined(CRAY) && ! defined(CRAY2)
1428 webecray
1429 #else
1430 wenotbecray
1431 #endif
1432
1433 EOF
1434 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1435 egrep "webecray" >/dev/null 2>&1; then
1436 rm -rf conftest*
1437 ac_cv_os_cray=yes
1438 else
1439 rm -rf conftest*
1440 ac_cv_os_cray=no
1441 fi
1442 rm -f conftest*
1443
1444 fi
1445 echo "$ac_t""$ac_cv_os_cray" 1>&6
1446 if test $ac_cv_os_cray = yes; then
1447 for ac_func in _getb67 GETB67 getb67; do
1448 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1449 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1450 echo $ac_n "(cached) $ac_c" 1>&6
1451 else
1452 cat > conftest.$ac_ext <<EOF
1453 #line 1454 "configure"
1454 #include "confdefs.h"
1455 /* System header to define __stub macros and hopefully few prototypes,
1456 which can conflict with char $ac_func(); below. */
1457 #include <assert.h>
1458 /* Override any gcc2 internal prototype to avoid an error. */
1459 char $ac_func();
1460
1461 int main() { return 0; }
1462 int t() {
1463
1464 /* The GNU C library defines this for functions which it implements
1465 to always fail with ENOSYS. Some functions are actually named
1466 something starting with __ and the normal name is an alias. */
1467 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1468 choke me
1469 #else
1470 $ac_func();
1471 #endif
1472
1473 ; return 0; }
1474 EOF
1475 if eval $ac_link; then
1476 rm -rf conftest*
1477 eval "ac_cv_func_$ac_func=yes"
1478 else
1479 rm -rf conftest*
1480 eval "ac_cv_func_$ac_func=no"
1481 fi
1482 rm -f conftest*
1483
1484 fi
1485 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1486 echo "$ac_t""yes" 1>&6
1487 cat >> confdefs.h <<EOF
1488 #define CRAY_STACKSEG_END $ac_func
1489 EOF
1490
1491 break
1492 else
1493 echo "$ac_t""no" 1>&6
1494 fi
1495
1496 done
1497 fi
1498
1499 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
1500 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
1501 echo $ac_n "(cached) $ac_c" 1>&6
1502 else
1503 if test "$cross_compiling" = yes; then
1504 ac_cv_c_stack_direction=0
1505 else
1506 cat > conftest.$ac_ext <<EOF
1507 #line 1508 "configure"
1508 #include "confdefs.h"
1509 find_stack_direction ()
1510 {
1511 static char *addr = 0;
1512 auto char dummy;
1513 if (addr == 0)
1514 {
1515 addr = &dummy;
1516 return find_stack_direction ();
1517 }
1518 else
1519 return (&dummy > addr) ? 1 : -1;
1520 }
1521 main ()
1522 {
1523 exit (find_stack_direction() < 0);
1524 }
1525 EOF
1526 eval $ac_link
1527 if test -s conftest && (./conftest; exit) 2>/dev/null; then
1528 ac_cv_c_stack_direction=1
1529 else
1530 ac_cv_c_stack_direction=-1
1531 fi
1532 fi
1533 rm -fr conftest*
1534 fi
1535 echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
1536 cat >> confdefs.h <<EOF
1537 #define STACK_DIRECTION $ac_cv_c_stack_direction
1538 EOF
1539
1540 fi
1541
1542 echo $ac_n "checking for inline""... $ac_c" 1>&6
1543 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
1544 echo $ac_n "(cached) $ac_c" 1>&6
1545 else
1546 ac_cv_c_inline=no
1547 for ac_kw in inline __inline__ __inline; do
1548 cat > conftest.$ac_ext <<EOF
1549 #line 1550 "configure"
1550 #include "confdefs.h"
1551
1552 int main() { return 0; }
1553 int t() {
1554 } $ac_kw foo() {
1555 ; return 0; }
1556 EOF
1557 if eval $ac_compile; then
1558 rm -rf conftest*
1559 ac_cv_c_inline=$ac_kw; break
1560 fi
1561 rm -f conftest*
1562
1563 done
1564
1565 fi
1566 echo "$ac_t""$ac_cv_c_inline" 1>&6
1567 case "$ac_cv_c_inline" in
1568 inline | yes) ;;
1569 no) cat >> confdefs.h <<\EOF
1570 #define inline
1571 EOF
1572 ;;
1573 *) cat >> confdefs.h <<EOF
1574 #define inline $ac_cv_c_inline
1575 EOF
1576 ;;
1577 esac
1578
1579
1580 # VMS doesn't have unlink.
1581 for ac_func in unlink remove
1582 do
1583 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1584 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1585 echo $ac_n "(cached) $ac_c" 1>&6
1586 else
1587 cat > conftest.$ac_ext <<EOF
1588 #line 1589 "configure"
1589 #include "confdefs.h"
1590 /* System header to define __stub macros and hopefully few prototypes,
1591 which can conflict with char $ac_func(); below. */
1592 #include <assert.h>
1593 /* Override any gcc2 internal prototype to avoid an error. */
1594 char $ac_func();
1595
1596 int main() { return 0; }
1597 int t() {
1598
1599 /* The GNU C library defines this for functions which it implements
1600 to always fail with ENOSYS. Some functions are actually named
1601 something starting with __ and the normal name is an alias. */
1602 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1603 choke me
1604 #else
1605 $ac_func();
1606 #endif
1607
1608 ; return 0; }
1609 EOF
1610 if eval $ac_link; then
1611 rm -rf conftest*
1612 eval "ac_cv_func_$ac_func=yes"
1613 else
1614 rm -rf conftest*
1615 eval "ac_cv_func_$ac_func=no"
1616 fi
1617 rm -f conftest*
1618
1619 fi
1620 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1621 echo "$ac_t""yes" 1>&6
1622 ac_tr_func=HAVE_`echo $ac_func | tr '[a-z]' '[A-Z]'`
1623 cat >> confdefs.h <<EOF
1624 #define $ac_tr_func 1
1625 EOF
1626 break
1627 else
1628 echo "$ac_t""no" 1>&6
1629 fi
1630 done
1631
1632
1633 # Some non-ANSI preprocessors botch requoting inside strings. That's bad
1634 # enough, but on some of those systems, the assert macro relies on requoting
1635 # working properly!
1636 echo $ac_n "checking for working assert macro""... $ac_c" 1>&6
1637 if eval "test \"`echo '$''{'gas_cv_assert_ok'+set}'`\" = set"; then
1638 echo $ac_n "(cached) $ac_c" 1>&6
1639 else
1640 cat > conftest.$ac_ext <<EOF
1641 #line 1642 "configure"
1642 #include "confdefs.h"
1643 #include <assert.h>
1644 #include <stdio.h>
1645 int main() { return 0; }
1646 int t() {
1647
1648 /* check for requoting problems */
1649 static int a, b, c, d;
1650 static char *s;
1651 assert (!strcmp(s, "foo bar baz quux"));
1652 /* check for newline handling */
1653 assert (a == b
1654 || c == d);
1655
1656 ; return 0; }
1657 EOF
1658 if eval $ac_link; then
1659 rm -rf conftest*
1660 gas_cv_assert_ok=yes
1661 else
1662 rm -rf conftest*
1663 gas_cv_assert_ok=no
1664 fi
1665 rm -f conftest*
1666
1667 fi
1668 echo "$ac_t""$gas_cv_assert_ok" 1>&6
1669 test $gas_cv_assert_ok = yes || cat >> confdefs.h <<\EOF
1670 #define BROKEN_ASSERT 1
1671 EOF
1672
1673
1674
1675 # On some systems, the system header files may not declare malloc, realloc,
1676 # and free. There are places where gas needs these functions to have been
1677 # declared -- such as when taking their addresses.
1678 gas_test_headers="
1679 #ifdef HAVE_MEMORY_H
1680 #include <memory.h>
1681 #endif
1682 #ifdef HAVE_STRING_H
1683 #include <string.h>
1684 #endif
1685 #ifdef HAVE_STDLIB_H
1686 #include <stdlib.h>
1687 #endif
1688 #ifdef HAVE_UNISTD_H
1689 #include <unistd.h>
1690 #endif
1691 "
1692
1693 echo $ac_n "checking whether declaration is required for malloc""... $ac_c" 1>&6
1694 if eval "test \"`echo '$''{'gas_cv_decl_needed_malloc'+set}'`\" = set"; then
1695 echo $ac_n "(cached) $ac_c" 1>&6
1696 else
1697 cat > conftest.$ac_ext <<EOF
1698 #line 1699 "configure"
1699 #include "confdefs.h"
1700 $gas_test_headers
1701 int main() { return 0; }
1702 int t() {
1703
1704 typedef char *(*f)();
1705 f x;
1706 x = (f) malloc;
1707
1708 ; return 0; }
1709 EOF
1710 if eval $ac_link; then
1711 rm -rf conftest*
1712 gas_cv_decl_needed_malloc=no
1713 else
1714 rm -rf conftest*
1715 gas_cv_decl_needed_malloc=yes
1716 fi
1717 rm -f conftest*
1718
1719 fi
1720 echo "$ac_t""$gas_cv_decl_needed_malloc" 1>&6
1721 test $gas_cv_decl_needed_malloc = no || {
1722 cat >> confdefs.h <<\EOF
1723 #define NEED_DECLARATION_MALLOC 1
1724 EOF
1725
1726 }
1727
1728
1729 echo $ac_n "checking whether declaration is required for free""... $ac_c" 1>&6
1730 if eval "test \"`echo '$''{'gas_cv_decl_needed_free'+set}'`\" = set"; then
1731 echo $ac_n "(cached) $ac_c" 1>&6
1732 else
1733 cat > conftest.$ac_ext <<EOF
1734 #line 1735 "configure"
1735 #include "confdefs.h"
1736 $gas_test_headers
1737 int main() { return 0; }
1738 int t() {
1739
1740 typedef int f;
1741 f x;
1742 x = (f) free;
1743
1744 ; return 0; }
1745 EOF
1746 if eval $ac_link; then
1747 rm -rf conftest*
1748 gas_cv_decl_needed_free=no
1749 else
1750 rm -rf conftest*
1751 gas_cv_decl_needed_free=yes
1752 fi
1753 rm -f conftest*
1754
1755 fi
1756 echo "$ac_t""$gas_cv_decl_needed_free" 1>&6
1757 test $gas_cv_decl_needed_free = no || {
1758 cat >> confdefs.h <<\EOF
1759 #define NEED_DECLARATION_FREE 1
1760 EOF
1761
1762 }
1763
1764
1765 # Does errno.h declare errno, or do we have to add a separate declaration
1766 # for it?
1767
1768 echo $ac_n "checking whether declaration is required for errno""... $ac_c" 1>&6
1769 if eval "test \"`echo '$''{'gas_cv_decl_needed_errno'+set}'`\" = set"; then
1770 echo $ac_n "(cached) $ac_c" 1>&6
1771 else
1772 cat > conftest.$ac_ext <<EOF
1773 #line 1774 "configure"
1774 #include "confdefs.h"
1775
1776 #ifdef HAVE_ERRNO_H
1777 #include <errno.h>
1778 #endif
1779
1780 int main() { return 0; }
1781 int t() {
1782
1783 typedef int f;
1784 f x;
1785 x = (f) errno;
1786
1787 ; return 0; }
1788 EOF
1789 if eval $ac_link; then
1790 rm -rf conftest*
1791 gas_cv_decl_needed_errno=no
1792 else
1793 rm -rf conftest*
1794 gas_cv_decl_needed_errno=yes
1795 fi
1796 rm -f conftest*
1797
1798 fi
1799 echo "$ac_t""$gas_cv_decl_needed_errno" 1>&6
1800 test $gas_cv_decl_needed_errno = no || {
1801 cat >> confdefs.h <<\EOF
1802 #define NEED_DECLARATION_ERRNO 1
1803 EOF
1804
1805 }
1806
1807
1808 subdirs="testsuite"
1809
1810
1811 trap '' 1 2 15
1812 cat > confcache <<\EOF
1813 # This file is a shell script that caches the results of configure
1814 # tests run on this system so they can be shared between configure
1815 # scripts and configure runs. It is not useful on other systems.
1816 # If it contains results you don't want to keep, you may remove or edit it.
1817 #
1818 # By default, configure uses ./config.cache as the cache file,
1819 # creating it if it does not exist already. You can give configure
1820 # the --cache-file=FILE option to use a different cache file; that is
1821 # what configure does when it calls configure scripts in
1822 # subdirectories, so they share the cache.
1823 # Giving --cache-file=/dev/null disables caching, for debugging configure.
1824 # config.status only pays attention to the cache file if you give it the
1825 # --recheck option to rerun configure.
1826 #
1827 EOF
1828 # Ultrix sh set writes to stderr and can't be redirected directly,
1829 # and sets the high bit in the cache file unless we assign to the vars.
1830 (set) 2>&1 |
1831 sed -n "s/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=\${\1='\2'}/p" \
1832 >> confcache
1833 if cmp -s $cache_file confcache; then
1834 :
1835 else
1836 if test -w $cache_file; then
1837 echo "updating cache $cache_file"
1838 cat confcache > $cache_file
1839 else
1840 echo "not updating unwritable cache $cache_file"
1841 fi
1842 fi
1843 rm -f confcache
1844
1845 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
1846
1847 test "x$prefix" = xNONE && prefix=$ac_default_prefix
1848 # Let make expand exec_prefix.
1849 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
1850
1851 # Any assignment to VPATH causes Sun make to only execute
1852 # the first set of double-colon rules, so remove it if not needed.
1853 # If there is a colon in the path, we need to keep it.
1854 if test "x$srcdir" = x.; then
1855 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
1856 fi
1857
1858 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
1859
1860 DEFS=-DHAVE_CONFIG_H
1861
1862 # Without the "./", some shells look in PATH for config.status.
1863 : ${CONFIG_STATUS=./config.status}
1864
1865 echo creating $CONFIG_STATUS
1866 rm -f $CONFIG_STATUS
1867 cat > $CONFIG_STATUS <<EOF
1868 #! /bin/sh
1869 # Generated automatically by configure.
1870 # Run this file to recreate the current configuration.
1871 # This directory was configured as follows,
1872 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
1873 #
1874 # $0 $ac_configure_args
1875 #
1876 # Compiler output produced by configure, useful for debugging
1877 # configure, is in ./config.log if it exists.
1878
1879 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
1880 for ac_option
1881 do
1882 case "\$ac_option" in
1883 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
1884 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
1885 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
1886 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
1887 echo "$CONFIG_STATUS generated by autoconf version 2.3"
1888 exit 0 ;;
1889 -help | --help | --hel | --he | --h)
1890 echo "\$ac_cs_usage"; exit 0 ;;
1891 *) echo "\$ac_cs_usage"; exit 1 ;;
1892 esac
1893 done
1894
1895 ac_given_srcdir=$srcdir
1896 ac_given_INSTALL="$INSTALL"
1897
1898 trap 'rm -fr `echo "Makefile doc/Makefile .gdbinit:gdbinit.in conf" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
1899
1900 # Protect against being on the right side of a sed subst in config.status.
1901 sed 's/%@/@@/; s/@%/@@/; s/%g$/@g/; /@g$/s/[\\\\&%]/\\\\&/g;
1902 s/@@/%@/; s/@@/@%/; s/@g$/%g/' > conftest.subs <<\CEOF
1903 $ac_vpsub
1904 $extrasub
1905 s%@CFLAGS@%$CFLAGS%g
1906 s%@CPPFLAGS@%$CPPFLAGS%g
1907 s%@CXXFLAGS@%$CXXFLAGS%g
1908 s%@DEFS@%$DEFS%g
1909 s%@LDFLAGS@%$LDFLAGS%g
1910 s%@LIBS@%$LIBS%g
1911 s%@exec_prefix@%$exec_prefix%g
1912 s%@prefix@%$prefix%g
1913 s%@program_transform_name@%$program_transform_name%g
1914 s%@host@%$host%g
1915 s%@host_alias@%$host_alias%g
1916 s%@host_cpu@%$host_cpu%g
1917 s%@host_vendor@%$host_vendor%g
1918 s%@host_os@%$host_os%g
1919 s%@target@%$target%g
1920 s%@target_alias@%$target_alias%g
1921 s%@target_cpu@%$target_cpu%g
1922 s%@target_vendor@%$target_vendor%g
1923 s%@target_os@%$target_os%g
1924 s%@build@%$build%g
1925 s%@build_alias@%$build_alias%g
1926 s%@build_cpu@%$build_cpu%g
1927 s%@build_vendor@%$build_vendor%g
1928 s%@build_os@%$build_os%g
1929 s%@OPCODES_LIB@%$OPCODES_LIB%g
1930 /@target_frag@/r $target_frag
1931 s%@target_frag@%%g
1932 s%@extra_objects@%$extra_objects%g
1933 s%@cpu_type@%$cpu_type%g
1934 s%@obj_format@%$obj_format%g
1935 s%@atof@%$atof%g
1936 s%@BFDLIB@%$BFDLIB%g
1937 s%@ALL_OBJ_DEPS@%$ALL_OBJ_DEPS%g
1938 s%@CC@%$CC%g
1939 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
1940 s%@INSTALL_DATA@%$INSTALL_DATA%g
1941 s%@CPP@%$CPP%g
1942 s%@ALLOCA@%$ALLOCA%g
1943 s%@subdirs@%$subdirs%g
1944
1945 CEOF
1946 EOF
1947 cat >> $CONFIG_STATUS <<EOF
1948
1949 CONFIG_FILES=\${CONFIG_FILES-"Makefile doc/Makefile .gdbinit:gdbinit.in"}
1950 EOF
1951 cat >> $CONFIG_STATUS <<\EOF
1952 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
1953 # Support "outfile[:infile]", defaulting infile="outfile.in".
1954 case "$ac_file" in
1955 *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'`
1956 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
1957 *) ac_file_in="${ac_file}.in" ;;
1958 esac
1959
1960 # Adjust relative srcdir, etc. for subdirectories.
1961
1962 # Remove last slash and all that follows it. Not all systems have dirname.
1963 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
1964 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
1965 # The file is in a subdirectory.
1966 test ! -d "$ac_dir" && mkdir "$ac_dir"
1967 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
1968 # A "../" for each directory in $ac_dir_suffix.
1969 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
1970 else
1971 ac_dir_suffix= ac_dots=
1972 fi
1973
1974 case "$ac_given_srcdir" in
1975 .) srcdir=.
1976 if test -z "$ac_dots"; then top_srcdir=.
1977 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
1978 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
1979 *) # Relative path.
1980 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
1981 top_srcdir="$ac_dots$ac_given_srcdir" ;;
1982 esac
1983
1984 case "$ac_given_INSTALL" in
1985 [/$]*) INSTALL="$ac_given_INSTALL" ;;
1986 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
1987 esac
1988 echo creating "$ac_file"
1989 rm -f "$ac_file"
1990 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
1991 case "$ac_file" in
1992 *Makefile*) ac_comsub="1i\\
1993 # $configure_input" ;;
1994 *) ac_comsub= ;;
1995 esac
1996 sed -e "$ac_comsub
1997 s%@configure_input@%$configure_input%g
1998 s%@srcdir@%$srcdir%g
1999 s%@top_srcdir@%$top_srcdir%g
2000 s%@INSTALL@%$INSTALL%g
2001 " -f conftest.subs $ac_given_srcdir/$ac_file_in > $ac_file
2002 fi; done
2003 rm -f conftest.subs
2004
2005 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
2006 # NAME is the cpp macro being defined and VALUE is the value it is being given.
2007 #
2008 # ac_d sets the value in "#define NAME VALUE" lines.
2009 ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
2010 ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
2011 ac_dC='\3'
2012 ac_dD='%g'
2013 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
2014 ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
2015 ac_uB='\([ ]\)%\1#\2define\3'
2016 ac_uC=' '
2017 ac_uD='\4%g'
2018 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
2019 ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
2020 ac_eB='$%\1#\2define\3'
2021 ac_eC=' '
2022 ac_eD='%g'
2023
2024 CONFIG_HEADERS=${CONFIG_HEADERS-"conf"}
2025 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
2026 # Support "outfile[:infile]", defaulting infile="outfile.in".
2027 case "$ac_file" in
2028 *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'`
2029 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
2030 *) ac_file_in="${ac_file}.in" ;;
2031 esac
2032
2033 echo creating $ac_file
2034
2035 rm -f conftest.frag conftest.in conftest.out
2036 cp $ac_given_srcdir/$ac_file_in conftest.in
2037
2038 EOF
2039
2040 # Transform confdefs.h into a sed script conftest.vals that substitutes
2041 # the proper values into config.h.in to produce config.h. And first:
2042 # Protect against being on the right side of a sed subst in config.status.
2043 # Protect against being in an unquoted here document in config.status.
2044 rm -f conftest.vals
2045 cat > conftest.hdr <<\EOF
2046 s/[\\&%]/\\&/g
2047 s%[\\$`]%\\&%g
2048 s%#define \([A-Za-z_][A-Za-z0-9_]*\) \(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
2049 s%ac_d%ac_u%gp
2050 s%ac_u%ac_e%gp
2051 EOF
2052 sed -n -f conftest.hdr confdefs.h > conftest.vals
2053 rm -f conftest.hdr
2054
2055 # This sed command replaces #undef with comments. This is necessary, for
2056 # example, in the case of _POSIX_SOURCE, which is predefined and required
2057 # on some systems where configure will not decide to define it.
2058 cat >> conftest.vals <<\EOF
2059 s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
2060 EOF
2061
2062 # Break up conftest.vals because some shells have a limit on
2063 # the size of here documents, and old seds have small limits too.
2064 # Maximum number of lines to put in a single here document.
2065 ac_max_here_lines=12
2066
2067 rm -f conftest.tail
2068 while :
2069 do
2070 ac_lines=`grep -c . conftest.vals`
2071 # grep -c gives empty output for an empty file on some AIX systems.
2072 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
2073 # Write a limited-size here document to conftest.frag.
2074 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
2075 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
2076 echo 'CEOF
2077 sed -f conftest.frag conftest.in > conftest.out
2078 rm -f conftest.in
2079 mv conftest.out conftest.in
2080 ' >> $CONFIG_STATUS
2081 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
2082 rm -f conftest.vals
2083 mv conftest.tail conftest.vals
2084 done
2085 rm -f conftest.vals
2086
2087 cat >> $CONFIG_STATUS <<\EOF
2088 rm -f conftest.frag conftest.h
2089 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
2090 cat conftest.in >> conftest.h
2091 rm -f conftest.in
2092 if cmp -s $ac_file conftest.h 2>/dev/null; then
2093 echo "$ac_file is unchanged"
2094 rm -f conftest.h
2095 else
2096 rm -f $ac_file
2097 mv conftest.h $ac_file
2098 fi
2099 fi; done
2100
2101 EOF
2102
2103 cat >> $CONFIG_STATUS <<EOF
2104 ac_sources="$files"
2105 ac_dests="$links"
2106 EOF
2107
2108 cat >> $CONFIG_STATUS <<\EOF
2109 srcdir=$ac_given_srcdir
2110 while test -n "$ac_sources"; do
2111 set $ac_dests; ac_dest=$1; shift; ac_dests=$*
2112 set $ac_sources; ac_source=$1; shift; ac_sources=$*
2113
2114 echo "linking $srcdir/$ac_source to $ac_dest"
2115
2116 if test ! -r $srcdir/$ac_source; then
2117 { echo "configure: error: $srcdir/$ac_source: File not found" 1>&2; exit 1; }
2118 fi
2119 rm -f $ac_dest
2120
2121 # Make relative symlinks.
2122 # Remove last slash and all that follows it. Not all systems have dirname.
2123 ac_dest_dir=`echo $ac_dest|sed 's%/[^/][^/]*$%%'`
2124 if test "$ac_dest_dir" != "$ac_dest" && test "$ac_dest_dir" != .; then
2125 # The dest file is in a subdirectory.
2126 test ! -d "$ac_dest_dir" && mkdir "$ac_dest_dir"
2127 ac_dest_dir_suffix="/`echo $ac_dest_dir|sed 's%^\./%%'`"
2128 # A "../" for each directory in $ac_dest_dir_suffix.
2129 ac_dots=`echo $ac_dest_dir_suffix|sed 's%/[^/]*%../%g'`
2130 else
2131 ac_dest_dir_suffix= ac_dots=
2132 fi
2133
2134 case "$srcdir" in
2135 [/$]*) ac_rel_source="$srcdir/$ac_source" ;;
2136 *) ac_rel_source="$ac_dots$srcdir/$ac_source" ;;
2137 esac
2138
2139 # Make a symlink if possible; otherwise try a hard link.
2140 if ln -s $ac_rel_source $ac_dest 2>/dev/null ||
2141 ln $srcdir/$ac_source $ac_dest; then :
2142 else
2143 { echo "configure: error: can not link $ac_dest to $srcdir/$ac_source" 1>&2; exit 1; }
2144 fi
2145 done
2146
2147
2148 exit 0
2149 EOF
2150 chmod +x $CONFIG_STATUS
2151 rm -fr confdefs* $ac_clean_files
2152 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
2153
2154 if test "$no_recursion" != yes; then
2155
2156 # Remove --cache-file and --srcdir arguments so they do not pile up.
2157 ac_sub_configure_args=
2158 ac_prev=
2159 for ac_arg in $ac_configure_args; do
2160 if test -n "$ac_prev"; then
2161 ac_prev=
2162 continue
2163 fi
2164 case "$ac_arg" in
2165 -cache-file | --cache-file | --cache-fil | --cache-fi \
2166 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
2167 ac_prev=cache_file ;;
2168 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
2169 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
2170 ;;
2171 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
2172 ac_prev=srcdir ;;
2173 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
2174 ;;
2175 *) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;;
2176 esac
2177 done
2178
2179 for ac_config_dir in testsuite; do
2180
2181 # Do not complain, so a configure script can configure whichever
2182 # parts of a large source tree are present.
2183 if test ! -d $srcdir/$ac_config_dir; then
2184 continue
2185 fi
2186
2187 echo configuring in $ac_config_dir
2188
2189 case "$srcdir" in
2190 .) ;;
2191 *)
2192 if test -d ./$ac_config_dir || mkdir ./$ac_config_dir; then :;
2193 else
2194 { echo "configure: error: can not create `pwd`/$ac_config_dir" 1>&2; exit 1; }
2195 fi
2196 ;;
2197 esac
2198
2199 ac_popdir=`pwd`
2200 cd $ac_config_dir
2201
2202 case "$srcdir" in
2203 .) # No --srcdir option. We are building in place.
2204 ac_sub_srcdir=$srcdir ;;
2205 /*) # Absolute path.
2206 ac_sub_srcdir=$srcdir/$ac_config_dir ;;
2207 *) # Relative path.
2208 ac_sub_srcdir=../$srcdir/$ac_config_dir ;;
2209 esac
2210
2211 # Check for guested configure; otherwise get Cygnus style configure.
2212 if test -f $ac_sub_srcdir/configure; then
2213 ac_sub_configure=$ac_sub_srcdir/configure
2214 elif test -f $ac_sub_srcdir/configure.in; then
2215 ac_sub_configure=$ac_configure
2216 else
2217 echo "configure: warning: no configuration information is in $ac_config_dir" 1>&2
2218 ac_sub_configure=
2219 fi
2220
2221 # The recursion is here.
2222 if test -n "$ac_sub_configure"; then
2223
2224 # Make the cache file name correct relative to the subdirectory.
2225 # A "../" for each directory in /$ac_config_dir.
2226 ac_dots=`echo $ac_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`
2227 case "$cache_file" in
2228 /*) ac_sub_cache_file=$cache_file ;;
2229 *) # Relative path.
2230 ac_sub_cache_file="$ac_dots$cache_file" ;;
2231 esac
2232 case "$ac_given_INSTALL" in
2233 [/$]*) INSTALL="$ac_given_INSTALL" ;;
2234 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
2235 esac
2236
2237 echo "running ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir"
2238 # The eval makes quoting arguments work.
2239 if eval ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir
2240 then :
2241 else
2242 { echo "configure: error: $ac_sub_configure failed for $ac_config_dir" 1>&2; exit 1; }
2243 fi
2244 fi
2245
2246 cd $ac_popdir
2247 done
2248 fi
2249