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