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