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