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