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