* config/tc-alpha.c (s_alpha_ucons): New function.
[deliverable/binutils-gdb.git] / binutils / configure
CommitLineData
5ab6ca68 1#! /bin/sh
99a42820 2
5ab6ca68 3# Guess values for system-dependent variables and create Makefiles.
33106b60
ILT
4# Generated automatically using autoconf version 2.12
5# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
5ab6ca68
ILT
6#
7# This configure script is free software; the Free Software Foundation
8# gives unlimited permission to copy, distribute and modify it.
9
10# Defaults:
11ac_help=
12ac_default_prefix=/usr/local
13# Any additions from configure.in:
14ac_help="$ac_help
d467c30d
ILT
15 --with-gnu-ld assume the C compiler uses GNU ld [default=no]"
16ac_help="$ac_help
17 --enable-shared build shared libraries [default=yes]"
36fb98be 18ac_help="$ac_help
d467c30d
ILT
19 --enable-static build static libraries [default=yes]"
20ac_help="$ac_help
21 --enable-targets alternative target configurations"
33106b60
ILT
22ac_help="$ac_help
23 --enable-commonbfdlib build shared BFD/opcodes/libiberty library"
d467c30d
ILT
24ac_help="$ac_help
25 --enable-maintainer-mode enable make rules and dependencies not useful
26 (and sometimes confusing) to the casual installer"
5ab6ca68
ILT
27
28# Initialize some variables set by options.
29# The variables have the same names as the options, with
30# dashes changed to underlines.
31build=NONE
32cache_file=./config.cache
33exec_prefix=NONE
34host=NONE
35no_create=
36nonopt=NONE
37no_recursion=
38prefix=NONE
39program_prefix=NONE
40program_suffix=NONE
41program_transform_name=s,x,x,
42silent=
43site=
44srcdir=
45target=NONE
46verbose=
47x_includes=NONE
48x_libraries=NONE
626a6542
SC
49bindir='${exec_prefix}/bin'
50sbindir='${exec_prefix}/sbin'
51libexecdir='${exec_prefix}/libexec'
52datadir='${prefix}/share'
53sysconfdir='${prefix}/etc'
54sharedstatedir='${prefix}/com'
55localstatedir='${prefix}/var'
56libdir='${exec_prefix}/lib'
57includedir='${prefix}/include'
58oldincludedir='/usr/include'
59infodir='${prefix}/info'
60mandir='${prefix}/man'
99a42820 61
5ab6ca68
ILT
62# Initialize some other variables.
63subdirs=
626a6542 64MFLAGS= MAKEFLAGS=
33106b60
ILT
65# Maximum number of lines to put in a shell here document.
66ac_max_here_lines=12
99a42820 67
5ab6ca68
ILT
68ac_prev=
69for ac_option
70do
99a42820 71
5ab6ca68
ILT
72 # If the previous option needs an argument, assign it.
73 if test -n "$ac_prev"; then
74 eval "$ac_prev=\$ac_option"
75 ac_prev=
76 continue
77 fi
78
79 case "$ac_option" in
80 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
81 *) ac_optarg= ;;
82 esac
83
84 # Accept the important Cygnus configure options, so we can diagnose typos.
85
86 case "$ac_option" in
87
626a6542
SC
88 -bindir | --bindir | --bindi | --bind | --bin | --bi)
89 ac_prev=bindir ;;
90 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
91 bindir="$ac_optarg" ;;
92
93 -build | --build | --buil | --bui | --bu)
5ab6ca68 94 ac_prev=build ;;
626a6542 95 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
5ab6ca68
ILT
96 build="$ac_optarg" ;;
97
98 -cache-file | --cache-file | --cache-fil | --cache-fi \
99 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
100 ac_prev=cache_file ;;
101 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
102 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
103 cache_file="$ac_optarg" ;;
104
626a6542
SC
105 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
106 ac_prev=datadir ;;
107 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
108 | --da=*)
109 datadir="$ac_optarg" ;;
110
5ab6ca68
ILT
111 -disable-* | --disable-*)
112 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
113 # Reject names that are not valid shell variable names.
114 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
115 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
116 fi
117 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
118 eval "enable_${ac_feature}=no" ;;
119
120 -enable-* | --enable-*)
121 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
122 # Reject names that are not valid shell variable names.
123 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
124 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
125 fi
126 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
127 case "$ac_option" in
128 *=*) ;;
129 *) ac_optarg=yes ;;
130 esac
131 eval "enable_${ac_feature}='$ac_optarg'" ;;
132
133 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
134 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
135 | --exec | --exe | --ex)
136 ac_prev=exec_prefix ;;
137 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
138 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
139 | --exec=* | --exe=* | --ex=*)
140 exec_prefix="$ac_optarg" ;;
141
142 -gas | --gas | --ga | --g)
143 # Obsolete; use --with-gas.
144 with_gas=yes ;;
145
146 -help | --help | --hel | --he)
147 # Omit some internal or obsolete options to make the list less imposing.
148 # This message is too long to be a string in the A/UX 3.1 sh.
149 cat << EOF
150Usage: configure [options] [host]
151Options: [defaults in brackets after descriptions]
152Configuration:
153 --cache-file=FILE cache test results in FILE
154 --help print this message
155 --no-create do not create output files
156 --quiet, --silent do not print \`checking...' messages
157 --version print the version of autoconf that created configure
158Directory and file names:
159 --prefix=PREFIX install architecture-independent files in PREFIX
160 [$ac_default_prefix]
626a6542 161 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
5ab6ca68 162 [same as prefix]
626a6542
SC
163 --bindir=DIR user executables in DIR [EPREFIX/bin]
164 --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
165 --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
166 --datadir=DIR read-only architecture-independent data in DIR
167 [PREFIX/share]
168 --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
169 --sharedstatedir=DIR modifiable architecture-independent data in DIR
170 [PREFIX/com]
171 --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
172 --libdir=DIR object code libraries in DIR [EPREFIX/lib]
173 --includedir=DIR C header files in DIR [PREFIX/include]
174 --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
175 --infodir=DIR info documentation in DIR [PREFIX/info]
176 --mandir=DIR man documentation in DIR [PREFIX/man]
5ab6ca68
ILT
177 --srcdir=DIR find the sources in DIR [configure dir or ..]
178 --program-prefix=PREFIX prepend PREFIX to installed program names
179 --program-suffix=SUFFIX append SUFFIX to installed program names
626a6542
SC
180 --program-transform-name=PROGRAM
181 run sed PROGRAM on installed program names
182EOF
183 cat << EOF
5ab6ca68
ILT
184Host type:
185 --build=BUILD configure for building on BUILD [BUILD=HOST]
186 --host=HOST configure for HOST [guessed]
187 --target=TARGET configure for TARGET [TARGET=HOST]
188Features and packages:
189 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
190 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
191 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
192 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
193 --x-includes=DIR X include files are in DIR
194 --x-libraries=DIR X library files are in DIR
5ab6ca68 195EOF
626a6542
SC
196 if test -n "$ac_help"; then
197 echo "--enable and --with options recognized:$ac_help"
198 fi
5ab6ca68
ILT
199 exit 0 ;;
200
201 -host | --host | --hos | --ho)
202 ac_prev=host ;;
203 -host=* | --host=* | --hos=* | --ho=*)
204 host="$ac_optarg" ;;
205
626a6542
SC
206 -includedir | --includedir | --includedi | --included | --include \
207 | --includ | --inclu | --incl | --inc)
208 ac_prev=includedir ;;
209 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
210 | --includ=* | --inclu=* | --incl=* | --inc=*)
211 includedir="$ac_optarg" ;;
212
213 -infodir | --infodir | --infodi | --infod | --info | --inf)
214 ac_prev=infodir ;;
215 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
216 infodir="$ac_optarg" ;;
217
218 -libdir | --libdir | --libdi | --libd)
219 ac_prev=libdir ;;
220 -libdir=* | --libdir=* | --libdi=* | --libd=*)
221 libdir="$ac_optarg" ;;
222
223 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
224 | --libexe | --libex | --libe)
225 ac_prev=libexecdir ;;
226 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
227 | --libexe=* | --libex=* | --libe=*)
228 libexecdir="$ac_optarg" ;;
229
230 -localstatedir | --localstatedir | --localstatedi | --localstated \
231 | --localstate | --localstat | --localsta | --localst \
232 | --locals | --local | --loca | --loc | --lo)
233 ac_prev=localstatedir ;;
234 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
235 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
236 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
237 localstatedir="$ac_optarg" ;;
238
239 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
240 ac_prev=mandir ;;
241 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
242 mandir="$ac_optarg" ;;
243
5ab6ca68
ILT
244 -nfp | --nfp | --nf)
245 # Obsolete; use --without-fp.
246 with_fp=no ;;
247
248 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
249 | --no-cr | --no-c)
250 no_create=yes ;;
251
252 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
253 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
254 no_recursion=yes ;;
255
626a6542
SC
256 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
257 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
258 | --oldin | --oldi | --old | --ol | --o)
259 ac_prev=oldincludedir ;;
260 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
261 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
262 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
263 oldincludedir="$ac_optarg" ;;
264
5ab6ca68
ILT
265 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
266 ac_prev=prefix ;;
267 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
268 prefix="$ac_optarg" ;;
269
270 -program-prefix | --program-prefix | --program-prefi | --program-pref \
271 | --program-pre | --program-pr | --program-p)
272 ac_prev=program_prefix ;;
273 -program-prefix=* | --program-prefix=* | --program-prefi=* \
274 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
275 program_prefix="$ac_optarg" ;;
276
277 -program-suffix | --program-suffix | --program-suffi | --program-suff \
278 | --program-suf | --program-su | --program-s)
279 ac_prev=program_suffix ;;
280 -program-suffix=* | --program-suffix=* | --program-suffi=* \
281 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
282 program_suffix="$ac_optarg" ;;
283
284 -program-transform-name | --program-transform-name \
285 | --program-transform-nam | --program-transform-na \
286 | --program-transform-n | --program-transform- \
287 | --program-transform | --program-transfor \
288 | --program-transfo | --program-transf \
289 | --program-trans | --program-tran \
290 | --progr-tra | --program-tr | --program-t)
291 ac_prev=program_transform_name ;;
292 -program-transform-name=* | --program-transform-name=* \
293 | --program-transform-nam=* | --program-transform-na=* \
294 | --program-transform-n=* | --program-transform-=* \
295 | --program-transform=* | --program-transfor=* \
296 | --program-transfo=* | --program-transf=* \
297 | --program-trans=* | --program-tran=* \
298 | --progr-tra=* | --program-tr=* | --program-t=*)
299 program_transform_name="$ac_optarg" ;;
300
301 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
302 | -silent | --silent | --silen | --sile | --sil)
303 silent=yes ;;
304
626a6542
SC
305 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
306 ac_prev=sbindir ;;
307 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
308 | --sbi=* | --sb=*)
309 sbindir="$ac_optarg" ;;
310
311 -sharedstatedir | --sharedstatedir | --sharedstatedi \
312 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
313 | --sharedst | --shareds | --shared | --share | --shar \
314 | --sha | --sh)
315 ac_prev=sharedstatedir ;;
316 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
317 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
318 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
319 | --sha=* | --sh=*)
320 sharedstatedir="$ac_optarg" ;;
321
5ab6ca68
ILT
322 -site | --site | --sit)
323 ac_prev=site ;;
324 -site=* | --site=* | --sit=*)
325 site="$ac_optarg" ;;
326
327 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
328 ac_prev=srcdir ;;
329 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
330 srcdir="$ac_optarg" ;;
331
626a6542
SC
332 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
333 | --syscon | --sysco | --sysc | --sys | --sy)
334 ac_prev=sysconfdir ;;
335 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
336 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
337 sysconfdir="$ac_optarg" ;;
338
5ab6ca68
ILT
339 -target | --target | --targe | --targ | --tar | --ta | --t)
340 ac_prev=target ;;
341 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
342 target="$ac_optarg" ;;
343
344 -v | -verbose | --verbose | --verbos | --verbo | --verb)
345 verbose=yes ;;
346
347 -version | --version | --versio | --versi | --vers)
33106b60 348 echo "configure generated by autoconf version 2.12"
5ab6ca68
ILT
349 exit 0 ;;
350
351 -with-* | --with-*)
352 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
353 # Reject names that are not valid shell variable names.
354 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
355 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
356 fi
357 ac_package=`echo $ac_package| sed 's/-/_/g'`
358 case "$ac_option" in
359 *=*) ;;
360 *) ac_optarg=yes ;;
361 esac
362 eval "with_${ac_package}='$ac_optarg'" ;;
363
364 -without-* | --without-*)
365 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
366 # Reject names that are not valid shell variable names.
367 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
368 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
369 fi
370 ac_package=`echo $ac_package| sed 's/-/_/g'`
371 eval "with_${ac_package}=no" ;;
372
373 --x)
374 # Obsolete; use --with-x.
375 with_x=yes ;;
376
377 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
378 | --x-incl | --x-inc | --x-in | --x-i)
379 ac_prev=x_includes ;;
380 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
381 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
382 x_includes="$ac_optarg" ;;
383
384 -x-libraries | --x-libraries | --x-librarie | --x-librari \
385 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
386 ac_prev=x_libraries ;;
387 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
388 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
389 x_libraries="$ac_optarg" ;;
390
391 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
392 ;;
393
626a6542 394 *)
5ab6ca68
ILT
395 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
396 echo "configure: warning: $ac_option: invalid host type" 1>&2
397 fi
398 if test "x$nonopt" != xNONE; then
399 { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
400 fi
401 nonopt="$ac_option"
402 ;;
403
404 esac
405done
a10d26a1 406
5ab6ca68
ILT
407if test -n "$ac_prev"; then
408 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
409fi
99a42820 410
5ab6ca68
ILT
411trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
412
413# File descriptor usage:
414# 0 standard input
415# 1 file creation
416# 2 errors and warnings
417# 3 some systems may open it to /dev/tty
418# 4 used on the Kubota Titan
419# 6 checking for... messages and results
420# 5 compiler messages saved in config.log
421if test "$silent" = yes; then
422 exec 6>/dev/null
423else
424 exec 6>&1
425fi
426exec 5>./config.log
99a42820 427
5ab6ca68
ILT
428echo "\
429This file contains any messages produced by compilers while
430running configure, to aid debugging if configure makes a mistake.
431" 1>&5
432
433# Strip out --no-create and --no-recursion so they do not pile up.
434# Also quote any args containing shell metacharacters.
435ac_configure_args=
436for ac_arg
99a42820 437do
5ab6ca68
ILT
438 case "$ac_arg" in
439 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
440 | --no-cr | --no-c) ;;
441 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
442 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
443 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
444 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
445 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
446 esac
99a42820
RP
447done
448
5ab6ca68 449# NLS nuisances.
33106b60
ILT
450# Only set these to C if already set. These must not be set unconditionally
451# because not all systems understand e.g. LANG=C (notably SCO).
452# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
453# Non-C LC_CTYPE values break the ctype check.
5ab6ca68 454if test "${LANG+set}" = set; then LANG=C; export LANG; fi
33106b60
ILT
455if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
456if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
457if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
5ab6ca68
ILT
458
459# confdefs.h avoids OS command line length limits that DEFS can exceed.
460rm -rf conftest* confdefs.h
461# AIX cpp loses on an empty file, so make sure it contains at least a newline.
462echo > confdefs.h
463
464# A filename unique to this package, relative to the directory that
465# configure is in, which we can look for to find out if srcdir is correct.
466ac_unique_file=ar.c
467
468# Find the source files, if location was not specified.
469if test -z "$srcdir"; then
470 ac_srcdir_defaulted=yes
471 # Try the directory containing this script, then its parent.
472 ac_prog=$0
473 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
474 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
475 srcdir=$ac_confdir
476 if test ! -r $srcdir/$ac_unique_file; then
477 srcdir=..
478 fi
479else
480 ac_srcdir_defaulted=no
481fi
482if test ! -r $srcdir/$ac_unique_file; then
483 if test "$ac_srcdir_defaulted" = yes; then
484 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
485 else
486 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
487 fi
488fi
489srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
490
491# Prefer explicitly selected file to automatically selected ones.
492if test -z "$CONFIG_SITE"; then
493 if test "x$prefix" != xNONE; then
494 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
495 else
496 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
497 fi
b5132a6b 498fi
5ab6ca68
ILT
499for ac_site_file in $CONFIG_SITE; do
500 if test -r "$ac_site_file"; then
501 echo "loading site script $ac_site_file"
502 . "$ac_site_file"
503 fi
504done
b5132a6b 505
5ab6ca68
ILT
506if test -r "$cache_file"; then
507 echo "loading cache $cache_file"
508 . $cache_file
509else
510 echo "creating cache $cache_file"
511 > $cache_file
512fi
513
514ac_ext=c
515# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ea2488ad
ILT
516ac_cpp='$CPP $CPPFLAGS'
517ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
518ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
33106b60 519cross_compiling=$ac_cv_prog_cc_cross
5ab6ca68
ILT
520
521if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
522 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
523 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
524 ac_n= ac_c='
525' ac_t=' '
526 else
527 ac_n=-n ac_c= ac_t=
528 fi
529else
530 ac_n= ac_c='\c' ac_t=
f2e91404 531fi
99a42820 532
b5132a6b 533
5ab6ca68 534
5ab6ca68 535ac_aux_dir=
d467c30d 536for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
5ab6ca68
ILT
537 if test -f $ac_dir/install-sh; then
538 ac_aux_dir=$ac_dir
539 ac_install_sh="$ac_aux_dir/install-sh -c"
540 break
541 elif test -f $ac_dir/install.sh; then
542 ac_aux_dir=$ac_dir
543 ac_install_sh="$ac_aux_dir/install.sh -c"
544 break
545 fi
546done
547if test -z "$ac_aux_dir"; then
d467c30d 548 { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
5ab6ca68
ILT
549fi
550ac_config_guess=$ac_aux_dir/config.guess
551ac_config_sub=$ac_aux_dir/config.sub
552ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
99a42820 553
99a42820 554
5ab6ca68
ILT
555# Do some error checking and defaulting for the host and target type.
556# The inputs are:
557# configure --host=HOST --target=TARGET --build=BUILD NONOPT
558#
559# The rules are:
560# 1. You are not allowed to specify --host, --target, and nonopt at the
626a6542 561# same time.
5ab6ca68
ILT
562# 2. Host defaults to nonopt.
563# 3. If nonopt is not specified, then host defaults to the current host,
564# as determined by config.guess.
565# 4. Target and build default to nonopt.
566# 5. If nonopt is not specified, then target and build default to host.
567
568# The aliases save the names the user supplied, while $host etc.
569# will get canonicalized.
570case $host---$target---$nonopt in
571NONE---*---* | *---NONE---* | *---*---NONE) ;;
572*) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
573esac
574
575
576# Make sure we can run config.sub.
577if $ac_config_sub sun4 >/dev/null 2>&1; then :
578else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
579fi
99a42820 580
5ab6ca68 581echo $ac_n "checking host system type""... $ac_c" 1>&6
d467c30d 582echo "configure:583: checking host system type" >&5
5ab6ca68
ILT
583
584host_alias=$host
585case "$host_alias" in
586NONE)
587 case $nonopt in
588 NONE)
589 if host_alias=`$ac_config_guess`; then :
590 else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
591 fi ;;
592 *) host_alias=$nonopt ;;
593 esac ;;
594esac
595
596host=`$ac_config_sub $host_alias`
33106b60
ILT
597host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
598host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
599host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
5ab6ca68
ILT
600echo "$ac_t""$host" 1>&6
601
602echo $ac_n "checking target system type""... $ac_c" 1>&6
d467c30d 603echo "configure:604: checking target system type" >&5
5ab6ca68
ILT
604
605target_alias=$target
606case "$target_alias" in
607NONE)
608 case $nonopt in
609 NONE) target_alias=$host_alias ;;
610 *) target_alias=$nonopt ;;
611 esac ;;
612esac
613
614target=`$ac_config_sub $target_alias`
33106b60
ILT
615target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
616target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
617target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
5ab6ca68
ILT
618echo "$ac_t""$target" 1>&6
619
620echo $ac_n "checking build system type""... $ac_c" 1>&6
d467c30d 621echo "configure:622: checking build system type" >&5
5ab6ca68
ILT
622
623build_alias=$build
624case "$build_alias" in
625NONE)
626 case $nonopt in
627 NONE) build_alias=$host_alias ;;
628 *) build_alias=$nonopt ;;
629 esac ;;
630esac
631
632build=`$ac_config_sub $build_alias`
33106b60
ILT
633build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
634build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
635build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
5ab6ca68
ILT
636echo "$ac_t""$build" 1>&6
637
638test "$host_alias" != "$target_alias" &&
639 test "$program_prefix$program_suffix$program_transform_name" = \
640 NONENONEs,x,x, &&
641 program_prefix=${target_alias}-
642
d467c30d
ILT
643
644# Find a good install program. We prefer a C program (faster),
645# so one script is as good as another. But avoid the broken or
646# incompatible versions:
647# SysV /etc/install, /usr/sbin/install
648# SunOS /usr/etc/install
649# IRIX /sbin/install
650# AIX /bin/install
651# AFS /usr/afsws/bin/install, which mishandles nonexistent args
652# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
653# ./install, which can be erroneously created by make from ./install.sh.
654echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
655echo "configure:656: checking for a BSD compatible install" >&5
656if test -z "$INSTALL"; then
657if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
658 echo $ac_n "(cached) $ac_c" 1>&6
659else
660 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="${IFS}:"
661 for ac_dir in $PATH; do
662 # Account for people who put trailing slashes in PATH elements.
663 case "$ac_dir/" in
664 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
665 *)
666 # OSF1 and SCO ODT 3.0 have their own names for install.
667 for ac_prog in ginstall installbsd scoinst install; do
668 if test -f $ac_dir/$ac_prog; then
669 if test $ac_prog = install &&
670 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
671 # AIX install. It has an incompatible calling convention.
672 # OSF/1 installbsd also uses dspmsg, but is usable.
673 :
674 else
675 ac_cv_path_install="$ac_dir/$ac_prog -c"
676 break 2
677 fi
678 fi
679 done
680 ;;
681 esac
682 done
683 IFS="$ac_save_IFS"
684
5ab6ca68 685fi
d467c30d
ILT
686 if test "${ac_cv_path_install+set}" = set; then
687 INSTALL="$ac_cv_path_install"
688 else
689 # As a last resort, use the slow shell script. We don't cache a
690 # path for INSTALL within a source directory, because that will
691 # break other packages using the cache if that directory is
692 # removed, or if the path is relative.
693 INSTALL="$ac_install_sh"
694 fi
695fi
696echo "$ac_t""$INSTALL" 1>&6
697
698# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
699# It thinks the first close brace ends the variable substitution.
700test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
701
702test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
703
704
705test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
706
707
708PACKAGE=binutils
709
710VERSION=2.8.2
711
712if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
713 { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
5ab6ca68 714fi
d467c30d
ILT
715cat >> confdefs.h <<EOF
716#define PACKAGE "$PACKAGE"
717EOF
718
719cat >> confdefs.h <<EOF
720#define VERSION "$VERSION"
721EOF
722
723echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
724echo "configure:725: checking whether build environment is sane" >&5
725# Just in case
726sleep 1
727echo timestamp > conftestfile
728# Do `set' in a subshell so we don't clobber the current shell's
729# arguments. Must try -L first in case configure is actually a
730# symlink; some systems play weird games with the mod time of symlinks
731# (eg FreeBSD returns the mod time of the symlink's containing
732# directory).
733if (
734 set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
735 if test "" = "X"; then
736 # -L didn't work.
737 set X `ls -t $srcdir/configure conftestfile`
738 fi
739 test "$2" = conftestfile
740 )
741then
742 # Ok.
743 :
744else
745 { echo "configure: error: newly created file is older than distributed files!
746Check your system clock" 1>&2; exit 1; }
747fi
748rm -f conftest*
749echo "$ac_t""yes" 1>&6
5ab6ca68
ILT
750if test "$program_transform_name" = s,x,x,; then
751 program_transform_name=
752else
626a6542
SC
753 # Double any \ or $. echo might interpret backslashes.
754 cat <<\EOF_SED > conftestsed
755s,\\,\\\\,g; s,\$,$$,g
756EOF_SED
5ab6ca68
ILT
757 program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
758 rm -f conftestsed
759fi
760test "$program_prefix" != NONE &&
761 program_transform_name="s,^,${program_prefix},; $program_transform_name"
762# Use a double $ so make ignores it.
763test "$program_suffix" != NONE &&
764 program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
765
766# sed with no file args requires a program.
767test "$program_transform_name" = "" && program_transform_name="s,x,x,"
768
d467c30d
ILT
769missing_dir=`cd $ac_aux_dir && pwd`
770echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
771echo "configure:772: checking for working aclocal" >&5
772# Run test in a subshell; some versions of sh will print an error if
773# an executable is not found, even if stderr is redirected.
774# Redirect stdin to placate older versions of autoconf. Sigh.
775if (aclocal --version) < /dev/null > /dev/null 2>&1; then
776 ACLOCAL=aclocal
777 echo "$ac_t""found" 1>&6
778else
779 ACLOCAL="$missing_dir/missing aclocal"
780 echo "$ac_t""missing" 1>&6
781fi
782
783echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
784echo "configure:785: checking for working autoconf" >&5
785# Run test in a subshell; some versions of sh will print an error if
786# an executable is not found, even if stderr is redirected.
787# Redirect stdin to placate older versions of autoconf. Sigh.
788if (autoconf --version) < /dev/null > /dev/null 2>&1; then
789 AUTOCONF=autoconf
790 echo "$ac_t""found" 1>&6
791else
792 AUTOCONF="$missing_dir/missing autoconf"
793 echo "$ac_t""missing" 1>&6
794fi
795
796echo $ac_n "checking for working automake""... $ac_c" 1>&6
797echo "configure:798: checking for working automake" >&5
798# Run test in a subshell; some versions of sh will print an error if
799# an executable is not found, even if stderr is redirected.
800# Redirect stdin to placate older versions of autoconf. Sigh.
801if (automake --version) < /dev/null > /dev/null 2>&1; then
802 AUTOMAKE=automake
803 echo "$ac_t""found" 1>&6
804else
805 AUTOMAKE="$missing_dir/missing automake"
806 echo "$ac_t""missing" 1>&6
807fi
808
809echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
810echo "configure:811: checking for working autoheader" >&5
811# Run test in a subshell; some versions of sh will print an error if
812# an executable is not found, even if stderr is redirected.
813# Redirect stdin to placate older versions of autoconf. Sigh.
814if (autoheader --version) < /dev/null > /dev/null 2>&1; then
815 AUTOHEADER=autoheader
816 echo "$ac_t""found" 1>&6
817else
818 AUTOHEADER="$missing_dir/missing autoheader"
819 echo "$ac_t""missing" 1>&6
820fi
821
822echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
823echo "configure:824: checking for working makeinfo" >&5
824# Run test in a subshell; some versions of sh will print an error if
825# an executable is not found, even if stderr is redirected.
826# Redirect stdin to placate older versions of autoconf. Sigh.
827if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
828 MAKEINFO=makeinfo
829 echo "$ac_t""found" 1>&6
830else
831 MAKEINFO="$missing_dir/missing makeinfo"
832 echo "$ac_t""missing" 1>&6
833fi
834
835echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
836echo "configure:837: checking whether ${MAKE-make} sets \${MAKE}" >&5
837set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
838if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
839 echo $ac_n "(cached) $ac_c" 1>&6
840else
841 cat > conftestmake <<\EOF
842all:
843 @echo 'ac_maketemp="${MAKE}"'
844EOF
845# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
846eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
847if test -n "$ac_maketemp"; then
848 eval ac_cv_prog_make_${ac_make}_set=yes
849else
850 eval ac_cv_prog_make_${ac_make}_set=no
851fi
852rm -f conftestmake
853fi
854if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
855 echo "$ac_t""yes" 1>&6
856 SET_MAKE=
857else
858 echo "$ac_t""no" 1>&6
859 SET_MAKE="MAKE=${MAKE-make}"
860fi
5ab6ca68 861
5ab6ca68 862
53fb794b
ILT
863# Extract the first word of "gcc", so it can be a program name with args.
864set dummy gcc; ac_word=$2
865echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
d467c30d 866echo "configure:867: checking for $ac_word" >&5
53fb794b
ILT
867if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
868 echo $ac_n "(cached) $ac_c" 1>&6
869else
870 if test -n "$CC"; then
871 ac_cv_prog_CC="$CC" # Let the user override the test.
872else
873 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
874 for ac_dir in $PATH; do
875 test -z "$ac_dir" && ac_dir=.
876 if test -f $ac_dir/$ac_word; then
877 ac_cv_prog_CC="gcc"
878 break
879 fi
880 done
881 IFS="$ac_save_ifs"
53fb794b
ILT
882fi
883fi
884CC="$ac_cv_prog_CC"
885if test -n "$CC"; then
886 echo "$ac_t""$CC" 1>&6
887else
888 echo "$ac_t""no" 1>&6
889fi
5ab6ca68 890
ea2488ad
ILT
891if test -z "$CC"; then
892 # Extract the first word of "cc", so it can be a program name with args.
893set dummy cc; ac_word=$2
894echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
d467c30d 895echo "configure:896: checking for $ac_word" >&5
ea2488ad
ILT
896if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
897 echo $ac_n "(cached) $ac_c" 1>&6
898else
899 if test -n "$CC"; then
900 ac_cv_prog_CC="$CC" # Let the user override the test.
901else
902 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
903 ac_prog_rejected=no
904 for ac_dir in $PATH; do
905 test -z "$ac_dir" && ac_dir=.
906 if test -f $ac_dir/$ac_word; then
907 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
908 ac_prog_rejected=yes
909 continue
910 fi
911 ac_cv_prog_CC="cc"
912 break
913 fi
914 done
915 IFS="$ac_save_ifs"
916if test $ac_prog_rejected = yes; then
917 # We found a bogon in the path, so make sure we never use it.
918 set dummy $ac_cv_prog_CC
919 shift
920 if test $# -gt 0; then
921 # We chose a different compiler from the bogus one.
922 # However, it has the same basename, so the bogon will be chosen
923 # first if we set CC to just the basename; use the full file name.
924 shift
925 set dummy "$ac_dir/$ac_word" "$@"
926 shift
927 ac_cv_prog_CC="$@"
928 fi
929fi
930fi
931fi
932CC="$ac_cv_prog_CC"
933if test -n "$CC"; then
934 echo "$ac_t""$CC" 1>&6
935else
936 echo "$ac_t""no" 1>&6
937fi
938
939 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
940fi
53fb794b 941
33106b60 942echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
d467c30d 943echo "configure:944: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
33106b60
ILT
944
945ac_ext=c
946# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
947ac_cpp='$CPP $CPPFLAGS'
948ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
949ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
950cross_compiling=$ac_cv_prog_cc_cross
951
952cat > conftest.$ac_ext <<EOF
d467c30d 953#line 954 "configure"
33106b60
ILT
954#include "confdefs.h"
955main(){return(0);}
956EOF
d467c30d 957if { (eval echo configure:958: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
33106b60
ILT
958 ac_cv_prog_cc_works=yes
959 # If we can't run a trivial program, we are probably using a cross compiler.
960 if (./conftest; exit) 2>/dev/null; then
961 ac_cv_prog_cc_cross=no
962 else
963 ac_cv_prog_cc_cross=yes
964 fi
965else
966 echo "configure: failed program was:" >&5
967 cat conftest.$ac_ext >&5
968 ac_cv_prog_cc_works=no
969fi
970rm -fr conftest*
971
972echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
973if test $ac_cv_prog_cc_works = no; then
974 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
975fi
976echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
d467c30d 977echo "configure:978: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
33106b60
ILT
978echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
979cross_compiling=$ac_cv_prog_cc_cross
980
53fb794b 981echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
d467c30d 982echo "configure:983: checking whether we are using GNU C" >&5
53fb794b
ILT
983if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
984 echo $ac_n "(cached) $ac_c" 1>&6
985else
986 cat > conftest.c <<EOF
5ab6ca68
ILT
987#ifdef __GNUC__
988 yes;
989#endif
990EOF
d467c30d 991if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:992: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
53fb794b
ILT
992 ac_cv_prog_gcc=yes
993else
994 ac_cv_prog_gcc=no
995fi
996fi
626a6542 997
53fb794b 998echo "$ac_t""$ac_cv_prog_gcc" 1>&6
33106b60 999
53fb794b 1000if test $ac_cv_prog_gcc = yes; then
5ab6ca68 1001 GCC=yes
33106b60
ILT
1002 ac_test_CFLAGS="${CFLAGS+set}"
1003 ac_save_CFLAGS="$CFLAGS"
1004 CFLAGS=
1005 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
d467c30d 1006echo "configure:1007: checking whether ${CC-cc} accepts -g" >&5
33106b60 1007if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
53fb794b
ILT
1008 echo $ac_n "(cached) $ac_c" 1>&6
1009else
1010 echo 'void f(){}' > conftest.c
1011if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
33106b60 1012 ac_cv_prog_cc_g=yes
53fb794b 1013else
33106b60 1014 ac_cv_prog_cc_g=no
53fb794b
ILT
1015fi
1016rm -f conftest*
1017
1018fi
626a6542 1019
33106b60
ILT
1020echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1021 if test "$ac_test_CFLAGS" = set; then
1022 CFLAGS="$ac_save_CFLAGS"
1023 elif test $ac_cv_prog_cc_g = yes; then
1024 CFLAGS="-g -O2"
1025 else
1026 CFLAGS="-O2"
5ab6ca68
ILT
1027 fi
1028else
1029 GCC=
1030 test "${CFLAGS+set}" = set || CFLAGS="-g"
1031fi
99a42820 1032
d467c30d
ILT
1033# Extract the first word of "ranlib", so it can be a program name with args.
1034set dummy ranlib; ac_word=$2
1035echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1036echo "configure:1037: checking for $ac_word" >&5
1037if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1038 echo $ac_n "(cached) $ac_c" 1>&6
1039else
1040 if test -n "$RANLIB"; then
1041 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1042else
1043 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1044 for ac_dir in $PATH; do
1045 test -z "$ac_dir" && ac_dir=.
1046 if test -f $ac_dir/$ac_word; then
1047 ac_cv_prog_RANLIB="ranlib"
1048 break
1049 fi
1050 done
1051 IFS="$ac_save_ifs"
1052 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1053fi
1054fi
1055RANLIB="$ac_cv_prog_RANLIB"
1056if test -n "$RANLIB"; then
1057 echo "$ac_t""$RANLIB" 1>&6
1058else
1059 echo "$ac_t""no" 1>&6
1060fi
1061
1062# Check whether --with-gnu-ld or --without-gnu-ld was given.
1063if test "${with_gnu_ld+set}" = set; then
1064 withval="$with_gnu_ld"
1065 test "$withval" = no || with_gnu_ld=yes
1066else
1067 with_gnu_ld=no
1068fi
1069
1070if test "$with_gnu_ld" = yes; then
1071 echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
1072echo "configure:1073: checking for GNU ld" >&5
1073else
1074 echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
1075echo "configure:1076: checking for non-GNU ld" >&5
1076fi
1077if eval "test \"`echo '$''{'ac_cv_path_LD'+set}'`\" = set"; then
1078 echo $ac_n "(cached) $ac_c" 1>&6
1079else
1080 case "$LD" in
1081 /*)
1082 ac_cv_path_LD="$LD" # Let the user override the test with a path.
1083 ;;
1084 *)
1085 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1086 for ac_dir in $PATH; do
1087 test -z "$ac_dir" && ac_dir=.
1088 if test -f "$ac_dir/ld"; then
1089 ac_cv_path_LD="$ac_dir/ld"
1090 # Check to see if the program is GNU ld. I'd rather use --version,
1091 # but apparently some GNU ld's only accept -v.
1092 # Break only if it was the GNU/non-GNU ld that we prefer.
1093 if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU ld|with BFD)' > /dev/null; then
1094 test "$with_gnu_ld" = yes && break
1095 else
1096 test "$with_gnu_ld" != yes && break
1097 fi
1098 fi
1099 done
1100 IFS="$ac_save_ifs"
1101 ;;
1102esac
1103fi
1104
1105LD="$ac_cv_path_LD"
1106if test -n "$LD"; then
1107 echo "$ac_t""$LD" 1>&6
1108else
1109 echo "$ac_t""no" 1>&6
1110fi
1111test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
1112
1113echo $ac_n "checking whether we are using GNU ld""... $ac_c" 1>&6
1114echo "configure:1115: checking whether we are using GNU ld" >&5
1115if eval "test \"`echo '$''{'ac_cv_prog_gnu_ld'+set}'`\" = set"; then
1116 echo $ac_n "(cached) $ac_c" 1>&6
1117else
1118 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
1119if $LD -v 2>&1 </dev/null | egrep '(GNU ld|with BFD)' > /dev/null; then
1120 ac_cv_prog_gnu_ld=yes
1121else
1122 ac_cv_prog_gnu_ld=no
1123fi
1124fi
1125
1126echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6
1127
1128
1129echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
1130echo "configure:1131: checking whether ln -s works" >&5
1131if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
1132 echo $ac_n "(cached) $ac_c" 1>&6
1133else
1134 rm -f conftestdata
1135if ln -s X conftestdata 2>/dev/null
1136then
1137 rm -f conftestdata
1138 ac_cv_prog_LN_S="ln -s"
1139else
1140 ac_cv_prog_LN_S=ln
1141fi
1142fi
1143LN_S="$ac_cv_prog_LN_S"
1144if test "$ac_cv_prog_LN_S" = "ln -s"; then
1145 echo "$ac_t""yes" 1>&6
1146else
1147 echo "$ac_t""no" 1>&6
1148fi
1149
1150
1151
1152
1153
1154
1155
1156# Always use our own libtool.
1157LIBTOOL='$(top_builddir)/libtool'
1158
1159
1160# Check whether --enable-shared or --disable-shared was given.
1161if test "${enable_shared+set}" = set; then
1162 enableval="$enable_shared"
931cde32
ILT
1163 if test "$enableval" = no; then
1164 enable_shared=no
d467c30d 1165else
931cde32
ILT
1166 enable_shared=yes
1167fi
d467c30d
ILT
1168fi
1169
931cde32
ILT
1170libtool_shared=
1171test "$enable_shared" = no && libtool_shared=" --disable-shared"
d467c30d
ILT
1172
1173# Check whether --enable-static or --disable-static was given.
1174if test "${enable_static+set}" = set; then
1175 enableval="$enable_static"
931cde32
ILT
1176 if test "$enableval" = no; then
1177 enable_static=no
d467c30d 1178else
931cde32
ILT
1179 enable_static=yes
1180fi
d467c30d 1181fi
5a168a17 1182
931cde32
ILT
1183libtool_static=
1184test "$enable_static" = no && libtool_static=" --disable-static"
5a168a17 1185
d467c30d
ILT
1186libtool_flags="$libtool_shared$libtool_static"
1187test "$silent" = yes && libtool_flags="$libtool_flags --silent"
1188test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
1189test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
5a168a17 1190
d467c30d
ILT
1191# Some flags need to be propagated to the compiler or linker for good
1192# libtool support.
1193case "$host" in
1194*-*-irix6*)
931cde32
ILT
1195 ac_save_CFLAGS="$CFLAGS"
1196 # -n32 always needs to be added to the linker when using GCC.
1197 test "$ac_cv_prog_gcc" = yes && CFLAGS="$CFLAGS -n32"
d467c30d
ILT
1198 for f in '-32' '-64' '-cckr' '-n32' '-mips1' '-mips2' '-mips3' '-mips4'; do
1199 if echo " $CC $CFLAGS " | egrep -e "[ ]$f[ ]" > /dev/null; then
1200 LD="${LD-ld} $f"
1201 fi
1202 done
931cde32 1203 CFLAGS="$ac_save_CFLAGS"
d467c30d
ILT
1204 ;;
1205
1206*-*-sco3.2v5*)
1207 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
1208 CFLAGS="$CFLAGS -belf"
1209 ;;
1210esac
1211
1212# Actually configure libtool. ac_aux_dir is where install-sh is found.
1213CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
1214LD="$LD" RANLIB="$RANLIB" LN_S="$LN_S" \
1215${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig \
1216$libtool_flags --no-verify $ac_aux_dir/ltmain.sh $host \
1217|| { echo "configure: error: libtool configure failed" 1>&2; exit 1; }
1218
1219
1220# Check whether --enable-targets or --disable-targets was given.
1221if test "${enable_targets+set}" = set; then
1222 enableval="$enable_targets"
1223 case "${enableval}" in
1224 yes | "") { echo "configure: error: enable-targets option must specify target names or 'all'" 1>&2; exit 1; }
1225 ;;
1226 no) enable_targets= ;;
1227 *) enable_targets=$enableval ;;
1228esac
1229fi
1230# Check whether --enable-commonbfdlib or --disable-commonbfdlib was given.
1231if test "${enable_commonbfdlib+set}" = set; then
1232 enableval="$enable_commonbfdlib"
1233 case "${enableval}" in
1234 yes) commonbfdlib=true ;;
1235 no) commonbfdlib=false ;;
1236 *) { echo "configure: error: bad value ${enableval} for BFD commonbfdlib option" 1>&2; exit 1; } ;;
1237esac
1238fi
1239
1240
1241
1242
1243
1244if test -z "$target" ; then
1245 { echo "configure: error: Unrecognized target system type; please check config.sub." 1>&2; exit 1; }
1246fi
1247if test -z "$host" ; then
1248 { echo "configure: error: Unrecognized host system type; please check config.sub." 1>&2; exit 1; }
1249fi
1250if test "$program_transform_name" = s,x,x,; then
1251 program_transform_name=
1252else
1253 # Double any \ or $. echo might interpret backslashes.
1254 cat <<\EOF_SED > conftestsed
1255s,\\,\\\\,g; s,\$,$$,g
1256EOF_SED
1257 program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
1258 rm -f conftestsed
1259fi
1260test "$program_prefix" != NONE &&
1261 program_transform_name="s,^,${program_prefix},; $program_transform_name"
1262# Use a double $ so make ignores it.
1263test "$program_suffix" != NONE &&
1264 program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
1265
1266# sed with no file args requires a program.
1267test "$program_transform_name" = "" && program_transform_name="s,x,x,"
36fb98be 1268
efa86453 1269
d467c30d
ILT
1270# Extract the first word of "gcc", so it can be a program name with args.
1271set dummy gcc; ac_word=$2
1272echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
931cde32 1273echo "configure:1274: checking for $ac_word" >&5
d467c30d
ILT
1274if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1275 echo $ac_n "(cached) $ac_c" 1>&6
1276else
1277 if test -n "$CC"; then
1278 ac_cv_prog_CC="$CC" # Let the user override the test.
1279else
1280 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1281 for ac_dir in $PATH; do
1282 test -z "$ac_dir" && ac_dir=.
1283 if test -f $ac_dir/$ac_word; then
1284 ac_cv_prog_CC="gcc"
1285 break
1286 fi
1287 done
1288 IFS="$ac_save_ifs"
1289fi
1290fi
1291CC="$ac_cv_prog_CC"
1292if test -n "$CC"; then
1293 echo "$ac_t""$CC" 1>&6
1294else
1295 echo "$ac_t""no" 1>&6
1296fi
1297
1298if test -z "$CC"; then
1299 # Extract the first word of "cc", so it can be a program name with args.
1300set dummy cc; ac_word=$2
1301echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
931cde32 1302echo "configure:1303: checking for $ac_word" >&5
d467c30d
ILT
1303if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1304 echo $ac_n "(cached) $ac_c" 1>&6
1305else
1306 if test -n "$CC"; then
1307 ac_cv_prog_CC="$CC" # Let the user override the test.
1308else
1309 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1310 ac_prog_rejected=no
1311 for ac_dir in $PATH; do
1312 test -z "$ac_dir" && ac_dir=.
1313 if test -f $ac_dir/$ac_word; then
1314 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1315 ac_prog_rejected=yes
1316 continue
1317 fi
1318 ac_cv_prog_CC="cc"
1319 break
1320 fi
1321 done
1322 IFS="$ac_save_ifs"
1323if test $ac_prog_rejected = yes; then
1324 # We found a bogon in the path, so make sure we never use it.
1325 set dummy $ac_cv_prog_CC
1326 shift
1327 if test $# -gt 0; then
1328 # We chose a different compiler from the bogus one.
1329 # However, it has the same basename, so the bogon will be chosen
1330 # first if we set CC to just the basename; use the full file name.
1331 shift
1332 set dummy "$ac_dir/$ac_word" "$@"
1333 shift
1334 ac_cv_prog_CC="$@"
1335 fi
1336fi
1337fi
1338fi
1339CC="$ac_cv_prog_CC"
1340if test -n "$CC"; then
1341 echo "$ac_t""$CC" 1>&6
1342else
1343 echo "$ac_t""no" 1>&6
1344fi
1345
1346 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1347fi
1348
1349echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
931cde32 1350echo "configure:1351: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
d467c30d
ILT
1351
1352ac_ext=c
1353# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1354ac_cpp='$CPP $CPPFLAGS'
1355ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1356ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1357cross_compiling=$ac_cv_prog_cc_cross
1358
1359cat > conftest.$ac_ext <<EOF
931cde32 1360#line 1361 "configure"
d467c30d
ILT
1361#include "confdefs.h"
1362main(){return(0);}
1363EOF
931cde32 1364if { (eval echo configure:1365: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
d467c30d
ILT
1365 ac_cv_prog_cc_works=yes
1366 # If we can't run a trivial program, we are probably using a cross compiler.
1367 if (./conftest; exit) 2>/dev/null; then
1368 ac_cv_prog_cc_cross=no
1369 else
1370 ac_cv_prog_cc_cross=yes
1371 fi
1372else
1373 echo "configure: failed program was:" >&5
1374 cat conftest.$ac_ext >&5
1375 ac_cv_prog_cc_works=no
1376fi
1377rm -fr conftest*
1378
1379echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1380if test $ac_cv_prog_cc_works = no; then
1381 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1382fi
1383echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
931cde32 1384echo "configure:1385: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
d467c30d
ILT
1385echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1386cross_compiling=$ac_cv_prog_cc_cross
1387
1388echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
931cde32 1389echo "configure:1390: checking whether we are using GNU C" >&5
d467c30d
ILT
1390if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
1391 echo $ac_n "(cached) $ac_c" 1>&6
1392else
1393 cat > conftest.c <<EOF
1394#ifdef __GNUC__
1395 yes;
1396#endif
1397EOF
931cde32 1398if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1399: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
d467c30d
ILT
1399 ac_cv_prog_gcc=yes
1400else
1401 ac_cv_prog_gcc=no
1402fi
1403fi
1404
1405echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1406
1407if test $ac_cv_prog_gcc = yes; then
1408 GCC=yes
1409 ac_test_CFLAGS="${CFLAGS+set}"
1410 ac_save_CFLAGS="$CFLAGS"
1411 CFLAGS=
1412 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
931cde32 1413echo "configure:1414: checking whether ${CC-cc} accepts -g" >&5
d467c30d
ILT
1414if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
1415 echo $ac_n "(cached) $ac_c" 1>&6
1416else
1417 echo 'void f(){}' > conftest.c
1418if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1419 ac_cv_prog_cc_g=yes
1420else
1421 ac_cv_prog_cc_g=no
1422fi
1423rm -f conftest*
1424
1425fi
1426
1427echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1428 if test "$ac_test_CFLAGS" = set; then
1429 CFLAGS="$ac_save_CFLAGS"
1430 elif test $ac_cv_prog_cc_g = yes; then
1431 CFLAGS="-g -O2"
1432 else
1433 CFLAGS="-O2"
1434 fi
1435else
1436 GCC=
1437 test "${CFLAGS+set}" = set || CFLAGS="-g"
1438fi
33106b60 1439
5ab6ca68 1440
d467c30d
ILT
1441for ac_prog in 'bison -y' byacc
1442do
1443# Extract the first word of "$ac_prog", so it can be a program name with args.
1444set dummy $ac_prog; ac_word=$2
5ab6ca68 1445echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
931cde32 1446echo "configure:1447: checking for $ac_word" >&5
d467c30d 1447if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then
5ab6ca68
ILT
1448 echo $ac_n "(cached) $ac_c" 1>&6
1449else
d467c30d
ILT
1450 if test -n "$YACC"; then
1451 ac_cv_prog_YACC="$YACC" # Let the user override the test.
5ab6ca68
ILT
1452else
1453 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1454 for ac_dir in $PATH; do
1455 test -z "$ac_dir" && ac_dir=.
1456 if test -f $ac_dir/$ac_word; then
d467c30d 1457 ac_cv_prog_YACC="$ac_prog"
5ab6ca68
ILT
1458 break
1459 fi
1460 done
1461 IFS="$ac_save_ifs"
5ab6ca68
ILT
1462fi
1463fi
d467c30d
ILT
1464YACC="$ac_cv_prog_YACC"
1465if test -n "$YACC"; then
1466 echo "$ac_t""$YACC" 1>&6
5ab6ca68
ILT
1467else
1468 echo "$ac_t""no" 1>&6
1469fi
1470
d467c30d
ILT
1471test -n "$YACC" && break
1472done
1473test -n "$YACC" || YACC="yacc"
1474
1475# Extract the first word of "flex", so it can be a program name with args.
1476set dummy flex; ac_word=$2
1477echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
931cde32 1478echo "configure:1479: checking for $ac_word" >&5
d467c30d 1479if eval "test \"`echo '$''{'ac_cv_prog_LEX'+set}'`\" = set"; then
5ab6ca68
ILT
1480 echo $ac_n "(cached) $ac_c" 1>&6
1481else
d467c30d
ILT
1482 if test -n "$LEX"; then
1483 ac_cv_prog_LEX="$LEX" # Let the user override the test.
1484else
1485 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
5ab6ca68 1486 for ac_dir in $PATH; do
d467c30d
ILT
1487 test -z "$ac_dir" && ac_dir=.
1488 if test -f $ac_dir/$ac_word; then
1489 ac_cv_prog_LEX="flex"
1490 break
1491 fi
5ab6ca68 1492 done
d467c30d
ILT
1493 IFS="$ac_save_ifs"
1494 test -z "$ac_cv_prog_LEX" && ac_cv_prog_LEX="lex"
5ab6ca68 1495fi
5ab6ca68 1496fi
d467c30d
ILT
1497LEX="$ac_cv_prog_LEX"
1498if test -n "$LEX"; then
1499 echo "$ac_t""$LEX" 1>&6
1500else
1501 echo "$ac_t""no" 1>&6
33106b60 1502fi
36fb98be 1503
d467c30d
ILT
1504if test -z "$LEXLIB"
1505then
1506 case "$LEX" in
1507 flex*) ac_lib=fl ;;
1508 *) ac_lib=l ;;
1509 esac
1510 echo $ac_n "checking for yywrap in -l$ac_lib""... $ac_c" 1>&6
931cde32 1511echo "configure:1512: checking for yywrap in -l$ac_lib" >&5
d467c30d
ILT
1512ac_lib_var=`echo $ac_lib'_'yywrap | sed 'y%./+-%__p_%'`
1513if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1514 echo $ac_n "(cached) $ac_c" 1>&6
1515else
1516 ac_save_LIBS="$LIBS"
1517LIBS="-l$ac_lib $LIBS"
1518cat > conftest.$ac_ext <<EOF
931cde32 1519#line 1520 "configure"
d467c30d
ILT
1520#include "confdefs.h"
1521/* Override any gcc2 internal prototype to avoid an error. */
1522/* We use char because int might match the return type of a gcc2
1523 builtin and then its argument prototype would still apply. */
1524char yywrap();
36fb98be 1525
d467c30d
ILT
1526int main() {
1527yywrap()
1528; return 0; }
1529EOF
931cde32 1530if { (eval echo configure:1531: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
d467c30d
ILT
1531 rm -rf conftest*
1532 eval "ac_cv_lib_$ac_lib_var=yes"
1533else
1534 echo "configure: failed program was:" >&5
1535 cat conftest.$ac_ext >&5
1536 rm -rf conftest*
1537 eval "ac_cv_lib_$ac_lib_var=no"
1538fi
1539rm -f conftest*
1540LIBS="$ac_save_LIBS"
626a6542 1541
d467c30d
ILT
1542fi
1543if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1544 echo "$ac_t""yes" 1>&6
1545 LEXLIB="-l$ac_lib"
1546else
1547 echo "$ac_t""no" 1>&6
320d4f29
ILT
1548fi
1549
d467c30d 1550fi
320d4f29 1551
5ab6ca68 1552echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
931cde32 1553echo "configure:1554: checking how to run the C preprocessor" >&5
5ab6ca68
ILT
1554# On Suns, sometimes $CPP names a directory.
1555if test -n "$CPP" && test -d "$CPP"; then
1556 CPP=
1557fi
1558if test -z "$CPP"; then
1559if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1560 echo $ac_n "(cached) $ac_c" 1>&6
1561else
1562 # This must be in double quotes, not single quotes, because CPP may get
1563 # substituted into the Makefile and "${CC-cc}" will confuse make.
1564 CPP="${CC-cc} -E"
1565 # On the NeXT, cc -E runs the code through the compiler's parser,
1566 # not just through cpp.
1567 cat > conftest.$ac_ext <<EOF
931cde32 1568#line 1569 "configure"
5ab6ca68
ILT
1569#include "confdefs.h"
1570#include <assert.h>
1571Syntax Error
1572EOF
ea2488ad 1573ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
931cde32 1574{ (eval echo configure:1575: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ab6ca68
ILT
1575ac_err=`grep -v '^ *+' conftest.out`
1576if test -z "$ac_err"; then
1577 :
1578else
1579 echo "$ac_err" >&5
33106b60
ILT
1580 echo "configure: failed program was:" >&5
1581 cat conftest.$ac_ext >&5
5ab6ca68
ILT
1582 rm -rf conftest*
1583 CPP="${CC-cc} -E -traditional-cpp"
1584 cat > conftest.$ac_ext <<EOF
931cde32 1585#line 1586 "configure"
5ab6ca68
ILT
1586#include "confdefs.h"
1587#include <assert.h>
1588Syntax Error
1589EOF
ea2488ad 1590ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
931cde32 1591{ (eval echo configure:1592: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ab6ca68
ILT
1592ac_err=`grep -v '^ *+' conftest.out`
1593if test -z "$ac_err"; then
1594 :
1595else
1596 echo "$ac_err" >&5
33106b60
ILT
1597 echo "configure: failed program was:" >&5
1598 cat conftest.$ac_ext >&5
5ab6ca68
ILT
1599 rm -rf conftest*
1600 CPP=/lib/cpp
1601fi
1602rm -f conftest*
1603fi
1604rm -f conftest*
1605 ac_cv_prog_CPP="$CPP"
1606fi
1607 CPP="$ac_cv_prog_CPP"
1608else
1609 ac_cv_prog_CPP="$CPP"
99a42820 1610fi
5ab6ca68 1611echo "$ac_t""$CPP" 1>&6
99a42820 1612
d467c30d 1613echo $ac_n "checking lex output file root""... $ac_c" 1>&6
931cde32 1614echo "configure:1615: checking lex output file root" >&5
d467c30d
ILT
1615if eval "test \"`echo '$''{'ac_cv_prog_lex_root'+set}'`\" = set"; then
1616 echo $ac_n "(cached) $ac_c" 1>&6
1617else
1618 # The minimal lex program is just a single line: %%. But some broken lexes
1619# (Solaris, I think it was) want two %% lines, so accommodate them.
1620echo '%%
1621%%' | $LEX
1622if test -f lex.yy.c; then
1623 ac_cv_prog_lex_root=lex.yy
1624elif test -f lexyy.c; then
1625 ac_cv_prog_lex_root=lexyy
1626else
1627 { echo "configure: error: cannot find output from $LEX; giving up" 1>&2; exit 1; }
1628fi
1629fi
1630
1631echo "$ac_t""$ac_cv_prog_lex_root" 1>&6
1632LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root
1633
1634echo $ac_n "checking whether yytext is a pointer""... $ac_c" 1>&6
931cde32 1635echo "configure:1636: checking whether yytext is a pointer" >&5
d467c30d
ILT
1636if eval "test \"`echo '$''{'ac_cv_prog_lex_yytext_pointer'+set}'`\" = set"; then
1637 echo $ac_n "(cached) $ac_c" 1>&6
1638else
1639 # POSIX says lex can declare yytext either as a pointer or an array; the
1640# default is implementation-dependent. Figure out which it is, since
1641# not all implementations provide the %pointer and %array declarations.
1642ac_cv_prog_lex_yytext_pointer=no
1643echo 'extern char *yytext;' >>$LEX_OUTPUT_ROOT.c
1644ac_save_LIBS="$LIBS"
1645LIBS="$LIBS $LEXLIB"
1646cat > conftest.$ac_ext <<EOF
931cde32 1647#line 1648 "configure"
d467c30d
ILT
1648#include "confdefs.h"
1649`cat $LEX_OUTPUT_ROOT.c`
1650int main() {
1651
1652; return 0; }
1653EOF
931cde32 1654if { (eval echo configure:1655: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
d467c30d
ILT
1655 rm -rf conftest*
1656 ac_cv_prog_lex_yytext_pointer=yes
1657else
1658 echo "configure: failed program was:" >&5
1659 cat conftest.$ac_ext >&5
1660fi
1661rm -f conftest*
1662LIBS="$ac_save_LIBS"
1663rm -f "${LEX_OUTPUT_ROOT}.c"
1664
1665fi
1666
1667echo "$ac_t""$ac_cv_prog_lex_yytext_pointer" 1>&6
1668if test $ac_cv_prog_lex_yytext_pointer = yes; then
1669 cat >> confdefs.h <<\EOF
1670#define YYTEXT_POINTER 1
1671EOF
1672
1673fi
1674
1675
1676echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
931cde32 1677echo "configure:1678: checking whether to enable maintainer-specific portions of Makefiles" >&5
d467c30d
ILT
1678 # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
1679if test "${enable_maintainer_mode+set}" = set; then
1680 enableval="$enable_maintainer_mode"
1681 USE_MAINTAINER_MODE=$enableval
1682else
1683 USE_MAINTAINER_MODE=no
1684fi
1685
1686 echo "$ac_t""$USE_MAINTAINER_MODE" 1>&6
1687 if test $USE_MAINTAINER_MODE = yes; then
1688 MAINT=
1689 else
1690 MAINT='#M#'
1691 fi
1692
1693
1694echo $ac_n "checking for Cygwin32 environment""... $ac_c" 1>&6
931cde32 1695echo "configure:1696: checking for Cygwin32 environment" >&5
d467c30d
ILT
1696if eval "test \"`echo '$''{'am_cv_cygwin32'+set}'`\" = set"; then
1697 echo $ac_n "(cached) $ac_c" 1>&6
1698else
1699 cat > conftest.$ac_ext <<EOF
931cde32 1700#line 1701 "configure"
d467c30d
ILT
1701#include "confdefs.h"
1702
1703int main() {
1704int main () { return __CYGWIN32__; }
1705; return 0; }
1706EOF
931cde32 1707if { (eval echo configure:1708: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
d467c30d
ILT
1708 rm -rf conftest*
1709 am_cv_cygwin32=yes
1710else
1711 echo "configure: failed program was:" >&5
1712 cat conftest.$ac_ext >&5
1713 rm -rf conftest*
1714 am_cv_cygwin32=no
1715fi
1716rm -f conftest*
1717rm -f conftest*
1718fi
1719
1720echo "$ac_t""$am_cv_cygwin32" 1>&6
1721CYGWIN32=
1722test "$am_cv_cygwin32" = yes && CYGWIN32=yes
8496c2a9 1723
d467c30d 1724echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
8496c2a9 1725echo "configure:1726: checking for executable suffix" >&5
d467c30d
ILT
1726if eval "test \"`echo '$''{'am_cv_exeext'+set}'`\" = set"; then
1727 echo $ac_n "(cached) $ac_c" 1>&6
1728else
1729 if test "$CYGWIN32" = yes; then
1730am_cv_exeext=.exe
1731else
1732cat > am_c_test.c << 'EOF'
1733int main() {
1734/* Nothing needed here */
1735}
1736EOF
1737${CC-cc} -o am_c_test $CFLAGS $CPPFLAGS $LDFLAGS am_c_test.c $LIBS 1>&5
8496c2a9 1738am_cv_exeext=`echo am_c_test.* | grep -v am_c_test.c | sed -e s/am_c_test//`
d467c30d
ILT
1739rm -f am_c_test*
1740fi
1741
1742test x"${am_cv_exeext}" = x && am_cv_exeext=no
1743fi
1744EXEEXT=""
1745test x"${am_cv_exeext}" != xno && EXEEXT=${am_cv_exeext}
1746echo "$ac_t""${am_cv_exeext}" 1>&6
1747
1748
1749# host-specific stuff:
1750
1751HDEFINES=
1752
1753. ${srcdir}/../bfd/configure.host
1754
1755
1756AR=${AR-ar}
1757
1758# Extract the first word of "ranlib", so it can be a program name with args.
1759set dummy ranlib; ac_word=$2
1760echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
8496c2a9 1761echo "configure:1762: checking for $ac_word" >&5
d467c30d
ILT
1762if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1763 echo $ac_n "(cached) $ac_c" 1>&6
1764else
1765 if test -n "$RANLIB"; then
1766 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1767else
1768 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1769 for ac_dir in $PATH; do
1770 test -z "$ac_dir" && ac_dir=.
1771 if test -f $ac_dir/$ac_word; then
1772 ac_cv_prog_RANLIB="ranlib"
1773 break
1774 fi
1775 done
1776 IFS="$ac_save_ifs"
1777 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1778fi
1779fi
1780RANLIB="$ac_cv_prog_RANLIB"
1781if test -n "$RANLIB"; then
1782 echo "$ac_t""$RANLIB" 1>&6
1783else
1784 echo "$ac_t""no" 1>&6
1785fi
1786
1787
1788test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
1789
1790
1791# Put a plausible default for CC_FOR_BUILD in Makefile.
1792if test -z "$CC_FOR_BUILD"; then
1793 if test "x$cross_compiling" = "xno"; then
1794 CC_FOR_BUILD='$(CC)'
1795 else
1796 CC_FOR_BUILD=gcc
1797 fi
1798fi
1799
1800
5ab6ca68
ILT
1801for ac_hdr in string.h strings.h stdlib.h unistd.h fcntl.h sys/file.h
1802do
33106b60 1803ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5ab6ca68 1804echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8496c2a9 1805echo "configure:1806: checking for $ac_hdr" >&5
5ab6ca68
ILT
1806if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1807 echo $ac_n "(cached) $ac_c" 1>&6
1808else
1809 cat > conftest.$ac_ext <<EOF
8496c2a9 1810#line 1811 "configure"
5ab6ca68
ILT
1811#include "confdefs.h"
1812#include <$ac_hdr>
1813EOF
ea2488ad 1814ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8496c2a9 1815{ (eval echo configure:1816: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ab6ca68
ILT
1816ac_err=`grep -v '^ *+' conftest.out`
1817if test -z "$ac_err"; then
1818 rm -rf conftest*
1819 eval "ac_cv_header_$ac_safe=yes"
1820else
1821 echo "$ac_err" >&5
33106b60
ILT
1822 echo "configure: failed program was:" >&5
1823 cat conftest.$ac_ext >&5
5ab6ca68
ILT
1824 rm -rf conftest*
1825 eval "ac_cv_header_$ac_safe=no"
ec342d7d 1826fi
5ab6ca68
ILT
1827rm -f conftest*
1828fi
1829if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1830 echo "$ac_t""yes" 1>&6
33106b60 1831 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5ab6ca68
ILT
1832 cat >> confdefs.h <<EOF
1833#define $ac_tr_hdr 1
1834EOF
1835
1836else
1837 echo "$ac_t""no" 1>&6
1838fi
1839done
ec342d7d 1840
27fca56f 1841echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
8496c2a9 1842echo "configure:1843: checking for sys/wait.h that is POSIX.1 compatible" >&5
27fca56f
ILT
1843if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
1844 echo $ac_n "(cached) $ac_c" 1>&6
1845else
1846 cat > conftest.$ac_ext <<EOF
8496c2a9 1847#line 1848 "configure"
27fca56f
ILT
1848#include "confdefs.h"
1849#include <sys/types.h>
1850#include <sys/wait.h>
1851#ifndef WEXITSTATUS
1852#define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
1853#endif
1854#ifndef WIFEXITED
1855#define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
1856#endif
33106b60 1857int main() {
27fca56f
ILT
1858int s;
1859wait (&s);
1860s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
1861; return 0; }
1862EOF
8496c2a9 1863if { (eval echo configure:1864: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
27fca56f
ILT
1864 rm -rf conftest*
1865 ac_cv_header_sys_wait_h=yes
1866else
33106b60
ILT
1867 echo "configure: failed program was:" >&5
1868 cat conftest.$ac_ext >&5
27fca56f
ILT
1869 rm -rf conftest*
1870 ac_cv_header_sys_wait_h=no
1871fi
1872rm -f conftest*
27fca56f 1873fi
626a6542 1874
27fca56f
ILT
1875echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
1876if test $ac_cv_header_sys_wait_h = yes; then
1877 cat >> confdefs.h <<\EOF
1878#define HAVE_SYS_WAIT_H 1
1879EOF
1880
1881fi
1882
33106b60
ILT
1883# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
1884# for constant arguments. Useless!
1885echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
8496c2a9 1886echo "configure:1887: checking for working alloca.h" >&5
33106b60
ILT
1887if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
1888 echo $ac_n "(cached) $ac_c" 1>&6
1889else
1890 cat > conftest.$ac_ext <<EOF
8496c2a9 1891#line 1892 "configure"
33106b60
ILT
1892#include "confdefs.h"
1893#include <alloca.h>
1894int main() {
1895char *p = alloca(2 * sizeof(int));
1896; return 0; }
1897EOF
8496c2a9 1898if { (eval echo configure:1899: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
33106b60
ILT
1899 rm -rf conftest*
1900 ac_cv_header_alloca_h=yes
1901else
1902 echo "configure: failed program was:" >&5
1903 cat conftest.$ac_ext >&5
1904 rm -rf conftest*
1905 ac_cv_header_alloca_h=no
1906fi
1907rm -f conftest*
1908fi
1909
1910echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
1911if test $ac_cv_header_alloca_h = yes; then
1912 cat >> confdefs.h <<\EOF
1913#define HAVE_ALLOCA_H 1
1914EOF
1915
1916fi
1917
1918echo $ac_n "checking for alloca""... $ac_c" 1>&6
8496c2a9 1919echo "configure:1920: checking for alloca" >&5
33106b60
ILT
1920if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
1921 echo $ac_n "(cached) $ac_c" 1>&6
1922else
1923 cat > conftest.$ac_ext <<EOF
8496c2a9 1924#line 1925 "configure"
33106b60
ILT
1925#include "confdefs.h"
1926
1927#ifdef __GNUC__
1928# define alloca __builtin_alloca
1929#else
1930# if HAVE_ALLOCA_H
1931# include <alloca.h>
1932# else
1933# ifdef _AIX
1934 #pragma alloca
1935# else
1936# ifndef alloca /* predefined by HP cc +Olibcalls */
1937char *alloca ();
1938# endif
1939# endif
1940# endif
1941#endif
1942
1943int main() {
1944char *p = (char *) alloca(1);
1945; return 0; }
1946EOF
8496c2a9 1947if { (eval echo configure:1948: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
33106b60
ILT
1948 rm -rf conftest*
1949 ac_cv_func_alloca_works=yes
1950else
1951 echo "configure: failed program was:" >&5
1952 cat conftest.$ac_ext >&5
1953 rm -rf conftest*
1954 ac_cv_func_alloca_works=no
1955fi
1956rm -f conftest*
1957fi
1958
1959echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
1960if test $ac_cv_func_alloca_works = yes; then
1961 cat >> confdefs.h <<\EOF
1962#define HAVE_ALLOCA 1
1963EOF
1964
1965fi
1966
1967if test $ac_cv_func_alloca_works = no; then
1968 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
1969 # that cause trouble. Some versions do not even contain alloca or
1970 # contain a buggy version. If you still want to use their alloca,
1971 # use ar to extract alloca.o from them instead of compiling alloca.c.
1972 ALLOCA=alloca.o
1973 cat >> confdefs.h <<\EOF
1974#define C_ALLOCA 1
1975EOF
1976
1977
1978echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
8496c2a9 1979echo "configure:1980: checking whether alloca needs Cray hooks" >&5
33106b60
ILT
1980if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
1981 echo $ac_n "(cached) $ac_c" 1>&6
1982else
1983 cat > conftest.$ac_ext <<EOF
8496c2a9 1984#line 1985 "configure"
33106b60
ILT
1985#include "confdefs.h"
1986#if defined(CRAY) && ! defined(CRAY2)
1987webecray
1988#else
1989wenotbecray
1990#endif
1991
1992EOF
1993if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1994 egrep "webecray" >/dev/null 2>&1; then
1995 rm -rf conftest*
1996 ac_cv_os_cray=yes
1997else
1998 rm -rf conftest*
1999 ac_cv_os_cray=no
2000fi
2001rm -f conftest*
2002
2003fi
2004
2005echo "$ac_t""$ac_cv_os_cray" 1>&6
2006if test $ac_cv_os_cray = yes; then
2007for ac_func in _getb67 GETB67 getb67; do
2008 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8496c2a9 2009echo "configure:2010: checking for $ac_func" >&5
33106b60
ILT
2010if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2011 echo $ac_n "(cached) $ac_c" 1>&6
2012else
2013 cat > conftest.$ac_ext <<EOF
8496c2a9 2014#line 2015 "configure"
33106b60
ILT
2015#include "confdefs.h"
2016/* System header to define __stub macros and hopefully few prototypes,
2017 which can conflict with char $ac_func(); below. */
2018#include <assert.h>
2019/* Override any gcc2 internal prototype to avoid an error. */
2020/* We use char because int might match the return type of a gcc2
2021 builtin and then its argument prototype would still apply. */
2022char $ac_func();
2023
2024int main() {
2025
2026/* The GNU C library defines this for functions which it implements
2027 to always fail with ENOSYS. Some functions are actually named
2028 something starting with __ and the normal name is an alias. */
2029#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2030choke me
2031#else
2032$ac_func();
2033#endif
2034
2035; return 0; }
2036EOF
8496c2a9 2037if { (eval echo configure:2038: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
33106b60
ILT
2038 rm -rf conftest*
2039 eval "ac_cv_func_$ac_func=yes"
2040else
2041 echo "configure: failed program was:" >&5
2042 cat conftest.$ac_ext >&5
2043 rm -rf conftest*
2044 eval "ac_cv_func_$ac_func=no"
2045fi
2046rm -f conftest*
2047fi
2048
2049if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2050 echo "$ac_t""yes" 1>&6
2051 cat >> confdefs.h <<EOF
2052#define CRAY_STACKSEG_END $ac_func
2053EOF
2054
2055 break
2056else
2057 echo "$ac_t""no" 1>&6
2058fi
2059
2060done
2061fi
2062
2063echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
8496c2a9 2064echo "configure:2065: checking stack direction for C alloca" >&5
33106b60
ILT
2065if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
2066 echo $ac_n "(cached) $ac_c" 1>&6
2067else
2068 if test "$cross_compiling" = yes; then
2069 ac_cv_c_stack_direction=0
2070else
2071 cat > conftest.$ac_ext <<EOF
8496c2a9 2072#line 2073 "configure"
33106b60
ILT
2073#include "confdefs.h"
2074find_stack_direction ()
2075{
2076 static char *addr = 0;
2077 auto char dummy;
2078 if (addr == 0)
2079 {
2080 addr = &dummy;
2081 return find_stack_direction ();
2082 }
2083 else
2084 return (&dummy > addr) ? 1 : -1;
2085}
2086main ()
2087{
2088 exit (find_stack_direction() < 0);
2089}
2090EOF
8496c2a9 2091if { (eval echo configure:2092: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
33106b60
ILT
2092then
2093 ac_cv_c_stack_direction=1
2094else
2095 echo "configure: failed program was:" >&5
2096 cat conftest.$ac_ext >&5
2097 rm -fr conftest*
2098 ac_cv_c_stack_direction=-1
2099fi
2100rm -fr conftest*
2101fi
2102
2103fi
2104
2105echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
2106cat >> confdefs.h <<EOF
2107#define STACK_DIRECTION $ac_cv_c_stack_direction
2108EOF
2109
2110fi
2111
5ab6ca68
ILT
2112for ac_func in sbrk utimes
2113do
2114echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8496c2a9 2115echo "configure:2116: checking for $ac_func" >&5
5ab6ca68
ILT
2116if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2117 echo $ac_n "(cached) $ac_c" 1>&6
2118else
2119 cat > conftest.$ac_ext <<EOF
8496c2a9 2120#line 2121 "configure"
5ab6ca68
ILT
2121#include "confdefs.h"
2122/* System header to define __stub macros and hopefully few prototypes,
2123 which can conflict with char $ac_func(); below. */
2124#include <assert.h>
2125/* Override any gcc2 internal prototype to avoid an error. */
33106b60
ILT
2126/* We use char because int might match the return type of a gcc2
2127 builtin and then its argument prototype would still apply. */
626a6542 2128char $ac_func();
5ab6ca68 2129
33106b60 2130int main() {
5ab6ca68
ILT
2131
2132/* The GNU C library defines this for functions which it implements
2133 to always fail with ENOSYS. Some functions are actually named
2134 something starting with __ and the normal name is an alias. */
2135#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2136choke me
2137#else
2138$ac_func();
2139#endif
2140
2141; return 0; }
2142EOF
8496c2a9 2143if { (eval echo configure:2144: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
5ab6ca68
ILT
2144 rm -rf conftest*
2145 eval "ac_cv_func_$ac_func=yes"
2146else
33106b60
ILT
2147 echo "configure: failed program was:" >&5
2148 cat conftest.$ac_ext >&5
5ab6ca68
ILT
2149 rm -rf conftest*
2150 eval "ac_cv_func_$ac_func=no"
2151fi
2152rm -f conftest*
5ab6ca68 2153fi
33106b60 2154
5ab6ca68
ILT
2155if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2156 echo "$ac_t""yes" 1>&6
626a6542 2157 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5ab6ca68
ILT
2158 cat >> confdefs.h <<EOF
2159#define $ac_tr_func 1
2160EOF
2161
2162else
2163 echo "$ac_t""no" 1>&6
2164fi
2165done
2166
33106b60
ILT
2167if test "x$cross_compiling" = "xno"; then
2168 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
8496c2a9 2169echo "configure:2170: checking for ANSI C header files" >&5
33106b60
ILT
2170if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
2171 echo $ac_n "(cached) $ac_c" 1>&6
2172else
2173 cat > conftest.$ac_ext <<EOF
8496c2a9 2174#line 2175 "configure"
33106b60
ILT
2175#include "confdefs.h"
2176#include <stdlib.h>
2177#include <stdarg.h>
2178#include <string.h>
2179#include <float.h>
2180EOF
2181ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8496c2a9 2182{ (eval echo configure:2183: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
33106b60
ILT
2183ac_err=`grep -v '^ *+' conftest.out`
2184if test -z "$ac_err"; then
2185 rm -rf conftest*
2186 ac_cv_header_stdc=yes
2187else
2188 echo "$ac_err" >&5
2189 echo "configure: failed program was:" >&5
2190 cat conftest.$ac_ext >&5
2191 rm -rf conftest*
2192 ac_cv_header_stdc=no
2193fi
2194rm -f conftest*
2195
2196if test $ac_cv_header_stdc = yes; then
2197 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
2198cat > conftest.$ac_ext <<EOF
8496c2a9 2199#line 2200 "configure"
33106b60
ILT
2200#include "confdefs.h"
2201#include <string.h>
2202EOF
2203if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2204 egrep "memchr" >/dev/null 2>&1; then
2205 :
2206else
2207 rm -rf conftest*
2208 ac_cv_header_stdc=no
2209fi
2210rm -f conftest*
2211
2212fi
2213
2214if test $ac_cv_header_stdc = yes; then
2215 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
2216cat > conftest.$ac_ext <<EOF
8496c2a9 2217#line 2218 "configure"
33106b60
ILT
2218#include "confdefs.h"
2219#include <stdlib.h>
2220EOF
2221if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2222 egrep "free" >/dev/null 2>&1; then
2223 :
2224else
2225 rm -rf conftest*
2226 ac_cv_header_stdc=no
2227fi
2228rm -f conftest*
2229
2230fi
2231
2232if test $ac_cv_header_stdc = yes; then
2233 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
2234if test "$cross_compiling" = yes; then
2235 :
2236else
2237 cat > conftest.$ac_ext <<EOF
8496c2a9 2238#line 2239 "configure"
33106b60
ILT
2239#include "confdefs.h"
2240#include <ctype.h>
2241#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
2242#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
2243#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
2244int main () { int i; for (i = 0; i < 256; i++)
2245if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
2246exit (0); }
2247
2248EOF
8496c2a9 2249if { (eval echo configure:2250: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
33106b60
ILT
2250then
2251 :
2252else
2253 echo "configure: failed program was:" >&5
2254 cat conftest.$ac_ext >&5
2255 rm -fr conftest*
2256 ac_cv_header_stdc=no
2257fi
2258rm -fr conftest*
2259fi
2260
2261fi
2262fi
2263
2264echo "$ac_t""$ac_cv_header_stdc" 1>&6
2265if test $ac_cv_header_stdc = yes; then
2266 cat >> confdefs.h <<\EOF
2267#define STDC_HEADERS 1
2268EOF
2269
2270fi
2271
2272echo $ac_n "checking for pid_t""... $ac_c" 1>&6
8496c2a9 2273echo "configure:2274: checking for pid_t" >&5
33106b60
ILT
2274if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
2275 echo $ac_n "(cached) $ac_c" 1>&6
2276else
2277 cat > conftest.$ac_ext <<EOF
8496c2a9 2278#line 2279 "configure"
33106b60
ILT
2279#include "confdefs.h"
2280#include <sys/types.h>
2281#if STDC_HEADERS
2282#include <stdlib.h>
2283#include <stddef.h>
2284#endif
2285EOF
2286if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2287 egrep "pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
2288 rm -rf conftest*
2289 ac_cv_type_pid_t=yes
2290else
2291 rm -rf conftest*
2292 ac_cv_type_pid_t=no
2293fi
2294rm -f conftest*
2295
2296fi
2297echo "$ac_t""$ac_cv_type_pid_t" 1>&6
2298if test $ac_cv_type_pid_t = no; then
2299 cat >> confdefs.h <<\EOF
2300#define pid_t int
2301EOF
2302
2303fi
2304
2305ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'`
2306echo $ac_n "checking for vfork.h""... $ac_c" 1>&6
8496c2a9 2307echo "configure:2308: checking for vfork.h" >&5
33106b60
ILT
2308if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2309 echo $ac_n "(cached) $ac_c" 1>&6
2310else
2311 cat > conftest.$ac_ext <<EOF
8496c2a9 2312#line 2313 "configure"
33106b60
ILT
2313#include "confdefs.h"
2314#include <vfork.h>
2315EOF
2316ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8496c2a9 2317{ (eval echo configure:2318: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
33106b60
ILT
2318ac_err=`grep -v '^ *+' conftest.out`
2319if test -z "$ac_err"; then
2320 rm -rf conftest*
2321 eval "ac_cv_header_$ac_safe=yes"
2322else
2323 echo "$ac_err" >&5
2324 echo "configure: failed program was:" >&5
2325 cat conftest.$ac_ext >&5
2326 rm -rf conftest*
2327 eval "ac_cv_header_$ac_safe=no"
2328fi
2329rm -f conftest*
2330fi
2331if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2332 echo "$ac_t""yes" 1>&6
2333 cat >> confdefs.h <<\EOF
2334#define HAVE_VFORK_H 1
2335EOF
2336
2337else
2338 echo "$ac_t""no" 1>&6
2339fi
2340
2341echo $ac_n "checking for working vfork""... $ac_c" 1>&6
8496c2a9 2342echo "configure:2343: checking for working vfork" >&5
33106b60
ILT
2343if eval "test \"`echo '$''{'ac_cv_func_vfork_works'+set}'`\" = set"; then
2344 echo $ac_n "(cached) $ac_c" 1>&6
2345else
2346 if test "$cross_compiling" = yes; then
2347 echo $ac_n "checking for vfork""... $ac_c" 1>&6
8496c2a9 2348echo "configure:2349: checking for vfork" >&5
33106b60
ILT
2349if eval "test \"`echo '$''{'ac_cv_func_vfork'+set}'`\" = set"; then
2350 echo $ac_n "(cached) $ac_c" 1>&6
2351else
2352 cat > conftest.$ac_ext <<EOF
8496c2a9 2353#line 2354 "configure"
33106b60
ILT
2354#include "confdefs.h"
2355/* System header to define __stub macros and hopefully few prototypes,
2356 which can conflict with char vfork(); below. */
2357#include <assert.h>
2358/* Override any gcc2 internal prototype to avoid an error. */
2359/* We use char because int might match the return type of a gcc2
2360 builtin and then its argument prototype would still apply. */
2361char vfork();
2362
2363int main() {
2364
2365/* The GNU C library defines this for functions which it implements
2366 to always fail with ENOSYS. Some functions are actually named
2367 something starting with __ and the normal name is an alias. */
2368#if defined (__stub_vfork) || defined (__stub___vfork)
2369choke me
2370#else
2371vfork();
2372#endif
2373
2374; return 0; }
2375EOF
8496c2a9 2376if { (eval echo configure:2377: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
33106b60
ILT
2377 rm -rf conftest*
2378 eval "ac_cv_func_vfork=yes"
2379else
2380 echo "configure: failed program was:" >&5
2381 cat conftest.$ac_ext >&5
2382 rm -rf conftest*
2383 eval "ac_cv_func_vfork=no"
2384fi
2385rm -f conftest*
2386fi
2387
2388if eval "test \"`echo '$ac_cv_func_'vfork`\" = yes"; then
2389 echo "$ac_t""yes" 1>&6
2390 :
2391else
2392 echo "$ac_t""no" 1>&6
2393fi
2394
2395else
2396 cat > conftest.$ac_ext <<EOF
8496c2a9 2397#line 2398 "configure"
33106b60
ILT
2398#include "confdefs.h"
2399/* Thanks to Paul Eggert for this test. */
2400#include <stdio.h>
2401#include <sys/types.h>
2402#include <sys/stat.h>
2403#ifdef HAVE_UNISTD_H
2404#include <unistd.h>
2405#endif
2406#ifdef HAVE_VFORK_H
2407#include <vfork.h>
2408#endif
2409/* On some sparc systems, changes by the child to local and incoming
2410 argument registers are propagated back to the parent.
2411 The compiler is told about this with #include <vfork.h>,
2412 but some compilers (e.g. gcc -O) don't grok <vfork.h>.
2413 Test for this by using a static variable whose address
2414 is put into a register that is clobbered by the vfork. */
2415static
2416#ifdef __cplusplus
2417sparc_address_test (int arg)
2418#else
2419sparc_address_test (arg) int arg;
2420#endif
2421{
2422 static pid_t child;
2423 if (!child) {
2424 child = vfork ();
2425 if (child < 0) {
2426 perror ("vfork");
2427 _exit(2);
2428 }
2429 if (!child) {
2430 arg = getpid();
2431 write(-1, "", 0);
2432 _exit (arg);
2433 }
2434 }
2435}
2436main() {
2437 pid_t parent = getpid ();
2438 pid_t child;
2439
2440 sparc_address_test ();
2441
2442 child = vfork ();
2443
2444 if (child == 0) {
2445 /* Here is another test for sparc vfork register problems.
2446 This test uses lots of local variables, at least
2447 as many local variables as main has allocated so far
2448 including compiler temporaries. 4 locals are enough for
2449 gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe.
2450 A buggy compiler should reuse the register of parent
2451 for one of the local variables, since it will think that
2452 parent can't possibly be used any more in this routine.
2453 Assigning to the local variable will thus munge parent
2454 in the parent process. */
2455 pid_t
2456 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
2457 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
2458 /* Convince the compiler that p..p7 are live; otherwise, it might
2459 use the same hardware register for all 8 local variables. */
2460 if (p != p1 || p != p2 || p != p3 || p != p4
2461 || p != p5 || p != p6 || p != p7)
2462 _exit(1);
2463
2464 /* On some systems (e.g. IRIX 3.3),
2465 vfork doesn't separate parent from child file descriptors.
2466 If the child closes a descriptor before it execs or exits,
2467 this munges the parent's descriptor as well.
2468 Test for this by closing stdout in the child. */
2469 _exit(close(fileno(stdout)) != 0);
2470 } else {
2471 int status;
2472 struct stat st;
2473
2474 while (wait(&status) != child)
2475 ;
2476 exit(
2477 /* Was there some problem with vforking? */
2478 child < 0
2479
2480 /* Did the child fail? (This shouldn't happen.) */
2481 || status
2482
2483 /* Did the vfork/compiler bug occur? */
2484 || parent != getpid()
2485
2486 /* Did the file descriptor bug occur? */
2487 || fstat(fileno(stdout), &st) != 0
2488 );
2489 }
2490}
2491EOF
8496c2a9 2492if { (eval echo configure:2493: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
33106b60
ILT
2493then
2494 ac_cv_func_vfork_works=yes
2495else
2496 echo "configure: failed program was:" >&5
2497 cat conftest.$ac_ext >&5
2498 rm -fr conftest*
2499 ac_cv_func_vfork_works=no
2500fi
2501rm -fr conftest*
2502fi
2503
2504fi
2505
2506echo "$ac_t""$ac_cv_func_vfork_works" 1>&6
2507if test $ac_cv_func_vfork_works = no; then
2508 cat >> confdefs.h <<\EOF
2509#define vfork fork
2510EOF
2511
2512fi
2513
2514else
2515 echo $ac_n "checking for vfork""... $ac_c" 1>&6
8496c2a9 2516echo "configure:2517: checking for vfork" >&5
33106b60
ILT
2517if eval "test \"`echo '$''{'ac_cv_func_vfork'+set}'`\" = set"; then
2518 echo $ac_n "(cached) $ac_c" 1>&6
2519else
2520 cat > conftest.$ac_ext <<EOF
8496c2a9 2521#line 2522 "configure"
33106b60
ILT
2522#include "confdefs.h"
2523/* System header to define __stub macros and hopefully few prototypes,
2524 which can conflict with char vfork(); below. */
2525#include <assert.h>
2526/* Override any gcc2 internal prototype to avoid an error. */
2527/* We use char because int might match the return type of a gcc2
2528 builtin and then its argument prototype would still apply. */
2529char vfork();
2530
2531int main() {
2532
2533/* The GNU C library defines this for functions which it implements
2534 to always fail with ENOSYS. Some functions are actually named
2535 something starting with __ and the normal name is an alias. */
2536#if defined (__stub_vfork) || defined (__stub___vfork)
2537choke me
2538#else
2539vfork();
2540#endif
2541
2542; return 0; }
2543EOF
8496c2a9 2544if { (eval echo configure:2545: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
33106b60
ILT
2545 rm -rf conftest*
2546 eval "ac_cv_func_vfork=yes"
2547else
2548 echo "configure: failed program was:" >&5
2549 cat conftest.$ac_ext >&5
2550 rm -rf conftest*
2551 eval "ac_cv_func_vfork=no"
2552fi
2553rm -f conftest*
2554fi
2555
2556if eval "test \"`echo '$ac_cv_func_'vfork`\" = yes"; then
2557 echo "$ac_t""yes" 1>&6
2558 :
2559else
2560 echo "$ac_t""no" 1>&6
2561cat >> confdefs.h <<\EOF
2562#define vfork fork
2563EOF
2564
2565fi
2566
2567fi
5ab6ca68
ILT
2568
2569echo $ac_n "checking for time_t in time.h""... $ac_c" 1>&6
8496c2a9 2570echo "configure:2571: checking for time_t in time.h" >&5
5ab6ca68
ILT
2571if eval "test \"`echo '$''{'bu_cv_decl_time_t_time_h'+set}'`\" = set"; then
2572 echo $ac_n "(cached) $ac_c" 1>&6
2573else
2574 cat > conftest.$ac_ext <<EOF
8496c2a9 2575#line 2576 "configure"
5ab6ca68
ILT
2576#include "confdefs.h"
2577#include <time.h>
33106b60 2578int main() {
5ab6ca68
ILT
2579time_t i;
2580; return 0; }
2581EOF
8496c2a9 2582if { (eval echo configure:2583: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5ab6ca68
ILT
2583 rm -rf conftest*
2584 bu_cv_decl_time_t_time_h=yes
2585else
33106b60
ILT
2586 echo "configure: failed program was:" >&5
2587 cat conftest.$ac_ext >&5
5ab6ca68
ILT
2588 rm -rf conftest*
2589 bu_cv_decl_time_t_time_h=no
2590fi
2591rm -f conftest*
5ab6ca68 2592fi
6c18e393 2593
5ab6ca68
ILT
2594echo "$ac_t""$bu_cv_decl_time_t_time_h" 1>&6
2595if test $bu_cv_decl_time_t_time_h = yes; then
2596 cat >> confdefs.h <<\EOF
2597#define HAVE_TIME_T_IN_TIME_H 1
2598EOF
2599
2600fi
99a42820 2601
5ab6ca68 2602echo $ac_n "checking for time_t in sys/types.h""... $ac_c" 1>&6
8496c2a9 2603echo "configure:2604: checking for time_t in sys/types.h" >&5
5ab6ca68
ILT
2604if eval "test \"`echo '$''{'bu_cv_decl_time_t_types_h'+set}'`\" = set"; then
2605 echo $ac_n "(cached) $ac_c" 1>&6
5a168a17 2606else
5ab6ca68 2607 cat > conftest.$ac_ext <<EOF
8496c2a9 2608#line 2609 "configure"
5ab6ca68
ILT
2609#include "confdefs.h"
2610#include <sys/types.h>
33106b60 2611int main() {
5ab6ca68
ILT
2612time_t i;
2613; return 0; }
2614EOF
8496c2a9 2615if { (eval echo configure:2616: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5ab6ca68
ILT
2616 rm -rf conftest*
2617 bu_cv_decl_time_t_types_h=yes
2618else
33106b60
ILT
2619 echo "configure: failed program was:" >&5
2620 cat conftest.$ac_ext >&5
5ab6ca68
ILT
2621 rm -rf conftest*
2622 bu_cv_decl_time_t_types_h=no
2623fi
2624rm -f conftest*
5ab6ca68
ILT
2625fi
2626
2627echo "$ac_t""$bu_cv_decl_time_t_types_h" 1>&6
2628if test $bu_cv_decl_time_t_types_h = yes; then
2629 cat >> confdefs.h <<\EOF
2630#define HAVE_TIME_T_IN_TYPES_H 1
2631EOF
2632
2633fi
2634
2635# Under Next 3.2 <utime.h> apparently does not define struct utimbuf
2636# by default.
2637echo $ac_n "checking for utime.h""... $ac_c" 1>&6
8496c2a9 2638echo "configure:2639: checking for utime.h" >&5
5ab6ca68
ILT
2639if eval "test \"`echo '$''{'bu_cv_header_utime_h'+set}'`\" = set"; then
2640 echo $ac_n "(cached) $ac_c" 1>&6
2641else
2642 cat > conftest.$ac_ext <<EOF
8496c2a9 2643#line 2644 "configure"
5ab6ca68
ILT
2644#include "confdefs.h"
2645#include <sys/types.h>
2646#ifdef HAVE_TIME_H
2647#include <time.h>
2648#endif
2649#include <utime.h>
33106b60 2650int main() {
5ab6ca68
ILT
2651struct utimbuf s;
2652; return 0; }
2653EOF
8496c2a9 2654if { (eval echo configure:2655: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5ab6ca68
ILT
2655 rm -rf conftest*
2656 bu_cv_header_utime_h=yes
2657else
33106b60
ILT
2658 echo "configure: failed program was:" >&5
2659 cat conftest.$ac_ext >&5
5ab6ca68
ILT
2660 rm -rf conftest*
2661 bu_cv_header_utime_h=no
2662fi
2663rm -f conftest*
5ab6ca68
ILT
2664fi
2665
2666echo "$ac_t""$bu_cv_header_utime_h" 1>&6
2667if test $bu_cv_header_utime_h = yes; then
2668 cat >> confdefs.h <<\EOF
2669#define HAVE_GOOD_UTIME_H 1
2670EOF
2671
5a168a17
RP
2672fi
2673
5ab6ca68 2674echo $ac_n "checking whether fprintf must be declared""... $ac_c" 1>&6
8496c2a9 2675echo "configure:2676: checking whether fprintf must be declared" >&5
53fb794b 2676if eval "test \"`echo '$''{'bfd_cv_decl_needed_fprintf'+set}'`\" = set"; then
5ab6ca68
ILT
2677 echo $ac_n "(cached) $ac_c" 1>&6
2678else
2679 cat > conftest.$ac_ext <<EOF
8496c2a9 2680#line 2681 "configure"
5ab6ca68 2681#include "confdefs.h"
53fb794b 2682
5ab6ca68 2683#include <stdio.h>
33106b60
ILT
2684#ifdef HAVE_STRING_H
2685#include <string.h>
2686#else
2687#ifdef HAVE_STRINGS_H
2688#include <strings.h>
2689#endif
2690#endif
53fb794b
ILT
2691#ifdef HAVE_STDLIB_H
2692#include <stdlib.h>
2693#endif
2694#ifdef HAVE_UNISTD_H
2695#include <unistd.h>
2696#endif
33106b60 2697int main() {
53fb794b 2698char *(*pfn) = (char *(*)) fprintf
5ab6ca68
ILT
2699; return 0; }
2700EOF
8496c2a9 2701if { (eval echo configure:2702: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5ab6ca68 2702 rm -rf conftest*
53fb794b 2703 bfd_cv_decl_needed_fprintf=no
5ab6ca68 2704else
33106b60
ILT
2705 echo "configure: failed program was:" >&5
2706 cat conftest.$ac_ext >&5
5ab6ca68 2707 rm -rf conftest*
53fb794b 2708 bfd_cv_decl_needed_fprintf=yes
5ab6ca68
ILT
2709fi
2710rm -f conftest*
5ab6ca68
ILT
2711fi
2712
53fb794b
ILT
2713echo "$ac_t""$bfd_cv_decl_needed_fprintf" 1>&6
2714if test $bfd_cv_decl_needed_fprintf = yes; then
2715 bfd_tr_decl=NEED_DECLARATION_`echo fprintf | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2716 cat >> confdefs.h <<EOF
2717#define $bfd_tr_decl 1
5ab6ca68
ILT
2718EOF
2719
2720fi
2721
33106b60 2722echo $ac_n "checking whether strstr must be declared""... $ac_c" 1>&6
8496c2a9 2723echo "configure:2724: checking whether strstr must be declared" >&5
33106b60
ILT
2724if eval "test \"`echo '$''{'bfd_cv_decl_needed_strstr'+set}'`\" = set"; then
2725 echo $ac_n "(cached) $ac_c" 1>&6
2726else
2727 cat > conftest.$ac_ext <<EOF
8496c2a9 2728#line 2729 "configure"
33106b60
ILT
2729#include "confdefs.h"
2730
2731#include <stdio.h>
2732#ifdef HAVE_STRING_H
2733#include <string.h>
2734#else
2735#ifdef HAVE_STRINGS_H
2736#include <strings.h>
2737#endif
2738#endif
2739#ifdef HAVE_STDLIB_H
2740#include <stdlib.h>
2741#endif
2742#ifdef HAVE_UNISTD_H
2743#include <unistd.h>
2744#endif
2745int main() {
2746char *(*pfn) = (char *(*)) strstr
2747; return 0; }
2748EOF
8496c2a9 2749if { (eval echo configure:2750: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
33106b60
ILT
2750 rm -rf conftest*
2751 bfd_cv_decl_needed_strstr=no
2752else
2753 echo "configure: failed program was:" >&5
2754 cat conftest.$ac_ext >&5
2755 rm -rf conftest*
2756 bfd_cv_decl_needed_strstr=yes
2757fi
2758rm -f conftest*
2759fi
2760
2761echo "$ac_t""$bfd_cv_decl_needed_strstr" 1>&6
2762if test $bfd_cv_decl_needed_strstr = yes; then
2763 bfd_tr_decl=NEED_DECLARATION_`echo strstr | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2764 cat >> confdefs.h <<EOF
2765#define $bfd_tr_decl 1
2766EOF
2767
2768fi
2769
2770echo $ac_n "checking whether sbrk must be declared""... $ac_c" 1>&6
8496c2a9 2771echo "configure:2772: checking whether sbrk must be declared" >&5
33106b60
ILT
2772if eval "test \"`echo '$''{'bfd_cv_decl_needed_sbrk'+set}'`\" = set"; then
2773 echo $ac_n "(cached) $ac_c" 1>&6
2774else
2775 cat > conftest.$ac_ext <<EOF
8496c2a9 2776#line 2777 "configure"
33106b60
ILT
2777#include "confdefs.h"
2778
2779#include <stdio.h>
2780#ifdef HAVE_STRING_H
2781#include <string.h>
2782#else
2783#ifdef HAVE_STRINGS_H
2784#include <strings.h>
2785#endif
2786#endif
2787#ifdef HAVE_STDLIB_H
2788#include <stdlib.h>
2789#endif
2790#ifdef HAVE_UNISTD_H
2791#include <unistd.h>
2792#endif
2793int main() {
2794char *(*pfn) = (char *(*)) sbrk
2795; return 0; }
2796EOF
8496c2a9 2797if { (eval echo configure:2798: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
33106b60
ILT
2798 rm -rf conftest*
2799 bfd_cv_decl_needed_sbrk=no
2800else
2801 echo "configure: failed program was:" >&5
2802 cat conftest.$ac_ext >&5
2803 rm -rf conftest*
2804 bfd_cv_decl_needed_sbrk=yes
2805fi
2806rm -f conftest*
2807fi
2808
2809echo "$ac_t""$bfd_cv_decl_needed_sbrk" 1>&6
2810if test $bfd_cv_decl_needed_sbrk = yes; then
2811 bfd_tr_decl=NEED_DECLARATION_`echo sbrk | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2812 cat >> confdefs.h <<EOF
2813#define $bfd_tr_decl 1
2814EOF
2815
2816fi
2817
2818echo $ac_n "checking whether getenv must be declared""... $ac_c" 1>&6
8496c2a9 2819echo "configure:2820: checking whether getenv must be declared" >&5
33106b60
ILT
2820if eval "test \"`echo '$''{'bfd_cv_decl_needed_getenv'+set}'`\" = set"; then
2821 echo $ac_n "(cached) $ac_c" 1>&6
2822else
2823 cat > conftest.$ac_ext <<EOF
8496c2a9 2824#line 2825 "configure"
33106b60
ILT
2825#include "confdefs.h"
2826
2827#include <stdio.h>
2828#ifdef HAVE_STRING_H
2829#include <string.h>
2830#else
2831#ifdef HAVE_STRINGS_H
2832#include <strings.h>
2833#endif
2834#endif
2835#ifdef HAVE_STDLIB_H
2836#include <stdlib.h>
2837#endif
2838#ifdef HAVE_UNISTD_H
2839#include <unistd.h>
2840#endif
2841int main() {
2842char *(*pfn) = (char *(*)) getenv
2843; return 0; }
2844EOF
8496c2a9 2845if { (eval echo configure:2846: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
33106b60
ILT
2846 rm -rf conftest*
2847 bfd_cv_decl_needed_getenv=no
2848else
2849 echo "configure: failed program was:" >&5
2850 cat conftest.$ac_ext >&5
2851 rm -rf conftest*
2852 bfd_cv_decl_needed_getenv=yes
2853fi
2854rm -f conftest*
2855fi
2856
2857echo "$ac_t""$bfd_cv_decl_needed_getenv" 1>&6
2858if test $bfd_cv_decl_needed_getenv = yes; then
2859 bfd_tr_decl=NEED_DECLARATION_`echo getenv | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2860 cat >> confdefs.h <<EOF
2861#define $bfd_tr_decl 1
2862EOF
2863
2864fi
2865
53fb794b
ILT
2866
2867
5ab6ca68 2868case "${host}" in
33106b60 2869i[345]86-*-msdos* | i[345]86-*-go32* | *-*-cygwin32 | *-*-windows)
5ab6ca68
ILT
2870 cat >> confdefs.h <<\EOF
2871#define USE_BINARY_FOPEN 1
2872EOF
2873 ;;
2874esac
2875
2876# target-specific stuff:
2877
2878# Canonicalize the secondary target names.
5ab6ca68
ILT
2879if test -n "$enable_targets"; then
2880 for targ in `echo $enable_targets | sed 's/,/ /g'`
2881 do
1d371d35 2882 result=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $targ 2>/dev/null`
5ab6ca68
ILT
2883 if test -n "$result"; then
2884 canon_targets="$canon_targets $result"
2885 else
2886 # Allow targets that config.sub doesn't recognize, like "all".
2887 canon_targets="$canon_targets $targ"
4101d868 2888 fi
5ab6ca68 2889 done
5ab6ca68 2890fi
99a42820 2891
5ab6ca68
ILT
2892all_targets=false
2893BUILD_NLMCONV=
2894NLMCONV_DEFS=
2895BUILD_SRCONV=
2896BUILD_DLLTOOL=
2897DLLTOOL_DEFS=
1d371d35 2898BUILD_WINDRES=
5ab6ca68
ILT
2899
2900for targ in $target $canon_targets
2901do
2902 if test "x$targ" = "xall"; then
2903 all_targets=true
2904 BUILD_NLMCONV='$(NLMCONV_PROG)'
2905 BUILD_SRCONV='$(SRCONV_PROG)'
2906 NLMCONV_DEFS="-DNLMCONV_I386 -DNLMCONV_ALPHA -DNLMCONV_POWERPC -DNLMCONV_SPARC"
2907 else
2908 case $targ in
33106b60 2909 i[3456]86*-*-netware*)
5ab6ca68
ILT
2910 BUILD_NLMCONV='$(NLMCONV_PROG)'
2911 NLMCONV_DEFS="$NLMCONV_DEFS -DNLMCONV_I386"
2912 ;;
2913 alpha*-*-netware*)
2914 BUILD_NLMCONV='$(NLMCONV_PROG)'
2915 NLMCONV_DEFS="$NLMCONV_DEFS -DNLMCONV_ALPHA"
2916 ;;
2917 powerpc*-*-netware*)
2918 BUILD_NLMCONV='$(NLMCONV_PROG)'
2919 NLMCONV_DEFS="$NLMCONV_DEFS -DNLMCONV_POWERPC"
2920 ;;
2921 sparc*-*-netware*)
2922 BUILD_NLMCONV='$(NLMCONV_PROG)'
2923 NLMCONV_DEFS="$NLMCONV_DEFS -DNLMCONV_SPARC"
2924 ;;
2925 esac
2926 case $targ in
2927 *-*-hms*) BUILD_SRCONV='$(SRCONV_PROG)' ;;
2928 esac
2929 case $targ in
2930 arm-*pe*)
2931 BUILD_DLLTOOL='$(DLLTOOL_PROG)'
2932 DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_ARM"
1d371d35 2933 BUILD_WINDRES='$(WINDRES_PROG)'
5ab6ca68 2934 ;;
904fe36b 2935 i[3-6]86-*pe* | i[3-6]86-*-cygwin32)
5ab6ca68
ILT
2936 BUILD_DLLTOOL='$(DLLTOOL_PROG)'
2937 DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_I386"
1d371d35 2938 BUILD_WINDRES='$(WINDRES_PROG)'
5ab6ca68 2939 ;;
904fe36b 2940 powerpc*-*-*pe* | powerpc*-*-cygwin32)
53fb794b
ILT
2941 BUILD_DLLTOOL='$(DLLTOOL_PROG)'
2942 DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_PPC"
1d371d35 2943 BUILD_WINDRES='$(WINDRES_PROG)'
53fb794b 2944 ;;
5ab6ca68
ILT
2945 esac
2946 fi
2947done
2948
2949
2950
2951
2952
2953
2954
1d371d35 2955
5ab6ca68
ILT
2956targ=$target
2957. $srcdir/../bfd/config.bfd
2958if test "x$targ_underscore" = "xyes"; then
2959 UNDERSCORE=1
2960else
2961 UNDERSCORE=0
2962fi
2963
2964
2965trap '' 1 2 15
2966cat > confcache <<\EOF
2967# This file is a shell script that caches the results of configure
2968# tests run on this system so they can be shared between configure
2969# scripts and configure runs. It is not useful on other systems.
2970# If it contains results you don't want to keep, you may remove or edit it.
2971#
2972# By default, configure uses ./config.cache as the cache file,
2973# creating it if it does not exist already. You can give configure
2974# the --cache-file=FILE option to use a different cache file; that is
2975# what configure does when it calls configure scripts in
2976# subdirectories, so they share the cache.
2977# Giving --cache-file=/dev/null disables caching, for debugging configure.
2978# config.status only pays attention to the cache file if you give it the
2979# --recheck option to rerun configure.
2980#
2981EOF
33106b60
ILT
2982# The following way of writing the cache mishandles newlines in values,
2983# but we know of no workaround that is simple, portable, and efficient.
2984# So, don't put newlines in cache variables' values.
5ab6ca68
ILT
2985# Ultrix sh set writes to stderr and can't be redirected directly,
2986# and sets the high bit in the cache file unless we assign to the vars.
2987(set) 2>&1 |
33106b60
ILT
2988 case `(ac_space=' '; set) 2>&1` in
2989 *ac_space=\ *)
2990 # `set' does not quote correctly, so add quotes (double-quote substitution
2991 # turns \\\\ into \\, and sed turns \\ into \).
2992 sed -n \
2993 -e "s/'/'\\\\''/g" \
2994 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
2995 ;;
2996 *)
2997 # `set' quotes correctly as required by POSIX, so do not add quotes.
2998 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
2999 ;;
3000 esac >> confcache
5ab6ca68
ILT
3001if cmp -s $cache_file confcache; then
3002 :
3003else
3004 if test -w $cache_file; then
3005 echo "updating cache $cache_file"
3006 cat confcache > $cache_file
3007 else
3008 echo "not updating unwritable cache $cache_file"
3009 fi
3010fi
3011rm -f confcache
3012
3013trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
3014
3015test "x$prefix" = xNONE && prefix=$ac_default_prefix
3016# Let make expand exec_prefix.
3017test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
3018
3019# Any assignment to VPATH causes Sun make to only execute
3020# the first set of double-colon rules, so remove it if not needed.
3021# If there is a colon in the path, we need to keep it.
3022if test "x$srcdir" = x.; then
3023 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
3024fi
3025
3026trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
3027
3028DEFS=-DHAVE_CONFIG_H
3029
3030# Without the "./", some shells look in PATH for config.status.
3031: ${CONFIG_STATUS=./config.status}
3032
3033echo creating $CONFIG_STATUS
3034rm -f $CONFIG_STATUS
3035cat > $CONFIG_STATUS <<EOF
3036#! /bin/sh
3037# Generated automatically by configure.
3038# Run this file to recreate the current configuration.
3039# This directory was configured as follows,
3040# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
b5132a6b 3041#
5ab6ca68 3042# $0 $ac_configure_args
b5132a6b 3043#
5ab6ca68
ILT
3044# Compiler output produced by configure, useful for debugging
3045# configure, is in ./config.log if it exists.
3046
3047ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
3048for ac_option
3049do
3050 case "\$ac_option" in
3051 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
3052 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
3053 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
3054 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
33106b60 3055 echo "$CONFIG_STATUS generated by autoconf version 2.12"
5ab6ca68
ILT
3056 exit 0 ;;
3057 -help | --help | --hel | --he | --h)
3058 echo "\$ac_cs_usage"; exit 0 ;;
3059 *) echo "\$ac_cs_usage"; exit 1 ;;
3060 esac
3061done
3062
3063ac_given_srcdir=$srcdir
3064ac_given_INSTALL="$INSTALL"
3065
320d4f29 3066trap 'rm -fr `echo "Makefile config.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
626a6542
SC
3067EOF
3068cat >> $CONFIG_STATUS <<EOF
5ab6ca68 3069
626a6542
SC
3070# Protect against being on the right side of a sed subst in config.status.
3071sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
3072 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
5ab6ca68
ILT
3073$ac_vpsub
3074$extrasub
3075s%@CFLAGS@%$CFLAGS%g
3076s%@CPPFLAGS@%$CPPFLAGS%g
3077s%@CXXFLAGS@%$CXXFLAGS%g
3078s%@DEFS@%$DEFS%g
3079s%@LDFLAGS@%$LDFLAGS%g
3080s%@LIBS@%$LIBS%g
3081s%@exec_prefix@%$exec_prefix%g
3082s%@prefix@%$prefix%g
3083s%@program_transform_name@%$program_transform_name%g
626a6542
SC
3084s%@bindir@%$bindir%g
3085s%@sbindir@%$sbindir%g
3086s%@libexecdir@%$libexecdir%g
3087s%@datadir@%$datadir%g
3088s%@sysconfdir@%$sysconfdir%g
3089s%@sharedstatedir@%$sharedstatedir%g
3090s%@localstatedir@%$localstatedir%g
3091s%@libdir@%$libdir%g
3092s%@includedir@%$includedir%g
3093s%@oldincludedir@%$oldincludedir%g
3094s%@infodir@%$infodir%g
3095s%@mandir@%$mandir%g
5ab6ca68
ILT
3096s%@host@%$host%g
3097s%@host_alias@%$host_alias%g
3098s%@host_cpu@%$host_cpu%g
3099s%@host_vendor@%$host_vendor%g
3100s%@host_os@%$host_os%g
3101s%@target@%$target%g
3102s%@target_alias@%$target_alias%g
3103s%@target_cpu@%$target_cpu%g
3104s%@target_vendor@%$target_vendor%g
3105s%@target_os@%$target_os%g
3106s%@build@%$build%g
3107s%@build_alias@%$build_alias%g
3108s%@build_cpu@%$build_cpu%g
3109s%@build_vendor@%$build_vendor%g
3110s%@build_os@%$build_os%g
d467c30d
ILT
3111s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
3112s%@INSTALL_DATA@%$INSTALL_DATA%g
3113s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
3114s%@PACKAGE@%$PACKAGE%g
3115s%@VERSION@%$VERSION%g
3116s%@ACLOCAL@%$ACLOCAL%g
3117s%@AUTOCONF@%$AUTOCONF%g
3118s%@AUTOMAKE@%$AUTOMAKE%g
3119s%@AUTOHEADER@%$AUTOHEADER%g
3120s%@MAKEINFO@%$MAKEINFO%g
3121s%@SET_MAKE@%$SET_MAKE%g
5ab6ca68 3122s%@CC@%$CC%g
d467c30d
ILT
3123s%@RANLIB@%$RANLIB%g
3124s%@LD@%$LD%g
3125s%@LN_S@%$LN_S%g
3126s%@LIBTOOL@%$LIBTOOL%g
3127s%@YACC@%$YACC%g
3128s%@LEX@%$LEX%g
3129s%@LEXLIB@%$LEXLIB%g
3130s%@CPP@%$CPP%g
3131s%@LEX_OUTPUT_ROOT@%$LEX_OUTPUT_ROOT%g
3132s%@MAINT@%$MAINT%g
3133s%@EXEEXT@%$EXEEXT%g
5ab6ca68
ILT
3134s%@HDEFINES@%$HDEFINES%g
3135s%@AR@%$AR%g
320d4f29 3136s%@CC_FOR_BUILD@%$CC_FOR_BUILD%g
33106b60 3137s%@ALLOCA@%$ALLOCA%g
5ab6ca68
ILT
3138s%@NLMCONV_DEFS@%$NLMCONV_DEFS%g
3139s%@BUILD_NLMCONV@%$BUILD_NLMCONV%g
3140s%@BUILD_SRCONV@%$BUILD_SRCONV%g
3141s%@BUILD_DLLTOOL@%$BUILD_DLLTOOL%g
3142s%@DLLTOOL_DEFS@%$DLLTOOL_DEFS%g
1d371d35 3143s%@BUILD_WINDRES@%$BUILD_WINDRES%g
5ab6ca68
ILT
3144s%@UNDERSCORE@%$UNDERSCORE%g
3145
3146CEOF
3147EOF
33106b60
ILT
3148
3149cat >> $CONFIG_STATUS <<\EOF
3150
3151# Split the substitutions into bite-sized pieces for seds with
3152# small command number limits, like on Digital OSF/1 and HP-UX.
3153ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
3154ac_file=1 # Number of current file.
3155ac_beg=1 # First line for current file.
3156ac_end=$ac_max_sed_cmds # Line after last line for current file.
3157ac_more_lines=:
3158ac_sed_cmds=""
3159while $ac_more_lines; do
3160 if test $ac_beg -gt 1; then
3161 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
3162 else
3163 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
3164 fi
3165 if test ! -s conftest.s$ac_file; then
3166 ac_more_lines=false
3167 rm -f conftest.s$ac_file
3168 else
3169 if test -z "$ac_sed_cmds"; then
3170 ac_sed_cmds="sed -f conftest.s$ac_file"
3171 else
3172 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
3173 fi
3174 ac_file=`expr $ac_file + 1`
3175 ac_beg=$ac_end
3176 ac_end=`expr $ac_end + $ac_max_sed_cmds`
3177 fi
3178done
3179if test -z "$ac_sed_cmds"; then
3180 ac_sed_cmds=cat
3181fi
3182EOF
3183
5ab6ca68
ILT
3184cat >> $CONFIG_STATUS <<EOF
3185
3186CONFIG_FILES=\${CONFIG_FILES-"Makefile"}
3187EOF
3188cat >> $CONFIG_STATUS <<\EOF
3189for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
33106b60 3190 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
5ab6ca68 3191 case "$ac_file" in
33106b60 3192 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
5ab6ca68
ILT
3193 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
3194 *) ac_file_in="${ac_file}.in" ;;
3195 esac
3196
33106b60 3197 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
5ab6ca68
ILT
3198
3199 # Remove last slash and all that follows it. Not all systems have dirname.
3200 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
3201 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
3202 # The file is in a subdirectory.
3203 test ! -d "$ac_dir" && mkdir "$ac_dir"
3204 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
3205 # A "../" for each directory in $ac_dir_suffix.
3206 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
3207 else
3208 ac_dir_suffix= ac_dots=
3209 fi
3210
3211 case "$ac_given_srcdir" in
3212 .) srcdir=.
3213 if test -z "$ac_dots"; then top_srcdir=.
3214 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
3215 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
3216 *) # Relative path.
3217 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
3218 top_srcdir="$ac_dots$ac_given_srcdir" ;;
3219 esac
3220
3221 case "$ac_given_INSTALL" in
3222 [/$]*) INSTALL="$ac_given_INSTALL" ;;
3223 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
3224 esac
33106b60 3225
5ab6ca68
ILT
3226 echo creating "$ac_file"
3227 rm -f "$ac_file"
3228 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
3229 case "$ac_file" in
3230 *Makefile*) ac_comsub="1i\\
3231# $configure_input" ;;
3232 *) ac_comsub= ;;
3233 esac
33106b60
ILT
3234
3235 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
5ab6ca68
ILT
3236 sed -e "$ac_comsub
3237s%@configure_input@%$configure_input%g
3238s%@srcdir@%$srcdir%g
3239s%@top_srcdir@%$top_srcdir%g
3240s%@INSTALL@%$INSTALL%g
33106b60 3241" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
5ab6ca68 3242fi; done
33106b60 3243rm -f conftest.s*
5ab6ca68
ILT
3244
3245# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
3246# NAME is the cpp macro being defined and VALUE is the value it is being given.
3247#
3248# ac_d sets the value in "#define NAME VALUE" lines.
3249ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
3250ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
3251ac_dC='\3'
3252ac_dD='%g'
3253# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
3254ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
3255ac_uB='\([ ]\)%\1#\2define\3'
3256ac_uC=' '
3257ac_uD='\4%g'
3258# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
3259ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
3260ac_eB='$%\1#\2define\3'
3261ac_eC=' '
3262ac_eD='%g'
3263
33106b60
ILT
3264if test "${CONFIG_HEADERS+set}" != set; then
3265EOF
3266cat >> $CONFIG_STATUS <<EOF
3267 CONFIG_HEADERS="config.h:config.in"
3268EOF
3269cat >> $CONFIG_STATUS <<\EOF
3270fi
5ab6ca68 3271for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
33106b60 3272 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
5ab6ca68 3273 case "$ac_file" in
33106b60 3274 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
5ab6ca68
ILT
3275 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
3276 *) ac_file_in="${ac_file}.in" ;;
3277 esac
3278
3279 echo creating $ac_file
3280
3281 rm -f conftest.frag conftest.in conftest.out
33106b60
ILT
3282 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
3283 cat $ac_file_inputs > conftest.in
5ab6ca68
ILT
3284
3285EOF
3286
3287# Transform confdefs.h into a sed script conftest.vals that substitutes
3288# the proper values into config.h.in to produce config.h. And first:
626a6542 3289# Protect against being on the right side of a sed subst in config.status.
5ab6ca68
ILT
3290# Protect against being in an unquoted here document in config.status.
3291rm -f conftest.vals
3292cat > conftest.hdr <<\EOF
3293s/[\\&%]/\\&/g
3294s%[\\$`]%\\&%g
33106b60 3295s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
5ab6ca68
ILT
3296s%ac_d%ac_u%gp
3297s%ac_u%ac_e%gp
3298EOF
3299sed -n -f conftest.hdr confdefs.h > conftest.vals
3300rm -f conftest.hdr
3301
3302# This sed command replaces #undef with comments. This is necessary, for
3303# example, in the case of _POSIX_SOURCE, which is predefined and required
3304# on some systems where configure will not decide to define it.
3305cat >> conftest.vals <<\EOF
3306s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
3307EOF
3308
3309# Break up conftest.vals because some shells have a limit on
3310# the size of here documents, and old seds have small limits too.
5ab6ca68
ILT
3311
3312rm -f conftest.tail
3313while :
3314do
3315 ac_lines=`grep -c . conftest.vals`
3316 # grep -c gives empty output for an empty file on some AIX systems.
3317 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
3318 # Write a limited-size here document to conftest.frag.
3319 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
3320 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
3321 echo 'CEOF
3322 sed -f conftest.frag conftest.in > conftest.out
3323 rm -f conftest.in
3324 mv conftest.out conftest.in
3325' >> $CONFIG_STATUS
3326 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
3327 rm -f conftest.vals
3328 mv conftest.tail conftest.vals
3329done
3330rm -f conftest.vals
3331
3332cat >> $CONFIG_STATUS <<\EOF
3333 rm -f conftest.frag conftest.h
3334 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
3335 cat conftest.in >> conftest.h
3336 rm -f conftest.in
3337 if cmp -s $ac_file conftest.h 2>/dev/null; then
3338 echo "$ac_file is unchanged"
3339 rm -f conftest.h
3340 else
33106b60
ILT
3341 # Remove last slash and all that follows it. Not all systems have dirname.
3342 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
3343 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
3344 # The file is in a subdirectory.
3345 test ! -d "$ac_dir" && mkdir "$ac_dir"
3346 fi
5ab6ca68
ILT
3347 rm -f $ac_file
3348 mv conftest.h $ac_file
3349 fi
3350fi; done
3351
33106b60
ILT
3352EOF
3353cat >> $CONFIG_STATUS <<EOF
5ab6ca68 3354
d467c30d 3355
33106b60
ILT
3356EOF
3357cat >> $CONFIG_STATUS <<\EOF
d467c30d
ILT
3358test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h
3359
5ab6ca68
ILT
3360exit 0
3361EOF
3362chmod +x $CONFIG_STATUS
3363rm -fr confdefs* $ac_clean_files
3364test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
a10d26a1 3365
This page took 0.359957 seconds and 4 git commands to generate.