Thu Jan 29 16:04:21 1998 Mumit Khan <khan@xraylith.wisc.edu>
[deliverable/binutils-gdb.git] / ld / configure
CommitLineData
ef346f1a 1#! /bin/sh
eb02fd64 2
ef346f1a 3# Guess values for system-dependent variables and create Makefiles.
b5db0960 4# Generated automatically using autoconf version 2.12.1
b9a5c27f 5# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
ef346f1a
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
b5db0960
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]"
2e598345 18ac_help="$ac_help
b5db0960
ILT
19 --enable-static build static libraries [default=yes]"
20ac_help="$ac_help
21 --enable-targets alternative target configurations"
b9a5c27f
RS
22ac_help="$ac_help
23 --enable-64-bit-bfd 64-bit support (on hosts with narrower word sizes)"
b5db0960
ILT
24ac_help="$ac_help
25 --enable-maintainer-mode enable make rules and dependencies not useful
26 (and sometimes confusing) to the casual installer"
ef346f1a
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
caf2a913
ILT
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'
eb02fd64 61
ef346f1a
ILT
62# Initialize some other variables.
63subdirs=
caf2a913 64MFLAGS= MAKEFLAGS=
b9a5c27f
RS
65# Maximum number of lines to put in a shell here document.
66ac_max_here_lines=12
eb02fd64 67
ef346f1a
ILT
68ac_prev=
69for ac_option
70do
eb02fd64 71
ef346f1a
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
caf2a913
ILT
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)
ef346f1a 94 ac_prev=build ;;
caf2a913 95 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
ef346f1a
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
caf2a913
ILT
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
ef346f1a
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]
caf2a913 161 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
ef346f1a 162 [same as prefix]
caf2a913
ILT
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]
ef346f1a
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
caf2a913
ILT
180 --program-transform-name=PROGRAM
181 run sed PROGRAM on installed program names
182EOF
183 cat << EOF
ef346f1a
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
ef346f1a 195EOF
caf2a913
ILT
196 if test -n "$ac_help"; then
197 echo "--enable and --with options recognized:$ac_help"
198 fi
ef346f1a
ILT
199 exit 0 ;;
200
201 -host | --host | --hos | --ho)
202 ac_prev=host ;;
203 -host=* | --host=* | --hos=* | --ho=*)
204 host="$ac_optarg" ;;
205
caf2a913
ILT
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
ef346f1a
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
caf2a913
ILT
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
ef346f1a
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
caf2a913
ILT
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
ef346f1a
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
caf2a913
ILT
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
ef346f1a
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)
b5db0960 348 echo "configure generated by autoconf version 2.12.1"
ef346f1a
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
caf2a913 394 *)
ef346f1a
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
2ee11735 406
ef346f1a
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
eb02fd64 410
ef346f1a
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
427
428echo "\
429This file contains any messages produced by compilers while
430running configure, to aid debugging if configure makes a mistake.
431" 1>&5
eb02fd64 432
ef346f1a
ILT
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
eb02fd64 437do
ef346f1a
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
eb02fd64
RP
447done
448
ef346f1a 449# NLS nuisances.
b9a5c27f
RS
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.
ef346f1a 454if test "${LANG+set}" = set; then LANG=C; export LANG; fi
b9a5c27f
RS
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
ef346f1a
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=ldmain.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
8c32cf6e 488fi
ef346f1a
ILT
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
498fi
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
8c32cf6e 505
ef346f1a
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
f2e91404 512fi
eb02fd64 513
ef346f1a
ILT
514ac_ext=c
515# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
b9a5c27f
RS
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'
519cross_compiling=$ac_cv_prog_cc_cross
ef346f1a
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=
531fi
532
533
8c32cf6e 534
ef346f1a 535ac_aux_dir=
b5db0960 536for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
ef346f1a
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
b5db0960 548 { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
ef346f1a
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.
eb02fd64 553
eb02fd64 554
ef346f1a
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
caf2a913 561# same time.
ef346f1a
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
eb02fd64 574
c0b47bae 575
ef346f1a 576# Make sure we can run config.sub.
b5db0960 577if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
ef346f1a
ILT
578else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
579fi
c0b47bae 580
ef346f1a 581echo $ac_n "checking host system type""... $ac_c" 1>&6
b5db0960 582echo "configure:583: checking host system type" >&5
ef346f1a
ILT
583
584host_alias=$host
585case "$host_alias" in
586NONE)
587 case $nonopt in
588 NONE)
b5db0960 589 if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
ef346f1a
ILT
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
c0b47bae 595
b5db0960 596host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
b9a5c27f
RS
597host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
598host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
599host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
ef346f1a
ILT
600echo "$ac_t""$host" 1>&6
601
602echo $ac_n "checking target system type""... $ac_c" 1>&6
b5db0960
ILT
603echo "configure:604: checking target system type" >&5
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=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
615target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
616target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
617target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
618echo "$ac_t""$target" 1>&6
619
620echo $ac_n "checking build system type""... $ac_c" 1>&6
621echo "configure:622: checking build system type" >&5
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=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
633build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
634build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
635build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
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
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
685fi
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=ld
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; }
714fi
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
750if test "$program_transform_name" = s,x,x,; then
751 program_transform_name=
752else
753 # Double any \ or $. echo might interpret backslashes.
754 cat <<\EOF_SED > conftestsed
755s,\\,\\\\,g; s,\$,$$,g
756EOF_SED
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
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
861
862
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
866echo "configure:867: checking for $ac_word" >&5
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"
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
890
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
895echo "configure:896: checking for $ac_word" >&5
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
941
942echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
943echo "configure:944: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
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
953#line 954 "configure"
954#include "confdefs.h"
955main(){return(0);}
956EOF
957if { (eval echo configure:958: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
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
977echo "configure:978: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
978echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
979cross_compiling=$ac_cv_prog_cc_cross
980
981echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
982echo "configure:983: checking whether we are using GNU C" >&5
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
987#ifdef __GNUC__
988 yes;
989#endif
990EOF
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
992 ac_cv_prog_gcc=yes
993else
994 ac_cv_prog_gcc=no
995fi
996fi
997
998echo "$ac_t""$ac_cv_prog_gcc" 1>&6
999
1000if test $ac_cv_prog_gcc = yes; then
1001 GCC=yes
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
1006echo "configure:1007: checking whether ${CC-cc} accepts -g" >&5
1007if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
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
1012 ac_cv_prog_cc_g=yes
1013else
1014 ac_cv_prog_cc_g=no
1015fi
1016rm -f conftest*
1017
1018fi
1019
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"
1027 fi
1028else
1029 GCC=
1030 test "${CFLAGS+set}" = set || CFLAGS="-g"
1031fi
1032
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 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1083 for ac_dir in $PATH; do
1084 test -z "$ac_dir" && ac_dir=.
1085 if test -f "$ac_dir/ld"; then
1086 ac_cv_path_LD="$ac_dir/ld"
1087 # Check to see if the program is GNU ld. I'd rather use --version,
1088 # but apparently some GNU ld's only accept -v.
1089 # Break only if it was the GNU/non-GNU ld that we prefer.
1090 if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU ld|with BFD)' > /dev/null; then
1091 test "$with_gnu_ld" = yes && break
1092 else
1093 test "$with_gnu_ld" != yes && break
1094 fi
1095 fi
1096 done
1097 IFS="$ac_save_ifs"
1098 ;;
1099 *)
1100 ac_cv_path_LD="$LD" # Let the user override the test with a path.
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"
1163 if test "$enableval" = no; then
1164 enable_shared=no
1165else
1166 enable_shared=yes
1167fi
1168fi
1169
1170libtool_shared=
1171test "$enable_shared" = no && libtool_shared=" --disable-shared"
1172
1173# Check whether --enable-static or --disable-static was given.
1174if test "${enable_static+set}" = set; then
1175 enableval="$enable_static"
1176 if test "$enableval" = no; then
1177 enable_static=no
1178else
1179 enable_static=yes
1180fi
1181fi
1182
1183libtool_static=
1184test "$enable_static" = no && libtool_static=" --disable-static"
1185
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"
1190
1191# Some flags need to be propagated to the compiler or linker for good
1192# libtool support.
1193case "$host" in
1194*-*-irix6*)
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"
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
1203 CFLAGS="$ac_save_CFLAGS"
1204 ;;
ef346f1a 1205
b5db0960
ILT
1206*-*-sco3.2v5*)
1207 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
1208 CFLAGS="$CFLAGS -belf"
1209 ;;
ef346f1a 1210esac
eb02fd64 1211
b5db0960
ILT
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; }
ef346f1a 1218
ef346f1a 1219
b5db0960
ILT
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-64-bit-bfd or --disable-64-bit-bfd was given.
1231if test "${enable_64_bit_bfd+set}" = set; then
1232 enableval="$enable_64_bit_bfd"
1233 case "${enableval}" in
1234 yes) want64=true ;;
1235 no) want64=false ;;
1236 *) { echo "configure: error: bad value ${enableval} for 64-bit-bfd option" 1>&2; exit 1; } ;;
ef346f1a 1237esac
b5db0960
ILT
1238else
1239 want64=false
1240fi
1241
1242
eb02fd64 1243
ef346f1a 1244
eb02fd64 1245
ef346f1a
ILT
1246if test -z "$target" ; then
1247 { echo "configure: error: Unrecognized target system type; please check config.sub." 1>&2; exit 1; }
ec342d7d 1248fi
ef346f1a
ILT
1249if test -z "$host" ; then
1250 { echo "configure: error: Unrecognized host system type; please check config.sub." 1>&2; exit 1; }
1251fi
ef346f1a
ILT
1252
1253# host-specific stuff:
1254
caf2a913
ILT
1255# Extract the first word of "gcc", so it can be a program name with args.
1256set dummy gcc; ac_word=$2
1257echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
b5db0960 1258echo "configure:1259: checking for $ac_word" >&5
caf2a913
ILT
1259if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1260 echo $ac_n "(cached) $ac_c" 1>&6
1261else
1262 if test -n "$CC"; then
1263 ac_cv_prog_CC="$CC" # Let the user override the test.
1264else
1265 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1266 for ac_dir in $PATH; do
1267 test -z "$ac_dir" && ac_dir=.
1268 if test -f $ac_dir/$ac_word; then
1269 ac_cv_prog_CC="gcc"
1270 break
1271 fi
1272 done
1273 IFS="$ac_save_ifs"
caf2a913
ILT
1274fi
1275fi
1276CC="$ac_cv_prog_CC"
1277if test -n "$CC"; then
1278 echo "$ac_t""$CC" 1>&6
1279else
1280 echo "$ac_t""no" 1>&6
1281fi
1282
b9a5c27f
RS
1283if test -z "$CC"; then
1284 # Extract the first word of "cc", so it can be a program name with args.
1285set dummy cc; ac_word=$2
1286echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
b5db0960 1287echo "configure:1288: checking for $ac_word" >&5
b9a5c27f
RS
1288if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1289 echo $ac_n "(cached) $ac_c" 1>&6
1290else
1291 if test -n "$CC"; then
1292 ac_cv_prog_CC="$CC" # Let the user override the test.
1293else
1294 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1295 ac_prog_rejected=no
1296 for ac_dir in $PATH; do
1297 test -z "$ac_dir" && ac_dir=.
1298 if test -f $ac_dir/$ac_word; then
1299 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1300 ac_prog_rejected=yes
1301 continue
1302 fi
1303 ac_cv_prog_CC="cc"
1304 break
1305 fi
1306 done
1307 IFS="$ac_save_ifs"
1308if test $ac_prog_rejected = yes; then
1309 # We found a bogon in the path, so make sure we never use it.
1310 set dummy $ac_cv_prog_CC
1311 shift
1312 if test $# -gt 0; then
1313 # We chose a different compiler from the bogus one.
1314 # However, it has the same basename, so the bogon will be chosen
1315 # first if we set CC to just the basename; use the full file name.
1316 shift
1317 set dummy "$ac_dir/$ac_word" "$@"
1318 shift
1319 ac_cv_prog_CC="$@"
1320 fi
1321fi
1322fi
1323fi
1324CC="$ac_cv_prog_CC"
1325if test -n "$CC"; then
1326 echo "$ac_t""$CC" 1>&6
1327else
1328 echo "$ac_t""no" 1>&6
1329fi
1330
1331 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1332fi
1333
1334echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
b5db0960 1335echo "configure:1336: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
b9a5c27f
RS
1336
1337ac_ext=c
1338# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1339ac_cpp='$CPP $CPPFLAGS'
1340ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1341ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1342cross_compiling=$ac_cv_prog_cc_cross
1343
1344cat > conftest.$ac_ext <<EOF
b5db0960 1345#line 1346 "configure"
b9a5c27f
RS
1346#include "confdefs.h"
1347main(){return(0);}
1348EOF
b5db0960 1349if { (eval echo configure:1350: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
b9a5c27f
RS
1350 ac_cv_prog_cc_works=yes
1351 # If we can't run a trivial program, we are probably using a cross compiler.
1352 if (./conftest; exit) 2>/dev/null; then
1353 ac_cv_prog_cc_cross=no
1354 else
1355 ac_cv_prog_cc_cross=yes
1356 fi
1357else
1358 echo "configure: failed program was:" >&5
1359 cat conftest.$ac_ext >&5
1360 ac_cv_prog_cc_works=no
1361fi
1362rm -fr conftest*
1363
1364echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1365if test $ac_cv_prog_cc_works = no; then
1366 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1367fi
1368echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
b5db0960 1369echo "configure:1370: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
b9a5c27f
RS
1370echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1371cross_compiling=$ac_cv_prog_cc_cross
ef346f1a 1372
caf2a913 1373echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
b5db0960 1374echo "configure:1375: checking whether we are using GNU C" >&5
caf2a913
ILT
1375if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
1376 echo $ac_n "(cached) $ac_c" 1>&6
1377else
1378 cat > conftest.c <<EOF
ef346f1a
ILT
1379#ifdef __GNUC__
1380 yes;
1381#endif
1382EOF
b5db0960 1383if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1384: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
caf2a913
ILT
1384 ac_cv_prog_gcc=yes
1385else
1386 ac_cv_prog_gcc=no
1387fi
1388fi
1389
1390echo "$ac_t""$ac_cv_prog_gcc" 1>&6
b9a5c27f 1391
caf2a913 1392if test $ac_cv_prog_gcc = yes; then
ef346f1a 1393 GCC=yes
b9a5c27f
RS
1394 ac_test_CFLAGS="${CFLAGS+set}"
1395 ac_save_CFLAGS="$CFLAGS"
1396 CFLAGS=
1397 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
b5db0960 1398echo "configure:1399: checking whether ${CC-cc} accepts -g" >&5
b9a5c27f 1399if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
caf2a913
ILT
1400 echo $ac_n "(cached) $ac_c" 1>&6
1401else
1402 echo 'void f(){}' > conftest.c
1403if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
b9a5c27f 1404 ac_cv_prog_cc_g=yes
caf2a913 1405else
b9a5c27f 1406 ac_cv_prog_cc_g=no
caf2a913
ILT
1407fi
1408rm -f conftest*
1409
1410fi
1411
b9a5c27f
RS
1412echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1413 if test "$ac_test_CFLAGS" = set; then
1414 CFLAGS="$ac_save_CFLAGS"
1415 elif test $ac_cv_prog_cc_g = yes; then
1416 CFLAGS="-g -O2"
1417 else
1418 CFLAGS="-O2"
ef346f1a
ILT
1419 fi
1420else
1421 GCC=
1422 test "${CFLAGS+set}" = set || CFLAGS="-g"
1423fi
ef346f1a 1424
b9a5c27f 1425
b5db0960 1426test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
b9a5c27f
RS
1427
1428echo $ac_n "checking for Cygwin32 environment""... $ac_c" 1>&6
b5db0960 1429echo "configure:1430: checking for Cygwin32 environment" >&5
b9a5c27f
RS
1430if eval "test \"`echo '$''{'am_cv_cygwin32'+set}'`\" = set"; then
1431 echo $ac_n "(cached) $ac_c" 1>&6
1432else
1433 cat > conftest.$ac_ext <<EOF
b5db0960 1434#line 1435 "configure"
b9a5c27f
RS
1435#include "confdefs.h"
1436
1437int main() {
1438int main () { return __CYGWIN32__; }
1439; return 0; }
1440EOF
b5db0960 1441if { (eval echo configure:1442: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
b9a5c27f
RS
1442 rm -rf conftest*
1443 am_cv_cygwin32=yes
1444else
1445 echo "configure: failed program was:" >&5
1446 cat conftest.$ac_ext >&5
1447 rm -rf conftest*
1448 am_cv_cygwin32=no
1449fi
1450rm -f conftest*
1451rm -f conftest*
1452fi
1453
1454echo "$ac_t""$am_cv_cygwin32" 1>&6
1455CYGWIN32=
1456test "$am_cv_cygwin32" = yes && CYGWIN32=yes
b5db0960 1457
b9a5c27f 1458echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
b5db0960 1459echo "configure:1460: checking for executable suffix" >&5
b9a5c27f
RS
1460if eval "test \"`echo '$''{'am_cv_exeext'+set}'`\" = set"; then
1461 echo $ac_n "(cached) $ac_c" 1>&6
1462else
1463 if test "$CYGWIN32" = yes; then
1464am_cv_exeext=.exe
1465else
1466cat > am_c_test.c << 'EOF'
1467int main() {
1468/* Nothing needed here */
1469}
1470EOF
1471${CC-cc} -o am_c_test $CFLAGS $CPPFLAGS $LDFLAGS am_c_test.c $LIBS 1>&5
b5db0960 1472am_cv_exeext=`echo am_c_test.* | grep -v am_c_test.c | sed -e s/am_c_test//`
b9a5c27f
RS
1473rm -f am_c_test*
1474fi
1475
1476test x"${am_cv_exeext}" = x && am_cv_exeext=no
1477fi
1478EXEEXT=""
1479test x"${am_cv_exeext}" != xno && EXEEXT=${am_cv_exeext}
1480echo "$ac_t""${am_cv_exeext}" 1>&6
1481
ec342d7d 1482
b5db0960
ILT
1483for ac_prog in 'bison -y' byacc
1484do
1485# Extract the first word of "$ac_prog", so it can be a program name with args.
1486set dummy $ac_prog; ac_word=$2
1487echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1488echo "configure:1489: checking for $ac_word" >&5
1489if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then
1490 echo $ac_n "(cached) $ac_c" 1>&6
1491else
1492 if test -n "$YACC"; then
1493 ac_cv_prog_YACC="$YACC" # Let the user override the test.
1494else
1495 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1496 for ac_dir in $PATH; do
1497 test -z "$ac_dir" && ac_dir=.
1498 if test -f $ac_dir/$ac_word; then
1499 ac_cv_prog_YACC="$ac_prog"
1500 break
1501 fi
1502 done
1503 IFS="$ac_save_ifs"
1504fi
1505fi
1506YACC="$ac_cv_prog_YACC"
1507if test -n "$YACC"; then
1508 echo "$ac_t""$YACC" 1>&6
1509else
1510 echo "$ac_t""no" 1>&6
1511fi
6c18e393 1512
b5db0960
ILT
1513test -n "$YACC" && break
1514done
1515test -n "$YACC" || YACC="yacc"
3d6f0983 1516
b5db0960
ILT
1517# Extract the first word of "flex", so it can be a program name with args.
1518set dummy flex; ac_word=$2
1519echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1520echo "configure:1521: checking for $ac_word" >&5
1521if eval "test \"`echo '$''{'ac_cv_prog_LEX'+set}'`\" = set"; then
1522 echo $ac_n "(cached) $ac_c" 1>&6
1523else
1524 if test -n "$LEX"; then
1525 ac_cv_prog_LEX="$LEX" # Let the user override the test.
1526else
1527 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1528 for ac_dir in $PATH; do
1529 test -z "$ac_dir" && ac_dir=.
1530 if test -f $ac_dir/$ac_word; then
1531 ac_cv_prog_LEX="flex"
1532 break
1533 fi
1534 done
1535 IFS="$ac_save_ifs"
1536 test -z "$ac_cv_prog_LEX" && ac_cv_prog_LEX="lex"
1537fi
1538fi
1539LEX="$ac_cv_prog_LEX"
1540if test -n "$LEX"; then
1541 echo "$ac_t""$LEX" 1>&6
1542else
1543 echo "$ac_t""no" 1>&6
1544fi
ef346f1a 1545
b5db0960
ILT
1546if test -z "$LEXLIB"
1547then
1548 case "$LEX" in
1549 flex*) ac_lib=fl ;;
1550 *) ac_lib=l ;;
1551 esac
1552 echo $ac_n "checking for yywrap in -l$ac_lib""... $ac_c" 1>&6
1553echo "configure:1554: checking for yywrap in -l$ac_lib" >&5
1554ac_lib_var=`echo $ac_lib'_'yywrap | sed 'y%./+-%__p_%'`
1555if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1556 echo $ac_n "(cached) $ac_c" 1>&6
1557else
1558 ac_save_LIBS="$LIBS"
1559LIBS="-l$ac_lib $LIBS"
1560cat > conftest.$ac_ext <<EOF
1561#line 1562 "configure"
1562#include "confdefs.h"
1563/* Override any gcc2 internal prototype to avoid an error. */
1564/* We use char because int might match the return type of a gcc2
1565 builtin and then its argument prototype would still apply. */
1566char yywrap();
2e598345 1567
b5db0960
ILT
1568int main() {
1569yywrap()
1570; return 0; }
1571EOF
1572if { (eval echo configure:1573: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1573 rm -rf conftest*
1574 eval "ac_cv_lib_$ac_lib_var=yes"
1575else
1576 echo "configure: failed program was:" >&5
1577 cat conftest.$ac_ext >&5
1578 rm -rf conftest*
1579 eval "ac_cv_lib_$ac_lib_var=no"
1580fi
1581rm -f conftest*
1582LIBS="$ac_save_LIBS"
ad43e45b 1583
b5db0960
ILT
1584fi
1585if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1586 echo "$ac_t""yes" 1>&6
1587 LEXLIB="-l$ac_lib"
1588else
1589 echo "$ac_t""no" 1>&6
1590fi
2e598345 1591
b5db0960 1592fi
2e598345 1593
ef346f1a 1594echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
b5db0960 1595echo "configure:1596: checking how to run the C preprocessor" >&5
ef346f1a
ILT
1596# On Suns, sometimes $CPP names a directory.
1597if test -n "$CPP" && test -d "$CPP"; then
1598 CPP=
1599fi
1600if test -z "$CPP"; then
1601if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1602 echo $ac_n "(cached) $ac_c" 1>&6
c0b47bae 1603else
ef346f1a
ILT
1604 # This must be in double quotes, not single quotes, because CPP may get
1605 # substituted into the Makefile and "${CC-cc}" will confuse make.
1606 CPP="${CC-cc} -E"
1607 # On the NeXT, cc -E runs the code through the compiler's parser,
1608 # not just through cpp.
1609 cat > conftest.$ac_ext <<EOF
b5db0960 1610#line 1611 "configure"
ef346f1a
ILT
1611#include "confdefs.h"
1612#include <assert.h>
1613Syntax Error
1614EOF
b9a5c27f 1615ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
b5db0960 1616{ (eval echo configure:1617: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ef346f1a
ILT
1617ac_err=`grep -v '^ *+' conftest.out`
1618if test -z "$ac_err"; then
1619 :
1620else
1621 echo "$ac_err" >&5
b9a5c27f
RS
1622 echo "configure: failed program was:" >&5
1623 cat conftest.$ac_ext >&5
ef346f1a
ILT
1624 rm -rf conftest*
1625 CPP="${CC-cc} -E -traditional-cpp"
1626 cat > conftest.$ac_ext <<EOF
b5db0960 1627#line 1628 "configure"
ef346f1a
ILT
1628#include "confdefs.h"
1629#include <assert.h>
1630Syntax Error
1631EOF
b9a5c27f 1632ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
b5db0960 1633{ (eval echo configure:1634: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ef346f1a
ILT
1634ac_err=`grep -v '^ *+' conftest.out`
1635if test -z "$ac_err"; then
1636 :
1637else
1638 echo "$ac_err" >&5
b9a5c27f
RS
1639 echo "configure: failed program was:" >&5
1640 cat conftest.$ac_ext >&5
ef346f1a
ILT
1641 rm -rf conftest*
1642 CPP=/lib/cpp
1643fi
1644rm -f conftest*
1645fi
1646rm -f conftest*
1647 ac_cv_prog_CPP="$CPP"
c0b47bae 1648fi
ef346f1a
ILT
1649 CPP="$ac_cv_prog_CPP"
1650else
1651 ac_cv_prog_CPP="$CPP"
1652fi
1653echo "$ac_t""$CPP" 1>&6
c0b47bae 1654
b5db0960
ILT
1655echo $ac_n "checking lex output file root""... $ac_c" 1>&6
1656echo "configure:1657: checking lex output file root" >&5
1657if eval "test \"`echo '$''{'ac_cv_prog_lex_root'+set}'`\" = set"; then
1658 echo $ac_n "(cached) $ac_c" 1>&6
1659else
1660 # The minimal lex program is just a single line: %%. But some broken lexes
1661# (Solaris, I think it was) want two %% lines, so accommodate them.
1662echo '%%
1663%%' | $LEX
1664if test -f lex.yy.c; then
1665 ac_cv_prog_lex_root=lex.yy
1666elif test -f lexyy.c; then
1667 ac_cv_prog_lex_root=lexyy
1668else
1669 { echo "configure: error: cannot find output from $LEX; giving up" 1>&2; exit 1; }
1670fi
1671fi
1672
1673echo "$ac_t""$ac_cv_prog_lex_root" 1>&6
1674LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root
1675
1676echo $ac_n "checking whether yytext is a pointer""... $ac_c" 1>&6
1677echo "configure:1678: checking whether yytext is a pointer" >&5
1678if eval "test \"`echo '$''{'ac_cv_prog_lex_yytext_pointer'+set}'`\" = set"; then
1679 echo $ac_n "(cached) $ac_c" 1>&6
1680else
1681 # POSIX says lex can declare yytext either as a pointer or an array; the
1682# default is implementation-dependent. Figure out which it is, since
1683# not all implementations provide the %pointer and %array declarations.
1684ac_cv_prog_lex_yytext_pointer=no
1685echo 'extern char *yytext;' >>$LEX_OUTPUT_ROOT.c
1686ac_save_LIBS="$LIBS"
1687LIBS="$LIBS $LEXLIB"
1688cat > conftest.$ac_ext <<EOF
1689#line 1690 "configure"
1690#include "confdefs.h"
1691`cat $LEX_OUTPUT_ROOT.c`
1692int main() {
1693
1694; return 0; }
1695EOF
1696if { (eval echo configure:1697: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1697 rm -rf conftest*
1698 ac_cv_prog_lex_yytext_pointer=yes
1699else
1700 echo "configure: failed program was:" >&5
1701 cat conftest.$ac_ext >&5
1702fi
1703rm -f conftest*
1704LIBS="$ac_save_LIBS"
1705rm -f "${LEX_OUTPUT_ROOT}.c"
1706
1707fi
1708
1709echo "$ac_t""$ac_cv_prog_lex_yytext_pointer" 1>&6
1710if test $ac_cv_prog_lex_yytext_pointer = yes; then
1711 cat >> confdefs.h <<\EOF
1712#define YYTEXT_POINTER 1
1713EOF
1714
1715fi
1716
1717
1718echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
1719echo "configure:1720: checking whether to enable maintainer-specific portions of Makefiles" >&5
1720 # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
1721if test "${enable_maintainer_mode+set}" = set; then
1722 enableval="$enable_maintainer_mode"
1723 USE_MAINTAINER_MODE=$enableval
1724else
1725 USE_MAINTAINER_MODE=no
1726fi
1727
1728 echo "$ac_t""$USE_MAINTAINER_MODE" 1>&6
1729 if test $USE_MAINTAINER_MODE = yes; then
1730 MAINT=
1731 else
1732 MAINT='#M#'
1733 fi
1734
1735
1736
1737. ${srcdir}/configure.host
1738
1739
1740
1741
1742
1743
ef346f1a
ILT
1744for ac_hdr in string.h strings.h stdlib.h unistd.h
1745do
b9a5c27f 1746ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
ef346f1a 1747echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
b5db0960 1748echo "configure:1749: checking for $ac_hdr" >&5
ef346f1a
ILT
1749if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1750 echo $ac_n "(cached) $ac_c" 1>&6
1751else
1752 cat > conftest.$ac_ext <<EOF
b5db0960 1753#line 1754 "configure"
ef346f1a
ILT
1754#include "confdefs.h"
1755#include <$ac_hdr>
1756EOF
b9a5c27f 1757ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
b5db0960 1758{ (eval echo configure:1759: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ef346f1a
ILT
1759ac_err=`grep -v '^ *+' conftest.out`
1760if test -z "$ac_err"; then
1761 rm -rf conftest*
1762 eval "ac_cv_header_$ac_safe=yes"
1763else
1764 echo "$ac_err" >&5
b9a5c27f
RS
1765 echo "configure: failed program was:" >&5
1766 cat conftest.$ac_ext >&5
ef346f1a
ILT
1767 rm -rf conftest*
1768 eval "ac_cv_header_$ac_safe=no"
1769fi
1770rm -f conftest*
1771fi
1772if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1773 echo "$ac_t""yes" 1>&6
b9a5c27f 1774 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
ef346f1a
ILT
1775 cat >> confdefs.h <<EOF
1776#define $ac_tr_hdr 1
1777EOF
1778
1779else
1780 echo "$ac_t""no" 1>&6
c0b47bae 1781fi
ef346f1a 1782done
8c32cf6e 1783
ef346f1a
ILT
1784for ac_func in sbrk
1785do
1786echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
b5db0960 1787echo "configure:1788: checking for $ac_func" >&5
ef346f1a
ILT
1788if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1789 echo $ac_n "(cached) $ac_c" 1>&6
1790else
1791 cat > conftest.$ac_ext <<EOF
b5db0960 1792#line 1793 "configure"
ef346f1a
ILT
1793#include "confdefs.h"
1794/* System header to define __stub macros and hopefully few prototypes,
1795 which can conflict with char $ac_func(); below. */
1796#include <assert.h>
1797/* Override any gcc2 internal prototype to avoid an error. */
b9a5c27f
RS
1798/* We use char because int might match the return type of a gcc2
1799 builtin and then its argument prototype would still apply. */
caf2a913 1800char $ac_func();
ef346f1a 1801
b9a5c27f 1802int main() {
ef346f1a
ILT
1803
1804/* The GNU C library defines this for functions which it implements
1805 to always fail with ENOSYS. Some functions are actually named
1806 something starting with __ and the normal name is an alias. */
1807#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1808choke me
1809#else
1810$ac_func();
1811#endif
1812
1813; return 0; }
1814EOF
b5db0960 1815if { (eval echo configure:1816: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
ef346f1a
ILT
1816 rm -rf conftest*
1817 eval "ac_cv_func_$ac_func=yes"
1818else
b9a5c27f
RS
1819 echo "configure: failed program was:" >&5
1820 cat conftest.$ac_ext >&5
ef346f1a
ILT
1821 rm -rf conftest*
1822 eval "ac_cv_func_$ac_func=no"
1823fi
1824rm -f conftest*
ef346f1a 1825fi
b9a5c27f 1826
ef346f1a
ILT
1827if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1828 echo "$ac_t""yes" 1>&6
caf2a913 1829 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
ef346f1a
ILT
1830 cat >> confdefs.h <<EOF
1831#define $ac_tr_func 1
1832EOF
1833
1834else
1835 echo "$ac_t""no" 1>&6
1836fi
1837done
c0b47bae 1838
caf2a913
ILT
1839ac_header_dirent=no
1840for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
1841do
b9a5c27f 1842ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
caf2a913 1843echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
b5db0960 1844echo "configure:1845: checking for $ac_hdr that defines DIR" >&5
caf2a913
ILT
1845if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
1846 echo $ac_n "(cached) $ac_c" 1>&6
1847else
1848 cat > conftest.$ac_ext <<EOF
b5db0960 1849#line 1850 "configure"
caf2a913
ILT
1850#include "confdefs.h"
1851#include <sys/types.h>
1852#include <$ac_hdr>
b9a5c27f 1853int main() {
caf2a913
ILT
1854DIR *dirp = 0;
1855; return 0; }
1856EOF
b5db0960 1857if { (eval echo configure:1858: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
caf2a913
ILT
1858 rm -rf conftest*
1859 eval "ac_cv_header_dirent_$ac_safe=yes"
1860else
b9a5c27f
RS
1861 echo "configure: failed program was:" >&5
1862 cat conftest.$ac_ext >&5
caf2a913
ILT
1863 rm -rf conftest*
1864 eval "ac_cv_header_dirent_$ac_safe=no"
1865fi
1866rm -f conftest*
caf2a913
ILT
1867fi
1868if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
1869 echo "$ac_t""yes" 1>&6
b9a5c27f 1870 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
caf2a913
ILT
1871 cat >> confdefs.h <<EOF
1872#define $ac_tr_hdr 1
1873EOF
1874 ac_header_dirent=$ac_hdr; break
1875else
1876 echo "$ac_t""no" 1>&6
1877fi
1878done
1879# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
1880if test $ac_header_dirent = dirent.h; then
b9a5c27f 1881echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
b5db0960 1882echo "configure:1883: checking for opendir in -ldir" >&5
b9a5c27f 1883ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
caf2a913
ILT
1884if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1885 echo $ac_n "(cached) $ac_c" 1>&6
1886else
1887 ac_save_LIBS="$LIBS"
1888LIBS="-ldir $LIBS"
1889cat > conftest.$ac_ext <<EOF
b5db0960 1890#line 1891 "configure"
caf2a913 1891#include "confdefs.h"
b9a5c27f
RS
1892/* Override any gcc2 internal prototype to avoid an error. */
1893/* We use char because int might match the return type of a gcc2
1894 builtin and then its argument prototype would still apply. */
1895char opendir();
caf2a913 1896
b9a5c27f 1897int main() {
caf2a913
ILT
1898opendir()
1899; return 0; }
1900EOF
b5db0960 1901if { (eval echo configure:1902: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
caf2a913
ILT
1902 rm -rf conftest*
1903 eval "ac_cv_lib_$ac_lib_var=yes"
1904else
b9a5c27f
RS
1905 echo "configure: failed program was:" >&5
1906 cat conftest.$ac_ext >&5
caf2a913
ILT
1907 rm -rf conftest*
1908 eval "ac_cv_lib_$ac_lib_var=no"
1909fi
1910rm -f conftest*
1911LIBS="$ac_save_LIBS"
1912
1913fi
1914if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1915 echo "$ac_t""yes" 1>&6
1916 LIBS="$LIBS -ldir"
1917else
1918 echo "$ac_t""no" 1>&6
1919fi
1920
1921else
b9a5c27f 1922echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
b5db0960 1923echo "configure:1924: checking for opendir in -lx" >&5
b9a5c27f 1924ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
caf2a913
ILT
1925if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1926 echo $ac_n "(cached) $ac_c" 1>&6
1927else
1928 ac_save_LIBS="$LIBS"
1929LIBS="-lx $LIBS"
1930cat > conftest.$ac_ext <<EOF
b5db0960 1931#line 1932 "configure"
caf2a913 1932#include "confdefs.h"
b9a5c27f
RS
1933/* Override any gcc2 internal prototype to avoid an error. */
1934/* We use char because int might match the return type of a gcc2
1935 builtin and then its argument prototype would still apply. */
1936char opendir();
caf2a913 1937
b9a5c27f 1938int main() {
caf2a913
ILT
1939opendir()
1940; return 0; }
1941EOF
b5db0960 1942if { (eval echo configure:1943: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
caf2a913
ILT
1943 rm -rf conftest*
1944 eval "ac_cv_lib_$ac_lib_var=yes"
1945else
b9a5c27f
RS
1946 echo "configure: failed program was:" >&5
1947 cat conftest.$ac_ext >&5
caf2a913
ILT
1948 rm -rf conftest*
1949 eval "ac_cv_lib_$ac_lib_var=no"
1950fi
1951rm -f conftest*
1952LIBS="$ac_save_LIBS"
1953
1954fi
1955if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1956 echo "$ac_t""yes" 1>&6
1957 LIBS="$LIBS -lx"
1958else
1959 echo "$ac_t""no" 1>&6
1960fi
1961
1962fi
1963
1964
c0b47bae 1965
ef346f1a 1966case "${host}" in
b9a5c27f 1967i[345]86-*-msdos* | i[345]86-*-go32* | *-*-cygwin32 | *-*-windows)
ef346f1a
ILT
1968 cat >> confdefs.h <<\EOF
1969#define USE_BINARY_FOPEN 1
1970EOF
1971 ;;
1972esac
6c18e393 1973
b9a5c27f 1974echo $ac_n "checking whether strstr must be declared""... $ac_c" 1>&6
b5db0960 1975echo "configure:1976: checking whether strstr must be declared" >&5
b9a5c27f
RS
1976if eval "test \"`echo '$''{'bfd_cv_decl_needed_strstr'+set}'`\" = set"; then
1977 echo $ac_n "(cached) $ac_c" 1>&6
1978else
1979 cat > conftest.$ac_ext <<EOF
b5db0960 1980#line 1981 "configure"
b9a5c27f
RS
1981#include "confdefs.h"
1982
1983#include <stdio.h>
1984#ifdef HAVE_STRING_H
1985#include <string.h>
1986#else
1987#ifdef HAVE_STRINGS_H
1988#include <strings.h>
1989#endif
1990#endif
1991#ifdef HAVE_STDLIB_H
1992#include <stdlib.h>
1993#endif
1994#ifdef HAVE_UNISTD_H
1995#include <unistd.h>
1996#endif
1997int main() {
1998char *(*pfn) = (char *(*)) strstr
1999; return 0; }
2000EOF
b5db0960 2001if { (eval echo configure:2002: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
b9a5c27f
RS
2002 rm -rf conftest*
2003 bfd_cv_decl_needed_strstr=no
2004else
2005 echo "configure: failed program was:" >&5
2006 cat conftest.$ac_ext >&5
2007 rm -rf conftest*
2008 bfd_cv_decl_needed_strstr=yes
2009fi
2010rm -f conftest*
2011fi
2012
2013echo "$ac_t""$bfd_cv_decl_needed_strstr" 1>&6
2014if test $bfd_cv_decl_needed_strstr = yes; then
2015 bfd_tr_decl=NEED_DECLARATION_`echo strstr | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2016 cat >> confdefs.h <<EOF
2017#define $bfd_tr_decl 1
2018EOF
2019
2020fi
2021
caf2a913 2022echo $ac_n "checking whether free must be declared""... $ac_c" 1>&6
b5db0960 2023echo "configure:2024: checking whether free must be declared" >&5
caf2a913
ILT
2024if eval "test \"`echo '$''{'bfd_cv_decl_needed_free'+set}'`\" = set"; then
2025 echo $ac_n "(cached) $ac_c" 1>&6
2026else
2027 cat > conftest.$ac_ext <<EOF
b5db0960 2028#line 2029 "configure"
caf2a913
ILT
2029#include "confdefs.h"
2030
2031#include <stdio.h>
b9a5c27f
RS
2032#ifdef HAVE_STRING_H
2033#include <string.h>
2034#else
2035#ifdef HAVE_STRINGS_H
2036#include <strings.h>
2037#endif
2038#endif
caf2a913
ILT
2039#ifdef HAVE_STDLIB_H
2040#include <stdlib.h>
2041#endif
2042#ifdef HAVE_UNISTD_H
2043#include <unistd.h>
2044#endif
b9a5c27f 2045int main() {
caf2a913
ILT
2046char *(*pfn) = (char *(*)) free
2047; return 0; }
2048EOF
b5db0960 2049if { (eval echo configure:2050: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
caf2a913
ILT
2050 rm -rf conftest*
2051 bfd_cv_decl_needed_free=no
2052else
b9a5c27f
RS
2053 echo "configure: failed program was:" >&5
2054 cat conftest.$ac_ext >&5
caf2a913
ILT
2055 rm -rf conftest*
2056 bfd_cv_decl_needed_free=yes
2057fi
2058rm -f conftest*
caf2a913
ILT
2059fi
2060
2061echo "$ac_t""$bfd_cv_decl_needed_free" 1>&6
2062if test $bfd_cv_decl_needed_free = yes; then
2063 bfd_tr_decl=NEED_DECLARATION_`echo free | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2064 cat >> confdefs.h <<EOF
2065#define $bfd_tr_decl 1
2066EOF
2067
2068fi
2069
b9a5c27f 2070echo $ac_n "checking whether sbrk must be declared""... $ac_c" 1>&6
b5db0960 2071echo "configure:2072: checking whether sbrk must be declared" >&5
b9a5c27f
RS
2072if eval "test \"`echo '$''{'bfd_cv_decl_needed_sbrk'+set}'`\" = set"; then
2073 echo $ac_n "(cached) $ac_c" 1>&6
2074else
2075 cat > conftest.$ac_ext <<EOF
b5db0960 2076#line 2077 "configure"
b9a5c27f
RS
2077#include "confdefs.h"
2078
2079#include <stdio.h>
2080#ifdef HAVE_STRING_H
2081#include <string.h>
2082#else
2083#ifdef HAVE_STRINGS_H
2084#include <strings.h>
2085#endif
2086#endif
2087#ifdef HAVE_STDLIB_H
2088#include <stdlib.h>
2089#endif
2090#ifdef HAVE_UNISTD_H
2091#include <unistd.h>
2092#endif
2093int main() {
2094char *(*pfn) = (char *(*)) sbrk
2095; return 0; }
2096EOF
b5db0960 2097if { (eval echo configure:2098: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
b9a5c27f
RS
2098 rm -rf conftest*
2099 bfd_cv_decl_needed_sbrk=no
2100else
2101 echo "configure: failed program was:" >&5
2102 cat conftest.$ac_ext >&5
2103 rm -rf conftest*
2104 bfd_cv_decl_needed_sbrk=yes
2105fi
2106rm -f conftest*
2107fi
2108
2109echo "$ac_t""$bfd_cv_decl_needed_sbrk" 1>&6
2110if test $bfd_cv_decl_needed_sbrk = yes; then
2111 bfd_tr_decl=NEED_DECLARATION_`echo sbrk | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2112 cat >> confdefs.h <<EOF
2113#define $bfd_tr_decl 1
2114EOF
2115
2116fi
2117
2118echo $ac_n "checking whether getenv must be declared""... $ac_c" 1>&6
b5db0960 2119echo "configure:2120: checking whether getenv must be declared" >&5
b9a5c27f
RS
2120if eval "test \"`echo '$''{'bfd_cv_decl_needed_getenv'+set}'`\" = set"; then
2121 echo $ac_n "(cached) $ac_c" 1>&6
2122else
2123 cat > conftest.$ac_ext <<EOF
b5db0960 2124#line 2125 "configure"
b9a5c27f
RS
2125#include "confdefs.h"
2126
2127#include <stdio.h>
2128#ifdef HAVE_STRING_H
2129#include <string.h>
2130#else
2131#ifdef HAVE_STRINGS_H
2132#include <strings.h>
2133#endif
2134#endif
2135#ifdef HAVE_STDLIB_H
2136#include <stdlib.h>
2137#endif
2138#ifdef HAVE_UNISTD_H
2139#include <unistd.h>
2140#endif
2141int main() {
2142char *(*pfn) = (char *(*)) getenv
2143; return 0; }
2144EOF
b5db0960 2145if { (eval echo configure:2146: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
b9a5c27f
RS
2146 rm -rf conftest*
2147 bfd_cv_decl_needed_getenv=no
2148else
2149 echo "configure: failed program was:" >&5
2150 cat conftest.$ac_ext >&5
2151 rm -rf conftest*
2152 bfd_cv_decl_needed_getenv=yes
2153fi
2154rm -f conftest*
2155fi
2156
2157echo "$ac_t""$bfd_cv_decl_needed_getenv" 1>&6
2158if test $bfd_cv_decl_needed_getenv = yes; then
2159 bfd_tr_decl=NEED_DECLARATION_`echo getenv | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2160 cat >> confdefs.h <<EOF
2161#define $bfd_tr_decl 1
2162EOF
2163
2164fi
2165
caf2a913 2166
ef346f1a 2167# target-specific stuff:
3d6f0983 2168
95d31c3c 2169all_targets=
ef346f1a
ILT
2170EMUL=
2171all_emuls=
95d31c3c 2172TDIRS=
ef346f1a 2173
95d31c3c 2174for targ_alias in `echo $target_alias $enable_targets | sed 's/,/ /g'`
ef346f1a 2175do
95d31c3c
ILT
2176 if test "$targ_alias" = "all"; then
2177 all_targets=true
2178 else
2179 # Canonicalize the secondary target names.
b9a5c27f 2180 result=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $targ_alias 2>/dev/null`
95d31c3c
ILT
2181 if test -n "$result"; then
2182 targ=$result
ef346f1a 2183 else
95d31c3c 2184 targ=$targ_alias
ef346f1a 2185 fi
2ee11735 2186
95d31c3c 2187 . ${srcdir}/configure.tgt
ef346f1a 2188
95d31c3c
ILT
2189 if test "$targ" = "$target"; then
2190 EMUL=$targ_emul
2191 fi
ef346f1a 2192
95d31c3c
ILT
2193 for i in $targ_emul $targ_extra_emuls; do
2194 case " $all_emuls " in
2195 *" e${i}.o "*) ;;
2196 *)
2197 all_emuls="$all_emuls e${i}.o"
2198 eval result=\$tdir_$i
2199 test -z "$result" && result=$targ_alias
2200 TDIRS="$TDIRS\\
2201tdir_$i=$result"
2202 ;;
ef346f1a
ILT
2203 esac
2204 done
95d31c3c
ILT
2205 fi
2206done
ef346f1a 2207
ef346f1a 2208
ef346f1a
ILT
2209
2210
95d31c3c 2211if test x${all_targets} = xtrue; then
b9a5c27f
RS
2212 if test x${want64} = xtrue; then
2213 EMULATION_OFILES='$(ALL_EMULATIONS) $(ALL_64_EMULATIONS)'
2214 else
2215 EMULATION_OFILES='$(ALL_EMULATIONS)'
2216 fi
95d31c3c
ILT
2217else
2218 EMULATION_OFILES=$all_emuls
2219fi
2220
ef346f1a
ILT
2221
2222trap '' 1 2 15
2223cat > confcache <<\EOF
2224# This file is a shell script that caches the results of configure
2225# tests run on this system so they can be shared between configure
2226# scripts and configure runs. It is not useful on other systems.
2227# If it contains results you don't want to keep, you may remove or edit it.
2228#
2229# By default, configure uses ./config.cache as the cache file,
2230# creating it if it does not exist already. You can give configure
2231# the --cache-file=FILE option to use a different cache file; that is
2232# what configure does when it calls configure scripts in
2233# subdirectories, so they share the cache.
2234# Giving --cache-file=/dev/null disables caching, for debugging configure.
2235# config.status only pays attention to the cache file if you give it the
2236# --recheck option to rerun configure.
2237#
2238EOF
b9a5c27f
RS
2239# The following way of writing the cache mishandles newlines in values,
2240# but we know of no workaround that is simple, portable, and efficient.
2241# So, don't put newlines in cache variables' values.
ef346f1a
ILT
2242# Ultrix sh set writes to stderr and can't be redirected directly,
2243# and sets the high bit in the cache file unless we assign to the vars.
2244(set) 2>&1 |
b9a5c27f
RS
2245 case `(ac_space=' '; set) 2>&1` in
2246 *ac_space=\ *)
2247 # `set' does not quote correctly, so add quotes (double-quote substitution
2248 # turns \\\\ into \\, and sed turns \\ into \).
2249 sed -n \
2250 -e "s/'/'\\\\''/g" \
2251 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
2252 ;;
2253 *)
2254 # `set' quotes correctly as required by POSIX, so do not add quotes.
2255 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
2256 ;;
2257 esac >> confcache
ef346f1a
ILT
2258if cmp -s $cache_file confcache; then
2259 :
2260else
2261 if test -w $cache_file; then
2262 echo "updating cache $cache_file"
2263 cat confcache > $cache_file
2264 else
2265 echo "not updating unwritable cache $cache_file"
2266 fi
2267fi
2268rm -f confcache
2269
2270trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
2271
2272test "x$prefix" = xNONE && prefix=$ac_default_prefix
2273# Let make expand exec_prefix.
2274test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
2275
2276# Any assignment to VPATH causes Sun make to only execute
2277# the first set of double-colon rules, so remove it if not needed.
2278# If there is a colon in the path, we need to keep it.
2279if test "x$srcdir" = x.; then
2280 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
2281fi
2282
2283trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
2284
2285DEFS=-DHAVE_CONFIG_H
2286
2287# Without the "./", some shells look in PATH for config.status.
2288: ${CONFIG_STATUS=./config.status}
2289
2290echo creating $CONFIG_STATUS
2291rm -f $CONFIG_STATUS
2292cat > $CONFIG_STATUS <<EOF
2293#! /bin/sh
2294# Generated automatically by configure.
2295# Run this file to recreate the current configuration.
2296# This directory was configured as follows,
2297# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
2298#
2299# $0 $ac_configure_args
8c32cf6e 2300#
ef346f1a
ILT
2301# Compiler output produced by configure, useful for debugging
2302# configure, is in ./config.log if it exists.
2303
2304ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
2305for ac_option
2306do
2307 case "\$ac_option" in
2308 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
2309 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
2310 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
2311 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
b5db0960 2312 echo "$CONFIG_STATUS generated by autoconf version 2.12.1"
ef346f1a
ILT
2313 exit 0 ;;
2314 -help | --help | --hel | --he | --h)
2315 echo "\$ac_cs_usage"; exit 0 ;;
2316 *) echo "\$ac_cs_usage"; exit 1 ;;
2317 esac
2318done
2319
2320ac_given_srcdir=$srcdir
b9a5c27f 2321ac_given_INSTALL="$INSTALL"
ef346f1a
ILT
2322
2323trap 'rm -fr `echo "Makefile config.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
2e598345
ILT
2324EOF
2325cat >> $CONFIG_STATUS <<EOF
ef346f1a 2326
caf2a913 2327# Protect against being on the right side of a sed subst in config.status.
2e598345
ILT
2328sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
2329 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
ef346f1a
ILT
2330$ac_vpsub
2331$extrasub
2332s%@CFLAGS@%$CFLAGS%g
2333s%@CPPFLAGS@%$CPPFLAGS%g
2334s%@CXXFLAGS@%$CXXFLAGS%g
2335s%@DEFS@%$DEFS%g
2336s%@LDFLAGS@%$LDFLAGS%g
2337s%@LIBS@%$LIBS%g
2338s%@exec_prefix@%$exec_prefix%g
2339s%@prefix@%$prefix%g
2340s%@program_transform_name@%$program_transform_name%g
caf2a913
ILT
2341s%@bindir@%$bindir%g
2342s%@sbindir@%$sbindir%g
2343s%@libexecdir@%$libexecdir%g
2344s%@datadir@%$datadir%g
2345s%@sysconfdir@%$sysconfdir%g
2346s%@sharedstatedir@%$sharedstatedir%g
2347s%@localstatedir@%$localstatedir%g
2348s%@libdir@%$libdir%g
2349s%@includedir@%$includedir%g
2350s%@oldincludedir@%$oldincludedir%g
2351s%@infodir@%$infodir%g
2352s%@mandir@%$mandir%g
ef346f1a
ILT
2353s%@host@%$host%g
2354s%@host_alias@%$host_alias%g
2355s%@host_cpu@%$host_cpu%g
2356s%@host_vendor@%$host_vendor%g
2357s%@host_os@%$host_os%g
2358s%@target@%$target%g
2359s%@target_alias@%$target_alias%g
2360s%@target_cpu@%$target_cpu%g
2361s%@target_vendor@%$target_vendor%g
2362s%@target_os@%$target_os%g
2363s%@build@%$build%g
2364s%@build_alias@%$build_alias%g
2365s%@build_cpu@%$build_cpu%g
2366s%@build_vendor@%$build_vendor%g
2367s%@build_os@%$build_os%g
b9a5c27f
RS
2368s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
2369s%@INSTALL_DATA@%$INSTALL_DATA%g
b5db0960
ILT
2370s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
2371s%@PACKAGE@%$PACKAGE%g
2372s%@VERSION@%$VERSION%g
2373s%@ACLOCAL@%$ACLOCAL%g
2374s%@AUTOCONF@%$AUTOCONF%g
2375s%@AUTOMAKE@%$AUTOMAKE%g
2376s%@AUTOHEADER@%$AUTOHEADER%g
2377s%@MAKEINFO@%$MAKEINFO%g
2378s%@SET_MAKE@%$SET_MAKE%g
2379s%@CC@%$CC%g
2380s%@RANLIB@%$RANLIB%g
2381s%@LD@%$LD%g
2382s%@LN_S@%$LN_S%g
2383s%@LIBTOOL@%$LIBTOOL%g
b9a5c27f 2384s%@EXEEXT@%$EXEEXT%g
b5db0960
ILT
2385s%@YACC@%$YACC%g
2386s%@LEX@%$LEX%g
2387s%@LEXLIB@%$LEXLIB%g
2388s%@CPP@%$CPP%g
2389s%@LEX_OUTPUT_ROOT@%$LEX_OUTPUT_ROOT%g
2390s%@MAINT@%$MAINT%g
ef346f1a
ILT
2391s%@HDEFINES@%$HDEFINES%g
2392s%@HOSTING_CRT0@%$HOSTING_CRT0%g
2393s%@HOSTING_LIBS@%$HOSTING_LIBS%g
2394s%@NATIVE_LIB_DIRS@%$NATIVE_LIB_DIRS%g
ef346f1a 2395s%@EMUL@%$EMUL%g
95d31c3c 2396s%@TDIRS@%$TDIRS%g
ef346f1a
ILT
2397s%@EMULATION_OFILES@%$EMULATION_OFILES%g
2398
2399CEOF
2400EOF
b9a5c27f
RS
2401
2402cat >> $CONFIG_STATUS <<\EOF
2403
2404# Split the substitutions into bite-sized pieces for seds with
2405# small command number limits, like on Digital OSF/1 and HP-UX.
2406ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
2407ac_file=1 # Number of current file.
2408ac_beg=1 # First line for current file.
2409ac_end=$ac_max_sed_cmds # Line after last line for current file.
2410ac_more_lines=:
2411ac_sed_cmds=""
2412while $ac_more_lines; do
2413 if test $ac_beg -gt 1; then
2414 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
2415 else
2416 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
2417 fi
2418 if test ! -s conftest.s$ac_file; then
2419 ac_more_lines=false
2420 rm -f conftest.s$ac_file
2421 else
2422 if test -z "$ac_sed_cmds"; then
2423 ac_sed_cmds="sed -f conftest.s$ac_file"
2424 else
2425 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
2426 fi
2427 ac_file=`expr $ac_file + 1`
2428 ac_beg=$ac_end
2429 ac_end=`expr $ac_end + $ac_max_sed_cmds`
2430 fi
2431done
2432if test -z "$ac_sed_cmds"; then
2433 ac_sed_cmds=cat
2434fi
2435EOF
2436
ef346f1a
ILT
2437cat >> $CONFIG_STATUS <<EOF
2438
2439CONFIG_FILES=\${CONFIG_FILES-"Makefile"}
2440EOF
2441cat >> $CONFIG_STATUS <<\EOF
2442for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
b9a5c27f 2443 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
ef346f1a 2444 case "$ac_file" in
b9a5c27f 2445 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
ef346f1a
ILT
2446 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
2447 *) ac_file_in="${ac_file}.in" ;;
2448 esac
2449
b9a5c27f 2450 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
ef346f1a
ILT
2451
2452 # Remove last slash and all that follows it. Not all systems have dirname.
2453 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
2454 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
2455 # The file is in a subdirectory.
2456 test ! -d "$ac_dir" && mkdir "$ac_dir"
2457 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
2458 # A "../" for each directory in $ac_dir_suffix.
2459 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
2460 else
2461 ac_dir_suffix= ac_dots=
2462 fi
2463
2464 case "$ac_given_srcdir" in
2465 .) srcdir=.
2466 if test -z "$ac_dots"; then top_srcdir=.
2467 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
2468 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
2469 *) # Relative path.
2470 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
2471 top_srcdir="$ac_dots$ac_given_srcdir" ;;
2472 esac
2473
b9a5c27f
RS
2474 case "$ac_given_INSTALL" in
2475 [/$]*) INSTALL="$ac_given_INSTALL" ;;
2476 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
2477 esac
2478
ef346f1a
ILT
2479 echo creating "$ac_file"
2480 rm -f "$ac_file"
2481 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
2482 case "$ac_file" in
2483 *Makefile*) ac_comsub="1i\\
2484# $configure_input" ;;
2485 *) ac_comsub= ;;
2486 esac
b9a5c27f 2487
b5db0960 2488 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
ef346f1a
ILT
2489 sed -e "$ac_comsub
2490s%@configure_input@%$configure_input%g
2491s%@srcdir@%$srcdir%g
2492s%@top_srcdir@%$top_srcdir%g
b9a5c27f
RS
2493s%@INSTALL@%$INSTALL%g
2494" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
ef346f1a 2495fi; done
b9a5c27f 2496rm -f conftest.s*
ef346f1a
ILT
2497
2498# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
2499# NAME is the cpp macro being defined and VALUE is the value it is being given.
8c32cf6e 2500#
ef346f1a
ILT
2501# ac_d sets the value in "#define NAME VALUE" lines.
2502ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
2503ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
2504ac_dC='\3'
2505ac_dD='%g'
2506# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
2507ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
2508ac_uB='\([ ]\)%\1#\2define\3'
2509ac_uC=' '
2510ac_uD='\4%g'
2511# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
2512ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
2513ac_eB='$%\1#\2define\3'
2514ac_eC=' '
2515ac_eD='%g'
2516
b9a5c27f
RS
2517if test "${CONFIG_HEADERS+set}" != set; then
2518EOF
2519cat >> $CONFIG_STATUS <<EOF
2520 CONFIG_HEADERS="config.h:config.in"
2521EOF
2522cat >> $CONFIG_STATUS <<\EOF
2523fi
ef346f1a 2524for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
b9a5c27f 2525 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
ef346f1a 2526 case "$ac_file" in
b9a5c27f 2527 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
ef346f1a
ILT
2528 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
2529 *) ac_file_in="${ac_file}.in" ;;
2530 esac
2531
2532 echo creating $ac_file
2533
2534 rm -f conftest.frag conftest.in conftest.out
b5db0960 2535 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
b9a5c27f 2536 cat $ac_file_inputs > conftest.in
ef346f1a
ILT
2537
2538EOF
2539
2540# Transform confdefs.h into a sed script conftest.vals that substitutes
2541# the proper values into config.h.in to produce config.h. And first:
caf2a913 2542# Protect against being on the right side of a sed subst in config.status.
ef346f1a
ILT
2543# Protect against being in an unquoted here document in config.status.
2544rm -f conftest.vals
2545cat > conftest.hdr <<\EOF
2546s/[\\&%]/\\&/g
2547s%[\\$`]%\\&%g
b9a5c27f 2548s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
ef346f1a
ILT
2549s%ac_d%ac_u%gp
2550s%ac_u%ac_e%gp
2551EOF
2552sed -n -f conftest.hdr confdefs.h > conftest.vals
2553rm -f conftest.hdr
2554
2555# This sed command replaces #undef with comments. This is necessary, for
2556# example, in the case of _POSIX_SOURCE, which is predefined and required
2557# on some systems where configure will not decide to define it.
2558cat >> conftest.vals <<\EOF
2559s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
2560EOF
2561
2562# Break up conftest.vals because some shells have a limit on
2563# the size of here documents, and old seds have small limits too.
ef346f1a
ILT
2564
2565rm -f conftest.tail
2566while :
2567do
2568 ac_lines=`grep -c . conftest.vals`
2569 # grep -c gives empty output for an empty file on some AIX systems.
2570 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
2571 # Write a limited-size here document to conftest.frag.
2572 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
2573 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
2574 echo 'CEOF
2575 sed -f conftest.frag conftest.in > conftest.out
2576 rm -f conftest.in
2577 mv conftest.out conftest.in
2578' >> $CONFIG_STATUS
2579 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
2580 rm -f conftest.vals
2581 mv conftest.tail conftest.vals
2582done
2583rm -f conftest.vals
2584
2585cat >> $CONFIG_STATUS <<\EOF
2586 rm -f conftest.frag conftest.h
2587 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
2588 cat conftest.in >> conftest.h
2589 rm -f conftest.in
2590 if cmp -s $ac_file conftest.h 2>/dev/null; then
2591 echo "$ac_file is unchanged"
2592 rm -f conftest.h
2593 else
b9a5c27f
RS
2594 # Remove last slash and all that follows it. Not all systems have dirname.
2595 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
2596 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
2597 # The file is in a subdirectory.
2598 test ! -d "$ac_dir" && mkdir "$ac_dir"
2599 fi
ef346f1a
ILT
2600 rm -f $ac_file
2601 mv conftest.h $ac_file
2602 fi
2603fi; done
2604
b9a5c27f
RS
2605EOF
2606cat >> $CONFIG_STATUS <<EOF
ef346f1a 2607
b5db0960 2608
b9a5c27f
RS
2609EOF
2610cat >> $CONFIG_STATUS <<\EOF
b5db0960
ILT
2611test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h
2612
ef346f1a
ILT
2613exit 0
2614EOF
2615chmod +x $CONFIG_STATUS
2616rm -fr confdefs* $ac_clean_files
2617test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
2ee11735 2618
This page took 0.485389 seconds and 4 git commands to generate.