* c-typeprint.c (c_type_print_cv_qualifier): Don't print `const'
[deliverable/binutils-gdb.git] / gas / configure
CommitLineData
252b5132 1#! /bin/sh
252b5132 2# Guess values for system-dependent variables and create Makefiles.
6840198f 3# Generated by Autoconf 2.49d.
252b5132 4#
6840198f
NC
5# Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
6# Free Software Foundation, Inc.
252b5132
RH
7# This configure script is free software; the Free Software Foundation
8# gives unlimited permission to copy, distribute and modify it.
9
6840198f
NC
10# Be Bourne compatible
11if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
12 emulate sh
13 NULLCMD=:
14elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
15 set -o posix
16fi
17
18if expr a : '\(a\)' >/dev/null 2>&1; then
19 as_expr=expr
20else
21 as_expr=false
22fi
23
24rm -f conf$$ conf$$.exe conf$$.file
25echo >conf$$.file
26if ln -s conf$$.file conf$$ 2>/dev/null; then
27 # We could just check for DJGPP; but this test a) works b) is more generic
28 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
29 if test -f conf$$.exe; then
30 # Don't use ln at all; we don't have any links
31 as_ln_s='cp -p'
32 else
33 as_ln_s='ln -s'
34 fi
35elif ln conf$$.file conf$$ 2>/dev/null; then
36 as_ln_s=ln
37else
38 as_ln_s='cp -p'
39fi
40rm -f conf$$ conf$$.exe conf$$.file
41
42as_executable_p="test -f"
43
44# Support unset when possible.
45if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
46 as_unset=unset
47else
48 as_unset=false
49fi
50
51# NLS nuisances.
52$as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
53$as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
54$as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
55$as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
56$as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
57$as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
58$as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
59$as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
60
61# IFS
62# We need space, tab and new line, in precisely that order.
63as_nl='
64'
65IFS=" $as_nl"
66
67# CDPATH.
68$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
69
70# Name of the host.
71# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
72# so uname gets run too.
73ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
74
75# Name of the executable.
76as_me=`echo "$0" | sed 's,.*/,,'`
77
78cat >config.log <<EOF
79This file contains any messages produced by compilers while
80running configure, to aid debugging if configure makes a mistake.
81
82It was created by $as_me 2.49d, executed with
83 > $0 $@
84
85EOF
86{
87cat <<_ASUNAME
88## ---------- ##
89## Platform. ##
90## ---------- ##
91
92hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
93uname -m = `(uname -m) 2>/dev/null || echo unknown`
94uname -r = `(uname -r) 2>/dev/null || echo unknown`
95uname -s = `(uname -s) 2>/dev/null || echo unknown`
96uname -v = `(uname -v) 2>/dev/null || echo unknown`
97
98/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
99/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
100
101/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
102/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
103/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
104hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
105/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
106/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
107/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
108
109PATH = $PATH
110
111_ASUNAME
112} >>config.log
113
114cat >>config.log <<EOF
115## ------------ ##
116## Core tests. ##
117## ------------ ##
118
119EOF
120
121# File descriptor usage:
122# 0 standard input
123# 1 file creation
124# 2 errors and warnings
125# 5 compiler messages saved in config.log
126# 6 checking for... messages and results
127exec 5>>config.log
128exec 6>&1
129
130#
131# Initializations.
132#
252b5132 133ac_default_prefix=/usr/local
6840198f
NC
134cross_compiling=no
135subdirs=
136MFLAGS= MAKEFLAGS=
137SHELL=${CONFIG_SHELL-/bin/sh}
138
139# Maximum number of lines to put in a shell here document.
140# This variable seems obsolete. It should probably be removed, and
141# only ac_max_sed_lines should be used.
142: ${ac_max_here_lines=38}
143
144# Avoid depending upon Character Ranges.
145ac_cr_az='abcdefghijklmnopqrstuvwxyz'
146ac_cr_AZ='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
147ac_cr_09='0123456789'
148ac_cr_alnum=$ac_cr_az$ac_cr_AZ$ac_cr_09
149
150# Sed expression to map a string onto a valid sh and CPP variable names.
151ac_tr_sh="sed y%*+%pp%;s%[^_$ac_cr_alnum]%_%g"
152ac_tr_cpp="sed y%*$ac_cr_az%P$ac_cr_AZ%;s%[^_$ac_cr_alnum]%_%g"
153
154ac_unique_file="as.h"
155# Factoring default headers for most tests.
156ac_includes_default="\
157#include <stdio.h>
158#include <sys/types.h>
159#include <sys/stat.h>
160#if STDC_HEADERS
161# include <stdlib.h>
162# include <stddef.h>
163#else
164# if HAVE_STDLIB_H
165# include <stdlib.h>
166# endif
167#endif
168#if HAVE_STRING_H
169# if !STDC_HEADERS && HAVE_MEMORY_H
170# include <memory.h>
171# endif
172# include <string.h>
173#else
174# if HAVE_STRINGS_H
175# include <strings.h>
176# endif
177#endif
178#if HAVE_INTTYPES_H
179# include <inttypes.h>
180#endif
181#if HAVE_UNISTD_H
182# include <unistd.h>
183#endif"
252b5132
RH
184
185# Initialize some variables set by options.
6840198f
NC
186ac_init_help=
187ac_init_version=false
252b5132
RH
188# The variables have the same names as the options, with
189# dashes changed to underlines.
6840198f 190cache_file=/dev/null
252b5132 191exec_prefix=NONE
252b5132 192no_create=
252b5132
RH
193no_recursion=
194prefix=NONE
195program_prefix=NONE
196program_suffix=NONE
197program_transform_name=s,x,x,
198silent=
199site=
200srcdir=
252b5132
RH
201verbose=
202x_includes=NONE
203x_libraries=NONE
6840198f
NC
204
205# Installation directory options.
206# These are left unexpanded so users can "make install exec_prefix=/foo"
207# and all the variables that are supposed to be based on exec_prefix
208# by default will actually change.
209# Use braces instead of parens because sh, perl, etc. also accept them.
252b5132
RH
210bindir='${exec_prefix}/bin'
211sbindir='${exec_prefix}/sbin'
212libexecdir='${exec_prefix}/libexec'
213datadir='${prefix}/share'
214sysconfdir='${prefix}/etc'
215sharedstatedir='${prefix}/com'
216localstatedir='${prefix}/var'
217libdir='${exec_prefix}/lib'
218includedir='${prefix}/include'
219oldincludedir='/usr/include'
220infodir='${prefix}/info'
221mandir='${prefix}/man'
222
6840198f
NC
223# Identity of this package.
224PACKAGE_NAME=
225PACKAGE_TARNAME=
226PACKAGE_VERSION=
227PACKAGE_STRING=
228PACKAGE_BUGREPORT=
252b5132
RH
229
230ac_prev=
231for ac_option
232do
252b5132
RH
233 # If the previous option needs an argument, assign it.
234 if test -n "$ac_prev"; then
235 eval "$ac_prev=\$ac_option"
236 ac_prev=
237 continue
238 fi
239
6840198f 240 ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
252b5132
RH
241
242 # Accept the important Cygnus configure options, so we can diagnose typos.
243
6840198f 244 case $ac_option in
252b5132
RH
245
246 -bindir | --bindir | --bindi | --bind | --bin | --bi)
247 ac_prev=bindir ;;
248 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
6840198f 249 bindir=$ac_optarg ;;
252b5132
RH
250
251 -build | --build | --buil | --bui | --bu)
6840198f 252 ac_prev=build_alias ;;
252b5132 253 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
6840198f 254 build_alias=$ac_optarg ;;
252b5132
RH
255
256 -cache-file | --cache-file | --cache-fil | --cache-fi \
257 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
258 ac_prev=cache_file ;;
259 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
260 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
6840198f
NC
261 cache_file=$ac_optarg ;;
262
263 --config-cache | -C)
264 cache_file=config.cache ;;
252b5132
RH
265
266 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
267 ac_prev=datadir ;;
268 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
269 | --da=*)
6840198f 270 datadir=$ac_optarg ;;
252b5132
RH
271
272 -disable-* | --disable-*)
6840198f 273 ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
252b5132 274 # Reject names that are not valid shell variable names.
6840198f
NC
275 expr "x$ac_feature" : ".*[^-_$ac_cr_alnum]" >/dev/null &&
276 { { echo "$as_me:276: error: invalid feature name: $ac_feature" >&5
277echo "$as_me: error: invalid feature name: $ac_feature" >&2;}
278 { (exit 1); exit 1; }; }
279 ac_feature=`echo $ac_feature | sed 's/-/_/g'`
280 eval "enable_$ac_feature=no" ;;
252b5132
RH
281
282 -enable-* | --enable-*)
6840198f 283 ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
252b5132 284 # Reject names that are not valid shell variable names.
6840198f
NC
285 expr "x$ac_feature" : ".*[^-_$ac_cr_alnum]" >/dev/null &&
286 { { echo "$as_me:286: error: invalid feature name: $ac_feature" >&5
287echo "$as_me: error: invalid feature name: $ac_feature" >&2;}
288 { (exit 1); exit 1; }; }
289 ac_feature=`echo $ac_feature | sed 's/-/_/g'`
290 case $ac_option in
291 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
252b5132
RH
292 *) ac_optarg=yes ;;
293 esac
6840198f 294 eval "enable_$ac_feature='$ac_optarg'" ;;
252b5132
RH
295
296 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
297 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
298 | --exec | --exe | --ex)
299 ac_prev=exec_prefix ;;
300 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
301 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
302 | --exec=* | --exe=* | --ex=*)
6840198f 303 exec_prefix=$ac_optarg ;;
252b5132
RH
304
305 -gas | --gas | --ga | --g)
306 # Obsolete; use --with-gas.
307 with_gas=yes ;;
308
6840198f
NC
309 -help | --help | --hel | --he | -h)
310 ac_init_help=long ;;
311 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
312 ac_init_help=recursive ;;
313 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
314 ac_init_help=short ;;
252b5132
RH
315
316 -host | --host | --hos | --ho)
6840198f 317 ac_prev=host_alias ;;
252b5132 318 -host=* | --host=* | --hos=* | --ho=*)
6840198f 319 host_alias=$ac_optarg ;;
252b5132
RH
320
321 -includedir | --includedir | --includedi | --included | --include \
322 | --includ | --inclu | --incl | --inc)
323 ac_prev=includedir ;;
324 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
325 | --includ=* | --inclu=* | --incl=* | --inc=*)
6840198f 326 includedir=$ac_optarg ;;
252b5132
RH
327
328 -infodir | --infodir | --infodi | --infod | --info | --inf)
329 ac_prev=infodir ;;
330 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
6840198f 331 infodir=$ac_optarg ;;
252b5132
RH
332
333 -libdir | --libdir | --libdi | --libd)
334 ac_prev=libdir ;;
335 -libdir=* | --libdir=* | --libdi=* | --libd=*)
6840198f 336 libdir=$ac_optarg ;;
252b5132
RH
337
338 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
339 | --libexe | --libex | --libe)
340 ac_prev=libexecdir ;;
341 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
342 | --libexe=* | --libex=* | --libe=*)
6840198f 343 libexecdir=$ac_optarg ;;
252b5132
RH
344
345 -localstatedir | --localstatedir | --localstatedi | --localstated \
346 | --localstate | --localstat | --localsta | --localst \
347 | --locals | --local | --loca | --loc | --lo)
348 ac_prev=localstatedir ;;
349 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
350 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
351 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
6840198f 352 localstatedir=$ac_optarg ;;
252b5132
RH
353
354 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
355 ac_prev=mandir ;;
356 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
6840198f 357 mandir=$ac_optarg ;;
252b5132
RH
358
359 -nfp | --nfp | --nf)
360 # Obsolete; use --without-fp.
361 with_fp=no ;;
362
363 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
364 | --no-cr | --no-c)
365 no_create=yes ;;
366
367 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
368 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
369 no_recursion=yes ;;
370
371 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
372 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
373 | --oldin | --oldi | --old | --ol | --o)
374 ac_prev=oldincludedir ;;
375 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
376 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
377 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
6840198f 378 oldincludedir=$ac_optarg ;;
252b5132
RH
379
380 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
381 ac_prev=prefix ;;
382 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
6840198f 383 prefix=$ac_optarg ;;
252b5132
RH
384
385 -program-prefix | --program-prefix | --program-prefi | --program-pref \
386 | --program-pre | --program-pr | --program-p)
387 ac_prev=program_prefix ;;
388 -program-prefix=* | --program-prefix=* | --program-prefi=* \
389 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
6840198f 390 program_prefix=$ac_optarg ;;
252b5132
RH
391
392 -program-suffix | --program-suffix | --program-suffi | --program-suff \
393 | --program-suf | --program-su | --program-s)
394 ac_prev=program_suffix ;;
395 -program-suffix=* | --program-suffix=* | --program-suffi=* \
396 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
6840198f 397 program_suffix=$ac_optarg ;;
252b5132
RH
398
399 -program-transform-name | --program-transform-name \
400 | --program-transform-nam | --program-transform-na \
401 | --program-transform-n | --program-transform- \
402 | --program-transform | --program-transfor \
403 | --program-transfo | --program-transf \
404 | --program-trans | --program-tran \
405 | --progr-tra | --program-tr | --program-t)
406 ac_prev=program_transform_name ;;
407 -program-transform-name=* | --program-transform-name=* \
408 | --program-transform-nam=* | --program-transform-na=* \
409 | --program-transform-n=* | --program-transform-=* \
410 | --program-transform=* | --program-transfor=* \
411 | --program-transfo=* | --program-transf=* \
412 | --program-trans=* | --program-tran=* \
413 | --progr-tra=* | --program-tr=* | --program-t=*)
6840198f 414 program_transform_name=$ac_optarg ;;
252b5132
RH
415
416 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
417 | -silent | --silent | --silen | --sile | --sil)
418 silent=yes ;;
419
420 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
421 ac_prev=sbindir ;;
422 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
423 | --sbi=* | --sb=*)
6840198f 424 sbindir=$ac_optarg ;;
252b5132
RH
425
426 -sharedstatedir | --sharedstatedir | --sharedstatedi \
427 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
428 | --sharedst | --shareds | --shared | --share | --shar \
429 | --sha | --sh)
430 ac_prev=sharedstatedir ;;
431 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
432 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
433 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
434 | --sha=* | --sh=*)
6840198f 435 sharedstatedir=$ac_optarg ;;
252b5132
RH
436
437 -site | --site | --sit)
438 ac_prev=site ;;
439 -site=* | --site=* | --sit=*)
6840198f 440 site=$ac_optarg ;;
252b5132
RH
441
442 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
443 ac_prev=srcdir ;;
444 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
6840198f 445 srcdir=$ac_optarg ;;
252b5132
RH
446
447 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
448 | --syscon | --sysco | --sysc | --sys | --sy)
449 ac_prev=sysconfdir ;;
450 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
451 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
6840198f 452 sysconfdir=$ac_optarg ;;
252b5132
RH
453
454 -target | --target | --targe | --targ | --tar | --ta | --t)
6840198f 455 ac_prev=target_alias ;;
252b5132 456 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
6840198f 457 target_alias=$ac_optarg ;;
252b5132
RH
458
459 -v | -verbose | --verbose | --verbos | --verbo | --verb)
460 verbose=yes ;;
461
6840198f
NC
462 -version | --version | --versio | --versi | --vers | -V)
463 ac_init_version=: ;;
252b5132
RH
464
465 -with-* | --with-*)
6840198f 466 ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
252b5132 467 # Reject names that are not valid shell variable names.
6840198f
NC
468 expr "x$ac_package" : ".*[^-_$ac_cr_alnum]" >/dev/null &&
469 { { echo "$as_me:469: error: invalid package name: $ac_package" >&5
470echo "$as_me: error: invalid package name: $ac_package" >&2;}
471 { (exit 1); exit 1; }; }
252b5132 472 ac_package=`echo $ac_package| sed 's/-/_/g'`
6840198f
NC
473 case $ac_option in
474 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
252b5132
RH
475 *) ac_optarg=yes ;;
476 esac
6840198f 477 eval "with_$ac_package='$ac_optarg'" ;;
252b5132
RH
478
479 -without-* | --without-*)
6840198f 480 ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
252b5132 481 # Reject names that are not valid shell variable names.
6840198f
NC
482 expr "x$ac_package" : ".*[^-_$ac_cr_alnum]" >/dev/null &&
483 { { echo "$as_me:483: error: invalid package name: $ac_package" >&5
484echo "$as_me: error: invalid package name: $ac_package" >&2;}
485 { (exit 1); exit 1; }; }
486 ac_package=`echo $ac_package | sed 's/-/_/g'`
487 eval "with_$ac_package=no" ;;
252b5132
RH
488
489 --x)
490 # Obsolete; use --with-x.
491 with_x=yes ;;
492
493 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
494 | --x-incl | --x-inc | --x-in | --x-i)
495 ac_prev=x_includes ;;
496 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
497 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
6840198f 498 x_includes=$ac_optarg ;;
252b5132
RH
499
500 -x-libraries | --x-libraries | --x-librarie | --x-librari \
501 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
502 ac_prev=x_libraries ;;
503 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
504 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
6840198f 505 x_libraries=$ac_optarg ;;
252b5132 506
6840198f
NC
507 -*) { { echo "$as_me:507: error: unrecognized option: $ac_option
508Try \`$0 --help' for more information." >&5
509echo "$as_me: error: unrecognized option: $ac_option
510Try \`$0 --help' for more information." >&2;}
511 { (exit 1); exit 1; }; }
252b5132
RH
512 ;;
513
6840198f
NC
514 *=*)
515 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
516 # Reject names that are not valid shell variable names.
517 expr "x$ac_envvar" : ".*[^_$ac_cr_alnum]" >/dev/null &&
518 { { echo "$as_me:518: error: invalid variable name: $ac_envvar" >&5
519echo "$as_me: error: invalid variable name: $ac_envvar" >&2;}
520 { (exit 1); exit 1; }; }
521 ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
522 eval "$ac_envvar='$ac_optarg'"
523 export $ac_envvar ;;
524
252b5132 525 *)
6840198f
NC
526 # FIXME: should be removed in autoconf 3.0.
527 { echo "$as_me:527: WARNING: you should use --build, --host, --target" >&5
528echo "$as_me: WARNING: you should use --build, --host, --target" >&2;}
529 expr "x$ac_option" : ".*[^-._$ac_cr_alnum]" >/dev/null &&
530 { echo "$as_me:530: WARNING: invalid host type: $ac_option" >&5
531echo "$as_me: WARNING: invalid host type: $ac_option" >&2;}
532 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
252b5132
RH
533 ;;
534
535 esac
536done
537
538if test -n "$ac_prev"; then
6840198f
NC
539 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
540 { { echo "$as_me:540: error: missing argument to $ac_option" >&5
541echo "$as_me: error: missing argument to $ac_option" >&2;}
542 { (exit 1); exit 1; }; }
252b5132 543fi
252b5132 544
6840198f
NC
545# Be sure to have absolute paths.
546for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
547 localstatedir libdir includedir oldincludedir infodir mandir \
548 exec_prefix prefix
252b5132 549do
6840198f
NC
550 eval ac_val=$`echo $ac_var`
551 case $ac_val in
552 [\\/$]* | ?:[\\/]* ) ;;
553 NONE ) ;;
554 *) { { echo "$as_me:554: error: expected an absolute path for --$ac_var: $ac_val" >&5
555echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2;}
556 { (exit 1); exit 1; }; };;
252b5132
RH
557 esac
558done
559
6840198f
NC
560# There might be people who depend on the old broken behavior: `$host'
561# used to hold the argument of --host etc.
562build=$build_alias
563host=$host_alias
564target=$target_alias
565
566# FIXME: should be removed in autoconf 3.0.
567if test "x$host_alias" != x; then
568 if test "x$build_alias" = x; then
569 cross_compiling=maybe
570 { echo "$as_me:570: WARNING: If you wanted to set the --build type, don't use --host.
571 If a cross compiler is detected then cross compile mode will be used." >&5
572echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
573 If a cross compiler is detected then cross compile mode will be used." >&2;}
574 elif test "x$build_alias" != "x$host_alias"; then
575 cross_compiling=yes
576 fi
577fi
252b5132 578
6840198f
NC
579ac_tool_prefix=
580test -n "$host_alias" && ac_tool_prefix=$host_alias-
252b5132 581
6840198f 582test "$silent" = yes && exec 6>/dev/null
252b5132
RH
583
584# Find the source files, if location was not specified.
585if test -z "$srcdir"; then
586 ac_srcdir_defaulted=yes
587 # Try the directory containing this script, then its parent.
588 ac_prog=$0
6840198f 589 ac_confdir=`echo "$ac_prog" | sed 's%/[^/][^/]*$%%'`
252b5132
RH
590 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
591 srcdir=$ac_confdir
592 if test ! -r $srcdir/$ac_unique_file; then
593 srcdir=..
594 fi
595else
596 ac_srcdir_defaulted=no
597fi
598if test ! -r $srcdir/$ac_unique_file; then
599 if test "$ac_srcdir_defaulted" = yes; then
6840198f
NC
600 { { echo "$as_me:600: error: cannot find sources in $ac_confdir or .." >&5
601echo "$as_me: error: cannot find sources in $ac_confdir or .." >&2;}
602 { (exit 1); exit 1; }; }
252b5132 603 else
6840198f
NC
604 { { echo "$as_me:604: error: cannot find sources in $srcdir" >&5
605echo "$as_me: error: cannot find sources in $srcdir" >&2;}
606 { (exit 1); exit 1; }; }
252b5132
RH
607 fi
608fi
6840198f
NC
609srcdir=`echo "$srcdir" | sed 's%\([^/]\)/*$%\1%'`
610ac_env_build_alias_set=${build_alias+set}
611ac_env_build_alias_value=$build_alias
612ac_cv_env_build_alias_set=${build_alias+set}
613ac_cv_env_build_alias_value=$build_alias
614ac_env_host_alias_set=${host_alias+set}
615ac_env_host_alias_value=$host_alias
616ac_cv_env_host_alias_set=${host_alias+set}
617ac_cv_env_host_alias_value=$host_alias
618ac_env_target_alias_set=${target_alias+set}
619ac_env_target_alias_value=$target_alias
620ac_cv_env_target_alias_set=${target_alias+set}
621ac_cv_env_target_alias_value=$target_alias
622ac_env_CC_set=${CC+set}
623ac_env_CC_value=$CC
624ac_cv_env_CC_set=${CC+set}
625ac_cv_env_CC_value=$CC
626ac_env_CFLAGS_set=${CFLAGS+set}
627ac_env_CFLAGS_value=$CFLAGS
628ac_cv_env_CFLAGS_set=${CFLAGS+set}
629ac_cv_env_CFLAGS_value=$CFLAGS
630ac_env_LDFLAGS_set=${LDFLAGS+set}
631ac_env_LDFLAGS_value=$LDFLAGS
632ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
633ac_cv_env_LDFLAGS_value=$LDFLAGS
634ac_env_CPP_set=${CPP+set}
635ac_env_CPP_value=$CPP
636ac_cv_env_CPP_set=${CPP+set}
637ac_cv_env_CPP_value=$CPP
638ac_env_CPPFLAGS_set=${CPPFLAGS+set}
639ac_env_CPPFLAGS_value=$CPPFLAGS
640ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
641ac_cv_env_CPPFLAGS_value=$CPPFLAGS
642
643#
644# Report the --help message.
645#
646if test "$ac_init_help" = "long"; then
647 # Omit some internal or obsolete options to make the list less imposing.
648 # This message is too long to be a string in the A/UX 3.1 sh.
649 cat <<EOF
650\`configure' configures this package to adapt to many kinds of systems.
651
652Usage: $0 [OPTION]... [VAR=VALUE]...
653
654To assign environment variables (e.g., CC, CFLAGS...), specify them as
655VAR=VALUE. See below for descriptions of some of the useful variables.
656
657Defaults for the options are specified in brackets.
658
659Configuration:
660 -h, --help display this help and exit
661 --help=short display options specific to this package
662 --help=recursive display the short help of all the included packages
663 -V, --version display version information and exit
664 -q, --quiet, --silent do not print \`checking...' messages
665 --cache-file=FILE cache test results in FILE [disabled]
666 -C, --config-cache alias for \`--cache-file=config.cache'
667 -n, --no-create do not create output files
668 --srcdir=DIR find the sources in DIR [configure dir or \`..']
669
670EOF
671
672 cat <<EOF
673Installation directories:
674 --prefix=PREFIX install architecture-independent files in PREFIX
675 [$ac_default_prefix]
676 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
677 [PREFIX]
678
679By default, \`make install' will install all the files in
680\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
681an installation prefix other than \`$ac_default_prefix' using \`--prefix',
682for instance \`--prefix=\$HOME'.
683
684For better control, use the options below.
685
686Fine tuning of the installation directories:
687 --bindir=DIR user executables [EPREFIX/bin]
688 --sbindir=DIR system admin executables [EPREFIX/sbin]
689 --libexecdir=DIR program executables [EPREFIX/libexec]
690 --datadir=DIR read-only architecture-independent data [PREFIX/share]
691 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
692 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
693 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
694 --libdir=DIR object code libraries [EPREFIX/lib]
695 --includedir=DIR C header files [PREFIX/include]
696 --oldincludedir=DIR C header files for non-gcc [/usr/include]
697 --infodir=DIR info documentation [PREFIX/info]
698 --mandir=DIR man documentation [PREFIX/man]
699EOF
700
701 cat <<\EOF
702
703Program names:
704 --program-prefix=PREFIX prepend PREFIX to installed program names
705 --program-suffix=SUFFIX append SUFFIX to installed program names
706 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
707
708System types:
709 --build=BUILD configure for building on BUILD [guessed]
710 --host=HOST build programs to run on HOST [BUILD]
711 --target=TARGET configure for building compilers for TARGET [HOST]
712EOF
713fi
714
715if test -n "$ac_init_help"; then
716
717 cat <<\EOF
718
719Optional Features:
720 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
721 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
722 --enable-shared=PKGS build shared libraries default=yes
723 --enable-static=PKGS build static libraries default=yes
724 --enable-fast-install=PKGS optimize for fast installation default=yes
725 --disable-libtool-lock avoid locking (might break parallel builds)
726 --enable-bfd-assembler use BFD back end for writing object files
727 targets alternative target configurations besides the primary
728 --enable-commonbfdlib build shared BFD/opcodes/libiberty library
729 --enable-build-warnings Enable build-time compiler warnings if gcc is used
730 --disable-nls do not use Native Language Support
731 --enable-maintainer-mode enable make rules and dependencies not useful
732 (and sometimes confusing) to the casual installer
733
734Optional Packages:
735 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
736 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
737 --with-gnu-ld assume the C compiler uses GNU ld default=no
738 --with-pic try to use only PIC/non-PIC objects default=use both
739 --with-included-gettext use the GNU gettext library included here
740
741Some influential environment variables:
742 CC C compiler command
743 CFLAGS C compiler flags
744 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
745 nonstandard directory <lib dir>
746 CPP C preprocessor
747 CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
748 headers in a nonstandard directory <include dir>
749
750Use these variables to override the choices made by `configure' or to help
751it to find libraries and programs with nonstandard names/locations.
752
753EOF
754fi
755
756if test "$ac_init_help" = "recursive"; then
757 # If there are subdirs, report their specific --help.
758 ac_popdir=`pwd`
759 for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
760 cd $ac_subdir
761 # A "../" for each directory in /$ac_subdir.
762 ac_dots=`echo $ac_subdir |
763 sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
764
765 case $srcdir in
766 .) # No --srcdir option. We are building in place.
767 ac_sub_srcdir=$srcdir ;;
768 [\\/]* | ?:[\\/]* ) # Absolute path.
769 ac_sub_srcdir=$srcdir/$ac_subdir ;;
770 *) # Relative path.
771 ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;;
772 esac
773
774 # Check for guested configure; otherwise get Cygnus style configure.
775 if test -f $ac_sub_srcdir/configure.gnu; then
776 echo
777 $SHELL $ac_sub_srcdir/configure.gnu --help=recursive
778 elif test -f $ac_sub_srcdir/configure; then
779 echo
780 $SHELL $ac_sub_srcdir/configure --help=recursive
781 elif test -f $ac_sub_srcdir/configure.ac ||
782 test -f $ac_sub_srcdir/configure.in; then
783 echo
784 $ac_configure --help
785 else
786 { echo "$as_me:786: WARNING: no configuration information is in $ac_subdir" >&5
787echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2;}
788 fi
789 cd $ac_popdir
790 done
791fi
792
793test -n "$ac_init_help" && exit 0
794if $ac_init_version; then
795 cat <<\EOF
796
797Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
798Free Software Foundation, Inc.
799This configure script is free software; the Free Software Foundation
800gives unlimited permission to copy, distribute and modify it.
801EOF
802 exit 0
803fi
804
805# Keep a trace of the command line.
806# Strip out --no-create and --no-recursion so they do not pile up.
807# Also quote any args containing shell meta-characters.
808ac_configure_args=
809ac_sep=
810for ac_arg
811do
812 case $ac_arg in
813 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
814 | --no-cr | --no-c) ;;
815 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
816 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
817 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
818 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
819 ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
820 ac_sep=" " ;;
821 *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
822 ac_sep=" " ;;
823 esac
824 # Get rid of the leading space.
825done
826
827# When interrupted or exit'd, cleanup temporary files, and complete
828# config.log. We remove comments because anyway the quotes in there
829# would cause problems or look ugly.
830trap 'exit_status=$?
831 # Save into config.log some information that might help in debugging.
832 echo >&5
833 echo "## ----------------- ##" >&5
834 echo "## Cache variables. ##" >&5
835 echo "## ----------------- ##" >&5
836 echo >&5
837 # The following way of writing the cache mishandles newlines in values,
838{
839 (set) 2>&1 |
840 case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
841 *ac_space=\ *)
842 sed -n \
843 "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
844 s/^\\([_$ac_cr_alnum]*_cv_[_$ac_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
845 ;;
846 *)
847 sed -n \
848 "s/^\\([_$ac_cr_alnum]*_cv_[_$ac_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
849 ;;
850 esac;
851} >&5
852 sed "/^$/d" confdefs.h >conftest.log
853 if test -s conftest.log; then
854 echo >&5
855 echo "## ------------ ##" >&5
856 echo "## confdefs.h. ##" >&5
857 echo "## ------------ ##" >&5
858 echo >&5
859 cat conftest.log >&5
860 fi
861 (echo; echo) >&5
862 test "$ac_signal" != 0 &&
863 echo "$as_me: caught signal $ac_signal" >&5
864 echo "$as_me: exit $exit_status" >&5
865 rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
866 exit $exit_status
867 ' 0
868for ac_signal in 1 2 13 15; do
869 trap 'ac_status=$?; ac_signal='$ac_signal'; { (exit $ac_status); exit $ac_status; }' $ac_signal
870done
871ac_signal=0
872
873# confdefs.h avoids OS command line length limits that DEFS can exceed.
874rm -rf conftest* confdefs.h
875# AIX cpp loses on an empty file, so make sure it contains at least a newline.
876echo >confdefs.h
252b5132 877
6840198f 878# Let the site file select an alternate cache file if it wants to.
252b5132 879# Prefer explicitly selected file to automatically selected ones.
af9539e4
L
880if test -z "$CONFIG_SITE"; then
881 if test "x$prefix" != xNONE; then
882 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
883 else
884 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
252b5132
RH
885 fi
886fi
887for ac_site_file in $CONFIG_SITE; do
888 if test -r "$ac_site_file"; then
6840198f
NC
889 { echo "$as_me:889: loading site script $ac_site_file" >&5
890echo "$as_me: loading site script $ac_site_file" >&6;}
891 cat "$ac_site_file" >&5
252b5132
RH
892 . "$ac_site_file"
893 fi
894done
895
896if test -r "$cache_file"; then
6840198f
NC
897 # Some versions of bash will fail to source /dev/null (special
898 # files actually), so we avoid doing that.
899 if test -f "$cache_file"; then
900 { echo "$as_me:900: loading cache $cache_file" >&5
901echo "$as_me: loading cache $cache_file" >&6;}
902 case $cache_file in
903 [\\/]* | ?:[\\/]* ) . $cache_file;;
904 *) . ./$cache_file;;
905 esac
906 fi
252b5132 907else
6840198f
NC
908 { echo "$as_me:908: creating cache $cache_file" >&5
909echo "$as_me: creating cache $cache_file" >&6;}
910 >$cache_file
911fi
912
913# Check that the precious variables saved in the cache have kept the same
914# value.
915ac_suggest_removing_cache=false
916for ac_var in `(set) 2>&1 |
917 sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
918 eval ac_old_set=\$ac_cv_env_${ac_var}_set
919 eval ac_new_set=\$ac_env_${ac_var}_set
920 eval ac_old_val="\$ac_cv_env_${ac_var}_value"
921 eval ac_new_val="\$ac_env_${ac_var}_value"
922 case $ac_old_set,$ac_new_set in
923 set,)
924 { echo "$as_me:924: WARNING: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
925echo "$as_me: WARNING: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
926 ac_suggest_removing_cache=: ;;
927 ,set)
928 { echo "$as_me:928: WARNING: \`$ac_var' was not set in the previous run" >&5
929echo "$as_me: WARNING: \`$ac_var' was not set in the previous run" >&2;}
930 ac_suggest_removing_cache=: ;;
931 ,);;
932 *)
933 if test "x$ac_old_val" != "x$ac_new_val"; then
934 { echo "$as_me:934: WARNING: \`$ac_var' has changed since the previous run:" >&5
935echo "$as_me: WARNING: \`$ac_var' has changed since the previous run:" >&2;}
936 { echo "$as_me:936: WARNING: former value: $ac_old_val" >&5
937echo "$as_me: WARNING: former value: $ac_old_val" >&2;}
938 { echo "$as_me:938: WARNING: current value: $ac_new_val" >&5
939echo "$as_me: WARNING: current value: $ac_new_val" >&2;}
940 ac_suggest_removing_cache=:
941 fi;;
942 esac
943done
944if $ac_suggest_removing_cache; then
945 { echo "$as_me:945: WARNING: changes in the environment can compromise the build" >&5
946echo "$as_me: WARNING: changes in the environment can compromise the build" >&2;}
947 { echo "$as_me:947: WARNING: consider removing $cache_file and starting over" >&5
948echo "$as_me: WARNING: consider removing $cache_file and starting over" >&2;}
252b5132
RH
949fi
950
951ac_ext=c
252b5132 952ac_cpp='$CPP $CPPFLAGS'
6840198f
NC
953ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
954ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
955ac_compiler_gnu=$ac_cv_c_compiler_gnu
956
957case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
958 *c*,-n*) ECHO_N= ECHO_C='
959' ECHO_T=' ' ;;
960 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
961 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
962esac
963echo "#! $SHELL" >conftest.sh
964echo "exit 0" >>conftest.sh
965chmod +x conftest.sh
966if { (echo "$as_me:966: PATH=\".;.\"; conftest.sh") >&5
967 (PATH=".;."; conftest.sh) 2>&5
968 ac_status=$?
969 echo "$as_me:969: \$? = $ac_status" >&5
970 (exit $ac_status); }; then
971 ac_path_separator=';'
ac48eca1 972else
6840198f 973 ac_path_separator=:
ac48eca1 974fi
6840198f
NC
975PATH_SEPARATOR="$ac_path_separator"
976rm -f conftest.sh
252b5132
RH
977
978ac_aux_dir=
979for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
980 if test -f $ac_dir/install-sh; then
981 ac_aux_dir=$ac_dir
982 ac_install_sh="$ac_aux_dir/install-sh -c"
983 break
984 elif test -f $ac_dir/install.sh; then
985 ac_aux_dir=$ac_dir
986 ac_install_sh="$ac_aux_dir/install.sh -c"
987 break
6840198f
NC
988 elif test -f $ac_dir/shtool; then
989 ac_aux_dir=$ac_dir
990 ac_install_sh="$ac_aux_dir/shtool install -c"
991 break
252b5132
RH
992 fi
993done
994if test -z "$ac_aux_dir"; then
6840198f
NC
995 { { echo "$as_me:995: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
996echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
997 { (exit 1); exit 1; }; }
252b5132 998fi
6840198f
NC
999ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1000ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1001ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
252b5132 1002
6840198f
NC
1003# Make sure we can run config.sub.
1004$ac_config_sub sun4 >/dev/null 2>&1 ||
1005 { { echo "$as_me:1005: error: cannot run $ac_config_sub" >&5
1006echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1007 { (exit 1); exit 1; }; }
1008
1009echo "$as_me:1009: checking build system type" >&5
1010echo $ECHO_N "checking build system type... $ECHO_C" >&6
1011if test "${ac_cv_build+set}" = set; then
1012 echo $ECHO_N "(cached) $ECHO_C" >&6
1013else
1014 ac_cv_build_alias=$build_alias
1015test -z "$ac_cv_build_alias" &&
1016 ac_cv_build_alias=`$ac_config_guess`
1017test -z "$ac_cv_build_alias" &&
1018 { { echo "$as_me:1018: error: cannot guess build type; you must specify one" >&5
1019echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1020 { (exit 1); exit 1; }; }
1021ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1022 { { echo "$as_me:1022: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1023echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1024 { (exit 1); exit 1; }; }
1025
1026fi
1027echo "$as_me:1027: result: $ac_cv_build" >&5
1028echo "${ECHO_T}$ac_cv_build" >&6
1029build=$ac_cv_build
1030build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1031build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1032build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1033
1034echo "$as_me:1034: checking host system type" >&5
1035echo $ECHO_N "checking host system type... $ECHO_C" >&6
1036if test "${ac_cv_host+set}" = set; then
1037 echo $ECHO_N "(cached) $ECHO_C" >&6
1038else
1039 ac_cv_host_alias=$host_alias
1040test -z "$ac_cv_host_alias" &&
1041 ac_cv_host_alias=$ac_cv_build_alias
1042ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1043 { { echo "$as_me:1043: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1044echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1045 { (exit 1); exit 1; }; }
1046
1047fi
1048echo "$as_me:1048: result: $ac_cv_host" >&5
1049echo "${ECHO_T}$ac_cv_host" >&6
1050host=$ac_cv_host
1051host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1052host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1053host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1054
1055echo "$as_me:1055: checking target system type" >&5
1056echo $ECHO_N "checking target system type... $ECHO_C" >&6
1057if test "${ac_cv_target+set}" = set; then
1058 echo $ECHO_N "(cached) $ECHO_C" >&6
1059else
1060 ac_cv_target_alias=$target_alias
1061test "x$ac_cv_target_alias" = "x" &&
1062 ac_cv_target_alias=$ac_cv_host_alias
1063ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
1064 { { echo "$as_me:1064: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1065echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1066 { (exit 1); exit 1; }; }
1067
1068fi
1069echo "$as_me:1069: result: $ac_cv_target" >&5
1070echo "${ECHO_T}$ac_cv_target" >&6
1071target=$ac_cv_target
1072target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1073target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1074target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
252b5132
RH
1075
1076# The aliases save the names the user supplied, while $host etc.
1077# will get canonicalized.
6840198f 1078test -n "$target_alias" &&
252b5132
RH
1079 test "$program_prefix$program_suffix$program_transform_name" = \
1080 NONENONEs,x,x, &&
1081 program_prefix=${target_alias}-
6840198f
NC
1082ac_ext=c
1083ac_cpp='$CPP $CPPFLAGS'
1084ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1085ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1086ac_compiler_gnu=$ac_cv_c_compiler_gnu
1087if test -n "$ac_tool_prefix"; then
1088 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1089set dummy ${ac_tool_prefix}gcc; ac_word=$2
1090echo "$as_me:1090: checking for $ac_word" >&5
1091echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1092if test "${ac_cv_prog_CC+set}" = set; then
1093 echo $ECHO_N "(cached) $ECHO_C" >&6
7463c317 1094else
6840198f
NC
1095 if test -n "$CC"; then
1096 ac_cv_prog_CC="$CC" # Let the user override the test.
1097else
1098 ac_save_IFS=$IFS; IFS=$ac_path_separator
1099ac_dummy="$PATH"
1100for ac_dir in $ac_dummy; do
1101 IFS=$ac_save_IFS
1102 test -z "$ac_dir" && ac_dir=.
1103 $as_executable_p "$ac_dir/$ac_word" || continue
1104ac_cv_prog_CC="${ac_tool_prefix}gcc"
1105break
1106done
5d64ca4e 1107
6840198f
NC
1108fi
1109fi
1110CC=$ac_cv_prog_CC
1111if test -n "$CC"; then
1112 echo "$as_me:1112: result: $CC" >&5
1113echo "${ECHO_T}$CC" >&6
5d64ca4e 1114else
6840198f
NC
1115 echo "$as_me:1115: result: no" >&5
1116echo "${ECHO_T}no" >&6
5d64ca4e 1117fi
5d64ca4e
L
1118
1119fi
6840198f
NC
1120if test -z "$ac_cv_prog_CC"; then
1121 ac_ct_CC=$CC
1122 # Extract the first word of "gcc", so it can be a program name with args.
1123set dummy gcc; ac_word=$2
1124echo "$as_me:1124: checking for $ac_word" >&5
1125echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1126if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1127 echo $ECHO_N "(cached) $ECHO_C" >&6
1128else
1129 if test -n "$ac_ct_CC"; then
1130 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1131else
1132 ac_save_IFS=$IFS; IFS=$ac_path_separator
1133ac_dummy="$PATH"
1134for ac_dir in $ac_dummy; do
1135 IFS=$ac_save_IFS
1136 test -z "$ac_dir" && ac_dir=.
1137 $as_executable_p "$ac_dir/$ac_word" || continue
1138ac_cv_prog_ac_ct_CC="gcc"
1139break
1140done
1141
1142fi
1143fi
1144ac_ct_CC=$ac_cv_prog_ac_ct_CC
1145if test -n "$ac_ct_CC"; then
1146 echo "$as_me:1146: result: $ac_ct_CC" >&5
1147echo "${ECHO_T}$ac_ct_CC" >&6
5d64ca4e 1148else
6840198f
NC
1149 echo "$as_me:1149: result: no" >&5
1150echo "${ECHO_T}no" >&6
5d64ca4e
L
1151fi
1152
6840198f
NC
1153 CC=$ac_ct_CC
1154else
1155 CC="$ac_cv_prog_CC"
1156fi
27b7e12d 1157
6840198f
NC
1158if test -z "$CC"; then
1159 if test -n "$ac_tool_prefix"; then
1160 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1161set dummy ${ac_tool_prefix}cc; ac_word=$2
1162echo "$as_me:1162: checking for $ac_word" >&5
1163echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1164if test "${ac_cv_prog_CC+set}" = set; then
1165 echo $ECHO_N "(cached) $ECHO_C" >&6
1166else
1167 if test -n "$CC"; then
1168 ac_cv_prog_CC="$CC" # Let the user override the test.
1169else
1170 ac_save_IFS=$IFS; IFS=$ac_path_separator
1171ac_dummy="$PATH"
1172for ac_dir in $ac_dummy; do
1173 IFS=$ac_save_IFS
1174 test -z "$ac_dir" && ac_dir=.
1175 $as_executable_p "$ac_dir/$ac_word" || continue
1176ac_cv_prog_CC="${ac_tool_prefix}cc"
1177break
1178done
1179
1180fi
1181fi
1182CC=$ac_cv_prog_CC
1183if test -n "$CC"; then
1184 echo "$as_me:1184: result: $CC" >&5
1185echo "${ECHO_T}$CC" >&6
1186else
1187 echo "$as_me:1187: result: no" >&5
1188echo "${ECHO_T}no" >&6
1189fi
1190
1191fi
1192if test -z "$ac_cv_prog_CC"; then
1193 ac_ct_CC=$CC
1194 # Extract the first word of "cc", so it can be a program name with args.
1195set dummy cc; ac_word=$2
1196echo "$as_me:1196: checking for $ac_word" >&5
1197echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1198if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1199 echo $ECHO_N "(cached) $ECHO_C" >&6
1200else
1201 if test -n "$ac_ct_CC"; then
1202 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1203else
1204 ac_save_IFS=$IFS; IFS=$ac_path_separator
1205ac_dummy="$PATH"
1206for ac_dir in $ac_dummy; do
1207 IFS=$ac_save_IFS
1208 test -z "$ac_dir" && ac_dir=.
1209 $as_executable_p "$ac_dir/$ac_word" || continue
1210ac_cv_prog_ac_ct_CC="cc"
1211break
1212done
1213
1214fi
1215fi
1216ac_ct_CC=$ac_cv_prog_ac_ct_CC
1217if test -n "$ac_ct_CC"; then
1218 echo "$as_me:1218: result: $ac_ct_CC" >&5
1219echo "${ECHO_T}$ac_ct_CC" >&6
1220else
1221 echo "$as_me:1221: result: no" >&5
1222echo "${ECHO_T}no" >&6
1223fi
1224
1225 CC=$ac_ct_CC
1226else
1227 CC="$ac_cv_prog_CC"
1228fi
1229
1230fi
1231if test -z "$CC"; then
1232 # Extract the first word of "cc", so it can be a program name with args.
1233set dummy cc; ac_word=$2
1234echo "$as_me:1234: checking for $ac_word" >&5
1235echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1236if test "${ac_cv_prog_CC+set}" = set; then
1237 echo $ECHO_N "(cached) $ECHO_C" >&6
1238else
1239 if test -n "$CC"; then
1240 ac_cv_prog_CC="$CC" # Let the user override the test.
1241else
1242 ac_prog_rejected=no
1243 ac_save_IFS=$IFS; IFS=$ac_path_separator
1244ac_dummy="$PATH"
1245for ac_dir in $ac_dummy; do
1246 IFS=$ac_save_IFS
1247 test -z "$ac_dir" && ac_dir=.
1248 $as_executable_p "$ac_dir/$ac_word" || continue
1249if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1250 ac_prog_rejected=yes
1251 continue
1252fi
1253ac_cv_prog_CC="cc"
1254break
1255done
1256
1257if test $ac_prog_rejected = yes; then
1258 # We found a bogon in the path, so make sure we never use it.
1259 set dummy $ac_cv_prog_CC
1260 shift
1261 if test $# != 0; then
1262 # We chose a different compiler from the bogus one.
1263 # However, it has the same basename, so the bogon will be chosen
1264 # first if we set CC to just the basename; use the full file name.
1265 shift
1266 set dummy "$ac_dir/$ac_word" ${1+"$@"}
1267 shift
1268 ac_cv_prog_CC="$@"
1269 fi
1270fi
1271fi
1272fi
1273CC=$ac_cv_prog_CC
1274if test -n "$CC"; then
1275 echo "$as_me:1275: result: $CC" >&5
1276echo "${ECHO_T}$CC" >&6
1277else
1278 echo "$as_me:1278: result: no" >&5
1279echo "${ECHO_T}no" >&6
1280fi
1281
1282fi
1283if test -z "$CC"; then
1284 if test -n "$ac_tool_prefix"; then
1285 for ac_prog in cl
1286 do
1287 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1288set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1289echo "$as_me:1289: checking for $ac_word" >&5
1290echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1291if test "${ac_cv_prog_CC+set}" = set; then
1292 echo $ECHO_N "(cached) $ECHO_C" >&6
1293else
1294 if test -n "$CC"; then
1295 ac_cv_prog_CC="$CC" # Let the user override the test.
1296else
1297 ac_save_IFS=$IFS; IFS=$ac_path_separator
1298ac_dummy="$PATH"
1299for ac_dir in $ac_dummy; do
1300 IFS=$ac_save_IFS
1301 test -z "$ac_dir" && ac_dir=.
1302 $as_executable_p "$ac_dir/$ac_word" || continue
1303ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1304break
1305done
1306
1307fi
1308fi
1309CC=$ac_cv_prog_CC
1310if test -n "$CC"; then
1311 echo "$as_me:1311: result: $CC" >&5
1312echo "${ECHO_T}$CC" >&6
1313else
1314 echo "$as_me:1314: result: no" >&5
1315echo "${ECHO_T}no" >&6
1316fi
1317
1318 test -n "$CC" && break
1319 done
1320fi
1321if test -z "$CC"; then
1322 ac_ct_CC=$CC
1323 for ac_prog in cl
1324do
1325 # Extract the first word of "$ac_prog", so it can be a program name with args.
1326set dummy $ac_prog; ac_word=$2
1327echo "$as_me:1327: checking for $ac_word" >&5
1328echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1329if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1330 echo $ECHO_N "(cached) $ECHO_C" >&6
1331else
1332 if test -n "$ac_ct_CC"; then
1333 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1334else
1335 ac_save_IFS=$IFS; IFS=$ac_path_separator
1336ac_dummy="$PATH"
1337for ac_dir in $ac_dummy; do
1338 IFS=$ac_save_IFS
1339 test -z "$ac_dir" && ac_dir=.
1340 $as_executable_p "$ac_dir/$ac_word" || continue
1341ac_cv_prog_ac_ct_CC="$ac_prog"
1342break
1343done
1344
1345fi
1346fi
1347ac_ct_CC=$ac_cv_prog_ac_ct_CC
1348if test -n "$ac_ct_CC"; then
1349 echo "$as_me:1349: result: $ac_ct_CC" >&5
1350echo "${ECHO_T}$ac_ct_CC" >&6
1351else
1352 echo "$as_me:1352: result: no" >&5
1353echo "${ECHO_T}no" >&6
1354fi
1355
1356 test -n "$ac_ct_CC" && break
1357done
1358
1359 CC=$ac_ct_CC
1360fi
1361
1362fi
1363
1364test -z "$CC" && { { echo "$as_me:1364: error: no acceptable cc found in \$PATH" >&5
1365echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1366 { (exit 1); exit 1; }; }
1367
1368cat >conftest.$ac_ext <<_ACEOF
1369#line 1369 "configure"
1370#include "confdefs.h"
1371
1372int
1373main ()
1374{
1375
1376 ;
1377 return 0;
1378}
1379_ACEOF
1380ac_clean_files_save=$ac_clean_files
1381ac_clean_files="$ac_clean_files a.out a.exe"
1382# Try to create an executable without -o first, disregard a.out.
1383# It will help us diagnose broken compiler, and finding out an intuition
1384# of exeext.
1385echo "$as_me:1385: checking for C compiler default output" >&5
1386echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1387ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1388if { (eval echo "$as_me:1388: \"$ac_link_default\"") >&5
1389 (eval $ac_link_default) 2>&5
1390 ac_status=$?
1391 echo "$as_me:1391: \$? = $ac_status" >&5
1392 (exit $ac_status); }; then
1393 for ac_file in `ls a.exe conftest.exe a.* conftest conftest.* 2>/dev/null`; do
1394 case $ac_file in
1395 *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;;
1396 a.out ) # We found the default executable, but exeext='' is most
1397 # certainly right.
1398 break;;
1399 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1400 export ac_cv_exeext
1401 break;;
1402 * ) break;;
1403 esac
1404done
1405else
1406 echo "$as_me: failed program was:" >&5
1407cat conftest.$ac_ext >&5
1408{ { echo "$as_me:1408: error: C compiler cannot create executables" >&5
1409echo "$as_me: error: C compiler cannot create executables" >&2;}
1410 { (exit 77); exit 77; }; }
1411fi
1412
1413ac_exeext=$ac_cv_exeext
1414echo "$as_me:1414: result: $ac_file" >&5
1415echo "${ECHO_T}$ac_file" >&6
1416
1417# Check the compiler produces executables we can run. If not, either
1418# the compiler is broken, or we cross compile.
1419echo "$as_me:1419: checking whether the C compiler works" >&5
1420echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1421# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1422# If not cross compiling, check that we can run a simple program.
1423if test "$cross_compiling" != yes; then
1424 if { ac_try='./$ac_file'
1425 { (eval echo "$as_me:1425: \"$ac_try\"") >&5
1426 (eval $ac_try) 2>&5
1427 ac_status=$?
1428 echo "$as_me:1428: \$? = $ac_status" >&5
1429 (exit $ac_status); }; }; then
1430 cross_compiling=no
1431 else
1432 if test "$cross_compiling" = maybe; then
1433 cross_compiling=yes
1434 else
1435 { { echo "$as_me:1435: error: cannot run C compiled programs.
1436If you meant to cross compile, use \`--host'." >&5
1437echo "$as_me: error: cannot run C compiled programs.
1438If you meant to cross compile, use \`--host'." >&2;}
1439 { (exit 1); exit 1; }; }
1440 fi
1441 fi
1442fi
1443echo "$as_me:1443: result: yes" >&5
1444echo "${ECHO_T}yes" >&6
1445
1446rm -f a.out a.exe conftest$ac_cv_exeext
1447ac_clean_files=$ac_clean_files_save
1448# Check the compiler produces executables we can run. If not, either
1449# the compiler is broken, or we cross compile.
1450echo "$as_me:1450: checking whether we are cross compiling" >&5
1451echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1452echo "$as_me:1452: result: $cross_compiling" >&5
1453echo "${ECHO_T}$cross_compiling" >&6
1454
1455echo "$as_me:1455: checking for executable suffix" >&5
1456echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1457if { (eval echo "$as_me:1457: \"$ac_link\"") >&5
1458 (eval $ac_link) 2>&5
1459 ac_status=$?
1460 echo "$as_me:1460: \$? = $ac_status" >&5
1461 (exit $ac_status); }; then
1462 # If both `conftest.exe' and `conftest' are `present' (well, observable)
1463# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
1464# work properly (i.e., refer to `conftest.exe'), while it won't with
1465# `rm'.
1466for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1467 case $ac_file in
1468 *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;;
1469 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1470 export ac_cv_exeext
1471 break;;
1472 * ) break;;
1473 esac
1474done
1475else
1476 { { echo "$as_me:1476: error: cannot compute EXEEXT: cannot compile and link" >&5
1477echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1478 { (exit 1); exit 1; }; }
1479fi
1480
1481rm -f conftest$ac_cv_exeext
1482echo "$as_me:1482: result: $ac_cv_exeext" >&5
1483echo "${ECHO_T}$ac_cv_exeext" >&6
1484
1485rm -f conftest.$ac_ext
1486EXEEXT=$ac_cv_exeext
1487ac_exeext=$EXEEXT
1488echo "$as_me:1488: checking for object suffix" >&5
1489echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1490if test "${ac_cv_objext+set}" = set; then
1491 echo $ECHO_N "(cached) $ECHO_C" >&6
1492else
1493 cat >conftest.$ac_ext <<_ACEOF
1494#line 1494 "configure"
1495#include "confdefs.h"
1496
1497int
1498main ()
1499{
1500
1501 ;
1502 return 0;
1503}
1504_ACEOF
1505rm -f conftest.o conftest.obj
1506if { (eval echo "$as_me:1506: \"$ac_compile\"") >&5
1507 (eval $ac_compile) 2>&5
1508 ac_status=$?
1509 echo "$as_me:1509: \$? = $ac_status" >&5
1510 (exit $ac_status); }; then
1511 for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1512 case $ac_file in
1513 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb ) ;;
1514 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1515 break;;
1516 esac
1517done
1518else
1519 echo "$as_me: failed program was:" >&5
1520cat conftest.$ac_ext >&5
1521{ { echo "$as_me:1521: error: cannot compute OBJEXT: cannot compile" >&5
1522echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1523 { (exit 1); exit 1; }; }
1524fi
1525
1526rm -f conftest.$ac_cv_objext conftest.$ac_ext
1527fi
1528echo "$as_me:1528: result: $ac_cv_objext" >&5
1529echo "${ECHO_T}$ac_cv_objext" >&6
1530OBJEXT=$ac_cv_objext
1531ac_objext=$OBJEXT
1532echo "$as_me:1532: checking whether we are using the GNU C compiler" >&5
1533echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1534if test "${ac_cv_c_compiler_gnu+set}" = set; then
1535 echo $ECHO_N "(cached) $ECHO_C" >&6
1536else
1537 cat >conftest.$ac_ext <<_ACEOF
1538#line 1538 "configure"
1539#include "confdefs.h"
1540
1541int
1542main ()
1543{
1544#ifndef __GNUC__
1545 choke me
1546#endif
1547
1548 ;
1549 return 0;
1550}
1551_ACEOF
1552rm -f conftest.$ac_objext
1553if { (eval echo "$as_me:1553: \"$ac_compile\"") >&5
1554 (eval $ac_compile) 2>&5
1555 ac_status=$?
1556 echo "$as_me:1556: \$? = $ac_status" >&5
1557 (exit $ac_status); } &&
1558 { ac_try='test -s conftest.$ac_objext'
1559 { (eval echo "$as_me:1559: \"$ac_try\"") >&5
1560 (eval $ac_try) 2>&5
1561 ac_status=$?
1562 echo "$as_me:1562: \$? = $ac_status" >&5
1563 (exit $ac_status); }; }; then
1564 ac_compiler_gnu=yes
1565else
1566 echo "$as_me: failed program was:" >&5
1567cat conftest.$ac_ext >&5
1568ac_compiler_gnu=no
1569fi
1570rm -f conftest.$ac_objext conftest.$ac_ext
1571ac_cv_c_compiler_gnu=$ac_compiler_gnu
1572
1573fi
1574echo "$as_me:1574: result: $ac_cv_c_compiler_gnu" >&5
1575echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1576GCC=`test $ac_compiler_gnu = yes && echo yes`
1577ac_test_CFLAGS=${CFLAGS+set}
1578ac_save_CFLAGS=$CFLAGS
1579CFLAGS="-g"
1580echo "$as_me:1580: checking whether $CC accepts -g" >&5
1581echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1582if test "${ac_cv_prog_cc_g+set}" = set; then
1583 echo $ECHO_N "(cached) $ECHO_C" >&6
1584else
1585 cat >conftest.$ac_ext <<_ACEOF
1586#line 1586 "configure"
1587#include "confdefs.h"
1588
1589int
1590main ()
1591{
1592
1593 ;
1594 return 0;
1595}
1596_ACEOF
1597rm -f conftest.$ac_objext
1598if { (eval echo "$as_me:1598: \"$ac_compile\"") >&5
1599 (eval $ac_compile) 2>&5
1600 ac_status=$?
1601 echo "$as_me:1601: \$? = $ac_status" >&5
1602 (exit $ac_status); } &&
1603 { ac_try='test -s conftest.$ac_objext'
1604 { (eval echo "$as_me:1604: \"$ac_try\"") >&5
1605 (eval $ac_try) 2>&5
1606 ac_status=$?
1607 echo "$as_me:1607: \$? = $ac_status" >&5
1608 (exit $ac_status); }; }; then
1609 ac_cv_prog_cc_g=yes
1610else
1611 echo "$as_me: failed program was:" >&5
1612cat conftest.$ac_ext >&5
1613ac_cv_prog_cc_g=no
1614fi
1615rm -f conftest.$ac_objext conftest.$ac_ext
1616fi
1617echo "$as_me:1617: result: $ac_cv_prog_cc_g" >&5
1618echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1619if test "$ac_test_CFLAGS" = set; then
1620 CFLAGS=$ac_save_CFLAGS
1621elif test $ac_cv_prog_cc_g = yes; then
1622 if test "$GCC" = yes; then
1623 CFLAGS="-g -O2"
1624 else
1625 CFLAGS="-g"
1626 fi
1627else
1628 if test "$GCC" = yes; then
1629 CFLAGS="-O2"
1630 else
1631 CFLAGS=
1632 fi
1633fi
1634# Some people use a C++ compiler to compile C. Since we use `exit',
1635# in C++ we need to declare it. In case someone uses the same compiler
1636# for both compiling C and C++ we need to have the C++ compiler decide
1637# the declaration of exit, since it's the most demanding environment.
1638cat >conftest.$ac_ext <<_ACEOF
1639#ifndef __cplusplus
1640 choke me
1641#endif
1642_ACEOF
1643rm -f conftest.$ac_objext
1644if { (eval echo "$as_me:1644: \"$ac_compile\"") >&5
1645 (eval $ac_compile) 2>&5
1646 ac_status=$?
1647 echo "$as_me:1647: \$? = $ac_status" >&5
1648 (exit $ac_status); } &&
1649 { ac_try='test -s conftest.$ac_objext'
1650 { (eval echo "$as_me:1650: \"$ac_try\"") >&5
1651 (eval $ac_try) 2>&5
1652 ac_status=$?
1653 echo "$as_me:1653: \$? = $ac_status" >&5
1654 (exit $ac_status); }; }; then
1655 for ac_declaration in \
1656 ''\
1657 '#include <stdlib.h>' \
1658 'extern "C" void std::exit (int) throw (); using std::exit;' \
1659 'extern "C" void std::exit (int); using std::exit;' \
1660 'extern "C" void exit (int) throw ();' \
1661 'extern "C" void exit (int);' \
1662 'void exit (int);'
1663do
1664 cat >conftest.$ac_ext <<_ACEOF
1665#line 1665 "configure"
1666#include "confdefs.h"
1667#include <stdlib.h>
1668$ac_declaration
1669int
1670main ()
1671{
1672exit (42);
1673 ;
1674 return 0;
1675}
1676_ACEOF
1677rm -f conftest.$ac_objext
1678if { (eval echo "$as_me:1678: \"$ac_compile\"") >&5
1679 (eval $ac_compile) 2>&5
1680 ac_status=$?
1681 echo "$as_me:1681: \$? = $ac_status" >&5
1682 (exit $ac_status); } &&
1683 { ac_try='test -s conftest.$ac_objext'
1684 { (eval echo "$as_me:1684: \"$ac_try\"") >&5
1685 (eval $ac_try) 2>&5
1686 ac_status=$?
1687 echo "$as_me:1687: \$? = $ac_status" >&5
1688 (exit $ac_status); }; }; then
1689 :
1690else
1691 echo "$as_me: failed program was:" >&5
1692cat conftest.$ac_ext >&5
1693continue
1694fi
1695rm -f conftest.$ac_objext conftest.$ac_ext
1696 cat >conftest.$ac_ext <<_ACEOF
1697#line 1697 "configure"
1698#include "confdefs.h"
1699$ac_declaration
1700int
1701main ()
1702{
1703exit (42);
1704 ;
1705 return 0;
1706}
1707_ACEOF
1708rm -f conftest.$ac_objext
1709if { (eval echo "$as_me:1709: \"$ac_compile\"") >&5
1710 (eval $ac_compile) 2>&5
1711 ac_status=$?
1712 echo "$as_me:1712: \$? = $ac_status" >&5
1713 (exit $ac_status); } &&
1714 { ac_try='test -s conftest.$ac_objext'
1715 { (eval echo "$as_me:1715: \"$ac_try\"") >&5
1716 (eval $ac_try) 2>&5
1717 ac_status=$?
1718 echo "$as_me:1718: \$? = $ac_status" >&5
1719 (exit $ac_status); }; }; then
1720 break
1721else
1722 echo "$as_me: failed program was:" >&5
1723cat conftest.$ac_ext >&5
1724fi
1725rm -f conftest.$ac_objext conftest.$ac_ext
1726done
1727echo '#ifdef __cplusplus' >>confdefs.h
1728echo $ac_declaration >>confdefs.h
1729echo '#endif' >>confdefs.h
1730
1731else
1732 echo "$as_me: failed program was:" >&5
1733cat conftest.$ac_ext >&5
1734fi
1735rm -f conftest.$ac_objext conftest.$ac_ext
1736ac_ext=c
1737ac_cpp='$CPP $CPPFLAGS'
1738ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1739ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1740ac_compiler_gnu=$ac_cv_c_compiler_gnu
1741
1742echo "$as_me:1742: checking for POSIXized ISC" >&5
1743echo $ECHO_N "checking for POSIXized ISC... $ECHO_C" >&6
1744if test -d /etc/conf/kconfig.d &&
1745 grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
1746then
1747 echo "$as_me:1747: result: yes" >&5
1748echo "${ECHO_T}yes" >&6
1749 ISC=yes # If later tests want to check for ISC.
1750
1751cat >>confdefs.h <<\EOF
1752#define _POSIX_SOURCE 1
1753EOF
1754
1755 if test "$GCC" = yes; then
1756 CC="$CC -posix"
1757 else
1758 CC="$CC -Xp"
1759 fi
1760else
1761 echo "$as_me:1761: result: no" >&5
1762echo "${ECHO_T}no" >&6
1763 ISC=
1764fi
252b5132 1765
27b7e12d 1766BFD_VERSION=`sed -n -e 's/^.._INIT_AUTOMAKE.*,[ ]*\([^ ]*\)[ ]*).*/\1/p' < ${srcdir}/../bfd/configure.in`
252b5132
RH
1767# Find a good install program. We prefer a C program (faster),
1768# so one script is as good as another. But avoid the broken or
1769# incompatible versions:
1770# SysV /etc/install, /usr/sbin/install
1771# SunOS /usr/etc/install
1772# IRIX /sbin/install
1773# AIX /bin/install
6840198f 1774# AmigaOS /C/install, which installs bootblocks on floppy discs
252b5132
RH
1775# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
1776# AFS /usr/afsws/bin/install, which mishandles nonexistent args
1777# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1778# ./install, which can be erroneously created by make from ./install.sh.
6840198f
NC
1779echo "$as_me:1779: checking for a BSD compatible install" >&5
1780echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
252b5132 1781if test -z "$INSTALL"; then
6840198f
NC
1782if test "${ac_cv_path_install+set}" = set; then
1783 echo $ECHO_N "(cached) $ECHO_C" >&6
252b5132 1784else
6840198f 1785 ac_save_IFS=$IFS; IFS=$ac_path_separator
252b5132 1786 for ac_dir in $PATH; do
6840198f 1787 IFS=$ac_save_IFS
252b5132 1788 # Account for people who put trailing slashes in PATH elements.
6840198f
NC
1789 case $ac_dir/ in
1790 / | ./ | .// | /cC/* \
1791 | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
1792 | /usr/ucb/* ) ;;
252b5132
RH
1793 *)
1794 # OSF1 and SCO ODT 3.0 have their own names for install.
1795 # Don't use installbsd from OSF since it installs stuff as root
1796 # by default.
1797 for ac_prog in ginstall scoinst install; do
6840198f 1798 if $as_executable_p "$ac_dir/$ac_prog"; then
252b5132 1799 if test $ac_prog = install &&
6840198f 1800 grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
252b5132
RH
1801 # AIX install. It has an incompatible calling convention.
1802 :
6840198f
NC
1803 elif test $ac_prog = install &&
1804 grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
1805 # program-specific install script used by HP pwplus--don't use.
1806 :
252b5132
RH
1807 else
1808 ac_cv_path_install="$ac_dir/$ac_prog -c"
1809 break 2
1810 fi
1811 fi
1812 done
1813 ;;
1814 esac
1815 done
252b5132
RH
1816
1817fi
1818 if test "${ac_cv_path_install+set}" = set; then
6840198f 1819 INSTALL=$ac_cv_path_install
252b5132
RH
1820 else
1821 # As a last resort, use the slow shell script. We don't cache a
1822 # path for INSTALL within a source directory, because that will
1823 # break other packages using the cache if that directory is
1824 # removed, or if the path is relative.
6840198f 1825 INSTALL=$ac_install_sh
252b5132
RH
1826 fi
1827fi
6840198f
NC
1828echo "$as_me:1828: result: $INSTALL" >&5
1829echo "${ECHO_T}$INSTALL" >&6
252b5132
RH
1830
1831# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1832# It thinks the first close brace ends the variable substitution.
1833test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1834
6840198f 1835test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
252b5132
RH
1836
1837test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1838
6840198f
NC
1839echo "$as_me:1839: checking whether build environment is sane" >&5
1840echo $ECHO_N "checking whether build environment is sane... $ECHO_C" >&6
252b5132
RH
1841# Just in case
1842sleep 1
1843echo timestamp > conftestfile
1844# Do `set' in a subshell so we don't clobber the current shell's
1845# arguments. Must try -L first in case configure is actually a
1846# symlink; some systems play weird games with the mod time of symlinks
1847# (eg FreeBSD returns the mod time of the symlink's containing
1848# directory).
1849if (
1850 set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
1851 if test "$*" = "X"; then
1852 # -L didn't work.
1853 set X `ls -t $srcdir/configure conftestfile`
1854 fi
1855 if test "$*" != "X $srcdir/configure conftestfile" \
1856 && test "$*" != "X conftestfile $srcdir/configure"; then
1857
1858 # If neither matched, then we have a broken ls. This can happen
1859 # if, for instance, CONFIG_SHELL is bash and it inherits a
1860 # broken ls alias from the environment. This has actually
1861 # happened. Such a system could not be considered "sane".
6840198f
NC
1862 { { echo "$as_me:1862: error: ls -t appears to fail. Make sure there is not a broken
1863alias in your environment" >&5
1864echo "$as_me: error: ls -t appears to fail. Make sure there is not a broken
1865alias in your environment" >&2;}
1866 { (exit 1); exit 1; }; }
252b5132
RH
1867 fi
1868
1869 test "$2" = conftestfile
1870 )
1871then
1872 # Ok.
1873 :
1874else
6840198f
NC
1875 { { echo "$as_me:1875: error: newly created file is older than distributed files!
1876Check your system clock" >&5
1877echo "$as_me: error: newly created file is older than distributed files!
1878Check your system clock" >&2;}
1879 { (exit 1); exit 1; }; }
252b5132
RH
1880fi
1881rm -f conftest*
6840198f
NC
1882echo "$as_me:1882: result: yes" >&5
1883echo "${ECHO_T}yes" >&6
252b5132
RH
1884if test "$program_transform_name" = s,x,x,; then
1885 program_transform_name=
1886else
1887 # Double any \ or $. echo might interpret backslashes.
6840198f 1888 cat <<\EOF >conftest.sed
252b5132 1889s,\\,\\\\,g; s,\$,$$,g
6840198f
NC
1890EOF
1891 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
1892 rm -f conftest.sed
252b5132
RH
1893fi
1894test "$program_prefix" != NONE &&
6840198f 1895 program_transform_name="s,^,${program_prefix},;$program_transform_name"
252b5132
RH
1896# Use a double $ so make ignores it.
1897test "$program_suffix" != NONE &&
6840198f 1898 program_transform_name="s,\$\$,${program_suffix},;$program_transform_name"
252b5132
RH
1899
1900# sed with no file args requires a program.
6840198f 1901test -z "$program_transform_name" && program_transform_name="s,x,x,"
252b5132 1902
6840198f
NC
1903echo "$as_me:1903: checking whether ${MAKE-make} sets \${MAKE}" >&5
1904echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
1905set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
1906if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
1907 echo $ECHO_N "(cached) $ECHO_C" >&6
252b5132 1908else
6840198f 1909 cat >conftest.make <<\EOF
252b5132
RH
1910all:
1911 @echo 'ac_maketemp="${MAKE}"'
1912EOF
1913# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
6840198f 1914eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
252b5132
RH
1915if test -n "$ac_maketemp"; then
1916 eval ac_cv_prog_make_${ac_make}_set=yes
1917else
1918 eval ac_cv_prog_make_${ac_make}_set=no
1919fi
6840198f 1920rm -f conftest.make
252b5132
RH
1921fi
1922if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
6840198f
NC
1923 echo "$as_me:1923: result: yes" >&5
1924echo "${ECHO_T}yes" >&6
252b5132
RH
1925 SET_MAKE=
1926else
6840198f
NC
1927 echo "$as_me:1927: result: no" >&5
1928echo "${ECHO_T}no" >&6
252b5132
RH
1929 SET_MAKE="MAKE=${MAKE-make}"
1930fi
1931
252b5132
RH
1932PACKAGE=gas
1933
27b7e12d 1934VERSION=${BFD_VERSION}
252b5132
RH
1935
1936if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
6840198f
NC
1937 { { echo "$as_me:1937: error: source directory already configured; run \"make distclean\" there first" >&5
1938echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;}
1939 { (exit 1); exit 1; }; }
252b5132 1940fi
6840198f
NC
1941
1942cat >>confdefs.h <<EOF
252b5132
RH
1943#define PACKAGE "$PACKAGE"
1944EOF
1945
6840198f 1946cat >>confdefs.h <<EOF
252b5132
RH
1947#define VERSION "$VERSION"
1948EOF
1949
252b5132 1950missing_dir=`cd $ac_aux_dir && pwd`
6840198f
NC
1951echo "$as_me:1951: checking for working aclocal" >&5
1952echo $ECHO_N "checking for working aclocal... $ECHO_C" >&6
252b5132
RH
1953# Run test in a subshell; some versions of sh will print an error if
1954# an executable is not found, even if stderr is redirected.
1955# Redirect stdin to placate older versions of autoconf. Sigh.
1956if (aclocal --version) < /dev/null > /dev/null 2>&1; then
1957 ACLOCAL=aclocal
6840198f
NC
1958 echo "$as_me:1958: result: found" >&5
1959echo "${ECHO_T}found" >&6
252b5132
RH
1960else
1961 ACLOCAL="$missing_dir/missing aclocal"
6840198f
NC
1962 echo "$as_me:1962: result: missing" >&5
1963echo "${ECHO_T}missing" >&6
252b5132
RH
1964fi
1965
6840198f
NC
1966echo "$as_me:1966: checking for working autoconf" >&5
1967echo $ECHO_N "checking for working autoconf... $ECHO_C" >&6
252b5132
RH
1968# Run test in a subshell; some versions of sh will print an error if
1969# an executable is not found, even if stderr is redirected.
1970# Redirect stdin to placate older versions of autoconf. Sigh.
1971if (autoconf --version) < /dev/null > /dev/null 2>&1; then
1972 AUTOCONF=autoconf
6840198f
NC
1973 echo "$as_me:1973: result: found" >&5
1974echo "${ECHO_T}found" >&6
252b5132
RH
1975else
1976 AUTOCONF="$missing_dir/missing autoconf"
6840198f
NC
1977 echo "$as_me:1977: result: missing" >&5
1978echo "${ECHO_T}missing" >&6
252b5132
RH
1979fi
1980
6840198f
NC
1981echo "$as_me:1981: checking for working automake" >&5
1982echo $ECHO_N "checking for working automake... $ECHO_C" >&6
252b5132
RH
1983# Run test in a subshell; some versions of sh will print an error if
1984# an executable is not found, even if stderr is redirected.
1985# Redirect stdin to placate older versions of autoconf. Sigh.
1986if (automake --version) < /dev/null > /dev/null 2>&1; then
1987 AUTOMAKE=automake
6840198f
NC
1988 echo "$as_me:1988: result: found" >&5
1989echo "${ECHO_T}found" >&6
252b5132
RH
1990else
1991 AUTOMAKE="$missing_dir/missing automake"
6840198f
NC
1992 echo "$as_me:1992: result: missing" >&5
1993echo "${ECHO_T}missing" >&6
252b5132
RH
1994fi
1995
6840198f
NC
1996echo "$as_me:1996: checking for working autoheader" >&5
1997echo $ECHO_N "checking for working autoheader... $ECHO_C" >&6
252b5132
RH
1998# Run test in a subshell; some versions of sh will print an error if
1999# an executable is not found, even if stderr is redirected.
2000# Redirect stdin to placate older versions of autoconf. Sigh.
2001if (autoheader --version) < /dev/null > /dev/null 2>&1; then
2002 AUTOHEADER=autoheader
6840198f
NC
2003 echo "$as_me:2003: result: found" >&5
2004echo "${ECHO_T}found" >&6
252b5132
RH
2005else
2006 AUTOHEADER="$missing_dir/missing autoheader"
6840198f
NC
2007 echo "$as_me:2007: result: missing" >&5
2008echo "${ECHO_T}missing" >&6
252b5132
RH
2009fi
2010
6840198f
NC
2011echo "$as_me:2011: checking for working makeinfo" >&5
2012echo $ECHO_N "checking for working makeinfo... $ECHO_C" >&6
252b5132
RH
2013# Run test in a subshell; some versions of sh will print an error if
2014# an executable is not found, even if stderr is redirected.
2015# Redirect stdin to placate older versions of autoconf. Sigh.
2016if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
2017 MAKEINFO=makeinfo
6840198f
NC
2018 echo "$as_me:2018: result: found" >&5
2019echo "${ECHO_T}found" >&6
252b5132
RH
2020else
2021 MAKEINFO="$missing_dir/missing makeinfo"
6840198f
NC
2022 echo "$as_me:2022: result: missing" >&5
2023echo "${ECHO_T}missing" >&6
252b5132
RH
2024fi
2025
252b5132
RH
2026# Check whether --enable-shared or --disable-shared was given.
2027if test "${enable_shared+set}" = set; then
2028 enableval="$enable_shared"
2029 p=${PACKAGE-default}
f9c19112 2030case $enableval in
252b5132
RH
2031yes) enable_shared=yes ;;
2032no) enable_shared=no ;;
2033*)
2034 enable_shared=no
2035 # Look at the argument we got. We use all the common list separators.
2036 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2037 for pkg in $enableval; do
2038 if test "X$pkg" = "X$p"; then
2039 enable_shared=yes
2040 fi
2041 done
2042 IFS="$ac_save_ifs"
2043 ;;
2044esac
2045else
2046 enable_shared=yes
6840198f 2047fi;
252b5132
RH
2048# Check whether --enable-static or --disable-static was given.
2049if test "${enable_static+set}" = set; then
2050 enableval="$enable_static"
2051 p=${PACKAGE-default}
f9c19112 2052case $enableval in
252b5132
RH
2053yes) enable_static=yes ;;
2054no) enable_static=no ;;
2055*)
2056 enable_static=no
2057 # Look at the argument we got. We use all the common list separators.
2058 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2059 for pkg in $enableval; do
2060 if test "X$pkg" = "X$p"; then
2061 enable_static=yes
2062 fi
2063 done
2064 IFS="$ac_save_ifs"
2065 ;;
2066esac
2067else
2068 enable_static=yes
6840198f 2069fi;
bedf545c
ILT
2070# Check whether --enable-fast-install or --disable-fast-install was given.
2071if test "${enable_fast_install+set}" = set; then
2072 enableval="$enable_fast_install"
2073 p=${PACKAGE-default}
f9c19112 2074case $enableval in
bedf545c
ILT
2075yes) enable_fast_install=yes ;;
2076no) enable_fast_install=no ;;
2077*)
2078 enable_fast_install=no
2079 # Look at the argument we got. We use all the common list separators.
2080 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2081 for pkg in $enableval; do
2082 if test "X$pkg" = "X$p"; then
2083 enable_fast_install=yes
2084 fi
2085 done
2086 IFS="$ac_save_ifs"
2087 ;;
2088esac
2089else
2090 enable_fast_install=yes
6840198f 2091fi;
bedf545c 2092
6840198f
NC
2093# Check whether --with-gnu-ld or --without-gnu-ld was given.
2094if test "${with_gnu_ld+set}" = set; then
2095 withval="$with_gnu_ld"
2096 test "$withval" = no || with_gnu_ld=yes
27b7e12d 2097else
6840198f
NC
2098 with_gnu_ld=no
2099fi;
2100ac_prog=ld
2101if test "$GCC" = yes; then
2102 # Check if gcc -print-prog-name=ld gives a path.
2103 echo "$as_me:2103: checking for ld used by GCC" >&5
2104echo $ECHO_N "checking for ld used by GCC... $ECHO_C" >&6
2105 case $host in
2106 *-*-mingw*)
2107 # gcc leaves a trailing carriage return which upsets mingw
2108 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
2109 *)
2110 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
2111 esac
2112 case $ac_prog in
2113 # Accept absolute paths.
2114 [\\/]* | [A-Za-z]:[\\/]*)
2115 re_direlt='/[^/][^/]*/\.\./'
2116 # Canonicalize the path of ld
2117 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
2118 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
2119 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
2120 done
2121 test -z "$LD" && LD="$ac_prog"
2122 ;;
2123 "")
2124 # If it fails, then pretend we aren't using GCC.
2125 ac_prog=ld
2126 ;;
2127 *)
2128 # If it is relative, then search for the first ld in PATH.
2129 with_gnu_ld=unknown
2130 ;;
2131 esac
2132elif test "$with_gnu_ld" = yes; then
2133 echo "$as_me:2133: checking for GNU ld" >&5
2134echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6
27b7e12d 2135else
6840198f
NC
2136 echo "$as_me:2136: checking for non-GNU ld" >&5
2137echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6
27b7e12d 2138fi
6840198f
NC
2139if test "${lt_cv_path_LD+set}" = set; then
2140 echo $ECHO_N "(cached) $ECHO_C" >&6
252b5132
RH
2141else
2142 if test -z "$LD"; then
a74801ba 2143 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
252b5132
RH
2144 for ac_dir in $PATH; do
2145 test -z "$ac_dir" && ac_dir=.
a74801ba 2146 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
f9c19112 2147 lt_cv_path_LD="$ac_dir/$ac_prog"
252b5132
RH
2148 # Check to see if the program is GNU ld. I'd rather use --version,
2149 # but apparently some GNU ld's only accept -v.
2150 # Break only if it was the GNU/non-GNU ld that we prefer.
f9c19112 2151 if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
252b5132
RH
2152 test "$with_gnu_ld" != no && break
2153 else
bedf545c 2154 test "$with_gnu_ld" != yes && break
252b5132
RH
2155 fi
2156 fi
2157 done
2158 IFS="$ac_save_ifs"
2159else
f9c19112 2160 lt_cv_path_LD="$LD" # Let the user override the test with a path.
252b5132
RH
2161fi
2162fi
2163
f9c19112 2164LD="$lt_cv_path_LD"
252b5132 2165if test -n "$LD"; then
6840198f
NC
2166 echo "$as_me:2166: result: $LD" >&5
2167echo "${ECHO_T}$LD" >&6
252b5132 2168else
6840198f
NC
2169 echo "$as_me:2169: result: no" >&5
2170echo "${ECHO_T}no" >&6
252b5132 2171fi
6840198f
NC
2172test -z "$LD" && { { echo "$as_me:2172: error: no acceptable ld found in \$PATH" >&5
2173echo "$as_me: error: no acceptable ld found in \$PATH" >&2;}
2174 { (exit 1); exit 1; }; }
2175echo "$as_me:2175: checking if the linker ($LD) is GNU ld" >&5
2176echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6
2177if test "${lt_cv_prog_gnu_ld+set}" = set; then
2178 echo $ECHO_N "(cached) $ECHO_C" >&6
252b5132
RH
2179else
2180 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
2181if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
f9c19112 2182 lt_cv_prog_gnu_ld=yes
252b5132 2183else
f9c19112 2184 lt_cv_prog_gnu_ld=no
252b5132
RH
2185fi
2186fi
6840198f
NC
2187echo "$as_me:2187: result: $lt_cv_prog_gnu_ld" >&5
2188echo "${ECHO_T}$lt_cv_prog_gnu_ld" >&6
f9c19112 2189with_gnu_ld=$lt_cv_prog_gnu_ld
ac48eca1 2190
6840198f
NC
2191echo "$as_me:2191: checking for $LD option to reload object files" >&5
2192echo $ECHO_N "checking for $LD option to reload object files... $ECHO_C" >&6
2193if test "${lt_cv_ld_reload_flag+set}" = set; then
2194 echo $ECHO_N "(cached) $ECHO_C" >&6
ac48eca1
AO
2195else
2196 lt_cv_ld_reload_flag='-r'
2197fi
6840198f
NC
2198echo "$as_me:2198: result: $lt_cv_ld_reload_flag" >&5
2199echo "${ECHO_T}$lt_cv_ld_reload_flag" >&6
ac48eca1
AO
2200reload_flag=$lt_cv_ld_reload_flag
2201test -n "$reload_flag" && reload_flag=" $reload_flag"
252b5132 2202
6840198f
NC
2203echo "$as_me:2203: checking for BSD-compatible nm" >&5
2204echo $ECHO_N "checking for BSD-compatible nm... $ECHO_C" >&6
2205if test "${lt_cv_path_NM+set}" = set; then
2206 echo $ECHO_N "(cached) $ECHO_C" >&6
252b5132
RH
2207else
2208 if test -n "$NM"; then
2209 # Let the user override the test.
f9c19112 2210 lt_cv_path_NM="$NM"
252b5132 2211else
a74801ba 2212 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
bedf545c 2213 for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
252b5132 2214 test -z "$ac_dir" && ac_dir=.
ac48eca1
AO
2215 tmp_nm=$ac_dir/${ac_tool_prefix}nm
2216 if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then
252b5132
RH
2217 # Check to see if the nm accepts a BSD-compat flag.
2218 # Adding the `sed 1q' prevents false positives on HP-UX, which says:
2219 # nm: unknown option "B" ignored
58cccadb
AO
2220 # Tru64's nm complains that /dev/null is an invalid object file
2221 if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
f9c19112 2222 lt_cv_path_NM="$tmp_nm -B"
bedf545c 2223 break
ac48eca1 2224 elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
f9c19112 2225 lt_cv_path_NM="$tmp_nm -p"
bedf545c 2226 break
252b5132 2227 else
f9c19112 2228 lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
bedf545c 2229 continue # so that we can try to find one that supports BSD flags
252b5132 2230 fi
252b5132
RH
2231 fi
2232 done
2233 IFS="$ac_save_ifs"
f9c19112 2234 test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
252b5132
RH
2235fi
2236fi
2237
f9c19112 2238NM="$lt_cv_path_NM"
6840198f
NC
2239echo "$as_me:2239: result: $NM" >&5
2240echo "${ECHO_T}$NM" >&6
252b5132 2241
6840198f
NC
2242echo "$as_me:2242: checking whether ln -s works" >&5
2243echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
2244LN_S=$as_ln_s
2245if test "$LN_S" = "ln -s"; then
2246 echo "$as_me:2246: result: yes" >&5
2247echo "${ECHO_T}yes" >&6
252b5132 2248else
6840198f
NC
2249 echo "$as_me:2249: result: no, using $LN_S" >&5
2250echo "${ECHO_T}no, using $LN_S" >&6
252b5132
RH
2251fi
2252
6840198f
NC
2253echo "$as_me:2253: checking how to recognise dependant libraries" >&5
2254echo $ECHO_N "checking how to recognise dependant libraries... $ECHO_C" >&6
2255if test "${lt_cv_deplibs_check_method+set}" = set; then
2256 echo $ECHO_N "(cached) $ECHO_C" >&6
ac48eca1 2257else
d64552c5 2258 lt_cv_file_magic_cmd='$MAGIC_CMD'
ac48eca1
AO
2259lt_cv_file_magic_test_file=
2260lt_cv_deplibs_check_method='unknown'
2261# Need to set the preceding variable on all platforms that support
2262# interlibrary dependencies.
2263# 'none' -- dependencies not supported.
2264# `unknown' -- same as none, but documents that we really don't know.
2265# 'pass_all' -- all dependencies passed with no checks.
2266# 'test_compile' -- check by making test program.
2267# 'file_magic [regex]' -- check by looking for files in library path
2268# which responds to the $file_magic_cmd with a given egrep regex.
2269# If you have `file' or equivalent on your system and you're not sure
2270# whether `pass_all' will *always* work, you probably want this one.
2271
f9c19112
HPN
2272case $host_os in
2273aix*)
ac48eca1
AO
2274 lt_cv_deplibs_check_method=pass_all
2275 ;;
2276
2277beos*)
2278 lt_cv_deplibs_check_method=pass_all
2279 ;;
2280
2281bsdi4*)
f9c19112
HPN
2282 lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
2283 lt_cv_file_magic_cmd='/usr/bin/file -L'
ac48eca1
AO
2284 lt_cv_file_magic_test_file=/shlib/libc.so
2285 ;;
2286
d64552c5 2287cygwin* | mingw* |pw32*)
ac48eca1 2288 lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
d64552c5 2289 lt_cv_file_magic_cmd='$OBJDUMP -f'
ac48eca1
AO
2290 ;;
2291
f9c19112
HPN
2292darwin* | rhapsody*)
2293 lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
6840198f
NC
2294 lt_cv_file_magic_cmd='/usr/bin/file -L'
2295 case "$host_os" in
2296 rhapsody* | darwin1.012)
2297 lt_cv_file_magic_test_file='/System/Library/Frameworks/System.framework/System'
2298 ;;
2299 *) # Darwin 1.3 on
2300 lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
2301 ;;
2302 esac
f9c19112
HPN
2303 ;;
2304
ac48eca1
AO
2305freebsd* )
2306 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
f9c19112 2307 case $host_cpu in
ac48eca1 2308 i*86 )
58cccadb
AO
2309 # Not sure whether the presence of OpenBSD here was a mistake.
2310 # Let's accept both of them until this is cleared up.
f9c19112
HPN
2311 lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library'
2312 lt_cv_file_magic_cmd=/usr/bin/file
ac48eca1
AO
2313 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
2314 ;;
2315 esac
2316 else
2317 lt_cv_deplibs_check_method=pass_all
2318 fi
2319 ;;
2320
2321gnu*)
2322 lt_cv_deplibs_check_method=pass_all
2323 ;;
2324
f9c19112
HPN
2325hpux10.20*|hpux11*)
2326 lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
ac48eca1
AO
2327 lt_cv_file_magic_cmd=/usr/bin/file
2328 lt_cv_file_magic_test_file=/usr/lib/libc.sl
2329 ;;
2330
2331irix5* | irix6*)
f9c19112 2332 case $host_os in
ac48eca1
AO
2333 irix5*)
2334 # this will be overridden with pass_all, but let us keep it just in case
2335 lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
2336 ;;
2337 *)
f9c19112 2338 case $LD in
ac48eca1
AO
2339 *-32|*"-32 ") libmagic=32-bit;;
2340 *-n32|*"-n32 ") libmagic=N32;;
2341 *-64|*"-64 ") libmagic=64-bit;;
2342 *) libmagic=never-match;;
2343 esac
2344 # this will be overridden with pass_all, but let us keep it just in case
f9c19112
HPN
2345 lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1"
2346 ;;
ac48eca1
AO
2347 esac
2348 lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
2349 lt_cv_deplibs_check_method=pass_all
2350 ;;
2351
2352# This must be Linux ELF.
58cccadb 2353linux-gnu*)
f9c19112 2354 case $host_cpu in
ac48eca1
AO
2355 alpha* | i*86 | powerpc* | sparc* | ia64* )
2356 lt_cv_deplibs_check_method=pass_all ;;
2357 *)
2358 # glibc up to 2.1.1 does not perform some relocations on ARM
f9c19112
HPN
2359 lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;;
2360 esac
ac48eca1
AO
2361 lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
2362 ;;
2363
2364netbsd*)
f9c19112 2365 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
6840198f 2366 lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
ac48eca1 2367 else
6840198f 2368 lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so$'
ac48eca1 2369 fi
f9c19112
HPN
2370 ;;
2371
2372newsos6)
2373 lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
2374 lt_cv_file_magic_cmd=/usr/bin/file
2375 lt_cv_file_magic_test_file=/usr/lib/libnls.so
ac48eca1
AO
2376 ;;
2377
2378osf3* | osf4* | osf5*)
2379 # this will be overridden with pass_all, but let us keep it just in case
2380 lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
2381 lt_cv_file_magic_test_file=/shlib/libc.so
2382 lt_cv_deplibs_check_method=pass_all
2383 ;;
2384
2385sco3.2v5*)
2386 lt_cv_deplibs_check_method=pass_all
2387 ;;
2388
2389solaris*)
2390 lt_cv_deplibs_check_method=pass_all
2391 lt_cv_file_magic_test_file=/lib/libc.so
2392 ;;
2393
2394sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
f9c19112 2395 case $host_vendor in
ac48eca1
AO
2396 ncr)
2397 lt_cv_deplibs_check_method=pass_all
2398 ;;
2399 motorola)
f9c19112
HPN
2400 lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]'
2401 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
ac48eca1
AO
2402 ;;
2403 esac
2404 ;;
2405esac
2406
2407fi
6840198f
NC
2408echo "$as_me:2408: result: $lt_cv_deplibs_check_method" >&5
2409echo "${ECHO_T}$lt_cv_deplibs_check_method" >&6
ac48eca1
AO
2410file_magic_cmd=$lt_cv_file_magic_cmd
2411deplibs_check_method=$lt_cv_deplibs_check_method
2412
ac48eca1
AO
2413# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
2414
2415# Only perform the check for file, if the check method requires it
f9c19112 2416case $deplibs_check_method in
ac48eca1 2417file_magic*)
d64552c5 2418 if test "$file_magic_cmd" = '$MAGIC_CMD'; then
6840198f
NC
2419 echo "$as_me:2419: checking for ${ac_tool_prefix}file" >&5
2420echo $ECHO_N "checking for ${ac_tool_prefix}file... $ECHO_C" >&6
2421if test "${lt_cv_path_MAGIC_CMD+set}" = set; then
2422 echo $ECHO_N "(cached) $ECHO_C" >&6
ac48eca1 2423else
f9c19112 2424 case $MAGIC_CMD in
ac48eca1 2425 /*)
d64552c5 2426 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
ac48eca1
AO
2427 ;;
2428 ?:/*)
d64552c5 2429 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
ac48eca1
AO
2430 ;;
2431 *)
d64552c5 2432 ac_save_MAGIC_CMD="$MAGIC_CMD"
ac48eca1
AO
2433 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2434 ac_dummy="/usr/bin:$PATH"
2435 for ac_dir in $ac_dummy; do
2436 test -z "$ac_dir" && ac_dir=.
2437 if test -f $ac_dir/${ac_tool_prefix}file; then
d64552c5 2438 lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
ac48eca1 2439 if test -n "$file_magic_test_file"; then
f9c19112 2440 case $deplibs_check_method in
ac48eca1
AO
2441 "file_magic "*)
2442 file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
d64552c5 2443 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
ac48eca1
AO
2444 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
2445 egrep "$file_magic_regex" > /dev/null; then
2446 :
2447 else
2448 cat <<EOF 1>&2
2449
2450*** Warning: the command libtool uses to detect shared libraries,
2451*** $file_magic_cmd, produces output that libtool cannot recognize.
2452*** The result is that libtool may fail to recognize shared libraries
2453*** as such. This will affect the creation of libtool libraries that
2454*** depend on shared libraries, but programs linked with such libtool
2455*** libraries will work regardless of this problem. Nevertheless, you
2456*** may want to report the problem to your system manager and/or to
2457*** bug-libtool@gnu.org
2458
2459EOF
2460 fi ;;
2461 esac
2462 fi
2463 break
2464 fi
2465 done
2466 IFS="$ac_save_ifs"
d64552c5 2467 MAGIC_CMD="$ac_save_MAGIC_CMD"
ac48eca1
AO
2468 ;;
2469esac
2470fi
2471
d64552c5
AO
2472MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2473if test -n "$MAGIC_CMD"; then
6840198f
NC
2474 echo "$as_me:2474: result: $MAGIC_CMD" >&5
2475echo "${ECHO_T}$MAGIC_CMD" >&6
ac48eca1 2476else
6840198f
NC
2477 echo "$as_me:2477: result: no" >&5
2478echo "${ECHO_T}no" >&6
ac48eca1
AO
2479fi
2480
d64552c5 2481if test -z "$lt_cv_path_MAGIC_CMD"; then
ac48eca1 2482 if test -n "$ac_tool_prefix"; then
6840198f
NC
2483 echo "$as_me:2483: checking for file" >&5
2484echo $ECHO_N "checking for file... $ECHO_C" >&6
2485if test "${lt_cv_path_MAGIC_CMD+set}" = set; then
2486 echo $ECHO_N "(cached) $ECHO_C" >&6
ac48eca1 2487else
f9c19112 2488 case $MAGIC_CMD in
ac48eca1 2489 /*)
d64552c5 2490 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
ac48eca1
AO
2491 ;;
2492 ?:/*)
d64552c5 2493 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
ac48eca1
AO
2494 ;;
2495 *)
d64552c5 2496 ac_save_MAGIC_CMD="$MAGIC_CMD"
ac48eca1
AO
2497 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2498 ac_dummy="/usr/bin:$PATH"
2499 for ac_dir in $ac_dummy; do
2500 test -z "$ac_dir" && ac_dir=.
2501 if test -f $ac_dir/file; then
d64552c5 2502 lt_cv_path_MAGIC_CMD="$ac_dir/file"
ac48eca1 2503 if test -n "$file_magic_test_file"; then
f9c19112 2504 case $deplibs_check_method in
ac48eca1
AO
2505 "file_magic "*)
2506 file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
d64552c5 2507 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
ac48eca1
AO
2508 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
2509 egrep "$file_magic_regex" > /dev/null; then
2510 :
2511 else
2512 cat <<EOF 1>&2
2513
2514*** Warning: the command libtool uses to detect shared libraries,
2515*** $file_magic_cmd, produces output that libtool cannot recognize.
2516*** The result is that libtool may fail to recognize shared libraries
2517*** as such. This will affect the creation of libtool libraries that
2518*** depend on shared libraries, but programs linked with such libtool
2519*** libraries will work regardless of this problem. Nevertheless, you
2520*** may want to report the problem to your system manager and/or to
2521*** bug-libtool@gnu.org
2522
2523EOF
2524 fi ;;
2525 esac
2526 fi
2527 break
2528 fi
2529 done
2530 IFS="$ac_save_ifs"
d64552c5 2531 MAGIC_CMD="$ac_save_MAGIC_CMD"
ac48eca1
AO
2532 ;;
2533esac
2534fi
2535
d64552c5
AO
2536MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2537if test -n "$MAGIC_CMD"; then
6840198f
NC
2538 echo "$as_me:2538: result: $MAGIC_CMD" >&5
2539echo "${ECHO_T}$MAGIC_CMD" >&6
ac48eca1 2540else
6840198f
NC
2541 echo "$as_me:2541: result: no" >&5
2542echo "${ECHO_T}no" >&6
ac48eca1
AO
2543fi
2544
2545 else
d64552c5 2546 MAGIC_CMD=:
ac48eca1
AO
2547 fi
2548fi
2549
2550 fi
2551 ;;
2552esac
2553
6840198f
NC
2554if test -n "$ac_tool_prefix"; then
2555 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
ac48eca1 2556set dummy ${ac_tool_prefix}ranlib; ac_word=$2
6840198f
NC
2557echo "$as_me:2557: checking for $ac_word" >&5
2558echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2559if test "${ac_cv_prog_RANLIB+set}" = set; then
2560 echo $ECHO_N "(cached) $ECHO_C" >&6
ac48eca1
AO
2561else
2562 if test -n "$RANLIB"; then
2563 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
2564else
6840198f
NC
2565 ac_save_IFS=$IFS; IFS=$ac_path_separator
2566ac_dummy="$PATH"
2567for ac_dir in $ac_dummy; do
2568 IFS=$ac_save_IFS
2569 test -z "$ac_dir" && ac_dir=.
2570 $as_executable_p "$ac_dir/$ac_word" || continue
2571ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
2572break
2573done
2574
ac48eca1
AO
2575fi
2576fi
6840198f 2577RANLIB=$ac_cv_prog_RANLIB
ac48eca1 2578if test -n "$RANLIB"; then
6840198f
NC
2579 echo "$as_me:2579: result: $RANLIB" >&5
2580echo "${ECHO_T}$RANLIB" >&6
ac48eca1 2581else
6840198f
NC
2582 echo "$as_me:2582: result: no" >&5
2583echo "${ECHO_T}no" >&6
ac48eca1
AO
2584fi
2585
6840198f 2586fi
ac48eca1 2587if test -z "$ac_cv_prog_RANLIB"; then
6840198f 2588 ac_ct_RANLIB=$RANLIB
ac48eca1
AO
2589 # Extract the first word of "ranlib", so it can be a program name with args.
2590set dummy ranlib; ac_word=$2
6840198f
NC
2591echo "$as_me:2591: checking for $ac_word" >&5
2592echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2593if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
2594 echo $ECHO_N "(cached) $ECHO_C" >&6
2595else
2596 if test -n "$ac_ct_RANLIB"; then
2597 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
2598else
2599 ac_save_IFS=$IFS; IFS=$ac_path_separator
2600ac_dummy="$PATH"
2601for ac_dir in $ac_dummy; do
2602 IFS=$ac_save_IFS
2603 test -z "$ac_dir" && ac_dir=.
2604 $as_executable_p "$ac_dir/$ac_word" || continue
2605ac_cv_prog_ac_ct_RANLIB="ranlib"
2606break
2607done
2608
2609 test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
ac48eca1
AO
2610fi
2611fi
6840198f
NC
2612ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
2613if test -n "$ac_ct_RANLIB"; then
2614 echo "$as_me:2614: result: $ac_ct_RANLIB" >&5
2615echo "${ECHO_T}$ac_ct_RANLIB" >&6
ac48eca1 2616else
6840198f
NC
2617 echo "$as_me:2617: result: no" >&5
2618echo "${ECHO_T}no" >&6
ac48eca1
AO
2619fi
2620
6840198f 2621 RANLIB=$ac_ct_RANLIB
ac48eca1 2622else
6840198f 2623 RANLIB="$ac_cv_prog_RANLIB"
ac48eca1
AO
2624fi
2625
6840198f
NC
2626if test -n "$ac_tool_prefix"; then
2627 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
ac48eca1 2628set dummy ${ac_tool_prefix}strip; ac_word=$2
6840198f
NC
2629echo "$as_me:2629: checking for $ac_word" >&5
2630echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2631if test "${ac_cv_prog_STRIP+set}" = set; then
2632 echo $ECHO_N "(cached) $ECHO_C" >&6
ac48eca1
AO
2633else
2634 if test -n "$STRIP"; then
2635 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
2636else
6840198f
NC
2637 ac_save_IFS=$IFS; IFS=$ac_path_separator
2638ac_dummy="$PATH"
2639for ac_dir in $ac_dummy; do
2640 IFS=$ac_save_IFS
2641 test -z "$ac_dir" && ac_dir=.
2642 $as_executable_p "$ac_dir/$ac_word" || continue
2643ac_cv_prog_STRIP="${ac_tool_prefix}strip"
2644break
2645done
2646
ac48eca1
AO
2647fi
2648fi
6840198f 2649STRIP=$ac_cv_prog_STRIP
ac48eca1 2650if test -n "$STRIP"; then
6840198f
NC
2651 echo "$as_me:2651: result: $STRIP" >&5
2652echo "${ECHO_T}$STRIP" >&6
ac48eca1 2653else
6840198f
NC
2654 echo "$as_me:2654: result: no" >&5
2655echo "${ECHO_T}no" >&6
ac48eca1
AO
2656fi
2657
6840198f 2658fi
ac48eca1 2659if test -z "$ac_cv_prog_STRIP"; then
6840198f 2660 ac_ct_STRIP=$STRIP
ac48eca1
AO
2661 # Extract the first word of "strip", so it can be a program name with args.
2662set dummy strip; ac_word=$2
6840198f
NC
2663echo "$as_me:2663: checking for $ac_word" >&5
2664echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2665if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then
2666 echo $ECHO_N "(cached) $ECHO_C" >&6
2667else
2668 if test -n "$ac_ct_STRIP"; then
2669 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
2670else
2671 ac_save_IFS=$IFS; IFS=$ac_path_separator
2672ac_dummy="$PATH"
2673for ac_dir in $ac_dummy; do
2674 IFS=$ac_save_IFS
2675 test -z "$ac_dir" && ac_dir=.
2676 $as_executable_p "$ac_dir/$ac_word" || continue
2677ac_cv_prog_ac_ct_STRIP="strip"
2678break
2679done
2680
2681 test -z "$ac_cv_prog_ac_ct_STRIP" && ac_cv_prog_ac_ct_STRIP=":"
ac48eca1
AO
2682fi
2683fi
6840198f
NC
2684ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
2685if test -n "$ac_ct_STRIP"; then
2686 echo "$as_me:2686: result: $ac_ct_STRIP" >&5
2687echo "${ECHO_T}$ac_ct_STRIP" >&6
ac48eca1 2688else
6840198f
NC
2689 echo "$as_me:2689: result: no" >&5
2690echo "${ECHO_T}no" >&6
ac48eca1
AO
2691fi
2692
6840198f 2693 STRIP=$ac_ct_STRIP
ac48eca1 2694else
6840198f 2695 STRIP="$ac_cv_prog_STRIP"
ac48eca1 2696fi
252b5132 2697
252b5132 2698# Check for any special flags to pass to ltconfig.
bedf545c 2699libtool_flags="--cache-file=$cache_file"
252b5132
RH
2700test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
2701test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
bedf545c 2702test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
f9c19112
HPN
2703test "$GCC" = yes && libtool_flags="$libtool_flags --with-gcc"
2704test "$lt_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
252b5132 2705
a74801ba
ILT
2706# Check whether --enable-libtool-lock or --disable-libtool-lock was given.
2707if test "${enable_libtool_lock+set}" = set; then
2708 enableval="$enable_libtool_lock"
a74801ba 2709
6840198f 2710fi;
a74801ba
ILT
2711test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
2712test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
2713
ac48eca1
AO
2714# Check whether --with-pic or --without-pic was given.
2715if test "${with_pic+set}" = set; then
2716 withval="$with_pic"
2717 pic_mode="$withval"
2718else
2719 pic_mode=default
6840198f 2720fi;
ac48eca1
AO
2721test x"$pic_mode" = xyes && libtool_flags="$libtool_flags --prefer-pic"
2722test x"$pic_mode" = xno && libtool_flags="$libtool_flags --prefer-non-pic"
2723
252b5132
RH
2724# Some flags need to be propagated to the compiler or linker for good
2725# libtool support.
f9c19112 2726case $host in
252b5132
RH
2727*-*-irix6*)
2728 # Find out which ABI we are using.
6840198f
NC
2729 echo '#line 2729 "configure"' > conftest.$ac_ext
2730 if { (eval echo "$as_me:2730: \"$ac_compile\"") >&5
2731 (eval $ac_compile) 2>&5
2732 ac_status=$?
2733 echo "$as_me:2733: \$? = $ac_status" >&5
2734 (exit $ac_status); }; then
f9c19112 2735 case `/usr/bin/file conftest.$ac_objext` in
252b5132
RH
2736 *32-bit*)
2737 LD="${LD-ld} -32"
2738 ;;
2739 *N32*)
2740 LD="${LD-ld} -n32"
2741 ;;
2742 *64-bit*)
2743 LD="${LD-ld} -64"
2744 ;;
2745 esac
2746 fi
2747 rm -rf conftest*
2748 ;;
2749
2750*-*-sco3.2v5*)
2751 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
bedf545c 2752 SAVE_CFLAGS="$CFLAGS"
252b5132 2753 CFLAGS="$CFLAGS -belf"
6840198f
NC
2754 echo "$as_me:2754: checking whether the C compiler needs -belf" >&5
2755echo $ECHO_N "checking whether the C compiler needs -belf... $ECHO_C" >&6
2756if test "${lt_cv_cc_needs_belf+set}" = set; then
2757 echo $ECHO_N "(cached) $ECHO_C" >&6
bedf545c 2758else
6840198f 2759
ac48eca1 2760 ac_ext=c
ac48eca1 2761ac_cpp='$CPP $CPPFLAGS'
6840198f
NC
2762ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2763ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2764ac_compiler_gnu=$ac_cv_c_compiler_gnu
ac48eca1 2765
6840198f
NC
2766 cat >conftest.$ac_ext <<_ACEOF
2767#line 2767 "configure"
bedf545c
ILT
2768#include "confdefs.h"
2769
6840198f
NC
2770int
2771main ()
2772{
2773
2774 ;
2775 return 0;
2776}
2777_ACEOF
2778rm -f conftest.$ac_objext conftest$ac_exeext
2779if { (eval echo "$as_me:2779: \"$ac_link\"") >&5
2780 (eval $ac_link) 2>&5
2781 ac_status=$?
2782 echo "$as_me:2782: \$? = $ac_status" >&5
2783 (exit $ac_status); } &&
2784 { ac_try='test -s conftest$ac_exeext'
2785 { (eval echo "$as_me:2785: \"$ac_try\"") >&5
2786 (eval $ac_try) 2>&5
2787 ac_status=$?
2788 echo "$as_me:2788: \$? = $ac_status" >&5
2789 (exit $ac_status); }; }; then
bedf545c
ILT
2790 lt_cv_cc_needs_belf=yes
2791else
6840198f
NC
2792 echo "$as_me: failed program was:" >&5
2793cat conftest.$ac_ext >&5
2794lt_cv_cc_needs_belf=no
bedf545c 2795fi
6840198f 2796rm -f conftest$ac_exeext conftest.$ac_ext
ac48eca1 2797 ac_ext=c
ac48eca1 2798ac_cpp='$CPP $CPPFLAGS'
6840198f
NC
2799ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2800ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2801ac_compiler_gnu=$ac_cv_c_compiler_gnu
ac48eca1 2802
bedf545c 2803fi
6840198f
NC
2804echo "$as_me:2804: result: $lt_cv_cc_needs_belf" >&5
2805echo "${ECHO_T}$lt_cv_cc_needs_belf" >&6
bedf545c
ILT
2806 if test x"$lt_cv_cc_needs_belf" != x"yes"; then
2807 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
2808 CFLAGS="$SAVE_CFLAGS"
2809 fi
252b5132
RH
2810 ;;
2811
252b5132
RH
2812esac
2813
bedf545c 2814# Save cache, so that ltconfig can load it
6840198f 2815cat >confcache <<\_ACEOF
bedf545c
ILT
2816# This file is a shell script that caches the results of configure
2817# tests run on this system so they can be shared between configure
6840198f
NC
2818# scripts and configure runs, see configure's option --config-cache.
2819# It is not useful on other systems. If it contains results you don't
2820# want to keep, you may remove or edit it.
bedf545c 2821#
6840198f
NC
2822# config.status only pays attention to the cache file if you give it
2823# the --recheck option to rerun configure.
bedf545c 2824#
6840198f
NC
2825# `ac_cv_env_foo' variables (set or unset) will be overriden when
2826# loading this file, other *unset* `ac_cv_foo' will be assigned the
2827# following values.
2828
2829_ACEOF
2830
bedf545c
ILT
2831# The following way of writing the cache mishandles newlines in values,
2832# but we know of no workaround that is simple, portable, and efficient.
2833# So, don't put newlines in cache variables' values.
2834# Ultrix sh set writes to stderr and can't be redirected directly,
2835# and sets the high bit in the cache file unless we assign to the vars.
6840198f
NC
2836{
2837 (set) 2>&1 |
2838 case `(ac_space=' '; set | grep ac_space) 2>&1` in
2839 *ac_space=\ *)
2840 # `set' does not quote correctly, so add quotes (double-quote
2841 # substitution turns \\\\ into \\, and sed turns \\ into \).
2842 sed -n \
2843 "s/'/'\\\\''/g;
2844 s/^\\([_$ac_cr_alnum]*_cv_[_$ac_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
2845 ;;
2846 *)
2847 # `set' quotes correctly as required by POSIX, so do not add quotes.
2848 sed -n \
2849 "s/^\\([_$ac_cr_alnum]*_cv_[_$ac_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
2850 ;;
2851 esac;
2852} |
2853 sed '
2854 t clear
2855 : clear
2856 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
2857 t end
2858 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
2859 : end' >>confcache
2860if cmp -s $cache_file confcache; then :; else
bedf545c 2861 if test -w $cache_file; then
6840198f
NC
2862 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
2863 cat confcache >$cache_file
bedf545c
ILT
2864 else
2865 echo "not updating unwritable cache $cache_file"
2866 fi
2867fi
2868rm -f confcache
2869
252b5132 2870# Actually configure libtool. ac_aux_dir is where install-sh is found.
ac48eca1 2871AR="$AR" LTCC="$CC" CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
d64552c5 2872MAGIC_CMD="$MAGIC_CMD" LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
ac48eca1
AO
2873LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" STRIP="$STRIP" \
2874AS="$AS" DLLTOOL="$DLLTOOL" OBJDUMP="$OBJDUMP" \
2875objext="$OBJEXT" exeext="$EXEEXT" reload_flag="$reload_flag" \
2876deplibs_check_method="$deplibs_check_method" file_magic_cmd="$file_magic_cmd" \
252b5132 2877${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
ac48eca1 2878$libtool_flags --no-verify --build="$build" $ac_aux_dir/ltmain.sh $host \
6840198f
NC
2879|| { { echo "$as_me:2879: error: libtool configure failed" >&5
2880echo "$as_me: error: libtool configure failed" >&2;}
2881 { (exit 1); exit 1; }; }
252b5132 2882
bedf545c
ILT
2883# Reload cache, that may have been modified by ltconfig
2884if test -r "$cache_file"; then
6840198f
NC
2885 # Some versions of bash will fail to source /dev/null (special
2886 # files actually), so we avoid doing that.
2887 if test -f "$cache_file"; then
2888 { echo "$as_me:2888: loading cache $cache_file" >&5
2889echo "$as_me: loading cache $cache_file" >&6;}
2890 case $cache_file in
2891 [\\/]* | ?:[\\/]* ) . $cache_file;;
2892 *) . ./$cache_file;;
2893 esac
2894 fi
bedf545c 2895else
6840198f
NC
2896 { echo "$as_me:2896: creating cache $cache_file" >&5
2897echo "$as_me: creating cache $cache_file" >&6;}
2898 >$cache_file
bedf545c
ILT
2899fi
2900
bedf545c 2901# This can be used to rebuild libtool when needed
ac48eca1 2902LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh $ac_aux_dir/ltcf-c.sh"
bedf545c
ILT
2903
2904# Always use our own libtool.
2905LIBTOOL='$(SHELL) $(top_builddir)/libtool'
2906
252b5132
RH
2907# Redirect the config.log output again, so that the ltconfig log is not
2908# clobbered by the next message.
2909exec 5>>./config.log
2910
252b5132
RH
2911user_bfd_gas=
2912# Check whether --enable-bfd-assembler or --disable-bfd-assembler was given.
2913if test "${enable_bfd_assembler+set}" = set; then
2914 enableval="$enable_bfd_assembler"
2915 case "${enableval}" in
2916 yes) need_bfd=yes user_bfd_gas=yes ;;
2917 no) user_bfd_gas=no ;;
6840198f
NC
2918 *) { { echo "$as_me:2918: error: bad value ${enableval} given for bfd-assembler option" >&5
2919echo "$as_me: error: bad value ${enableval} given for bfd-assembler option" >&2;}
2920 { (exit 1); exit 1; }; } ;;
252b5132 2921esac
6840198f 2922fi; # Check whether --enable-targets or --disable-targets was given.
252b5132
RH
2923if test "${enable_targets+set}" = set; then
2924 enableval="$enable_targets"
2925 case "${enableval}" in
6840198f
NC
2926 yes | "") { { echo "$as_me:2926: error: enable-targets option must specify target names or 'all'" >&5
2927echo "$as_me: error: enable-targets option must specify target names or 'all'" >&2;}
2928 { (exit 1); exit 1; }; }
252b5132
RH
2929 ;;
2930 no) enable_targets= ;;
2931 *) enable_targets=$enableval ;;
2932esac
6840198f 2933fi; # Check whether --enable-commonbfdlib or --disable-commonbfdlib was given.
252b5132
RH
2934if test "${enable_commonbfdlib+set}" = set; then
2935 enableval="$enable_commonbfdlib"
2936 case "${enableval}" in
2937 yes) commonbfdlib=true ;;
2938 no) commonbfdlib=false ;;
6840198f
NC
2939 *) { { echo "$as_me:2939: error: bad value ${enableval} for BFD commonbfdlib option" >&5
2940echo "$as_me: error: bad value ${enableval} for BFD commonbfdlib option" >&2;}
2941 { (exit 1); exit 1; }; } ;;
252b5132 2942esac
6840198f 2943fi;
252b5132
RH
2944using_cgen=no
2945
a2d91340
AC
2946build_warnings="-W -Wall"
2947# Check whether --enable-build-warnings or --disable-build-warnings was given.
2948if test "${enable_build_warnings+set}" = set; then
2949 enableval="$enable_build_warnings"
2950 case "${enableval}" in
2951 yes) ;;
2952 no) build_warnings="-w";;
2953 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
2954 build_warnings="${build_warnings} ${t}";;
2955 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
2956 build_warnings="${t} ${build_warnings}";;
2957 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
2958esac
2959if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
2960 echo "Setting warning flags = $build_warnings" 6>&1
2961fi
6840198f 2962fi; WARN_CFLAGS=""
a2d91340
AC
2963if test "x${build_warnings}" != x -a "x$GCC" = xyes ; then
2964 WARN_CFLAGS="${build_warnings}"
2965fi
2966
252b5132
RH
2967# Generate a header file
2968
6840198f 2969ac_config_headers="$ac_config_headers config.h:config.in"
252b5132 2970
6840198f 2971ac_config_commands="$ac_config_commands default-1"
252b5132 2972
76a27922
ILT
2973# If we are on a DOS filesystem, we must use gdb.ini rather than
2974# .gdbinit.
2975GDBINIT=".gdbinit"
2976case "${host}" in
2977 *-*-msdos* | *-*-go32* | *-*-mingw32* | *-*-cygwin* | *-*-windows*)
2978 GDBINIT="gdb.ini"
2979 ;;
2980esac
2981
252b5132
RH
2982te_file=generic
2983
2984# Makefile target for installing gas in $(tooldir)/bin.
2985install_tooldir=install-exec-tooldir
2986
2987canon_targets=""
15886821 2988all_targets=no
252b5132
RH
2989if test -n "$enable_targets" ; then
2990 for t in `echo $enable_targets | sed 's/,/ /g'`; do
15886821
L
2991 if test $t = "all"; then
2992 all_targets=yes
2993 continue
2994 fi
6d83c84b 2995 result=`$ac_config_sub $t 2>/dev/null`
252b5132
RH
2996 if test -n "$result" ; then
2997 canon_targets="$canon_targets $result"
2998# else
2999# # Permit "all", etc. We don't support it yet though.
3000# canon_targets="$canon_targets $t"
3001 fi
3002 done
3003 _gas_uniq_list="$canon_targets"
3004_gas_uniq_newlist=""
3005for _gas_uniq_i in _gas_uniq_dummy $_gas_uniq_list ; do
3006 case $_gas_uniq_i in
3007 _gas_uniq_dummy) ;;
3008 *) case " $_gas_uniq_newlist " in
3009 *" $_gas_uniq_i "*) ;;
3010 *) _gas_uniq_newlist="$_gas_uniq_newlist $_gas_uniq_i" ;;
3011 esac ;;
3012 esac
3013done
3014canon_targets=$_gas_uniq_newlist
3015
3016fi
3017
3018emulations=""
3019
3020for this_target in $target $canon_targets ; do
3021
3022 eval `echo $this_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/cpu=\1 vendor=\2 os=\3/'`
3023
3024 # check for architecture variants
3025 arch=
3026 endian=
3027 case ${cpu} in
3028 alpha*) cpu_type=alpha ;;
3029 armeb) cpu_type=arm endian=big ;;
3030 arm*) cpu_type=arm endian=little ;;
3031 armb*) cpu_type=arm endian=little ;;
3032 armv*l) cpu_type=arm endian=little ;;
3033 armv*b) cpu_type=arm endian=big ;;
077b8428 3034 xscale*) cpu_type=arm endian=little ;;
252b5132
RH
3035 strongarm*) cpu_type=arm endian=little ;;
3036 thumb*) cpu_type=arm endian=little ;;
3037 hppa*) cpu_type=hppa ;;
81c425d1 3038 i[3456]86) cpu_type=i386 arch=i386;;
a735d1cd 3039 x86_64) cpu_type=i386 arch=x86_64;;
800eeca4 3040 ia64) cpu_type=ia64 ;;
6f6ef0fa 3041 m6811|m6812|m68hc12) cpu_type=m68hc11 ;;
252b5132
RH
3042 m680[012346]0) cpu_type=m68k ;;
3043 m68008) cpu_type=m68k ;;
3044 m683??) cpu_type=m68k ;;
3045 m5200) cpu_type=m68k ;;
3046 m8*) cpu_type=m88k ;;
3047 mips*el) cpu_type=mips endian=little ;;
3048 mips*) cpu_type=mips endian=big ;;
041dd5a9
ILT
3049 pjl*) cpu_type=pj endian=little ;;
3050 pj*) cpu_type=pj endian=big ;;
252b5132
RH
3051 powerpcle*) cpu_type=ppc endian=little ;;
3052 powerpc*) cpu_type=ppc endian=big ;;
3053 rs6000*) cpu_type=ppc ;;
a85d7ed0
NC
3054 s390x*) cpu_type=s390 arch=s390x ;;
3055 s390*) cpu_type=s390 arch=s390 ;;
252b5132
RH
3056 sparclite*) cpu_type=sparc arch=sparclite ;;
3057 sparclet*) cpu_type=sparc arch=sparclet ;;
3058 sparc64*) cpu_type=sparc arch=v9-64 ;;
3059 sparc86x*) cpu_type=sparc arch=sparc86x ;;
3060 sparc*) cpu_type=sparc arch=sparclite ;; # ??? See tc-sparc.c.
3061 v850*) cpu_type=v850 ;;
3062 *) cpu_type=${cpu} ;;
3063 esac
3064
3065 if test ${this_target} = $target ; then
3066 target_cpu_type=${cpu_type}
3067 elif test ${target_cpu_type} != ${cpu_type} ; then
3068 continue
3069 fi
3070
3071 generic_target=${cpu_type}-$vendor-$os
3072 dev=no
3073 bfd_gas=no
3074 em=generic
3075
3076 # assign object format
3077 case ${generic_target} in
3078 a29k-*-coff) fmt=coff ;;
3079 a29k-amd-udi) fmt=coff ;;
3080 a29k-amd-ebmon) fmt=coff ;;
3081 a29k-nyu-sym1) fmt=coff ;;
5f68c319 3082 a29k-*-rtems*) fmt=coff ;;
252b5132
RH
3083 a29k-*-vxworks*) fmt=coff ;;
3084
3085 alpha*-*-*vms*) fmt=evax ;;
3086 alpha*-*-netware*) fmt=ecoff ;;
3087 alpha*-*-openbsd*) fmt=ecoff ;;
3088 alpha*-*-osf*) fmt=ecoff ;;
3089 alpha*-*-linuxecoff*) fmt=ecoff ;;
3090 alpha*-*-linux-gnu*) fmt=elf em=linux ;;
3091 alpha*-*-netbsd*) fmt=elf em=nbsd ;;
3092
3093 arc-*-elf*) fmt=elf bfd_gas=yes ;;
3094
3095 arm-*-aout) fmt=aout ;;
3096 arm-*-coff | thumb-*-coff) fmt=coff ;;
5f68c319 3097 arm-*-rtems | thumb-*-rtems) fmt=elf ;;
252b5132 3098 arm-*-elf | thumb-*-elf) fmt=elf ;;
0decc840 3099 arm*-*-conix*) fmt=elf ;;
252b5132 3100 arm-*-linux*aout*) fmt=aout em=linux ;;
6840198f 3101 arm*-*-linux-gnu* | arm*-*-uclinux*)
222f8079 3102 fmt=elf em=linux ;;
c1e73230 3103 arm-*-netbsd*) fmt=aout em=nbsd ;;
252b5132
RH
3104 arm-*-oabi | thumb-*-oabi) fmt=elf ;;
3105 arm-epoc-pe | thumb-epoc-pe) fmt=coff em=epoc-pe ;;
c1e73230 3106 arm-*-wince) fmt=coff em=wince-pe ;;
252b5132
RH
3107 arm-*-pe | thumb-*-pe) fmt=coff em=pe ;;
3108 arm-*-riscix*) fmt=aout em=riscix ;;
3109
adde6300
AM
3110 avr-*-*) fmt=elf bfd_gas=yes ;;
3111
3bcbcc3d
HPN
3112 cris-*-*) fmt=multi bfd_gas=yes ;;
3113
252b5132
RH
3114 d10v-*-*) fmt=elf bfd_gas=yes ;;
3115 d30v-*-*) fmt=elf bfd_gas=yes ;;
3116
252b5132
RH
3117 fr30-*-*) fmt=elf bfd_gas=yes ;;
3118
ad1079af
AM
3119 hppa-*-linux-gnu*) case ${cpu} in
3120 hppa*64*)
3121 fmt=elf em=hppalinux64;;
3122 hppa*)
3123 fmt=elf em=linux;;
3124 esac ;;
252b5132
RH
3125 hppa-*-*elf*) fmt=elf em=hppa ;;
3126 hppa-*-lites*) fmt=elf em=hppa ;;
3127 hppa-*-osf*) fmt=som em=hppa ;;
3128 hppa-*-rtems*) fmt=elf em=hppa ;;
ad1079af 3129 hppa-*-hpux11*) case ${cpu} in
c9e10a08 3130 hppa*64*)
ad1079af 3131 fmt=elf em=hppa64 ;;
c9e10a08 3132 hppa*)
ad1079af
AM
3133 fmt=som em=hppa ;;
3134 esac ;;
252b5132
RH
3135 hppa-*-hpux*) fmt=som em=hppa ;;
3136 hppa-*-mpeix*) fmt=som em=hppa ;;
3137 hppa-*-bsd*) fmt=som em=hppa ;;
3138 hppa-*-hiux*) fmt=som em=hppa ;;
3139
5f68c319 3140 h8300-*-rtems*) fmt=coff ;;
252b5132 3141 h8300-*-coff) fmt=coff ;;
e66457fb
AM
3142 h8500-*-rtems*) fmt=coff ;;
3143 h8500-*-coff) fmt=coff ;;
252b5132 3144
5b93d8bb 3145 i370-*-elf* | i370-*-linux*) fmt=elf ;;
252b5132
RH
3146 i386-ibm-aix*) fmt=coff em=i386aix ;;
3147 i386-sequent-bsd*) fmt=aout em=dynix bfd_gas=yes ;;
3148 i386-*-beospe*) fmt=coff em=pe bfd_gas=yes ;;
3149 i386-*-beoself* | i386-*-beos*) fmt=elf bfd_gas=yes ;;
3150 i386-*-bsd*) fmt=aout em=386bsd ;;
3151 i386-*-netbsd0.8) fmt=aout em=386bsd ;;
3152 i386-*-netbsd*) fmt=aout em=nbsd bfd_gas=yes;;
3153 i386-*-openbsd*) fmt=aout em=nbsd bfd_gas=yes;;
3154 i386-*-linux*aout* | i386-*-linuxoldld) fmt=aout em=linux ;;
3155 i386-*-linux*coff*) fmt=coff em=linux ;;
3156 i386-*-linux-gnu*) fmt=elf em=linux bfd_gas=yes ;;
a735d1cd 3157 x86_64-*-linux-gnu*) fmt=elf em=linux bfd_gas=yes ;;
252b5132 3158 i386-*-lynxos*) fmt=coff em=lynx ;;
fc997f4b 3159 i386-*-sysv[45]* | i386-*-solaris* | i386-*-elf)
252b5132 3160 fmt=elf bfd_gas=yes ;;
f98fd99f 3161 i386-*-freebsdaout* | i386-*-freebsd[12].* | i386-*-freebsd[12])
008960a5 3162 fmt=aout em=386bsd ;;
252b5132
RH
3163 i386-*-coff | i386-*-sysv* | i386-*-sco3.2v5*coff | i386-*-isc*)
3164 fmt=coff ;;
3165 i386-*-sco3.2v5*) fmt=elf
3166 if test ${this_target} = $target; then
6840198f
NC
3167
3168cat >>confdefs.h <<\EOF
252b5132
RH
3169#define SCO_ELF 1
3170EOF
3171
3172 fi
3173 ;;
3174 i386-*-sco3.2*) fmt=coff ;;
3175 i386-*-vsta) fmt=aout ;;
3176 i386-*-msdosdjgpp* | i386-*-go32* | i386-go32-rtems*)
349a994c 3177 fmt=coff em=go32 bfd_gas=yes
6840198f
NC
3178
3179cat >>confdefs.h <<\EOF
56385375
L
3180#define STRICTCOFF 1
3181EOF
3182
3183 ;;
53f3de98 3184 i386-*-rtemself*) fmt=elf ;;
252b5132
RH
3185 i386-*-rtems*) fmt=coff ;;
3186 i386-*-gnu*) fmt=elf ;;
3187 i386-*-mach*)
3188 fmt=aout em=mach bfd_gas=yes ;;
3189 i386-*-msdos*) fmt=aout ;;
3190 i386-*-moss*) fmt=elf ;;
c1e73230 3191 i386-*-pe) fmt=coff em=pe bfd_gas=yes ;;
252b5132 3192 i386-*-cygwin*) fmt=coff em=pe bfd_gas=yes ;;
9750fcc5 3193 i386-*-interix*) fmt=coff em=interix bfd_gas=yes ;;
252b5132 3194 i386-*-mingw32*) fmt=coff em=pe bfd_gas=yes ;;
c1e73230 3195 i386-*-*nt*) fmt=coff em=pe bfd_gas=yes ;;
29fe79d3 3196 i386-*-vxworks*) fmt=aout ;;
59ff2774 3197 i386-*-chaos) fmt=elf ;;
aa8c34c3
JE
3198 i860-stardent-sysv4* | i860-stardent-elf*)
3199 fmt=elf bfd_gas=yes endian=little
6840198f
NC
3200 { echo "$as_me:3200: WARNING: GAS support for ${generic_target} is preliminary and a work in progress" >&5
3201echo "$as_me: WARNING: GAS support for ${generic_target} is preliminary and a work in progress" >&2;} ;;
252b5132
RH
3202 i960-*-bout) fmt=bout ;;
3203 i960-*-coff) fmt=coff em=ic960 ;;
3204 i960-*-rtems*) fmt=coff em=ic960 ;;
3205 i960-*-nindy*) fmt=bout ;;
3206 i960-*-vxworks4*) fmt=bout ;;
3207 i960-*-vxworks5.0) fmt=bout ;;
3208 i960-*-vxworks5.*) fmt=coff em=ic960 ;;
3209 i960-*-vxworks*) fmt=bout ;;
bedf545c 3210 i960-*-elf*) fmt=elf ;;
252b5132 3211
800eeca4 3212 ia64-*-elf*) fmt=elf ;;
7463c317 3213 ia64-*-aix*) fmt=elf em=ia64aix ;;
800eeca4 3214 ia64-*-linux-gnu*) fmt=elf em=linux ;;
44f5c83a 3215 ia64-*-hpux*) fmt=elf em=hpux ;;
800eeca4 3216
252b5132
RH
3217 m32r-*-*) fmt=elf bfd_gas=yes ;;
3218
60bcf0fa
NC
3219 m68hc11-*-*|m6811-*-*|m68hc12-*-*|m6812-*-*)fmt=elf bfd_gas=yes ;;
3220
252b5132
RH
3221 m68k-*-vxworks* | m68k-ericsson-ose | m68k-*-sunos*)
3222 fmt=aout em=sun3 ;;
3223 m68k-motorola-sysv*) fmt=coff em=delta ;;
3224 m68k-bull-sysv3*) fmt=coff em=dpx2 ;;
3225 m68k-apollo-*) fmt=coff em=apollo ;;
3226 m68k-*-sysv4*) # must be before -sysv*
3227 fmt=elf em=svr4 ;;
3228 m68k-*-elf*) fmt=elf ;;
3229 m68k-*-coff | m68k-*-sysv* | m68k-*-rtems*)
3230 fmt=coff ;;
3231 m68k-*-hpux*) fmt=hp300 em=hp300 ;;
3232 m68k-*-linux*aout*) fmt=aout em=linux ;;
3233 m68k-*-linux-gnu*) fmt=elf em=linux ;;
3234 m68k-*-gnu*) fmt=elf ;;
3235 m68k-*-lynxos*) fmt=coff em=lynx ;;
3236 m68k-*-netbsd*) fmt=aout em=nbsd bfd_gas=yes ;;
3237 m68k-*-openbsd*) fmt=aout em=nbsd bfd_gas=yes ;;
3238 m68k-apple-aux*) fmt=coff em=aux ;;
3239 m68k-*-psos*) fmt=elf em=psos;;
3240
3241 m88k-motorola-sysv3*) fmt=coff em=delt88 ;;
3242 m88k-*-coff*) fmt=coff ;;
3243
3244 mcore-*-elf) fmt=elf bfd_gas=yes ;;
3245 mcore-*-pe) fmt=coff em=pe bfd_gas=yes ;;
3246
3247 # don't change em like *-*-bsd does
3248 mips-dec-netbsd*) fmt=elf endian=little ;;
3249 mips-dec-openbsd*) fmt=elf endian=little ;;
3250 mips-dec-bsd*) fmt=aout endian=little ;;
3251 mips-sony-bsd*) fmt=ecoff ;;
6840198f
NC
3252 mips-*-bsd*) { { echo "$as_me:3252: error: Unknown vendor for mips-bsd configuration." >&5
3253echo "$as_me: error: Unknown vendor for mips-bsd configuration." >&2;}
3254 { (exit 1); exit 1; }; } ;;
252b5132
RH
3255 mips-*-ultrix*) fmt=ecoff endian=little ;;
3256 mips-*-osf*) fmt=ecoff endian=little ;;
3257 mips-*-ecoff*) fmt=ecoff ;;
3258 mips-*-ecoff*) fmt=ecoff ;;
056350c6 3259 mips-*-pe*) fmt=coff endian=little em=pe ;;
252b5132
RH
3260 mips-*-irix6*) fmt=elf ;;
3261 mips-*-irix5*) fmt=elf ;;
3262 mips-*-irix*) fmt=ecoff ;;
3263 mips-*-lnews*) fmt=ecoff em=lnews ;;
3264 mips-*-riscos*) fmt=ecoff ;;
af9539e4
L
3265 mips-*-sysv4*MP* | mips-*-linux-gnu* | mips-*-gnu*)
3266 fmt=elf em=tmips ;;
252b5132 3267 mips-*-sysv*) fmt=ecoff ;;
af9539e4 3268 mips-*-elf* | mips-*-rtems* | mips-*-openbsd*)
252b5132
RH
3269 fmt=elf ;;
3270 mips-*-vxworks*) fmt=elf
6840198f
NC
3271
3272cat >>confdefs.h <<\EOF
252b5132
RH
3273#define MIPS_STABS_ELF 1
3274EOF
3275
3276 ;;
3277 mn10200-*-*) fmt=elf bfd_gas=yes ;;
3278 mn10300-*-*) fmt=elf bfd_gas=yes ;;
041dd5a9 3279 pj*) fmt=elf ;;
252b5132
RH
3280 ppc-*-pe | ppc-*-cygwin* | ppc-*-winnt*)
3281 fmt=coff em=pe ;;
3282 ppc-*-aix*) fmt=coff ;;
3283 ppc-*-beos*) fmt=coff ;;
3284 ppc-*-*bsd* | ppc-*-elf* | ppc-*-eabi* | ppc-*-sysv4*)
3285 fmt=elf ;;
3286 ppc-*-linux-gnu*) fmt=elf
3287 case "$endian" in
3288 big) ;;
6840198f
NC
3289 *) { { echo "$as_me:3289: error: GNU/Linux must be configured big endian" >&5
3290echo "$as_me: error: GNU/Linux must be configured big endian" >&2;}
3291 { (exit 1); exit 1; }; } ;;
252b5132
RH
3292 esac
3293 ;;
3294 ppc-*-solaris*) fmt=elf
3295 if test ${this_target} = $target; then
6840198f
NC
3296
3297cat >>confdefs.h <<\EOF
252b5132
RH
3298#define TARGET_SOLARIS_COMMENT 1
3299EOF
3300
3301 fi
3302 if test x${endian} = xbig; then
6840198f
NC
3303 { { echo "$as_me:3303: error: Solaris must be configured little endian" >&5
3304echo "$as_me: error: Solaris must be configured little endian" >&2;}
3305 { (exit 1); exit 1; }; }
252b5132
RH
3306 fi
3307 ;;
3308 ppc-*-rtems*) fmt=elf ;;
3309 ppc-*-macos* | ppc-*-mpw*)
3310 fmt=coff em=macos ;;
3311 ppc-*-netware*) fmt=elf em=ppcnw ;;
e4a86f6f 3312 ppc-*-vxworks*) fmt=elf ;;
252b5132 3313
a85d7ed0
NC
3314 s390x-*-linux-gnu*) fmt=elf em=linux ;;
3315 s390-*-linux-gnu*) fmt=elf em=linux ;;
3316
d07ed2cd 3317 sh-*-linux*) fmt=elf em=linux ;;
252b5132 3318 sh-*-elf*) fmt=elf ;;
e135f41b 3319 sh-*-coff*) fmt=coff bfd_gas=yes;;
056350c6 3320 sh-*-pe*) fmt=coff em=pe bfd_gas=yes;;
53f3de98 3321 sh-*-rtemself*) fmt=elf ;;
e135f41b 3322 sh-*-rtems*) fmt=coff bfd_gas=yes;;
252b5132
RH
3323
3324 ns32k-pc532-mach* | ns32k-pc532-ux*) fmt=aout em=pc532mach ;;
3325 ns32k-pc532-netbsd* | ns32k-pc532-lites*) fmt=aout em=nbsd532 ;;
3326 ns32k-pc532-openbsd*) fmt=aout em=nbsd532 ;;
3327
5f68c319
NC
3328 sparc-*-rtemsaout*) fmt=aout ;;
3329 sparc-*-rtemself*) fmt=elf ;;
3330 sparc-*-rtems*) fmt=elf ;;
252b5132
RH
3331 sparc-*-sunos4*) fmt=aout em=sun3 ;;
3332 sparc-*-aout | sparc*-*-vxworks*)
3333 fmt=aout em=sparcaout ;;
3334 sparc-*-coff) fmt=coff ;;
3335 sparc-*-linux*aout*) fmt=aout em=linux ;;
3336 sparc-*-linux-gnu*) fmt=elf em=linux ;;
3337 sparc-*-lynxos*) fmt=coff em=lynx ;;
3338 sparc-fujitsu-none) fmt=aout ;;
3339 sparc-*-elf | sparc-*-sysv4* | sparc-*-solaris*)
3340 fmt=elf ;;
98e5953c
JL
3341 sparc-*-netbsd*) em=nbsd bfd_gas=yes
3342 case ${cpu} in
3343 sparc) case ${os} in
3344 *elf*) fmt=elf ;;
3345 *) fmt=aout ;;
3346 esac ;;
3347 sparc64) fmt=elf ;;
3348 esac
3349 ;;
252b5132
RH
3350 sparc-*-openbsd*) fmt=aout em=nbsd ;;
3351
3352 strongarm-*-coff) fmt=coff ;;
3353 strongarm-*-elf) fmt=elf ;;
077b8428
NC
3354 xscale-*-coff) fmt=coff ;;
3355 xscale-*-elf) fmt=elf ;;
252b5132
RH
3356
3357 tic30-*-*aout*) fmt=aout bfd_gas=yes ;;
3358 tic30-*-*coff*) fmt=coff bfd_gas=yes ;;
39bec121
TW
3359 tic54x-*-* | c54x*-*-*)
3360 fmt=coff bfd_gas=yes need_libm=yes;;
252b5132
RH
3361 tic80-*-*) fmt=coff ;;
3362
3363 v850-*-*) fmt=elf bfd_gas=yes ;;
3364 v850e-*-*) fmt=elf bfd_gas=yes ;;
3365 v850ea-*-*) fmt=elf bfd_gas=yes ;;
3366
3367 vax-*-bsd* | vax-*-ultrix*)
3368 fmt=aout ;;
3369 vax-*-vms) fmt=vms ;;
3370
252b5132
RH
3371 z8k-*-coff | z8k-*-sim)
3372 fmt=coff ;;
3373
3374 w65-*-*) fmt=coff ;;
3375
3376 *-*-aout | *-*-scout)
3377 fmt=aout ;;
1c33f1da 3378 *-*-freebsd*) fmt=elf em=freebsd bfd_gas=yes ;;
252b5132
RH
3379 *-*-nindy*)
3380 fmt=bout ;;
3381 *-*-bsd*)
3382 fmt=aout em=sun3 ;;
3383 *-*-generic) fmt=generic ;;
3384 *-*-xray | *-*-hms) fmt=coff ;;
3385 *-*-sim) fmt=coff ;;
3386 *-*-elf | *-*-sysv4* | *-*-solaris*)
6840198f
NC
3387 { echo "$as_me:3387: WARNING: GAS support for ${generic_target} is incomplete." >&5
3388echo "$as_me: WARNING: GAS support for ${generic_target} is incomplete." >&2;}
252b5132
RH
3389 fmt=elf dev=yes ;;
3390 *-*-vxworks) fmt=aout ;;
3391 *-*-netware) fmt=elf ;;
3392 esac
3393
3394 if test ${this_target} = $target ; then
3395 endian_def=
3396 if test x${endian} = xbig; then
3397 endian_def=1
3398 elif test x${endian} = xlittle; then
3399 endian_def=0
3400 fi
3401 if test x${endian_def} != x; then
6840198f
NC
3402
3403cat >>confdefs.h <<EOF
252b5132
RH
3404#define TARGET_BYTES_BIG_ENDIAN $endian_def
3405EOF
3406
3407 fi
3408 fi
3409
3410 case ${cpu_type}-${fmt} in
3411 alpha*-*) bfd_gas=yes ;;
3412 arm-*) bfd_gas=yes ;;
3413 # not yet
3414 # i386-aout) bfd_gas=preferred ;;
800eeca4 3415 ia64*-*) bfd_gas=yes ;;
252b5132
RH
3416 mips-*) bfd_gas=yes ;;
3417 ns32k-*) bfd_gas=yes ;;
e135f41b 3418 pdp11-*) bfd_gas=yes ;;
252b5132
RH
3419 ppc-*) bfd_gas=yes ;;
3420 sparc-*) bfd_gas=yes ;;
3421 strongarm-*) bfd_gas=yes ;;
a735d1cd 3422 xscale-*) bfd_gas=yes ;;
252b5132
RH
3423 *-elf) bfd_gas=yes ;;
3424 *-ecoff) bfd_gas=yes ;;
3425 *-som) bfd_gas=yes ;;
4c63da97
AM
3426 #enable bfd for coff and aout to allow testing if a bfd target is
3427 #the primary target, but not for coff or aout as the primary target
4ca72d38 3428 i386-coff) if test x${primary_bfd_gas} = xyes; then bfd_gas=yes; fi ;;
4c63da97 3429 i386-aout) if test x${primary_bfd_gas} = xyes; then bfd_gas=yes; fi ;;
252b5132
RH
3430 *) ;;
3431 esac
3432
3433# Other random stuff.
3434
3435 # Do we need the opcodes library?
3436 case ${cpu_type} in
3437 vax | i386 | tic30)
3438 ;;
3439
3440 *)
3441 need_opcodes=yes
3442
3443 case "${enable_shared}" in
3444 yes) shared_opcodes=true ;;
3445 *opcodes*) shared_opcodes=true ;;
3446 *) shared_opcodes=false ;;
3447 esac
3448 if test "${shared_opcodes}" = "true"; then
3449 # A shared libopcodes must be linked against libbfd.
3450 need_bfd=yes
3451 fi
3452 ;;
3453 esac
3454
3455 # Any other special object files needed ?
3456 case ${cpu_type} in
3457 fr30 | m32r)
3458 using_cgen=yes
3459 ;;
3460
3461 m68k)
3462 case ${extra_objects} in
3463 *m68k-parse.o*) ;;
3464 *) extra_objects="$extra_objects m68k-parse.o" ;;
3465 esac
3466 ;;
3467
a85d7ed0
NC
3468 s390)
3469 if test $this_target = $target ; then
6840198f
NC
3470
3471cat >>confdefs.h <<EOF
a85d7ed0
NC
3472#define DEFAULT_ARCH "${arch}"
3473EOF
3474
3475 fi
3476 ;;
3477
252b5132 3478 mips)
6840198f 3479 echo ${extra_objects} | grep -s "itbl-parse.o"
252b5132
RH
3480 if test $? -ne 0 ; then
3481 extra_objects="$extra_objects itbl-parse.o"
3482 fi
3483
6840198f 3484 echo ${extra_objects} | grep -s "itbl-lex.o"
252b5132
RH
3485 if test $? -ne 0 ; then
3486 extra_objects="$extra_objects itbl-lex.o"
3487 fi
3488
6840198f 3489 echo ${extra_objects} | grep -s "itbl-ops.o"
252b5132
RH
3490 if test $? -ne 0 ; then
3491 extra_objects="$extra_objects itbl-ops.o"
3492 fi
3493 ;;
3494
b96d3a20
JH
3495 i386)
3496 if test $this_target = $target ; then
6840198f
NC
3497
3498cat >>confdefs.h <<EOF
b96d3a20
JH
3499#define DEFAULT_ARCH "${arch}"
3500EOF
3501
3502 fi
3503 ;;
252b5132
RH
3504 sparc)
3505 if test $this_target = $target ; then
6840198f
NC
3506
3507cat >>confdefs.h <<EOF
252b5132
RH
3508#define DEFAULT_ARCH "${arch}"
3509EOF
3510
3511 fi
3512 ;;
3513 *)
3514 ;;
3515 esac
3516
3517 if test $using_cgen = yes ; then
3518 case "x${extra_objects}" in
3519 *cgen.o*) ;;
3520 *) extra_objects="$extra_objects cgen.o" ;;
3521 esac
3522 fi
3523
3524# See if we really can support this configuration with the emulation code.
3525
3526 if test $this_target = $target ; then
3527 primary_bfd_gas=$bfd_gas
3528 obj_format=$fmt
3529 te_file=$em
3530
3531 if test $bfd_gas = no ; then
3532 # Can't support other configurations this way.
3533 break
3534 fi
3535 elif test $bfd_gas = no ; then
3536 # Can't support this configuration.
3537 break
3538 fi
3539
3540# From target name and format, produce a list of supported emulations.
3541
3542 case ${generic_target}-${fmt} in
3543 mips-*-irix5*-*) emulation="mipsbelf mipslelf mipself mipsbecoff mipslecoff mipsecoff" ;;
3544 mips-*-linux-gnu*-*) case "$endian" in
3545 big) emulation="mipsbelf mipslelf mipself mipsbecoff mipslecoff mipsecoff" ;;
3546 *) emulation="mipslelf mipsbelf mipself mipslecoff mipsbecoff mipsecoff" ;;
3547 esac ;;
3548 mips-*-lnews*-ecoff) ;;
3549 mips-*-*-ecoff) case "$endian" in
3550 big) emulation="mipsbecoff mipslecoff mipsecoff" ;;
3551 *) emulation="mipslecoff mipsbecoff mipsecoff" ;;
3552 esac ;;
3553 mips-*-*-elf) case "$endian" in
3554 big) emulation="mipsbelf mipslelf mipself" ;;
3555 *) emulation="mipslelf mipsbelf mipself" ;;
252b5132 3556 esac ;;
906fac54 3557 mips-*-sysv4*MP*-*) emulation="mipsbelf mipslelf mipself mipsbecoff mipslecoff mipsecoff" ;;
119caedd
L
3558 # i386-pc-pe-coff != i386-pc-coff.
3559 i386-*-pe-coff) ;;
4c63da97
AM
3560 # Uncommenting the next line will turn on support for i386 AOUT
3561 # for the default linux configuration
3562 # i386-*-linux*-elf) emulation="i386elf i386aout" ;;
3563 #
3564 i386-*-aout) emulation="i386aout" ;;
4ca72d38 3565 i386-*-coff) emulation="i386coff" ;;
4c63da97 3566 i386-*-elf) emulation="i386elf" ;;
3bcbcc3d 3567
f9c19112
HPN
3568 # Always all formats. The first stated emulation becomes the default.
3569 cris-*-*aout*) emulation="crisaout criself" ;;
3570 cris-*-*) emulation="criself crisaout" ;;
252b5132
RH
3571 esac
3572
3573 emulations="$emulations $emulation"
3574
3575done
3576
15886821
L
3577# Turn on all targets if possible
3578if test ${all_targets} = "yes"; then
3579 case ${target_cpu_type} in
3580 i386)
3581 case ${obj_format} in
3582 aout)
3583 emulations="$emulations i386coff i386elf"
3584 ;;
3585 coff)
3586 emulations="$emulations i386aout i386elf"
3587 ;;
3588 elf)
3589 emulations="$emulations i386aout i386coff"
3590 ;;
3591 esac
3592 ;;
3593 esac
3594fi
3595
252b5132
RH
3596# Assign floating point type. Most processors with FP support
3597# IEEE FP. On those that don't support FP at all, usually IEEE
3598# is emulated.
3599case ${target_cpu} in
3600 vax | tahoe ) atof=${target_cpu} ;;
e135f41b 3601 pdp11) atof=vax ;;
252b5132
RH
3602 *) atof=ieee ;;
3603esac
3604
3605case "${obj_format}" in
6840198f
NC
3606 "") { { echo "$as_me:3606: error: GAS does not know what format to use for target ${target}" >&5
3607echo "$as_me: error: GAS does not know what format to use for target ${target}" >&2;}
3608 { (exit 1); exit 1; }; } ;;
252b5132
RH
3609esac
3610
3611# Unfortunately the cpu in cpu-opc.h file isn't always $(TARGET_CPU).
3612cgen_cpu_prefix=""
3613if test $using_cgen = yes ; then
3614 case ${target_cpu} in
3615 *) cgen_cpu_prefix=${target_cpu} ;;
3616 esac
6840198f
NC
3617
3618cat >>confdefs.h <<\EOF
252b5132
RH
3619#define USING_CGEN 1
3620EOF
3621
3622fi
3623
252b5132 3624if test ! -r ${srcdir}/config/tc-${target_cpu_type}.c; then
6840198f
NC
3625 { { echo "$as_me:3625: error: GAS does not support target CPU ${target_cpu_type}" >&5
3626echo "$as_me: error: GAS does not support target CPU ${target_cpu_type}" >&2;}
3627 { (exit 1); exit 1; }; }
252b5132
RH
3628fi
3629
3630if test ! -r ${srcdir}/config/obj-${obj_format}.c; then
6840198f
NC
3631 { { echo "$as_me:3631: error: GAS does not have support for object file format ${obj_format}" >&5
3632echo "$as_me: error: GAS does not have support for object file format ${obj_format}" >&2;}
3633 { (exit 1); exit 1; }; }
252b5132
RH
3634fi
3635
3636case ${user_bfd_gas}-${primary_bfd_gas} in
3637 yes-yes | no-no)
3638 # We didn't override user's choice.
3639 ;;
3640 no-yes)
6840198f
NC
3641 { echo "$as_me:3641: WARNING: Use of BFD is required for ${target}; overriding config options." >&5
3642echo "$as_me: WARNING: Use of BFD is required for ${target}; overriding config options." >&2;}
252b5132
RH
3643 ;;
3644 no-preferred)
3645 primary_bfd_gas=no
3646 ;;
3647 *-preferred)
3648 primary_bfd_gas=yes
3649 ;;
3650 yes-*)
3651 primary_bfd_gas=yes
3652 ;;
3653 -*)
3654 # User specified nothing.
3655 ;;
3656esac
3657
3658# Some COFF configurations want these random other flags set.
3659case ${obj_format} in
3660 coff)
3661 case ${target_cpu_type} in
6840198f
NC
3662 i386)
3663cat >>confdefs.h <<\EOF
252b5132
RH
3664#define I386COFF 1
3665EOF
3666 ;;
6840198f
NC
3667 m68k)
3668cat >>confdefs.h <<\EOF
252b5132
RH
3669#define M68KCOFF 1
3670EOF
3671 ;;
6840198f
NC
3672 m88k)
3673cat >>confdefs.h <<\EOF
252b5132
RH
3674#define M88KCOFF 1
3675EOF
3676 ;;
3677 esac
3678 ;;
3679esac
3680
3681# Getting this done right is going to be a bitch. Each configuration specified
3682# with --enable-targets=... should be checked for environment, format, cpu, and
3683# bfd_gas setting.
3684#
3685# For each configuration, the necessary object file support code must be linked
3686# in. This might be only one, it might be up to four. The necessary emulation
3687# code needs to be provided, too.
3688#
3689# And then there's "--enable-targets=all"....
3690#
3691# For now, just always do it for MIPS ELF or ECOFF configurations. Sigh.
3692
3693formats="${obj_format}"
3694emfiles=""
3695EMULATIONS=""
3696_gas_uniq_list="$emulations"
3697_gas_uniq_newlist=""
3698for _gas_uniq_i in _gas_uniq_dummy $_gas_uniq_list ; do
3699 case $_gas_uniq_i in
3700 _gas_uniq_dummy) ;;
3701 *) case " $_gas_uniq_newlist " in
3702 *" $_gas_uniq_i "*) ;;
3703 *) _gas_uniq_newlist="$_gas_uniq_newlist $_gas_uniq_i" ;;
3704 esac ;;
3705 esac
3706done
3707emulations=$_gas_uniq_newlist
3708
3709for em in . $emulations ; do
3710 case $em in
3711 .) continue ;;
97238fbd 3712 mipsbelf | mipslelf | mipself)
252b5132 3713 fmt=elf file=mipself ;;
97238fbd 3714 mipsbecoff | mipslecoff | mipsecoff)
252b5132 3715 fmt=ecoff file=mipsecoff ;;
0aa5d426
HPN
3716 *coff)
3717 fmt=coff file=$em ;;
3718 *aout)
3719 fmt=aout file=$em ;;
3720 *elf)
3721 fmt=elf file=$em ;;
252b5132
RH
3722 esac
3723 formats="$formats $fmt"
3724 emfiles="$emfiles e-$file.o"
3725 EMULATIONS="$EMULATIONS &$em,"
3726done
3727_gas_uniq_list="$formats"
3728_gas_uniq_newlist=""
3729for _gas_uniq_i in _gas_uniq_dummy $_gas_uniq_list ; do
3730 case $_gas_uniq_i in
3731 _gas_uniq_dummy) ;;
3732 *) case " $_gas_uniq_newlist " in
3733 *" $_gas_uniq_i "*) ;;
3734 *) _gas_uniq_newlist="$_gas_uniq_newlist $_gas_uniq_i" ;;
3735 esac ;;
3736 esac
3737done
3738formats=$_gas_uniq_newlist
3739
3740_gas_uniq_list="$emfiles"
3741_gas_uniq_newlist=""
3742for _gas_uniq_i in _gas_uniq_dummy $_gas_uniq_list ; do
3743 case $_gas_uniq_i in
3744 _gas_uniq_dummy) ;;
3745 *) case " $_gas_uniq_newlist " in
3746 *" $_gas_uniq_i "*) ;;
3747 *) _gas_uniq_newlist="$_gas_uniq_newlist $_gas_uniq_i" ;;
3748 esac ;;
3749 esac
3750done
3751emfiles=$_gas_uniq_newlist
3752
3753if test `set . $formats ; shift ; echo $#` -gt 1 ; then
3754 for fmt in $formats ; do
3755 case $fmt in
6840198f
NC
3756 aout)
3757cat >>confdefs.h <<\EOF
252b5132
RH
3758#define OBJ_MAYBE_AOUT 1
3759EOF
3760 ;;
6840198f
NC
3761 bout)
3762cat >>confdefs.h <<\EOF
252b5132
RH
3763#define OBJ_MAYBE_BOUT 1
3764EOF
3765 ;;
6840198f
NC
3766 coff)
3767cat >>confdefs.h <<\EOF
252b5132
RH
3768#define OBJ_MAYBE_COFF 1
3769EOF
3770 ;;
6840198f
NC
3771 ecoff)
3772cat >>confdefs.h <<\EOF
252b5132
RH
3773#define OBJ_MAYBE_ECOFF 1
3774EOF
3775 ;;
6840198f
NC
3776 elf)
3777cat >>confdefs.h <<\EOF
252b5132
RH
3778#define OBJ_MAYBE_ELF 1
3779EOF
3780 ;;
6840198f
NC
3781 generic)
3782cat >>confdefs.h <<\EOF
252b5132
RH
3783#define OBJ_MAYBE_GENERIC 1
3784EOF
3785 ;;
6840198f
NC
3786 hp300)
3787cat >>confdefs.h <<\EOF
252b5132
RH
3788#define OBJ_MAYBE_HP300 1
3789EOF
3790 ;;
6840198f
NC
3791 ieee)
3792cat >>confdefs.h <<\EOF
252b5132
RH
3793#define OBJ_MAYBE_IEEE 1
3794EOF
3795 ;;
6840198f
NC
3796 som)
3797cat >>confdefs.h <<\EOF
252b5132
RH
3798#define OBJ_MAYBE_SOM 1
3799EOF
3800 ;;
6840198f
NC
3801 vms)
3802cat >>confdefs.h <<\EOF
252b5132
RH
3803#define OBJ_MAYBE_VMS 1
3804EOF
3805 ;;
3806 esac
3807 extra_objects="$extra_objects obj-$fmt.o"
3808 done
3809 obj_format=multi
3810fi
3811if test `set . $emfiles ; shift ; echo $#` -gt 0 ; then
252b5132 3812 DEFAULT_EMULATION=`set . $emulations ; echo $2`
4ca72d38
AM
3813 # e-mips* has more than one emulation per file, e-i386* has just one at the
3814 # moment. If only one emulation is specified, then don't define
3815 # USE_EMULATIONS or include any of the e-files as they will only be bloat.
3816 case "${obj_format}${emfiles}" in
3817 multi* | *mips*)
4ca72d38 3818 extra_objects="$extra_objects $emfiles"
6840198f
NC
3819
3820cat >>confdefs.h <<\EOF
252b5132
RH
3821#define USE_EMULATIONS 1
3822EOF
4ca72d38
AM
3823 ;;
3824 esac
252b5132
RH
3825fi
3826
6840198f 3827cat >>confdefs.h <<EOF
252b5132
RH
3828#define EMULATIONS $EMULATIONS
3829EOF
3830
6840198f 3831cat >>confdefs.h <<EOF
252b5132
RH
3832#define DEFAULT_EMULATION "$DEFAULT_EMULATION"
3833EOF
3834
252b5132
RH
3835case ${primary_bfd_gas}-${target_cpu_type}-${obj_format} in
3836 yes-*-coff) need_bfd=yes ;;
3837 no-*-coff) need_bfd=yes
6840198f
NC
3838
3839cat >>confdefs.h <<\EOF
252b5132
RH
3840#define MANY_SEGMENTS 1
3841EOF
3842 ;;
3843esac
3844
3845reject_dev_configs=yes
3846
3847case ${reject_dev_configs}-${dev} in
3848 yes-yes) # Oops.
6840198f
NC
3849 { { echo "$as_me:3849: error: GAS does not support the ${generic_target} configuration." >&5
3850echo "$as_me: error: GAS does not support the ${generic_target} configuration." >&2;}
3851 { (exit 1); exit 1; }; }
252b5132
RH
3852 ;;
3853esac
3854
252b5132 3855case "${primary_bfd_gas}" in
6840198f
NC
3856 yes)
3857cat >>confdefs.h <<\EOF
252b5132
RH
3858#define BFD_ASSEMBLER 1
3859EOF
3860
3861 need_bfd=yes ;;
3862esac
3863
3864# do we need the opcodes library?
3865case "${need_opcodes}" in
3866yes)
3867 OPCODES_LIB=../opcodes/libopcodes.la
3868 ;;
3869esac
3870
3871case "${need_bfd}" in
3872yes)
3873 BFDLIB=../bfd/libbfd.la
3874 ALL_OBJ_DEPS="$ALL_OBJ_DEPS ../bfd/bfd.h"
3875 ;;
3876esac
3877
6840198f 3878cat >>confdefs.h <<EOF
252b5132
RH
3879#define TARGET_ALIAS "${target_alias}"
3880EOF
3881
6840198f 3882cat >>confdefs.h <<EOF
252b5132
RH
3883#define TARGET_CANONICAL "${target}"
3884EOF
3885
6840198f 3886cat >>confdefs.h <<EOF
252b5132
RH
3887#define TARGET_CPU "${target_cpu}"
3888EOF
3889
6840198f 3890cat >>confdefs.h <<EOF
252b5132
RH
3891#define TARGET_VENDOR "${target_vendor}"
3892EOF
3893
6840198f 3894cat >>confdefs.h <<EOF
252b5132
RH
3895#define TARGET_OS "${target_os}"
3896EOF
3897
6840198f
NC
3898ac_ext=c
3899ac_cpp='$CPP $CPPFLAGS'
3900ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3901ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3902ac_compiler_gnu=$ac_cv_c_compiler_gnu
3903if test -n "$ac_tool_prefix"; then
3904 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3905set dummy ${ac_tool_prefix}gcc; ac_word=$2
3906echo "$as_me:3906: checking for $ac_word" >&5
3907echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3908if test "${ac_cv_prog_CC+set}" = set; then
3909 echo $ECHO_N "(cached) $ECHO_C" >&6
3910else
3911 if test -n "$CC"; then
3912 ac_cv_prog_CC="$CC" # Let the user override the test.
3913else
3914 ac_save_IFS=$IFS; IFS=$ac_path_separator
3915ac_dummy="$PATH"
3916for ac_dir in $ac_dummy; do
3917 IFS=$ac_save_IFS
3918 test -z "$ac_dir" && ac_dir=.
3919 $as_executable_p "$ac_dir/$ac_word" || continue
3920ac_cv_prog_CC="${ac_tool_prefix}gcc"
3921break
3922done
3923
3924fi
3925fi
3926CC=$ac_cv_prog_CC
3927if test -n "$CC"; then
3928 echo "$as_me:3928: result: $CC" >&5
3929echo "${ECHO_T}$CC" >&6
3930else
3931 echo "$as_me:3931: result: no" >&5
3932echo "${ECHO_T}no" >&6
3933fi
252b5132 3934
6840198f
NC
3935fi
3936if test -z "$ac_cv_prog_CC"; then
3937 ac_ct_CC=$CC
3938 # Extract the first word of "gcc", so it can be a program name with args.
252b5132 3939set dummy gcc; ac_word=$2
6840198f
NC
3940echo "$as_me:3940: checking for $ac_word" >&5
3941echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3942if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
3943 echo $ECHO_N "(cached) $ECHO_C" >&6
3944else
3945 if test -n "$ac_ct_CC"; then
3946 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3947else
3948 ac_save_IFS=$IFS; IFS=$ac_path_separator
3949ac_dummy="$PATH"
3950for ac_dir in $ac_dummy; do
3951 IFS=$ac_save_IFS
3952 test -z "$ac_dir" && ac_dir=.
3953 $as_executable_p "$ac_dir/$ac_word" || continue
3954ac_cv_prog_ac_ct_CC="gcc"
3955break
3956done
3957
3958fi
3959fi
3960ac_ct_CC=$ac_cv_prog_ac_ct_CC
3961if test -n "$ac_ct_CC"; then
3962 echo "$as_me:3962: result: $ac_ct_CC" >&5
3963echo "${ECHO_T}$ac_ct_CC" >&6
3964else
3965 echo "$as_me:3965: result: no" >&5
3966echo "${ECHO_T}no" >&6
3967fi
3968
3969 CC=$ac_ct_CC
3970else
3971 CC="$ac_cv_prog_CC"
3972fi
3973
3974if test -z "$CC"; then
3975 if test -n "$ac_tool_prefix"; then
3976 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
3977set dummy ${ac_tool_prefix}cc; ac_word=$2
3978echo "$as_me:3978: checking for $ac_word" >&5
3979echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3980if test "${ac_cv_prog_CC+set}" = set; then
3981 echo $ECHO_N "(cached) $ECHO_C" >&6
252b5132
RH
3982else
3983 if test -n "$CC"; then
3984 ac_cv_prog_CC="$CC" # Let the user override the test.
3985else
6840198f
NC
3986 ac_save_IFS=$IFS; IFS=$ac_path_separator
3987ac_dummy="$PATH"
3988for ac_dir in $ac_dummy; do
3989 IFS=$ac_save_IFS
3990 test -z "$ac_dir" && ac_dir=.
3991 $as_executable_p "$ac_dir/$ac_word" || continue
3992ac_cv_prog_CC="${ac_tool_prefix}cc"
3993break
3994done
3995
252b5132
RH
3996fi
3997fi
6840198f 3998CC=$ac_cv_prog_CC
252b5132 3999if test -n "$CC"; then
6840198f
NC
4000 echo "$as_me:4000: result: $CC" >&5
4001echo "${ECHO_T}$CC" >&6
4002else
4003 echo "$as_me:4003: result: no" >&5
4004echo "${ECHO_T}no" >&6
4005fi
4006
4007fi
4008if test -z "$ac_cv_prog_CC"; then
4009 ac_ct_CC=$CC
4010 # Extract the first word of "cc", so it can be a program name with args.
4011set dummy cc; ac_word=$2
4012echo "$as_me:4012: checking for $ac_word" >&5
4013echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4014if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
4015 echo $ECHO_N "(cached) $ECHO_C" >&6
4016else
4017 if test -n "$ac_ct_CC"; then
4018 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4019else
4020 ac_save_IFS=$IFS; IFS=$ac_path_separator
4021ac_dummy="$PATH"
4022for ac_dir in $ac_dummy; do
4023 IFS=$ac_save_IFS
4024 test -z "$ac_dir" && ac_dir=.
4025 $as_executable_p "$ac_dir/$ac_word" || continue
4026ac_cv_prog_ac_ct_CC="cc"
4027break
4028done
4029
4030fi
4031fi
4032ac_ct_CC=$ac_cv_prog_ac_ct_CC
4033if test -n "$ac_ct_CC"; then
4034 echo "$as_me:4034: result: $ac_ct_CC" >&5
4035echo "${ECHO_T}$ac_ct_CC" >&6
252b5132 4036else
6840198f
NC
4037 echo "$as_me:4037: result: no" >&5
4038echo "${ECHO_T}no" >&6
252b5132
RH
4039fi
4040
6840198f
NC
4041 CC=$ac_ct_CC
4042else
4043 CC="$ac_cv_prog_CC"
4044fi
4045
4046fi
252b5132
RH
4047if test -z "$CC"; then
4048 # Extract the first word of "cc", so it can be a program name with args.
4049set dummy cc; ac_word=$2
6840198f
NC
4050echo "$as_me:4050: checking for $ac_word" >&5
4051echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4052if test "${ac_cv_prog_CC+set}" = set; then
4053 echo $ECHO_N "(cached) $ECHO_C" >&6
252b5132
RH
4054else
4055 if test -n "$CC"; then
4056 ac_cv_prog_CC="$CC" # Let the user override the test.
4057else
252b5132 4058 ac_prog_rejected=no
6840198f
NC
4059 ac_save_IFS=$IFS; IFS=$ac_path_separator
4060ac_dummy="$PATH"
4061for ac_dir in $ac_dummy; do
4062 IFS=$ac_save_IFS
4063 test -z "$ac_dir" && ac_dir=.
4064 $as_executable_p "$ac_dir/$ac_word" || continue
4065if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
4066 ac_prog_rejected=yes
4067 continue
4068fi
4069ac_cv_prog_CC="cc"
4070break
4071done
4072
252b5132
RH
4073if test $ac_prog_rejected = yes; then
4074 # We found a bogon in the path, so make sure we never use it.
4075 set dummy $ac_cv_prog_CC
4076 shift
6840198f 4077 if test $# != 0; then
252b5132
RH
4078 # We chose a different compiler from the bogus one.
4079 # However, it has the same basename, so the bogon will be chosen
4080 # first if we set CC to just the basename; use the full file name.
4081 shift
6840198f 4082 set dummy "$ac_dir/$ac_word" ${1+"$@"}
252b5132
RH
4083 shift
4084 ac_cv_prog_CC="$@"
4085 fi
4086fi
4087fi
4088fi
6840198f 4089CC=$ac_cv_prog_CC
252b5132 4090if test -n "$CC"; then
6840198f
NC
4091 echo "$as_me:4091: result: $CC" >&5
4092echo "${ECHO_T}$CC" >&6
252b5132 4093else
6840198f
NC
4094 echo "$as_me:4094: result: no" >&5
4095echo "${ECHO_T}no" >&6
252b5132
RH
4096fi
4097
6840198f
NC
4098fi
4099if test -z "$CC"; then
4100 if test -n "$ac_tool_prefix"; then
4101 for ac_prog in cl
4102 do
4103 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4104set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4105echo "$as_me:4105: checking for $ac_word" >&5
4106echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4107if test "${ac_cv_prog_CC+set}" = set; then
4108 echo $ECHO_N "(cached) $ECHO_C" >&6
252b5132
RH
4109else
4110 if test -n "$CC"; then
4111 ac_cv_prog_CC="$CC" # Let the user override the test.
4112else
6840198f
NC
4113 ac_save_IFS=$IFS; IFS=$ac_path_separator
4114ac_dummy="$PATH"
4115for ac_dir in $ac_dummy; do
4116 IFS=$ac_save_IFS
4117 test -z "$ac_dir" && ac_dir=.
4118 $as_executable_p "$ac_dir/$ac_word" || continue
4119ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
4120break
4121done
4122
252b5132
RH
4123fi
4124fi
6840198f 4125CC=$ac_cv_prog_CC
252b5132 4126if test -n "$CC"; then
6840198f
NC
4127 echo "$as_me:4127: result: $CC" >&5
4128echo "${ECHO_T}$CC" >&6
252b5132 4129else
6840198f
NC
4130 echo "$as_me:4130: result: no" >&5
4131echo "${ECHO_T}no" >&6
252b5132
RH
4132fi
4133
6840198f
NC
4134 test -n "$CC" && break
4135 done
4136fi
4137if test -z "$CC"; then
4138 ac_ct_CC=$CC
4139 for ac_prog in cl
4140do
4141 # Extract the first word of "$ac_prog", so it can be a program name with args.
4142set dummy $ac_prog; ac_word=$2
4143echo "$as_me:4143: checking for $ac_word" >&5
4144echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4145if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
4146 echo $ECHO_N "(cached) $ECHO_C" >&6
4147else
4148 if test -n "$ac_ct_CC"; then
4149 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4150else
4151 ac_save_IFS=$IFS; IFS=$ac_path_separator
4152ac_dummy="$PATH"
4153for ac_dir in $ac_dummy; do
4154 IFS=$ac_save_IFS
4155 test -z "$ac_dir" && ac_dir=.
4156 $as_executable_p "$ac_dir/$ac_word" || continue
4157ac_cv_prog_ac_ct_CC="$ac_prog"
4158break
4159done
252b5132 4160
6840198f
NC
4161fi
4162fi
4163ac_ct_CC=$ac_cv_prog_ac_ct_CC
4164if test -n "$ac_ct_CC"; then
4165 echo "$as_me:4165: result: $ac_ct_CC" >&5
4166echo "${ECHO_T}$ac_ct_CC" >&6
4167else
4168 echo "$as_me:4168: result: no" >&5
4169echo "${ECHO_T}no" >&6
4170fi
252b5132 4171
6840198f
NC
4172 test -n "$ac_ct_CC" && break
4173done
252b5132 4174
6840198f 4175 CC=$ac_ct_CC
252b5132 4176fi
252b5132 4177
252b5132 4178fi
252b5132 4179
6840198f
NC
4180test -z "$CC" && { { echo "$as_me:4180: error: no acceptable cc found in \$PATH" >&5
4181echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
4182 { (exit 1); exit 1; }; }
4183
4184echo "$as_me:4184: checking whether we are using the GNU C compiler" >&5
4185echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
4186if test "${ac_cv_c_compiler_gnu+set}" = set; then
4187 echo $ECHO_N "(cached) $ECHO_C" >&6
252b5132 4188else
6840198f
NC
4189 cat >conftest.$ac_ext <<_ACEOF
4190#line 4190 "configure"
4191#include "confdefs.h"
4192
4193int
4194main ()
4195{
4196#ifndef __GNUC__
4197 choke me
252b5132 4198#endif
252b5132 4199
6840198f
NC
4200 ;
4201 return 0;
4202}
4203_ACEOF
4204rm -f conftest.$ac_objext
4205if { (eval echo "$as_me:4205: \"$ac_compile\"") >&5
4206 (eval $ac_compile) 2>&5
4207 ac_status=$?
4208 echo "$as_me:4208: \$? = $ac_status" >&5
4209 (exit $ac_status); } &&
4210 { ac_try='test -s conftest.$ac_objext'
4211 { (eval echo "$as_me:4211: \"$ac_try\"") >&5
4212 (eval $ac_try) 2>&5
4213 ac_status=$?
4214 echo "$as_me:4214: \$? = $ac_status" >&5
4215 (exit $ac_status); }; }; then
4216 ac_compiler_gnu=yes
4217else
4218 echo "$as_me: failed program was:" >&5
4219cat conftest.$ac_ext >&5
4220ac_compiler_gnu=no
4221fi
4222rm -f conftest.$ac_objext conftest.$ac_ext
4223ac_cv_c_compiler_gnu=$ac_compiler_gnu
4224
4225fi
4226echo "$as_me:4226: result: $ac_cv_c_compiler_gnu" >&5
4227echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
4228GCC=`test $ac_compiler_gnu = yes && echo yes`
4229ac_test_CFLAGS=${CFLAGS+set}
4230ac_save_CFLAGS=$CFLAGS
4231CFLAGS="-g"
4232echo "$as_me:4232: checking whether $CC accepts -g" >&5
4233echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
4234if test "${ac_cv_prog_cc_g+set}" = set; then
4235 echo $ECHO_N "(cached) $ECHO_C" >&6
4236else
4237 cat >conftest.$ac_ext <<_ACEOF
4238#line 4238 "configure"
4239#include "confdefs.h"
252b5132 4240
6840198f
NC
4241int
4242main ()
4243{
252b5132 4244
6840198f
NC
4245 ;
4246 return 0;
4247}
4248_ACEOF
4249rm -f conftest.$ac_objext
4250if { (eval echo "$as_me:4250: \"$ac_compile\"") >&5
4251 (eval $ac_compile) 2>&5
4252 ac_status=$?
4253 echo "$as_me:4253: \$? = $ac_status" >&5
4254 (exit $ac_status); } &&
4255 { ac_try='test -s conftest.$ac_objext'
4256 { (eval echo "$as_me:4256: \"$ac_try\"") >&5
4257 (eval $ac_try) 2>&5
4258 ac_status=$?
4259 echo "$as_me:4259: \$? = $ac_status" >&5
4260 (exit $ac_status); }; }; then
252b5132
RH
4261 ac_cv_prog_cc_g=yes
4262else
6840198f
NC
4263 echo "$as_me: failed program was:" >&5
4264cat conftest.$ac_ext >&5
4265ac_cv_prog_cc_g=no
252b5132 4266fi
6840198f 4267rm -f conftest.$ac_objext conftest.$ac_ext
252b5132 4268fi
6840198f
NC
4269echo "$as_me:4269: result: $ac_cv_prog_cc_g" >&5
4270echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
252b5132 4271if test "$ac_test_CFLAGS" = set; then
6840198f 4272 CFLAGS=$ac_save_CFLAGS
252b5132
RH
4273elif test $ac_cv_prog_cc_g = yes; then
4274 if test "$GCC" = yes; then
4275 CFLAGS="-g -O2"
4276 else
4277 CFLAGS="-g"
4278 fi
4279else
4280 if test "$GCC" = yes; then
4281 CFLAGS="-O2"
4282 else
4283 CFLAGS=
4284 fi
4285fi
6840198f
NC
4286# Some people use a C++ compiler to compile C. Since we use `exit',
4287# in C++ we need to declare it. In case someone uses the same compiler
4288# for both compiling C and C++ we need to have the C++ compiler decide
4289# the declaration of exit, since it's the most demanding environment.
4290cat >conftest.$ac_ext <<_ACEOF
4291#ifndef __cplusplus
4292 choke me
4293#endif
4294_ACEOF
4295rm -f conftest.$ac_objext
4296if { (eval echo "$as_me:4296: \"$ac_compile\"") >&5
4297 (eval $ac_compile) 2>&5
4298 ac_status=$?
4299 echo "$as_me:4299: \$? = $ac_status" >&5
4300 (exit $ac_status); } &&
4301 { ac_try='test -s conftest.$ac_objext'
4302 { (eval echo "$as_me:4302: \"$ac_try\"") >&5
4303 (eval $ac_try) 2>&5
4304 ac_status=$?
4305 echo "$as_me:4305: \$? = $ac_status" >&5
4306 (exit $ac_status); }; }; then
4307 for ac_declaration in \
4308 ''\
4309 '#include <stdlib.h>' \
4310 'extern "C" void std::exit (int) throw (); using std::exit;' \
4311 'extern "C" void std::exit (int); using std::exit;' \
4312 'extern "C" void exit (int) throw ();' \
4313 'extern "C" void exit (int);' \
4314 'void exit (int);'
4315do
4316 cat >conftest.$ac_ext <<_ACEOF
4317#line 4317 "configure"
4318#include "confdefs.h"
4319#include <stdlib.h>
4320$ac_declaration
4321int
4322main ()
4323{
4324exit (42);
4325 ;
4326 return 0;
4327}
4328_ACEOF
4329rm -f conftest.$ac_objext
4330if { (eval echo "$as_me:4330: \"$ac_compile\"") >&5
4331 (eval $ac_compile) 2>&5
4332 ac_status=$?
4333 echo "$as_me:4333: \$? = $ac_status" >&5
4334 (exit $ac_status); } &&
4335 { ac_try='test -s conftest.$ac_objext'
4336 { (eval echo "$as_me:4336: \"$ac_try\"") >&5
4337 (eval $ac_try) 2>&5
4338 ac_status=$?
4339 echo "$as_me:4339: \$? = $ac_status" >&5
4340 (exit $ac_status); }; }; then
4341 :
4342else
4343 echo "$as_me: failed program was:" >&5
4344cat conftest.$ac_ext >&5
4345continue
4346fi
4347rm -f conftest.$ac_objext conftest.$ac_ext
4348 cat >conftest.$ac_ext <<_ACEOF
4349#line 4349 "configure"
4350#include "confdefs.h"
4351$ac_declaration
4352int
4353main ()
4354{
4355exit (42);
4356 ;
4357 return 0;
4358}
4359_ACEOF
4360rm -f conftest.$ac_objext
4361if { (eval echo "$as_me:4361: \"$ac_compile\"") >&5
4362 (eval $ac_compile) 2>&5
4363 ac_status=$?
4364 echo "$as_me:4364: \$? = $ac_status" >&5
4365 (exit $ac_status); } &&
4366 { ac_try='test -s conftest.$ac_objext'
4367 { (eval echo "$as_me:4367: \"$ac_try\"") >&5
4368 (eval $ac_try) 2>&5
4369 ac_status=$?
4370 echo "$as_me:4370: \$? = $ac_status" >&5
4371 (exit $ac_status); }; }; then
4372 break
4373else
4374 echo "$as_me: failed program was:" >&5
4375cat conftest.$ac_ext >&5
4376fi
4377rm -f conftest.$ac_objext conftest.$ac_ext
4378done
4379echo '#ifdef __cplusplus' >>confdefs.h
4380echo $ac_declaration >>confdefs.h
4381echo '#endif' >>confdefs.h
252b5132 4382
6840198f
NC
4383else
4384 echo "$as_me: failed program was:" >&5
4385cat conftest.$ac_ext >&5
4386fi
4387rm -f conftest.$ac_objext conftest.$ac_ext
4388ac_ext=c
4389ac_cpp='$CPP $CPPFLAGS'
4390ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4391ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4392ac_compiler_gnu=$ac_cv_c_compiler_gnu
252b5132
RH
4393
4394for ac_prog in 'bison -y' byacc
4395do
6840198f 4396 # Extract the first word of "$ac_prog", so it can be a program name with args.
252b5132 4397set dummy $ac_prog; ac_word=$2
6840198f
NC
4398echo "$as_me:4398: checking for $ac_word" >&5
4399echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4400if test "${ac_cv_prog_YACC+set}" = set; then
4401 echo $ECHO_N "(cached) $ECHO_C" >&6
252b5132
RH
4402else
4403 if test -n "$YACC"; then
4404 ac_cv_prog_YACC="$YACC" # Let the user override the test.
4405else
6840198f
NC
4406 ac_save_IFS=$IFS; IFS=$ac_path_separator
4407ac_dummy="$PATH"
4408for ac_dir in $ac_dummy; do
4409 IFS=$ac_save_IFS
4410 test -z "$ac_dir" && ac_dir=.
4411 $as_executable_p "$ac_dir/$ac_word" || continue
4412ac_cv_prog_YACC="$ac_prog"
4413break
4414done
4415
252b5132
RH
4416fi
4417fi
6840198f 4418YACC=$ac_cv_prog_YACC
252b5132 4419if test -n "$YACC"; then
6840198f
NC
4420 echo "$as_me:4420: result: $YACC" >&5
4421echo "${ECHO_T}$YACC" >&6
252b5132 4422else
6840198f
NC
4423 echo "$as_me:4423: result: no" >&5
4424echo "${ECHO_T}no" >&6
252b5132
RH
4425fi
4426
6840198f 4427 test -n "$YACC" && break
252b5132
RH
4428done
4429test -n "$YACC" || YACC="yacc"
4430
252b5132
RH
4431missing_dir=`cd $ac_aux_dir && pwd`
4432for ac_prog in flex lex
4433do
6840198f 4434 # Extract the first word of "$ac_prog", so it can be a program name with args.
252b5132 4435set dummy $ac_prog; ac_word=$2
6840198f
NC
4436echo "$as_me:4436: checking for $ac_word" >&5
4437echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4438if test "${ac_cv_prog_LEX+set}" = set; then
4439 echo $ECHO_N "(cached) $ECHO_C" >&6
252b5132
RH
4440else
4441 if test -n "$LEX"; then
4442 ac_cv_prog_LEX="$LEX" # Let the user override the test.
4443else
6840198f
NC
4444 ac_save_IFS=$IFS; IFS=$ac_path_separator
4445ac_dummy="$PATH"
4446for ac_dir in $ac_dummy; do
4447 IFS=$ac_save_IFS
4448 test -z "$ac_dir" && ac_dir=.
4449 $as_executable_p "$ac_dir/$ac_word" || continue
4450ac_cv_prog_LEX="$ac_prog"
4451break
4452done
4453
252b5132
RH
4454fi
4455fi
6840198f 4456LEX=$ac_cv_prog_LEX
252b5132 4457if test -n "$LEX"; then
6840198f
NC
4458 echo "$as_me:4458: result: $LEX" >&5
4459echo "${ECHO_T}$LEX" >&6
252b5132 4460else
6840198f
NC
4461 echo "$as_me:4461: result: no" >&5
4462echo "${ECHO_T}no" >&6
252b5132
RH
4463fi
4464
6840198f 4465 test -n "$LEX" && break
252b5132
RH
4466done
4467test -n "$LEX" || LEX=""$missing_dir/missing flex""
4468
6840198f
NC
4469for ac_prog in flex lex
4470do
4471 # Extract the first word of "$ac_prog", so it can be a program name with args.
4472set dummy $ac_prog; ac_word=$2
4473echo "$as_me:4473: checking for $ac_word" >&5
4474echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4475if test "${ac_cv_prog_LEX+set}" = set; then
4476 echo $ECHO_N "(cached) $ECHO_C" >&6
252b5132
RH
4477else
4478 if test -n "$LEX"; then
4479 ac_cv_prog_LEX="$LEX" # Let the user override the test.
4480else
6840198f
NC
4481 ac_save_IFS=$IFS; IFS=$ac_path_separator
4482ac_dummy="$PATH"
4483for ac_dir in $ac_dummy; do
4484 IFS=$ac_save_IFS
4485 test -z "$ac_dir" && ac_dir=.
4486 $as_executable_p "$ac_dir/$ac_word" || continue
4487ac_cv_prog_LEX="$ac_prog"
4488break
4489done
4490
252b5132
RH
4491fi
4492fi
6840198f 4493LEX=$ac_cv_prog_LEX
252b5132 4494if test -n "$LEX"; then
6840198f
NC
4495 echo "$as_me:4495: result: $LEX" >&5
4496echo "${ECHO_T}$LEX" >&6
252b5132 4497else
6840198f
NC
4498 echo "$as_me:4498: result: no" >&5
4499echo "${ECHO_T}no" >&6
252b5132
RH
4500fi
4501
6840198f
NC
4502 test -n "$LEX" && break
4503done
4504test -n "$LEX" || LEX=":"
4505
252b5132
RH
4506if test -z "$LEXLIB"
4507then
6840198f
NC
4508 echo "$as_me:4508: checking for yywrap in -lfl" >&5
4509echo $ECHO_N "checking for yywrap in -lfl... $ECHO_C" >&6
4510if test "${ac_cv_lib_fl_yywrap+set}" = set; then
4511 echo $ECHO_N "(cached) $ECHO_C" >&6
4512else
4513 ac_check_lib_save_LIBS=$LIBS
4514LIBS="-lfl $LIBS"
4515cat >conftest.$ac_ext <<_ACEOF
4516#line 4516 "configure"
252b5132 4517#include "confdefs.h"
6840198f 4518
252b5132 4519/* Override any gcc2 internal prototype to avoid an error. */
6840198f
NC
4520#ifdef __cplusplus
4521extern "C"
4522#endif
252b5132 4523/* We use char because int might match the return type of a gcc2
6840198f
NC
4524 builtin and then its argument prototype would still apply. */
4525char yywrap ();
4526int
4527main ()
4528{
4529yywrap ();
4530 ;
4531 return 0;
4532}
4533_ACEOF
4534rm -f conftest.$ac_objext conftest$ac_exeext
4535if { (eval echo "$as_me:4535: \"$ac_link\"") >&5
4536 (eval $ac_link) 2>&5
4537 ac_status=$?
4538 echo "$as_me:4538: \$? = $ac_status" >&5
4539 (exit $ac_status); } &&
4540 { ac_try='test -s conftest$ac_exeext'
4541 { (eval echo "$as_me:4541: \"$ac_try\"") >&5
4542 (eval $ac_try) 2>&5
4543 ac_status=$?
4544 echo "$as_me:4544: \$? = $ac_status" >&5
4545 (exit $ac_status); }; }; then
4546 ac_cv_lib_fl_yywrap=yes
4547else
4548 echo "$as_me: failed program was:" >&5
4549cat conftest.$ac_ext >&5
4550ac_cv_lib_fl_yywrap=no
4551fi
4552rm -f conftest$ac_exeext conftest.$ac_ext
4553LIBS=$ac_check_lib_save_LIBS
4554fi
4555echo "$as_me:4555: result: $ac_cv_lib_fl_yywrap" >&5
4556echo "${ECHO_T}$ac_cv_lib_fl_yywrap" >&6
4557if test $ac_cv_lib_fl_yywrap = yes; then
4558 LEXLIB="-lfl"
4559else
4560 echo "$as_me:4560: checking for yywrap in -ll" >&5
4561echo $ECHO_N "checking for yywrap in -ll... $ECHO_C" >&6
4562if test "${ac_cv_lib_l_yywrap+set}" = set; then
4563 echo $ECHO_N "(cached) $ECHO_C" >&6
4564else
4565 ac_check_lib_save_LIBS=$LIBS
4566LIBS="-ll $LIBS"
4567cat >conftest.$ac_ext <<_ACEOF
4568#line 4568 "configure"
4569#include "confdefs.h"
252b5132 4570
6840198f
NC
4571/* Override any gcc2 internal prototype to avoid an error. */
4572#ifdef __cplusplus
4573extern "C"
4574#endif
4575/* We use char because int might match the return type of a gcc2
4576 builtin and then its argument prototype would still apply. */
4577char yywrap ();
4578int
4579main ()
4580{
4581yywrap ();
4582 ;
4583 return 0;
4584}
4585_ACEOF
4586rm -f conftest.$ac_objext conftest$ac_exeext
4587if { (eval echo "$as_me:4587: \"$ac_link\"") >&5
4588 (eval $ac_link) 2>&5
4589 ac_status=$?
4590 echo "$as_me:4590: \$? = $ac_status" >&5
4591 (exit $ac_status); } &&
4592 { ac_try='test -s conftest$ac_exeext'
4593 { (eval echo "$as_me:4593: \"$ac_try\"") >&5
4594 (eval $ac_try) 2>&5
4595 ac_status=$?
4596 echo "$as_me:4596: \$? = $ac_status" >&5
4597 (exit $ac_status); }; }; then
4598 ac_cv_lib_l_yywrap=yes
252b5132 4599else
6840198f
NC
4600 echo "$as_me: failed program was:" >&5
4601cat conftest.$ac_ext >&5
4602ac_cv_lib_l_yywrap=no
252b5132 4603fi
6840198f
NC
4604rm -f conftest$ac_exeext conftest.$ac_ext
4605LIBS=$ac_check_lib_save_LIBS
252b5132 4606fi
6840198f
NC
4607echo "$as_me:4607: result: $ac_cv_lib_l_yywrap" >&5
4608echo "${ECHO_T}$ac_cv_lib_l_yywrap" >&6
4609if test $ac_cv_lib_l_yywrap = yes; then
4610 LEXLIB="-ll"
4611fi
4612
252b5132
RH
4613fi
4614
4615fi
4616
6840198f
NC
4617if test "x$LEX" != "x:"; then
4618 echo "$as_me:4618: checking lex output file root" >&5
4619echo $ECHO_N "checking lex output file root... $ECHO_C" >&6
4620if test "${ac_cv_prog_lex_root+set}" = set; then
4621 echo $ECHO_N "(cached) $ECHO_C" >&6
252b5132
RH
4622else
4623 # The minimal lex program is just a single line: %%. But some broken lexes
4624# (Solaris, I think it was) want two %% lines, so accommodate them.
4625echo '%%
4626%%' | $LEX
4627if test -f lex.yy.c; then
4628 ac_cv_prog_lex_root=lex.yy
4629elif test -f lexyy.c; then
4630 ac_cv_prog_lex_root=lexyy
4631else
6840198f
NC
4632 { { echo "$as_me:4632: error: cannot find output from $LEX; giving up" >&5
4633echo "$as_me: error: cannot find output from $LEX; giving up" >&2;}
4634 { (exit 1); exit 1; }; }
252b5132
RH
4635fi
4636fi
6840198f
NC
4637echo "$as_me:4637: result: $ac_cv_prog_lex_root" >&5
4638echo "${ECHO_T}$ac_cv_prog_lex_root" >&6
252b5132
RH
4639LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root
4640
6840198f
NC
4641echo "$as_me:4641: checking whether yytext is a pointer" >&5
4642echo $ECHO_N "checking whether yytext is a pointer... $ECHO_C" >&6
4643if test "${ac_cv_prog_lex_yytext_pointer+set}" = set; then
4644 echo $ECHO_N "(cached) $ECHO_C" >&6
252b5132
RH
4645else
4646 # POSIX says lex can declare yytext either as a pointer or an array; the
4647# default is implementation-dependent. Figure out which it is, since
4648# not all implementations provide the %pointer and %array declarations.
4649ac_cv_prog_lex_yytext_pointer=no
4650echo 'extern char *yytext;' >>$LEX_OUTPUT_ROOT.c
6840198f 4651ac_save_LIBS=$LIBS
252b5132 4652LIBS="$LIBS $LEXLIB"
6840198f 4653cat >conftest.$ac_ext <<_ACEOF
252b5132 4654`cat $LEX_OUTPUT_ROOT.c`
6840198f
NC
4655_ACEOF
4656rm -f conftest.$ac_objext conftest$ac_exeext
4657if { (eval echo "$as_me:4657: \"$ac_link\"") >&5
4658 (eval $ac_link) 2>&5
4659 ac_status=$?
4660 echo "$as_me:4660: \$? = $ac_status" >&5
4661 (exit $ac_status); } &&
4662 { ac_try='test -s conftest$ac_exeext'
4663 { (eval echo "$as_me:4663: \"$ac_try\"") >&5
4664 (eval $ac_try) 2>&5
4665 ac_status=$?
4666 echo "$as_me:4666: \$? = $ac_status" >&5
4667 (exit $ac_status); }; }; then
252b5132
RH
4668 ac_cv_prog_lex_yytext_pointer=yes
4669else
6840198f
NC
4670 echo "$as_me: failed program was:" >&5
4671cat conftest.$ac_ext >&5
252b5132 4672fi
6840198f
NC
4673rm -f conftest$ac_exeext conftest.$ac_ext
4674LIBS=$ac_save_LIBS
252b5132
RH
4675rm -f "${LEX_OUTPUT_ROOT}.c"
4676
4677fi
6840198f
NC
4678echo "$as_me:4678: result: $ac_cv_prog_lex_yytext_pointer" >&5
4679echo "${ECHO_T}$ac_cv_prog_lex_yytext_pointer" >&6
252b5132 4680if test $ac_cv_prog_lex_yytext_pointer = yes; then
6840198f
NC
4681
4682cat >>confdefs.h <<\EOF
252b5132
RH
4683#define YYTEXT_POINTER 1
4684EOF
4685
4686fi
4687
6840198f 4688fi
252b5132
RH
4689
4690ALL_LINGUAS=
6840198f
NC
4691if test -n "$ac_tool_prefix"; then
4692 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4693set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4694echo "$as_me:4694: checking for $ac_word" >&5
4695echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4696if test "${ac_cv_prog_RANLIB+set}" = set; then
4697 echo $ECHO_N "(cached) $ECHO_C" >&6
ac48eca1
AO
4698else
4699 if test -n "$RANLIB"; then
4700 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4701else
6840198f
NC
4702 ac_save_IFS=$IFS; IFS=$ac_path_separator
4703ac_dummy="$PATH"
4704for ac_dir in $ac_dummy; do
4705 IFS=$ac_save_IFS
4706 test -z "$ac_dir" && ac_dir=.
4707 $as_executable_p "$ac_dir/$ac_word" || continue
4708ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4709break
4710done
4711
ac48eca1
AO
4712fi
4713fi
6840198f 4714RANLIB=$ac_cv_prog_RANLIB
ac48eca1 4715if test -n "$RANLIB"; then
6840198f
NC
4716 echo "$as_me:4716: result: $RANLIB" >&5
4717echo "${ECHO_T}$RANLIB" >&6
4718else
4719 echo "$as_me:4719: result: no" >&5
4720echo "${ECHO_T}no" >&6
4721fi
4722
4723fi
4724if test -z "$ac_cv_prog_RANLIB"; then
4725 ac_ct_RANLIB=$RANLIB
4726 # Extract the first word of "ranlib", so it can be a program name with args.
4727set dummy ranlib; ac_word=$2
4728echo "$as_me:4728: checking for $ac_word" >&5
4729echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4730if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
4731 echo $ECHO_N "(cached) $ECHO_C" >&6
4732else
4733 if test -n "$ac_ct_RANLIB"; then
4734 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4735else
4736 ac_save_IFS=$IFS; IFS=$ac_path_separator
4737ac_dummy="$PATH"
4738for ac_dir in $ac_dummy; do
4739 IFS=$ac_save_IFS
4740 test -z "$ac_dir" && ac_dir=.
4741 $as_executable_p "$ac_dir/$ac_word" || continue
4742ac_cv_prog_ac_ct_RANLIB="ranlib"
4743break
4744done
4745
4746 test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
4747fi
4748fi
4749ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4750if test -n "$ac_ct_RANLIB"; then
4751 echo "$as_me:4751: result: $ac_ct_RANLIB" >&5
4752echo "${ECHO_T}$ac_ct_RANLIB" >&6
ac48eca1 4753else
6840198f
NC
4754 echo "$as_me:4754: result: no" >&5
4755echo "${ECHO_T}no" >&6
ac48eca1
AO
4756fi
4757
6840198f
NC
4758 RANLIB=$ac_ct_RANLIB
4759else
4760 RANLIB="$ac_cv_prog_RANLIB"
4761fi
4762
4763ac_ext=c
4764ac_cpp='$CPP $CPPFLAGS'
4765ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4766ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4767ac_compiler_gnu=$ac_cv_c_compiler_gnu
4768echo "$as_me:4768: checking how to run the C preprocessor" >&5
4769echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
4770# On Suns, sometimes $CPP names a directory.
4771if test -n "$CPP" && test -d "$CPP"; then
4772 CPP=
4773fi
4774if test -z "$CPP"; then
4775 if test "${ac_cv_prog_CPP+set}" = set; then
4776 echo $ECHO_N "(cached) $ECHO_C" >&6
4777else
4778 # Double quotes because CPP needs to be expanded
4779 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4780 do
4781 # Use a header file that comes with gcc, so configuring glibc
4782# with a fresh cross-compiler works.
4783# On the NeXT, cc -E runs the code through the compiler's parser,
4784# not just through cpp. "Syntax error" is here to catch this case.
4785ac_c_preproc_warn_flag=maybe
4786cat >conftest.$ac_ext <<_ACEOF
4787#line 4787 "configure"
4788#include "confdefs.h"
4789#include <assert.h>
4790Syntax error
4791_ACEOF
4792if { (eval echo "$as_me:4792: \"$ac_cpp conftest.$ac_ext\"") >&5
4793 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4794 ac_status=$?
4795 egrep -v '^ *\+' conftest.er1 >conftest.err
4796 rm -f conftest.er1
4797 cat conftest.err >&5
4798 echo "$as_me:4798: \$? = $ac_status" >&5
4799 (exit $ac_status); } >/dev/null; then
4800 if test -s conftest.err; then
4801 ac_cpp_err=$ac_c_preproc_warn_flag
4802 else
4803 ac_cpp_err=
4804 fi
252b5132 4805else
6840198f
NC
4806 ac_cpp_err=yes
4807fi
4808if test -z "$ac_cpp_err"; then
4809 # Now check whether non-existent headers can be detected and how
4810# Skip if ac_cpp_err is not empty - ac_cpp is broken
4811if test -z "$ac_cpp_err"; then
4812 cat >conftest.$ac_ext <<_ACEOF
4813#line 4813 "configure"
4814#include "confdefs.h"
4815#include <ac_nonexistent.h>
4816_ACEOF
4817if { (eval echo "$as_me:4817: \"$ac_cpp conftest.$ac_ext\"") >&5
4818 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4819 ac_status=$?
4820 egrep -v '^ *\+' conftest.er1 >conftest.err
4821 rm -f conftest.er1
4822 cat conftest.err >&5
4823 echo "$as_me:4823: \$? = $ac_status" >&5
4824 (exit $ac_status); } >/dev/null; then
4825 if test -s conftest.err; then
4826 ac_cpp_err=$ac_c_preproc_warn_flag
4827 else
4828 ac_cpp_err=
4829 fi
4830else
4831 ac_cpp_err=yes
4832fi
4833if test -z "$ac_cpp_err"; then
4834 # cannot detect missing includes at all
4835ac_cpp_err=yes
4836else
4837 echo "$as_me: failed program was:" >&5
4838 cat conftest.$ac_ext >&5
4839 if test "x$ac_cpp_err" = xmaybe; then
4840 ac_c_preproc_warn_flag=yes
4841 else
4842 ac_c_preproc_warn_flag=
4843 fi
4844 ac_cpp_err=
4845fi
4846rm -f conftest.err conftest.$ac_ext
4847fi
4848else
4849 echo "$as_me: failed program was:" >&5
4850 cat conftest.$ac_ext >&5
4851
4852fi
4853rm -f conftest.err conftest.$ac_ext
4854 if test -z "$ac_cpp_err"; then
4855 break
4856 fi
4857 done
4858 ac_cv_prog_CPP=$CPP
4859
4860fi
4861 CPP=$ac_cv_prog_CPP
4862else
4863 # Use a header file that comes with gcc, so configuring glibc
4864# with a fresh cross-compiler works.
4865# On the NeXT, cc -E runs the code through the compiler's parser,
4866# not just through cpp. "Syntax error" is here to catch this case.
4867ac_c_preproc_warn_flag=maybe
4868cat >conftest.$ac_ext <<_ACEOF
4869#line 4869 "configure"
4870#include "confdefs.h"
4871#include <assert.h>
4872Syntax error
4873_ACEOF
4874if { (eval echo "$as_me:4874: \"$ac_cpp conftest.$ac_ext\"") >&5
4875 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4876 ac_status=$?
4877 egrep -v '^ *\+' conftest.er1 >conftest.err
4878 rm -f conftest.er1
4879 cat conftest.err >&5
4880 echo "$as_me:4880: \$? = $ac_status" >&5
4881 (exit $ac_status); } >/dev/null; then
4882 if test -s conftest.err; then
4883 ac_cpp_err=$ac_c_preproc_warn_flag
4884 else
4885 ac_cpp_err=
4886 fi
4887else
4888 ac_cpp_err=yes
4889fi
4890if test -z "$ac_cpp_err"; then
4891 # Now check whether non-existent headers can be detected and how
4892# Skip if ac_cpp_err is not empty - ac_cpp is broken
4893if test -z "$ac_cpp_err"; then
4894 cat >conftest.$ac_ext <<_ACEOF
4895#line 4895 "configure"
4896#include "confdefs.h"
4897#include <ac_nonexistent.h>
4898_ACEOF
4899if { (eval echo "$as_me:4899: \"$ac_cpp conftest.$ac_ext\"") >&5
4900 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4901 ac_status=$?
4902 egrep -v '^ *\+' conftest.er1 >conftest.err
4903 rm -f conftest.er1
4904 cat conftest.err >&5
4905 echo "$as_me:4905: \$? = $ac_status" >&5
4906 (exit $ac_status); } >/dev/null; then
4907 if test -s conftest.err; then
4908 ac_cpp_err=$ac_c_preproc_warn_flag
4909 else
4910 ac_cpp_err=
4911 fi
4912else
4913 ac_cpp_err=yes
4914fi
4915if test -z "$ac_cpp_err"; then
4916 # cannot detect missing includes at all
4917ac_cpp_err=yes
4918else
4919 echo "$as_me: failed program was:" >&5
4920 cat conftest.$ac_ext >&5
4921 if test "x$ac_cpp_err" = xmaybe; then
4922 ac_c_preproc_warn_flag=yes
4923 else
4924 ac_c_preproc_warn_flag=
4925 fi
4926 ac_cpp_err=
4927fi
4928rm -f conftest.err conftest.$ac_ext
4929fi
4930else
4931 echo "$as_me: failed program was:" >&5
4932 cat conftest.$ac_ext >&5
4933
4934fi
4935rm -f conftest.err conftest.$ac_ext
4936 ac_cv_prog_CPP=$CPP
4937fi
4938echo "$as_me:4938: result: $CPP" >&5
4939echo "${ECHO_T}$CPP" >&6
4940if test -n "$ac_cpp_err"; then
4941 { { echo "$as_me:4941: error: C preprocessor \"$CPP\" fails sanity check" >&5
4942echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
4943 { (exit 1); exit 1; }; }
4944fi
4945ac_ext=c
4946ac_cpp='$CPP $CPPFLAGS'
4947ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4948ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4949ac_compiler_gnu=$ac_cv_c_compiler_gnu
4950
4951echo "$as_me:4951: checking for ANSI C header files" >&5
4952echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
4953if test "${ac_cv_header_stdc+set}" = set; then
4954 echo $ECHO_N "(cached) $ECHO_C" >&6
4955else
4956 cat >conftest.$ac_ext <<_ACEOF
4957#line 4957 "configure"
252b5132
RH
4958#include "confdefs.h"
4959#include <stdlib.h>
4960#include <stdarg.h>
4961#include <string.h>
4962#include <float.h>
6840198f
NC
4963
4964_ACEOF
4965if { (eval echo "$as_me:4965: \"$ac_cpp conftest.$ac_ext\"") >&5
4966 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4967 ac_status=$?
4968 egrep -v '^ *\+' conftest.er1 >conftest.err
4969 rm -f conftest.er1
4970 cat conftest.err >&5
4971 echo "$as_me:4971: \$? = $ac_status" >&5
4972 (exit $ac_status); } >/dev/null; then
4973 if test -s conftest.err; then
4974 ac_cpp_err=$ac_c_preproc_warn_flag
4975 else
4976 ac_cpp_err=
4977 fi
4978else
4979 ac_cpp_err=yes
4980fi
4981if test -z "$ac_cpp_err"; then
252b5132
RH
4982 ac_cv_header_stdc=yes
4983else
6840198f 4984 echo "$as_me: failed program was:" >&5
252b5132 4985 cat conftest.$ac_ext >&5
252b5132
RH
4986 ac_cv_header_stdc=no
4987fi
6840198f 4988rm -f conftest.err conftest.$ac_ext
252b5132
RH
4989
4990if test $ac_cv_header_stdc = yes; then
4991 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
6840198f
NC
4992 cat >conftest.$ac_ext <<_ACEOF
4993#line 4993 "configure"
252b5132
RH
4994#include "confdefs.h"
4995#include <string.h>
6840198f
NC
4996
4997_ACEOF
252b5132
RH
4998if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4999 egrep "memchr" >/dev/null 2>&1; then
5000 :
5001else
252b5132
RH
5002 ac_cv_header_stdc=no
5003fi
5004rm -f conftest*
5005
5006fi
5007
5008if test $ac_cv_header_stdc = yes; then
5009 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
6840198f
NC
5010 cat >conftest.$ac_ext <<_ACEOF
5011#line 5011 "configure"
252b5132
RH
5012#include "confdefs.h"
5013#include <stdlib.h>
6840198f
NC
5014
5015_ACEOF
252b5132
RH
5016if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5017 egrep "free" >/dev/null 2>&1; then
5018 :
5019else
252b5132
RH
5020 ac_cv_header_stdc=no
5021fi
5022rm -f conftest*
5023
5024fi
5025
5026if test $ac_cv_header_stdc = yes; then
5027 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
6840198f 5028 if test "$cross_compiling" = yes; then
252b5132
RH
5029 :
5030else
6840198f
NC
5031 cat >conftest.$ac_ext <<_ACEOF
5032#line 5032 "configure"
252b5132
RH
5033#include "confdefs.h"
5034#include <ctype.h>
6840198f
NC
5035#if ((' ' & 0x0FF) == 0x020)
5036# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5037# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5038#else
5039# define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
5040 || ('j' <= (c) && (c) <= 'r') \
5041 || ('s' <= (c) && (c) <= 'z'))
5042# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5043#endif
252b5132 5044
6840198f
NC
5045#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5046int
5047main ()
5048{
5049 int i;
5050 for (i = 0; i < 256; i++)
5051 if (XOR (islower (i), ISLOWER (i))
5052 || toupper (i) != TOUPPER (i))
5053 exit(2);
5054 exit (0);
5055}
5056_ACEOF
5057rm -f conftest$ac_exeext
5058if { (eval echo "$as_me:5058: \"$ac_link\"") >&5
5059 (eval $ac_link) 2>&5
5060 ac_status=$?
5061 echo "$as_me:5061: \$? = $ac_status" >&5
5062 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5063 { (eval echo "$as_me:5063: \"$ac_try\"") >&5
5064 (eval $ac_try) 2>&5
5065 ac_status=$?
5066 echo "$as_me:5066: \$? = $ac_status" >&5
5067 (exit $ac_status); }; }; then
252b5132
RH
5068 :
5069else
6840198f
NC
5070 echo "$as_me: program exited with status $ac_status" >&5
5071echo "$as_me: failed program was:" >&5
5072cat conftest.$ac_ext >&5
5073ac_cv_header_stdc=no
252b5132 5074fi
6840198f 5075rm -f conftest$ac_exeext conftest.$ac_ext
252b5132 5076fi
252b5132
RH
5077fi
5078fi
6840198f
NC
5079echo "$as_me:5079: result: $ac_cv_header_stdc" >&5
5080echo "${ECHO_T}$ac_cv_header_stdc" >&6
252b5132 5081if test $ac_cv_header_stdc = yes; then
6840198f
NC
5082
5083cat >>confdefs.h <<\EOF
252b5132
RH
5084#define STDC_HEADERS 1
5085EOF
5086
5087fi
5088
6840198f
NC
5089echo "$as_me:5089: checking for $CC option to accept ANSI C" >&5
5090echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
5091if test "${ac_cv_prog_cc_stdc+set}" = set; then
5092 echo $ECHO_N "(cached) $ECHO_C" >&6
252b5132 5093else
6840198f
NC
5094 ac_cv_prog_cc_stdc=no
5095ac_save_CC=$CC
5096cat >conftest.$ac_ext <<_ACEOF
5097#line 5097 "configure"
252b5132 5098#include "confdefs.h"
6840198f
NC
5099#include <stdarg.h>
5100#include <stdio.h>
5101#include <sys/types.h>
5102#include <sys/stat.h>
5103/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
5104struct buf { int x; };
5105FILE * (*rcsopen) (struct buf *, struct stat *, int);
5106static char *e (p, i)
5107 char **p;
5108 int i;
5109{
5110 return p[i];
252b5132 5111}
6840198f
NC
5112static char *f (char * (*g) (char **, int), char **p, ...)
5113{
5114 char *s;
5115 va_list v;
5116 va_start (v,p);
5117 s = g (p, va_arg (v,int));
5118 va_end (v);
5119 return s;
252b5132 5120}
6840198f
NC
5121int test (int i, double x);
5122struct s1 {int (*f) (int a);};
5123struct s2 {int (*f) (double a);};
5124int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
5125int argc;
5126char **argv;
5127int
5128main ()
5129{
5130return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
5131 ;
5132 return 0;
252b5132 5133}
6840198f
NC
5134_ACEOF
5135# Don't try gcc -ansi; that turns off useful extensions and
5136# breaks some systems' header files.
5137# AIX -qlanglvl=ansi
5138# Ultrix and OSF/1 -std1
5139# HP-UX 10.20 and later -Ae
5140# HP-UX older versions -Aa -D_HPUX_SOURCE
5141# SVR4 -Xc -D__EXTENSIONS__
5142for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
5143do
5144 CC="$ac_save_CC $ac_arg"
5145 rm -f conftest.$ac_objext
5146if { (eval echo "$as_me:5146: \"$ac_compile\"") >&5
5147 (eval $ac_compile) 2>&5
5148 ac_status=$?
5149 echo "$as_me:5149: \$? = $ac_status" >&5
5150 (exit $ac_status); } &&
5151 { ac_try='test -s conftest.$ac_objext'
5152 { (eval echo "$as_me:5152: \"$ac_try\"") >&5
5153 (eval $ac_try) 2>&5
5154 ac_status=$?
5155 echo "$as_me:5155: \$? = $ac_status" >&5
5156 (exit $ac_status); }; }; then
5157 ac_cv_prog_cc_stdc=$ac_arg
5158break
5159else
5160 echo "$as_me: failed program was:" >&5
5161cat conftest.$ac_ext >&5
5162fi
5163rm -f conftest.$ac_objext
5164done
5165rm -f conftest.$ac_ext conftest.$ac_objext
5166CC=$ac_save_CC
252b5132 5167
6840198f
NC
5168fi
5169
5170case "x$ac_cv_prog_cc_stdc" in
5171 x|xno)
5172 echo "$as_me:5172: result: none needed" >&5
5173echo "${ECHO_T}none needed" >&6 ;;
5174 *)
5175 echo "$as_me:5175: result: $ac_cv_prog_cc_stdc" >&5
5176echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
5177 CC="$CC $ac_cv_prog_cc_stdc" ;;
5178esac
5179
5180echo "$as_me:5180: checking for an ANSI C-conforming const" >&5
5181echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
5182if test "${ac_cv_c_const+set}" = set; then
5183 echo $ECHO_N "(cached) $ECHO_C" >&6
5184else
5185 cat >conftest.$ac_ext <<_ACEOF
5186#line 5186 "configure"
5187#include "confdefs.h"
5188
5189int
5190main ()
5191{
5192/* FIXME: Include the comments suggested by Paul. */
5193#ifndef __cplusplus
5194 /* Ultrix mips cc rejects this. */
5195 typedef int charset[2];
5196 const charset x;
5197 /* SunOS 4.1.1 cc rejects this. */
5198 char const *const *ccp;
5199 char **p;
5200 /* NEC SVR4.0.2 mips cc rejects this. */
5201 struct point {int x, y;};
5202 static struct point const zero = {0,0};
5203 /* AIX XL C 1.02.0.0 rejects this.
5204 It does not let you subtract one const X* pointer from another in
5205 an arm of an if-expression whose if-part is not a constant
5206 expression */
5207 const char *g = "string";
5208 ccp = &g + (g ? g-g : 0);
5209 /* HPUX 7.0 cc rejects these. */
5210 ++ccp;
5211 p = (char**) ccp;
5212 ccp = (char const *const *) p;
5213 { /* SCO 3.2v4 cc rejects this. */
5214 char *t;
5215 char const *s = 0 ? (char *) 0 : (char const *) 0;
5216
5217 *t++ = 0;
5218 }
5219 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
5220 int x[] = {25, 17};
5221 const int *foo = &x[0];
5222 ++foo;
5223 }
5224 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
5225 typedef const int *iptr;
5226 iptr p = 0;
5227 ++p;
5228 }
5229 { /* AIX XL C 1.02.0.0 rejects this saying
5230 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
5231 struct s { int j; const int *ap[3]; };
5232 struct s *b; b->j = 5;
5233 }
5234 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
5235 const int foo = 10;
5236 }
5237#endif
5238
5239 ;
5240 return 0;
5241}
5242_ACEOF
5243rm -f conftest.$ac_objext
5244if { (eval echo "$as_me:5244: \"$ac_compile\"") >&5
5245 (eval $ac_compile) 2>&5
5246 ac_status=$?
5247 echo "$as_me:5247: \$? = $ac_status" >&5
5248 (exit $ac_status); } &&
5249 { ac_try='test -s conftest.$ac_objext'
5250 { (eval echo "$as_me:5250: \"$ac_try\"") >&5
5251 (eval $ac_try) 2>&5
5252 ac_status=$?
5253 echo "$as_me:5253: \$? = $ac_status" >&5
5254 (exit $ac_status); }; }; then
252b5132
RH
5255 ac_cv_c_const=yes
5256else
6840198f
NC
5257 echo "$as_me: failed program was:" >&5
5258cat conftest.$ac_ext >&5
5259ac_cv_c_const=no
252b5132 5260fi
6840198f 5261rm -f conftest.$ac_objext conftest.$ac_ext
252b5132 5262fi
6840198f
NC
5263echo "$as_me:5263: result: $ac_cv_c_const" >&5
5264echo "${ECHO_T}$ac_cv_c_const" >&6
252b5132 5265if test $ac_cv_c_const = no; then
6840198f
NC
5266
5267cat >>confdefs.h <<\EOF
5268#define const
252b5132
RH
5269EOF
5270
5271fi
5272
6840198f
NC
5273echo "$as_me:5273: checking for inline" >&5
5274echo $ECHO_N "checking for inline... $ECHO_C" >&6
5275if test "${ac_cv_c_inline+set}" = set; then
5276 echo $ECHO_N "(cached) $ECHO_C" >&6
252b5132
RH
5277else
5278 ac_cv_c_inline=no
5279for ac_kw in inline __inline__ __inline; do
6840198f
NC
5280 cat >conftest.$ac_ext <<_ACEOF
5281#line 5281 "configure"
252b5132 5282#include "confdefs.h"
6840198f
NC
5283#ifndef __cplusplus
5284static $ac_kw int static_foo () {return 0; }
5285$ac_kw int foo () {return 0; }
5286#endif
252b5132 5287
6840198f
NC
5288_ACEOF
5289rm -f conftest.$ac_objext
5290if { (eval echo "$as_me:5290: \"$ac_compile\"") >&5
5291 (eval $ac_compile) 2>&5
5292 ac_status=$?
5293 echo "$as_me:5293: \$? = $ac_status" >&5
5294 (exit $ac_status); } &&
5295 { ac_try='test -s conftest.$ac_objext'
5296 { (eval echo "$as_me:5296: \"$ac_try\"") >&5
5297 (eval $ac_try) 2>&5
5298 ac_status=$?
5299 echo "$as_me:5299: \$? = $ac_status" >&5
5300 (exit $ac_status); }; }; then
252b5132
RH
5301 ac_cv_c_inline=$ac_kw; break
5302else
6840198f
NC
5303 echo "$as_me: failed program was:" >&5
5304cat conftest.$ac_ext >&5
252b5132 5305fi
6840198f 5306rm -f conftest.$ac_objext conftest.$ac_ext
252b5132
RH
5307done
5308
5309fi
6840198f
NC
5310echo "$as_me:5310: result: $ac_cv_c_inline" >&5
5311echo "${ECHO_T}$ac_cv_c_inline" >&6
5312case $ac_cv_c_inline in
252b5132 5313 inline | yes) ;;
6840198f
NC
5314 no)
5315cat >>confdefs.h <<\EOF
5316#define inline
252b5132
RH
5317EOF
5318 ;;
6840198f 5319 *) cat >>confdefs.h <<EOF
252b5132
RH
5320#define inline $ac_cv_c_inline
5321EOF
6840198f
NC
5322 ;;
5323esac
5324
5325for ac_header in stdlib.h string.h memory.h strings.h inttypes.h unistd.h
5326do
5327ac_ac_Header=`echo "ac_cv_header_$ac_header" | $ac_tr_sh`
5328echo "$as_me:5328: checking for $ac_header" >&5
5329echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5330if eval "test \"\${$ac_ac_Header+set}\" = set"; then
5331 echo $ECHO_N "(cached) $ECHO_C" >&6
5332else
5333 cat >conftest.$ac_ext <<_ACEOF
5334#line 5334 "configure"
5335#include "confdefs.h"
5336#include <$ac_header>
5337_ACEOF
5338if { (eval echo "$as_me:5338: \"$ac_cpp conftest.$ac_ext\"") >&5
5339 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5340 ac_status=$?
5341 egrep -v '^ *\+' conftest.er1 >conftest.err
5342 rm -f conftest.er1
5343 cat conftest.err >&5
5344 echo "$as_me:5344: \$? = $ac_status" >&5
5345 (exit $ac_status); } >/dev/null; then
5346 if test -s conftest.err; then
5347 ac_cpp_err=$ac_c_preproc_warn_flag
5348 else
5349 ac_cpp_err=
5350 fi
5351else
5352 ac_cpp_err=yes
5353fi
5354if test -z "$ac_cpp_err"; then
5355 eval "$ac_ac_Header=yes"
5356else
5357 echo "$as_me: failed program was:" >&5
5358 cat conftest.$ac_ext >&5
5359 eval "$ac_ac_Header=no"
5360fi
5361rm -f conftest.err conftest.$ac_ext
5362fi
5363echo "$as_me:5363: result: `eval echo '${'$ac_ac_Header'}'`" >&5
5364echo "${ECHO_T}`eval echo '${'$ac_ac_Header'}'`" >&6
5365if test `eval echo '${'$ac_ac_Header'}'` = yes; then
5366 cat >>confdefs.h <<EOF
5367#define `echo "HAVE_$ac_header" | $ac_tr_cpp` 1
5368EOF
5369
5370fi
5371done
252b5132 5372
6840198f
NC
5373echo "$as_me:5373: checking for off_t" >&5
5374echo $ECHO_N "checking for off_t... $ECHO_C" >&6
5375if test "${ac_cv_type_off_t+set}" = set; then
5376 echo $ECHO_N "(cached) $ECHO_C" >&6
252b5132 5377else
6840198f
NC
5378 cat >conftest.$ac_ext <<_ACEOF
5379#line 5379 "configure"
252b5132 5380#include "confdefs.h"
6840198f
NC
5381$ac_includes_default
5382int
5383main ()
5384{
5385if ((off_t *) 0)
5386 return 0;
5387if (sizeof (off_t))
5388 return 0;
5389 ;
5390 return 0;
5391}
5392_ACEOF
5393rm -f conftest.$ac_objext
5394if { (eval echo "$as_me:5394: \"$ac_compile\"") >&5
5395 (eval $ac_compile) 2>&5
5396 ac_status=$?
5397 echo "$as_me:5397: \$? = $ac_status" >&5
5398 (exit $ac_status); } &&
5399 { ac_try='test -s conftest.$ac_objext'
5400 { (eval echo "$as_me:5400: \"$ac_try\"") >&5
5401 (eval $ac_try) 2>&5
5402 ac_status=$?
5403 echo "$as_me:5403: \$? = $ac_status" >&5
5404 (exit $ac_status); }; }; then
a2d91340 5405 ac_cv_type_off_t=yes
252b5132 5406else
6840198f
NC
5407 echo "$as_me: failed program was:" >&5
5408cat conftest.$ac_ext >&5
5409ac_cv_type_off_t=no
252b5132 5410fi
6840198f 5411rm -f conftest.$ac_objext conftest.$ac_ext
252b5132 5412fi
6840198f
NC
5413echo "$as_me:5413: result: $ac_cv_type_off_t" >&5
5414echo "${ECHO_T}$ac_cv_type_off_t" >&6
5415if test $ac_cv_type_off_t = yes; then
5416 :
5417else
5418
5419cat >>confdefs.h <<EOF
252b5132
RH
5420#define off_t long
5421EOF
5422
5423fi
5424
6840198f
NC
5425echo "$as_me:5425: checking for size_t" >&5
5426echo $ECHO_N "checking for size_t... $ECHO_C" >&6
5427if test "${ac_cv_type_size_t+set}" = set; then
5428 echo $ECHO_N "(cached) $ECHO_C" >&6
252b5132 5429else
6840198f
NC
5430 cat >conftest.$ac_ext <<_ACEOF
5431#line 5431 "configure"
252b5132 5432#include "confdefs.h"
6840198f
NC
5433$ac_includes_default
5434int
5435main ()
5436{
5437if ((size_t *) 0)
5438 return 0;
5439if (sizeof (size_t))
5440 return 0;
5441 ;
5442 return 0;
5443}
5444_ACEOF
5445rm -f conftest.$ac_objext
5446if { (eval echo "$as_me:5446: \"$ac_compile\"") >&5
5447 (eval $ac_compile) 2>&5
5448 ac_status=$?
5449 echo "$as_me:5449: \$? = $ac_status" >&5
5450 (exit $ac_status); } &&
5451 { ac_try='test -s conftest.$ac_objext'
5452 { (eval echo "$as_me:5452: \"$ac_try\"") >&5
5453 (eval $ac_try) 2>&5
5454 ac_status=$?
5455 echo "$as_me:5455: \$? = $ac_status" >&5
5456 (exit $ac_status); }; }; then
a2d91340 5457 ac_cv_type_size_t=yes
252b5132 5458else
6840198f
NC
5459 echo "$as_me: failed program was:" >&5
5460cat conftest.$ac_ext >&5
5461ac_cv_type_size_t=no
252b5132 5462fi
6840198f 5463rm -f conftest.$ac_objext conftest.$ac_ext
252b5132 5464fi
6840198f
NC
5465echo "$as_me:5465: result: $ac_cv_type_size_t" >&5
5466echo "${ECHO_T}$ac_cv_type_size_t" >&6
5467if test $ac_cv_type_size_t = yes; then
5468 :
5469else
5470
5471cat >>confdefs.h <<EOF
252b5132
RH
5472#define size_t unsigned
5473EOF
5474
5475fi
5476
5477# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
5478# for constant arguments. Useless!
6840198f
NC
5479echo "$as_me:5479: checking for working alloca.h" >&5
5480echo $ECHO_N "checking for working alloca.h... $ECHO_C" >&6
5481if test "${ac_cv_working_alloca_h+set}" = set; then
5482 echo $ECHO_N "(cached) $ECHO_C" >&6
252b5132 5483else
6840198f
NC
5484 cat >conftest.$ac_ext <<_ACEOF
5485#line 5485 "configure"
252b5132
RH
5486#include "confdefs.h"
5487#include <alloca.h>
6840198f
NC
5488int
5489main ()
5490{
5491char *p = (char *) alloca (2 * sizeof (int));
5492 ;
5493 return 0;
5494}
5495_ACEOF
5496rm -f conftest.$ac_objext conftest$ac_exeext
5497if { (eval echo "$as_me:5497: \"$ac_link\"") >&5
5498 (eval $ac_link) 2>&5
5499 ac_status=$?
5500 echo "$as_me:5500: \$? = $ac_status" >&5
5501 (exit $ac_status); } &&
5502 { ac_try='test -s conftest$ac_exeext'
5503 { (eval echo "$as_me:5503: \"$ac_try\"") >&5
5504 (eval $ac_try) 2>&5
5505 ac_status=$?
5506 echo "$as_me:5506: \$? = $ac_status" >&5
5507 (exit $ac_status); }; }; then
5508 ac_cv_working_alloca_h=yes
5509else
5510 echo "$as_me: failed program was:" >&5
5511cat conftest.$ac_ext >&5
5512ac_cv_working_alloca_h=no
5513fi
5514rm -f conftest$ac_exeext conftest.$ac_ext
5515fi
5516echo "$as_me:5516: result: $ac_cv_working_alloca_h" >&5
5517echo "${ECHO_T}$ac_cv_working_alloca_h" >&6
5518if test $ac_cv_working_alloca_h = yes; then
5519
5520cat >>confdefs.h <<\EOF
252b5132
RH
5521#define HAVE_ALLOCA_H 1
5522EOF
5523
5524fi
5525
6840198f
NC
5526echo "$as_me:5526: checking for alloca" >&5
5527echo $ECHO_N "checking for alloca... $ECHO_C" >&6
5528if test "${ac_cv_func_alloca_works+set}" = set; then
5529 echo $ECHO_N "(cached) $ECHO_C" >&6
252b5132 5530else
6840198f
NC
5531 cat >conftest.$ac_ext <<_ACEOF
5532#line 5532 "configure"
252b5132 5533#include "confdefs.h"
252b5132
RH
5534#ifdef __GNUC__
5535# define alloca __builtin_alloca
5536#else
5537# ifdef _MSC_VER
5538# include <malloc.h>
5539# define alloca _alloca
5540# else
5541# if HAVE_ALLOCA_H
5542# include <alloca.h>
5543# else
5544# ifdef _AIX
5545 #pragma alloca
5546# else
5547# ifndef alloca /* predefined by HP cc +Olibcalls */
5548char *alloca ();
5549# endif
5550# endif
5551# endif
5552# endif
5553#endif
5554
6840198f
NC
5555int
5556main ()
5557{
5558char *p = (char *) alloca (1);
5559 ;
5560 return 0;
5561}
5562_ACEOF
5563rm -f conftest.$ac_objext conftest$ac_exeext
5564if { (eval echo "$as_me:5564: \"$ac_link\"") >&5
5565 (eval $ac_link) 2>&5
5566 ac_status=$?
5567 echo "$as_me:5567: \$? = $ac_status" >&5
5568 (exit $ac_status); } &&
5569 { ac_try='test -s conftest$ac_exeext'
5570 { (eval echo "$as_me:5570: \"$ac_try\"") >&5
5571 (eval $ac_try) 2>&5
5572 ac_status=$?
5573 echo "$as_me:5573: \$? = $ac_status" >&5
5574 (exit $ac_status); }; }; then
252b5132
RH
5575 ac_cv_func_alloca_works=yes
5576else
6840198f
NC
5577 echo "$as_me: failed program was:" >&5
5578cat conftest.$ac_ext >&5
5579ac_cv_func_alloca_works=no
252b5132 5580fi
6840198f 5581rm -f conftest$ac_exeext conftest.$ac_ext
252b5132 5582fi
6840198f
NC
5583echo "$as_me:5583: result: $ac_cv_func_alloca_works" >&5
5584echo "${ECHO_T}$ac_cv_func_alloca_works" >&6
252b5132 5585
252b5132 5586if test $ac_cv_func_alloca_works = yes; then
6840198f
NC
5587
5588cat >>confdefs.h <<\EOF
252b5132
RH
5589#define HAVE_ALLOCA 1
5590EOF
5591
6840198f 5592else
252b5132 5593 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
6840198f
NC
5594# that cause trouble. Some versions do not even contain alloca or
5595# contain a buggy version. If you still want to use their alloca,
5596# use ar to extract alloca.o from them instead of compiling alloca.c.
5597
5598ALLOCA=alloca.$ac_objext
5599
5600cat >>confdefs.h <<\EOF
252b5132
RH
5601#define C_ALLOCA 1
5602EOF
5603
6840198f
NC
5604echo "$as_me:5604: checking whether \`alloca.c' needs Cray hooks" >&5
5605echo $ECHO_N "checking whether \`alloca.c' needs Cray hooks... $ECHO_C" >&6
5606if test "${ac_cv_os_cray+set}" = set; then
5607 echo $ECHO_N "(cached) $ECHO_C" >&6
252b5132 5608else
6840198f
NC
5609 cat >conftest.$ac_ext <<_ACEOF
5610#line 5610 "configure"
252b5132
RH
5611#include "confdefs.h"
5612#if defined(CRAY) && ! defined(CRAY2)
5613webecray
5614#else
5615wenotbecray
5616#endif
5617
6840198f 5618_ACEOF
252b5132
RH
5619if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5620 egrep "webecray" >/dev/null 2>&1; then
252b5132
RH
5621 ac_cv_os_cray=yes
5622else
252b5132
RH
5623 ac_cv_os_cray=no
5624fi
5625rm -f conftest*
5626
5627fi
6840198f
NC
5628echo "$as_me:5628: result: $ac_cv_os_cray" >&5
5629echo "${ECHO_T}$ac_cv_os_cray" >&6
252b5132 5630if test $ac_cv_os_cray = yes; then
6840198f
NC
5631 for ac_func in _getb67 GETB67 getb67; do
5632 ac_ac_var=`echo "ac_cv_func_$ac_func" | $ac_tr_sh`
5633echo "$as_me:5633: checking for $ac_func" >&5
5634echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
5635if eval "test \"\${$ac_ac_var+set}\" = set"; then
5636 echo $ECHO_N "(cached) $ECHO_C" >&6
5637else
5638 cat >conftest.$ac_ext <<_ACEOF
5639#line 5639 "configure"
252b5132
RH
5640#include "confdefs.h"
5641/* System header to define __stub macros and hopefully few prototypes,
6840198f 5642 which can conflict with char $ac_func (); below. */
252b5132
RH
5643#include <assert.h>
5644/* Override any gcc2 internal prototype to avoid an error. */
6840198f
NC
5645#ifdef __cplusplus
5646extern "C"
5647#endif
252b5132 5648/* We use char because int might match the return type of a gcc2
6840198f
NC
5649 builtin and then its argument prototype would still apply. */
5650char $ac_func ();
5651char (*f) ();
252b5132 5652
6840198f
NC
5653int
5654main ()
5655{
252b5132
RH
5656/* The GNU C library defines this for functions which it implements
5657 to always fail with ENOSYS. Some functions are actually named
5658 something starting with __ and the normal name is an alias. */
5659#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5660choke me
5661#else
6840198f 5662f = $ac_func;
252b5132
RH
5663#endif
5664
6840198f
NC
5665 ;
5666 return 0;
5667}
5668_ACEOF
5669rm -f conftest.$ac_objext conftest$ac_exeext
5670if { (eval echo "$as_me:5670: \"$ac_link\"") >&5
5671 (eval $ac_link) 2>&5
5672 ac_status=$?
5673 echo "$as_me:5673: \$? = $ac_status" >&5
5674 (exit $ac_status); } &&
5675 { ac_try='test -s conftest$ac_exeext'
5676 { (eval echo "$as_me:5676: \"$ac_try\"") >&5
5677 (eval $ac_try) 2>&5
5678 ac_status=$?
5679 echo "$as_me:5679: \$? = $ac_status" >&5
5680 (exit $ac_status); }; }; then
5681 eval "$ac_ac_var=yes"
5682else
5683 echo "$as_me: failed program was:" >&5
5684cat conftest.$ac_ext >&5
5685eval "$ac_ac_var=no"
5686fi
5687rm -f conftest$ac_exeext conftest.$ac_ext
5688fi
5689echo "$as_me:5689: result: `eval echo '${'$ac_ac_var'}'`" >&5
5690echo "${ECHO_T}`eval echo '${'$ac_ac_var'}'`" >&6
5691if test `eval echo '${'$ac_ac_var'}'` = yes; then
5692
5693cat >>confdefs.h <<EOF
252b5132
RH
5694#define CRAY_STACKSEG_END $ac_func
5695EOF
5696
6840198f 5697 break
252b5132
RH
5698fi
5699
6840198f 5700 done
252b5132
RH
5701fi
5702
6840198f
NC
5703echo "$as_me:5703: checking stack direction for C alloca" >&5
5704echo $ECHO_N "checking stack direction for C alloca... $ECHO_C" >&6
5705if test "${ac_cv_c_stack_direction+set}" = set; then
5706 echo $ECHO_N "(cached) $ECHO_C" >&6
252b5132
RH
5707else
5708 if test "$cross_compiling" = yes; then
5709 ac_cv_c_stack_direction=0
5710else
6840198f
NC
5711 cat >conftest.$ac_ext <<_ACEOF
5712#line 5712 "configure"
252b5132 5713#include "confdefs.h"
6840198f 5714int
252b5132
RH
5715find_stack_direction ()
5716{
5717 static char *addr = 0;
5718 auto char dummy;
5719 if (addr == 0)
5720 {
5721 addr = &dummy;
5722 return find_stack_direction ();
5723 }
5724 else
5725 return (&dummy > addr) ? 1 : -1;
5726}
6840198f
NC
5727
5728int
252b5132
RH
5729main ()
5730{
6840198f 5731 exit (find_stack_direction () < 0);
252b5132 5732}
6840198f
NC
5733_ACEOF
5734rm -f conftest$ac_exeext
5735if { (eval echo "$as_me:5735: \"$ac_link\"") >&5
5736 (eval $ac_link) 2>&5
5737 ac_status=$?
5738 echo "$as_me:5738: \$? = $ac_status" >&5
5739 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5740 { (eval echo "$as_me:5740: \"$ac_try\"") >&5
5741 (eval $ac_try) 2>&5
5742 ac_status=$?
5743 echo "$as_me:5743: \$? = $ac_status" >&5
5744 (exit $ac_status); }; }; then
252b5132
RH
5745 ac_cv_c_stack_direction=1
5746else
6840198f
NC
5747 echo "$as_me: program exited with status $ac_status" >&5
5748echo "$as_me: failed program was:" >&5
5749cat conftest.$ac_ext >&5
5750ac_cv_c_stack_direction=-1
252b5132 5751fi
6840198f 5752rm -f conftest$ac_exeext conftest.$ac_ext
252b5132 5753fi
252b5132 5754fi
6840198f
NC
5755echo "$as_me:5755: result: $ac_cv_c_stack_direction" >&5
5756echo "${ECHO_T}$ac_cv_c_stack_direction" >&6
252b5132 5757
6840198f 5758cat >>confdefs.h <<EOF
252b5132
RH
5759#define STACK_DIRECTION $ac_cv_c_stack_direction
5760EOF
5761
5762fi
5763
6840198f 5764for ac_header in stdlib.h unistd.h
252b5132 5765do
6840198f
NC
5766ac_ac_Header=`echo "ac_cv_header_$ac_header" | $ac_tr_sh`
5767echo "$as_me:5767: checking for $ac_header" >&5
5768echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5769if eval "test \"\${$ac_ac_Header+set}\" = set"; then
5770 echo $ECHO_N "(cached) $ECHO_C" >&6
5771else
5772 cat >conftest.$ac_ext <<_ACEOF
5773#line 5773 "configure"
252b5132 5774#include "confdefs.h"
6840198f
NC
5775#include <$ac_header>
5776_ACEOF
5777if { (eval echo "$as_me:5777: \"$ac_cpp conftest.$ac_ext\"") >&5
5778 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5779 ac_status=$?
5780 egrep -v '^ *\+' conftest.er1 >conftest.err
5781 rm -f conftest.er1
5782 cat conftest.err >&5
5783 echo "$as_me:5783: \$? = $ac_status" >&5
5784 (exit $ac_status); } >/dev/null; then
5785 if test -s conftest.err; then
5786 ac_cpp_err=$ac_c_preproc_warn_flag
5787 else
5788 ac_cpp_err=
5789 fi
5790else
5791 ac_cpp_err=yes
5792fi
5793if test -z "$ac_cpp_err"; then
5794 eval "$ac_ac_Header=yes"
252b5132 5795else
6840198f 5796 echo "$as_me: failed program was:" >&5
252b5132 5797 cat conftest.$ac_ext >&5
6840198f 5798 eval "$ac_ac_Header=no"
252b5132 5799fi
6840198f 5800rm -f conftest.err conftest.$ac_ext
252b5132 5801fi
6840198f
NC
5802echo "$as_me:5802: result: `eval echo '${'$ac_ac_Header'}'`" >&5
5803echo "${ECHO_T}`eval echo '${'$ac_ac_Header'}'`" >&6
5804if test `eval echo '${'$ac_ac_Header'}'` = yes; then
5805 cat >>confdefs.h <<EOF
5806#define `echo "HAVE_$ac_header" | $ac_tr_cpp` 1
252b5132 5807EOF
6840198f 5808
252b5132
RH
5809fi
5810done
5811
5812for ac_func in getpagesize
5813do
6840198f
NC
5814ac_ac_var=`echo "ac_cv_func_$ac_func" | $ac_tr_sh`
5815echo "$as_me:5815: checking for $ac_func" >&5
5816echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
5817if eval "test \"\${$ac_ac_var+set}\" = set"; then
5818 echo $ECHO_N "(cached) $ECHO_C" >&6
5819else
5820 cat >conftest.$ac_ext <<_ACEOF
5821#line 5821 "configure"
252b5132
RH
5822#include "confdefs.h"
5823/* System header to define __stub macros and hopefully few prototypes,
6840198f 5824 which can conflict with char $ac_func (); below. */
252b5132
RH
5825#include <assert.h>
5826/* Override any gcc2 internal prototype to avoid an error. */
6840198f
NC
5827#ifdef __cplusplus
5828extern "C"
5829#endif
252b5132 5830/* We use char because int might match the return type of a gcc2
6840198f
NC
5831 builtin and then its argument prototype would still apply. */
5832char $ac_func ();
5833char (*f) ();
252b5132 5834
6840198f
NC
5835int
5836main ()
5837{
252b5132
RH
5838/* The GNU C library defines this for functions which it implements
5839 to always fail with ENOSYS. Some functions are actually named
5840 something starting with __ and the normal name is an alias. */
5841#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5842choke me
5843#else
6840198f 5844f = $ac_func;
252b5132
RH
5845#endif
5846
6840198f
NC
5847 ;
5848 return 0;
5849}
5850_ACEOF
5851rm -f conftest.$ac_objext conftest$ac_exeext
5852if { (eval echo "$as_me:5852: \"$ac_link\"") >&5
5853 (eval $ac_link) 2>&5
5854 ac_status=$?
5855 echo "$as_me:5855: \$? = $ac_status" >&5
5856 (exit $ac_status); } &&
5857 { ac_try='test -s conftest$ac_exeext'
5858 { (eval echo "$as_me:5858: \"$ac_try\"") >&5
5859 (eval $ac_try) 2>&5
5860 ac_status=$?
5861 echo "$as_me:5861: \$? = $ac_status" >&5
5862 (exit $ac_status); }; }; then
5863 eval "$ac_ac_var=yes"
5864else
5865 echo "$as_me: failed program was:" >&5
5866cat conftest.$ac_ext >&5
5867eval "$ac_ac_var=no"
5868fi
5869rm -f conftest$ac_exeext conftest.$ac_ext
5870fi
5871echo "$as_me:5871: result: `eval echo '${'$ac_ac_var'}'`" >&5
5872echo "${ECHO_T}`eval echo '${'$ac_ac_var'}'`" >&6
5873if test `eval echo '${'$ac_ac_var'}'` = yes; then
5874 cat >>confdefs.h <<EOF
5875#define `echo "HAVE_$ac_func" | $ac_tr_cpp` 1
252b5132 5876EOF
252b5132 5877
252b5132
RH
5878fi
5879done
5880
6840198f
NC
5881echo "$as_me:5881: checking for working mmap" >&5
5882echo $ECHO_N "checking for working mmap... $ECHO_C" >&6
5883if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then
5884 echo $ECHO_N "(cached) $ECHO_C" >&6
252b5132
RH
5885else
5886 if test "$cross_compiling" = yes; then
5887 ac_cv_func_mmap_fixed_mapped=no
5888else
6840198f
NC
5889 cat >conftest.$ac_ext <<_ACEOF
5890#line 5890 "configure"
252b5132 5891#include "confdefs.h"
252b5132
RH
5892/* Thanks to Mike Haertel and Jim Avera for this test.
5893 Here is a matrix of mmap possibilities:
5894 mmap private not fixed
5895 mmap private fixed at somewhere currently unmapped
5896 mmap private fixed at somewhere already mapped
5897 mmap shared not fixed
5898 mmap shared fixed at somewhere currently unmapped
5899 mmap shared fixed at somewhere already mapped
5900 For private mappings, we should verify that changes cannot be read()
5901 back from the file, nor mmap's back from the file at a different
5902 address. (There have been systems where private was not correctly
5903 implemented like the infamous i386 svr4.0, and systems where the
6840198f 5904 VM page cache was not coherent with the file system buffer cache
252b5132
RH
5905 like early versions of FreeBSD and possibly contemporary NetBSD.)
5906 For shared mappings, we should conversely verify that changes get
5907 propogated back to all the places they're supposed to be.
5908
5909 Grep wants private fixed already mapped.
5910 The main things grep needs to know about mmap are:
5911 * does it exist and is it safe to write into the mmap'd area
5912 * how to use it (BSD variants) */
5913#include <sys/types.h>
5914#include <fcntl.h>
5915#include <sys/mman.h>
5916
6840198f
NC
5917#if STDC_HEADERS || HAVE_STDLIB_H
5918# include <stdlib.h>
5919#else
5920char *malloc ();
5921#endif
5922#if HAVE_UNISTD_H
5923# include <unistd.h>
5924#endif
5925#include <sys/stat.h>
252b5132 5926
6840198f
NC
5927/* This mess was copied from the GNU getpagesize.h. */
5928#if !HAVE_GETPAGESIZE
252b5132 5929/* Assume that all systems that can run configure have sys/param.h. */
6840198f 5930# if !HAVE_SYS_PARAM_H
252b5132
RH
5931# define HAVE_SYS_PARAM_H 1
5932# endif
5933
5934# ifdef _SC_PAGESIZE
5935# define getpagesize() sysconf(_SC_PAGESIZE)
5936# else /* no _SC_PAGESIZE */
6840198f 5937# if HAVE_SYS_PARAM_H
252b5132
RH
5938# include <sys/param.h>
5939# ifdef EXEC_PAGESIZE
5940# define getpagesize() EXEC_PAGESIZE
5941# else /* no EXEC_PAGESIZE */
5942# ifdef NBPG
5943# define getpagesize() NBPG * CLSIZE
5944# ifndef CLSIZE
5945# define CLSIZE 1
5946# endif /* no CLSIZE */
5947# else /* no NBPG */
5948# ifdef NBPC
5949# define getpagesize() NBPC
5950# else /* no NBPC */
5951# ifdef PAGESIZE
5952# define getpagesize() PAGESIZE
5953# endif /* PAGESIZE */
5954# endif /* no NBPC */
5955# endif /* no NBPG */
5956# endif /* no EXEC_PAGESIZE */
5957# else /* no HAVE_SYS_PARAM_H */
5958# define getpagesize() 8192 /* punt totally */
5959# endif /* no HAVE_SYS_PARAM_H */
5960# endif /* no _SC_PAGESIZE */
5961
5962#endif /* no HAVE_GETPAGESIZE */
5963
252b5132 5964int
6840198f 5965main ()
252b5132 5966{
6840198f
NC
5967 char *data, *data2, *data3;
5968 int i, pagesize;
5969 int fd;
5970
5971 pagesize = getpagesize ();
5972
5973 /* First, make a file with some known garbage in it. */
5974 data = (char *) malloc (pagesize);
5975 if (!data)
5976 exit (1);
5977 for (i = 0; i < pagesize; ++i)
5978 *(data + i) = rand ();
5979 umask (0);
5980 fd = creat ("conftest.mmap", 0600);
5981 if (fd < 0)
5982 exit (1);
5983 if (write (fd, data, pagesize) != pagesize)
5984 exit (1);
5985 close (fd);
5986
5987 /* Next, try to mmap the file at a fixed address which already has
5988 something else allocated at it. If we can, also make sure that
5989 we see the same garbage. */
5990 fd = open ("conftest.mmap", O_RDWR);
5991 if (fd < 0)
5992 exit (1);
5993 data2 = (char *) malloc (2 * pagesize);
5994 if (!data2)
5995 exit (1);
5996 data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
5997 if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
5998 MAP_PRIVATE | MAP_FIXED, fd, 0L))
5999 exit (1);
6000 for (i = 0; i < pagesize; ++i)
6001 if (*(data + i) != *(data2 + i))
6002 exit (1);
6003
6004 /* Finally, make sure that changes to the mapped area do not
6005 percolate back to the file as seen by read(). (This is a bug on
6006 some variants of i386 svr4.0.) */
6007 for (i = 0; i < pagesize; ++i)
6008 *(data2 + i) = *(data2 + i) + 1;
6009 data3 = (char *) malloc (pagesize);
6010 if (!data3)
6011 exit (1);
6012 if (read (fd, data3, pagesize) != pagesize)
6013 exit (1);
6014 for (i = 0; i < pagesize; ++i)
6015 if (*(data + i) != *(data3 + i))
6016 exit (1);
6017 close (fd);
6018 exit (0);
252b5132 6019}
6840198f
NC
6020_ACEOF
6021rm -f conftest$ac_exeext
6022if { (eval echo "$as_me:6022: \"$ac_link\"") >&5
6023 (eval $ac_link) 2>&5
6024 ac_status=$?
6025 echo "$as_me:6025: \$? = $ac_status" >&5
6026 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6027 { (eval echo "$as_me:6027: \"$ac_try\"") >&5
6028 (eval $ac_try) 2>&5
6029 ac_status=$?
6030 echo "$as_me:6030: \$? = $ac_status" >&5
6031 (exit $ac_status); }; }; then
252b5132
RH
6032 ac_cv_func_mmap_fixed_mapped=yes
6033else
6840198f
NC
6034 echo "$as_me: program exited with status $ac_status" >&5
6035echo "$as_me: failed program was:" >&5
6036cat conftest.$ac_ext >&5
6037ac_cv_func_mmap_fixed_mapped=no
252b5132 6038fi
6840198f 6039rm -f conftest$ac_exeext conftest.$ac_ext
252b5132 6040fi
252b5132 6041fi
6840198f
NC
6042echo "$as_me:6042: result: $ac_cv_func_mmap_fixed_mapped" >&5
6043echo "${ECHO_T}$ac_cv_func_mmap_fixed_mapped" >&6
252b5132 6044if test $ac_cv_func_mmap_fixed_mapped = yes; then
6840198f
NC
6045
6046cat >>confdefs.h <<\EOF
252b5132
RH
6047#define HAVE_MMAP 1
6048EOF
6049
6050fi
6840198f 6051rm -f conftest.mmap
252b5132 6052
6840198f 6053for ac_header in argz.h limits.h locale.h nl_types.h malloc.h string.h \
252b5132
RH
6054unistd.h values.h sys/param.h
6055do
6840198f
NC
6056ac_ac_Header=`echo "ac_cv_header_$ac_header" | $ac_tr_sh`
6057echo "$as_me:6057: checking for $ac_header" >&5
6058echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6059if eval "test \"\${$ac_ac_Header+set}\" = set"; then
6060 echo $ECHO_N "(cached) $ECHO_C" >&6
6061else
6062 cat >conftest.$ac_ext <<_ACEOF
6063#line 6063 "configure"
252b5132 6064#include "confdefs.h"
6840198f
NC
6065#include <$ac_header>
6066_ACEOF
6067if { (eval echo "$as_me:6067: \"$ac_cpp conftest.$ac_ext\"") >&5
6068 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6069 ac_status=$?
6070 egrep -v '^ *\+' conftest.er1 >conftest.err
6071 rm -f conftest.er1
6072 cat conftest.err >&5
6073 echo "$as_me:6073: \$? = $ac_status" >&5
6074 (exit $ac_status); } >/dev/null; then
6075 if test -s conftest.err; then
6076 ac_cpp_err=$ac_c_preproc_warn_flag
6077 else
6078 ac_cpp_err=
6079 fi
6080else
6081 ac_cpp_err=yes
6082fi
6083if test -z "$ac_cpp_err"; then
6084 eval "$ac_ac_Header=yes"
252b5132 6085else
6840198f 6086 echo "$as_me: failed program was:" >&5
252b5132 6087 cat conftest.$ac_ext >&5
6840198f 6088 eval "$ac_ac_Header=no"
252b5132 6089fi
6840198f 6090rm -f conftest.err conftest.$ac_ext
252b5132 6091fi
6840198f
NC
6092echo "$as_me:6092: result: `eval echo '${'$ac_ac_Header'}'`" >&5
6093echo "${ECHO_T}`eval echo '${'$ac_ac_Header'}'`" >&6
6094if test `eval echo '${'$ac_ac_Header'}'` = yes; then
6095 cat >>confdefs.h <<EOF
6096#define `echo "HAVE_$ac_header" | $ac_tr_cpp` 1
252b5132 6097EOF
6840198f 6098
252b5132
RH
6099fi
6100done
6101
6840198f 6102for ac_func in getcwd munmap putenv setenv setlocale strchr strcasecmp \
252b5132
RH
6103__argz_count __argz_stringify __argz_next
6104do
6840198f
NC
6105ac_ac_var=`echo "ac_cv_func_$ac_func" | $ac_tr_sh`
6106echo "$as_me:6106: checking for $ac_func" >&5
6107echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
6108if eval "test \"\${$ac_ac_var+set}\" = set"; then
6109 echo $ECHO_N "(cached) $ECHO_C" >&6
6110else
6111 cat >conftest.$ac_ext <<_ACEOF
6112#line 6112 "configure"
252b5132
RH
6113#include "confdefs.h"
6114/* System header to define __stub macros and hopefully few prototypes,
6840198f 6115 which can conflict with char $ac_func (); below. */
252b5132
RH
6116#include <assert.h>
6117/* Override any gcc2 internal prototype to avoid an error. */
6840198f
NC
6118#ifdef __cplusplus
6119extern "C"
6120#endif
252b5132 6121/* We use char because int might match the return type of a gcc2
6840198f
NC
6122 builtin and then its argument prototype would still apply. */
6123char $ac_func ();
6124char (*f) ();
252b5132 6125
6840198f
NC
6126int
6127main ()
6128{
252b5132
RH
6129/* The GNU C library defines this for functions which it implements
6130 to always fail with ENOSYS. Some functions are actually named
6131 something starting with __ and the normal name is an alias. */
6132#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6133choke me
6134#else
6840198f 6135f = $ac_func;
252b5132
RH
6136#endif
6137
6840198f
NC
6138 ;
6139 return 0;
6140}
6141_ACEOF
6142rm -f conftest.$ac_objext conftest$ac_exeext
6143if { (eval echo "$as_me:6143: \"$ac_link\"") >&5
6144 (eval $ac_link) 2>&5
6145 ac_status=$?
6146 echo "$as_me:6146: \$? = $ac_status" >&5
6147 (exit $ac_status); } &&
6148 { ac_try='test -s conftest$ac_exeext'
6149 { (eval echo "$as_me:6149: \"$ac_try\"") >&5
6150 (eval $ac_try) 2>&5
6151 ac_status=$?
6152 echo "$as_me:6152: \$? = $ac_status" >&5
6153 (exit $ac_status); }; }; then
6154 eval "$ac_ac_var=yes"
6155else
6156 echo "$as_me: failed program was:" >&5
6157cat conftest.$ac_ext >&5
6158eval "$ac_ac_var=no"
6159fi
6160rm -f conftest$ac_exeext conftest.$ac_ext
6161fi
6162echo "$as_me:6162: result: `eval echo '${'$ac_ac_var'}'`" >&5
6163echo "${ECHO_T}`eval echo '${'$ac_ac_var'}'`" >&6
6164if test `eval echo '${'$ac_ac_var'}'` = yes; then
6165 cat >>confdefs.h <<EOF
6166#define `echo "HAVE_$ac_func" | $ac_tr_cpp` 1
252b5132 6167EOF
252b5132 6168
252b5132
RH
6169fi
6170done
6171
252b5132 6172 if test "${ac_cv_func_stpcpy+set}" != "set"; then
6840198f
NC
6173
6174for ac_func in stpcpy
252b5132 6175do
6840198f
NC
6176ac_ac_var=`echo "ac_cv_func_$ac_func" | $ac_tr_sh`
6177echo "$as_me:6177: checking for $ac_func" >&5
6178echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
6179if eval "test \"\${$ac_ac_var+set}\" = set"; then
6180 echo $ECHO_N "(cached) $ECHO_C" >&6
6181else
6182 cat >conftest.$ac_ext <<_ACEOF
6183#line 6183 "configure"
252b5132
RH
6184#include "confdefs.h"
6185/* System header to define __stub macros and hopefully few prototypes,
6840198f 6186 which can conflict with char $ac_func (); below. */
252b5132
RH
6187#include <assert.h>
6188/* Override any gcc2 internal prototype to avoid an error. */
6840198f
NC
6189#ifdef __cplusplus
6190extern "C"
6191#endif
252b5132 6192/* We use char because int might match the return type of a gcc2
6840198f
NC
6193 builtin and then its argument prototype would still apply. */
6194char $ac_func ();
6195char (*f) ();
252b5132 6196
6840198f
NC
6197int
6198main ()
6199{
252b5132
RH
6200/* The GNU C library defines this for functions which it implements
6201 to always fail with ENOSYS. Some functions are actually named
6202 something starting with __ and the normal name is an alias. */
6203#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6204choke me
6205#else
6840198f 6206f = $ac_func;
252b5132
RH
6207#endif
6208
6840198f
NC
6209 ;
6210 return 0;
6211}
6212_ACEOF
6213rm -f conftest.$ac_objext conftest$ac_exeext
6214if { (eval echo "$as_me:6214: \"$ac_link\"") >&5
6215 (eval $ac_link) 2>&5
6216 ac_status=$?
6217 echo "$as_me:6217: \$? = $ac_status" >&5
6218 (exit $ac_status); } &&
6219 { ac_try='test -s conftest$ac_exeext'
6220 { (eval echo "$as_me:6220: \"$ac_try\"") >&5
6221 (eval $ac_try) 2>&5
6222 ac_status=$?
6223 echo "$as_me:6223: \$? = $ac_status" >&5
6224 (exit $ac_status); }; }; then
6225 eval "$ac_ac_var=yes"
6226else
6227 echo "$as_me: failed program was:" >&5
6228cat conftest.$ac_ext >&5
6229eval "$ac_ac_var=no"
6230fi
6231rm -f conftest$ac_exeext conftest.$ac_ext
6232fi
6233echo "$as_me:6233: result: `eval echo '${'$ac_ac_var'}'`" >&5
6234echo "${ECHO_T}`eval echo '${'$ac_ac_var'}'`" >&6
6235if test `eval echo '${'$ac_ac_var'}'` = yes; then
6236 cat >>confdefs.h <<EOF
6237#define `echo "HAVE_$ac_func" | $ac_tr_cpp` 1
252b5132 6238EOF
252b5132 6239
252b5132
RH
6240fi
6241done
6242
6243 fi
6244 if test "${ac_cv_func_stpcpy}" = "yes"; then
6840198f
NC
6245
6246cat >>confdefs.h <<\EOF
252b5132
RH
6247#define HAVE_STPCPY 1
6248EOF
6249
6250 fi
6251
6252 if test $ac_cv_header_locale_h = yes; then
6840198f
NC
6253 echo "$as_me:6253: checking for LC_MESSAGES" >&5
6254echo $ECHO_N "checking for LC_MESSAGES... $ECHO_C" >&6
6255if test "${am_cv_val_LC_MESSAGES+set}" = set; then
6256 echo $ECHO_N "(cached) $ECHO_C" >&6
252b5132 6257else
6840198f
NC
6258 cat >conftest.$ac_ext <<_ACEOF
6259#line 6259 "configure"
252b5132
RH
6260#include "confdefs.h"
6261#include <locale.h>
6840198f
NC
6262int
6263main ()
6264{
252b5132 6265return LC_MESSAGES
6840198f
NC
6266 ;
6267 return 0;
6268}
6269_ACEOF
6270rm -f conftest.$ac_objext conftest$ac_exeext
6271if { (eval echo "$as_me:6271: \"$ac_link\"") >&5
6272 (eval $ac_link) 2>&5
6273 ac_status=$?
6274 echo "$as_me:6274: \$? = $ac_status" >&5
6275 (exit $ac_status); } &&
6276 { ac_try='test -s conftest$ac_exeext'
6277 { (eval echo "$as_me:6277: \"$ac_try\"") >&5
6278 (eval $ac_try) 2>&5
6279 ac_status=$?
6280 echo "$as_me:6280: \$? = $ac_status" >&5
6281 (exit $ac_status); }; }; then
252b5132
RH
6282 am_cv_val_LC_MESSAGES=yes
6283else
6840198f
NC
6284 echo "$as_me: failed program was:" >&5
6285cat conftest.$ac_ext >&5
6286am_cv_val_LC_MESSAGES=no
252b5132 6287fi
6840198f 6288rm -f conftest$ac_exeext conftest.$ac_ext
252b5132 6289fi
6840198f
NC
6290echo "$as_me:6290: result: $am_cv_val_LC_MESSAGES" >&5
6291echo "${ECHO_T}$am_cv_val_LC_MESSAGES" >&6
252b5132 6292 if test $am_cv_val_LC_MESSAGES = yes; then
6840198f
NC
6293
6294cat >>confdefs.h <<\EOF
252b5132
RH
6295#define HAVE_LC_MESSAGES 1
6296EOF
6297
6298 fi
6299 fi
6840198f
NC
6300 echo "$as_me:6300: checking whether NLS is requested" >&5
6301echo $ECHO_N "checking whether NLS is requested... $ECHO_C" >&6
252b5132
RH
6302 # Check whether --enable-nls or --disable-nls was given.
6303if test "${enable_nls+set}" = set; then
6304 enableval="$enable_nls"
6305 USE_NLS=$enableval
6306else
6307 USE_NLS=yes
6840198f
NC
6308fi;
6309 echo "$as_me:6309: result: $USE_NLS" >&5
6310echo "${ECHO_T}$USE_NLS" >&6
252b5132
RH
6311
6312 USE_INCLUDED_LIBINTL=no
6313
6314 if test "$USE_NLS" = "yes"; then
6840198f
NC
6315
6316cat >>confdefs.h <<\EOF
252b5132
RH
6317#define ENABLE_NLS 1
6318EOF
6319
6840198f
NC
6320 echo "$as_me:6320: checking whether included gettext is requested" >&5
6321echo $ECHO_N "checking whether included gettext is requested... $ECHO_C" >&6
6322
6323# Check whether --with-included-gettext or --without-included-gettext was given.
252b5132
RH
6324if test "${with_included_gettext+set}" = set; then
6325 withval="$with_included_gettext"
6326 nls_cv_force_use_gnu_gettext=$withval
6327else
6328 nls_cv_force_use_gnu_gettext=no
6840198f
NC
6329fi;
6330 echo "$as_me:6330: result: $nls_cv_force_use_gnu_gettext" >&5
6331echo "${ECHO_T}$nls_cv_force_use_gnu_gettext" >&6
252b5132
RH
6332
6333 nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
6334 if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
6335 nls_cv_header_intl=
6336 nls_cv_header_libgt=
6337 CATOBJEXT=NONE
6338
6840198f
NC
6339 echo "$as_me:6339: checking for libintl.h" >&5
6340echo $ECHO_N "checking for libintl.h... $ECHO_C" >&6
6341if test "${ac_cv_header_libintl_h+set}" = set; then
6342 echo $ECHO_N "(cached) $ECHO_C" >&6
252b5132 6343else
6840198f
NC
6344 cat >conftest.$ac_ext <<_ACEOF
6345#line 6345 "configure"
252b5132
RH
6346#include "confdefs.h"
6347#include <libintl.h>
6840198f
NC
6348_ACEOF
6349if { (eval echo "$as_me:6349: \"$ac_cpp conftest.$ac_ext\"") >&5
6350 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6351 ac_status=$?
6352 egrep -v '^ *\+' conftest.er1 >conftest.err
6353 rm -f conftest.er1
6354 cat conftest.err >&5
6355 echo "$as_me:6355: \$? = $ac_status" >&5
6356 (exit $ac_status); } >/dev/null; then
6357 if test -s conftest.err; then
6358 ac_cpp_err=$ac_c_preproc_warn_flag
6359 else
6360 ac_cpp_err=
6361 fi
6362else
6363 ac_cpp_err=yes
6364fi
6365if test -z "$ac_cpp_err"; then
6366 ac_cv_header_libintl_h=yes
252b5132 6367else
6840198f 6368 echo "$as_me: failed program was:" >&5
252b5132 6369 cat conftest.$ac_ext >&5
6840198f 6370 ac_cv_header_libintl_h=no
252b5132 6371fi
6840198f 6372rm -f conftest.err conftest.$ac_ext
252b5132 6373fi
6840198f
NC
6374echo "$as_me:6374: result: $ac_cv_header_libintl_h" >&5
6375echo "${ECHO_T}$ac_cv_header_libintl_h" >&6
6376if test $ac_cv_header_libintl_h = yes; then
6377 echo "$as_me:6377: checking for gettext in libc" >&5
6378echo $ECHO_N "checking for gettext in libc... $ECHO_C" >&6
6379if test "${gt_cv_func_gettext_libc+set}" = set; then
6380 echo $ECHO_N "(cached) $ECHO_C" >&6
252b5132 6381else
6840198f
NC
6382 cat >conftest.$ac_ext <<_ACEOF
6383#line 6383 "configure"
252b5132
RH
6384#include "confdefs.h"
6385#include <libintl.h>
6840198f
NC
6386int
6387main ()
6388{
252b5132 6389return (int) gettext ("")
6840198f
NC
6390 ;
6391 return 0;
6392}
6393_ACEOF
6394rm -f conftest.$ac_objext conftest$ac_exeext
6395if { (eval echo "$as_me:6395: \"$ac_link\"") >&5
6396 (eval $ac_link) 2>&5
6397 ac_status=$?
6398 echo "$as_me:6398: \$? = $ac_status" >&5
6399 (exit $ac_status); } &&
6400 { ac_try='test -s conftest$ac_exeext'
6401 { (eval echo "$as_me:6401: \"$ac_try\"") >&5
6402 (eval $ac_try) 2>&5
6403 ac_status=$?
6404 echo "$as_me:6404: \$? = $ac_status" >&5
6405 (exit $ac_status); }; }; then
252b5132
RH
6406 gt_cv_func_gettext_libc=yes
6407else
6840198f
NC
6408 echo "$as_me: failed program was:" >&5
6409cat conftest.$ac_ext >&5
6410gt_cv_func_gettext_libc=no
252b5132 6411fi
6840198f 6412rm -f conftest$ac_exeext conftest.$ac_ext
252b5132 6413fi
6840198f
NC
6414echo "$as_me:6414: result: $gt_cv_func_gettext_libc" >&5
6415echo "${ECHO_T}$gt_cv_func_gettext_libc" >&6
252b5132
RH
6416
6417 if test "$gt_cv_func_gettext_libc" != "yes"; then
6840198f
NC
6418 echo "$as_me:6418: checking for bindtextdomain in -lintl" >&5
6419echo $ECHO_N "checking for bindtextdomain in -lintl... $ECHO_C" >&6
6420if test "${ac_cv_lib_intl_bindtextdomain+set}" = set; then
6421 echo $ECHO_N "(cached) $ECHO_C" >&6
252b5132 6422else
6840198f 6423 ac_check_lib_save_LIBS=$LIBS
252b5132 6424LIBS="-lintl $LIBS"
6840198f
NC
6425cat >conftest.$ac_ext <<_ACEOF
6426#line 6426 "configure"
252b5132 6427#include "confdefs.h"
6840198f 6428
252b5132 6429/* Override any gcc2 internal prototype to avoid an error. */
6840198f
NC
6430#ifdef __cplusplus
6431extern "C"
6432#endif
252b5132 6433/* We use char because int might match the return type of a gcc2
6840198f
NC
6434 builtin and then its argument prototype would still apply. */
6435char bindtextdomain ();
6436int
6437main ()
6438{
6439bindtextdomain ();
6440 ;
6441 return 0;
6442}
6443_ACEOF
6444rm -f conftest.$ac_objext conftest$ac_exeext
6445if { (eval echo "$as_me:6445: \"$ac_link\"") >&5
6446 (eval $ac_link) 2>&5
6447 ac_status=$?
6448 echo "$as_me:6448: \$? = $ac_status" >&5
6449 (exit $ac_status); } &&
6450 { ac_try='test -s conftest$ac_exeext'
6451 { (eval echo "$as_me:6451: \"$ac_try\"") >&5
6452 (eval $ac_try) 2>&5
6453 ac_status=$?
6454 echo "$as_me:6454: \$? = $ac_status" >&5
6455 (exit $ac_status); }; }; then
6456 ac_cv_lib_intl_bindtextdomain=yes
6457else
6458 echo "$as_me: failed program was:" >&5
6459cat conftest.$ac_ext >&5
6460ac_cv_lib_intl_bindtextdomain=no
6461fi
6462rm -f conftest$ac_exeext conftest.$ac_ext
6463LIBS=$ac_check_lib_save_LIBS
6464fi
6465echo "$as_me:6465: result: $ac_cv_lib_intl_bindtextdomain" >&5
6466echo "${ECHO_T}$ac_cv_lib_intl_bindtextdomain" >&6
6467if test $ac_cv_lib_intl_bindtextdomain = yes; then
6468 echo "$as_me:6468: checking for gettext in libintl" >&5
6469echo $ECHO_N "checking for gettext in libintl... $ECHO_C" >&6
6470if test "${gt_cv_func_gettext_libintl+set}" = set; then
6471 echo $ECHO_N "(cached) $ECHO_C" >&6
6472else
6473 cat >conftest.$ac_ext <<_ACEOF
6474#line 6474 "configure"
252b5132
RH
6475#include "confdefs.h"
6476
6840198f
NC
6477int
6478main ()
6479{
252b5132 6480return (int) gettext ("")
6840198f
NC
6481 ;
6482 return 0;
6483}
6484_ACEOF
6485rm -f conftest.$ac_objext conftest$ac_exeext
6486if { (eval echo "$as_me:6486: \"$ac_link\"") >&5
6487 (eval $ac_link) 2>&5
6488 ac_status=$?
6489 echo "$as_me:6489: \$? = $ac_status" >&5
6490 (exit $ac_status); } &&
6491 { ac_try='test -s conftest$ac_exeext'
6492 { (eval echo "$as_me:6492: \"$ac_try\"") >&5
6493 (eval $ac_try) 2>&5
6494 ac_status=$?
6495 echo "$as_me:6495: \$? = $ac_status" >&5
6496 (exit $ac_status); }; }; then
252b5132
RH
6497 gt_cv_func_gettext_libintl=yes
6498else
6840198f
NC
6499 echo "$as_me: failed program was:" >&5
6500cat conftest.$ac_ext >&5
6501gt_cv_func_gettext_libintl=no
252b5132 6502fi
6840198f 6503rm -f conftest$ac_exeext conftest.$ac_ext
252b5132 6504fi
6840198f
NC
6505echo "$as_me:6505: result: $gt_cv_func_gettext_libintl" >&5
6506echo "${ECHO_T}$gt_cv_func_gettext_libintl" >&6
252b5132
RH
6507fi
6508
6509 fi
6510
6511 if test "$gt_cv_func_gettext_libc" = "yes" \
6512 || test "$gt_cv_func_gettext_libintl" = "yes"; then
6840198f
NC
6513
6514cat >>confdefs.h <<\EOF
252b5132
RH
6515#define HAVE_GETTEXT 1
6516EOF
6517
6518 # Extract the first word of "msgfmt", so it can be a program name with args.
6519set dummy msgfmt; ac_word=$2
6840198f
NC
6520echo "$as_me:6520: checking for $ac_word" >&5
6521echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6522if test "${ac_cv_path_MSGFMT+set}" = set; then
6523 echo $ECHO_N "(cached) $ECHO_C" >&6
252b5132
RH
6524else
6525 case "$MSGFMT" in
6526 /*)
6527 ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
6528 ;;
6529 *)
6530 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
6531 for ac_dir in $PATH; do
6532 test -z "$ac_dir" && ac_dir=.
6533 if test -f $ac_dir/$ac_word; then
6534 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
6535 ac_cv_path_MSGFMT="$ac_dir/$ac_word"
6536 break
6537 fi
6538 fi
6539 done
6540 IFS="$ac_save_ifs"
6541 test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="no"
6542 ;;
6543esac
6544fi
6545MSGFMT="$ac_cv_path_MSGFMT"
6546if test -n "$MSGFMT"; then
6840198f
NC
6547 echo "$as_me:6547: result: $MSGFMT" >&5
6548echo "${ECHO_T}$MSGFMT" >&6
252b5132 6549else
6840198f
NC
6550 echo "$as_me:6550: result: no" >&5
6551echo "${ECHO_T}no" >&6
252b5132
RH
6552fi
6553 if test "$MSGFMT" != "no"; then
6840198f
NC
6554
6555for ac_func in dcgettext
252b5132 6556do
6840198f
NC
6557ac_ac_var=`echo "ac_cv_func_$ac_func" | $ac_tr_sh`
6558echo "$as_me:6558: checking for $ac_func" >&5
6559echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
6560if eval "test \"\${$ac_ac_var+set}\" = set"; then
6561 echo $ECHO_N "(cached) $ECHO_C" >&6
6562else
6563 cat >conftest.$ac_ext <<_ACEOF
6564#line 6564 "configure"
252b5132
RH
6565#include "confdefs.h"
6566/* System header to define __stub macros and hopefully few prototypes,
6840198f 6567 which can conflict with char $ac_func (); below. */
252b5132
RH
6568#include <assert.h>
6569/* Override any gcc2 internal prototype to avoid an error. */
6840198f
NC
6570#ifdef __cplusplus
6571extern "C"
6572#endif
252b5132 6573/* We use char because int might match the return type of a gcc2
6840198f
NC
6574 builtin and then its argument prototype would still apply. */
6575char $ac_func ();
6576char (*f) ();
252b5132 6577
6840198f
NC
6578int
6579main ()
6580{
252b5132
RH
6581/* The GNU C library defines this for functions which it implements
6582 to always fail with ENOSYS. Some functions are actually named
6583 something starting with __ and the normal name is an alias. */
6584#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6585choke me
6586#else
6840198f 6587f = $ac_func;
252b5132
RH
6588#endif
6589
6840198f
NC
6590 ;
6591 return 0;
6592}
6593_ACEOF
6594rm -f conftest.$ac_objext conftest$ac_exeext
6595if { (eval echo "$as_me:6595: \"$ac_link\"") >&5
6596 (eval $ac_link) 2>&5
6597 ac_status=$?
6598 echo "$as_me:6598: \$? = $ac_status" >&5
6599 (exit $ac_status); } &&
6600 { ac_try='test -s conftest$ac_exeext'
6601 { (eval echo "$as_me:6601: \"$ac_try\"") >&5
6602 (eval $ac_try) 2>&5
6603 ac_status=$?
6604 echo "$as_me:6604: \$? = $ac_status" >&5
6605 (exit $ac_status); }; }; then
6606 eval "$ac_ac_var=yes"
6607else
6608 echo "$as_me: failed program was:" >&5
6609cat conftest.$ac_ext >&5
6610eval "$ac_ac_var=no"
6611fi
6612rm -f conftest$ac_exeext conftest.$ac_ext
6613fi
6614echo "$as_me:6614: result: `eval echo '${'$ac_ac_var'}'`" >&5
6615echo "${ECHO_T}`eval echo '${'$ac_ac_var'}'`" >&6
6616if test `eval echo '${'$ac_ac_var'}'` = yes; then
6617 cat >>confdefs.h <<EOF
6618#define `echo "HAVE_$ac_func" | $ac_tr_cpp` 1
252b5132 6619EOF
252b5132 6620
252b5132
RH
6621fi
6622done
6623
6624 # Extract the first word of "gmsgfmt", so it can be a program name with args.
6625set dummy gmsgfmt; ac_word=$2
6840198f
NC
6626echo "$as_me:6626: checking for $ac_word" >&5
6627echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6628if test "${ac_cv_path_GMSGFMT+set}" = set; then
6629 echo $ECHO_N "(cached) $ECHO_C" >&6
252b5132 6630else
6840198f
NC
6631 case $GMSGFMT in
6632 [\\/]* | ?:[\\/]*)
252b5132
RH
6633 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
6634 ;;
252b5132 6635 *)
6840198f
NC
6636 ac_save_IFS=$IFS; IFS=$ac_path_separator
6637ac_dummy="$PATH"
6638for ac_dir in $ac_dummy; do
6639 IFS=$ac_save_IFS
6640 test -z "$ac_dir" && ac_dir=.
6641 if $as_executable_p "$ac_dir/$ac_word"; then
6642 ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
6643 break
6644fi
6645done
6646
252b5132
RH
6647 test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
6648 ;;
6649esac
6650fi
6840198f
NC
6651GMSGFMT=$ac_cv_path_GMSGFMT
6652
252b5132 6653if test -n "$GMSGFMT"; then
6840198f
NC
6654 echo "$as_me:6654: result: $GMSGFMT" >&5
6655echo "${ECHO_T}$GMSGFMT" >&6
252b5132 6656else
6840198f
NC
6657 echo "$as_me:6657: result: no" >&5
6658echo "${ECHO_T}no" >&6
252b5132
RH
6659fi
6660
6661 # Extract the first word of "xgettext", so it can be a program name with args.
6662set dummy xgettext; ac_word=$2
6840198f
NC
6663echo "$as_me:6663: checking for $ac_word" >&5
6664echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6665if test "${ac_cv_path_XGETTEXT+set}" = set; then
6666 echo $ECHO_N "(cached) $ECHO_C" >&6
252b5132
RH
6667else
6668 case "$XGETTEXT" in
6669 /*)
6670 ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
6671 ;;
6672 *)
6673 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
6674 for ac_dir in $PATH; do
6675 test -z "$ac_dir" && ac_dir=.
6676 if test -f $ac_dir/$ac_word; then
6677 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
6678 ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
6679 break
6680 fi
6681 fi
6682 done
6683 IFS="$ac_save_ifs"
6684 test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
6685 ;;
6686esac
6687fi
6688XGETTEXT="$ac_cv_path_XGETTEXT"
6689if test -n "$XGETTEXT"; then
6840198f
NC
6690 echo "$as_me:6690: result: $XGETTEXT" >&5
6691echo "${ECHO_T}$XGETTEXT" >&6
252b5132 6692else
6840198f
NC
6693 echo "$as_me:6693: result: no" >&5
6694echo "${ECHO_T}no" >&6
252b5132
RH
6695fi
6696
6840198f
NC
6697 cat >conftest.$ac_ext <<_ACEOF
6698#line 6698 "configure"
252b5132
RH
6699#include "confdefs.h"
6700
6840198f
NC
6701int
6702main ()
6703{
252b5132
RH
6704extern int _nl_msg_cat_cntr;
6705 return _nl_msg_cat_cntr
6840198f
NC
6706 ;
6707 return 0;
6708}
6709_ACEOF
6710rm -f conftest.$ac_objext conftest$ac_exeext
6711if { (eval echo "$as_me:6711: \"$ac_link\"") >&5
6712 (eval $ac_link) 2>&5
6713 ac_status=$?
6714 echo "$as_me:6714: \$? = $ac_status" >&5
6715 (exit $ac_status); } &&
6716 { ac_try='test -s conftest$ac_exeext'
6717 { (eval echo "$as_me:6717: \"$ac_try\"") >&5
6718 (eval $ac_try) 2>&5
6719 ac_status=$?
6720 echo "$as_me:6720: \$? = $ac_status" >&5
6721 (exit $ac_status); }; }; then
252b5132
RH
6722 CATOBJEXT=.gmo
6723 DATADIRNAME=share
6724else
6840198f
NC
6725 echo "$as_me: failed program was:" >&5
6726cat conftest.$ac_ext >&5
6727CATOBJEXT=.mo
252b5132
RH
6728 DATADIRNAME=lib
6729fi
6840198f 6730rm -f conftest$ac_exeext conftest.$ac_ext
252b5132
RH
6731 INSTOBJEXT=.mo
6732 fi
6733 fi
252b5132 6734
6840198f 6735fi
252b5132 6736
252b5132
RH
6737 if test "$CATOBJEXT" = "NONE"; then
6738 nls_cv_use_gnu_gettext=yes
6739 fi
6740 fi
6741
6742 if test "$nls_cv_use_gnu_gettext" = "yes"; then
6743 INTLOBJS="\$(GETTOBJS)"
6744 # Extract the first word of "msgfmt", so it can be a program name with args.
6745set dummy msgfmt; ac_word=$2
6840198f
NC
6746echo "$as_me:6746: checking for $ac_word" >&5
6747echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6748if test "${ac_cv_path_MSGFMT+set}" = set; then
6749 echo $ECHO_N "(cached) $ECHO_C" >&6
252b5132
RH
6750else
6751 case "$MSGFMT" in
6752 /*)
6753 ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
6754 ;;
6755 *)
6756 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
6757 for ac_dir in $PATH; do
6758 test -z "$ac_dir" && ac_dir=.
6759 if test -f $ac_dir/$ac_word; then
6760 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
6761 ac_cv_path_MSGFMT="$ac_dir/$ac_word"
6762 break
6763 fi
6764 fi
6765 done
6766 IFS="$ac_save_ifs"
6767 test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="msgfmt"
6768 ;;
6769esac
6770fi
6771MSGFMT="$ac_cv_path_MSGFMT"
6772if test -n "$MSGFMT"; then
6840198f
NC
6773 echo "$as_me:6773: result: $MSGFMT" >&5
6774echo "${ECHO_T}$MSGFMT" >&6
252b5132 6775else
6840198f
NC
6776 echo "$as_me:6776: result: no" >&5
6777echo "${ECHO_T}no" >&6
252b5132
RH
6778fi
6779
6780 # Extract the first word of "gmsgfmt", so it can be a program name with args.
6781set dummy gmsgfmt; ac_word=$2
6840198f
NC
6782echo "$as_me:6782: checking for $ac_word" >&5
6783echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6784if test "${ac_cv_path_GMSGFMT+set}" = set; then
6785 echo $ECHO_N "(cached) $ECHO_C" >&6
252b5132 6786else
6840198f
NC
6787 case $GMSGFMT in
6788 [\\/]* | ?:[\\/]*)
252b5132
RH
6789 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
6790 ;;
252b5132 6791 *)
6840198f
NC
6792 ac_save_IFS=$IFS; IFS=$ac_path_separator
6793ac_dummy="$PATH"
6794for ac_dir in $ac_dummy; do
6795 IFS=$ac_save_IFS
6796 test -z "$ac_dir" && ac_dir=.
6797 if $as_executable_p "$ac_dir/$ac_word"; then
6798 ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
6799 break
6800fi
6801done
6802
252b5132
RH
6803 test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
6804 ;;
6805esac
6806fi
6840198f
NC
6807GMSGFMT=$ac_cv_path_GMSGFMT
6808
252b5132 6809if test -n "$GMSGFMT"; then
6840198f
NC
6810 echo "$as_me:6810: result: $GMSGFMT" >&5
6811echo "${ECHO_T}$GMSGFMT" >&6
252b5132 6812else
6840198f
NC
6813 echo "$as_me:6813: result: no" >&5
6814echo "${ECHO_T}no" >&6
252b5132
RH
6815fi
6816
6817 # Extract the first word of "xgettext", so it can be a program name with args.
6818set dummy xgettext; ac_word=$2
6840198f
NC
6819echo "$as_me:6819: checking for $ac_word" >&5
6820echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6821if test "${ac_cv_path_XGETTEXT+set}" = set; then
6822 echo $ECHO_N "(cached) $ECHO_C" >&6
252b5132
RH
6823else
6824 case "$XGETTEXT" in
6825 /*)
6826 ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
6827 ;;
6828 *)
6829 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
6830 for ac_dir in $PATH; do
6831 test -z "$ac_dir" && ac_dir=.
6832 if test -f $ac_dir/$ac_word; then
6833 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
6834 ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
6835 break
6836 fi
6837 fi
6838 done
6839 IFS="$ac_save_ifs"
6840 test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
6841 ;;
6842esac
6843fi
6844XGETTEXT="$ac_cv_path_XGETTEXT"
6845if test -n "$XGETTEXT"; then
6840198f
NC
6846 echo "$as_me:6846: result: $XGETTEXT" >&5
6847echo "${ECHO_T}$XGETTEXT" >&6
252b5132 6848else
6840198f
NC
6849 echo "$as_me:6849: result: no" >&5
6850echo "${ECHO_T}no" >&6
252b5132
RH
6851fi
6852
252b5132
RH
6853 USE_INCLUDED_LIBINTL=yes
6854 CATOBJEXT=.gmo
6855 INSTOBJEXT=.mo
6856 DATADIRNAME=share
6857 INTLDEPS='$(top_builddir)/../intl/libintl.a'
6858 INTLLIBS=$INTLDEPS
6859 LIBS=`echo $LIBS | sed -e 's/-lintl//'`
6860 nls_cv_header_intl=libintl.h
6861 nls_cv_header_libgt=libgettext.h
6862 fi
6863
6864 if test "$XGETTEXT" != ":"; then
6865 if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
6866 : ;
6867 else
6840198f
NC
6868 echo "$as_me:6868: result: found xgettext programs is not GNU xgettext; ignore it" >&5
6869echo "${ECHO_T}found xgettext programs is not GNU xgettext; ignore it" >&6
252b5132
RH
6870 XGETTEXT=":"
6871 fi
6872 fi
6873
6874 # We need to process the po/ directory.
6875 POSUB=po
6876 else
6877 DATADIRNAME=share
6878 nls_cv_header_intl=libintl.h
6879 nls_cv_header_libgt=libgettext.h
6880 fi
6881
6882 # If this is used in GNU gettext we have to set USE_NLS to `yes'
6883 # because some of the sources are only built for this goal.
6884 if test "$PACKAGE" = gettext; then
6885 USE_NLS=yes
6886 USE_INCLUDED_LIBINTL=yes
6887 fi
6888
6889 for lang in $ALL_LINGUAS; do
6890 GMOFILES="$GMOFILES $lang.gmo"
6891 POFILES="$POFILES $lang.po"
6892 done
6893
252b5132
RH
6894 if test "x$CATOBJEXT" != "x"; then
6895 if test "x$ALL_LINGUAS" = "x"; then
6896 LINGUAS=
6897 else
6840198f
NC
6898 echo "$as_me:6898: checking for catalogs to be installed" >&5
6899echo $ECHO_N "checking for catalogs to be installed... $ECHO_C" >&6
252b5132
RH
6900 NEW_LINGUAS=
6901 for lang in ${LINGUAS=$ALL_LINGUAS}; do
6902 case "$ALL_LINGUAS" in
6903 *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
6904 esac
6905 done
6906 LINGUAS=$NEW_LINGUAS
6840198f
NC
6907 echo "$as_me:6907: result: $LINGUAS" >&5
6908echo "${ECHO_T}$LINGUAS" >&6
252b5132
RH
6909 fi
6910
6911 if test -n "$LINGUAS"; then
6912 for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
6913 fi
6914 fi
6915
6916 if test $ac_cv_header_locale_h = yes; then
6917 INCLUDE_LOCALE_H="#include <locale.h>"
6918 else
6919 INCLUDE_LOCALE_H="\
6920/* The system does not provide the header <locale.h>. Take care yourself. */"
6921 fi
252b5132
RH
6922
6923 if test -f $srcdir/po2tbl.sed.in; then
6924 if test "$CATOBJEXT" = ".cat"; then
6840198f
NC
6925 echo "$as_me:6925: checking for linux/version.h" >&5
6926echo $ECHO_N "checking for linux/version.h... $ECHO_C" >&6
6927if test "${ac_cv_header_linux_version_h+set}" = set; then
6928 echo $ECHO_N "(cached) $ECHO_C" >&6
6929else
6930 cat >conftest.$ac_ext <<_ACEOF
6931#line 6931 "configure"
252b5132
RH
6932#include "confdefs.h"
6933#include <linux/version.h>
6840198f
NC
6934_ACEOF
6935if { (eval echo "$as_me:6935: \"$ac_cpp conftest.$ac_ext\"") >&5
6936 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6937 ac_status=$?
6938 egrep -v '^ *\+' conftest.er1 >conftest.err
6939 rm -f conftest.er1
6940 cat conftest.err >&5
6941 echo "$as_me:6941: \$? = $ac_status" >&5
6942 (exit $ac_status); } >/dev/null; then
6943 if test -s conftest.err; then
6944 ac_cpp_err=$ac_c_preproc_warn_flag
6945 else
6946 ac_cpp_err=
6947 fi
6948else
6949 ac_cpp_err=yes
6950fi
6951if test -z "$ac_cpp_err"; then
6952 ac_cv_header_linux_version_h=yes
252b5132 6953else
6840198f 6954 echo "$as_me: failed program was:" >&5
252b5132 6955 cat conftest.$ac_ext >&5
6840198f 6956 ac_cv_header_linux_version_h=no
252b5132 6957fi
6840198f 6958rm -f conftest.err conftest.$ac_ext
252b5132 6959fi
6840198f
NC
6960echo "$as_me:6960: result: $ac_cv_header_linux_version_h" >&5
6961echo "${ECHO_T}$ac_cv_header_linux_version_h" >&6
6962if test $ac_cv_header_linux_version_h = yes; then
252b5132
RH
6963 msgformat=linux
6964else
6840198f 6965 msgformat=xopen
252b5132
RH
6966fi
6967
252b5132
RH
6968 sed -e '/^#/d' $srcdir/$msgformat-msg.sed > po2msg.sed
6969 fi
6970 sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \
6971 $srcdir/po2tbl.sed.in > po2tbl.sed
6972 fi
6973
6974 if test "$PACKAGE" = "gettext"; then
6975 GT_NO="#NO#"
6976 GT_YES=
6977 else
6978 GT_NO=
6979 GT_YES="#YES#"
6980 fi
252b5132
RH
6981
6982 MKINSTALLDIRS="\$(srcdir)/../../mkinstalldirs"
252b5132
RH
6983
6984 l=
252b5132
RH
6985
6986 if test -d $srcdir/po; then
6987 test -d po || mkdir po
6988 if test "x$srcdir" != "x."; then
6989 if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
6990 posrcprefix="$srcdir/"
6991 else
6992 posrcprefix="../$srcdir/"
6993 fi
6994 else
6995 posrcprefix="../"
6996 fi
6997 rm -f po/POTFILES
6998 sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
6999 < $srcdir/po/POTFILES.in > po/POTFILES
7000 fi
252b5132 7001
6840198f
NC
7002echo "$as_me:7002: checking whether to enable maintainer-specific portions of Makefiles" >&5
7003echo $ECHO_N "checking whether to enable maintainer-specific portions of Makefiles... $ECHO_C" >&6
252b5132
RH
7004 # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
7005if test "${enable_maintainer_mode+set}" = set; then
7006 enableval="$enable_maintainer_mode"
7007 USE_MAINTAINER_MODE=$enableval
7008else
7009 USE_MAINTAINER_MODE=no
6840198f
NC
7010fi;
7011 echo "$as_me:7011: result: $USE_MAINTAINER_MODE" >&5
7012echo "${ECHO_T}$USE_MAINTAINER_MODE" >&6
252b5132
RH
7013
7014if test $USE_MAINTAINER_MODE = yes; then
7015 MAINTAINER_MODE_TRUE=
7016 MAINTAINER_MODE_FALSE='#'
7017else
7018 MAINTAINER_MODE_TRUE='#'
7019 MAINTAINER_MODE_FALSE=
7020fi
7021 MAINT=$MAINTAINER_MODE_TRUE
252b5132 7022
6840198f
NC
7023for ac_header in string.h stdlib.h memory.h strings.h unistd.h stdarg.h varargs.h errno.h sys/types.h
7024do
7025ac_ac_Header=`echo "ac_cv_header_$ac_header" | $ac_tr_sh`
7026echo "$as_me:7026: checking for $ac_header" >&5
7027echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7028if eval "test \"\${$ac_ac_Header+set}\" = set"; then
7029 echo $ECHO_N "(cached) $ECHO_C" >&6
7030else
7031 cat >conftest.$ac_ext <<_ACEOF
7032#line 7032 "configure"
7033#include "confdefs.h"
7034#include <$ac_header>
7035_ACEOF
7036if { (eval echo "$as_me:7036: \"$ac_cpp conftest.$ac_ext\"") >&5
7037 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7038 ac_status=$?
7039 egrep -v '^ *\+' conftest.er1 >conftest.err
7040 rm -f conftest.er1
7041 cat conftest.err >&5
7042 echo "$as_me:7042: \$? = $ac_status" >&5
7043 (exit $ac_status); } >/dev/null; then
7044 if test -s conftest.err; then
7045 ac_cpp_err=$ac_c_preproc_warn_flag
252b5132 7046 else
6840198f 7047 ac_cpp_err=
252b5132 7048 fi
6840198f
NC
7049else
7050 ac_cpp_err=yes
252b5132 7051fi
6840198f
NC
7052if test -z "$ac_cpp_err"; then
7053 eval "$ac_ac_Header=yes"
252b5132 7054else
6840198f 7055 echo "$as_me: failed program was:" >&5
252b5132 7056 cat conftest.$ac_ext >&5
6840198f 7057 eval "$ac_ac_Header=no"
252b5132 7058fi
6840198f 7059rm -f conftest.err conftest.$ac_ext
252b5132 7060fi
6840198f
NC
7061echo "$as_me:7061: result: `eval echo '${'$ac_ac_Header'}'`" >&5
7062echo "${ECHO_T}`eval echo '${'$ac_ac_Header'}'`" >&6
7063if test `eval echo '${'$ac_ac_Header'}'` = yes; then
7064 cat >>confdefs.h <<EOF
7065#define `echo "HAVE_$ac_header" | $ac_tr_cpp` 1
252b5132 7066EOF
6840198f 7067
252b5132
RH
7068fi
7069done
7070
252b5132
RH
7071# Put this here so that autoconf's "cross-compiling" message doesn't confuse
7072# people who are not cross-compiling but are compiling cross-assemblers.
6840198f
NC
7073echo "$as_me:7073: checking whether compiling a cross-assembler" >&5
7074echo $ECHO_N "checking whether compiling a cross-assembler... $ECHO_C" >&6
252b5132
RH
7075if test "${host}" = "${target}"; then
7076 cross_gas=no
7077else
7078 cross_gas=yes
6840198f
NC
7079
7080cat >>confdefs.h <<\EOF
252b5132
RH
7081#define CROSS_COMPILE 1
7082EOF
7083
7084fi
6840198f
NC
7085echo "$as_me:7085: result: $cross_gas" >&5
7086echo "${ECHO_T}$cross_gas" >&6
252b5132
RH
7087
7088# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
7089# for constant arguments. Useless!
6840198f
NC
7090echo "$as_me:7090: checking for working alloca.h" >&5
7091echo $ECHO_N "checking for working alloca.h... $ECHO_C" >&6
7092if test "${ac_cv_working_alloca_h+set}" = set; then
7093 echo $ECHO_N "(cached) $ECHO_C" >&6
252b5132 7094else
6840198f
NC
7095 cat >conftest.$ac_ext <<_ACEOF
7096#line 7096 "configure"
252b5132
RH
7097#include "confdefs.h"
7098#include <alloca.h>
6840198f
NC
7099int
7100main ()
7101{
7102char *p = (char *) alloca (2 * sizeof (int));
7103 ;
7104 return 0;
7105}
7106_ACEOF
7107rm -f conftest.$ac_objext conftest$ac_exeext
7108if { (eval echo "$as_me:7108: \"$ac_link\"") >&5
7109 (eval $ac_link) 2>&5
7110 ac_status=$?
7111 echo "$as_me:7111: \$? = $ac_status" >&5
7112 (exit $ac_status); } &&
7113 { ac_try='test -s conftest$ac_exeext'
7114 { (eval echo "$as_me:7114: \"$ac_try\"") >&5
7115 (eval $ac_try) 2>&5
7116 ac_status=$?
7117 echo "$as_me:7117: \$? = $ac_status" >&5
7118 (exit $ac_status); }; }; then
7119 ac_cv_working_alloca_h=yes
7120else
7121 echo "$as_me: failed program was:" >&5
7122cat conftest.$ac_ext >&5
7123ac_cv_working_alloca_h=no
7124fi
7125rm -f conftest$ac_exeext conftest.$ac_ext
7126fi
7127echo "$as_me:7127: result: $ac_cv_working_alloca_h" >&5
7128echo "${ECHO_T}$ac_cv_working_alloca_h" >&6
7129if test $ac_cv_working_alloca_h = yes; then
7130
7131cat >>confdefs.h <<\EOF
252b5132
RH
7132#define HAVE_ALLOCA_H 1
7133EOF
7134
7135fi
7136
6840198f
NC
7137echo "$as_me:7137: checking for alloca" >&5
7138echo $ECHO_N "checking for alloca... $ECHO_C" >&6
7139if test "${ac_cv_func_alloca_works+set}" = set; then
7140 echo $ECHO_N "(cached) $ECHO_C" >&6
252b5132 7141else
6840198f
NC
7142 cat >conftest.$ac_ext <<_ACEOF
7143#line 7143 "configure"
252b5132 7144#include "confdefs.h"
252b5132
RH
7145#ifdef __GNUC__
7146# define alloca __builtin_alloca
7147#else
7148# ifdef _MSC_VER
7149# include <malloc.h>
7150# define alloca _alloca
7151# else
7152# if HAVE_ALLOCA_H
7153# include <alloca.h>
7154# else
7155# ifdef _AIX
7156 #pragma alloca
7157# else
7158# ifndef alloca /* predefined by HP cc +Olibcalls */
7159char *alloca ();
7160# endif
7161# endif
7162# endif
7163# endif
7164#endif
7165
6840198f
NC
7166int
7167main ()
7168{
7169char *p = (char *) alloca (1);
7170 ;
7171 return 0;
7172}
7173_ACEOF
7174rm -f conftest.$ac_objext conftest$ac_exeext
7175if { (eval echo "$as_me:7175: \"$ac_link\"") >&5
7176 (eval $ac_link) 2>&5
7177 ac_status=$?
7178 echo "$as_me:7178: \$? = $ac_status" >&5
7179 (exit $ac_status); } &&
7180 { ac_try='test -s conftest$ac_exeext'
7181 { (eval echo "$as_me:7181: \"$ac_try\"") >&5
7182 (eval $ac_try) 2>&5
7183 ac_status=$?
7184 echo "$as_me:7184: \$? = $ac_status" >&5
7185 (exit $ac_status); }; }; then
252b5132
RH
7186 ac_cv_func_alloca_works=yes
7187else
6840198f
NC
7188 echo "$as_me: failed program was:" >&5
7189cat conftest.$ac_ext >&5
7190ac_cv_func_alloca_works=no
252b5132 7191fi
6840198f 7192rm -f conftest$ac_exeext conftest.$ac_ext
252b5132 7193fi
6840198f
NC
7194echo "$as_me:7194: result: $ac_cv_func_alloca_works" >&5
7195echo "${ECHO_T}$ac_cv_func_alloca_works" >&6
252b5132 7196
252b5132 7197if test $ac_cv_func_alloca_works = yes; then
6840198f
NC
7198
7199cat >>confdefs.h <<\EOF
252b5132
RH
7200#define HAVE_ALLOCA 1
7201EOF
7202
6840198f 7203else
252b5132 7204 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
6840198f
NC
7205# that cause trouble. Some versions do not even contain alloca or
7206# contain a buggy version. If you still want to use their alloca,
7207# use ar to extract alloca.o from them instead of compiling alloca.c.
7208
7209ALLOCA=alloca.$ac_objext
7210
7211cat >>confdefs.h <<\EOF
252b5132
RH
7212#define C_ALLOCA 1
7213EOF
7214
6840198f
NC
7215echo "$as_me:7215: checking whether \`alloca.c' needs Cray hooks" >&5
7216echo $ECHO_N "checking whether \`alloca.c' needs Cray hooks... $ECHO_C" >&6
7217if test "${ac_cv_os_cray+set}" = set; then
7218 echo $ECHO_N "(cached) $ECHO_C" >&6
252b5132 7219else
6840198f
NC
7220 cat >conftest.$ac_ext <<_ACEOF
7221#line 7221 "configure"
252b5132
RH
7222#include "confdefs.h"
7223#if defined(CRAY) && ! defined(CRAY2)
7224webecray
7225#else
7226wenotbecray
7227#endif
7228
6840198f 7229_ACEOF
252b5132
RH
7230if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7231 egrep "webecray" >/dev/null 2>&1; then
252b5132
RH
7232 ac_cv_os_cray=yes
7233else
252b5132
RH
7234 ac_cv_os_cray=no
7235fi
7236rm -f conftest*
7237
7238fi
6840198f
NC
7239echo "$as_me:7239: result: $ac_cv_os_cray" >&5
7240echo "${ECHO_T}$ac_cv_os_cray" >&6
252b5132 7241if test $ac_cv_os_cray = yes; then
6840198f
NC
7242 for ac_func in _getb67 GETB67 getb67; do
7243 ac_ac_var=`echo "ac_cv_func_$ac_func" | $ac_tr_sh`
7244echo "$as_me:7244: checking for $ac_func" >&5
7245echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
7246if eval "test \"\${$ac_ac_var+set}\" = set"; then
7247 echo $ECHO_N "(cached) $ECHO_C" >&6
7248else
7249 cat >conftest.$ac_ext <<_ACEOF
7250#line 7250 "configure"
252b5132
RH
7251#include "confdefs.h"
7252/* System header to define __stub macros and hopefully few prototypes,
6840198f 7253 which can conflict with char $ac_func (); below. */
252b5132
RH
7254#include <assert.h>
7255/* Override any gcc2 internal prototype to avoid an error. */
6840198f
NC
7256#ifdef __cplusplus
7257extern "C"
7258#endif
252b5132 7259/* We use char because int might match the return type of a gcc2
6840198f
NC
7260 builtin and then its argument prototype would still apply. */
7261char $ac_func ();
7262char (*f) ();
252b5132 7263
6840198f
NC
7264int
7265main ()
7266{
252b5132
RH
7267/* The GNU C library defines this for functions which it implements
7268 to always fail with ENOSYS. Some functions are actually named
7269 something starting with __ and the normal name is an alias. */
7270#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7271choke me
7272#else
6840198f 7273f = $ac_func;
252b5132
RH
7274#endif
7275
6840198f
NC
7276 ;
7277 return 0;
7278}
7279_ACEOF
7280rm -f conftest.$ac_objext conftest$ac_exeext
7281if { (eval echo "$as_me:7281: \"$ac_link\"") >&5
7282 (eval $ac_link) 2>&5
7283 ac_status=$?
7284 echo "$as_me:7284: \$? = $ac_status" >&5
7285 (exit $ac_status); } &&
7286 { ac_try='test -s conftest$ac_exeext'
7287 { (eval echo "$as_me:7287: \"$ac_try\"") >&5
7288 (eval $ac_try) 2>&5
7289 ac_status=$?
7290 echo "$as_me:7290: \$? = $ac_status" >&5
7291 (exit $ac_status); }; }; then
7292 eval "$ac_ac_var=yes"
7293else
7294 echo "$as_me: failed program was:" >&5
7295cat conftest.$ac_ext >&5
7296eval "$ac_ac_var=no"
7297fi
7298rm -f conftest$ac_exeext conftest.$ac_ext
7299fi
7300echo "$as_me:7300: result: `eval echo '${'$ac_ac_var'}'`" >&5
7301echo "${ECHO_T}`eval echo '${'$ac_ac_var'}'`" >&6
7302if test `eval echo '${'$ac_ac_var'}'` = yes; then
7303
7304cat >>confdefs.h <<EOF
252b5132
RH
7305#define CRAY_STACKSEG_END $ac_func
7306EOF
7307
6840198f 7308 break
252b5132
RH
7309fi
7310
6840198f 7311 done
252b5132
RH
7312fi
7313
6840198f
NC
7314echo "$as_me:7314: checking stack direction for C alloca" >&5
7315echo $ECHO_N "checking stack direction for C alloca... $ECHO_C" >&6
7316if test "${ac_cv_c_stack_direction+set}" = set; then
7317 echo $ECHO_N "(cached) $ECHO_C" >&6
252b5132
RH
7318else
7319 if test "$cross_compiling" = yes; then
7320 ac_cv_c_stack_direction=0
7321else
6840198f
NC
7322 cat >conftest.$ac_ext <<_ACEOF
7323#line 7323 "configure"
252b5132 7324#include "confdefs.h"
6840198f 7325int
252b5132
RH
7326find_stack_direction ()
7327{
7328 static char *addr = 0;
7329 auto char dummy;
7330 if (addr == 0)
7331 {
7332 addr = &dummy;
7333 return find_stack_direction ();
7334 }
7335 else
7336 return (&dummy > addr) ? 1 : -1;
7337}
6840198f
NC
7338
7339int
252b5132
RH
7340main ()
7341{
6840198f 7342 exit (find_stack_direction () < 0);
252b5132 7343}
6840198f
NC
7344_ACEOF
7345rm -f conftest$ac_exeext
7346if { (eval echo "$as_me:7346: \"$ac_link\"") >&5
7347 (eval $ac_link) 2>&5
7348 ac_status=$?
7349 echo "$as_me:7349: \$? = $ac_status" >&5
7350 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7351 { (eval echo "$as_me:7351: \"$ac_try\"") >&5
7352 (eval $ac_try) 2>&5
7353 ac_status=$?
7354 echo "$as_me:7354: \$? = $ac_status" >&5
7355 (exit $ac_status); }; }; then
252b5132
RH
7356 ac_cv_c_stack_direction=1
7357else
6840198f
NC
7358 echo "$as_me: program exited with status $ac_status" >&5
7359echo "$as_me: failed program was:" >&5
7360cat conftest.$ac_ext >&5
7361ac_cv_c_stack_direction=-1
252b5132 7362fi
6840198f 7363rm -f conftest$ac_exeext conftest.$ac_ext
252b5132 7364fi
252b5132 7365fi
6840198f
NC
7366echo "$as_me:7366: result: $ac_cv_c_stack_direction" >&5
7367echo "${ECHO_T}$ac_cv_c_stack_direction" >&6
252b5132 7368
6840198f 7369cat >>confdefs.h <<EOF
252b5132
RH
7370#define STACK_DIRECTION $ac_cv_c_stack_direction
7371EOF
7372
7373fi
7374
6840198f
NC
7375echo "$as_me:7375: checking for inline" >&5
7376echo $ECHO_N "checking for inline... $ECHO_C" >&6
7377if test "${ac_cv_c_inline+set}" = set; then
7378 echo $ECHO_N "(cached) $ECHO_C" >&6
252b5132
RH
7379else
7380 ac_cv_c_inline=no
7381for ac_kw in inline __inline__ __inline; do
6840198f
NC
7382 cat >conftest.$ac_ext <<_ACEOF
7383#line 7383 "configure"
252b5132 7384#include "confdefs.h"
6840198f
NC
7385#ifndef __cplusplus
7386static $ac_kw int static_foo () {return 0; }
7387$ac_kw int foo () {return 0; }
7388#endif
252b5132 7389
6840198f
NC
7390_ACEOF
7391rm -f conftest.$ac_objext
7392if { (eval echo "$as_me:7392: \"$ac_compile\"") >&5
7393 (eval $ac_compile) 2>&5
7394 ac_status=$?
7395 echo "$as_me:7395: \$? = $ac_status" >&5
7396 (exit $ac_status); } &&
7397 { ac_try='test -s conftest.$ac_objext'
7398 { (eval echo "$as_me:7398: \"$ac_try\"") >&5
7399 (eval $ac_try) 2>&5
7400 ac_status=$?
7401 echo "$as_me:7401: \$? = $ac_status" >&5
7402 (exit $ac_status); }; }; then
252b5132
RH
7403 ac_cv_c_inline=$ac_kw; break
7404else
6840198f
NC
7405 echo "$as_me: failed program was:" >&5
7406cat conftest.$ac_ext >&5
252b5132 7407fi
6840198f 7408rm -f conftest.$ac_objext conftest.$ac_ext
252b5132
RH
7409done
7410
7411fi
6840198f
NC
7412echo "$as_me:7412: result: $ac_cv_c_inline" >&5
7413echo "${ECHO_T}$ac_cv_c_inline" >&6
7414case $ac_cv_c_inline in
252b5132 7415 inline | yes) ;;
6840198f
NC
7416 no)
7417cat >>confdefs.h <<\EOF
7418#define inline
252b5132
RH
7419EOF
7420 ;;
6840198f 7421 *) cat >>confdefs.h <<EOF
252b5132
RH
7422#define inline $ac_cv_c_inline
7423EOF
7424 ;;
7425esac
7426
252b5132 7427# VMS doesn't have unlink.
6840198f 7428
252b5132
RH
7429for ac_func in unlink remove
7430do
6840198f
NC
7431ac_ac_var=`echo "ac_cv_func_$ac_func" | $ac_tr_sh`
7432echo "$as_me:7432: checking for $ac_func" >&5
7433echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
7434if eval "test \"\${$ac_ac_var+set}\" = set"; then
7435 echo $ECHO_N "(cached) $ECHO_C" >&6
7436else
7437 cat >conftest.$ac_ext <<_ACEOF
7438#line 7438 "configure"
252b5132
RH
7439#include "confdefs.h"
7440/* System header to define __stub macros and hopefully few prototypes,
6840198f 7441 which can conflict with char $ac_func (); below. */
252b5132
RH
7442#include <assert.h>
7443/* Override any gcc2 internal prototype to avoid an error. */
6840198f
NC
7444#ifdef __cplusplus
7445extern "C"
7446#endif
252b5132 7447/* We use char because int might match the return type of a gcc2
6840198f
NC
7448 builtin and then its argument prototype would still apply. */
7449char $ac_func ();
7450char (*f) ();
252b5132 7451
6840198f
NC
7452int
7453main ()
7454{
252b5132
RH
7455/* The GNU C library defines this for functions which it implements
7456 to always fail with ENOSYS. Some functions are actually named
7457 something starting with __ and the normal name is an alias. */
7458#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7459choke me
7460#else
6840198f 7461f = $ac_func;
252b5132
RH
7462#endif
7463
6840198f
NC
7464 ;
7465 return 0;
7466}
7467_ACEOF
7468rm -f conftest.$ac_objext conftest$ac_exeext
7469if { (eval echo "$as_me:7469: \"$ac_link\"") >&5
7470 (eval $ac_link) 2>&5
7471 ac_status=$?
7472 echo "$as_me:7472: \$? = $ac_status" >&5
7473 (exit $ac_status); } &&
7474 { ac_try='test -s conftest$ac_exeext'
7475 { (eval echo "$as_me:7475: \"$ac_try\"") >&5
7476 (eval $ac_try) 2>&5
7477 ac_status=$?
7478 echo "$as_me:7478: \$? = $ac_status" >&5
7479 (exit $ac_status); }; }; then
7480 eval "$ac_ac_var=yes"
7481else
7482 echo "$as_me: failed program was:" >&5
7483cat conftest.$ac_ext >&5
7484eval "$ac_ac_var=no"
7485fi
7486rm -f conftest$ac_exeext conftest.$ac_ext
7487fi
7488echo "$as_me:7488: result: `eval echo '${'$ac_ac_var'}'`" >&5
7489echo "${ECHO_T}`eval echo '${'$ac_ac_var'}'`" >&6
7490if test `eval echo '${'$ac_ac_var'}'` = yes; then
7491 cat >>confdefs.h <<EOF
7492#define `echo "HAVE_$ac_func" | $ac_tr_cpp` 1
252b5132
RH
7493EOF
7494 break
252b5132
RH
7495fi
7496done
7497
252b5132 7498# Some systems don't have sbrk().
6840198f 7499
252b5132
RH
7500for ac_func in sbrk
7501do
6840198f
NC
7502ac_ac_var=`echo "ac_cv_func_$ac_func" | $ac_tr_sh`
7503echo "$as_me:7503: checking for $ac_func" >&5
7504echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
7505if eval "test \"\${$ac_ac_var+set}\" = set"; then
7506 echo $ECHO_N "(cached) $ECHO_C" >&6
7507else
7508 cat >conftest.$ac_ext <<_ACEOF
7509#line 7509 "configure"
252b5132
RH
7510#include "confdefs.h"
7511/* System header to define __stub macros and hopefully few prototypes,
6840198f 7512 which can conflict with char $ac_func (); below. */
252b5132
RH
7513#include <assert.h>
7514/* Override any gcc2 internal prototype to avoid an error. */
6840198f
NC
7515#ifdef __cplusplus
7516extern "C"
7517#endif
252b5132 7518/* We use char because int might match the return type of a gcc2
6840198f
NC
7519 builtin and then its argument prototype would still apply. */
7520char $ac_func ();
7521char (*f) ();
252b5132 7522
6840198f
NC
7523int
7524main ()
7525{
252b5132
RH
7526/* The GNU C library defines this for functions which it implements
7527 to always fail with ENOSYS. Some functions are actually named
7528 something starting with __ and the normal name is an alias. */
7529#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7530choke me
7531#else
6840198f 7532f = $ac_func;
252b5132
RH
7533#endif
7534
6840198f
NC
7535 ;
7536 return 0;
7537}
7538_ACEOF
7539rm -f conftest.$ac_objext conftest$ac_exeext
7540if { (eval echo "$as_me:7540: \"$ac_link\"") >&5
7541 (eval $ac_link) 2>&5
7542 ac_status=$?
7543 echo "$as_me:7543: \$? = $ac_status" >&5
7544 (exit $ac_status); } &&
7545 { ac_try='test -s conftest$ac_exeext'
7546 { (eval echo "$as_me:7546: \"$ac_try\"") >&5
7547 (eval $ac_try) 2>&5
7548 ac_status=$?
7549 echo "$as_me:7549: \$? = $ac_status" >&5
7550 (exit $ac_status); }; }; then
7551 eval "$ac_ac_var=yes"
7552else
7553 echo "$as_me: failed program was:" >&5
7554cat conftest.$ac_ext >&5
7555eval "$ac_ac_var=no"
7556fi
7557rm -f conftest$ac_exeext conftest.$ac_ext
7558fi
7559echo "$as_me:7559: result: `eval echo '${'$ac_ac_var'}'`" >&5
7560echo "${ECHO_T}`eval echo '${'$ac_ac_var'}'`" >&6
7561if test `eval echo '${'$ac_ac_var'}'` = yes; then
7562 cat >>confdefs.h <<EOF
7563#define `echo "HAVE_$ac_func" | $ac_tr_cpp` 1
252b5132 7564EOF
252b5132 7565
252b5132
RH
7566fi
7567done
7568
39bec121
TW
7569# do we need the math library?
7570case "${need_libm}" in
6840198f 7571yes)
39bec121 7572 LIBM=
f9c19112 7573case $host in
d64552c5 7574*-*-beos* | *-*-cygwin* | *-*-pw32*)
39bec121
TW
7575 # These system don't have libm
7576 ;;
7577*-ncr-sysv4.3*)
6840198f
NC
7578 echo "$as_me:7578: checking for _mwvalidcheckl in -lmw" >&5
7579echo $ECHO_N "checking for _mwvalidcheckl in -lmw... $ECHO_C" >&6
7580if test "${ac_cv_lib_mw__mwvalidcheckl+set}" = set; then
7581 echo $ECHO_N "(cached) $ECHO_C" >&6
39bec121 7582else
6840198f 7583 ac_check_lib_save_LIBS=$LIBS
39bec121 7584LIBS="-lmw $LIBS"
6840198f
NC
7585cat >conftest.$ac_ext <<_ACEOF
7586#line 7586 "configure"
39bec121 7587#include "confdefs.h"
6840198f 7588
39bec121 7589/* Override any gcc2 internal prototype to avoid an error. */
6840198f
NC
7590#ifdef __cplusplus
7591extern "C"
7592#endif
39bec121 7593/* We use char because int might match the return type of a gcc2
6840198f
NC
7594 builtin and then its argument prototype would still apply. */
7595char _mwvalidcheckl ();
7596int
7597main ()
7598{
7599_mwvalidcheckl ();
7600 ;
7601 return 0;
7602}
7603_ACEOF
7604rm -f conftest.$ac_objext conftest$ac_exeext
7605if { (eval echo "$as_me:7605: \"$ac_link\"") >&5
7606 (eval $ac_link) 2>&5
7607 ac_status=$?
7608 echo "$as_me:7608: \$? = $ac_status" >&5
7609 (exit $ac_status); } &&
7610 { ac_try='test -s conftest$ac_exeext'
7611 { (eval echo "$as_me:7611: \"$ac_try\"") >&5
7612 (eval $ac_try) 2>&5
7613 ac_status=$?
7614 echo "$as_me:7614: \$? = $ac_status" >&5
7615 (exit $ac_status); }; }; then
7616 ac_cv_lib_mw__mwvalidcheckl=yes
7617else
7618 echo "$as_me: failed program was:" >&5
7619cat conftest.$ac_ext >&5
7620ac_cv_lib_mw__mwvalidcheckl=no
7621fi
7622rm -f conftest$ac_exeext conftest.$ac_ext
7623LIBS=$ac_check_lib_save_LIBS
7624fi
7625echo "$as_me:7625: result: $ac_cv_lib_mw__mwvalidcheckl" >&5
7626echo "${ECHO_T}$ac_cv_lib_mw__mwvalidcheckl" >&6
7627if test $ac_cv_lib_mw__mwvalidcheckl = yes; then
39bec121 7628 LIBM="-lmw"
39bec121
TW
7629fi
7630
6840198f
NC
7631 echo "$as_me:7631: checking for main in -lm" >&5
7632echo $ECHO_N "checking for main in -lm... $ECHO_C" >&6
7633if test "${ac_cv_lib_m_main+set}" = set; then
7634 echo $ECHO_N "(cached) $ECHO_C" >&6
39bec121 7635else
6840198f 7636 ac_check_lib_save_LIBS=$LIBS
39bec121 7637LIBS="-lm $LIBS"
6840198f
NC
7638cat >conftest.$ac_ext <<_ACEOF
7639#line 7639 "configure"
39bec121
TW
7640#include "confdefs.h"
7641
6840198f
NC
7642int
7643main ()
7644{
7645main ();
7646 ;
7647 return 0;
7648}
7649_ACEOF
7650rm -f conftest.$ac_objext conftest$ac_exeext
7651if { (eval echo "$as_me:7651: \"$ac_link\"") >&5
7652 (eval $ac_link) 2>&5
7653 ac_status=$?
7654 echo "$as_me:7654: \$? = $ac_status" >&5
7655 (exit $ac_status); } &&
7656 { ac_try='test -s conftest$ac_exeext'
7657 { (eval echo "$as_me:7657: \"$ac_try\"") >&5
7658 (eval $ac_try) 2>&5
7659 ac_status=$?
7660 echo "$as_me:7660: \$? = $ac_status" >&5
7661 (exit $ac_status); }; }; then
7662 ac_cv_lib_m_main=yes
7663else
7664 echo "$as_me: failed program was:" >&5
7665cat conftest.$ac_ext >&5
7666ac_cv_lib_m_main=no
7667fi
7668rm -f conftest$ac_exeext conftest.$ac_ext
7669LIBS=$ac_check_lib_save_LIBS
7670fi
7671echo "$as_me:7671: result: $ac_cv_lib_m_main" >&5
7672echo "${ECHO_T}$ac_cv_lib_m_main" >&6
7673if test $ac_cv_lib_m_main = yes; then
39bec121 7674 LIBM="$LIBM -lm"
39bec121
TW
7675fi
7676
7677 ;;
7678*)
6840198f
NC
7679 echo "$as_me:7679: checking for main in -lm" >&5
7680echo $ECHO_N "checking for main in -lm... $ECHO_C" >&6
7681if test "${ac_cv_lib_m_main+set}" = set; then
7682 echo $ECHO_N "(cached) $ECHO_C" >&6
39bec121 7683else
6840198f 7684 ac_check_lib_save_LIBS=$LIBS
39bec121 7685LIBS="-lm $LIBS"
6840198f
NC
7686cat >conftest.$ac_ext <<_ACEOF
7687#line 7687 "configure"
39bec121
TW
7688#include "confdefs.h"
7689
6840198f
NC
7690int
7691main ()
7692{
7693main ();
7694 ;
7695 return 0;
7696}
7697_ACEOF
7698rm -f conftest.$ac_objext conftest$ac_exeext
7699if { (eval echo "$as_me:7699: \"$ac_link\"") >&5
7700 (eval $ac_link) 2>&5
7701 ac_status=$?
7702 echo "$as_me:7702: \$? = $ac_status" >&5
7703 (exit $ac_status); } &&
7704 { ac_try='test -s conftest$ac_exeext'
7705 { (eval echo "$as_me:7705: \"$ac_try\"") >&5
7706 (eval $ac_try) 2>&5
7707 ac_status=$?
7708 echo "$as_me:7708: \$? = $ac_status" >&5
7709 (exit $ac_status); }; }; then
7710 ac_cv_lib_m_main=yes
7711else
7712 echo "$as_me: failed program was:" >&5
7713cat conftest.$ac_ext >&5
7714ac_cv_lib_m_main=no
7715fi
7716rm -f conftest$ac_exeext conftest.$ac_ext
7717LIBS=$ac_check_lib_save_LIBS
7718fi
7719echo "$as_me:7719: result: $ac_cv_lib_m_main" >&5
7720echo "${ECHO_T}$ac_cv_lib_m_main" >&6
7721if test $ac_cv_lib_m_main = yes; then
39bec121 7722 LIBM="-lm"
39bec121
TW
7723fi
7724
7725 ;;
7726esac
7727
39bec121
TW
7728 ;;
7729esac
7730
252b5132
RH
7731# Some non-ANSI preprocessors botch requoting inside strings. That's bad
7732# enough, but on some of those systems, the assert macro relies on requoting
7733# working properly!
6840198f
NC
7734echo "$as_me:7734: checking for working assert macro" >&5
7735echo $ECHO_N "checking for working assert macro... $ECHO_C" >&6
7736if test "${gas_cv_assert_ok+set}" = set; then
7737 echo $ECHO_N "(cached) $ECHO_C" >&6
252b5132 7738else
6840198f
NC
7739 cat >conftest.$ac_ext <<_ACEOF
7740#line 7740 "configure"
252b5132
RH
7741#include "confdefs.h"
7742#include <assert.h>
7743#include <stdio.h>
6840198f
NC
7744int
7745main ()
7746{
252b5132
RH
7747
7748/* check for requoting problems */
7749static int a, b, c, d;
7750static char *s;
7751assert (!strcmp(s, "foo bar baz quux"));
7752/* check for newline handling */
7753assert (a == b
7754 || c == d);
7755
6840198f
NC
7756 ;
7757 return 0;
7758}
7759_ACEOF
7760rm -f conftest.$ac_objext conftest$ac_exeext
7761if { (eval echo "$as_me:7761: \"$ac_link\"") >&5
7762 (eval $ac_link) 2>&5
7763 ac_status=$?
7764 echo "$as_me:7764: \$? = $ac_status" >&5
7765 (exit $ac_status); } &&
7766 { ac_try='test -s conftest$ac_exeext'
7767 { (eval echo "$as_me:7767: \"$ac_try\"") >&5
7768 (eval $ac_try) 2>&5
7769 ac_status=$?
7770 echo "$as_me:7770: \$? = $ac_status" >&5
7771 (exit $ac_status); }; }; then
252b5132
RH
7772 gas_cv_assert_ok=yes
7773else
6840198f
NC
7774 echo "$as_me: failed program was:" >&5
7775cat conftest.$ac_ext >&5
7776gas_cv_assert_ok=no
252b5132 7777fi
6840198f 7778rm -f conftest$ac_exeext conftest.$ac_ext
252b5132 7779fi
6840198f
NC
7780echo "$as_me:7780: result: $gas_cv_assert_ok" >&5
7781echo "${ECHO_T}$gas_cv_assert_ok" >&6
7782test $gas_cv_assert_ok = yes ||
7783cat >>confdefs.h <<\EOF
252b5132
RH
7784#define BROKEN_ASSERT 1
7785EOF
7786
252b5132
RH
7787# On some systems, the system header files may not declare malloc, realloc,
7788# and free. There are places where gas needs these functions to have been
7789# declared -- such as when taking their addresses.
7790gas_test_headers="
7791#ifdef HAVE_MEMORY_H
7792#include <memory.h>
7793#endif
7794#ifdef HAVE_STRING_H
7795#include <string.h>
7796#else
7797#ifdef HAVE_STRINGS_H
7798#include <strings.h>
7799#endif
7800#endif
7801#ifdef HAVE_STDLIB_H
7802#include <stdlib.h>
7803#endif
7804#ifdef HAVE_UNISTD_H
7805#include <unistd.h>
7806#endif
7807"
7808
6840198f
NC
7809echo "$as_me:7809: checking whether declaration is required for strstr" >&5
7810echo $ECHO_N "checking whether declaration is required for strstr... $ECHO_C" >&6
7811if test "${gas_cv_decl_needed_strstr+set}" = set; then
7812 echo $ECHO_N "(cached) $ECHO_C" >&6
252b5132 7813else
6840198f
NC
7814 cat >conftest.$ac_ext <<_ACEOF
7815#line 7815 "configure"
252b5132
RH
7816#include "confdefs.h"
7817$gas_test_headers
6840198f
NC
7818int
7819main ()
7820{
252b5132
RH
7821
7822typedef char *(*f)();
7823f x;
7824x = (f) strstr;
7825
6840198f
NC
7826 ;
7827 return 0;
7828}
7829_ACEOF
7830rm -f conftest.$ac_objext conftest$ac_exeext
7831if { (eval echo "$as_me:7831: \"$ac_link\"") >&5
7832 (eval $ac_link) 2>&5
7833 ac_status=$?
7834 echo "$as_me:7834: \$? = $ac_status" >&5
7835 (exit $ac_status); } &&
7836 { ac_try='test -s conftest$ac_exeext'
7837 { (eval echo "$as_me:7837: \"$ac_try\"") >&5
7838 (eval $ac_try) 2>&5
7839 ac_status=$?
7840 echo "$as_me:7840: \$? = $ac_status" >&5
7841 (exit $ac_status); }; }; then
252b5132
RH
7842 gas_cv_decl_needed_strstr=no
7843else
6840198f
NC
7844 echo "$as_me: failed program was:" >&5
7845cat conftest.$ac_ext >&5
7846gas_cv_decl_needed_strstr=yes
252b5132 7847fi
6840198f 7848rm -f conftest$ac_exeext conftest.$ac_ext
252b5132 7849fi
6840198f
NC
7850echo "$as_me:7850: result: $gas_cv_decl_needed_strstr" >&5
7851echo "${ECHO_T}$gas_cv_decl_needed_strstr" >&6
252b5132 7852if test $gas_cv_decl_needed_strstr = yes; then
6840198f
NC
7853
7854cat >>confdefs.h <<\EOF
252b5132
RH
7855#define NEED_DECLARATION_STRSTR 1
7856EOF
7857
7858fi
7859
6840198f
NC
7860echo "$as_me:7860: checking whether declaration is required for malloc" >&5
7861echo $ECHO_N "checking whether declaration is required for malloc... $ECHO_C" >&6
7862if test "${gas_cv_decl_needed_malloc+set}" = set; then
7863 echo $ECHO_N "(cached) $ECHO_C" >&6
252b5132 7864else
6840198f
NC
7865 cat >conftest.$ac_ext <<_ACEOF
7866#line 7866 "configure"
252b5132
RH
7867#include "confdefs.h"
7868$gas_test_headers
6840198f
NC
7869int
7870main ()
7871{
252b5132
RH
7872
7873typedef char *(*f)();
7874f x;
7875x = (f) malloc;
7876
6840198f
NC
7877 ;
7878 return 0;
7879}
7880_ACEOF
7881rm -f conftest.$ac_objext conftest$ac_exeext
7882if { (eval echo "$as_me:7882: \"$ac_link\"") >&5
7883 (eval $ac_link) 2>&5
7884 ac_status=$?
7885 echo "$as_me:7885: \$? = $ac_status" >&5
7886 (exit $ac_status); } &&
7887 { ac_try='test -s conftest$ac_exeext'
7888 { (eval echo "$as_me:7888: \"$ac_try\"") >&5
7889 (eval $ac_try) 2>&5
7890 ac_status=$?
7891 echo "$as_me:7891: \$? = $ac_status" >&5
7892 (exit $ac_status); }; }; then
252b5132
RH
7893 gas_cv_decl_needed_malloc=no
7894else
6840198f
NC
7895 echo "$as_me: failed program was:" >&5
7896cat conftest.$ac_ext >&5
7897gas_cv_decl_needed_malloc=yes
252b5132 7898fi
6840198f 7899rm -f conftest$ac_exeext conftest.$ac_ext
252b5132 7900fi
6840198f
NC
7901echo "$as_me:7901: result: $gas_cv_decl_needed_malloc" >&5
7902echo "${ECHO_T}$gas_cv_decl_needed_malloc" >&6
252b5132 7903if test $gas_cv_decl_needed_malloc = yes; then
6840198f
NC
7904
7905cat >>confdefs.h <<\EOF
252b5132
RH
7906#define NEED_DECLARATION_MALLOC 1
7907EOF
7908
7909fi
7910
6840198f
NC
7911echo "$as_me:7911: checking whether declaration is required for free" >&5
7912echo $ECHO_N "checking whether declaration is required for free... $ECHO_C" >&6
7913if test "${gas_cv_decl_needed_free+set}" = set; then
7914 echo $ECHO_N "(cached) $ECHO_C" >&6
252b5132 7915else
6840198f
NC
7916 cat >conftest.$ac_ext <<_ACEOF
7917#line 7917 "configure"
252b5132
RH
7918#include "confdefs.h"
7919$gas_test_headers
6840198f
NC
7920int
7921main ()
7922{
252b5132
RH
7923
7924typedef void (*f)();
7925f x;
7926x = (f) free;
7927
6840198f
NC
7928 ;
7929 return 0;
7930}
7931_ACEOF
7932rm -f conftest.$ac_objext conftest$ac_exeext
7933if { (eval echo "$as_me:7933: \"$ac_link\"") >&5
7934 (eval $ac_link) 2>&5
7935 ac_status=$?
7936 echo "$as_me:7936: \$? = $ac_status" >&5
7937 (exit $ac_status); } &&
7938 { ac_try='test -s conftest$ac_exeext'
7939 { (eval echo "$as_me:7939: \"$ac_try\"") >&5
7940 (eval $ac_try) 2>&5
7941 ac_status=$?
7942 echo "$as_me:7942: \$? = $ac_status" >&5
7943 (exit $ac_status); }; }; then
252b5132
RH
7944 gas_cv_decl_needed_free=no
7945else
6840198f
NC
7946 echo "$as_me: failed program was:" >&5
7947cat conftest.$ac_ext >&5
7948gas_cv_decl_needed_free=yes
252b5132 7949fi
6840198f 7950rm -f conftest$ac_exeext conftest.$ac_ext
252b5132 7951fi
6840198f
NC
7952echo "$as_me:7952: result: $gas_cv_decl_needed_free" >&5
7953echo "${ECHO_T}$gas_cv_decl_needed_free" >&6
252b5132 7954if test $gas_cv_decl_needed_free = yes; then
6840198f
NC
7955
7956cat >>confdefs.h <<\EOF
252b5132
RH
7957#define NEED_DECLARATION_FREE 1
7958EOF
7959
7960fi
7961
6840198f
NC
7962echo "$as_me:7962: checking whether declaration is required for sbrk" >&5
7963echo $ECHO_N "checking whether declaration is required for sbrk... $ECHO_C" >&6
7964if test "${gas_cv_decl_needed_sbrk+set}" = set; then
7965 echo $ECHO_N "(cached) $ECHO_C" >&6
252b5132 7966else
6840198f
NC
7967 cat >conftest.$ac_ext <<_ACEOF
7968#line 7968 "configure"
252b5132
RH
7969#include "confdefs.h"
7970$gas_test_headers
6840198f
NC
7971int
7972main ()
7973{
252b5132
RH
7974
7975typedef char *(*f)();
7976f x;
7977x = (f) sbrk;
7978
6840198f
NC
7979 ;
7980 return 0;
7981}
7982_ACEOF
7983rm -f conftest.$ac_objext conftest$ac_exeext
7984if { (eval echo "$as_me:7984: \"$ac_link\"") >&5
7985 (eval $ac_link) 2>&5
7986 ac_status=$?
7987 echo "$as_me:7987: \$? = $ac_status" >&5
7988 (exit $ac_status); } &&
7989 { ac_try='test -s conftest$ac_exeext'
7990 { (eval echo "$as_me:7990: \"$ac_try\"") >&5
7991 (eval $ac_try) 2>&5
7992 ac_status=$?
7993 echo "$as_me:7993: \$? = $ac_status" >&5
7994 (exit $ac_status); }; }; then
252b5132
RH
7995 gas_cv_decl_needed_sbrk=no
7996else
6840198f
NC
7997 echo "$as_me: failed program was:" >&5
7998cat conftest.$ac_ext >&5
7999gas_cv_decl_needed_sbrk=yes
252b5132 8000fi
6840198f 8001rm -f conftest$ac_exeext conftest.$ac_ext
252b5132 8002fi
6840198f
NC
8003echo "$as_me:8003: result: $gas_cv_decl_needed_sbrk" >&5
8004echo "${ECHO_T}$gas_cv_decl_needed_sbrk" >&6
252b5132 8005if test $gas_cv_decl_needed_sbrk = yes; then
6840198f
NC
8006
8007cat >>confdefs.h <<\EOF
252b5132
RH
8008#define NEED_DECLARATION_SBRK 1
8009EOF
8010
8011fi
8012
6840198f
NC
8013echo "$as_me:8013: checking whether declaration is required for environ" >&5
8014echo $ECHO_N "checking whether declaration is required for environ... $ECHO_C" >&6
8015if test "${gas_cv_decl_needed_environ+set}" = set; then
8016 echo $ECHO_N "(cached) $ECHO_C" >&6
252b5132 8017else
6840198f
NC
8018 cat >conftest.$ac_ext <<_ACEOF
8019#line 8019 "configure"
252b5132
RH
8020#include "confdefs.h"
8021$gas_test_headers
6840198f
NC
8022int
8023main ()
8024{
252b5132
RH
8025
8026typedef char **f;
8027f x;
8028x = (f) environ;
8029
6840198f
NC
8030 ;
8031 return 0;
8032}
8033_ACEOF
8034rm -f conftest.$ac_objext conftest$ac_exeext
8035if { (eval echo "$as_me:8035: \"$ac_link\"") >&5
8036 (eval $ac_link) 2>&5
8037 ac_status=$?
8038 echo "$as_me:8038: \$? = $ac_status" >&5
8039 (exit $ac_status); } &&
8040 { ac_try='test -s conftest$ac_exeext'
8041 { (eval echo "$as_me:8041: \"$ac_try\"") >&5
8042 (eval $ac_try) 2>&5
8043 ac_status=$?
8044 echo "$as_me:8044: \$? = $ac_status" >&5
8045 (exit $ac_status); }; }; then
252b5132
RH
8046 gas_cv_decl_needed_environ=no
8047else
6840198f
NC
8048 echo "$as_me: failed program was:" >&5
8049cat conftest.$ac_ext >&5
8050gas_cv_decl_needed_environ=yes
252b5132 8051fi
6840198f 8052rm -f conftest$ac_exeext conftest.$ac_ext
252b5132 8053fi
6840198f
NC
8054echo "$as_me:8054: result: $gas_cv_decl_needed_environ" >&5
8055echo "${ECHO_T}$gas_cv_decl_needed_environ" >&6
252b5132 8056if test $gas_cv_decl_needed_environ = yes; then
6840198f
NC
8057
8058cat >>confdefs.h <<\EOF
252b5132
RH
8059#define NEED_DECLARATION_ENVIRON 1
8060EOF
8061
8062fi
8063
252b5132
RH
8064# Does errno.h declare errno, or do we have to add a separate declaration
8065# for it?
8066
6840198f
NC
8067echo "$as_me:8067: checking whether declaration is required for errno" >&5
8068echo $ECHO_N "checking whether declaration is required for errno... $ECHO_C" >&6
8069if test "${gas_cv_decl_needed_errno+set}" = set; then
8070 echo $ECHO_N "(cached) $ECHO_C" >&6
252b5132 8071else
6840198f
NC
8072 cat >conftest.$ac_ext <<_ACEOF
8073#line 8073 "configure"
252b5132
RH
8074#include "confdefs.h"
8075
8076#ifdef HAVE_ERRNO_H
8077#include <errno.h>
8078#endif
8079
6840198f
NC
8080int
8081main ()
8082{
252b5132
RH
8083
8084typedef int f;
8085f x;
8086x = (f) errno;
8087
6840198f
NC
8088 ;
8089 return 0;
8090}
8091_ACEOF
8092rm -f conftest.$ac_objext conftest$ac_exeext
8093if { (eval echo "$as_me:8093: \"$ac_link\"") >&5
8094 (eval $ac_link) 2>&5
8095 ac_status=$?
8096 echo "$as_me:8096: \$? = $ac_status" >&5
8097 (exit $ac_status); } &&
8098 { ac_try='test -s conftest$ac_exeext'
8099 { (eval echo "$as_me:8099: \"$ac_try\"") >&5
8100 (eval $ac_try) 2>&5
8101 ac_status=$?
8102 echo "$as_me:8102: \$? = $ac_status" >&5
8103 (exit $ac_status); }; }; then
252b5132
RH
8104 gas_cv_decl_needed_errno=no
8105else
6840198f
NC
8106 echo "$as_me: failed program was:" >&5
8107cat conftest.$ac_ext >&5
8108gas_cv_decl_needed_errno=yes
252b5132 8109fi
6840198f 8110rm -f conftest$ac_exeext conftest.$ac_ext
252b5132 8111fi
6840198f
NC
8112echo "$as_me:8112: result: $gas_cv_decl_needed_errno" >&5
8113echo "${ECHO_T}$gas_cv_decl_needed_errno" >&6
252b5132 8114if test $gas_cv_decl_needed_errno = yes; then
6840198f
NC
8115
8116cat >>confdefs.h <<\EOF
252b5132
RH
8117#define NEED_DECLARATION_ERRNO 1
8118EOF
8119
8120fi
8121
6840198f
NC
8122ac_config_files="$ac_config_files Makefile doc/Makefile ${GDBINIT}:gdbinit.in po/Makefile.in:po/Make-in"
8123ac_config_commands="$ac_config_commands default"
8124cat >confcache <<\_ACEOF
252b5132
RH
8125# This file is a shell script that caches the results of configure
8126# tests run on this system so they can be shared between configure
6840198f
NC
8127# scripts and configure runs, see configure's option --config-cache.
8128# It is not useful on other systems. If it contains results you don't
8129# want to keep, you may remove or edit it.
252b5132 8130#
6840198f
NC
8131# config.status only pays attention to the cache file if you give it
8132# the --recheck option to rerun configure.
252b5132 8133#
6840198f
NC
8134# `ac_cv_env_foo' variables (set or unset) will be overriden when
8135# loading this file, other *unset* `ac_cv_foo' will be assigned the
8136# following values.
8137
8138_ACEOF
8139
252b5132
RH
8140# The following way of writing the cache mishandles newlines in values,
8141# but we know of no workaround that is simple, portable, and efficient.
8142# So, don't put newlines in cache variables' values.
8143# Ultrix sh set writes to stderr and can't be redirected directly,
8144# and sets the high bit in the cache file unless we assign to the vars.
6840198f
NC
8145{
8146 (set) 2>&1 |
8147 case `(ac_space=' '; set | grep ac_space) 2>&1` in
8148 *ac_space=\ *)
8149 # `set' does not quote correctly, so add quotes (double-quote
8150 # substitution turns \\\\ into \\, and sed turns \\ into \).
8151 sed -n \
8152 "s/'/'\\\\''/g;
8153 s/^\\([_$ac_cr_alnum]*_cv_[_$ac_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
8154 ;;
8155 *)
8156 # `set' quotes correctly as required by POSIX, so do not add quotes.
8157 sed -n \
8158 "s/^\\([_$ac_cr_alnum]*_cv_[_$ac_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
8159 ;;
8160 esac;
8161} |
8162 sed '
8163 t clear
8164 : clear
8165 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
8166 t end
8167 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
8168 : end' >>confcache
8169if cmp -s $cache_file confcache; then :; else
252b5132 8170 if test -w $cache_file; then
6840198f
NC
8171 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
8172 cat confcache >$cache_file
252b5132
RH
8173 else
8174 echo "not updating unwritable cache $cache_file"
8175 fi
8176fi
8177rm -f confcache
8178
252b5132
RH
8179test "x$prefix" = xNONE && prefix=$ac_default_prefix
8180# Let make expand exec_prefix.
8181test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
8182
6840198f
NC
8183# VPATH may cause trouble with some makes, so we remove $(srcdir),
8184# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
8185# trailing colons and then remove the whole line if VPATH becomes empty
8186# (actually we leave an empty line to preserve line numbers).
252b5132 8187if test "x$srcdir" = x.; then
6840198f
NC
8188 ac_vpsub='/^[ ]*VPATH[ ]*=/{
8189s/:*\$(srcdir):*/:/;
8190s/:*\${srcdir}:*/:/;
8191s/:*@srcdir@:*/:/;
8192s/^\([^=]*=[ ]*\):*/\1/;
8193s/:*$//;
8194s/^[^=]*=[ ]*$//;
8195}'
252b5132
RH
8196fi
8197
252b5132
RH
8198DEFS=-DHAVE_CONFIG_H
8199
252b5132 8200: ${CONFIG_STATUS=./config.status}
6840198f
NC
8201ac_clean_files_save=$ac_clean_files
8202ac_clean_files="$ac_clean_files $CONFIG_STATUS"
8203{ echo "$as_me:8203: creating $CONFIG_STATUS" >&5
8204echo "$as_me: creating $CONFIG_STATUS" >&6;}
8205cat >$CONFIG_STATUS <<_ACEOF
8206#! $SHELL
252b5132
RH
8207# Generated automatically by configure.
8208# Run this file to recreate the current configuration.
252b5132 8209# Compiler output produced by configure, useful for debugging
6840198f 8210# configure, is in config.log if it exists.
252b5132 8211
6840198f
NC
8212debug=false
8213as_me=\`echo "\$0" | sed 's,.*/,,'\`
8214SHELL=\${CONFIG_SHELL-$SHELL}
8215
8216_ACEOF
8217
8218cat >>$CONFIG_STATUS <<\_ACEOF
8219# Be Bourne compatible
8220if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
8221 emulate sh
8222 NULLCMD=:
8223elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
8224 set -o posix
8225fi
8226
8227if expr a : '\(a\)' >/dev/null 2>&1; then
8228 as_expr=expr
8229else
8230 as_expr=false
8231fi
8232
8233rm -f conf$$ conf$$.exe conf$$.file
8234echo >conf$$.file
8235if ln -s conf$$.file conf$$ 2>/dev/null; then
8236 # We could just check for DJGPP; but this test a) works b) is more generic
8237 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
8238 if test -f conf$$.exe; then
8239 # Don't use ln at all; we don't have any links
8240 as_ln_s='cp -p'
8241 else
8242 as_ln_s='ln -s'
8243 fi
8244elif ln conf$$.file conf$$ 2>/dev/null; then
8245 as_ln_s=ln
8246else
8247 as_ln_s='cp -p'
8248fi
8249rm -f conf$$ conf$$.exe conf$$.file
8250
8251as_executable_p="test -f"
8252
8253# Support unset when possible.
8254if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
8255 as_unset=unset
8256else
8257 as_unset=false
8258fi
8259
8260# NLS nuisances.
8261$as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
8262$as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
8263$as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
8264$as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
8265$as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
8266$as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
8267$as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
8268$as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
8269
8270# IFS
8271# We need space, tab and new line, in precisely that order.
8272as_nl='
8273'
8274IFS=" $as_nl"
8275
8276# CDPATH.
8277$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
8278
8279# File descriptor usage:
8280# 0 standard input
8281# 1 file creation
8282# 2 errors and warnings
8283# 5 compiler messages saved in config.log
8284# 6 checking for... messages and results
8285exec 5>>config.log
8286exec 6>&1
8287
8288cat >&5 << EOF
8289
8290## ----------------------- ##
8291## Running config.status. ##
8292## ----------------------- ##
8293
8294This file was extended by $as_me 2.49d, executed with
8295 > $0 $@
8296on `(hostname || uname -n) 2>/dev/null | sed 1q`
8297
8298EOF
8299
8300_ACEOF
8301
8302# Files that config.status was made for.
8303if test -n "$ac_config_files"; then
8304 echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
8305fi
8306
8307if test -n "$ac_config_headers"; then
8308 echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
8309fi
8310
8311if test -n "$ac_config_links"; then
8312 echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
8313fi
8314
8315if test -n "$ac_config_commands"; then
8316 echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
8317fi
8318
8319cat >>$CONFIG_STATUS <<\EOF
8320
8321ac_cs_usage="\
8322\`$as_me' instantiates files from templates according to the
8323current configuration.
8324
8325Usage: $0 [OPTIONS] [FILE]...
8326
8327 -h, --help print this help, then exit
8328 -V, --version print version number, then exit
8329 -d, --debug don't remove temporary files
8330 --recheck update $as_me by reconfiguring in the same conditions
8331 --file=FILE[:TEMPLATE]
8332 instantiate the configuration file FILE
8333 --header=FILE[:TEMPLATE]
8334 instantiate the configuration header FILE
8335
8336Configuration files:
8337$config_files
8338
8339Configuration headers:
8340$config_headers
8341
8342Configuration commands:
8343$config_commands
8344
8345Report bugs to <bug-autoconf@gnu.org>."
8346EOF
8347
8348cat >>$CONFIG_STATUS <<EOF
8349ac_cs_version="\\
8350$CONFIG_STATUS generated by $as_me (Autoconf 2.49d).
8351Configured on host $ac_hostname by
8352 `echo "$0 $ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`"
8353srcdir=$srcdir
8354INSTALL="$INSTALL"
8355EOF
8356
8357cat >>$CONFIG_STATUS <<\EOF
8358# If no file are specified by the user, then we need to provide default
8359# value. By we need to know if files were specified by the user.
8360ac_need_defaults=:
8361while test $# != 0
252b5132 8362do
6840198f
NC
8363 case $1 in
8364 --*=*)
8365 ac_option=`expr "x$1" : 'x\([^=]*\)='`
8366 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
8367 shift
8368 set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
8369 shift
8370 ;;
8371 -*);;
8372 *) # This is not an option, so the user has probably given explicit
8373 # arguments.
8374 ac_need_defaults=false;;
8375 esac
8376
8377 case $1 in
8378 # Handling of the options.
8379EOF
8380cat >>$CONFIG_STATUS <<EOF
252b5132 8381 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
6840198f
NC
8382 echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
8383 exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
8384EOF
8385cat >>$CONFIG_STATUS <<\EOF
8386 --version | --vers* | -V )
8387 echo "$ac_cs_version"; exit 0 ;;
8388 --he | --h)
8389 # Conflict between --help and --header
8390 { { echo "$as_me:8390: error: ambiguous option: $1
8391Try \`$0 --help' for more information." >&5
8392echo "$as_me: error: ambiguous option: $1
8393Try \`$0 --help' for more information." >&2;}
8394 { (exit 1); exit 1; }; };;
8395 --help | --hel | -h )
8396 echo "$ac_cs_usage"; exit 0 ;;
8397 --debug | --d* | -d )
8398 debug=: ;;
8399 --file | --fil | --fi | --f )
8400 shift
8401 CONFIG_FILES="$CONFIG_FILES $1"
8402 ac_need_defaults=false;;
8403 --header | --heade | --head | --hea )
8404 shift
8405 CONFIG_HEADERS="$CONFIG_HEADERS $1"
8406 ac_need_defaults=false;;
8407
8408 # Handling of arguments.
8409 'Makefile' ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
8410 'doc/Makefile' ) CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
8411 '${GDBINIT}' ) CONFIG_FILES="$CONFIG_FILES ${GDBINIT}:gdbinit.in" ;;
8412 'po/Makefile.in' ) CONFIG_FILES="$CONFIG_FILES po/Makefile.in:po/Make-in" ;;
8413 'default-1' ) CONFIG_COMMANDS="$CONFIG_COMMANDS default-1" ;;
8414 'default' ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
8415 'config.h' ) CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;;
8416
8417 # This is an error.
8418 -*) { { echo "$as_me:8418: error: unrecognized option: $1
8419Try \`$0 --help' for more information." >&5
8420echo "$as_me: error: unrecognized option: $1
8421Try \`$0 --help' for more information." >&2;}
8422 { (exit 1); exit 1; }; } ;;
8423 *) { { echo "$as_me:8423: error: invalid argument: $1" >&5
8424echo "$as_me: error: invalid argument: $1" >&2;}
8425 { (exit 1); exit 1; }; };;
252b5132 8426 esac
6840198f 8427 shift
252b5132
RH
8428done
8429
6840198f
NC
8430EOF
8431
8432cat >>$CONFIG_STATUS <<\EOF
8433# If the user did not use the arguments to specify the items to instantiate,
8434# then the envvar interface is used. Set only those that are not.
8435# We use the long form for the default assignment because of an extremely
8436# bizarre bug on SunOS 4.1.3.
8437if $ac_need_defaults; then
8438 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
8439 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
8440 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
8441fi
8442
8443# Create a temporary directory, and hook for its removal unless debugging.
8444$debug ||
8445{
8446 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
8447 trap '{ (exit $?); exit $?; }' 1 2 13 15
8448}
8449
8450# Create a (secure) tmp directory for tmp files.
8451: ${TMPDIR=/tmp}
8452{
8453 tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
8454 test -n "$tmp" && test -d "$tmp"
8455} ||
8456{
8457 tmp=$TMPDIR/cs$$-$RANDOM
8458 (umask 077 && mkdir $tmp)
8459} ||
8460{
8461 echo "$me: cannot create a temporary directory in $TMPDIR" >&2
8462 { (exit 1); exit 1; }
8463}
252b5132 8464
252b5132 8465EOF
252b5132 8466
6840198f
NC
8467cat >>$CONFIG_STATUS <<EOF
8468#
8469# INIT-COMMANDS section.
8470#
8471
8472target_cpu_type=${target_cpu_type}
8473 cgen_cpu_prefix=${cgen_cpu_prefix}
8474 obj_format=${obj_format}
8475 te_file=${te_file}
8476
8477EOF
8478
8479cat >>$CONFIG_STATUS <<EOF
252b5132 8480
6840198f
NC
8481#
8482# CONFIG_FILES section.
8483#
8484
8485# No need to generate the scripts if there are no CONFIG_FILES.
8486# This happens for instance when ./config.status config.h
8487if test -n "\$CONFIG_FILES"; then
8488 # Protect against being on the right side of a sed subst in config.status.
8489 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
8490 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
8491s,@SHELL@,$SHELL,;t t
8492s,@exec_prefix@,$exec_prefix,;t t
8493s,@prefix@,$prefix,;t t
8494s,@program_transform_name@,$program_transform_name,;t t
8495s,@bindir@,$bindir,;t t
8496s,@sbindir@,$sbindir,;t t
8497s,@libexecdir@,$libexecdir,;t t
8498s,@datadir@,$datadir,;t t
8499s,@sysconfdir@,$sysconfdir,;t t
8500s,@sharedstatedir@,$sharedstatedir,;t t
8501s,@localstatedir@,$localstatedir,;t t
8502s,@libdir@,$libdir,;t t
8503s,@includedir@,$includedir,;t t
8504s,@oldincludedir@,$oldincludedir,;t t
8505s,@infodir@,$infodir,;t t
8506s,@mandir@,$mandir,;t t
8507s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
8508s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
8509s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
8510s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
8511s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
8512s,@ECHO_C@,$ECHO_C,;t t
8513s,@ECHO_N@,$ECHO_N,;t t
8514s,@ECHO_T@,$ECHO_T,;t t
8515s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
8516s,@DEFS@,$DEFS,;t t
8517s,@LIBS@,$LIBS,;t t
8518s,@build@,$build,;t t
8519s,@build_cpu@,$build_cpu,;t t
8520s,@build_vendor@,$build_vendor,;t t
8521s,@build_os@,$build_os,;t t
8522s,@host@,$host,;t t
8523s,@host_cpu@,$host_cpu,;t t
8524s,@host_vendor@,$host_vendor,;t t
8525s,@host_os@,$host_os,;t t
8526s,@target@,$target,;t t
8527s,@target_cpu@,$target_cpu,;t t
8528s,@target_vendor@,$target_vendor,;t t
8529s,@target_os@,$target_os,;t t
8530s,@CC@,$CC,;t t
8531s,@CFLAGS@,$CFLAGS,;t t
8532s,@LDFLAGS@,$LDFLAGS,;t t
8533s,@ac_ct_CC@,$ac_ct_CC,;t t
8534s,@EXEEXT@,$EXEEXT,;t t
8535s,@OBJEXT@,$OBJEXT,;t t
8536s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
8537s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
8538s,@INSTALL_DATA@,$INSTALL_DATA,;t t
8539s,@PACKAGE@,$PACKAGE,;t t
8540s,@VERSION@,$VERSION,;t t
8541s,@ACLOCAL@,$ACLOCAL,;t t
8542s,@AUTOCONF@,$AUTOCONF,;t t
8543s,@AUTOMAKE@,$AUTOMAKE,;t t
8544s,@AUTOHEADER@,$AUTOHEADER,;t t
8545s,@MAKEINFO@,$MAKEINFO,;t t
8546s,@SET_MAKE@,$SET_MAKE,;t t
8547s,@LN_S@,$LN_S,;t t
8548s,@RANLIB@,$RANLIB,;t t
8549s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
8550s,@STRIP@,$STRIP,;t t
8551s,@ac_ct_STRIP@,$ac_ct_STRIP,;t t
8552s,@LIBTOOL@,$LIBTOOL,;t t
8553s,@WARN_CFLAGS@,$WARN_CFLAGS,;t t
8554s,@GDBINIT@,$GDBINIT,;t t
8555s,@cgen_cpu_prefix@,$cgen_cpu_prefix,;t t
8556s,@extra_objects@,$extra_objects,;t t
8557s,@target_cpu_type@,$target_cpu_type,;t t
8558s,@obj_format@,$obj_format,;t t
8559s,@te_file@,$te_file,;t t
8560s,@install_tooldir@,$install_tooldir,;t t
8561s,@atof@,$atof,;t t
8562s,@BFDLIB@,$BFDLIB,;t t
8563s,@OPCODES_LIB@,$OPCODES_LIB,;t t
8564s,@ALL_OBJ_DEPS@,$ALL_OBJ_DEPS,;t t
8565s,@YACC@,$YACC,;t t
8566s,@LEX@,$LEX,;t t
8567s,@LEXLIB@,$LEXLIB,;t t
8568s,@LEX_OUTPUT_ROOT@,$LEX_OUTPUT_ROOT,;t t
8569s,@CPP@,$CPP,;t t
8570s,@CPPFLAGS@,$CPPFLAGS,;t t
8571s,@ALLOCA@,$ALLOCA,;t t
8572s,@USE_NLS@,$USE_NLS,;t t
8573s,@MSGFMT@,$MSGFMT,;t t
8574s,@GMSGFMT@,$GMSGFMT,;t t
8575s,@XGETTEXT@,$XGETTEXT,;t t
8576s,@USE_INCLUDED_LIBINTL@,$USE_INCLUDED_LIBINTL,;t t
8577s,@CATALOGS@,$CATALOGS,;t t
8578s,@CATOBJEXT@,$CATOBJEXT,;t t
8579s,@DATADIRNAME@,$DATADIRNAME,;t t
8580s,@GMOFILES@,$GMOFILES,;t t
8581s,@INSTOBJEXT@,$INSTOBJEXT,;t t
8582s,@INTLDEPS@,$INTLDEPS,;t t
8583s,@INTLLIBS@,$INTLLIBS,;t t
8584s,@INTLOBJS@,$INTLOBJS,;t t
8585s,@POFILES@,$POFILES,;t t
8586s,@POSUB@,$POSUB,;t t
8587s,@INCLUDE_LOCALE_H@,$INCLUDE_LOCALE_H,;t t
8588s,@GT_NO@,$GT_NO,;t t
8589s,@GT_YES@,$GT_YES,;t t
8590s,@MKINSTALLDIRS@,$MKINSTALLDIRS,;t t
8591s,@l@,$l,;t t
8592s,@MAINTAINER_MODE_TRUE@,$MAINTAINER_MODE_TRUE,;t t
8593s,@MAINTAINER_MODE_FALSE@,$MAINTAINER_MODE_FALSE,;t t
8594s,@MAINT@,$MAINT,;t t
8595s,@LIBM@,$LIBM,;t t
252b5132 8596CEOF
6840198f 8597
252b5132
RH
8598EOF
8599
6840198f
NC
8600 cat >>$CONFIG_STATUS <<\EOF
8601 # Split the substitutions into bite-sized pieces for seds with
8602 # small command number limits, like on Digital OSF/1 and HP-UX.
8603 ac_max_sed_lines=48
8604 ac_sed_frag=1 # Number of current file.
8605 ac_beg=1 # First line for current file.
8606 ac_end=$ac_max_sed_lines # Line after last line for current file.
8607 ac_more_lines=:
8608 ac_sed_cmds=
8609 while $ac_more_lines; do
8610 if test $ac_beg -gt 1; then
8611 sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
8612 else
8613 sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
8614 fi
8615 if test ! -s $tmp/subs.frag; then
8616 ac_more_lines=false
252b5132 8617 else
6840198f
NC
8618 # The purpose of the label and of the branching condition is to
8619 # speed up the sed processing (if there are no `@' at all, there
8620 # is no need to browse any of the substitutions).
8621 # These are the two extra sed commands mentioned above.
8622 (echo ':t
8623 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
8624 if test -z "$ac_sed_cmds"; then
8625 ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
8626 else
8627 ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
8628 fi
8629 ac_sed_frag=`expr $ac_sed_frag + 1`
8630 ac_beg=$ac_end
8631 ac_end=`expr $ac_end + $ac_max_sed_lines`
252b5132 8632 fi
6840198f
NC
8633 done
8634 if test -z "$ac_sed_cmds"; then
8635 ac_sed_cmds=cat
252b5132 8636 fi
6840198f 8637fi # test -n "$CONFIG_FILES"
252b5132 8638
252b5132 8639EOF
6840198f
NC
8640cat >>$CONFIG_STATUS <<\EOF
8641for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
252b5132 8642 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
6840198f
NC
8643 case $ac_file in
8644 - | *:- | *:-:* ) # input from stdin
8645 cat >$tmp/stdin
8646 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
8647 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
8648 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
8649 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
8650 * ) ac_file_in=$ac_file.in ;;
252b5132
RH
8651 esac
8652
6840198f
NC
8653 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
8654 ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
8655 X"$ac_file" : 'X\(//\)[^/]' \| \
8656 X"$ac_file" : 'X\(//\)$' \| \
8657 X"$ac_file" : 'X\(/\)' \| \
8658 . : '\(.\)' 2>/dev/null ||
8659echo X"$ac_file" |
8660 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
8661 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
8662 /^X\(\/\/\)$/{ s//\1/; q; }
8663 /^X\(\/\).*/{ s//\1/; q; }
8664 s/.*/./; q'`
252b5132 8665 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
6840198f
NC
8666 { case "$ac_dir" in
8667 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
8668 *) as_incr_dir=.;;
8669esac
8670as_dummy="$ac_dir"
8671for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
8672 case $as_mkdir_dir in
8673 # Skip DOS drivespec
8674 ?:) as_incr_dir=$as_mkdir_dir ;;
8675 *)
8676 as_incr_dir=$as_incr_dir/$as_mkdir_dir
8677 test -d "$as_incr_dir" || mkdir "$as_incr_dir"
8678 ;;
8679 esac
8680done; }
8681
8682 ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
252b5132 8683 # A "../" for each directory in $ac_dir_suffix.
6840198f 8684 ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
252b5132
RH
8685 else
8686 ac_dir_suffix= ac_dots=
8687 fi
8688
6840198f
NC
8689 case $srcdir in
8690 .) ac_srcdir=.
8691 if test -z "$ac_dots"; then
8692 ac_top_srcdir=.
8693 else
8694 ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
8695 fi ;;
8696 [\\/]* | ?:[\\/]* )
8697 ac_srcdir=$srcdir$ac_dir_suffix;
8698 ac_top_srcdir=$srcdir ;;
252b5132 8699 *) # Relative path.
6840198f
NC
8700 ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
8701 ac_top_srcdir=$ac_dots$srcdir ;;
252b5132
RH
8702 esac
8703
6840198f
NC
8704 case $INSTALL in
8705 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
8706 *) ac_INSTALL=$ac_dots$INSTALL ;;
252b5132
RH
8707 esac
8708
6840198f
NC
8709 if test x"$ac_file" != x-; then
8710 { echo "$as_me:8710: creating $ac_file" >&5
8711echo "$as_me: creating $ac_file" >&6;}
8712 rm -f "$ac_file"
8713 fi
8714 # Let's still pretend it is `configure' which instantiates (i.e., don't
8715 # use $as_me), people would be surprised to read:
8716 # /* config.h. Generated automatically by config.status. */
8717 configure_input="Generated automatically from `echo $ac_file_in |
8718 sed 's,.*/,,'` by configure."
8719
8720 # First look for the input files in the build tree, otherwise in the
8721 # src tree.
8722 ac_file_inputs=`IFS=:
8723 for f in $ac_file_in; do
8724 case $f in
8725 -) echo $tmp/stdin ;;
8726 [\\/$]* | ?:[\\/]*)
8727 # Absolute
8728 test -f "$f" || { { echo "$as_me:8728: error: cannot find input file: $f" >&5
8729echo "$as_me: error: cannot find input file: $f" >&2;}
8730 { (exit 1); exit 1; }; }
8731 echo $f;;
8732 *) # Relative
8733 if test -f "$f"; then
8734 # Build tree
8735 echo $f
8736 elif test -f "$srcdir/$f"; then
8737 # Source tree
8738 echo $srcdir/$f
8739 else
8740 # /dev/null tree
8741 { { echo "$as_me:8741: error: cannot find input file: $f" >&5
8742echo "$as_me: error: cannot find input file: $f" >&2;}
8743 { (exit 1); exit 1; }; }
8744 fi;;
8745 esac
8746 done` || { (exit 1); exit 1; }
8747EOF
8748cat >>$CONFIG_STATUS <<EOF
8749 sed "$ac_vpsub
8750$extrasub
8751EOF
8752cat >>$CONFIG_STATUS <<\EOF
8753:t
8754/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
8755s,@configure_input@,$configure_input,;t t
8756s,@srcdir@,$ac_srcdir,;t t
8757s,@top_srcdir@,$ac_top_srcdir,;t t
8758s,@INSTALL@,$ac_INSTALL,;t t
8759" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
8760 rm -f $tmp/stdin
8761 if test x"$ac_file" != x-; then
8762 mv $tmp/out $ac_file
8763 else
8764 cat $tmp/out
8765 rm -f $tmp/out
8766 fi
8767
8768done
8769EOF
8770cat >>$CONFIG_STATUS <<\EOF
252b5132 8771
6840198f
NC
8772#
8773# CONFIG_HEADER section.
8774#
252b5132
RH
8775
8776# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
8777# NAME is the cpp macro being defined and VALUE is the value it is being given.
8778#
8779# ac_d sets the value in "#define NAME VALUE" lines.
6840198f
NC
8780ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
8781ac_dB='[ ].*$,\1#\2'
8782ac_dC=' '
8783ac_dD=',;t'
8784# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
8785ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
8786ac_uB='$,\1#\2define\3'
252b5132 8787ac_uC=' '
6840198f
NC
8788ac_uD=',;t'
8789
8790for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
252b5132 8791 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
6840198f
NC
8792 case $ac_file in
8793 - | *:- | *:-:* ) # input from stdin
8794 cat >$tmp/stdin
8795 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
8796 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
8797 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
8798 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
8799 * ) ac_file_in=$ac_file.in ;;
252b5132
RH
8800 esac
8801
6840198f
NC
8802 test x"$ac_file" != x- && { echo "$as_me:8802: creating $ac_file" >&5
8803echo "$as_me: creating $ac_file" >&6;}
8804
8805 # First look for the input files in the build tree, otherwise in the
8806 # src tree.
8807 ac_file_inputs=`IFS=:
8808 for f in $ac_file_in; do
8809 case $f in
8810 -) echo $tmp/stdin ;;
8811 [\\/$]* | ?:[\\/]*)
8812 # Absolute
8813 test -f "$f" || { { echo "$as_me:8813: error: cannot find input file: $f" >&5
8814echo "$as_me: error: cannot find input file: $f" >&2;}
8815 { (exit 1); exit 1; }; }
8816 echo $f;;
8817 *) # Relative
8818 if test -f "$f"; then
8819 # Build tree
8820 echo $f
8821 elif test -f "$srcdir/$f"; then
8822 # Source tree
8823 echo $srcdir/$f
8824 else
8825 # /dev/null tree
8826 { { echo "$as_me:8826: error: cannot find input file: $f" >&5
8827echo "$as_me: error: cannot find input file: $f" >&2;}
8828 { (exit 1); exit 1; }; }
8829 fi;;
8830 esac
8831 done` || { (exit 1); exit 1; }
8832 # Remove the trailing spaces.
8833 sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
8834
8835EOF
8836
8837# Transform confdefs.h into two sed scripts, `conftest.defines' and
8838# `conftest.undefs', that substitutes the proper values into
8839# config.h.in to produce config.h. The first handles `#define'
8840# templates, and the second `#undef' templates.
8841# And first: Protect against being on the right side of a sed subst in
8842# config.status. Protect against being in an unquoted here document
8843# in config.status.
8844rm -f conftest.defines conftest.undefs
8845# Using a here document instead of a string reduces the quoting nightmare.
8846# Putting comments in sed scripts is not portable.
8847#
8848# `end' is used to avoid that the second main sed command (meant for
8849# 0-ary CPP macros) applies to n-ary macro definitions.
8850# See the Autoconf documentation for `clear'.
8851cat >confdef2sed.sed <<\EOF
8852s/[\\&,]/\\&/g
8853s,[\\$`],\\&,g
8854t clear
8855: clear
8856s,^[ ]*#[ ]*define[ ][ ]*\(\([^ (][^ (]*\)([^)]*)\)[ ]*\(.*\)$,${ac_dA}\2${ac_dB}\1${ac_dC}\3${ac_dD},gp
8857t end
8858s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
8859: end
8860EOF
8861# If some macros were called several times there might be several times
8862# the same #defines, which is useless. Nevertheless, we may not want to
8863# sort them, since we want the *last* AC-DEFINE to be honored.
8864uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
8865sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
8866rm -f confdef2sed.sed
252b5132
RH
8867
8868# This sed command replaces #undef with comments. This is necessary, for
8869# example, in the case of _POSIX_SOURCE, which is predefined and required
8870# on some systems where configure will not decide to define it.
6840198f
NC
8871cat >>conftest.undefs <<\EOF
8872s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
252b5132
RH
8873EOF
8874
6840198f
NC
8875# Break up conftest.defines because some shells have a limit on the size
8876# of here documents, and old seds have small limits too (100 cmds).
8877echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
8878echo ' if egrep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
8879echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
8880echo ' :' >>$CONFIG_STATUS
8881rm -f conftest.tail
8882while grep . conftest.defines >/dev/null
8883do
8884 # Write a limited-size here document to $tmp/defines.sed.
8885 echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
8886 # Speed up: don't consider the non `#define' lines.
8887 echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS
8888 # Work around the forget-to-reset-the-flag bug.
8889 echo 't clr' >>$CONFIG_STATUS
8890 echo ': clr' >>$CONFIG_STATUS
8891 sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
8892 echo 'CEOF
8893 sed -f $tmp/defines.sed $tmp/in >$tmp/out
8894 rm -f $tmp/in
8895 mv $tmp/out $tmp/in
8896' >>$CONFIG_STATUS
8897 sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
8898 rm -f conftest.defines
8899 mv conftest.tail conftest.defines
8900done
8901rm -f conftest.defines
8902echo ' fi # egrep' >>$CONFIG_STATUS
8903echo >>$CONFIG_STATUS
252b5132 8904
6840198f
NC
8905# Break up conftest.undefs because some shells have a limit on the size
8906# of here documents, and old seds have small limits too (100 cmds).
8907echo ' # Handle all the #undef templates' >>$CONFIG_STATUS
252b5132 8908rm -f conftest.tail
6840198f 8909while grep . conftest.undefs >/dev/null
252b5132 8910do
6840198f
NC
8911 # Write a limited-size here document to $tmp/undefs.sed.
8912 echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
8913 # Speed up: don't consider the non `#undef'
8914 echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS
8915 # Work around the forget-to-reset-the-flag bug.
8916 echo 't clr' >>$CONFIG_STATUS
8917 echo ': clr' >>$CONFIG_STATUS
8918 sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
252b5132 8919 echo 'CEOF
6840198f
NC
8920 sed -f $tmp/undefs.sed $tmp/in >$tmp/out
8921 rm -f $tmp/in
8922 mv $tmp/out $tmp/in
8923' >>$CONFIG_STATUS
8924 sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
8925 rm -f conftest.undefs
8926 mv conftest.tail conftest.undefs
252b5132 8927done
6840198f
NC
8928rm -f conftest.undefs
8929
8930cat >>$CONFIG_STATUS <<\EOF
8931 # Let's still pretend it is `configure' which instantiates (i.e., don't
8932 # use $as_me), people would be surprised to read:
8933 # /* config.h. Generated automatically by config.status. */
8934 if test x"$ac_file" = x-; then
8935 echo "/* Generated automatically by configure. */" >$tmp/config.h
252b5132 8936 else
6840198f
NC
8937 echo "/* $ac_file. Generated automatically by configure. */" >$tmp/config.h
8938 fi
8939 cat $tmp/in >>$tmp/config.h
8940 rm -f $tmp/in
8941 if test x"$ac_file" != x-; then
8942 if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
8943 { echo "$as_me:8943: $ac_file is unchanged" >&5
8944echo "$as_me: $ac_file is unchanged" >&6;}
8945 else
8946 ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
8947 X"$ac_file" : 'X\(//\)[^/]' \| \
8948 X"$ac_file" : 'X\(//\)$' \| \
8949 X"$ac_file" : 'X\(/\)' \| \
8950 . : '\(.\)' 2>/dev/null ||
8951echo X"$ac_file" |
8952 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
8953 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
8954 /^X\(\/\/\)$/{ s//\1/; q; }
8955 /^X\(\/\).*/{ s//\1/; q; }
8956 s/.*/./; q'`
252b5132 8957 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
6840198f
NC
8958 { case "$ac_dir" in
8959 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
8960 *) as_incr_dir=.;;
8961esac
8962as_dummy="$ac_dir"
8963for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
8964 case $as_mkdir_dir in
8965 # Skip DOS drivespec
8966 ?:) as_incr_dir=$as_mkdir_dir ;;
8967 *)
8968 as_incr_dir=$as_incr_dir/$as_mkdir_dir
8969 test -d "$as_incr_dir" || mkdir "$as_incr_dir"
8970 ;;
8971 esac
8972done; }
8973
8974 fi
8975 rm -f $ac_file
8976 mv $tmp/config.h $ac_file
252b5132 8977 fi
6840198f
NC
8978 else
8979 cat $tmp/config.h
8980 rm -f $tmp/config.h
252b5132 8981 fi
6840198f 8982done
252b5132 8983EOF
6840198f 8984cat >>$CONFIG_STATUS <<\EOF
252b5132 8985
6840198f
NC
8986#
8987# CONFIG_COMMANDS section.
8988#
8989for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
8990 ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
8991 ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
8992
8993 case $ac_dest in
8994 default-1 ) test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h ;;
8995 default ) rm -f targ-cpu.c targ-cpu.h obj-format.h obj-format.c targ-env.h atof-targ.c itbl-cpu.h
252b5132
RH
8996 echo '#include "tc-'"${target_cpu_type}"'.h"' > targ-cpu.h
8997 echo '#include "obj-'"${obj_format}"'.h"' > obj-format.h
8998 echo '#include "te-'"${te_file}"'.h"' > targ-env.h
8999 echo '#include "itbl-'"${target_cpu_type}"'.h"' > itbl-cpu.h
9000 if test "x$cgen_cpu_prefix" != x ; then
9001 echo '#include "opcodes/'"${cgen_cpu_prefix}"'-desc.h"' > cgen-desc.h
9002 fi
9003
6840198f
NC
9004 sed -e '/POTFILES =/r po/POTFILES' po/Makefile.in > po/Makefile ;;
9005 esac
9006done
9007EOF
9008
9009cat >>$CONFIG_STATUS <<\EOF
9010
9011{ (exit 0); exit 0; }
252b5132
RH
9012EOF
9013chmod +x $CONFIG_STATUS
6840198f
NC
9014ac_clean_files=$ac_clean_files_save
9015
9016test "$no_create" = yes || $SHELL $CONFIG_STATUS || { (exit 1); exit 1; }
252b5132 9017
This page took 0.518777 seconds and 4 git commands to generate.