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