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