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