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