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