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