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