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