Disassemble 'add rX, rY, #0' as 'mov rX, rY'.
[deliverable/binutils-gdb.git] / gas / configure
CommitLineData
833c46e1 1#! /bin/sh
fb589130 2
b11fb939 3# Guess values for system-dependent variables and create Makefiles.
b5db0960 4# Generated automatically using autoconf version 2.12.1
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:
e2b4bd2a 14ac_help="$ac_help
921d7728 15 --enable-shared[=PKGS] build shared libraries [default=yes]"
e2b4bd2a 16ac_help="$ac_help
921d7728 17 --enable-static[=PKGS] build static libraries [default=yes]"
e2b4bd2a 18ac_help="$ac_help
fc6f7f6c 19 --with-gnu-ld assume the C compiler uses GNU ld [default=no]"
28d3e4a3 20ac_help="$ac_help
d7b2038f 21 --enable-bfd-assembler use BFD back end for writing object files"
e7757ad0
KR
22ac_help="$ac_help
23 targets alternative target configurations besides the primary"
2e013bb7
ILT
24ac_help="$ac_help
25 --enable-commonbfdlib build shared BFD/opcodes/libiberty library"
48401fcf
TT
26ac_help="$ac_help
27 --disable-nls do not use Native Language Support"
28ac_help="$ac_help
29 --with-included-gettext use the GNU gettext library included here"
e2b4bd2a
ILT
30ac_help="$ac_help
31 --enable-maintainer-mode enable make rules and dependencies not useful
32 (and sometimes confusing) to the casual installer"
b11fb939 33
b11fb939
KR
34# Initialize some variables set by options.
35# The variables have the same names as the options, with
36# dashes changed to underlines.
37build=NONE
38cache_file=./config.cache
39exec_prefix=NONE
40host=NONE
41no_create=
42nonopt=NONE
bf111c9f 43no_recursion=
b11fb939 44prefix=NONE
bf111c9f
KR
45program_prefix=NONE
46program_suffix=NONE
ba49e48d 47program_transform_name=s,x,x,
b11fb939 48silent=
f2889110 49site=
b11fb939
KR
50srcdir=
51target=NONE
52verbose=
53x_includes=NONE
54x_libraries=NONE
1c9dbb83
ILT
55bindir='${exec_prefix}/bin'
56sbindir='${exec_prefix}/sbin'
57libexecdir='${exec_prefix}/libexec'
58datadir='${prefix}/share'
59sysconfdir='${prefix}/etc'
60sharedstatedir='${prefix}/com'
61localstatedir='${prefix}/var'
62libdir='${exec_prefix}/lib'
63includedir='${prefix}/include'
64oldincludedir='/usr/include'
65infodir='${prefix}/info'
66mandir='${prefix}/man'
b11fb939
KR
67
68# Initialize some other variables.
69subdirs=
1c9dbb83 70MFLAGS= MAKEFLAGS=
ed1ed9f9 71SHELL=${CONFIG_SHELL-/bin/sh}
c6c7035c
MM
72# Maximum number of lines to put in a shell here document.
73ac_max_here_lines=12
b11fb939
KR
74
75ac_prev=
76for ac_option
77do
78
79 # If the previous option needs an argument, assign it.
80 if test -n "$ac_prev"; then
81 eval "$ac_prev=\$ac_option"
82 ac_prev=
83 continue
84 fi
85
86 case "$ac_option" in
87 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
88 *) ac_optarg= ;;
89 esac
90
bf111c9f 91 # Accept the important Cygnus configure options, so we can diagnose typos.
b11fb939
KR
92
93 case "$ac_option" in
94
1c9dbb83
ILT
95 -bindir | --bindir | --bindi | --bind | --bin | --bi)
96 ac_prev=bindir ;;
97 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
98 bindir="$ac_optarg" ;;
99
100 -build | --build | --buil | --bui | --bu)
b11fb939 101 ac_prev=build ;;
1c9dbb83 102 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
b11fb939
KR
103 build="$ac_optarg" ;;
104
105 -cache-file | --cache-file | --cache-fil | --cache-fi \
106 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
107 ac_prev=cache_file ;;
108 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
109 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
110 cache_file="$ac_optarg" ;;
111
1c9dbb83
ILT
112 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
113 ac_prev=datadir ;;
114 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
115 | --da=*)
116 datadir="$ac_optarg" ;;
117
b11fb939
KR
118 -disable-* | --disable-*)
119 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
120 # Reject names that are not valid shell variable names.
121 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
ba49e48d 122 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
b11fb939
KR
123 fi
124 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
125 eval "enable_${ac_feature}=no" ;;
126
127 -enable-* | --enable-*)
128 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
129 # Reject names that are not valid shell variable names.
130 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
ba49e48d 131 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
b11fb939
KR
132 fi
133 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
134 case "$ac_option" in
135 *=*) ;;
136 *) ac_optarg=yes ;;
137 esac
138 eval "enable_${ac_feature}='$ac_optarg'" ;;
139
140 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
141 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
142 | --exec | --exe | --ex)
143 ac_prev=exec_prefix ;;
144 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
145 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
146 | --exec=* | --exe=* | --ex=*)
147 exec_prefix="$ac_optarg" ;;
148
149 -gas | --gas | --ga | --g)
150 # Obsolete; use --with-gas.
151 with_gas=yes ;;
152
153 -help | --help | --hel | --he)
f1698cb7
KR
154 # Omit some internal or obsolete options to make the list less imposing.
155 # This message is too long to be a string in the A/UX 3.1 sh.
b11fb939 156 cat << EOF
f1698cb7
KR
157Usage: configure [options] [host]
158Options: [defaults in brackets after descriptions]
159Configuration:
160 --cache-file=FILE cache test results in FILE
161 --help print this message
162 --no-create do not create output files
163 --quiet, --silent do not print \`checking...' messages
164 --version print the version of autoconf that created configure
165Directory and file names:
166 --prefix=PREFIX install architecture-independent files in PREFIX
167 [$ac_default_prefix]
1c9dbb83 168 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
f1698cb7 169 [same as prefix]
1c9dbb83
ILT
170 --bindir=DIR user executables in DIR [EPREFIX/bin]
171 --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
172 --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
173 --datadir=DIR read-only architecture-independent data in DIR
174 [PREFIX/share]
175 --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
176 --sharedstatedir=DIR modifiable architecture-independent data in DIR
177 [PREFIX/com]
178 --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
179 --libdir=DIR object code libraries in DIR [EPREFIX/lib]
180 --includedir=DIR C header files in DIR [PREFIX/include]
181 --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
182 --infodir=DIR info documentation in DIR [PREFIX/info]
183 --mandir=DIR man documentation in DIR [PREFIX/man]
f1698cb7
KR
184 --srcdir=DIR find the sources in DIR [configure dir or ..]
185 --program-prefix=PREFIX prepend PREFIX to installed program names
186 --program-suffix=SUFFIX append SUFFIX to installed program names
1c9dbb83
ILT
187 --program-transform-name=PROGRAM
188 run sed PROGRAM on installed program names
189EOF
190 cat << EOF
f1698cb7
KR
191Host type:
192 --build=BUILD configure for building on BUILD [BUILD=HOST]
193 --host=HOST configure for HOST [guessed]
194 --target=TARGET configure for TARGET [TARGET=HOST]
195Features and packages:
196 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
197 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
198 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
199 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
200 --x-includes=DIR X include files are in DIR
201 --x-libraries=DIR X library files are in DIR
b11fb939 202EOF
1c9dbb83
ILT
203 if test -n "$ac_help"; then
204 echo "--enable and --with options recognized:$ac_help"
205 fi
b11fb939
KR
206 exit 0 ;;
207
208 -host | --host | --hos | --ho)
209 ac_prev=host ;;
210 -host=* | --host=* | --hos=* | --ho=*)
211 host="$ac_optarg" ;;
212
1c9dbb83
ILT
213 -includedir | --includedir | --includedi | --included | --include \
214 | --includ | --inclu | --incl | --inc)
215 ac_prev=includedir ;;
216 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
217 | --includ=* | --inclu=* | --incl=* | --inc=*)
218 includedir="$ac_optarg" ;;
219
220 -infodir | --infodir | --infodi | --infod | --info | --inf)
221 ac_prev=infodir ;;
222 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
223 infodir="$ac_optarg" ;;
224
225 -libdir | --libdir | --libdi | --libd)
226 ac_prev=libdir ;;
227 -libdir=* | --libdir=* | --libdi=* | --libd=*)
228 libdir="$ac_optarg" ;;
229
230 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
231 | --libexe | --libex | --libe)
232 ac_prev=libexecdir ;;
233 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
234 | --libexe=* | --libex=* | --libe=*)
235 libexecdir="$ac_optarg" ;;
236
237 -localstatedir | --localstatedir | --localstatedi | --localstated \
238 | --localstate | --localstat | --localsta | --localst \
239 | --locals | --local | --loca | --loc | --lo)
240 ac_prev=localstatedir ;;
241 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
242 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
243 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
244 localstatedir="$ac_optarg" ;;
245
246 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
247 ac_prev=mandir ;;
248 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
249 mandir="$ac_optarg" ;;
250
b11fb939
KR
251 -nfp | --nfp | --nf)
252 # Obsolete; use --without-fp.
253 with_fp=no ;;
254
255 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
256 | --no-cr | --no-c)
257 no_create=yes ;;
258
bf111c9f
KR
259 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
260 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
261 no_recursion=yes ;;
b11fb939 262
1c9dbb83
ILT
263 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
264 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
265 | --oldin | --oldi | --old | --ol | --o)
266 ac_prev=oldincludedir ;;
267 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
268 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
269 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
270 oldincludedir="$ac_optarg" ;;
271
b11fb939
KR
272 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
273 ac_prev=prefix ;;
274 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
275 prefix="$ac_optarg" ;;
276
277 -program-prefix | --program-prefix | --program-prefi | --program-pref \
278 | --program-pre | --program-pr | --program-p)
279 ac_prev=program_prefix ;;
280 -program-prefix=* | --program-prefix=* | --program-prefi=* \
281 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
282 program_prefix="$ac_optarg" ;;
283
284 -program-suffix | --program-suffix | --program-suffi | --program-suff \
285 | --program-suf | --program-su | --program-s)
286 ac_prev=program_suffix ;;
287 -program-suffix=* | --program-suffix=* | --program-suffi=* \
288 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
289 program_suffix="$ac_optarg" ;;
290
291 -program-transform-name | --program-transform-name \
292 | --program-transform-nam | --program-transform-na \
293 | --program-transform-n | --program-transform- \
294 | --program-transform | --program-transfor \
295 | --program-transfo | --program-transf \
296 | --program-trans | --program-tran \
297 | --progr-tra | --program-tr | --program-t)
298 ac_prev=program_transform_name ;;
299 -program-transform-name=* | --program-transform-name=* \
300 | --program-transform-nam=* | --program-transform-na=* \
301 | --program-transform-n=* | --program-transform-=* \
302 | --program-transform=* | --program-transfor=* \
303 | --program-transfo=* | --program-transf=* \
304 | --program-trans=* | --program-tran=* \
305 | --progr-tra=* | --program-tr=* | --program-t=*)
bf111c9f 306 program_transform_name="$ac_optarg" ;;
b11fb939
KR
307
308 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
309 | -silent | --silent | --silen | --sile | --sil)
310 silent=yes ;;
311
1c9dbb83
ILT
312 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
313 ac_prev=sbindir ;;
314 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
315 | --sbi=* | --sb=*)
316 sbindir="$ac_optarg" ;;
317
318 -sharedstatedir | --sharedstatedir | --sharedstatedi \
319 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
320 | --sharedst | --shareds | --shared | --share | --shar \
321 | --sha | --sh)
322 ac_prev=sharedstatedir ;;
323 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
324 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
325 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
326 | --sha=* | --sh=*)
327 sharedstatedir="$ac_optarg" ;;
328
f2889110
KR
329 -site | --site | --sit)
330 ac_prev=site ;;
331 -site=* | --site=* | --sit=*)
332 site="$ac_optarg" ;;
333
b11fb939
KR
334 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
335 ac_prev=srcdir ;;
336 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
337 srcdir="$ac_optarg" ;;
338
1c9dbb83
ILT
339 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
340 | --syscon | --sysco | --sysc | --sys | --sy)
341 ac_prev=sysconfdir ;;
342 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
343 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
344 sysconfdir="$ac_optarg" ;;
345
b11fb939
KR
346 -target | --target | --targe | --targ | --tar | --ta | --t)
347 ac_prev=target ;;
348 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
349 target="$ac_optarg" ;;
350
351 -v | -verbose | --verbose | --verbos | --verbo | --verb)
352 verbose=yes ;;
353
354 -version | --version | --versio | --versi | --vers)
b5db0960 355 echo "configure generated by autoconf version 2.12.1"
b11fb939
KR
356 exit 0 ;;
357
358 -with-* | --with-*)
359 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
360 # Reject names that are not valid shell variable names.
361 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
ba49e48d 362 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
b11fb939
KR
363 fi
364 ac_package=`echo $ac_package| sed 's/-/_/g'`
365 case "$ac_option" in
366 *=*) ;;
367 *) ac_optarg=yes ;;
368 esac
369 eval "with_${ac_package}='$ac_optarg'" ;;
370
371 -without-* | --without-*)
372 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
373 # Reject names that are not valid shell variable names.
374 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
ba49e48d 375 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
b11fb939
KR
376 fi
377 ac_package=`echo $ac_package| sed 's/-/_/g'`
378 eval "with_${ac_package}=no" ;;
379
380 --x)
381 # Obsolete; use --with-x.
382 with_x=yes ;;
383
384 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
385 | --x-incl | --x-inc | --x-in | --x-i)
386 ac_prev=x_includes ;;
387 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
388 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
389 x_includes="$ac_optarg" ;;
390
391 -x-libraries | --x-libraries | --x-librarie | --x-librari \
392 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
393 ac_prev=x_libraries ;;
394 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
395 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
396 x_libraries="$ac_optarg" ;;
397
ba49e48d 398 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
b11fb939
KR
399 ;;
400
1c9dbb83 401 *)
b11fb939
KR
402 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
403 echo "configure: warning: $ac_option: invalid host type" 1>&2
404 fi
405 if test "x$nonopt" != xNONE; then
ba49e48d 406 { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
b11fb939
KR
407 fi
408 nonopt="$ac_option"
409 ;;
410
411 esac
412done
413
414if test -n "$ac_prev"; then
ba49e48d 415 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
b11fb939
KR
416fi
417
833c46e1 418trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
b11fb939
KR
419
420# File descriptor usage:
833c46e1 421# 0 standard input
b11fb939
KR
422# 1 file creation
423# 2 errors and warnings
833c46e1
KR
424# 3 some systems may open it to /dev/tty
425# 4 used on the Kubota Titan
426# 6 checking for... messages and results
b11fb939
KR
427# 5 compiler messages saved in config.log
428if test "$silent" = yes; then
833c46e1 429 exec 6>/dev/null
b11fb939 430else
833c46e1 431 exec 6>&1
b11fb939
KR
432fi
433exec 5>./config.log
434
435echo "\
436This file contains any messages produced by compilers while
437running configure, to aid debugging if configure makes a mistake.
438" 1>&5
439
bf111c9f 440# Strip out --no-create and --no-recursion so they do not pile up.
e23b25ec
KR
441# Also quote any args containing shell metacharacters.
442ac_configure_args=
443for ac_arg
444do
b11fb939
KR
445 case "$ac_arg" in
446 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
447 | --no-cr | --no-c) ;;
bf111c9f
KR
448 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
449 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
e23b25ec
KR
450 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
451 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
452 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
b11fb939
KR
453 esac
454done
455
456# NLS nuisances.
c6c7035c
MM
457# Only set these to C if already set. These must not be set unconditionally
458# because not all systems understand e.g. LANG=C (notably SCO).
459# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
460# Non-C LC_CTYPE values break the ctype check.
7d0f8249 461if test "${LANG+set}" = set; then LANG=C; export LANG; fi
c6c7035c
MM
462if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
463if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
464if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
b11fb939
KR
465
466# confdefs.h avoids OS command line length limits that DEFS can exceed.
467rm -rf conftest* confdefs.h
468# AIX cpp loses on an empty file, so make sure it contains at least a newline.
469echo > confdefs.h
470
471# A filename unique to this package, relative to the directory that
472# configure is in, which we can look for to find out if srcdir is correct.
473ac_unique_file=as.h
474
475# Find the source files, if location was not specified.
476if test -z "$srcdir"; then
477 ac_srcdir_defaulted=yes
478 # Try the directory containing this script, then its parent.
479 ac_prog=$0
480 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
481 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
482 srcdir=$ac_confdir
483 if test ! -r $srcdir/$ac_unique_file; then
484 srcdir=..
485 fi
486else
487 ac_srcdir_defaulted=no
488fi
489if test ! -r $srcdir/$ac_unique_file; then
490 if test "$ac_srcdir_defaulted" = yes; then
ba49e48d 491 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
b11fb939 492 else
ba49e48d 493 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
b11fb939
KR
494 fi
495fi
f2889110 496srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
b11fb939
KR
497
498# Prefer explicitly selected file to automatically selected ones.
bf111c9f 499if test -z "$CONFIG_SITE"; then
b11fb939 500 if test "x$prefix" != xNONE; then
f2889110 501 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
b11fb939 502 else
f2889110 503 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
b11fb939
KR
504 fi
505fi
506for ac_site_file in $CONFIG_SITE; do
507 if test -r "$ac_site_file"; then
508 echo "loading site script $ac_site_file"
509 . "$ac_site_file"
510 fi
511done
512
513if test -r "$cache_file"; then
514 echo "loading cache $cache_file"
515 . $cache_file
516else
517 echo "creating cache $cache_file"
518 > $cache_file
519fi
520
521ac_ext=c
522# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
d0352cbb
DE
523ac_cpp='$CPP $CPPFLAGS'
524ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
525ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
c6c7035c 526cross_compiling=$ac_cv_prog_cc_cross
b11fb939 527
bf111c9f
KR
528if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
529 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
530 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
531 ac_n= ac_c='
532' ac_t=' '
533 else
534 ac_n=-n ac_c= ac_t=
535 fi
536else
537 ac_n= ac_c='\c' ac_t=
538fi
539
b11fb939
KR
540
541
542ac_aux_dir=
e2b4bd2a 543for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
e23b25ec
KR
544 if test -f $ac_dir/install-sh; then
545 ac_aux_dir=$ac_dir
28d3e4a3 546 ac_install_sh="$ac_aux_dir/install-sh -c"
e23b25ec
KR
547 break
548 elif test -f $ac_dir/install.sh; then
549 ac_aux_dir=$ac_dir
28d3e4a3 550 ac_install_sh="$ac_aux_dir/install.sh -c"
e23b25ec 551 break
b11fb939
KR
552 fi
553done
554if test -z "$ac_aux_dir"; then
e2b4bd2a 555 { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
b11fb939 556fi
28d3e4a3
KR
557ac_config_guess=$ac_aux_dir/config.guess
558ac_config_sub=$ac_aux_dir/config.sub
559ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
b11fb939 560
fb589130 561
b11fb939
KR
562# Do some error checking and defaulting for the host and target type.
563# The inputs are:
564# configure --host=HOST --target=TARGET --build=BUILD NONOPT
565#
566# The rules are:
567# 1. You are not allowed to specify --host, --target, and nonopt at the
1c9dbb83 568# same time.
b11fb939
KR
569# 2. Host defaults to nonopt.
570# 3. If nonopt is not specified, then host defaults to the current host,
571# as determined by config.guess.
f2889110
KR
572# 4. Target and build default to nonopt.
573# 5. If nonopt is not specified, then target and build default to host.
b11fb939
KR
574
575# The aliases save the names the user supplied, while $host etc.
576# will get canonicalized.
577case $host---$target---$nonopt in
578NONE---*---* | *---NONE---* | *---*---NONE) ;;
ba49e48d 579*) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
b11fb939
KR
580esac
581
e23b25ec 582
b11fb939 583# Make sure we can run config.sub.
b5db0960 584if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
ba49e48d 585else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
b11fb939
KR
586fi
587
833c46e1 588echo $ac_n "checking host system type""... $ac_c" 1>&6
921d7728 589echo "configure:590: checking host system type" >&5
b11fb939
KR
590
591host_alias=$host
28d3e4a3 592case "$host_alias" in
b11fb939
KR
593NONE)
594 case $nonopt in
595 NONE)
b5db0960 596 if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
ba49e48d 597 else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
b11fb939
KR
598 fi ;;
599 *) host_alias=$nonopt ;;
600 esac ;;
601esac
602
b5db0960 603host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
c6c7035c
MM
604host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
605host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
606host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
833c46e1 607echo "$ac_t""$host" 1>&6
b11fb939 608
833c46e1 609echo $ac_n "checking target system type""... $ac_c" 1>&6
921d7728 610echo "configure:611: checking target system type" >&5
b11fb939
KR
611
612target_alias=$target
28d3e4a3 613case "$target_alias" in
b11fb939
KR
614NONE)
615 case $nonopt in
616 NONE) target_alias=$host_alias ;;
617 *) target_alias=$nonopt ;;
618 esac ;;
619esac
620
b5db0960 621target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
c6c7035c
MM
622target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
623target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
624target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
833c46e1 625echo "$ac_t""$target" 1>&6
b11fb939 626
833c46e1 627echo $ac_n "checking build system type""... $ac_c" 1>&6
921d7728 628echo "configure:629: checking build system type" >&5
b11fb939
KR
629
630build_alias=$build
28d3e4a3 631case "$build_alias" in
f2889110
KR
632NONE)
633 case $nonopt in
634 NONE) build_alias=$host_alias ;;
635 *) build_alias=$nonopt ;;
636 esac ;;
637esac
638
b5db0960 639build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
e2b4bd2a
ILT
640build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
641build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
642build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
643echo "$ac_t""$build" 1>&6
644
645test "$host_alias" != "$target_alias" &&
646 test "$program_prefix$program_suffix$program_transform_name" = \
647 NONENONEs,x,x, &&
648 program_prefix=${target_alias}-
649
650
651# Find a good install program. We prefer a C program (faster),
652# so one script is as good as another. But avoid the broken or
653# incompatible versions:
654# SysV /etc/install, /usr/sbin/install
655# SunOS /usr/etc/install
656# IRIX /sbin/install
657# AIX /bin/install
ed1ed9f9 658# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
e2b4bd2a
ILT
659# AFS /usr/afsws/bin/install, which mishandles nonexistent args
660# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
661# ./install, which can be erroneously created by make from ./install.sh.
662echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
921d7728 663echo "configure:664: checking for a BSD compatible install" >&5
e2b4bd2a
ILT
664if test -z "$INSTALL"; then
665if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
666 echo $ac_n "(cached) $ac_c" 1>&6
667else
668 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="${IFS}:"
669 for ac_dir in $PATH; do
670 # Account for people who put trailing slashes in PATH elements.
671 case "$ac_dir/" in
672 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
673 *)
674 # OSF1 and SCO ODT 3.0 have their own names for install.
ed1ed9f9
ILT
675 # Don't use installbsd from OSF since it installs stuff as root
676 # by default.
677 for ac_prog in ginstall scoinst install; do
e2b4bd2a
ILT
678 if test -f $ac_dir/$ac_prog; then
679 if test $ac_prog = install &&
680 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
681 # AIX install. It has an incompatible calling convention.
e2b4bd2a
ILT
682 :
683 else
684 ac_cv_path_install="$ac_dir/$ac_prog -c"
685 break 2
686 fi
687 fi
688 done
689 ;;
690 esac
691 done
692 IFS="$ac_save_IFS"
693
694fi
695 if test "${ac_cv_path_install+set}" = set; then
696 INSTALL="$ac_cv_path_install"
697 else
698 # As a last resort, use the slow shell script. We don't cache a
699 # path for INSTALL within a source directory, because that will
700 # break other packages using the cache if that directory is
701 # removed, or if the path is relative.
702 INSTALL="$ac_install_sh"
703 fi
704fi
705echo "$ac_t""$INSTALL" 1>&6
706
707# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
708# It thinks the first close brace ends the variable substitution.
709test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
710
711test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
712
713
714test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
715
e2b4bd2a 716echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
921d7728 717echo "configure:718: checking whether build environment is sane" >&5
e2b4bd2a
ILT
718# Just in case
719sleep 1
720echo timestamp > conftestfile
721# Do `set' in a subshell so we don't clobber the current shell's
722# arguments. Must try -L first in case configure is actually a
723# symlink; some systems play weird games with the mod time of symlinks
724# (eg FreeBSD returns the mod time of the symlink's containing
725# directory).
726if (
727 set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
22d3fbd6 728 if test "$*" = "X"; then
e2b4bd2a
ILT
729 # -L didn't work.
730 set X `ls -t $srcdir/configure conftestfile`
731 fi
22d3fbd6
NC
732 if test "$*" != "X $srcdir/configure conftestfile" \
733 && test "$*" != "X conftestfile $srcdir/configure"; then
734
735 # If neither matched, then we have a broken ls. This can happen
736 # if, for instance, CONFIG_SHELL is bash and it inherits a
737 # broken ls alias from the environment. This has actually
738 # happened. Such a system could not be considered "sane".
739 { echo "configure: error: ls -t appears to fail. Make sure there is not a broken
740alias in your environment" 1>&2; exit 1; }
741 fi
742
e2b4bd2a
ILT
743 test "$2" = conftestfile
744 )
745then
746 # Ok.
747 :
748else
749 { echo "configure: error: newly created file is older than distributed files!
750Check your system clock" 1>&2; exit 1; }
751fi
752rm -f conftest*
753echo "$ac_t""yes" 1>&6
754if test "$program_transform_name" = s,x,x,; then
755 program_transform_name=
756else
757 # Double any \ or $. echo might interpret backslashes.
758 cat <<\EOF_SED > conftestsed
759s,\\,\\\\,g; s,\$,$$,g
760EOF_SED
761 program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
762 rm -f conftestsed
763fi
764test "$program_prefix" != NONE &&
765 program_transform_name="s,^,${program_prefix},; $program_transform_name"
766# Use a double $ so make ignores it.
767test "$program_suffix" != NONE &&
768 program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
769
770# sed with no file args requires a program.
771test "$program_transform_name" = "" && program_transform_name="s,x,x,"
772
22d3fbd6 773echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
921d7728 774echo "configure:775: checking whether ${MAKE-make} sets \${MAKE}" >&5
22d3fbd6
NC
775set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
776if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
777 echo $ac_n "(cached) $ac_c" 1>&6
778else
779 cat > conftestmake <<\EOF
780all:
781 @echo 'ac_maketemp="${MAKE}"'
782EOF
783# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
784eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
785if test -n "$ac_maketemp"; then
786 eval ac_cv_prog_make_${ac_make}_set=yes
787else
788 eval ac_cv_prog_make_${ac_make}_set=no
789fi
790rm -f conftestmake
791fi
792if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
793 echo "$ac_t""yes" 1>&6
794 SET_MAKE=
795else
796 echo "$ac_t""no" 1>&6
797 SET_MAKE="MAKE=${MAKE-make}"
798fi
799
800
801PACKAGE=gas
802
b6177e13 803VERSION=2.9.4
22d3fbd6
NC
804
805if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
806 { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
807fi
808cat >> confdefs.h <<EOF
809#define PACKAGE "$PACKAGE"
810EOF
811
812cat >> confdefs.h <<EOF
813#define VERSION "$VERSION"
814EOF
815
816
817
e2b4bd2a
ILT
818missing_dir=`cd $ac_aux_dir && pwd`
819echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
921d7728 820echo "configure:821: checking for working aclocal" >&5
e2b4bd2a
ILT
821# Run test in a subshell; some versions of sh will print an error if
822# an executable is not found, even if stderr is redirected.
823# Redirect stdin to placate older versions of autoconf. Sigh.
824if (aclocal --version) < /dev/null > /dev/null 2>&1; then
825 ACLOCAL=aclocal
826 echo "$ac_t""found" 1>&6
827else
828 ACLOCAL="$missing_dir/missing aclocal"
829 echo "$ac_t""missing" 1>&6
830fi
831
832echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
921d7728 833echo "configure:834: checking for working autoconf" >&5
e2b4bd2a
ILT
834# Run test in a subshell; some versions of sh will print an error if
835# an executable is not found, even if stderr is redirected.
836# Redirect stdin to placate older versions of autoconf. Sigh.
837if (autoconf --version) < /dev/null > /dev/null 2>&1; then
838 AUTOCONF=autoconf
839 echo "$ac_t""found" 1>&6
840else
841 AUTOCONF="$missing_dir/missing autoconf"
842 echo "$ac_t""missing" 1>&6
843fi
844
845echo $ac_n "checking for working automake""... $ac_c" 1>&6
921d7728 846echo "configure:847: checking for working automake" >&5
e2b4bd2a
ILT
847# Run test in a subshell; some versions of sh will print an error if
848# an executable is not found, even if stderr is redirected.
849# Redirect stdin to placate older versions of autoconf. Sigh.
850if (automake --version) < /dev/null > /dev/null 2>&1; then
851 AUTOMAKE=automake
852 echo "$ac_t""found" 1>&6
853else
854 AUTOMAKE="$missing_dir/missing automake"
855 echo "$ac_t""missing" 1>&6
856fi
857
858echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
921d7728 859echo "configure:860: checking for working autoheader" >&5
e2b4bd2a
ILT
860# Run test in a subshell; some versions of sh will print an error if
861# an executable is not found, even if stderr is redirected.
862# Redirect stdin to placate older versions of autoconf. Sigh.
863if (autoheader --version) < /dev/null > /dev/null 2>&1; then
864 AUTOHEADER=autoheader
865 echo "$ac_t""found" 1>&6
866else
867 AUTOHEADER="$missing_dir/missing autoheader"
868 echo "$ac_t""missing" 1>&6
869fi
870
871echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
921d7728 872echo "configure:873: checking for working makeinfo" >&5
e2b4bd2a
ILT
873# Run test in a subshell; some versions of sh will print an error if
874# an executable is not found, even if stderr is redirected.
875# Redirect stdin to placate older versions of autoconf. Sigh.
876if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
877 MAKEINFO=makeinfo
878 echo "$ac_t""found" 1>&6
879else
880 MAKEINFO="$missing_dir/missing makeinfo"
881 echo "$ac_t""missing" 1>&6
882fi
883
e2b4bd2a
ILT
884
885
fc6f7f6c
ILT
886# Check whether --enable-shared or --disable-shared was given.
887if test "${enable_shared+set}" = set; then
888 enableval="$enable_shared"
889 p=${PACKAGE-default}
890case "$enableval" in
891yes) enable_shared=yes ;;
892no) enable_shared=no ;;
893*)
894 enable_shared=no
895 # Look at the argument we got. We use all the common list separators.
896 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
897 for pkg in $enableval; do
898 if test "X$pkg" = "X$p"; then
899 enable_shared=yes
900 fi
901 done
902 IFS="$ac_save_ifs"
903 ;;
904esac
905else
906 enable_shared=yes
907fi
908
909# Check whether --enable-static or --disable-static was given.
910if test "${enable_static+set}" = set; then
911 enableval="$enable_static"
912 p=${PACKAGE-default}
913case "$enableval" in
914yes) enable_static=yes ;;
915no) enable_static=no ;;
916*)
917 enable_static=no
918 # Look at the argument we got. We use all the common list separators.
919 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
920 for pkg in $enableval; do
921 if test "X$pkg" = "X$p"; then
922 enable_static=yes
923 fi
924 done
925 IFS="$ac_save_ifs"
926 ;;
927esac
928else
929 enable_static=yes
930fi
931
a52052db
ILT
932# Extract the first word of "ranlib", so it can be a program name with args.
933set dummy ranlib; ac_word=$2
934echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
921d7728 935echo "configure:936: checking for $ac_word" >&5
a52052db
ILT
936if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
937 echo $ac_n "(cached) $ac_c" 1>&6
938else
939 if test -n "$RANLIB"; then
940 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
941else
942 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
943 for ac_dir in $PATH; do
944 test -z "$ac_dir" && ac_dir=.
945 if test -f $ac_dir/$ac_word; then
946 ac_cv_prog_RANLIB="ranlib"
947 break
948 fi
949 done
950 IFS="$ac_save_ifs"
951 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
952fi
953fi
954RANLIB="$ac_cv_prog_RANLIB"
955if test -n "$RANLIB"; then
956 echo "$ac_t""$RANLIB" 1>&6
957else
958 echo "$ac_t""no" 1>&6
959fi
960
e2b4bd2a
ILT
961# Extract the first word of "gcc", so it can be a program name with args.
962set dummy gcc; ac_word=$2
963echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
921d7728 964echo "configure:965: checking for $ac_word" >&5
e2b4bd2a
ILT
965if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
966 echo $ac_n "(cached) $ac_c" 1>&6
967else
968 if test -n "$CC"; then
969 ac_cv_prog_CC="$CC" # Let the user override the test.
970else
971 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
972 for ac_dir in $PATH; do
973 test -z "$ac_dir" && ac_dir=.
974 if test -f $ac_dir/$ac_word; then
975 ac_cv_prog_CC="gcc"
976 break
977 fi
978 done
979 IFS="$ac_save_ifs"
980fi
981fi
982CC="$ac_cv_prog_CC"
983if test -n "$CC"; then
984 echo "$ac_t""$CC" 1>&6
985else
986 echo "$ac_t""no" 1>&6
987fi
988
989if test -z "$CC"; then
990 # Extract the first word of "cc", so it can be a program name with args.
991set dummy cc; ac_word=$2
992echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
921d7728 993echo "configure:994: checking for $ac_word" >&5
e2b4bd2a
ILT
994if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
995 echo $ac_n "(cached) $ac_c" 1>&6
996else
997 if test -n "$CC"; then
998 ac_cv_prog_CC="$CC" # Let the user override the test.
999else
1000 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1001 ac_prog_rejected=no
1002 for ac_dir in $PATH; do
1003 test -z "$ac_dir" && ac_dir=.
1004 if test -f $ac_dir/$ac_word; then
1005 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1006 ac_prog_rejected=yes
1007 continue
1008 fi
1009 ac_cv_prog_CC="cc"
1010 break
1011 fi
1012 done
1013 IFS="$ac_save_ifs"
1014if test $ac_prog_rejected = yes; then
1015 # We found a bogon in the path, so make sure we never use it.
1016 set dummy $ac_cv_prog_CC
1017 shift
1018 if test $# -gt 0; then
1019 # We chose a different compiler from the bogus one.
1020 # However, it has the same basename, so the bogon will be chosen
1021 # first if we set CC to just the basename; use the full file name.
1022 shift
1023 set dummy "$ac_dir/$ac_word" "$@"
1024 shift
1025 ac_cv_prog_CC="$@"
1026 fi
1027fi
1028fi
1029fi
1030CC="$ac_cv_prog_CC"
1031if test -n "$CC"; then
1032 echo "$ac_t""$CC" 1>&6
1033else
1034 echo "$ac_t""no" 1>&6
1035fi
1036
1037 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1038fi
1039
1040echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
921d7728 1041echo "configure:1042: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
e2b4bd2a
ILT
1042
1043ac_ext=c
1044# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1045ac_cpp='$CPP $CPPFLAGS'
1046ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1047ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1048cross_compiling=$ac_cv_prog_cc_cross
1049
1050cat > conftest.$ac_ext <<EOF
921d7728 1051#line 1052 "configure"
e2b4bd2a
ILT
1052#include "confdefs.h"
1053main(){return(0);}
1054EOF
921d7728 1055if { (eval echo configure:1056: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
e2b4bd2a
ILT
1056 ac_cv_prog_cc_works=yes
1057 # If we can't run a trivial program, we are probably using a cross compiler.
1058 if (./conftest; exit) 2>/dev/null; then
1059 ac_cv_prog_cc_cross=no
1060 else
1061 ac_cv_prog_cc_cross=yes
1062 fi
1063else
1064 echo "configure: failed program was:" >&5
1065 cat conftest.$ac_ext >&5
1066 ac_cv_prog_cc_works=no
1067fi
1068rm -fr conftest*
1069
1070echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1071if test $ac_cv_prog_cc_works = no; then
1072 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1073fi
1074echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
921d7728 1075echo "configure:1076: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
e2b4bd2a
ILT
1076echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1077cross_compiling=$ac_cv_prog_cc_cross
1078
1079echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
921d7728 1080echo "configure:1081: checking whether we are using GNU C" >&5
e2b4bd2a
ILT
1081if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
1082 echo $ac_n "(cached) $ac_c" 1>&6
1083else
1084 cat > conftest.c <<EOF
1085#ifdef __GNUC__
1086 yes;
1087#endif
1088EOF
921d7728 1089if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1090: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
e2b4bd2a
ILT
1090 ac_cv_prog_gcc=yes
1091else
1092 ac_cv_prog_gcc=no
1093fi
1094fi
1095
1096echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1097
1098if test $ac_cv_prog_gcc = yes; then
1099 GCC=yes
1100 ac_test_CFLAGS="${CFLAGS+set}"
1101 ac_save_CFLAGS="$CFLAGS"
1102 CFLAGS=
1103 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
921d7728 1104echo "configure:1105: checking whether ${CC-cc} accepts -g" >&5
e2b4bd2a
ILT
1105if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
1106 echo $ac_n "(cached) $ac_c" 1>&6
1107else
1108 echo 'void f(){}' > conftest.c
1109if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1110 ac_cv_prog_cc_g=yes
1111else
1112 ac_cv_prog_cc_g=no
1113fi
1114rm -f conftest*
1115
1116fi
1117
1118echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1119 if test "$ac_test_CFLAGS" = set; then
1120 CFLAGS="$ac_save_CFLAGS"
1121 elif test $ac_cv_prog_cc_g = yes; then
1122 CFLAGS="-g -O2"
1123 else
1124 CFLAGS="-O2"
1125 fi
1126else
1127 GCC=
1128 test "${CFLAGS+set}" = set || CFLAGS="-g"
1129fi
1130
e2b4bd2a
ILT
1131# Check whether --with-gnu-ld or --without-gnu-ld was given.
1132if test "${with_gnu_ld+set}" = set; then
1133 withval="$with_gnu_ld"
1134 test "$withval" = no || with_gnu_ld=yes
1135else
1136 with_gnu_ld=no
1137fi
1138
a52052db
ILT
1139
1140ac_prog=ld
1141if test "$ac_cv_prog_gcc" = yes; then
1142 # Check if gcc -print-prog-name=ld gives a path.
1143 echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
921d7728 1144echo "configure:1145: checking for ld used by GCC" >&5
a52052db
ILT
1145 ac_prog=`($CC -print-prog-name=ld) 2>&5`
1146 case "$ac_prog" in
1147 # Accept absolute paths.
fc6f7f6c 1148 /* | [A-Za-z]:\\*)
a52052db
ILT
1149 test -z "$LD" && LD="$ac_prog"
1150 ;;
1151 "")
1152 # If it fails, then pretend we aren't using GCC.
1153 ac_prog=ld
1154 ;;
1155 *)
1156 # If it is relative, then search for the first ld in PATH.
1157 with_gnu_ld=unknown
1158 ;;
1159 esac
1160elif test "$with_gnu_ld" = yes; then
e2b4bd2a 1161 echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
921d7728 1162echo "configure:1163: checking for GNU ld" >&5
e2b4bd2a
ILT
1163else
1164 echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
921d7728 1165echo "configure:1166: checking for non-GNU ld" >&5
e2b4bd2a
ILT
1166fi
1167if eval "test \"`echo '$''{'ac_cv_path_LD'+set}'`\" = set"; then
1168 echo $ac_n "(cached) $ac_c" 1>&6
1169else
a52052db 1170 if test -z "$LD"; then
e2b4bd2a
ILT
1171 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1172 for ac_dir in $PATH; do
1173 test -z "$ac_dir" && ac_dir=.
a52052db
ILT
1174 if test -f "$ac_dir/$ac_prog"; then
1175 ac_cv_path_LD="$ac_dir/$ac_prog"
e2b4bd2a
ILT
1176 # Check to see if the program is GNU ld. I'd rather use --version,
1177 # but apparently some GNU ld's only accept -v.
1178 # Break only if it was the GNU/non-GNU ld that we prefer.
a52052db
ILT
1179 if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
1180 test "$with_gnu_ld" != no && break
e2b4bd2a
ILT
1181 else
1182 test "$with_gnu_ld" != yes && break
1183 fi
1184 fi
1185 done
1186 IFS="$ac_save_ifs"
a52052db 1187else
6cc7a938 1188 ac_cv_path_LD="$LD" # Let the user override the test with a path.
a52052db 1189fi
e2b4bd2a
ILT
1190fi
1191
1192LD="$ac_cv_path_LD"
1193if test -n "$LD"; then
1194 echo "$ac_t""$LD" 1>&6
1195else
1196 echo "$ac_t""no" 1>&6
1197fi
1198test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
1199
a52052db 1200echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
921d7728 1201echo "configure:1202: checking if the linker ($LD) is GNU ld" >&5
e2b4bd2a
ILT
1202if eval "test \"`echo '$''{'ac_cv_prog_gnu_ld'+set}'`\" = set"; then
1203 echo $ac_n "(cached) $ac_c" 1>&6
1204else
1205 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
a52052db 1206if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
e2b4bd2a
ILT
1207 ac_cv_prog_gnu_ld=yes
1208else
1209 ac_cv_prog_gnu_ld=no
1210fi
1211fi
1212
1213echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6
1214
1215
a52052db 1216echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
921d7728 1217echo "configure:1218: checking for BSD-compatible nm" >&5
a52052db
ILT
1218if eval "test \"`echo '$''{'ac_cv_path_NM'+set}'`\" = set"; then
1219 echo $ac_n "(cached) $ac_c" 1>&6
1220else
921d7728
ILT
1221 if test -n "$NM"; then
1222 # Let the user override the test.
1223 ac_cv_path_NM="$NM"
1224else
a52052db
ILT
1225 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1226 for ac_dir in /usr/ucb /usr/ccs/bin $PATH /bin; do
fc6f7f6c 1227 test -z "$ac_dir" && ac_dir=.
a52052db
ILT
1228 if test -f $ac_dir/nm; then
1229 # Check to see if the nm accepts a BSD-compat flag.
fc6f7f6c 1230 # Adding the `sed 1q' prevents false positives on HP-UX, which says:
a52052db 1231 # nm: unknown option "B" ignored
fc6f7f6c 1232 if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
a52052db 1233 ac_cv_path_NM="$ac_dir/nm -B"
fc6f7f6c 1234 elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
a52052db
ILT
1235 ac_cv_path_NM="$ac_dir/nm -p"
1236 else
1237 ac_cv_path_NM="$ac_dir/nm"
1238 fi
1239 break
1240 fi
1241 done
1242 IFS="$ac_save_ifs"
1243 test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
b2bb41f6 1244fi
a52052db
ILT
1245fi
1246
1247NM="$ac_cv_path_NM"
1248echo "$ac_t""$NM" 1>&6
1249
1250
e2b4bd2a 1251echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
921d7728 1252echo "configure:1253: checking whether ln -s works" >&5
e2b4bd2a
ILT
1253if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
1254 echo $ac_n "(cached) $ac_c" 1>&6
1255else
1256 rm -f conftestdata
1257if ln -s X conftestdata 2>/dev/null
1258then
1259 rm -f conftestdata
1260 ac_cv_prog_LN_S="ln -s"
1261else
1262 ac_cv_prog_LN_S=ln
1263fi
1264fi
1265LN_S="$ac_cv_prog_LN_S"
1266if test "$ac_cv_prog_LN_S" = "ln -s"; then
1267 echo "$ac_t""yes" 1>&6
1268else
1269 echo "$ac_t""no" 1>&6
1270fi
1271
b2bb41f6
ILT
1272if test $host != $build; then
1273 ac_tool_prefix=${host_alias}-
1274else
1275 ac_tool_prefix=
1276fi
1277
e2b4bd2a 1278# Always use our own libtool.
0040c1e9 1279LIBTOOL='$(SHELL) $(top_builddir)/libtool'
e2b4bd2a 1280
fc6f7f6c
ILT
1281# Check for any special flags to pass to ltconfig.
1282libtool_flags=
1283test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
1284test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
e2b4bd2a
ILT
1285test "$silent" = yes && libtool_flags="$libtool_flags --silent"
1286test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
1287test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
1288
1289# Some flags need to be propagated to the compiler or linker for good
1290# libtool support.
1291case "$host" in
fc6f7f6c 1292*-*-irix6*)
7ee4e307 1293 # Find out which ABI we are using.
921d7728
ILT
1294 echo '#line 1295 "configure"' > conftest.$ac_ext
1295 if { (eval echo configure:1296: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7ee4e307
ILT
1296 case "`/usr/bin/file conftest.o`" in
1297 *32-bit*)
1298 LD="${LD-ld} -32"
a52052db 1299 ;;
7ee4e307
ILT
1300 *N32*)
1301 LD="${LD-ld} -n32"
1302 ;;
1303 *64-bit*)
1304 LD="${LD-ld} -64"
a52052db
ILT
1305 ;;
1306 esac
7ee4e307
ILT
1307 fi
1308 rm -rf conftest*
e2b4bd2a
ILT
1309 ;;
1310
1311*-*-sco3.2v5*)
1312 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
1313 CFLAGS="$CFLAGS -belf"
1314 ;;
b2bb41f6
ILT
1315
1316*-*-cygwin32*)
1317 # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
1318set dummy ${ac_tool_prefix}dlltool; ac_word=$2
1319echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
921d7728 1320echo "configure:1321: checking for $ac_word" >&5
b2bb41f6
ILT
1321if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL'+set}'`\" = set"; then
1322 echo $ac_n "(cached) $ac_c" 1>&6
1323else
1324 if test -n "$DLLTOOL"; then
1325 ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
1326else
1327 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1328 for ac_dir in $PATH; do
1329 test -z "$ac_dir" && ac_dir=.
1330 if test -f $ac_dir/$ac_word; then
1331 ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
1332 break
1333 fi
1334 done
1335 IFS="$ac_save_ifs"
1336fi
1337fi
1338DLLTOOL="$ac_cv_prog_DLLTOOL"
1339if test -n "$DLLTOOL"; then
1340 echo "$ac_t""$DLLTOOL" 1>&6
1341else
1342 echo "$ac_t""no" 1>&6
1343fi
1344
1345
1346if test -z "$ac_cv_prog_DLLTOOL"; then
1347if test -n "$ac_tool_prefix"; then
1348 # Extract the first word of "dlltool", so it can be a program name with args.
1349set dummy dlltool; ac_word=$2
1350echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
921d7728 1351echo "configure:1352: checking for $ac_word" >&5
b2bb41f6
ILT
1352if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL'+set}'`\" = set"; then
1353 echo $ac_n "(cached) $ac_c" 1>&6
1354else
1355 if test -n "$DLLTOOL"; then
1356 ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
1357else
1358 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1359 for ac_dir in $PATH; do
1360 test -z "$ac_dir" && ac_dir=.
1361 if test -f $ac_dir/$ac_word; then
1362 ac_cv_prog_DLLTOOL="dlltool"
1363 break
1364 fi
1365 done
1366 IFS="$ac_save_ifs"
1367 test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="false"
1368fi
1369fi
1370DLLTOOL="$ac_cv_prog_DLLTOOL"
1371if test -n "$DLLTOOL"; then
1372 echo "$ac_t""$DLLTOOL" 1>&6
1373else
1374 echo "$ac_t""no" 1>&6
1375fi
1376
1377else
1378 DLLTOOL="false"
1379fi
1380fi
1381
1382# Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
1383set dummy ${ac_tool_prefix}as; ac_word=$2
1384echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
921d7728 1385echo "configure:1386: checking for $ac_word" >&5
b2bb41f6
ILT
1386if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then
1387 echo $ac_n "(cached) $ac_c" 1>&6
1388else
1389 if test -n "$AS"; then
1390 ac_cv_prog_AS="$AS" # Let the user override the test.
1391else
1392 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1393 for ac_dir in $PATH; do
1394 test -z "$ac_dir" && ac_dir=.
1395 if test -f $ac_dir/$ac_word; then
1396 ac_cv_prog_AS="${ac_tool_prefix}as"
1397 break
1398 fi
1399 done
1400 IFS="$ac_save_ifs"
1401fi
1402fi
1403AS="$ac_cv_prog_AS"
1404if test -n "$AS"; then
1405 echo "$ac_t""$AS" 1>&6
1406else
1407 echo "$ac_t""no" 1>&6
1408fi
1409
1410
1411if test -z "$ac_cv_prog_AS"; then
1412if test -n "$ac_tool_prefix"; then
1413 # Extract the first word of "as", so it can be a program name with args.
1414set dummy as; ac_word=$2
1415echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
921d7728 1416echo "configure:1417: checking for $ac_word" >&5
b2bb41f6
ILT
1417if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then
1418 echo $ac_n "(cached) $ac_c" 1>&6
1419else
1420 if test -n "$AS"; then
1421 ac_cv_prog_AS="$AS" # Let the user override the test.
1422else
1423 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1424 for ac_dir in $PATH; do
1425 test -z "$ac_dir" && ac_dir=.
1426 if test -f $ac_dir/$ac_word; then
1427 ac_cv_prog_AS="as"
1428 break
1429 fi
1430 done
1431 IFS="$ac_save_ifs"
1432 test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="false"
1433fi
1434fi
1435AS="$ac_cv_prog_AS"
1436if test -n "$AS"; then
1437 echo "$ac_t""$AS" 1>&6
1438else
1439 echo "$ac_t""no" 1>&6
1440fi
1441
1442else
1443 AS="false"
1444fi
1445fi
1446
1447
1448 ;;
1449
e2b4bd2a
ILT
1450esac
1451
1452# Actually configure libtool. ac_aux_dir is where install-sh is found.
1453CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
a52052db 1454LD="$LD" NM="$NM" RANLIB="$RANLIB" LN_S="$LN_S" \
b2bb41f6 1455DLLTOOL="$DLLTOOL" AS="$AS" \
921d7728 1456${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
e2b4bd2a
ILT
1457$libtool_flags --no-verify $ac_aux_dir/ltmain.sh $host \
1458|| { echo "configure: error: libtool configure failed" 1>&2; exit 1; }
1459
921d7728
ILT
1460# Redirect the config.log output again, so that the ltconfig log is not
1461# clobbered by the next message.
1462exec 5>>./config.log
1463
e2b4bd2a
ILT
1464
1465user_bfd_gas=
1466# Check whether --enable-bfd-assembler or --disable-bfd-assembler was given.
1467if test "${enable_bfd_assembler+set}" = set; then
1468 enableval="$enable_bfd_assembler"
1469 case "${enableval}" in
1470 yes) need_bfd=yes user_bfd_gas=yes ;;
1471 no) user_bfd_gas=no ;;
1472 *) { echo "configure: error: bad value ${enableval} given for bfd-assembler option" 1>&2; exit 1; } ;;
1473esac
1474fi
1475# Check whether --enable-targets or --disable-targets was given.
1476if test "${enable_targets+set}" = set; then
1477 enableval="$enable_targets"
1478 case "${enableval}" in
1479 yes | "") { echo "configure: error: enable-targets option must specify target names or 'all'" 1>&2; exit 1; }
1480 ;;
1481 no) enable_targets= ;;
1482 *) enable_targets=$enableval ;;
1483esac
1484fi
1485# Check whether --enable-commonbfdlib or --disable-commonbfdlib was given.
1486if test "${enable_commonbfdlib+set}" = set; then
1487 enableval="$enable_commonbfdlib"
1488 case "${enableval}" in
1489 yes) commonbfdlib=true ;;
1490 no) commonbfdlib=false ;;
1491 *) { echo "configure: error: bad value ${enableval} for BFD commonbfdlib option" 1>&2; exit 1; } ;;
1492esac
1493fi
1494
1495# Generate a header file
b11fb939 1496
318b02b6 1497
318b02b6 1498
b11fb939 1499
e7757ad0 1500te_file=generic
b11fb939 1501
e7757ad0
KR
1502canon_targets=""
1503if test -n "$enable_targets" ; then
1504 for t in `echo $enable_targets | sed 's/,/ /g'`; do
ec2f730d 1505 result=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $t 2>/dev/null`
e7757ad0
KR
1506 if test -n "$result" ; then
1507 canon_targets="$canon_targets $result"
1508# else
1509# # Permit "all", etc. We don't support it yet though.
1510# canon_targets="$canon_targets $t"
1511 fi
1512 done
1513 _gas_uniq_list="$canon_targets"
1514_gas_uniq_newlist=""
1515for _gas_uniq_i in _gas_uniq_dummy $_gas_uniq_list ; do
1516 case $_gas_uniq_i in
1517 _gas_uniq_dummy) ;;
1518 *) case " $_gas_uniq_newlist " in
1519 *" $_gas_uniq_i "*) ;;
1520 *) _gas_uniq_newlist="$_gas_uniq_newlist $_gas_uniq_i" ;;
1521 esac ;;
1522 esac
1523done
1524canon_targets=$_gas_uniq_newlist
b11fb939 1525
e7757ad0 1526fi
b11fb939 1527
e7757ad0
KR
1528emulations=""
1529
1530for this_target in $target $canon_targets ; do
1531
64556643 1532 eval `echo $this_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/cpu=\1 vendor=\2 os=\3/'`
e7757ad0
KR
1533
1534 # check for architecture variants
2b09622a 1535 arch=
6ff87ead 1536 endian=
e7757ad0 1537 case ${cpu} in
0170f1c3 1538 alpha*) cpu_type=alpha ;;
ae09d880
ILT
1539 armeb) cpu_type=arm endian=big ;;
1540 arm*) cpu_type=arm endian=little ;;
76fb6d2f 1541 thumb*) cpu_type=arm endian=little ;;
e7757ad0 1542 hppa*) cpu_type=hppa ;;
7c2fadd1 1543 i[456]86) cpu_type=i386 ;;
e7757ad0
KR
1544 m680[012346]0) cpu_type=m68k ;;
1545 m68008) cpu_type=m68k ;;
1546 m683??) cpu_type=m68k ;;
921d7728 1547 m5200) cpu_type=m68k ;;
e7757ad0 1548 m8*) cpu_type=m88k ;;
e16b9537 1549 mips*el) cpu_type=mips endian=little ;;
01c655cc 1550# start-sanitize-r5900
ea1c39ce 1551 mips*5900*) cpu_type=mips endian=little ;;
01c655cc 1552# end-sanitize-r5900
e7757ad0
KR
1553 mips*) cpu_type=mips endian=big ;;
1554 powerpcle*) cpu_type=ppc endian=little ;;
1555 powerpc*) cpu_type=ppc endian=big ;;
1556 rs6000*) cpu_type=ppc ;;
2b09622a
DE
1557 sparclite*) cpu_type=sparc arch=sparclite ;;
1558 sparclet*) cpu_type=sparc arch=sparclet ;;
70ee7782 1559 sparc64*) cpu_type=sparc arch=v9-64 ;;
307edcc0 1560 sparc86x*) cpu_type=sparc arch=sparc86x ;;
2b09622a 1561 sparc*) cpu_type=sparc arch=sparclite ;; # ??? See tc-sparc.c.
756adc97 1562 v850*) cpu_type=v850 ;;
a1c7c0f3 1563 *) cpu_type=${cpu} ;;
e7757ad0
KR
1564 esac
1565
1566 if test ${this_target} = $target ; then
1567 target_cpu_type=${cpu_type}
6ff87ead
NC
1568 if test x${endian} = xbig; then
1569 cat >> confdefs.h <<\EOF
1570#define TARGET_BYTES_BIG_ENDIAN 1
1571EOF
1572
1573 elif test x${endian} = xlittle; then
1574 cat >> confdefs.h <<\EOF
1575#define TARGET_BYTES_BIG_ENDIAN 0
1576EOF
1577
1578 fi
e7757ad0
KR
1579 elif test ${target_cpu_type} != ${cpu_type} ; then
1580 continue
1581 fi
1582
e7757ad0
KR
1583 generic_target=${cpu_type}-$vendor-$os
1584 dev=no
1585 bfd_gas=no
1586 em=generic
1587
1588 # assign object format
1589 case ${generic_target} in
6ff87ead
NC
1590 a29k-*-coff) fmt=coff ;;
1591 a29k-amd-udi) fmt=coff ;;
1592 a29k-amd-ebmon) fmt=coff ;;
1593 a29k-nyu-sym1) fmt=coff ;;
e7757ad0
KR
1594 a29k-*-vxworks*) fmt=coff ;;
1595
0170f1c3
RH
1596 alpha*-*-*vms*) fmt=evax ;;
1597 alpha*-*-netware*) fmt=ecoff ;;
1598 alpha*-*-openbsd*) fmt=ecoff ;;
1599 alpha*-*-osf*) fmt=ecoff ;;
1600 alpha*-*-linuxecoff*) fmt=ecoff ;;
69d0b6d3
ILT
1601 alpha*-*-linux-gnu*) fmt=elf em=linux ;;
1602 alpha*-*-netbsd*) fmt=elf em=nbsd ;;
b11fb939 1603
e7757ad0 1604 arc-*-elf*) fmt=elf bfd_gas=yes ;;
4181c985 1605
6ff87ead
NC
1606 arm-*-riscix*) fmt=aout em=riscix ;;
1607 arm-*-aout) fmt=aout ;;
76fb6d2f 1608 arm-*-coff | thumb-*-coff) fmt=coff ;;
e7757ad0 1609 arm-*-riscix*) fmt=aout ;;
22d3fbd6 1610 arm-*-pe | thumb-*-pe) fmt=coff em=pe ;;
e7757ad0 1611
cbe7dccb 1612 d10v-*-*) fmt=elf bfd_gas=yes ;;
7d0f8249
MH
1613# start-sanitize-d30v
1614 d30v-*-*) fmt=elf bfd_gas=yes ;;
1615# end-sanitize-d30v
7be9a312 1616
e7757ad0
KR
1617 hppa-*-*elf*) fmt=elf em=hppa ;;
1618 hppa-*-lites*) fmt=elf em=hppa ;;
1619 hppa-*-osf*) fmt=som em=hppa ;;
332d5c49 1620 hppa-*-rtems*) fmt=elf em=hppa ;;
e7757ad0
KR
1621 hppa-*-hpux*) fmt=som em=hppa ;;
1622 hppa-*-bsd*) fmt=som em=hppa ;;
1623 hppa-*-hiux*) fmt=som em=hppa ;;
1624
1625 h8300-*-coff) fmt=coff ;;
1626
6ff87ead 1627 i386-ibm-aix*) fmt=coff em=i386aix ;;
7d0f8249 1628 i386-sequent-bsd*) fmt=aout em=dynix bfd_gas=yes ;;
e7757ad0
KR
1629 i386-*-bsd*) fmt=aout em=386bsd ;;
1630 i386-*-netbsd0.8) fmt=aout em=386bsd ;;
1631 i386-*-netbsd*) fmt=aout em=nbsd bfd_gas=yes;;
76fb6d2f 1632 i386-*-openbsd*) fmt=aout em=nbsd bfd_gas=yes;;
a1c7c0f3 1633 i386-*-linux*aout* | i386-*-linuxoldld) fmt=aout em=linux ;;
6ff87ead 1634 i386-*-linux*coff*) fmt=coff em=linux ;;
69d0b6d3 1635 i386-*-linux-gnu*) fmt=elf em=linux ;;
6ff87ead 1636 i386-*-lynxos*) fmt=coff em=lynx ;;
427a886a 1637 i386-*-sysv4* | i386-*-solaris* | i386-*-elf)
e7757ad0 1638 fmt=elf ;;
427a886a
ILT
1639 i386-*-freebsdelf*) fmt=elf ;;
1640 i386-*-freebsd*) fmt=aout em=386bsd ;;
6cc7a938
ILT
1641 i386-*-coff | i386-*-sysv* | i386-*-sco3.2v5*coff | i386-*-isc*)
1642 fmt=coff ;;
1643 i386-*-sco3.2v5*) fmt=elf
6ff87ead
NC
1644 if test ${this_target} = $target; then
1645 cat >> confdefs.h <<\EOF
1646#define SCO_ELF 1
1647EOF
1648
1649 fi
1650 ;;
6cc7a938 1651 i386-*-sco3.2*) fmt=coff ;;
e7757ad0 1652 i386-*-vsta) fmt=aout ;;
60dc9fb2 1653 i386-*-msdosdjgpp* | i386-*-go32* | i386-go32-rtems*)
6ff87ead
NC
1654 fmt=coff em=go32;;
1655 i386-*-rtems*) fmt=coff ;;
6c186c48
SC
1656 i386-*-gnu*) fmt=elf ;;
1657 i386-*-mach*)
e7757ad0
KR
1658 fmt=aout em=mach bfd_gas=yes ;;
1659 i386-*-msdos*) fmt=aout ;;
6c186c48 1660 i386-*-moss*) fmt=elf ;;
6ff87ead 1661 i386-*-pe) fmt=coff em=pe ;;
0040c1e9
ILT
1662 i386-*-cygwin32*) fmt=coff em=pe bfd_gas=yes ;;
1663 i386-*-mingw32*) fmt=coff em=pe bfd_gas=yes ;;
1664 i386-*-*nt*) fmt=coff em=pe ;;
e7757ad0 1665 i960-*-bout) fmt=bout ;;
6ff87ead
NC
1666 i960-*-coff) fmt=coff em=ic960 ;;
1667 i960-*-rtems*) fmt=coff em=ic960 ;;
e7757ad0
KR
1668 i960-*-nindy*) fmt=bout ;;
1669 i960-*-vxworks4*) fmt=bout ;;
1670 i960-*-vxworks5.0) fmt=bout ;;
6ff87ead 1671 i960-*-vxworks5.*) fmt=coff em=ic960 ;;
e7757ad0
KR
1672 i960-*-vxworks*) fmt=bout ;;
1673
374bdac7
DE
1674 m32r-*-*) fmt=elf bfd_gas=yes ;;
1675
e7757ad0
KR
1676 m68k-*-vxworks* | m68k-ericsson-ose | m68k-*-sunos*)
1677 fmt=aout em=sun3 ;;
6ff87ead
NC
1678 m68k-motorola-sysv*) fmt=coff em=delta ;;
1679 m68k-bull-sysv3*) fmt=coff em=dpx2 ;;
1680 m68k-apollo-*) fmt=coff em=apollo ;;
fee3e248
ILT
1681 m68k-*-sysv4*) # must be before -sysv*
1682 fmt=elf em=svr4 ;;
1683 m68k-*-elf*) fmt=elf ;;
7be9a312 1684 m68k-*-coff | m68k-*-sysv* | m68k-*-rtems*)
6ff87ead 1685 fmt=coff ;;
e7757ad0 1686 m68k-*-hpux*) fmt=hp300 em=hp300 ;;
535cfd0f 1687 m68k-*-linux*aout*) fmt=aout em=linux ;;
69d0b6d3 1688 m68k-*-linux-gnu*) fmt=elf em=linux ;;
6ff87ead 1689 m68k-*-lynxos*) fmt=coff em=lynx ;;
e7757ad0 1690 m68k-*-netbsd*) fmt=aout em=nbsd bfd_gas=yes ;;
76fb6d2f 1691 m68k-*-openbsd*) fmt=aout em=nbsd bfd_gas=yes ;;
6ff87ead 1692 m68k-apple-aux*) fmt=coff em=aux ;;
2b37714a 1693 m68k-*-psos*) fmt=elf em=psos;;
e7757ad0 1694
6ff87ead
NC
1695 m88k-motorola-sysv3*) fmt=coff em=delt88 ;;
1696 m88k-*-coff*) fmt=coff ;;
e7757ad0
KR
1697
1698 # don't change em like *-*-bsd does
6ff87ead
NC
1699 mips-dec-netbsd*) fmt=elf endian=little ;;
1700 mips-dec-openbsd*) fmt=elf endian=little ;;
1701 mips-dec-bsd*) fmt=aout ;;
1702 mips-sony-bsd*) fmt=ecoff ;;
e7757ad0 1703 mips-*-bsd*) { echo "configure: error: Unknown vendor for mips-bsd configuration." 1>&2; exit 1; } ;;
6ff87ead
NC
1704 mips-*-ultrix*) fmt=ecoff endian=little ;;
1705 mips-*-osf*) fmt=ecoff endian=little ;;
1706 mips-*-ecoff*) fmt=ecoff ;;
1707 mips-*-ecoff*) fmt=ecoff ;;
1708 mips-*-irix6*) fmt=elf ;;
1709 mips-*-irix5*) fmt=elf ;;
1710 mips-*-irix*) fmt=ecoff ;;
1711 mips-*-lnews*) fmt=ecoff em=lnews ;;
1712 mips-*-riscos*) fmt=ecoff ;;
1713 mips-*-sysv*) fmt=ecoff ;;
69d0b6d3 1714 mips-*-elf* | mips-*-rtems* | mips-*-linux-gnu* | mips-*-gnu* | mips-*-openbsd*)
6ff87ead 1715 fmt=elf ;;
ae1b99e4
JL
1716 mn10200-*-*) fmt=elf bfd_gas=yes ;;
1717 mn10300-*-*) fmt=elf bfd_gas=yes ;;
0ff513d9 1718 ppc-*-pe | ppc-*-cygwin32 | ppc-*-winnt*)
6ff87ead 1719 fmt=coff em=pe ;;
e7757ad0 1720 ppc-*-aix*) fmt=coff ;;
515c7142 1721 ppc-*-beos*) fmt=coff ;;
76fb6d2f 1722 ppc-*-*bsd* | ppc-*-elf* | ppc-*-eabi* | ppc-*-sysv4*)
6ff87ead 1723 fmt=elf ;;
69d0b6d3 1724 ppc-*-linux-gnu*) fmt=elf
159e6ef8 1725 case "$endian" in
6ff87ead 1726 big) ;;
69d0b6d3 1727 *) { echo "configure: error: GNU/Linux must be configured big endian" 1>&2; exit 1; } ;;
159e6ef8
MM
1728 esac
1729 ;;
1730 ppc-*-solaris*) fmt=elf
6ff87ead
NC
1731 if test ${this_target} = $target; then
1732 cat >> confdefs.h <<\EOF
1733#define TARGET_SOLARIS_COMMENT 1
1734EOF
1735
1736 fi
1737 if test x${endian} = xbig; then
1738 { echo "configure: error: Solaris must be configured little endian" 1>&2; exit 1; }
1739 fi
7be9a312 1740 ;;
6ff87ead 1741 ppc-*-rtems*) fmt=elf ;;
880b7429
KR
1742 ppc-*-macos* | ppc-*-mpw*)
1743 fmt=coff em=macos ;;
e7757ad0
KR
1744 ppc-*-netware*) fmt=elf em=ppcnw ;;
1745
df4021c1
DE
1746 sh-*-elf*) fmt=elf ;;
1747 sh-*-coff*) fmt=coff ;;
f3aa01e2 1748 sh-*-rtems*) fmt=coff ;;
b11fb939 1749
5f757edc
ILT
1750 ns32k-pc532-mach* | ns32k-pc532-ux*) fmt=aout em=pc532mach ;;
1751 ns32k-pc532-netbsd* | ns32k-pc532-lites*) fmt=aout em=nbsd532 ;;
76fb6d2f 1752 ns32k-pc532-openbsd*) fmt=aout em=nbsd532 ;;
e7757ad0 1753
7be9a312 1754 sparc-*-rtems*) fmt=aout ;;
e7757ad0 1755 sparc-*-sunos4*) fmt=aout em=sun3 ;;
df586de2 1756 sparc-*-aout | sparc*-*-vxworks*)
df4021c1 1757 fmt=aout em=sparcaout ;;
e7757ad0 1758 sparc-*-coff) fmt=coff ;;
2e013bb7 1759 sparc-*-linux*aout*) fmt=aout em=linux ;;
69d0b6d3 1760 sparc-*-linux-gnu*) fmt=elf em=linux ;;
e7757ad0
KR
1761 sparc-*-lynxos*) fmt=coff em=lynx ;;
1762 sparc-fujitsu-none) fmt=aout ;;
0b27ea39 1763 sparc-*-elf | sparc-*-sysv4* | sparc-*-solaris*)
e7757ad0
KR
1764 fmt=elf ;;
1765 sparc-*-netbsd*) fmt=aout em=nbsd bfd_gas=yes ;;
76fb6d2f 1766 sparc-*-openbsd*) fmt=aout em=nbsd bfd_gas=yes ;;
e7757ad0 1767
0e034c77
ILT
1768 tic30-*-*aout*) fmt=aout bfd_gas=yes ;;
1769 tic30-*-*coff*) fmt=coff bfd_gas=yes ;;
64556643 1770# start-sanitize-tic80
6ff87ead 1771 tic80-*-*) fmt=coff ;;
64556643 1772# end-sanitize-tic80
103dd764
DE
1773
1774# start-sanitize-sky
98b155a2 1775 dvp-*-*) fmt=elf bfd_gas=yes ;;
103dd764
DE
1776# end-sanitize-sky
1777
c6aa56bc 1778 v850-*-*) fmt=elf bfd_gas=yes ;;
53bdc990 1779
6ff87ead 1780# start-sanitize-v850e
53bdc990 1781 v850e-*-*) fmt=elf bfd_gas=yes ;;
60dc9fb2 1782 v850ea-*-*) fmt=elf bfd_gas=yes ;;
b5db0960 1783# end-sanitize-v850e
e7757ad0
KR
1784 vax-*-bsd* | vax-*-ultrix*)
1785 fmt=aout ;;
1786 vax-*-vms) fmt=vms ;;
1787
1788 z8k-*-coff | z8k-*-sim)
1789 fmt=coff ;;
1790
1791 w65-*-*) fmt=coff ;;
1792
1793 *-*-aout | *-*-scout)
1794 fmt=aout ;;
1795 *-*-nindy*)
1796 fmt=bout ;;
1797 *-*-bsd*)
1798 fmt=aout em=sun3 ;;
1799 *-*-generic) fmt=generic ;;
1800 *-*-xray | *-*-hms) fmt=coff ;;
1801 *-*-sim) fmt=coff ;;
1802 *-*-elf | *-*-sysv4* | *-*-solaris*)
6df07e7f 1803 echo "configure: warning: GAS support for ${generic_target} is incomplete." 1>&2
e7757ad0
KR
1804 fmt=elf dev=yes ;;
1805 *-*-vxworks) fmt=aout ;;
1806 *-*-netware) fmt=elf ;;
1807 esac
1808
1809 case ${cpu_type}-${fmt} in
ed1ed9f9 1810 alpha*-*) bfd_gas=yes ;;
e7757ad0
KR
1811 arm-*) bfd_gas=yes ;;
1812 # not yet
1813 # i386-aout) bfd_gas=preferred ;;
1814 mips-*) bfd_gas=yes ;;
1815 ns32k-*) bfd_gas=yes ;;
1816 ppc-*) bfd_gas=yes ;;
1817 sparc-*) bfd_gas=yes ;;
1818 *-elf) bfd_gas=yes ;;
1819 *-ecoff) bfd_gas=yes ;;
1820 *-som) bfd_gas=yes ;;
1821 *) ;;
1822 esac
1823
5f757edc
ILT
1824# Other random stuff.
1825
ae09d880
ILT
1826 # do we need the opcodes library?
1827 case ${cpu_type} in
0e034c77 1828 vax | i386 | tic30)
7c2fadd1
ILT
1829 ;;
1830 *)
1831 need_opcodes=yes
f2e272e0
ILT
1832
1833 case "${enable_shared}" in
1834 yes) shared_opcodes=true ;;
1835 *opcodes*) shared_opcodes=true ;;
1836 *) shared_opcodes=false ;;
1837 esac
159e6ef8 1838 if test "${shared_opcodes}" = "true"; then
7c2fadd1
ILT
1839 # A shared libopcodes must be linked against libbfd.
1840 need_bfd=yes
1841 fi
1842 ;;
ae09d880
ILT
1843 esac
1844
5f757edc 1845 case ${cpu_type} in
374bdac7
DE
1846 m32r)
1847 case ${extra_objects} in
1848 *cgen.o*) ;;
1849 *) extra_objects="$extra_objects cgen.o"
374bdac7
DE
1850 cat >> confdefs.h <<\EOF
1851#define USING_CGEN 1
1852EOF
1853
1854 ;;
1855 esac
1856 ;;
1857
1c9dbb83
ILT
1858 m68k)
1859 case ${extra_objects} in
1860 *m68k-parse.o*) ;;
1861 *) extra_objects="$extra_objects m68k-parse.o" ;;
1862 esac
1863 ;;
efec4a28
DP
1864
1865 mips)
1866 echo ${extra_objects} | grep -s "itbl-parse.o"
1867 if test $? -ne 0 ; then
515c7142 1868 extra_objects="$extra_objects itbl-parse.o"
efec4a28
DP
1869 fi
1870
1871 echo ${extra_objects} | grep -s "itbl-lex.o"
1872 if test $? -ne 0 ; then
515c7142 1873 extra_objects="$extra_objects itbl-lex.o"
efec4a28
DP
1874 fi
1875
1876 echo ${extra_objects} | grep -s "itbl-ops.o"
1877 if test $? -ne 0 ; then
515c7142 1878 extra_objects="$extra_objects itbl-ops.o"
efec4a28
DP
1879 fi
1880 ;;
1881
2b09622a 1882 sparc)
e01e18a8
DE
1883 if test $this_target = $target ; then
1884 cat >> confdefs.h <<EOF
2b09622a
DE
1885#define DEFAULT_ARCH "${arch}"
1886EOF
1887
e01e18a8 1888 fi
2b09622a
DE
1889 ;;
1890
efec4a28
DP
1891 *)
1892 ;;
5f757edc
ILT
1893 esac
1894
e7757ad0
KR
1895# See if we really can support this configuration with the emulation code.
1896
1897 if test $this_target = $target ; then
1898 primary_bfd_gas=$bfd_gas
1899 obj_format=$fmt
e7757ad0
KR
1900 te_file=$em
1901
1902 if test $bfd_gas = no ; then
1903 # Can't support other configurations this way.
1904 break
1905 fi
1906 elif test $bfd_gas = no ; then
1907 # Can't support this configuration.
1908 break
1909 fi
1910
1911# From target name and format, produce a list of supported emulations.
1912
1913 case ${generic_target}-${fmt} in
1cb0d00d 1914 mips-*-irix5*-*) emulation="mipsbelf mipslelf mipself mipsbecoff mipslecoff mipsecoff" ;;
69d0b6d3 1915 mips-*-linux-gnu*-*) case "$endian" in
515c7142
ILT
1916 big) emulation="mipsbelf mipslelf mipself mipsbecoff mipslecoff mipsecoff" ;;
1917 *) emulation="mipslelf mipsbelf mipself mipslecoff mipsbecoff mipsecoff" ;;
1918 esac ;;
1919 mips-*-lnews*-ecoff) ;;
e7757ad0 1920 mips-*-*-ecoff) case "$endian" in
1cb0d00d
KR
1921 big) emulation="mipsbecoff mipslecoff mipsecoff" ;;
1922 *) emulation="mipslecoff mipsbecoff mipsecoff" ;;
e7757ad0
KR
1923 esac ;;
1924 mips-*-*-elf) case "$endian" in
1cb0d00d
KR
1925 big) emulation="mipsbelf mipslelf mipself" ;;
1926 *) emulation="mipslelf mipsbelf mipself" ;;
515c7142
ILT
1927 # Uncommenting the next line will turn on support for i386 COFF
1928 # in any i386 ELF configuration. This probably doesn't work
1929 # correctly.
1930 # i386-*-*-elf) emulation="i386coff i386elf" ;;
e7757ad0
KR
1931 esac ;;
1932 esac
1933
1934 emulations="$emulations $emulation"
1935
e7757ad0 1936done
b11fb939
KR
1937
1938# Assign floating point type. Most processors with FP support
1939# IEEE FP. On those that don't support FP at all, usually IEEE
1940# is emulated.
1941case ${target_cpu} in
1942 vax | tahoe ) atof=${target_cpu} ;;
e7757ad0 1943 *) atof=ieee ;;
b11fb939
KR
1944esac
1945
1946case "${obj_format}" in
ba49e48d 1947 "") { echo "configure: error: GAS does not know what format to use for target ${target}" 1>&2; exit 1; } ;;
b11fb939
KR
1948esac
1949
1950
bf4bd1fc
ILT
1951if test ! -r ${srcdir}/config/tc-${target_cpu_type}.c; then
1952 { echo "configure: error: GAS does not support target CPU ${target_cpu_type}" 1>&2; exit 1; }
b11fb939
KR
1953fi
1954
fb589130 1955if test ! -r ${srcdir}/config/obj-${obj_format}.c; then
ba49e48d 1956 { echo "configure: error: GAS does not have support for object file format ${obj_format}" 1>&2; exit 1; }
b11fb939
KR
1957fi
1958
e7757ad0 1959case ${user_bfd_gas}-${primary_bfd_gas} in
b11fb939
KR
1960 yes-yes | no-no)
1961 # We didn't override user's choice.
1962 ;;
1963 no-yes)
1964 echo "configure: warning: Use of BFD is required for ${target}; overriding config options." 1>&2
1965 ;;
1966 no-preferred)
e7757ad0 1967 primary_bfd_gas=no
b11fb939
KR
1968 ;;
1969 *-preferred)
e7757ad0 1970 primary_bfd_gas=yes
b11fb939 1971 ;;
ba49e48d 1972 yes-*)
e7757ad0 1973 primary_bfd_gas=yes
ba49e48d 1974 ;;
b11fb939
KR
1975 -*)
1976 # User specified nothing.
1977 ;;
1978esac
1979
e7757ad0
KR
1980# Some COFF configurations want these random other flags set.
1981case ${obj_format} in
1982 coff)
1983 case ${target_cpu_type} in
1984 i386) cat >> confdefs.h <<\EOF
1985#define I386COFF 1
1986EOF
1987 ;;
1988 m68k) cat >> confdefs.h <<\EOF
1989#define M68KCOFF 1
1990EOF
1991 ;;
1992 m88k) cat >> confdefs.h <<\EOF
1993#define M88KCOFF 1
1994EOF
1995 ;;
1996 esac
1997 ;;
1998esac
1999
2000# Getting this done right is going to be a bitch. Each configuration specified
2001# with --enable-targets=... should be checked for environment, format, cpu, and
2002# bfd_gas setting.
2003#
2004# For each configuration, the necessary object file support code must be linked
2005# in. This might be only one, it might be up to four. The necessary emulation
2006# code needs to be provided, too.
2007#
2008# And then there's "--enable-targets=all"....
2009#
2010# For now, just always do it for MIPS ELF or ECOFF configurations. Sigh.
2011
2012formats="${obj_format}"
2013emfiles=""
2014EMULATIONS=""
2015_gas_uniq_list="$emulations"
2016_gas_uniq_newlist=""
2017for _gas_uniq_i in _gas_uniq_dummy $_gas_uniq_list ; do
2018 case $_gas_uniq_i in
2019 _gas_uniq_dummy) ;;
2020 *) case " $_gas_uniq_newlist " in
2021 *" $_gas_uniq_i "*) ;;
2022 *) _gas_uniq_newlist="$_gas_uniq_newlist $_gas_uniq_i" ;;
2023 esac ;;
2024 esac
2025done
2026emulations=$_gas_uniq_newlist
2027
2028for em in . $emulations ; do
2029 case $em in
2030 .) continue ;;
2031 mipsbelf | mipslelf)
2032 fmt=elf file=mipself ;;
2033 mipsbecoff | mipslecoff)
2034 fmt=ecoff file=mipsecoff ;;
515c7142
ILT
2035 i386coff)
2036 fmt=coff file=i386coff ;;
2037 i386elf)
2038 fmt=elf file=i386elf ;;
e7757ad0
KR
2039 esac
2040 formats="$formats $fmt"
2041 emfiles="$emfiles e-$file.o"
2042 EMULATIONS="$EMULATIONS &$em,"
2043done
2044_gas_uniq_list="$formats"
2045_gas_uniq_newlist=""
2046for _gas_uniq_i in _gas_uniq_dummy $_gas_uniq_list ; do
2047 case $_gas_uniq_i in
2048 _gas_uniq_dummy) ;;
2049 *) case " $_gas_uniq_newlist " in
2050 *" $_gas_uniq_i "*) ;;
2051 *) _gas_uniq_newlist="$_gas_uniq_newlist $_gas_uniq_i" ;;
2052 esac ;;
2053 esac
2054done
2055formats=$_gas_uniq_newlist
2056
2057_gas_uniq_list="$emfiles"
2058_gas_uniq_newlist=""
2059for _gas_uniq_i in _gas_uniq_dummy $_gas_uniq_list ; do
2060 case $_gas_uniq_i in
2061 _gas_uniq_dummy) ;;
2062 *) case " $_gas_uniq_newlist " in
2063 *" $_gas_uniq_i "*) ;;
2064 *) _gas_uniq_newlist="$_gas_uniq_newlist $_gas_uniq_i" ;;
2065 esac ;;
2066 esac
2067done
2068emfiles=$_gas_uniq_newlist
2069
2070if test `set . $formats ; shift ; echo $#` -gt 1 ; then
2071 for fmt in $formats ; do
2072 case $fmt in
2073 aout) cat >> confdefs.h <<\EOF
2074#define OBJ_MAYBE_AOUT 1
2075EOF
2076 ;;
2077 bout) cat >> confdefs.h <<\EOF
2078#define OBJ_MAYBE_BOUT 1
2079EOF
2080 ;;
2081 coff) cat >> confdefs.h <<\EOF
2082#define OBJ_MAYBE_COFF 1
2083EOF
2084 ;;
2085 ecoff) cat >> confdefs.h <<\EOF
2086#define OBJ_MAYBE_ECOFF 1
2087EOF
2088 ;;
2089 elf) cat >> confdefs.h <<\EOF
2090#define OBJ_MAYBE_ELF 1
2091EOF
2092 ;;
2093 generic) cat >> confdefs.h <<\EOF
2094#define OBJ_MAYBE_GENERIC 1
2095EOF
2096 ;;
2097 hp300) cat >> confdefs.h <<\EOF
2098#define OBJ_MAYBE_HP300 1
2099EOF
2100 ;;
2101 ieee) cat >> confdefs.h <<\EOF
2102#define OBJ_MAYBE_IEEE 1
2103EOF
2104 ;;
2105 som) cat >> confdefs.h <<\EOF
2106#define OBJ_MAYBE_SOM 1
2107EOF
2108 ;;
2109 vms) cat >> confdefs.h <<\EOF
2110#define OBJ_MAYBE_VMS 1
2111EOF
2112 ;;
2113 esac
2114 extra_objects="$extra_objects obj-$fmt.o"
2115 done
2116 obj_format=multi
2117fi
2118if test `set . $emfiles ; shift ; echo $#` -gt 0 ; then
2119 te_file=multi
2120 extra_objects="$extra_objects $emfiles"
2121 DEFAULT_EMULATION=`set . $emulations ; echo $2`
2122 cat >> confdefs.h <<\EOF
2123#define USE_EMULATIONS 1
2124EOF
2125
2126fi
2127
2128cat >> confdefs.h <<EOF
2129#define EMULATIONS $EMULATIONS
2130EOF
2131
2132cat >> confdefs.h <<EOF
2133#define DEFAULT_EMULATION "$DEFAULT_EMULATION"
2134EOF
2135
2136
bf4bd1fc 2137case ${primary_bfd_gas}-${target_cpu_type}-${obj_format} in
318b02b6
KR
2138 yes-*-coff) need_bfd=yes ;;
2139 no-*-coff) need_bfd=yes
2140 cat >> confdefs.h <<\EOF
2141#define MANY_SEGMENTS 1
2142EOF
2143 ;;
2144esac
2145
b11fb939
KR
2146reject_dev_configs=yes
2147
2148case ${reject_dev_configs}-${dev} in
2149 yes-yes) # Oops.
ba49e48d 2150 { echo "configure: error: GAS does not support the ${generic_target} configuration." 1>&2; exit 1; }
b11fb939
KR
2151 ;;
2152esac
2153
b11fb939
KR
2154
2155
833c46e1
KR
2156
2157
2158
e7757ad0 2159case "${primary_bfd_gas}" in
b11fb939
KR
2160 yes) cat >> confdefs.h <<\EOF
2161#define BFD_ASSEMBLER 1
2162EOF
2163
2164 need_bfd=yes ;;
2165esac
2166
ae09d880
ILT
2167# do we need the opcodes library?
2168case "${need_opcodes}" in
7be9a312 2169yes)
e2b4bd2a 2170 OPCODES_LIB=../opcodes/libopcodes.la
7be9a312 2171 ;;
ae09d880
ILT
2172esac
2173
b11fb939 2174case "${need_bfd}" in
7be9a312 2175yes)
e2b4bd2a 2176 BFDLIB=../bfd/libbfd.la
7be9a312 2177 ALL_OBJ_DEPS="$ALL_OBJ_DEPS ../bfd/bfd.h"
7be9a312 2178 ;;
b11fb939
KR
2179esac
2180
2181
2182
1c9dbb83 2183
2e013bb7
ILT
2184
2185
b11fb939
KR
2186cat >> confdefs.h <<EOF
2187#define TARGET_ALIAS "${target_alias}"
2188EOF
2189
2190cat >> confdefs.h <<EOF
2191#define TARGET_CANONICAL "${target}"
2192EOF
2193
2194cat >> confdefs.h <<EOF
2195#define TARGET_CPU "${target_cpu}"
2196EOF
2197
2198cat >> confdefs.h <<EOF
2199#define TARGET_VENDOR "${target_vendor}"
2200EOF
2201
2202cat >> confdefs.h <<EOF
2203#define TARGET_OS "${target_os}"
2204EOF
2205
2206
330add8a
ILT
2207# Extract the first word of "gcc", so it can be a program name with args.
2208set dummy gcc; ac_word=$2
2209echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
921d7728 2210echo "configure:2211: checking for $ac_word" >&5
330add8a
ILT
2211if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
2212 echo $ac_n "(cached) $ac_c" 1>&6
2213else
2214 if test -n "$CC"; then
2215 ac_cv_prog_CC="$CC" # Let the user override the test.
2216else
2217 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2218 for ac_dir in $PATH; do
2219 test -z "$ac_dir" && ac_dir=.
2220 if test -f $ac_dir/$ac_word; then
2221 ac_cv_prog_CC="gcc"
2222 break
2223 fi
2224 done
2225 IFS="$ac_save_ifs"
330add8a
ILT
2226fi
2227fi
2228CC="$ac_cv_prog_CC"
2229if test -n "$CC"; then
2230 echo "$ac_t""$CC" 1>&6
2231else
2232 echo "$ac_t""no" 1>&6
2233fi
2234
d0352cbb
DE
2235if test -z "$CC"; then
2236 # Extract the first word of "cc", so it can be a program name with args.
2237set dummy cc; ac_word=$2
2238echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
921d7728 2239echo "configure:2240: checking for $ac_word" >&5
d0352cbb
DE
2240if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
2241 echo $ac_n "(cached) $ac_c" 1>&6
2242else
2243 if test -n "$CC"; then
2244 ac_cv_prog_CC="$CC" # Let the user override the test.
2245else
2246 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2247 ac_prog_rejected=no
2248 for ac_dir in $PATH; do
2249 test -z "$ac_dir" && ac_dir=.
2250 if test -f $ac_dir/$ac_word; then
2251 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
2252 ac_prog_rejected=yes
2253 continue
2254 fi
2255 ac_cv_prog_CC="cc"
2256 break
2257 fi
2258 done
2259 IFS="$ac_save_ifs"
2260if test $ac_prog_rejected = yes; then
2261 # We found a bogon in the path, so make sure we never use it.
2262 set dummy $ac_cv_prog_CC
2263 shift
2264 if test $# -gt 0; then
2265 # We chose a different compiler from the bogus one.
2266 # However, it has the same basename, so the bogon will be chosen
2267 # first if we set CC to just the basename; use the full file name.
2268 shift
2269 set dummy "$ac_dir/$ac_word" "$@"
2270 shift
2271 ac_cv_prog_CC="$@"
2272 fi
2273fi
2274fi
2275fi
2276CC="$ac_cv_prog_CC"
2277if test -n "$CC"; then
2278 echo "$ac_t""$CC" 1>&6
2279else
2280 echo "$ac_t""no" 1>&6
2281fi
2282
2283 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
2284fi
b11fb939 2285
c6c7035c 2286echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
921d7728 2287echo "configure:2288: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
c6c7035c
MM
2288
2289ac_ext=c
2290# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2291ac_cpp='$CPP $CPPFLAGS'
2292ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2293ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2294cross_compiling=$ac_cv_prog_cc_cross
2295
2296cat > conftest.$ac_ext <<EOF
921d7728 2297#line 2298 "configure"
c6c7035c
MM
2298#include "confdefs.h"
2299main(){return(0);}
2300EOF
921d7728 2301if { (eval echo configure:2302: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
c6c7035c
MM
2302 ac_cv_prog_cc_works=yes
2303 # If we can't run a trivial program, we are probably using a cross compiler.
2304 if (./conftest; exit) 2>/dev/null; then
2305 ac_cv_prog_cc_cross=no
2306 else
2307 ac_cv_prog_cc_cross=yes
2308 fi
2309else
2310 echo "configure: failed program was:" >&5
2311 cat conftest.$ac_ext >&5
2312 ac_cv_prog_cc_works=no
2313fi
2314rm -fr conftest*
2315
2316echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
2317if test $ac_cv_prog_cc_works = no; then
2318 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
2319fi
2320echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
921d7728 2321echo "configure:2322: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
c6c7035c
MM
2322echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
2323cross_compiling=$ac_cv_prog_cc_cross
2324
330add8a 2325echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
921d7728 2326echo "configure:2327: checking whether we are using GNU C" >&5
330add8a
ILT
2327if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
2328 echo $ac_n "(cached) $ac_c" 1>&6
2329else
2330 cat > conftest.c <<EOF
b11fb939 2331#ifdef __GNUC__
330add8a 2332 yes;
b11fb939
KR
2333#endif
2334EOF
921d7728 2335if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2336: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
330add8a
ILT
2336 ac_cv_prog_gcc=yes
2337else
2338 ac_cv_prog_gcc=no
2339fi
2340fi
1c9dbb83 2341
330add8a 2342echo "$ac_t""$ac_cv_prog_gcc" 1>&6
c6c7035c 2343
330add8a 2344if test $ac_cv_prog_gcc = yes; then
b11fb939 2345 GCC=yes
c6c7035c
MM
2346 ac_test_CFLAGS="${CFLAGS+set}"
2347 ac_save_CFLAGS="$CFLAGS"
2348 CFLAGS=
2349 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
921d7728 2350echo "configure:2351: checking whether ${CC-cc} accepts -g" >&5
c6c7035c 2351if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
330add8a 2352 echo $ac_n "(cached) $ac_c" 1>&6
b11fb939 2353else
330add8a
ILT
2354 echo 'void f(){}' > conftest.c
2355if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
c6c7035c 2356 ac_cv_prog_cc_g=yes
330add8a 2357else
c6c7035c 2358 ac_cv_prog_cc_g=no
b11fb939
KR
2359fi
2360rm -f conftest*
2361
330add8a 2362fi
1c9dbb83 2363
c6c7035c
MM
2364echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
2365 if test "$ac_test_CFLAGS" = set; then
2366 CFLAGS="$ac_save_CFLAGS"
2367 elif test $ac_cv_prog_cc_g = yes; then
2368 CFLAGS="-g -O2"
2369 else
2370 CFLAGS="-O2"
330add8a
ILT
2371 fi
2372else
2373 GCC=
2374 test "${CFLAGS+set}" = set || CFLAGS="-g"
2375fi
2376
b11fb939 2377
e2b4bd2a
ILT
2378for ac_prog in 'bison -y' byacc
2379do
2380# Extract the first word of "$ac_prog", so it can be a program name with args.
2381set dummy $ac_prog; ac_word=$2
2382echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
921d7728 2383echo "configure:2384: checking for $ac_word" >&5
e2b4bd2a
ILT
2384if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then
2385 echo $ac_n "(cached) $ac_c" 1>&6
2386else
2387 if test -n "$YACC"; then
2388 ac_cv_prog_YACC="$YACC" # Let the user override the test.
2389else
2390 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2391 for ac_dir in $PATH; do
2392 test -z "$ac_dir" && ac_dir=.
2393 if test -f $ac_dir/$ac_word; then
2394 ac_cv_prog_YACC="$ac_prog"
2395 break
2396 fi
2397 done
2398 IFS="$ac_save_ifs"
2399fi
2400fi
2401YACC="$ac_cv_prog_YACC"
2402if test -n "$YACC"; then
2403 echo "$ac_t""$YACC" 1>&6
2404else
2405 echo "$ac_t""no" 1>&6
2406fi
2407
2408test -n "$YACC" && break
2409done
2410test -n "$YACC" || YACC="yacc"
2411
b2bb41f6 2412echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
921d7728 2413echo "configure:2414: checking how to run the C preprocessor" >&5
b2bb41f6
ILT
2414# On Suns, sometimes $CPP names a directory.
2415if test -n "$CPP" && test -d "$CPP"; then
2416 CPP=
2417fi
2418if test -z "$CPP"; then
2419if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
2420 echo $ac_n "(cached) $ac_c" 1>&6
2421else
2422 # This must be in double quotes, not single quotes, because CPP may get
2423 # substituted into the Makefile and "${CC-cc}" will confuse make.
2424 CPP="${CC-cc} -E"
2425 # On the NeXT, cc -E runs the code through the compiler's parser,
2426 # not just through cpp.
2427 cat > conftest.$ac_ext <<EOF
921d7728 2428#line 2429 "configure"
b2bb41f6
ILT
2429#include "confdefs.h"
2430#include <assert.h>
2431Syntax Error
2432EOF
2433ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
921d7728 2434{ (eval echo configure:2435: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
b2bb41f6
ILT
2435ac_err=`grep -v '^ *+' conftest.out`
2436if test -z "$ac_err"; then
2437 :
2438else
2439 echo "$ac_err" >&5
2440 echo "configure: failed program was:" >&5
2441 cat conftest.$ac_ext >&5
2442 rm -rf conftest*
2443 CPP="${CC-cc} -E -traditional-cpp"
2444 cat > conftest.$ac_ext <<EOF
921d7728 2445#line 2446 "configure"
b2bb41f6
ILT
2446#include "confdefs.h"
2447#include <assert.h>
2448Syntax Error
2449EOF
2450ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
921d7728 2451{ (eval echo configure:2452: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
b2bb41f6
ILT
2452ac_err=`grep -v '^ *+' conftest.out`
2453if test -z "$ac_err"; then
2454 :
2455else
2456 echo "$ac_err" >&5
2457 echo "configure: failed program was:" >&5
2458 cat conftest.$ac_ext >&5
2459 rm -rf conftest*
2460 CPP=/lib/cpp
2461fi
2462rm -f conftest*
2463fi
2464rm -f conftest*
2465 ac_cv_prog_CPP="$CPP"
2466fi
2467 CPP="$ac_cv_prog_CPP"
2468else
2469 ac_cv_prog_CPP="$CPP"
2470fi
2471echo "$ac_t""$CPP" 1>&6
2472
2473missing_dir=`cd $ac_aux_dir && pwd`
2474for ac_prog in flex lex
2475do
2476# Extract the first word of "$ac_prog", so it can be a program name with args.
2477set dummy $ac_prog; ac_word=$2
2478echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
921d7728 2479echo "configure:2480: checking for $ac_word" >&5
b2bb41f6
ILT
2480if eval "test \"`echo '$''{'ac_cv_prog_LEX'+set}'`\" = set"; then
2481 echo $ac_n "(cached) $ac_c" 1>&6
2482else
2483 if test -n "$LEX"; then
2484 ac_cv_prog_LEX="$LEX" # Let the user override the test.
2485else
2486 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2487 for ac_dir in $PATH; do
2488 test -z "$ac_dir" && ac_dir=.
2489 if test -f $ac_dir/$ac_word; then
2490 ac_cv_prog_LEX="$ac_prog"
2491 break
2492 fi
2493 done
2494 IFS="$ac_save_ifs"
2495fi
2496fi
2497LEX="$ac_cv_prog_LEX"
2498if test -n "$LEX"; then
2499 echo "$ac_t""$LEX" 1>&6
2500else
2501 echo "$ac_t""no" 1>&6
2502fi
2503
2504test -n "$LEX" && break
2505done
2506test -n "$LEX" || LEX=""$missing_dir/missing flex""
2507
e2b4bd2a
ILT
2508# Extract the first word of "flex", so it can be a program name with args.
2509set dummy flex; ac_word=$2
2510echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
921d7728 2511echo "configure:2512: checking for $ac_word" >&5
e2b4bd2a
ILT
2512if eval "test \"`echo '$''{'ac_cv_prog_LEX'+set}'`\" = set"; then
2513 echo $ac_n "(cached) $ac_c" 1>&6
2514else
2515 if test -n "$LEX"; then
2516 ac_cv_prog_LEX="$LEX" # Let the user override the test.
2517else
2518 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2519 for ac_dir in $PATH; do
2520 test -z "$ac_dir" && ac_dir=.
2521 if test -f $ac_dir/$ac_word; then
2522 ac_cv_prog_LEX="flex"
2523 break
2524 fi
2525 done
2526 IFS="$ac_save_ifs"
2527 test -z "$ac_cv_prog_LEX" && ac_cv_prog_LEX="lex"
2528fi
2529fi
2530LEX="$ac_cv_prog_LEX"
2531if test -n "$LEX"; then
2532 echo "$ac_t""$LEX" 1>&6
2533else
2534 echo "$ac_t""no" 1>&6
2535fi
2536
2537if test -z "$LEXLIB"
2538then
2539 case "$LEX" in
2540 flex*) ac_lib=fl ;;
2541 *) ac_lib=l ;;
2542 esac
2543 echo $ac_n "checking for yywrap in -l$ac_lib""... $ac_c" 1>&6
921d7728 2544echo "configure:2545: checking for yywrap in -l$ac_lib" >&5
e2b4bd2a
ILT
2545ac_lib_var=`echo $ac_lib'_'yywrap | sed 'y%./+-%__p_%'`
2546if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2547 echo $ac_n "(cached) $ac_c" 1>&6
2548else
2549 ac_save_LIBS="$LIBS"
2550LIBS="-l$ac_lib $LIBS"
2551cat > conftest.$ac_ext <<EOF
921d7728 2552#line 2553 "configure"
e2b4bd2a
ILT
2553#include "confdefs.h"
2554/* Override any gcc2 internal prototype to avoid an error. */
2555/* We use char because int might match the return type of a gcc2
2556 builtin and then its argument prototype would still apply. */
2557char yywrap();
2558
2559int main() {
2560yywrap()
2561; return 0; }
2562EOF
921d7728 2563if { (eval echo configure:2564: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
e2b4bd2a
ILT
2564 rm -rf conftest*
2565 eval "ac_cv_lib_$ac_lib_var=yes"
2566else
2567 echo "configure: failed program was:" >&5
2568 cat conftest.$ac_ext >&5
2569 rm -rf conftest*
2570 eval "ac_cv_lib_$ac_lib_var=no"
2571fi
2572rm -f conftest*
2573LIBS="$ac_save_LIBS"
2574
2575fi
2576if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2577 echo "$ac_t""yes" 1>&6
2578 LEXLIB="-l$ac_lib"
2579else
2580 echo "$ac_t""no" 1>&6
2581fi
2582
2583fi
2584
e2b4bd2a 2585echo $ac_n "checking lex output file root""... $ac_c" 1>&6
921d7728 2586echo "configure:2587: checking lex output file root" >&5
e2b4bd2a 2587if eval "test \"`echo '$''{'ac_cv_prog_lex_root'+set}'`\" = set"; then
833c46e1 2588 echo $ac_n "(cached) $ac_c" 1>&6
b11fb939 2589else
e2b4bd2a
ILT
2590 # The minimal lex program is just a single line: %%. But some broken lexes
2591# (Solaris, I think it was) want two %% lines, so accommodate them.
2592echo '%%
2593%%' | $LEX
2594if test -f lex.yy.c; then
2595 ac_cv_prog_lex_root=lex.yy
2596elif test -f lexyy.c; then
2597 ac_cv_prog_lex_root=lexyy
2598else
2599 { echo "configure: error: cannot find output from $LEX; giving up" 1>&2; exit 1; }
2600fi
2601fi
2602
2603echo "$ac_t""$ac_cv_prog_lex_root" 1>&6
2604LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root
2605
2606echo $ac_n "checking whether yytext is a pointer""... $ac_c" 1>&6
921d7728 2607echo "configure:2608: checking whether yytext is a pointer" >&5
e2b4bd2a
ILT
2608if eval "test \"`echo '$''{'ac_cv_prog_lex_yytext_pointer'+set}'`\" = set"; then
2609 echo $ac_n "(cached) $ac_c" 1>&6
2610else
2611 # POSIX says lex can declare yytext either as a pointer or an array; the
2612# default is implementation-dependent. Figure out which it is, since
2613# not all implementations provide the %pointer and %array declarations.
2614ac_cv_prog_lex_yytext_pointer=no
2615echo 'extern char *yytext;' >>$LEX_OUTPUT_ROOT.c
2616ac_save_LIBS="$LIBS"
2617LIBS="$LIBS $LEXLIB"
2618cat > conftest.$ac_ext <<EOF
921d7728 2619#line 2620 "configure"
b11fb939 2620#include "confdefs.h"
e2b4bd2a
ILT
2621`cat $LEX_OUTPUT_ROOT.c`
2622int main() {
2623
2624; return 0; }
b11fb939 2625EOF
921d7728 2626if { (eval echo configure:2627: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
b11fb939 2627 rm -rf conftest*
e2b4bd2a 2628 ac_cv_prog_lex_yytext_pointer=yes
b11fb939 2629else
c6c7035c
MM
2630 echo "configure: failed program was:" >&5
2631 cat conftest.$ac_ext >&5
b11fb939
KR
2632fi
2633rm -f conftest*
e2b4bd2a
ILT
2634LIBS="$ac_save_LIBS"
2635rm -f "${LEX_OUTPUT_ROOT}.c"
2636
b11fb939 2637fi
e2b4bd2a
ILT
2638
2639echo "$ac_t""$ac_cv_prog_lex_yytext_pointer" 1>&6
2640if test $ac_cv_prog_lex_yytext_pointer = yes; then
2641 cat >> confdefs.h <<\EOF
2642#define YYTEXT_POINTER 1
b11fb939 2643EOF
e2b4bd2a 2644
b11fb939 2645fi
b11fb939 2646
b11fb939 2647
48401fcf
TT
2648ALL_LINGUAS=
2649echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
921d7728 2650echo "configure:2651: checking for POSIXized ISC" >&5
48401fcf
TT
2651if test -d /etc/conf/kconfig.d &&
2652 grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
2653then
2654 echo "$ac_t""yes" 1>&6
2655 ISC=yes # If later tests want to check for ISC.
2656 cat >> confdefs.h <<\EOF
2657#define _POSIX_SOURCE 1
2658EOF
bf111c9f 2659
48401fcf
TT
2660 if test "$GCC" = yes; then
2661 CC="$CC -posix"
e2b4bd2a 2662 else
48401fcf 2663 CC="$CC -Xp"
e2b4bd2a 2664 fi
48401fcf
TT
2665else
2666 echo "$ac_t""no" 1>&6
2667 ISC=
2668fi
e2b4bd2a 2669
48401fcf 2670echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
921d7728 2671echo "configure:2672: checking for ANSI C header files" >&5
48401fcf 2672if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
e42b2520
RS
2673 echo $ac_n "(cached) $ac_c" 1>&6
2674else
2675 cat > conftest.$ac_ext <<EOF
921d7728 2676#line 2677 "configure"
e42b2520 2677#include "confdefs.h"
48401fcf
TT
2678#include <stdlib.h>
2679#include <stdarg.h>
2680#include <string.h>
2681#include <float.h>
e42b2520 2682EOF
48401fcf 2683ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
921d7728 2684{ (eval echo configure:2685: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
48401fcf
TT
2685ac_err=`grep -v '^ *+' conftest.out`
2686if test -z "$ac_err"; then
e42b2520 2687 rm -rf conftest*
48401fcf 2688 ac_cv_header_stdc=yes
e42b2520 2689else
48401fcf 2690 echo "$ac_err" >&5
e42b2520
RS
2691 echo "configure: failed program was:" >&5
2692 cat conftest.$ac_ext >&5
2693 rm -rf conftest*
48401fcf 2694 ac_cv_header_stdc=no
e42b2520
RS
2695fi
2696rm -f conftest*
48401fcf
TT
2697
2698if test $ac_cv_header_stdc = yes; then
2699 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
2700cat > conftest.$ac_ext <<EOF
921d7728 2701#line 2702 "configure"
48401fcf
TT
2702#include "confdefs.h"
2703#include <string.h>
2704EOF
2705if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2706 egrep "memchr" >/dev/null 2>&1; then
2707 :
2708else
2709 rm -rf conftest*
2710 ac_cv_header_stdc=no
2711fi
e42b2520 2712rm -f conftest*
48401fcf 2713
e42b2520
RS
2714fi
2715
48401fcf
TT
2716if test $ac_cv_header_stdc = yes; then
2717 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
2718cat > conftest.$ac_ext <<EOF
921d7728 2719#line 2720 "configure"
48401fcf
TT
2720#include "confdefs.h"
2721#include <stdlib.h>
2722EOF
2723if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2724 egrep "free" >/dev/null 2>&1; then
2725 :
2726else
2727 rm -rf conftest*
2728 ac_cv_header_stdc=no
2729fi
2730rm -f conftest*
2731
2732fi
2733
2734if test $ac_cv_header_stdc = yes; then
2735 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
2736if test "$cross_compiling" = yes; then
2737 :
2738else
2739 cat > conftest.$ac_ext <<EOF
921d7728 2740#line 2741 "configure"
48401fcf
TT
2741#include "confdefs.h"
2742#include <ctype.h>
2743#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
2744#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
2745#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
2746int main () { int i; for (i = 0; i < 256; i++)
2747if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
2748exit (0); }
2749
2750EOF
921d7728 2751if { (eval echo configure:2752: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
48401fcf
TT
2752then
2753 :
2754else
2755 echo "configure: failed program was:" >&5
2756 cat conftest.$ac_ext >&5
2757 rm -fr conftest*
2758 ac_cv_header_stdc=no
2759fi
2760rm -fr conftest*
2761fi
2762
2763fi
2764fi
2765
2766echo "$ac_t""$ac_cv_header_stdc" 1>&6
2767if test $ac_cv_header_stdc = yes; then
2768 cat >> confdefs.h <<\EOF
2769#define STDC_HEADERS 1
2770EOF
2771
2772fi
2773
2774echo $ac_n "checking for working const""... $ac_c" 1>&6
921d7728 2775echo "configure:2776: checking for working const" >&5
48401fcf 2776if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
6cc7a938
ILT
2777 echo $ac_n "(cached) $ac_c" 1>&6
2778else
2779 cat > conftest.$ac_ext <<EOF
921d7728 2780#line 2781 "configure"
6cc7a938
ILT
2781#include "confdefs.h"
2782
2783int main() {
48401fcf
TT
2784
2785/* Ultrix mips cc rejects this. */
2786typedef int charset[2]; const charset x;
2787/* SunOS 4.1.1 cc rejects this. */
2788char const *const *ccp;
2789char **p;
2790/* NEC SVR4.0.2 mips cc rejects this. */
2791struct point {int x, y;};
2792static struct point const zero = {0,0};
2793/* AIX XL C 1.02.0.0 rejects this.
2794 It does not let you subtract one const X* pointer from another in an arm
2795 of an if-expression whose if-part is not a constant expression */
2796const char *g = "string";
2797ccp = &g + (g ? g-g : 0);
2798/* HPUX 7.0 cc rejects these. */
2799++ccp;
2800p = (char**) ccp;
2801ccp = (char const *const *) p;
2802{ /* SCO 3.2v4 cc rejects this. */
2803 char *t;
2804 char const *s = 0 ? (char *) 0 : (char const *) 0;
2805
2806 *t++ = 0;
2807}
2808{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
2809 int x[] = {25, 17};
2810 const int *foo = &x[0];
2811 ++foo;
2812}
2813{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
2814 typedef const int *iptr;
2815 iptr p = 0;
2816 ++p;
2817}
2818{ /* AIX XL C 1.02.0.0 rejects this saying
2819 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
2820 struct s { int j; const int *ap[3]; };
2821 struct s *b; b->j = 5;
2822}
2823{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
2824 const int foo = 10;
2825}
2826
6cc7a938
ILT
2827; return 0; }
2828EOF
921d7728 2829if { (eval echo configure:2830: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6cc7a938 2830 rm -rf conftest*
48401fcf 2831 ac_cv_c_const=yes
6cc7a938
ILT
2832else
2833 echo "configure: failed program was:" >&5
2834 cat conftest.$ac_ext >&5
2835 rm -rf conftest*
48401fcf 2836 ac_cv_c_const=no
6cc7a938
ILT
2837fi
2838rm -f conftest*
6cc7a938
ILT
2839fi
2840
48401fcf
TT
2841echo "$ac_t""$ac_cv_c_const" 1>&6
2842if test $ac_cv_c_const = no; then
2843 cat >> confdefs.h <<\EOF
2844#define const
2845EOF
6cc7a938 2846
48401fcf 2847fi
e2b4bd2a 2848
48401fcf 2849echo $ac_n "checking for inline""... $ac_c" 1>&6
921d7728 2850echo "configure:2851: checking for inline" >&5
48401fcf 2851if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
e42b2520
RS
2852 echo $ac_n "(cached) $ac_c" 1>&6
2853else
48401fcf
TT
2854 ac_cv_c_inline=no
2855for ac_kw in inline __inline__ __inline; do
2856 cat > conftest.$ac_ext <<EOF
921d7728 2857#line 2858 "configure"
48401fcf
TT
2858#include "confdefs.h"
2859
e42b2520 2860int main() {
48401fcf
TT
2861} $ac_kw foo() {
2862; return 0; }
e42b2520 2863EOF
921d7728 2864if { (eval echo configure:2865: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
48401fcf
TT
2865 rm -rf conftest*
2866 ac_cv_c_inline=$ac_kw; break
2867else
2868 echo "configure: failed program was:" >&5
2869 cat conftest.$ac_ext >&5
e42b2520 2870fi
48401fcf
TT
2871rm -f conftest*
2872done
e42b2520 2873
e42b2520 2874fi
e42b2520 2875
48401fcf
TT
2876echo "$ac_t""$ac_cv_c_inline" 1>&6
2877case "$ac_cv_c_inline" in
2878 inline | yes) ;;
2879 no) cat >> confdefs.h <<\EOF
2880#define inline
2881EOF
2882 ;;
2883 *) cat >> confdefs.h <<EOF
2884#define inline $ac_cv_c_inline
2885EOF
2886 ;;
2887esac
e42b2520 2888
48401fcf 2889echo $ac_n "checking for off_t""... $ac_c" 1>&6
921d7728 2890echo "configure:2891: checking for off_t" >&5
48401fcf 2891if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
e2b4bd2a
ILT
2892 echo $ac_n "(cached) $ac_c" 1>&6
2893else
2894 cat > conftest.$ac_ext <<EOF
921d7728 2895#line 2896 "configure"
e2b4bd2a 2896#include "confdefs.h"
48401fcf
TT
2897#include <sys/types.h>
2898#if STDC_HEADERS
2899#include <stdlib.h>
2900#include <stddef.h>
2901#endif
e2b4bd2a 2902EOF
48401fcf
TT
2903if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2904 egrep "off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
e2b4bd2a 2905 rm -rf conftest*
48401fcf 2906 ac_cv_type_off_t=yes
e2b4bd2a 2907else
e2b4bd2a 2908 rm -rf conftest*
48401fcf 2909 ac_cv_type_off_t=no
e2b4bd2a
ILT
2910fi
2911rm -f conftest*
48401fcf 2912
e2b4bd2a 2913fi
48401fcf
TT
2914echo "$ac_t""$ac_cv_type_off_t" 1>&6
2915if test $ac_cv_type_off_t = no; then
2916 cat >> confdefs.h <<\EOF
2917#define off_t long
e2b4bd2a 2918EOF
e2b4bd2a 2919
48401fcf 2920fi
e2b4bd2a 2921
48401fcf 2922echo $ac_n "checking for size_t""... $ac_c" 1>&6
921d7728 2923echo "configure:2924: checking for size_t" >&5
48401fcf
TT
2924if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
2925 echo $ac_n "(cached) $ac_c" 1>&6
e2b4bd2a 2926else
48401fcf 2927 cat > conftest.$ac_ext <<EOF
921d7728 2928#line 2929 "configure"
48401fcf
TT
2929#include "confdefs.h"
2930#include <sys/types.h>
2931#if STDC_HEADERS
2932#include <stdlib.h>
2933#include <stddef.h>
2934#endif
2935EOF
2936if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2937 egrep "size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
2938 rm -rf conftest*
2939 ac_cv_type_size_t=yes
2940else
2941 rm -rf conftest*
2942 ac_cv_type_size_t=no
2943fi
2944rm -f conftest*
2945
2946fi
2947echo "$ac_t""$ac_cv_type_size_t" 1>&6
2948if test $ac_cv_type_size_t = no; then
e2b4bd2a 2949 cat >> confdefs.h <<\EOF
48401fcf 2950#define size_t unsigned
e2b4bd2a
ILT
2951EOF
2952
2953fi
e2b4bd2a 2954
b11fb939
KR
2955# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
2956# for constant arguments. Useless!
833c46e1 2957echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
921d7728 2958echo "configure:2959: checking for working alloca.h" >&5
833c46e1
KR
2959if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
2960 echo $ac_n "(cached) $ac_c" 1>&6
b11fb939 2961else
28d3e4a3 2962 cat > conftest.$ac_ext <<EOF
921d7728 2963#line 2964 "configure"
b11fb939
KR
2964#include "confdefs.h"
2965#include <alloca.h>
c6c7035c 2966int main() {
b11fb939
KR
2967char *p = alloca(2 * sizeof(int));
2968; return 0; }
2969EOF
921d7728 2970if { (eval echo configure:2971: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
b11fb939
KR
2971 rm -rf conftest*
2972 ac_cv_header_alloca_h=yes
2973else
c6c7035c
MM
2974 echo "configure: failed program was:" >&5
2975 cat conftest.$ac_ext >&5
b11fb939
KR
2976 rm -rf conftest*
2977 ac_cv_header_alloca_h=no
2978fi
2979rm -f conftest*
b11fb939 2980fi
1c9dbb83 2981
833c46e1 2982echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
b11fb939
KR
2983if test $ac_cv_header_alloca_h = yes; then
2984 cat >> confdefs.h <<\EOF
2985#define HAVE_ALLOCA_H 1
2986EOF
2987
2988fi
2989
833c46e1 2990echo $ac_n "checking for alloca""... $ac_c" 1>&6
921d7728 2991echo "configure:2992: checking for alloca" >&5
c6c7035c 2992if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
833c46e1 2993 echo $ac_n "(cached) $ac_c" 1>&6
b11fb939 2994else
28d3e4a3 2995 cat > conftest.$ac_ext <<EOF
921d7728 2996#line 2997 "configure"
b11fb939
KR
2997#include "confdefs.h"
2998
2999#ifdef __GNUC__
3000# define alloca __builtin_alloca
3001#else
3002# if HAVE_ALLOCA_H
3003# include <alloca.h>
3004# else
3005# ifdef _AIX
3006 #pragma alloca
3007# else
3008# ifndef alloca /* predefined by HP cc +Olibcalls */
3009char *alloca ();
3010# endif
3011# endif
3012# endif
3013#endif
3014
c6c7035c 3015int main() {
b11fb939
KR
3016char *p = (char *) alloca(1);
3017; return 0; }
3018EOF
921d7728 3019if { (eval echo configure:3020: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
b11fb939 3020 rm -rf conftest*
c6c7035c 3021 ac_cv_func_alloca_works=yes
b11fb939 3022else
c6c7035c
MM
3023 echo "configure: failed program was:" >&5
3024 cat conftest.$ac_ext >&5
b11fb939 3025 rm -rf conftest*
c6c7035c 3026 ac_cv_func_alloca_works=no
b11fb939
KR
3027fi
3028rm -f conftest*
b11fb939 3029fi
1c9dbb83 3030
c6c7035c
MM
3031echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
3032if test $ac_cv_func_alloca_works = yes; then
b11fb939
KR
3033 cat >> confdefs.h <<\EOF
3034#define HAVE_ALLOCA 1
3035EOF
3036
3037fi
3038
c6c7035c 3039if test $ac_cv_func_alloca_works = no; then
b11fb939
KR
3040 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
3041 # that cause trouble. Some versions do not even contain alloca or
3042 # contain a buggy version. If you still want to use their alloca,
3043 # use ar to extract alloca.o from them instead of compiling alloca.c.
3044 ALLOCA=alloca.o
3045 cat >> confdefs.h <<\EOF
3046#define C_ALLOCA 1
3047EOF
3048
3049
833c46e1 3050echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
921d7728 3051echo "configure:3052: checking whether alloca needs Cray hooks" >&5
833c46e1
KR
3052if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
3053 echo $ac_n "(cached) $ac_c" 1>&6
b11fb939 3054else
28d3e4a3 3055 cat > conftest.$ac_ext <<EOF
921d7728 3056#line 3057 "configure"
b11fb939
KR
3057#include "confdefs.h"
3058#if defined(CRAY) && ! defined(CRAY2)
3059webecray
3060#else
3061wenotbecray
3062#endif
3063
3064EOF
28d3e4a3 3065if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
fb589130 3066 egrep "webecray" >/dev/null 2>&1; then
b11fb939
KR
3067 rm -rf conftest*
3068 ac_cv_os_cray=yes
3069else
3070 rm -rf conftest*
3071 ac_cv_os_cray=no
3072fi
3073rm -f conftest*
3074
3075fi
1c9dbb83 3076
833c46e1 3077echo "$ac_t""$ac_cv_os_cray" 1>&6
b11fb939 3078if test $ac_cv_os_cray = yes; then
833c46e1
KR
3079for ac_func in _getb67 GETB67 getb67; do
3080 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
921d7728 3081echo "configure:3082: checking for $ac_func" >&5
833c46e1
KR
3082if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3083 echo $ac_n "(cached) $ac_c" 1>&6
b11fb939 3084else
28d3e4a3 3085 cat > conftest.$ac_ext <<EOF
921d7728 3086#line 3087 "configure"
b11fb939 3087#include "confdefs.h"
833c46e1
KR
3088/* System header to define __stub macros and hopefully few prototypes,
3089 which can conflict with char $ac_func(); below. */
3090#include <assert.h>
f1698cb7 3091/* Override any gcc2 internal prototype to avoid an error. */
df586de2
ILT
3092/* We use char because int might match the return type of a gcc2
3093 builtin and then its argument prototype would still apply. */
1c9dbb83 3094char $ac_func();
f1698cb7 3095
c6c7035c 3096int main() {
b11fb939
KR
3097
3098/* The GNU C library defines this for functions which it implements
3099 to always fail with ENOSYS. Some functions are actually named
3100 something starting with __ and the normal name is an alias. */
833c46e1 3101#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
b11fb939
KR
3102choke me
3103#else
833c46e1 3104$ac_func();
b11fb939
KR
3105#endif
3106
3107; return 0; }
3108EOF
921d7728 3109if { (eval echo configure:3110: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
b11fb939 3110 rm -rf conftest*
833c46e1 3111 eval "ac_cv_func_$ac_func=yes"
b11fb939 3112else
c6c7035c
MM
3113 echo "configure: failed program was:" >&5
3114 cat conftest.$ac_ext >&5
b11fb939 3115 rm -rf conftest*
833c46e1 3116 eval "ac_cv_func_$ac_func=no"
b11fb939
KR
3117fi
3118rm -f conftest*
7d0f8249 3119fi
c6c7035c 3120
833c46e1
KR
3121if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3122 echo "$ac_t""yes" 1>&6
3123 cat >> confdefs.h <<EOF
3124#define CRAY_STACKSEG_END $ac_func
b11fb939
KR
3125EOF
3126
833c46e1 3127 break
b11fb939 3128else
833c46e1 3129 echo "$ac_t""no" 1>&6
b11fb939
KR
3130fi
3131
833c46e1 3132done
b11fb939
KR
3133fi
3134
833c46e1 3135echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
921d7728 3136echo "configure:3137: checking stack direction for C alloca" >&5
833c46e1
KR
3137if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
3138 echo $ac_n "(cached) $ac_c" 1>&6
b11fb939
KR
3139else
3140 if test "$cross_compiling" = yes; then
bf111c9f 3141 ac_cv_c_stack_direction=0
b11fb939 3142else
c6c7035c 3143 cat > conftest.$ac_ext <<EOF
921d7728 3144#line 3145 "configure"
b11fb939
KR
3145#include "confdefs.h"
3146find_stack_direction ()
3147{
3148 static char *addr = 0;
3149 auto char dummy;
3150 if (addr == 0)
3151 {
3152 addr = &dummy;
3153 return find_stack_direction ();
3154 }
3155 else
3156 return (&dummy > addr) ? 1 : -1;
3157}
3158main ()
3159{
3160 exit (find_stack_direction() < 0);
3161}
3162EOF
921d7728 3163if { (eval echo configure:3164: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
c6c7035c 3164then
b11fb939
KR
3165 ac_cv_c_stack_direction=1
3166else
c6c7035c
MM
3167 echo "configure: failed program was:" >&5
3168 cat conftest.$ac_ext >&5
3169 rm -fr conftest*
b11fb939
KR
3170 ac_cv_c_stack_direction=-1
3171fi
7d0f8249 3172rm -fr conftest*
64556643
FF
3173fi
3174
c6c7035c
MM
3175fi
3176
833c46e1 3177echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
b11fb939
KR
3178cat >> confdefs.h <<EOF
3179#define STACK_DIRECTION $ac_cv_c_stack_direction
3180EOF
3181
3182fi
3183
48401fcf
TT
3184for ac_hdr in unistd.h
3185do
3186ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3187echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
921d7728 3188echo "configure:3189: checking for $ac_hdr" >&5
48401fcf 3189if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
833c46e1 3190 echo $ac_n "(cached) $ac_c" 1>&6
b11fb939 3191else
833c46e1 3192 cat > conftest.$ac_ext <<EOF
921d7728 3193#line 3194 "configure"
b11fb939 3194#include "confdefs.h"
48401fcf 3195#include <$ac_hdr>
b11fb939 3196EOF
48401fcf 3197ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
921d7728 3198{ (eval echo configure:3199: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
48401fcf
TT
3199ac_err=`grep -v '^ *+' conftest.out`
3200if test -z "$ac_err"; then
b11fb939 3201 rm -rf conftest*
48401fcf 3202 eval "ac_cv_header_$ac_safe=yes"
c6c7035c 3203else
48401fcf 3204 echo "$ac_err" >&5
c6c7035c
MM
3205 echo "configure: failed program was:" >&5
3206 cat conftest.$ac_ext >&5
48401fcf
TT
3207 rm -rf conftest*
3208 eval "ac_cv_header_$ac_safe=no"
b11fb939
KR
3209fi
3210rm -f conftest*
b11fb939 3211fi
48401fcf
TT
3212if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3213 echo "$ac_t""yes" 1>&6
3214 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3215 cat >> confdefs.h <<EOF
3216#define $ac_tr_hdr 1
833c46e1 3217EOF
48401fcf
TT
3218
3219else
3220 echo "$ac_t""no" 1>&6
3221fi
3222done
b11fb939 3223
48401fcf 3224for ac_func in getpagesize
b9419dd2 3225do
833c46e1 3226echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
921d7728 3227echo "configure:3228: checking for $ac_func" >&5
833c46e1
KR
3228if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3229 echo $ac_n "(cached) $ac_c" 1>&6
28d3e4a3
KR
3230else
3231 cat > conftest.$ac_ext <<EOF
921d7728 3232#line 3233 "configure"
28d3e4a3 3233#include "confdefs.h"
833c46e1
KR
3234/* System header to define __stub macros and hopefully few prototypes,
3235 which can conflict with char $ac_func(); below. */
3236#include <assert.h>
f1698cb7 3237/* Override any gcc2 internal prototype to avoid an error. */
df586de2
ILT
3238/* We use char because int might match the return type of a gcc2
3239 builtin and then its argument prototype would still apply. */
1c9dbb83 3240char $ac_func();
f1698cb7 3241
c6c7035c 3242int main() {
28d3e4a3
KR
3243
3244/* The GNU C library defines this for functions which it implements
3245 to always fail with ENOSYS. Some functions are actually named
3246 something starting with __ and the normal name is an alias. */
b9419dd2 3247#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
28d3e4a3
KR
3248choke me
3249#else
f1698cb7 3250$ac_func();
28d3e4a3
KR
3251#endif
3252
3253; return 0; }
3254EOF
921d7728 3255if { (eval echo configure:3256: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
48401fcf
TT
3256 rm -rf conftest*
3257 eval "ac_cv_func_$ac_func=yes"
3258else
3259 echo "configure: failed program was:" >&5
3260 cat conftest.$ac_ext >&5
3261 rm -rf conftest*
3262 eval "ac_cv_func_$ac_func=no"
3263fi
3264rm -f conftest*
3265fi
3266
3267if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3268 echo "$ac_t""yes" 1>&6
3269 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3270 cat >> confdefs.h <<EOF
3271#define $ac_tr_func 1
3272EOF
3273
3274else
3275 echo "$ac_t""no" 1>&6
3276fi
3277done
3278
3279echo $ac_n "checking for working mmap""... $ac_c" 1>&6
921d7728 3280echo "configure:3281: checking for working mmap" >&5
48401fcf
TT
3281if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
3282 echo $ac_n "(cached) $ac_c" 1>&6
3283else
3284 if test "$cross_compiling" = yes; then
3285 ac_cv_func_mmap_fixed_mapped=no
3286else
3287 cat > conftest.$ac_ext <<EOF
921d7728 3288#line 3289 "configure"
48401fcf
TT
3289#include "confdefs.h"
3290
3291/* Thanks to Mike Haertel and Jim Avera for this test.
3292 Here is a matrix of mmap possibilities:
3293 mmap private not fixed
3294 mmap private fixed at somewhere currently unmapped
3295 mmap private fixed at somewhere already mapped
3296 mmap shared not fixed
3297 mmap shared fixed at somewhere currently unmapped
3298 mmap shared fixed at somewhere already mapped
3299 For private mappings, we should verify that changes cannot be read()
3300 back from the file, nor mmap's back from the file at a different
3301 address. (There have been systems where private was not correctly
3302 implemented like the infamous i386 svr4.0, and systems where the
3303 VM page cache was not coherent with the filesystem buffer cache
3304 like early versions of FreeBSD and possibly contemporary NetBSD.)
3305 For shared mappings, we should conversely verify that changes get
3306 propogated back to all the places they're supposed to be.
3307
3308 Grep wants private fixed already mapped.
3309 The main things grep needs to know about mmap are:
3310 * does it exist and is it safe to write into the mmap'd area
3311 * how to use it (BSD variants) */
3312#include <sys/types.h>
3313#include <fcntl.h>
3314#include <sys/mman.h>
3315
3316/* This mess was copied from the GNU getpagesize.h. */
3317#ifndef HAVE_GETPAGESIZE
3318# ifdef HAVE_UNISTD_H
3319# include <unistd.h>
3320# endif
3321
3322/* Assume that all systems that can run configure have sys/param.h. */
3323# ifndef HAVE_SYS_PARAM_H
3324# define HAVE_SYS_PARAM_H 1
3325# endif
3326
3327# ifdef _SC_PAGESIZE
3328# define getpagesize() sysconf(_SC_PAGESIZE)
3329# else /* no _SC_PAGESIZE */
3330# ifdef HAVE_SYS_PARAM_H
3331# include <sys/param.h>
3332# ifdef EXEC_PAGESIZE
3333# define getpagesize() EXEC_PAGESIZE
3334# else /* no EXEC_PAGESIZE */
3335# ifdef NBPG
3336# define getpagesize() NBPG * CLSIZE
3337# ifndef CLSIZE
3338# define CLSIZE 1
3339# endif /* no CLSIZE */
3340# else /* no NBPG */
3341# ifdef NBPC
3342# define getpagesize() NBPC
3343# else /* no NBPC */
3344# ifdef PAGESIZE
3345# define getpagesize() PAGESIZE
3346# endif /* PAGESIZE */
3347# endif /* no NBPC */
3348# endif /* no NBPG */
3349# endif /* no EXEC_PAGESIZE */
3350# else /* no HAVE_SYS_PARAM_H */
3351# define getpagesize() 8192 /* punt totally */
3352# endif /* no HAVE_SYS_PARAM_H */
3353# endif /* no _SC_PAGESIZE */
3354
3355#endif /* no HAVE_GETPAGESIZE */
3356
3357#ifdef __cplusplus
3358extern "C" { void *malloc(unsigned); }
3359#else
3360char *malloc();
3361#endif
3362
3363int
3364main()
3365{
3366 char *data, *data2, *data3;
3367 int i, pagesize;
3368 int fd;
3369
3370 pagesize = getpagesize();
3371
3372 /*
3373 * First, make a file with some known garbage in it.
3374 */
3375 data = malloc(pagesize);
3376 if (!data)
3377 exit(1);
3378 for (i = 0; i < pagesize; ++i)
3379 *(data + i) = rand();
3380 umask(0);
3381 fd = creat("conftestmmap", 0600);
3382 if (fd < 0)
3383 exit(1);
3384 if (write(fd, data, pagesize) != pagesize)
3385 exit(1);
3386 close(fd);
3387
3388 /*
3389 * Next, try to mmap the file at a fixed address which
3390 * already has something else allocated at it. If we can,
3391 * also make sure that we see the same garbage.
3392 */
3393 fd = open("conftestmmap", O_RDWR);
3394 if (fd < 0)
3395 exit(1);
3396 data2 = malloc(2 * pagesize);
3397 if (!data2)
3398 exit(1);
3399 data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
3400 if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
3401 MAP_PRIVATE | MAP_FIXED, fd, 0L))
3402 exit(1);
3403 for (i = 0; i < pagesize; ++i)
3404 if (*(data + i) != *(data2 + i))
3405 exit(1);
3406
3407 /*
3408 * Finally, make sure that changes to the mapped area
3409 * do not percolate back to the file as seen by read().
3410 * (This is a bug on some variants of i386 svr4.0.)
3411 */
3412 for (i = 0; i < pagesize; ++i)
3413 *(data2 + i) = *(data2 + i) + 1;
3414 data3 = malloc(pagesize);
3415 if (!data3)
3416 exit(1);
3417 if (read(fd, data3, pagesize) != pagesize)
3418 exit(1);
3419 for (i = 0; i < pagesize; ++i)
3420 if (*(data + i) != *(data3 + i))
3421 exit(1);
3422 close(fd);
3423 unlink("conftestmmap");
3424 exit(0);
3425}
3426
3427EOF
921d7728 3428if { (eval echo configure:3429: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
48401fcf
TT
3429then
3430 ac_cv_func_mmap_fixed_mapped=yes
3431else
3432 echo "configure: failed program was:" >&5
3433 cat conftest.$ac_ext >&5
3434 rm -fr conftest*
3435 ac_cv_func_mmap_fixed_mapped=no
3436fi
3437rm -fr conftest*
3438fi
3439
3440fi
3441
3442echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
3443if test $ac_cv_func_mmap_fixed_mapped = yes; then
3444 cat >> confdefs.h <<\EOF
3445#define HAVE_MMAP 1
3446EOF
3447
3448fi
3449
3450
3451 for ac_hdr in argz.h limits.h locale.h nl_types.h malloc.h string.h \
3452unistd.h values.h sys/param.h
3453do
3454ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3455echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
921d7728 3456echo "configure:3457: checking for $ac_hdr" >&5
48401fcf
TT
3457if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3458 echo $ac_n "(cached) $ac_c" 1>&6
3459else
3460 cat > conftest.$ac_ext <<EOF
921d7728 3461#line 3462 "configure"
48401fcf
TT
3462#include "confdefs.h"
3463#include <$ac_hdr>
3464EOF
3465ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
921d7728 3466{ (eval echo configure:3467: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
48401fcf
TT
3467ac_err=`grep -v '^ *+' conftest.out`
3468if test -z "$ac_err"; then
3469 rm -rf conftest*
3470 eval "ac_cv_header_$ac_safe=yes"
3471else
3472 echo "$ac_err" >&5
3473 echo "configure: failed program was:" >&5
3474 cat conftest.$ac_ext >&5
3475 rm -rf conftest*
3476 eval "ac_cv_header_$ac_safe=no"
3477fi
3478rm -f conftest*
3479fi
3480if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3481 echo "$ac_t""yes" 1>&6
3482 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3483 cat >> confdefs.h <<EOF
3484#define $ac_tr_hdr 1
3485EOF
3486
3487else
3488 echo "$ac_t""no" 1>&6
3489fi
3490done
3491
3492 for ac_func in getcwd munmap putenv setenv setlocale strchr strcasecmp \
3493__argz_count __argz_stringify __argz_next
3494do
3495echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
921d7728 3496echo "configure:3497: checking for $ac_func" >&5
48401fcf
TT
3497if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3498 echo $ac_n "(cached) $ac_c" 1>&6
3499else
3500 cat > conftest.$ac_ext <<EOF
921d7728 3501#line 3502 "configure"
48401fcf
TT
3502#include "confdefs.h"
3503/* System header to define __stub macros and hopefully few prototypes,
3504 which can conflict with char $ac_func(); below. */
3505#include <assert.h>
3506/* Override any gcc2 internal prototype to avoid an error. */
3507/* We use char because int might match the return type of a gcc2
3508 builtin and then its argument prototype would still apply. */
3509char $ac_func();
3510
3511int main() {
3512
3513/* The GNU C library defines this for functions which it implements
3514 to always fail with ENOSYS. Some functions are actually named
3515 something starting with __ and the normal name is an alias. */
3516#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3517choke me
3518#else
3519$ac_func();
3520#endif
3521
3522; return 0; }
3523EOF
921d7728 3524if { (eval echo configure:3525: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
48401fcf
TT
3525 rm -rf conftest*
3526 eval "ac_cv_func_$ac_func=yes"
3527else
3528 echo "configure: failed program was:" >&5
3529 cat conftest.$ac_ext >&5
3530 rm -rf conftest*
3531 eval "ac_cv_func_$ac_func=no"
3532fi
3533rm -f conftest*
3534fi
3535
3536if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3537 echo "$ac_t""yes" 1>&6
3538 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3539 cat >> confdefs.h <<EOF
3540#define $ac_tr_func 1
3541EOF
3542
3543else
3544 echo "$ac_t""no" 1>&6
3545fi
3546done
3547
3548
3549 if test "${ac_cv_func_stpcpy+set}" != "set"; then
3550 for ac_func in stpcpy
3551do
3552echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
921d7728 3553echo "configure:3554: checking for $ac_func" >&5
48401fcf
TT
3554if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3555 echo $ac_n "(cached) $ac_c" 1>&6
3556else
3557 cat > conftest.$ac_ext <<EOF
921d7728 3558#line 3559 "configure"
48401fcf
TT
3559#include "confdefs.h"
3560/* System header to define __stub macros and hopefully few prototypes,
3561 which can conflict with char $ac_func(); below. */
3562#include <assert.h>
3563/* Override any gcc2 internal prototype to avoid an error. */
3564/* We use char because int might match the return type of a gcc2
3565 builtin and then its argument prototype would still apply. */
3566char $ac_func();
3567
3568int main() {
3569
3570/* The GNU C library defines this for functions which it implements
3571 to always fail with ENOSYS. Some functions are actually named
3572 something starting with __ and the normal name is an alias. */
3573#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3574choke me
3575#else
3576$ac_func();
3577#endif
3578
3579; return 0; }
3580EOF
921d7728 3581if { (eval echo configure:3582: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
48401fcf
TT
3582 rm -rf conftest*
3583 eval "ac_cv_func_$ac_func=yes"
3584else
3585 echo "configure: failed program was:" >&5
3586 cat conftest.$ac_ext >&5
3587 rm -rf conftest*
3588 eval "ac_cv_func_$ac_func=no"
3589fi
3590rm -f conftest*
3591fi
3592
3593if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3594 echo "$ac_t""yes" 1>&6
3595 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3596 cat >> confdefs.h <<EOF
3597#define $ac_tr_func 1
3598EOF
3599
3600else
3601 echo "$ac_t""no" 1>&6
3602fi
3603done
3604
3605 fi
3606 if test "${ac_cv_func_stpcpy}" = "yes"; then
3607 cat >> confdefs.h <<\EOF
3608#define HAVE_STPCPY 1
3609EOF
3610
3611 fi
3612
3613 if test $ac_cv_header_locale_h = yes; then
3614 echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
921d7728 3615echo "configure:3616: checking for LC_MESSAGES" >&5
48401fcf
TT
3616if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then
3617 echo $ac_n "(cached) $ac_c" 1>&6
3618else
3619 cat > conftest.$ac_ext <<EOF
921d7728 3620#line 3621 "configure"
48401fcf
TT
3621#include "confdefs.h"
3622#include <locale.h>
3623int main() {
3624return LC_MESSAGES
3625; return 0; }
3626EOF
921d7728 3627if { (eval echo configure:3628: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
48401fcf
TT
3628 rm -rf conftest*
3629 am_cv_val_LC_MESSAGES=yes
3630else
3631 echo "configure: failed program was:" >&5
3632 cat conftest.$ac_ext >&5
3633 rm -rf conftest*
3634 am_cv_val_LC_MESSAGES=no
3635fi
3636rm -f conftest*
3637fi
3638
3639echo "$ac_t""$am_cv_val_LC_MESSAGES" 1>&6
3640 if test $am_cv_val_LC_MESSAGES = yes; then
3641 cat >> confdefs.h <<\EOF
3642#define HAVE_LC_MESSAGES 1
3643EOF
3644
3645 fi
3646 fi
3647 echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6
921d7728 3648echo "configure:3649: checking whether NLS is requested" >&5
48401fcf
TT
3649 # Check whether --enable-nls or --disable-nls was given.
3650if test "${enable_nls+set}" = set; then
3651 enableval="$enable_nls"
3652 USE_NLS=$enableval
3653else
3654 USE_NLS=yes
3655fi
3656
3657 echo "$ac_t""$USE_NLS" 1>&6
3658
3659
3660 USE_INCLUDED_LIBINTL=no
3661
3662 if test "$USE_NLS" = "yes"; then
3663 cat >> confdefs.h <<\EOF
3664#define ENABLE_NLS 1
3665EOF
3666
3667 echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6
921d7728 3668echo "configure:3669: checking whether included gettext is requested" >&5
48401fcf
TT
3669 # Check whether --with-included-gettext or --without-included-gettext was given.
3670if test "${with_included_gettext+set}" = set; then
3671 withval="$with_included_gettext"
3672 nls_cv_force_use_gnu_gettext=$withval
3673else
3674 nls_cv_force_use_gnu_gettext=no
3675fi
3676
3677 echo "$ac_t""$nls_cv_force_use_gnu_gettext" 1>&6
3678
3679 nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
3680 if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
3681 nls_cv_header_intl=
3682 nls_cv_header_libgt=
3683 CATOBJEXT=NONE
3684
3685 ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'`
3686echo $ac_n "checking for libintl.h""... $ac_c" 1>&6
921d7728 3687echo "configure:3688: checking for libintl.h" >&5
48401fcf
TT
3688if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3689 echo $ac_n "(cached) $ac_c" 1>&6
3690else
3691 cat > conftest.$ac_ext <<EOF
921d7728 3692#line 3693 "configure"
48401fcf
TT
3693#include "confdefs.h"
3694#include <libintl.h>
3695EOF
3696ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
921d7728 3697{ (eval echo configure:3698: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
48401fcf
TT
3698ac_err=`grep -v '^ *+' conftest.out`
3699if test -z "$ac_err"; then
3700 rm -rf conftest*
3701 eval "ac_cv_header_$ac_safe=yes"
3702else
3703 echo "$ac_err" >&5
3704 echo "configure: failed program was:" >&5
3705 cat conftest.$ac_ext >&5
3706 rm -rf conftest*
3707 eval "ac_cv_header_$ac_safe=no"
3708fi
3709rm -f conftest*
3710fi
3711if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3712 echo "$ac_t""yes" 1>&6
3713 echo $ac_n "checking for gettext in libc""... $ac_c" 1>&6
921d7728 3714echo "configure:3715: checking for gettext in libc" >&5
48401fcf
TT
3715if eval "test \"`echo '$''{'gt_cv_func_gettext_libc'+set}'`\" = set"; then
3716 echo $ac_n "(cached) $ac_c" 1>&6
3717else
3718 cat > conftest.$ac_ext <<EOF
921d7728 3719#line 3720 "configure"
48401fcf
TT
3720#include "confdefs.h"
3721#include <libintl.h>
3722int main() {
3723return (int) gettext ("")
3724; return 0; }
3725EOF
921d7728 3726if { (eval echo configure:3727: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
48401fcf
TT
3727 rm -rf conftest*
3728 gt_cv_func_gettext_libc=yes
3729else
3730 echo "configure: failed program was:" >&5
3731 cat conftest.$ac_ext >&5
3732 rm -rf conftest*
3733 gt_cv_func_gettext_libc=no
3734fi
3735rm -f conftest*
3736fi
3737
3738echo "$ac_t""$gt_cv_func_gettext_libc" 1>&6
3739
3740 if test "$gt_cv_func_gettext_libc" != "yes"; then
3741 echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6
921d7728 3742echo "configure:3743: checking for bindtextdomain in -lintl" >&5
48401fcf
TT
3743ac_lib_var=`echo intl'_'bindtextdomain | sed 'y%./+-%__p_%'`
3744if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3745 echo $ac_n "(cached) $ac_c" 1>&6
3746else
3747 ac_save_LIBS="$LIBS"
3748LIBS="-lintl $LIBS"
3749cat > conftest.$ac_ext <<EOF
921d7728 3750#line 3751 "configure"
48401fcf
TT
3751#include "confdefs.h"
3752/* Override any gcc2 internal prototype to avoid an error. */
3753/* We use char because int might match the return type of a gcc2
3754 builtin and then its argument prototype would still apply. */
3755char bindtextdomain();
3756
3757int main() {
3758bindtextdomain()
3759; return 0; }
3760EOF
921d7728 3761if { (eval echo configure:3762: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
48401fcf
TT
3762 rm -rf conftest*
3763 eval "ac_cv_lib_$ac_lib_var=yes"
3764else
3765 echo "configure: failed program was:" >&5
3766 cat conftest.$ac_ext >&5
3767 rm -rf conftest*
3768 eval "ac_cv_lib_$ac_lib_var=no"
3769fi
3770rm -f conftest*
3771LIBS="$ac_save_LIBS"
3772
3773fi
3774if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3775 echo "$ac_t""yes" 1>&6
3776 echo $ac_n "checking for gettext in libintl""... $ac_c" 1>&6
921d7728 3777echo "configure:3778: checking for gettext in libintl" >&5
48401fcf
TT
3778if eval "test \"`echo '$''{'gt_cv_func_gettext_libintl'+set}'`\" = set"; then
3779 echo $ac_n "(cached) $ac_c" 1>&6
3780else
3781 cat > conftest.$ac_ext <<EOF
921d7728 3782#line 3783 "configure"
48401fcf
TT
3783#include "confdefs.h"
3784
3785int main() {
3786return (int) gettext ("")
3787; return 0; }
3788EOF
921d7728 3789if { (eval echo configure:3790: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
48401fcf
TT
3790 rm -rf conftest*
3791 gt_cv_func_gettext_libintl=yes
3792else
3793 echo "configure: failed program was:" >&5
3794 cat conftest.$ac_ext >&5
3795 rm -rf conftest*
3796 gt_cv_func_gettext_libintl=no
3797fi
3798rm -f conftest*
3799fi
3800
3801echo "$ac_t""$gt_cv_func_gettext_libintl" 1>&6
3802else
3803 echo "$ac_t""no" 1>&6
3804fi
3805
3806 fi
3807
3808 if test "$gt_cv_func_gettext_libc" = "yes" \
3809 || test "$gt_cv_func_gettext_libintl" = "yes"; then
3810 cat >> confdefs.h <<\EOF
3811#define HAVE_GETTEXT 1
3812EOF
3813
3814 # Extract the first word of "msgfmt", so it can be a program name with args.
3815set dummy msgfmt; ac_word=$2
3816echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
921d7728 3817echo "configure:3818: checking for $ac_word" >&5
48401fcf
TT
3818if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
3819 echo $ac_n "(cached) $ac_c" 1>&6
3820else
3821 case "$MSGFMT" in
3822 /*)
3823 ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
3824 ;;
3825 *)
3826 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
3827 for ac_dir in $PATH; do
3828 test -z "$ac_dir" && ac_dir=.
3829 if test -f $ac_dir/$ac_word; then
3830 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
3831 ac_cv_path_MSGFMT="$ac_dir/$ac_word"
3832 break
3833 fi
3834 fi
3835 done
3836 IFS="$ac_save_ifs"
3837 test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="no"
3838 ;;
3839esac
3840fi
3841MSGFMT="$ac_cv_path_MSGFMT"
3842if test -n "$MSGFMT"; then
3843 echo "$ac_t""$MSGFMT" 1>&6
3844else
3845 echo "$ac_t""no" 1>&6
3846fi
3847 if test "$MSGFMT" != "no"; then
3848 for ac_func in dcgettext
3849do
3850echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
921d7728 3851echo "configure:3852: checking for $ac_func" >&5
48401fcf
TT
3852if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3853 echo $ac_n "(cached) $ac_c" 1>&6
3854else
3855 cat > conftest.$ac_ext <<EOF
921d7728 3856#line 3857 "configure"
48401fcf
TT
3857#include "confdefs.h"
3858/* System header to define __stub macros and hopefully few prototypes,
3859 which can conflict with char $ac_func(); below. */
3860#include <assert.h>
3861/* Override any gcc2 internal prototype to avoid an error. */
3862/* We use char because int might match the return type of a gcc2
3863 builtin and then its argument prototype would still apply. */
3864char $ac_func();
3865
3866int main() {
3867
3868/* The GNU C library defines this for functions which it implements
3869 to always fail with ENOSYS. Some functions are actually named
3870 something starting with __ and the normal name is an alias. */
3871#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3872choke me
3873#else
3874$ac_func();
3875#endif
3876
3877; return 0; }
3878EOF
921d7728 3879if { (eval echo configure:3880: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
48401fcf
TT
3880 rm -rf conftest*
3881 eval "ac_cv_func_$ac_func=yes"
3882else
3883 echo "configure: failed program was:" >&5
3884 cat conftest.$ac_ext >&5
3885 rm -rf conftest*
3886 eval "ac_cv_func_$ac_func=no"
3887fi
3888rm -f conftest*
3889fi
3890
3891if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3892 echo "$ac_t""yes" 1>&6
3893 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3894 cat >> confdefs.h <<EOF
3895#define $ac_tr_func 1
3896EOF
3897
3898else
3899 echo "$ac_t""no" 1>&6
3900fi
3901done
3902
3903 # Extract the first word of "gmsgfmt", so it can be a program name with args.
3904set dummy gmsgfmt; ac_word=$2
3905echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
921d7728 3906echo "configure:3907: checking for $ac_word" >&5
48401fcf
TT
3907if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
3908 echo $ac_n "(cached) $ac_c" 1>&6
3909else
3910 case "$GMSGFMT" in
3911 /*)
3912 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
3913 ;;
3914 ?:/*)
3915 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
3916 ;;
3917 *)
3918 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
3919 for ac_dir in $PATH; do
3920 test -z "$ac_dir" && ac_dir=.
3921 if test -f $ac_dir/$ac_word; then
3922 ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
3923 break
3924 fi
3925 done
3926 IFS="$ac_save_ifs"
3927 test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
3928 ;;
3929esac
3930fi
3931GMSGFMT="$ac_cv_path_GMSGFMT"
3932if test -n "$GMSGFMT"; then
3933 echo "$ac_t""$GMSGFMT" 1>&6
3934else
3935 echo "$ac_t""no" 1>&6
3936fi
3937
3938 # Extract the first word of "xgettext", so it can be a program name with args.
3939set dummy xgettext; ac_word=$2
3940echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
921d7728 3941echo "configure:3942: checking for $ac_word" >&5
48401fcf
TT
3942if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
3943 echo $ac_n "(cached) $ac_c" 1>&6
3944else
3945 case "$XGETTEXT" in
3946 /*)
3947 ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
3948 ;;
3949 *)
3950 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
3951 for ac_dir in $PATH; do
3952 test -z "$ac_dir" && ac_dir=.
3953 if test -f $ac_dir/$ac_word; then
3954 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
3955 ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
3956 break
3957 fi
3958 fi
3959 done
3960 IFS="$ac_save_ifs"
3961 test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
3962 ;;
3963esac
3964fi
3965XGETTEXT="$ac_cv_path_XGETTEXT"
3966if test -n "$XGETTEXT"; then
3967 echo "$ac_t""$XGETTEXT" 1>&6
3968else
3969 echo "$ac_t""no" 1>&6
3970fi
3971
3972 cat > conftest.$ac_ext <<EOF
921d7728 3973#line 3974 "configure"
48401fcf
TT
3974#include "confdefs.h"
3975
3976int main() {
3977extern int _nl_msg_cat_cntr;
3978 return _nl_msg_cat_cntr
3979; return 0; }
3980EOF
921d7728 3981if { (eval echo configure:3982: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
48401fcf
TT
3982 rm -rf conftest*
3983 CATOBJEXT=.gmo
3984 DATADIRNAME=share
3985else
3986 echo "configure: failed program was:" >&5
3987 cat conftest.$ac_ext >&5
3988 rm -rf conftest*
3989 CATOBJEXT=.mo
3990 DATADIRNAME=lib
3991fi
3992rm -f conftest*
3993 INSTOBJEXT=.mo
3994 fi
3995 fi
3996
3997else
3998 echo "$ac_t""no" 1>&6
3999fi
4000
4001
4002
4003 if test "$CATOBJEXT" = "NONE"; then
4004 nls_cv_use_gnu_gettext=yes
4005 fi
4006 fi
4007
4008 if test "$nls_cv_use_gnu_gettext" = "yes"; then
4009 INTLOBJS="\$(GETTOBJS)"
4010 # Extract the first word of "msgfmt", so it can be a program name with args.
4011set dummy msgfmt; ac_word=$2
4012echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
921d7728 4013echo "configure:4014: checking for $ac_word" >&5
48401fcf
TT
4014if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
4015 echo $ac_n "(cached) $ac_c" 1>&6
4016else
4017 case "$MSGFMT" in
4018 /*)
4019 ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
4020 ;;
4021 *)
4022 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
4023 for ac_dir in $PATH; do
4024 test -z "$ac_dir" && ac_dir=.
4025 if test -f $ac_dir/$ac_word; then
4026 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
4027 ac_cv_path_MSGFMT="$ac_dir/$ac_word"
4028 break
4029 fi
4030 fi
4031 done
4032 IFS="$ac_save_ifs"
4033 test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="msgfmt"
4034 ;;
4035esac
4036fi
4037MSGFMT="$ac_cv_path_MSGFMT"
4038if test -n "$MSGFMT"; then
4039 echo "$ac_t""$MSGFMT" 1>&6
4040else
4041 echo "$ac_t""no" 1>&6
4042fi
4043
4044 # Extract the first word of "gmsgfmt", so it can be a program name with args.
4045set dummy gmsgfmt; ac_word=$2
4046echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
921d7728 4047echo "configure:4048: checking for $ac_word" >&5
48401fcf
TT
4048if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
4049 echo $ac_n "(cached) $ac_c" 1>&6
4050else
4051 case "$GMSGFMT" in
4052 /*)
4053 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
4054 ;;
4055 ?:/*)
4056 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
4057 ;;
4058 *)
4059 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
4060 for ac_dir in $PATH; do
4061 test -z "$ac_dir" && ac_dir=.
4062 if test -f $ac_dir/$ac_word; then
4063 ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
4064 break
4065 fi
4066 done
4067 IFS="$ac_save_ifs"
4068 test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
4069 ;;
4070esac
4071fi
4072GMSGFMT="$ac_cv_path_GMSGFMT"
4073if test -n "$GMSGFMT"; then
4074 echo "$ac_t""$GMSGFMT" 1>&6
4075else
4076 echo "$ac_t""no" 1>&6
4077fi
4078
4079 # Extract the first word of "xgettext", so it can be a program name with args.
4080set dummy xgettext; ac_word=$2
4081echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
921d7728 4082echo "configure:4083: checking for $ac_word" >&5
48401fcf
TT
4083if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
4084 echo $ac_n "(cached) $ac_c" 1>&6
4085else
4086 case "$XGETTEXT" in
4087 /*)
4088 ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
4089 ;;
4090 *)
4091 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
4092 for ac_dir in $PATH; do
4093 test -z "$ac_dir" && ac_dir=.
4094 if test -f $ac_dir/$ac_word; then
4095 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
4096 ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
4097 break
4098 fi
4099 fi
4100 done
4101 IFS="$ac_save_ifs"
4102 test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
4103 ;;
4104esac
4105fi
4106XGETTEXT="$ac_cv_path_XGETTEXT"
4107if test -n "$XGETTEXT"; then
4108 echo "$ac_t""$XGETTEXT" 1>&6
4109else
4110 echo "$ac_t""no" 1>&6
4111fi
4112
4113
4114 USE_INCLUDED_LIBINTL=yes
4115 CATOBJEXT=.gmo
4116 INSTOBJEXT=.mo
4117 DATADIRNAME=share
4118 INTLDEPS='$(top_builddir)/../intl/libintl.a'
4119 INTLLIBS=$INTLDEPS
4120 LIBS=`echo $LIBS | sed -e 's/-lintl//'`
4121 nls_cv_header_intl=libintl.h
4122 nls_cv_header_libgt=libgettext.h
4123 fi
4124
4125 if test "$XGETTEXT" != ":"; then
4126 if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
4127 : ;
4128 else
4129 echo "$ac_t""found xgettext programs is not GNU xgettext; ignore it" 1>&6
4130 XGETTEXT=":"
4131 fi
4132 fi
4133
4134 # We need to process the po/ directory.
4135 POSUB=po
4136 else
4137 DATADIRNAME=share
4138 nls_cv_header_intl=libintl.h
4139 nls_cv_header_libgt=libgettext.h
4140 fi
4141
4142 # If this is used in GNU gettext we have to set USE_NLS to `yes'
4143 # because some of the sources are only built for this goal.
4144 if test "$PACKAGE" = gettext; then
4145 USE_NLS=yes
4146 USE_INCLUDED_LIBINTL=yes
4147 fi
4148
4149 for lang in $ALL_LINGUAS; do
4150 GMOFILES="$GMOFILES $lang.gmo"
4151 POFILES="$POFILES $lang.po"
4152 done
4153
4154
4155
4156
4157
4158
4159
4160
4161
4162
4163
4164
4165
4166
4167 if test "x$CATOBJEXT" != "x"; then
4168 if test "x$ALL_LINGUAS" = "x"; then
4169 LINGUAS=
4170 else
4171 echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6
921d7728 4172echo "configure:4173: checking for catalogs to be installed" >&5
48401fcf
TT
4173 NEW_LINGUAS=
4174 for lang in ${LINGUAS=$ALL_LINGUAS}; do
4175 case "$ALL_LINGUAS" in
4176 *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
4177 esac
4178 done
4179 LINGUAS=$NEW_LINGUAS
4180 echo "$ac_t""$LINGUAS" 1>&6
4181 fi
4182
4183 if test -n "$LINGUAS"; then
4184 for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
4185 fi
4186 fi
4187
4188 if test $ac_cv_header_locale_h = yes; then
4189 INCLUDE_LOCALE_H="#include <locale.h>"
4190 else
4191 INCLUDE_LOCALE_H="\
4192/* The system does not provide the header <locale.h>. Take care yourself. */"
4193 fi
4194
4195
4196 if test -f $srcdir/po2tbl.sed.in; then
4197 if test "$CATOBJEXT" = ".cat"; then
4198 ac_safe=`echo "linux/version.h" | sed 'y%./+-%__p_%'`
4199echo $ac_n "checking for linux/version.h""... $ac_c" 1>&6
921d7728 4200echo "configure:4201: checking for linux/version.h" >&5
48401fcf
TT
4201if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4202 echo $ac_n "(cached) $ac_c" 1>&6
4203else
4204 cat > conftest.$ac_ext <<EOF
921d7728 4205#line 4206 "configure"
48401fcf
TT
4206#include "confdefs.h"
4207#include <linux/version.h>
4208EOF
4209ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
921d7728 4210{ (eval echo configure:4211: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
48401fcf
TT
4211ac_err=`grep -v '^ *+' conftest.out`
4212if test -z "$ac_err"; then
4213 rm -rf conftest*
4214 eval "ac_cv_header_$ac_safe=yes"
4215else
4216 echo "$ac_err" >&5
4217 echo "configure: failed program was:" >&5
4218 cat conftest.$ac_ext >&5
4219 rm -rf conftest*
4220 eval "ac_cv_header_$ac_safe=no"
4221fi
4222rm -f conftest*
4223fi
4224if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4225 echo "$ac_t""yes" 1>&6
4226 msgformat=linux
4227else
4228 echo "$ac_t""no" 1>&6
4229msgformat=xopen
4230fi
4231
4232
4233 sed -e '/^#/d' $srcdir/$msgformat-msg.sed > po2msg.sed
4234 fi
4235 sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \
4236 $srcdir/po2tbl.sed.in > po2tbl.sed
4237 fi
4238
4239 if test "$PACKAGE" = "gettext"; then
4240 GT_NO="#NO#"
4241 GT_YES=
4242 else
4243 GT_NO=
4244 GT_YES="#YES#"
4245 fi
4246
4247
4248
4249 MKINSTALLDIRS="\$(srcdir)/../../mkinstalldirs"
4250
4251
4252 l=
4253
4254
4255 if test -d $srcdir/po; then
4256 test -d po || mkdir po
4257 if test "x$srcdir" != "x."; then
4258 if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
4259 posrcprefix="$srcdir/"
4260 else
4261 posrcprefix="../$srcdir/"
4262 fi
4263 else
4264 posrcprefix="../"
4265 fi
4266 rm -f po/POTFILES
4267 sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
4268 < $srcdir/po/POTFILES.in > po/POTFILES
4269 fi
4270
4271
4272echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
921d7728 4273echo "configure:4274: checking whether to enable maintainer-specific portions of Makefiles" >&5
48401fcf
TT
4274 # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
4275if test "${enable_maintainer_mode+set}" = set; then
4276 enableval="$enable_maintainer_mode"
4277 USE_MAINTAINER_MODE=$enableval
4278else
4279 USE_MAINTAINER_MODE=no
4280fi
4281
4282 echo "$ac_t""$USE_MAINTAINER_MODE" 1>&6
4283 if test $USE_MAINTAINER_MODE = yes; then
4284 MAINT=
4285 else
4286 MAINT='#M#'
4287 fi
4288
4289
4290echo $ac_n "checking for Cygwin32 environment""... $ac_c" 1>&6
921d7728 4291echo "configure:4292: checking for Cygwin32 environment" >&5
48401fcf
TT
4292if eval "test \"`echo '$''{'am_cv_cygwin32'+set}'`\" = set"; then
4293 echo $ac_n "(cached) $ac_c" 1>&6
4294else
4295 cat > conftest.$ac_ext <<EOF
921d7728 4296#line 4297 "configure"
48401fcf
TT
4297#include "confdefs.h"
4298
4299int main() {
4300return __CYGWIN32__;
4301; return 0; }
4302EOF
921d7728 4303if { (eval echo configure:4304: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
48401fcf
TT
4304 rm -rf conftest*
4305 am_cv_cygwin32=yes
4306else
4307 echo "configure: failed program was:" >&5
4308 cat conftest.$ac_ext >&5
4309 rm -rf conftest*
4310 am_cv_cygwin32=no
4311fi
4312rm -f conftest*
4313rm -f conftest*
4314fi
4315
4316echo "$ac_t""$am_cv_cygwin32" 1>&6
4317CYGWIN32=
4318test "$am_cv_cygwin32" = yes && CYGWIN32=yes
4319echo $ac_n "checking for Mingw32 environment""... $ac_c" 1>&6
921d7728 4320echo "configure:4321: checking for Mingw32 environment" >&5
48401fcf
TT
4321if eval "test \"`echo '$''{'am_cv_mingw32'+set}'`\" = set"; then
4322 echo $ac_n "(cached) $ac_c" 1>&6
4323else
4324 cat > conftest.$ac_ext <<EOF
921d7728 4325#line 4326 "configure"
48401fcf
TT
4326#include "confdefs.h"
4327
4328int main() {
4329return __MINGW32__;
4330; return 0; }
4331EOF
921d7728 4332if { (eval echo configure:4333: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
48401fcf
TT
4333 rm -rf conftest*
4334 am_cv_mingw32=yes
4335else
4336 echo "configure: failed program was:" >&5
4337 cat conftest.$ac_ext >&5
4338 rm -rf conftest*
4339 am_cv_mingw32=no
4340fi
4341rm -f conftest*
4342rm -f conftest*
4343fi
4344
4345echo "$ac_t""$am_cv_mingw32" 1>&6
4346MINGW32=
4347test "$am_cv_mingw32" = yes && MINGW32=yes
4348
4349
4350echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
921d7728 4351echo "configure:4352: checking for executable suffix" >&5
48401fcf
TT
4352if eval "test \"`echo '$''{'am_cv_exeext'+set}'`\" = set"; then
4353 echo $ac_n "(cached) $ac_c" 1>&6
4354else
4355 if test "$CYGWIN32" = yes || test "$MINGW32" = yes; then
4356am_cv_exeext=.exe
4357else
4358cat > am_c_test.c << 'EOF'
4359int main() {
4360/* Nothing needed here */
4361}
4362EOF
4363${CC-cc} -o am_c_test $CFLAGS $CPPFLAGS $LDFLAGS am_c_test.c $LIBS 1>&5
4364am_cv_exeext=
4365for file in am_c_test.*; do
4366 case $file in
4367 *.c) ;;
4368 *.o) ;;
4369 *) am_cv_exeext=`echo $file | sed -e s/am_c_test//` ;;
4370 esac
4371done
4372rm -f am_c_test*
4373fi
4374
4375test x"${am_cv_exeext}" = x && am_cv_exeext=no
4376fi
4377EXEEXT=""
4378test x"${am_cv_exeext}" != xno && EXEEXT=${am_cv_exeext}
4379echo "$ac_t""${am_cv_exeext}" 1>&6
4380
4381
4382for ac_hdr in string.h stdlib.h memory.h strings.h unistd.h stdarg.h varargs.h errno.h sys/types.h
4383do
4384ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4385echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
921d7728 4386echo "configure:4387: checking for $ac_hdr" >&5
48401fcf
TT
4387if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4388 echo $ac_n "(cached) $ac_c" 1>&6
4389else
4390 cat > conftest.$ac_ext <<EOF
921d7728 4391#line 4392 "configure"
48401fcf
TT
4392#include "confdefs.h"
4393#include <$ac_hdr>
4394EOF
4395ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
921d7728 4396{ (eval echo configure:4397: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
48401fcf
TT
4397ac_err=`grep -v '^ *+' conftest.out`
4398if test -z "$ac_err"; then
4399 rm -rf conftest*
4400 eval "ac_cv_header_$ac_safe=yes"
4401else
4402 echo "$ac_err" >&5
4403 echo "configure: failed program was:" >&5
4404 cat conftest.$ac_ext >&5
4405 rm -rf conftest*
4406 eval "ac_cv_header_$ac_safe=no"
4407fi
4408rm -f conftest*
4409fi
4410if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4411 echo "$ac_t""yes" 1>&6
4412 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4413 cat >> confdefs.h <<EOF
4414#define $ac_tr_hdr 1
4415EOF
4416
4417else
4418 echo "$ac_t""no" 1>&6
4419fi
4420done
4421
4422
4423# Put this here so that autoconf's "cross-compiling" message doesn't confuse
4424# people who are not cross-compiling but are compiling cross-assemblers.
4425echo $ac_n "checking whether compiling a cross-assembler""... $ac_c" 1>&6
921d7728 4426echo "configure:4427: checking whether compiling a cross-assembler" >&5
48401fcf
TT
4427if test "${host}" = "${target}"; then
4428 cross_gas=no
4429else
4430 cross_gas=yes
4431 cat >> confdefs.h <<\EOF
4432#define CROSS_COMPILE 1
4433EOF
4434
4435fi
4436echo "$ac_t""$cross_gas" 1>&6
4437
4438# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
4439# for constant arguments. Useless!
4440echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
921d7728 4441echo "configure:4442: checking for working alloca.h" >&5
48401fcf
TT
4442if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
4443 echo $ac_n "(cached) $ac_c" 1>&6
4444else
4445 cat > conftest.$ac_ext <<EOF
921d7728 4446#line 4447 "configure"
48401fcf
TT
4447#include "confdefs.h"
4448#include <alloca.h>
4449int main() {
4450char *p = alloca(2 * sizeof(int));
4451; return 0; }
4452EOF
921d7728 4453if { (eval echo configure:4454: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
48401fcf
TT
4454 rm -rf conftest*
4455 ac_cv_header_alloca_h=yes
4456else
4457 echo "configure: failed program was:" >&5
4458 cat conftest.$ac_ext >&5
4459 rm -rf conftest*
4460 ac_cv_header_alloca_h=no
4461fi
4462rm -f conftest*
4463fi
4464
4465echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
4466if test $ac_cv_header_alloca_h = yes; then
4467 cat >> confdefs.h <<\EOF
4468#define HAVE_ALLOCA_H 1
4469EOF
4470
4471fi
4472
4473echo $ac_n "checking for alloca""... $ac_c" 1>&6
921d7728 4474echo "configure:4475: checking for alloca" >&5
48401fcf
TT
4475if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
4476 echo $ac_n "(cached) $ac_c" 1>&6
4477else
4478 cat > conftest.$ac_ext <<EOF
921d7728 4479#line 4480 "configure"
48401fcf
TT
4480#include "confdefs.h"
4481
4482#ifdef __GNUC__
4483# define alloca __builtin_alloca
4484#else
4485# if HAVE_ALLOCA_H
4486# include <alloca.h>
4487# else
4488# ifdef _AIX
4489 #pragma alloca
4490# else
4491# ifndef alloca /* predefined by HP cc +Olibcalls */
4492char *alloca ();
4493# endif
4494# endif
4495# endif
4496#endif
4497
4498int main() {
4499char *p = (char *) alloca(1);
4500; return 0; }
4501EOF
921d7728 4502if { (eval echo configure:4503: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
48401fcf
TT
4503 rm -rf conftest*
4504 ac_cv_func_alloca_works=yes
4505else
4506 echo "configure: failed program was:" >&5
4507 cat conftest.$ac_ext >&5
4508 rm -rf conftest*
4509 ac_cv_func_alloca_works=no
4510fi
4511rm -f conftest*
4512fi
4513
4514echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
4515if test $ac_cv_func_alloca_works = yes; then
4516 cat >> confdefs.h <<\EOF
4517#define HAVE_ALLOCA 1
4518EOF
4519
4520fi
4521
4522if test $ac_cv_func_alloca_works = no; then
4523 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
4524 # that cause trouble. Some versions do not even contain alloca or
4525 # contain a buggy version. If you still want to use their alloca,
4526 # use ar to extract alloca.o from them instead of compiling alloca.c.
4527 ALLOCA=alloca.o
4528 cat >> confdefs.h <<\EOF
4529#define C_ALLOCA 1
4530EOF
4531
4532
4533echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
921d7728 4534echo "configure:4535: checking whether alloca needs Cray hooks" >&5
48401fcf
TT
4535if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
4536 echo $ac_n "(cached) $ac_c" 1>&6
4537else
4538 cat > conftest.$ac_ext <<EOF
921d7728 4539#line 4540 "configure"
48401fcf
TT
4540#include "confdefs.h"
4541#if defined(CRAY) && ! defined(CRAY2)
4542webecray
4543#else
4544wenotbecray
4545#endif
4546
4547EOF
4548if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4549 egrep "webecray" >/dev/null 2>&1; then
4550 rm -rf conftest*
4551 ac_cv_os_cray=yes
4552else
4553 rm -rf conftest*
4554 ac_cv_os_cray=no
4555fi
4556rm -f conftest*
4557
4558fi
4559
4560echo "$ac_t""$ac_cv_os_cray" 1>&6
4561if test $ac_cv_os_cray = yes; then
4562for ac_func in _getb67 GETB67 getb67; do
4563 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
921d7728 4564echo "configure:4565: checking for $ac_func" >&5
48401fcf
TT
4565if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4566 echo $ac_n "(cached) $ac_c" 1>&6
4567else
4568 cat > conftest.$ac_ext <<EOF
921d7728 4569#line 4570 "configure"
48401fcf
TT
4570#include "confdefs.h"
4571/* System header to define __stub macros and hopefully few prototypes,
4572 which can conflict with char $ac_func(); below. */
4573#include <assert.h>
4574/* Override any gcc2 internal prototype to avoid an error. */
4575/* We use char because int might match the return type of a gcc2
4576 builtin and then its argument prototype would still apply. */
4577char $ac_func();
4578
4579int main() {
4580
4581/* The GNU C library defines this for functions which it implements
4582 to always fail with ENOSYS. Some functions are actually named
4583 something starting with __ and the normal name is an alias. */
4584#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4585choke me
4586#else
4587$ac_func();
4588#endif
4589
4590; return 0; }
4591EOF
921d7728 4592if { (eval echo configure:4593: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
48401fcf
TT
4593 rm -rf conftest*
4594 eval "ac_cv_func_$ac_func=yes"
4595else
4596 echo "configure: failed program was:" >&5
4597 cat conftest.$ac_ext >&5
4598 rm -rf conftest*
4599 eval "ac_cv_func_$ac_func=no"
4600fi
4601rm -f conftest*
4602fi
4603
4604if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4605 echo "$ac_t""yes" 1>&6
4606 cat >> confdefs.h <<EOF
4607#define CRAY_STACKSEG_END $ac_func
4608EOF
4609
4610 break
4611else
4612 echo "$ac_t""no" 1>&6
4613fi
4614
4615done
4616fi
4617
4618echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
921d7728 4619echo "configure:4620: checking stack direction for C alloca" >&5
48401fcf
TT
4620if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
4621 echo $ac_n "(cached) $ac_c" 1>&6
4622else
4623 if test "$cross_compiling" = yes; then
4624 ac_cv_c_stack_direction=0
4625else
4626 cat > conftest.$ac_ext <<EOF
921d7728 4627#line 4628 "configure"
48401fcf
TT
4628#include "confdefs.h"
4629find_stack_direction ()
4630{
4631 static char *addr = 0;
4632 auto char dummy;
4633 if (addr == 0)
4634 {
4635 addr = &dummy;
4636 return find_stack_direction ();
4637 }
4638 else
4639 return (&dummy > addr) ? 1 : -1;
4640}
4641main ()
4642{
4643 exit (find_stack_direction() < 0);
4644}
4645EOF
921d7728 4646if { (eval echo configure:4647: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
48401fcf
TT
4647then
4648 ac_cv_c_stack_direction=1
4649else
4650 echo "configure: failed program was:" >&5
4651 cat conftest.$ac_ext >&5
4652 rm -fr conftest*
4653 ac_cv_c_stack_direction=-1
4654fi
4655rm -fr conftest*
4656fi
4657
4658fi
4659
4660echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
4661cat >> confdefs.h <<EOF
4662#define STACK_DIRECTION $ac_cv_c_stack_direction
4663EOF
4664
4665fi
4666
4667echo $ac_n "checking for inline""... $ac_c" 1>&6
921d7728 4668echo "configure:4669: checking for inline" >&5
48401fcf
TT
4669if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
4670 echo $ac_n "(cached) $ac_c" 1>&6
4671else
4672 ac_cv_c_inline=no
4673for ac_kw in inline __inline__ __inline; do
4674 cat > conftest.$ac_ext <<EOF
921d7728 4675#line 4676 "configure"
48401fcf
TT
4676#include "confdefs.h"
4677
4678int main() {
4679} $ac_kw foo() {
4680; return 0; }
4681EOF
921d7728 4682if { (eval echo configure:4683: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
48401fcf
TT
4683 rm -rf conftest*
4684 ac_cv_c_inline=$ac_kw; break
4685else
4686 echo "configure: failed program was:" >&5
4687 cat conftest.$ac_ext >&5
4688fi
4689rm -f conftest*
4690done
4691
4692fi
4693
4694echo "$ac_t""$ac_cv_c_inline" 1>&6
4695case "$ac_cv_c_inline" in
4696 inline | yes) ;;
4697 no) cat >> confdefs.h <<\EOF
4698#define inline
4699EOF
4700 ;;
4701 *) cat >> confdefs.h <<EOF
4702#define inline $ac_cv_c_inline
4703EOF
4704 ;;
4705esac
4706
4707
4708# VMS doesn't have unlink.
4709for ac_func in unlink remove
4710do
4711echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
921d7728 4712echo "configure:4713: checking for $ac_func" >&5
48401fcf
TT
4713if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4714 echo $ac_n "(cached) $ac_c" 1>&6
4715else
4716 cat > conftest.$ac_ext <<EOF
921d7728 4717#line 4718 "configure"
48401fcf
TT
4718#include "confdefs.h"
4719/* System header to define __stub macros and hopefully few prototypes,
4720 which can conflict with char $ac_func(); below. */
4721#include <assert.h>
4722/* Override any gcc2 internal prototype to avoid an error. */
4723/* We use char because int might match the return type of a gcc2
4724 builtin and then its argument prototype would still apply. */
4725char $ac_func();
4726
4727int main() {
4728
4729/* The GNU C library defines this for functions which it implements
4730 to always fail with ENOSYS. Some functions are actually named
4731 something starting with __ and the normal name is an alias. */
4732#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4733choke me
4734#else
4735$ac_func();
4736#endif
4737
4738; return 0; }
4739EOF
921d7728 4740if { (eval echo configure:4741: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
28d3e4a3 4741 rm -rf conftest*
b9419dd2 4742 eval "ac_cv_func_$ac_func=yes"
28d3e4a3 4743else
c6c7035c
MM
4744 echo "configure: failed program was:" >&5
4745 cat conftest.$ac_ext >&5
28d3e4a3 4746 rm -rf conftest*
b9419dd2 4747 eval "ac_cv_func_$ac_func=no"
28d3e4a3
KR
4748fi
4749rm -f conftest*
7d0f8249 4750fi
c6c7035c 4751
b9419dd2 4752if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
833c46e1 4753 echo "$ac_t""yes" 1>&6
1c9dbb83 4754 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
b9419dd2
KR
4755 cat >> confdefs.h <<EOF
4756#define $ac_tr_func 1
28d3e4a3 4757EOF
b9419dd2 4758 break
28d3e4a3 4759else
833c46e1 4760 echo "$ac_t""no" 1>&6
28d3e4a3 4761fi
b9419dd2 4762done
28d3e4a3
KR
4763
4764
e63c594d
FF
4765# Some systems don't have sbrk().
4766for ac_func in sbrk
4767do
4768echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
921d7728 4769echo "configure:4770: checking for $ac_func" >&5
e63c594d
FF
4770if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4771 echo $ac_n "(cached) $ac_c" 1>&6
4772else
4773 cat > conftest.$ac_ext <<EOF
921d7728 4774#line 4775 "configure"
e63c594d
FF
4775#include "confdefs.h"
4776/* System header to define __stub macros and hopefully few prototypes,
4777 which can conflict with char $ac_func(); below. */
4778#include <assert.h>
4779/* Override any gcc2 internal prototype to avoid an error. */
df586de2
ILT
4780/* We use char because int might match the return type of a gcc2
4781 builtin and then its argument prototype would still apply. */
1c9dbb83 4782char $ac_func();
e63c594d 4783
c6c7035c 4784int main() {
e63c594d
FF
4785
4786/* The GNU C library defines this for functions which it implements
4787 to always fail with ENOSYS. Some functions are actually named
4788 something starting with __ and the normal name is an alias. */
4789#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4790choke me
4791#else
4792$ac_func();
4793#endif
4794
4795; return 0; }
4796EOF
921d7728 4797if { (eval echo configure:4798: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
e63c594d
FF
4798 rm -rf conftest*
4799 eval "ac_cv_func_$ac_func=yes"
4800else
c6c7035c
MM
4801 echo "configure: failed program was:" >&5
4802 cat conftest.$ac_ext >&5
e63c594d
FF
4803 rm -rf conftest*
4804 eval "ac_cv_func_$ac_func=no"
4805fi
4806rm -f conftest*
7d0f8249 4807fi
c6c7035c 4808
e63c594d
FF
4809if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4810 echo "$ac_t""yes" 1>&6
1c9dbb83 4811 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
e63c594d
FF
4812 cat >> confdefs.h <<EOF
4813#define $ac_tr_func 1
4814EOF
4815
4816else
4817 echo "$ac_t""no" 1>&6
4818fi
4819done
4820
4821
b11fb939
KR
4822# Some non-ANSI preprocessors botch requoting inside strings. That's bad
4823# enough, but on some of those systems, the assert macro relies on requoting
4824# working properly!
833c46e1 4825echo $ac_n "checking for working assert macro""... $ac_c" 1>&6
921d7728 4826echo "configure:4827: checking for working assert macro" >&5
833c46e1
KR
4827if eval "test \"`echo '$''{'gas_cv_assert_ok'+set}'`\" = set"; then
4828 echo $ac_n "(cached) $ac_c" 1>&6
fb589130 4829else
28d3e4a3 4830 cat > conftest.$ac_ext <<EOF
921d7728 4831#line 4832 "configure"
b11fb939
KR
4832#include "confdefs.h"
4833#include <assert.h>
4834#include <stdio.h>
c6c7035c 4835int main() {
b11fb939
KR
4836
4837/* check for requoting problems */
4838static int a, b, c, d;
4839static char *s;
4840assert (!strcmp(s, "foo bar baz quux"));
4841/* check for newline handling */
4842assert (a == b
4843 || c == d);
4844
4845; return 0; }
4846EOF
921d7728 4847if { (eval echo configure:4848: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
fb589130
KR
4848 rm -rf conftest*
4849 gas_cv_assert_ok=yes
b11fb939 4850else
c6c7035c
MM
4851 echo "configure: failed program was:" >&5
4852 cat conftest.$ac_ext >&5
b11fb939 4853 rm -rf conftest*
fb589130 4854 gas_cv_assert_ok=no
b11fb939
KR
4855fi
4856rm -f conftest*
fb589130 4857fi
833c46e1 4858echo "$ac_t""$gas_cv_assert_ok" 1>&6
fb589130
KR
4859test $gas_cv_assert_ok = yes || cat >> confdefs.h <<\EOF
4860#define BROKEN_ASSERT 1
4861EOF
4862
b11fb939 4863
bf111c9f 4864
b11fb939
KR
4865# On some systems, the system header files may not declare malloc, realloc,
4866# and free. There are places where gas needs these functions to have been
4867# declared -- such as when taking their addresses.
bf111c9f 4868gas_test_headers="
b11fb939
KR
4869#ifdef HAVE_MEMORY_H
4870#include <memory.h>
4871#endif
4872#ifdef HAVE_STRING_H
4873#include <string.h>
5cece526
ILT
4874#else
4875#ifdef HAVE_STRINGS_H
4876#include <strings.h>
4877#endif
b11fb939
KR
4878#endif
4879#ifdef HAVE_STDLIB_H
4880#include <stdlib.h>
4881#endif
4882#ifdef HAVE_UNISTD_H
4883#include <unistd.h>
4884#endif
bf111c9f 4885"
b11fb939 4886
5cece526 4887echo $ac_n "checking whether declaration is required for strstr""... $ac_c" 1>&6
921d7728 4888echo "configure:4889: checking whether declaration is required for strstr" >&5
5cece526
ILT
4889if eval "test \"`echo '$''{'gas_cv_decl_needed_strstr'+set}'`\" = set"; then
4890 echo $ac_n "(cached) $ac_c" 1>&6
4891else
4892 cat > conftest.$ac_ext <<EOF
921d7728 4893#line 4894 "configure"
5cece526
ILT
4894#include "confdefs.h"
4895$gas_test_headers
c6c7035c 4896int main() {
5cece526
ILT
4897
4898typedef char *(*f)();
4899f x;
4900x = (f) strstr;
4901
4902; return 0; }
4903EOF
921d7728 4904if { (eval echo configure:4905: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
5cece526
ILT
4905 rm -rf conftest*
4906 gas_cv_decl_needed_strstr=no
4907else
c6c7035c
MM
4908 echo "configure: failed program was:" >&5
4909 cat conftest.$ac_ext >&5
5cece526
ILT
4910 rm -rf conftest*
4911 gas_cv_decl_needed_strstr=yes
4912fi
4913rm -f conftest*
5cece526
ILT
4914fi
4915echo "$ac_t""$gas_cv_decl_needed_strstr" 1>&6
4916test $gas_cv_decl_needed_strstr = no || {
4917 cat >> confdefs.h <<\EOF
4918#define NEED_DECLARATION_STRSTR 1
4919EOF
4920
4921}
4922
4923
833c46e1 4924echo $ac_n "checking whether declaration is required for malloc""... $ac_c" 1>&6
921d7728 4925echo "configure:4926: checking whether declaration is required for malloc" >&5
833c46e1
KR
4926if eval "test \"`echo '$''{'gas_cv_decl_needed_malloc'+set}'`\" = set"; then
4927 echo $ac_n "(cached) $ac_c" 1>&6
bf111c9f 4928else
28d3e4a3 4929 cat > conftest.$ac_ext <<EOF
921d7728 4930#line 4931 "configure"
bf111c9f
KR
4931#include "confdefs.h"
4932$gas_test_headers
c6c7035c 4933int main() {
b11fb939 4934
bf111c9f
KR
4935typedef char *(*f)();
4936f x;
4937x = (f) malloc;
b11fb939
KR
4938
4939; return 0; }
4940EOF
921d7728 4941if { (eval echo configure:4942: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
fb589130 4942 rm -rf conftest*
bf111c9f 4943 gas_cv_decl_needed_malloc=no
b11fb939 4944else
c6c7035c
MM
4945 echo "configure: failed program was:" >&5
4946 cat conftest.$ac_ext >&5
b11fb939 4947 rm -rf conftest*
bf111c9f 4948 gas_cv_decl_needed_malloc=yes
fb589130
KR
4949fi
4950rm -f conftest*
fb589130 4951fi
833c46e1 4952echo "$ac_t""$gas_cv_decl_needed_malloc" 1>&6
bf111c9f
KR
4953test $gas_cv_decl_needed_malloc = no || {
4954 cat >> confdefs.h <<\EOF
4955#define NEED_DECLARATION_MALLOC 1
b11fb939
KR
4956EOF
4957
bf111c9f
KR
4958}
4959
b11fb939 4960
833c46e1 4961echo $ac_n "checking whether declaration is required for free""... $ac_c" 1>&6
921d7728 4962echo "configure:4963: checking whether declaration is required for free" >&5
833c46e1
KR
4963if eval "test \"`echo '$''{'gas_cv_decl_needed_free'+set}'`\" = set"; then
4964 echo $ac_n "(cached) $ac_c" 1>&6
fb589130 4965else
28d3e4a3 4966 cat > conftest.$ac_ext <<EOF
921d7728 4967#line 4968 "configure"
b11fb939 4968#include "confdefs.h"
bf111c9f 4969$gas_test_headers
c6c7035c 4970int main() {
b11fb939 4971
5f757edc 4972typedef void (*f)();
bf111c9f
KR
4973f x;
4974x = (f) free;
b11fb939
KR
4975
4976; return 0; }
4977EOF
921d7728 4978if { (eval echo configure:4979: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
fb589130 4979 rm -rf conftest*
bf111c9f 4980 gas_cv_decl_needed_free=no
b11fb939 4981else
c6c7035c
MM
4982 echo "configure: failed program was:" >&5
4983 cat conftest.$ac_ext >&5
b11fb939 4984 rm -rf conftest*
bf111c9f 4985 gas_cv_decl_needed_free=yes
b11fb939
KR
4986fi
4987rm -f conftest*
fb589130 4988fi
833c46e1 4989echo "$ac_t""$gas_cv_decl_needed_free" 1>&6
bf111c9f
KR
4990test $gas_cv_decl_needed_free = no || {
4991 cat >> confdefs.h <<\EOF
4992#define NEED_DECLARATION_FREE 1
fb589130
KR
4993EOF
4994
bf111c9f
KR
4995}
4996
b11fb939 4997
5cece526 4998echo $ac_n "checking whether declaration is required for sbrk""... $ac_c" 1>&6
921d7728 4999echo "configure:5000: checking whether declaration is required for sbrk" >&5
5cece526
ILT
5000if eval "test \"`echo '$''{'gas_cv_decl_needed_sbrk'+set}'`\" = set"; then
5001 echo $ac_n "(cached) $ac_c" 1>&6
5002else
5003 cat > conftest.$ac_ext <<EOF
921d7728 5004#line 5005 "configure"
5cece526
ILT
5005#include "confdefs.h"
5006$gas_test_headers
c6c7035c 5007int main() {
5cece526
ILT
5008
5009typedef char *(*f)();
5010f x;
5011x = (f) sbrk;
5012
5013; return 0; }
5014EOF
921d7728 5015if { (eval echo configure:5016: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
5cece526
ILT
5016 rm -rf conftest*
5017 gas_cv_decl_needed_sbrk=no
5018else
c6c7035c
MM
5019 echo "configure: failed program was:" >&5
5020 cat conftest.$ac_ext >&5
5cece526
ILT
5021 rm -rf conftest*
5022 gas_cv_decl_needed_sbrk=yes
5023fi
5024rm -f conftest*
5cece526
ILT
5025fi
5026echo "$ac_t""$gas_cv_decl_needed_sbrk" 1>&6
5027test $gas_cv_decl_needed_sbrk = no || {
5028 cat >> confdefs.h <<\EOF
5029#define NEED_DECLARATION_SBRK 1
5030EOF
5031
5032}
5033
5034
b11fb939
KR
5035# Does errno.h declare errno, or do we have to add a separate declaration
5036# for it?
bf111c9f 5037
833c46e1 5038echo $ac_n "checking whether declaration is required for errno""... $ac_c" 1>&6
921d7728 5039echo "configure:5040: checking whether declaration is required for errno" >&5
833c46e1
KR
5040if eval "test \"`echo '$''{'gas_cv_decl_needed_errno'+set}'`\" = set"; then
5041 echo $ac_n "(cached) $ac_c" 1>&6
fb589130 5042else
28d3e4a3 5043 cat > conftest.$ac_ext <<EOF
921d7728 5044#line 5045 "configure"
b11fb939
KR
5045#include "confdefs.h"
5046
5047#ifdef HAVE_ERRNO_H
5048#include <errno.h>
5049#endif
5050
c6c7035c 5051int main() {
b11fb939 5052
bf111c9f
KR
5053typedef int f;
5054f x;
5055x = (f) errno;
b11fb939
KR
5056
5057; return 0; }
5058EOF
921d7728 5059if { (eval echo configure:5060: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
fb589130 5060 rm -rf conftest*
bf111c9f 5061 gas_cv_decl_needed_errno=no
b11fb939 5062else
c6c7035c
MM
5063 echo "configure: failed program was:" >&5
5064 cat conftest.$ac_ext >&5
b11fb939 5065 rm -rf conftest*
bf111c9f 5066 gas_cv_decl_needed_errno=yes
b11fb939
KR
5067fi
5068rm -f conftest*
fb589130 5069fi
833c46e1 5070echo "$ac_t""$gas_cv_decl_needed_errno" 1>&6
bf111c9f
KR
5071test $gas_cv_decl_needed_errno = no || {
5072 cat >> confdefs.h <<\EOF
5073#define NEED_DECLARATION_ERRNO 1
fb589130
KR
5074EOF
5075
bf111c9f
KR
5076}
5077
b11fb939 5078
515c7142
ILT
5079
5080
ba49e48d 5081trap '' 1 2 15
833c46e1 5082cat > confcache <<\EOF
b11fb939
KR
5083# This file is a shell script that caches the results of configure
5084# tests run on this system so they can be shared between configure
5085# scripts and configure runs. It is not useful on other systems.
bf111c9f 5086# If it contains results you don't want to keep, you may remove or edit it.
b11fb939
KR
5087#
5088# By default, configure uses ./config.cache as the cache file,
5089# creating it if it does not exist already. You can give configure
5090# the --cache-file=FILE option to use a different cache file; that is
5091# what configure does when it calls configure scripts in
5092# subdirectories, so they share the cache.
5093# Giving --cache-file=/dev/null disables caching, for debugging configure.
5094# config.status only pays attention to the cache file if you give it the
5095# --recheck option to rerun configure.
e23b25ec 5096#
b11fb939 5097EOF
c6c7035c
MM
5098# The following way of writing the cache mishandles newlines in values,
5099# but we know of no workaround that is simple, portable, and efficient.
5100# So, don't put newlines in cache variables' values.
833c46e1
KR
5101# Ultrix sh set writes to stderr and can't be redirected directly,
5102# and sets the high bit in the cache file unless we assign to the vars.
e23b25ec 5103(set) 2>&1 |
6cc7a938 5104 case `(ac_space=' '; set) 2>&1 | grep ac_space` in
c6c7035c
MM
5105 *ac_space=\ *)
5106 # `set' does not quote correctly, so add quotes (double-quote substitution
5107 # turns \\\\ into \\, and sed turns \\ into \).
5108 sed -n \
5109 -e "s/'/'\\\\''/g" \
5110 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
5111 ;;
5112 *)
5113 # `set' quotes correctly as required by POSIX, so do not add quotes.
5114 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
5115 ;;
5116 esac >> confcache
833c46e1
KR
5117if cmp -s $cache_file confcache; then
5118 :
b11fb939 5119else
833c46e1
KR
5120 if test -w $cache_file; then
5121 echo "updating cache $cache_file"
5122 cat confcache > $cache_file
5123 else
5124 echo "not updating unwritable cache $cache_file"
5125 fi
b11fb939 5126fi
833c46e1 5127rm -f confcache
b11fb939 5128
833c46e1 5129trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
b11fb939 5130
f2889110 5131test "x$prefix" = xNONE && prefix=$ac_default_prefix
b11fb939
KR
5132# Let make expand exec_prefix.
5133test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
5134
5135# Any assignment to VPATH causes Sun make to only execute
5136# the first set of double-colon rules, so remove it if not needed.
5137# If there is a colon in the path, we need to keep it.
5138if test "x$srcdir" = x.; then
5139 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
5140fi
5141
5142trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
5143
5144DEFS=-DHAVE_CONFIG_H
5145
5146# Without the "./", some shells look in PATH for config.status.
5147: ${CONFIG_STATUS=./config.status}
5148
28d3e4a3
KR
5149echo creating $CONFIG_STATUS
5150rm -f $CONFIG_STATUS
5151cat > $CONFIG_STATUS <<EOF
833c46e1 5152#! /bin/sh
b11fb939
KR
5153# Generated automatically by configure.
5154# Run this file to recreate the current configuration.
5155# This directory was configured as follows,
5156# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
5157#
e23b25ec 5158# $0 $ac_configure_args
b11fb939
KR
5159#
5160# Compiler output produced by configure, useful for debugging
5161# configure, is in ./config.log if it exists.
5162
28d3e4a3 5163ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
b11fb939
KR
5164for ac_option
5165do
5166 case "\$ac_option" in
5167 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
e23b25ec
KR
5168 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
5169 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
b11fb939 5170 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
b5db0960 5171 echo "$CONFIG_STATUS generated by autoconf version 2.12.1"
b11fb939
KR
5172 exit 0 ;;
5173 -help | --help | --hel | --he | --h)
5174 echo "\$ac_cs_usage"; exit 0 ;;
5175 *) echo "\$ac_cs_usage"; exit 1 ;;
5176 esac
5177done
5178
5179ac_given_srcdir=$srcdir
5180ac_given_INSTALL="$INSTALL"
5181
48401fcf 5182trap 'rm -fr `echo "Makefile doc/Makefile .gdbinit:gdbinit.in po/Makefile.in:po/Make-in config.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
1c9dbb83
ILT
5183EOF
5184cat >> $CONFIG_STATUS <<EOF
b11fb939 5185
1c9dbb83
ILT
5186# Protect against being on the right side of a sed subst in config.status.
5187sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
5188 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
b11fb939
KR
5189$ac_vpsub
5190$extrasub
ed1ed9f9 5191s%@SHELL@%$SHELL%g
b11fb939 5192s%@CFLAGS@%$CFLAGS%g
b11fb939 5193s%@CPPFLAGS@%$CPPFLAGS%g
bf111c9f
KR
5194s%@CXXFLAGS@%$CXXFLAGS%g
5195s%@DEFS@%$DEFS%g
b11fb939 5196s%@LDFLAGS@%$LDFLAGS%g
bf111c9f
KR
5197s%@LIBS@%$LIBS%g
5198s%@exec_prefix@%$exec_prefix%g
5199s%@prefix@%$prefix%g
ba49e48d 5200s%@program_transform_name@%$program_transform_name%g
1c9dbb83
ILT
5201s%@bindir@%$bindir%g
5202s%@sbindir@%$sbindir%g
5203s%@libexecdir@%$libexecdir%g
5204s%@datadir@%$datadir%g
5205s%@sysconfdir@%$sysconfdir%g
5206s%@sharedstatedir@%$sharedstatedir%g
5207s%@localstatedir@%$localstatedir%g
5208s%@libdir@%$libdir%g
5209s%@includedir@%$includedir%g
5210s%@oldincludedir@%$oldincludedir%g
5211s%@infodir@%$infodir%g
5212s%@mandir@%$mandir%g
b11fb939
KR
5213s%@host@%$host%g
5214s%@host_alias@%$host_alias%g
5215s%@host_cpu@%$host_cpu%g
5216s%@host_vendor@%$host_vendor%g
5217s%@host_os@%$host_os%g
5218s%@target@%$target%g
5219s%@target_alias@%$target_alias%g
5220s%@target_cpu@%$target_cpu%g
5221s%@target_vendor@%$target_vendor%g
5222s%@target_os@%$target_os%g
5223s%@build@%$build%g
5224s%@build_alias@%$build_alias%g
5225s%@build_cpu@%$build_cpu%g
5226s%@build_vendor@%$build_vendor%g
5227s%@build_os@%$build_os%g
e2b4bd2a
ILT
5228s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
5229s%@INSTALL_DATA@%$INSTALL_DATA%g
5230s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
5231s%@PACKAGE@%$PACKAGE%g
5232s%@VERSION@%$VERSION%g
5233s%@ACLOCAL@%$ACLOCAL%g
5234s%@AUTOCONF@%$AUTOCONF%g
5235s%@AUTOMAKE@%$AUTOMAKE%g
5236s%@AUTOHEADER@%$AUTOHEADER%g
5237s%@MAKEINFO@%$MAKEINFO%g
5238s%@SET_MAKE@%$SET_MAKE%g
e2b4bd2a 5239s%@RANLIB@%$RANLIB%g
a52052db 5240s%@CC@%$CC%g
e2b4bd2a 5241s%@LD@%$LD%g
a52052db 5242s%@NM@%$NM%g
e2b4bd2a
ILT
5243s%@LN_S@%$LN_S%g
5244s%@LIBTOOL@%$LIBTOOL%g
b2bb41f6
ILT
5245s%@DLLTOOL@%$DLLTOOL%g
5246s%@AS@%$AS%g
e7757ad0 5247s%@extra_objects@%$extra_objects%g
bf4bd1fc 5248s%@target_cpu_type@%$target_cpu_type%g
833c46e1 5249s%@obj_format@%$obj_format%g
515c7142 5250s%@te_file@%$te_file%g
833c46e1 5251s%@atof@%$atof%g
b11fb939 5252s%@BFDLIB@%$BFDLIB%g
2e013bb7 5253s%@OPCODES_LIB@%$OPCODES_LIB%g
b11fb939 5254s%@ALL_OBJ_DEPS@%$ALL_OBJ_DEPS%g
e2b4bd2a
ILT
5255s%@YACC@%$YACC%g
5256s%@LEX@%$LEX%g
5257s%@LEXLIB@%$LEXLIB%g
b11fb939 5258s%@CPP@%$CPP%g
e2b4bd2a 5259s%@LEX_OUTPUT_ROOT@%$LEX_OUTPUT_ROOT%g
48401fcf
TT
5260s%@ALLOCA@%$ALLOCA%g
5261s%@USE_NLS@%$USE_NLS%g
5262s%@MSGFMT@%$MSGFMT%g
5263s%@GMSGFMT@%$GMSGFMT%g
5264s%@XGETTEXT@%$XGETTEXT%g
5265s%@USE_INCLUDED_LIBINTL@%$USE_INCLUDED_LIBINTL%g
5266s%@CATALOGS@%$CATALOGS%g
5267s%@CATOBJEXT@%$CATOBJEXT%g
5268s%@DATADIRNAME@%$DATADIRNAME%g
5269s%@GMOFILES@%$GMOFILES%g
5270s%@INSTOBJEXT@%$INSTOBJEXT%g
5271s%@INTLDEPS@%$INTLDEPS%g
5272s%@INTLLIBS@%$INTLLIBS%g
5273s%@INTLOBJS@%$INTLOBJS%g
5274s%@POFILES@%$POFILES%g
5275s%@POSUB@%$POSUB%g
5276s%@INCLUDE_LOCALE_H@%$INCLUDE_LOCALE_H%g
5277s%@GT_NO@%$GT_NO%g
5278s%@GT_YES@%$GT_YES%g
5279s%@MKINSTALLDIRS@%$MKINSTALLDIRS%g
5280s%@l@%$l%g
e2b4bd2a 5281s%@MAINT@%$MAINT%g
e42b2520 5282s%@EXEEXT@%$EXEEXT%g
b11fb939
KR
5283
5284CEOF
5285EOF
c6c7035c
MM
5286
5287cat >> $CONFIG_STATUS <<\EOF
5288
5289# Split the substitutions into bite-sized pieces for seds with
5290# small command number limits, like on Digital OSF/1 and HP-UX.
5291ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
5292ac_file=1 # Number of current file.
5293ac_beg=1 # First line for current file.
5294ac_end=$ac_max_sed_cmds # Line after last line for current file.
5295ac_more_lines=:
5296ac_sed_cmds=""
5297while $ac_more_lines; do
5298 if test $ac_beg -gt 1; then
5299 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
5300 else
5301 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
5302 fi
5303 if test ! -s conftest.s$ac_file; then
5304 ac_more_lines=false
5305 rm -f conftest.s$ac_file
5306 else
5307 if test -z "$ac_sed_cmds"; then
5308 ac_sed_cmds="sed -f conftest.s$ac_file"
5309 else
5310 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
5311 fi
5312 ac_file=`expr $ac_file + 1`
5313 ac_beg=$ac_end
5314 ac_end=`expr $ac_end + $ac_max_sed_cmds`
5315 fi
5316done
5317if test -z "$ac_sed_cmds"; then
5318 ac_sed_cmds=cat
5319fi
5320EOF
5321
28d3e4a3 5322cat >> $CONFIG_STATUS <<EOF
b11fb939 5323
48401fcf 5324CONFIG_FILES=\${CONFIG_FILES-"Makefile doc/Makefile .gdbinit:gdbinit.in po/Makefile.in:po/Make-in"}
bf111c9f 5325EOF
28d3e4a3
KR
5326cat >> $CONFIG_STATUS <<\EOF
5327for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
c6c7035c 5328 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
b11fb939 5329 case "$ac_file" in
c6c7035c 5330 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
b11fb939
KR
5331 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
5332 *) ac_file_in="${ac_file}.in" ;;
5333 esac
5334
c6c7035c 5335 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
b11fb939
KR
5336
5337 # Remove last slash and all that follows it. Not all systems have dirname.
5338 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
5339 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
5340 # The file is in a subdirectory.
5341 test ! -d "$ac_dir" && mkdir "$ac_dir"
833c46e1 5342 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
b11fb939
KR
5343 # A "../" for each directory in $ac_dir_suffix.
5344 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
5345 else
5346 ac_dir_suffix= ac_dots=
5347 fi
5348
5349 case "$ac_given_srcdir" in
5350 .) srcdir=.
5351 if test -z "$ac_dots"; then top_srcdir=.
5352 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
5353 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
5354 *) # Relative path.
5355 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
5356 top_srcdir="$ac_dots$ac_given_srcdir" ;;
5357 esac
5358
5359 case "$ac_given_INSTALL" in
5360 [/$]*) INSTALL="$ac_given_INSTALL" ;;
28d3e4a3 5361 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
b11fb939 5362 esac
c6c7035c 5363
b11fb939
KR
5364 echo creating "$ac_file"
5365 rm -f "$ac_file"
28d3e4a3 5366 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
ba49e48d
KR
5367 case "$ac_file" in
5368 *Makefile*) ac_comsub="1i\\
5369# $configure_input" ;;
5370 *) ac_comsub= ;;
5371 esac
c6c7035c 5372
e2b4bd2a 5373 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
ba49e48d 5374 sed -e "$ac_comsub
28d3e4a3 5375s%@configure_input@%$configure_input%g
b11fb939
KR
5376s%@srcdir@%$srcdir%g
5377s%@top_srcdir@%$top_srcdir%g
5378s%@INSTALL@%$INSTALL%g
c6c7035c 5379" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
b11fb939 5380fi; done
c6c7035c 5381rm -f conftest.s*
b11fb939
KR
5382
5383# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
5384# NAME is the cpp macro being defined and VALUE is the value it is being given.
5385#
5386# ac_d sets the value in "#define NAME VALUE" lines.
5387ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
5388ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
5389ac_dC='\3'
5390ac_dD='%g'
5391# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
5392ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
5393ac_uB='\([ ]\)%\1#\2define\3'
5394ac_uC=' '
5395ac_uD='\4%g'
5396# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
5397ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
5398ac_eB='$%\1#\2define\3'
5399ac_eC=' '
5400ac_eD='%g'
5401
c6c7035c
MM
5402if test "${CONFIG_HEADERS+set}" != set; then
5403EOF
5404cat >> $CONFIG_STATUS <<EOF
e2b4bd2a 5405 CONFIG_HEADERS="config.h:config.in"
c6c7035c
MM
5406EOF
5407cat >> $CONFIG_STATUS <<\EOF
5408fi
28d3e4a3 5409for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
c6c7035c 5410 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
b11fb939 5411 case "$ac_file" in
c6c7035c 5412 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
b11fb939
KR
5413 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
5414 *) ac_file_in="${ac_file}.in" ;;
5415 esac
5416
5417 echo creating $ac_file
5418
5419 rm -f conftest.frag conftest.in conftest.out
e2b4bd2a 5420 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
c6c7035c 5421 cat $ac_file_inputs > conftest.in
b11fb939
KR
5422
5423EOF
5424
5425# Transform confdefs.h into a sed script conftest.vals that substitutes
fb589130 5426# the proper values into config.h.in to produce config.h. And first:
1c9dbb83 5427# Protect against being on the right side of a sed subst in config.status.
fb589130 5428# Protect against being in an unquoted here document in config.status.
b11fb939
KR
5429rm -f conftest.vals
5430cat > conftest.hdr <<\EOF
b11fb939 5431s/[\\&%]/\\&/g
b11fb939 5432s%[\\$`]%\\&%g
df586de2 5433s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
b11fb939
KR
5434s%ac_d%ac_u%gp
5435s%ac_u%ac_e%gp
5436EOF
5437sed -n -f conftest.hdr confdefs.h > conftest.vals
5438rm -f conftest.hdr
5439
5440# This sed command replaces #undef with comments. This is necessary, for
5441# example, in the case of _POSIX_SOURCE, which is predefined and required
5442# on some systems where configure will not decide to define it.
5443cat >> conftest.vals <<\EOF
5444s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
5445EOF
5446
5447# Break up conftest.vals because some shells have a limit on
5448# the size of here documents, and old seds have small limits too.
b11fb939
KR
5449
5450rm -f conftest.tail
5451while :
5452do
5453 ac_lines=`grep -c . conftest.vals`
5454 # grep -c gives empty output for an empty file on some AIX systems.
5455 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
5456 # Write a limited-size here document to conftest.frag.
28d3e4a3
KR
5457 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
5458 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
b11fb939
KR
5459 echo 'CEOF
5460 sed -f conftest.frag conftest.in > conftest.out
5461 rm -f conftest.in
5462 mv conftest.out conftest.in
28d3e4a3 5463' >> $CONFIG_STATUS
b11fb939
KR
5464 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
5465 rm -f conftest.vals
5466 mv conftest.tail conftest.vals
5467done
5468rm -f conftest.vals
5469
28d3e4a3 5470cat >> $CONFIG_STATUS <<\EOF
b11fb939
KR
5471 rm -f conftest.frag conftest.h
5472 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
5473 cat conftest.in >> conftest.h
5474 rm -f conftest.in
5475 if cmp -s $ac_file conftest.h 2>/dev/null; then
5476 echo "$ac_file is unchanged"
5477 rm -f conftest.h
5478 else
df586de2
ILT
5479 # Remove last slash and all that follows it. Not all systems have dirname.
5480 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
5481 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
5482 # The file is in a subdirectory.
5483 test ! -d "$ac_dir" && mkdir "$ac_dir"
5484 fi
b11fb939
KR
5485 rm -f $ac_file
5486 mv conftest.h $ac_file
5487 fi
5488fi; done
5489
c6c7035c
MM
5490EOF
5491cat >> $CONFIG_STATUS <<EOF
6cc7a938 5492
515c7142
ILT
5493target_cpu_type=${target_cpu_type}
5494 obj_format=${obj_format}
5495 te_file=${te_file}
c6c7035c
MM
5496EOF
5497cat >> $CONFIG_STATUS <<\EOF
e2b4bd2a 5498test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h
515c7142
ILT
5499rm -f targ-cpu.c targ-cpu.h obj-format.h obj-format.c targ-env.h atof-targ.c itbl-cpu.h
5500 echo '#include "tc-'"${target_cpu_type}"'.h"' > targ-cpu.h
5501 echo '#include "obj-'"${obj_format}"'.h"' > obj-format.h
5502 echo '#include "te-'"${te_file}"'.h"' > targ-env.h
5503 echo '#include "itbl-'"${target_cpu_type}"'.h"' > itbl-cpu.h
39ffbb4d
DE
5504 case ${target_cpu_type} in
5505 m32r) echo '#include "opcodes/'"${target_cpu_type}"'-opc.h"' > cgen-opc.h ;;
5506 esac
48401fcf
TT
5507
5508 sed -e '/POTFILES =/r po/POTFILES' po/Makefile.in > po/Makefile
36e889af 5509exit 0
b11fb939 5510EOF
28d3e4a3 5511chmod +x $CONFIG_STATUS
bf111c9f 5512rm -fr confdefs* $ac_clean_files
833c46e1 5513test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
b11fb939 5514
This page took 0.405153 seconds and 4 git commands to generate.