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