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