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