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