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