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