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