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