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