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