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