* frame.h (enum lval_type): Conditionalize on __GNUC__
[deliverable/binutils-gdb.git] / ld / configure
CommitLineData
ef346f1a 1#! /bin/sh
eb02fd64 2
ef346f1a 3# Guess values for system-dependent variables and create Makefiles.
b9a5c27f
RS
4# Generated automatically using autoconf version 2.12
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
15 --enable-targets alternative target configurations"
2e598345
ILT
16ac_help="$ac_help
17 --enable-shared build shared BFD library"
b9a5c27f
RS
18ac_help="$ac_help
19 --enable-64-bit-bfd 64-bit support (on hosts with narrower word sizes)"
ef346f1a
ILT
20
21# Initialize some variables set by options.
22# The variables have the same names as the options, with
23# dashes changed to underlines.
24build=NONE
25cache_file=./config.cache
26exec_prefix=NONE
27host=NONE
28no_create=
29nonopt=NONE
30no_recursion=
31prefix=NONE
32program_prefix=NONE
33program_suffix=NONE
34program_transform_name=s,x,x,
35silent=
36site=
37srcdir=
38target=NONE
39verbose=
40x_includes=NONE
41x_libraries=NONE
caf2a913
ILT
42bindir='${exec_prefix}/bin'
43sbindir='${exec_prefix}/sbin'
44libexecdir='${exec_prefix}/libexec'
45datadir='${prefix}/share'
46sysconfdir='${prefix}/etc'
47sharedstatedir='${prefix}/com'
48localstatedir='${prefix}/var'
49libdir='${exec_prefix}/lib'
50includedir='${prefix}/include'
51oldincludedir='/usr/include'
52infodir='${prefix}/info'
53mandir='${prefix}/man'
eb02fd64 54
ef346f1a
ILT
55# Initialize some other variables.
56subdirs=
caf2a913 57MFLAGS= MAKEFLAGS=
b9a5c27f
RS
58# Maximum number of lines to put in a shell here document.
59ac_max_here_lines=12
eb02fd64 60
ef346f1a
ILT
61ac_prev=
62for ac_option
63do
eb02fd64 64
ef346f1a
ILT
65 # If the previous option needs an argument, assign it.
66 if test -n "$ac_prev"; then
67 eval "$ac_prev=\$ac_option"
68 ac_prev=
69 continue
70 fi
71
72 case "$ac_option" in
73 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
74 *) ac_optarg= ;;
75 esac
76
77 # Accept the important Cygnus configure options, so we can diagnose typos.
78
79 case "$ac_option" in
80
caf2a913
ILT
81 -bindir | --bindir | --bindi | --bind | --bin | --bi)
82 ac_prev=bindir ;;
83 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
84 bindir="$ac_optarg" ;;
85
86 -build | --build | --buil | --bui | --bu)
ef346f1a 87 ac_prev=build ;;
caf2a913 88 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
ef346f1a
ILT
89 build="$ac_optarg" ;;
90
91 -cache-file | --cache-file | --cache-fil | --cache-fi \
92 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
93 ac_prev=cache_file ;;
94 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
95 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
96 cache_file="$ac_optarg" ;;
97
caf2a913
ILT
98 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
99 ac_prev=datadir ;;
100 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
101 | --da=*)
102 datadir="$ac_optarg" ;;
103
ef346f1a
ILT
104 -disable-* | --disable-*)
105 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
106 # Reject names that are not valid shell variable names.
107 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
108 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
109 fi
110 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
111 eval "enable_${ac_feature}=no" ;;
112
113 -enable-* | --enable-*)
114 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
115 # Reject names that are not valid shell variable names.
116 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
117 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
118 fi
119 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
120 case "$ac_option" in
121 *=*) ;;
122 *) ac_optarg=yes ;;
123 esac
124 eval "enable_${ac_feature}='$ac_optarg'" ;;
125
126 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
127 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
128 | --exec | --exe | --ex)
129 ac_prev=exec_prefix ;;
130 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
131 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
132 | --exec=* | --exe=* | --ex=*)
133 exec_prefix="$ac_optarg" ;;
134
135 -gas | --gas | --ga | --g)
136 # Obsolete; use --with-gas.
137 with_gas=yes ;;
138
139 -help | --help | --hel | --he)
140 # Omit some internal or obsolete options to make the list less imposing.
141 # This message is too long to be a string in the A/UX 3.1 sh.
142 cat << EOF
143Usage: configure [options] [host]
144Options: [defaults in brackets after descriptions]
145Configuration:
146 --cache-file=FILE cache test results in FILE
147 --help print this message
148 --no-create do not create output files
149 --quiet, --silent do not print \`checking...' messages
150 --version print the version of autoconf that created configure
151Directory and file names:
152 --prefix=PREFIX install architecture-independent files in PREFIX
153 [$ac_default_prefix]
caf2a913 154 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
ef346f1a 155 [same as prefix]
caf2a913
ILT
156 --bindir=DIR user executables in DIR [EPREFIX/bin]
157 --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
158 --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
159 --datadir=DIR read-only architecture-independent data in DIR
160 [PREFIX/share]
161 --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
162 --sharedstatedir=DIR modifiable architecture-independent data in DIR
163 [PREFIX/com]
164 --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
165 --libdir=DIR object code libraries in DIR [EPREFIX/lib]
166 --includedir=DIR C header files in DIR [PREFIX/include]
167 --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
168 --infodir=DIR info documentation in DIR [PREFIX/info]
169 --mandir=DIR man documentation in DIR [PREFIX/man]
ef346f1a
ILT
170 --srcdir=DIR find the sources in DIR [configure dir or ..]
171 --program-prefix=PREFIX prepend PREFIX to installed program names
172 --program-suffix=SUFFIX append SUFFIX to installed program names
caf2a913
ILT
173 --program-transform-name=PROGRAM
174 run sed PROGRAM on installed program names
175EOF
176 cat << EOF
ef346f1a
ILT
177Host type:
178 --build=BUILD configure for building on BUILD [BUILD=HOST]
179 --host=HOST configure for HOST [guessed]
180 --target=TARGET configure for TARGET [TARGET=HOST]
181Features and packages:
182 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
183 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
184 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
185 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
186 --x-includes=DIR X include files are in DIR
187 --x-libraries=DIR X library files are in DIR
ef346f1a 188EOF
caf2a913
ILT
189 if test -n "$ac_help"; then
190 echo "--enable and --with options recognized:$ac_help"
191 fi
ef346f1a
ILT
192 exit 0 ;;
193
194 -host | --host | --hos | --ho)
195 ac_prev=host ;;
196 -host=* | --host=* | --hos=* | --ho=*)
197 host="$ac_optarg" ;;
198
caf2a913
ILT
199 -includedir | --includedir | --includedi | --included | --include \
200 | --includ | --inclu | --incl | --inc)
201 ac_prev=includedir ;;
202 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
203 | --includ=* | --inclu=* | --incl=* | --inc=*)
204 includedir="$ac_optarg" ;;
205
206 -infodir | --infodir | --infodi | --infod | --info | --inf)
207 ac_prev=infodir ;;
208 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
209 infodir="$ac_optarg" ;;
210
211 -libdir | --libdir | --libdi | --libd)
212 ac_prev=libdir ;;
213 -libdir=* | --libdir=* | --libdi=* | --libd=*)
214 libdir="$ac_optarg" ;;
215
216 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
217 | --libexe | --libex | --libe)
218 ac_prev=libexecdir ;;
219 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
220 | --libexe=* | --libex=* | --libe=*)
221 libexecdir="$ac_optarg" ;;
222
223 -localstatedir | --localstatedir | --localstatedi | --localstated \
224 | --localstate | --localstat | --localsta | --localst \
225 | --locals | --local | --loca | --loc | --lo)
226 ac_prev=localstatedir ;;
227 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
228 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
229 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
230 localstatedir="$ac_optarg" ;;
231
232 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
233 ac_prev=mandir ;;
234 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
235 mandir="$ac_optarg" ;;
236
ef346f1a
ILT
237 -nfp | --nfp | --nf)
238 # Obsolete; use --without-fp.
239 with_fp=no ;;
240
241 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
242 | --no-cr | --no-c)
243 no_create=yes ;;
244
245 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
246 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
247 no_recursion=yes ;;
248
caf2a913
ILT
249 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
250 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
251 | --oldin | --oldi | --old | --ol | --o)
252 ac_prev=oldincludedir ;;
253 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
254 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
255 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
256 oldincludedir="$ac_optarg" ;;
257
ef346f1a
ILT
258 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
259 ac_prev=prefix ;;
260 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
261 prefix="$ac_optarg" ;;
262
263 -program-prefix | --program-prefix | --program-prefi | --program-pref \
264 | --program-pre | --program-pr | --program-p)
265 ac_prev=program_prefix ;;
266 -program-prefix=* | --program-prefix=* | --program-prefi=* \
267 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
268 program_prefix="$ac_optarg" ;;
269
270 -program-suffix | --program-suffix | --program-suffi | --program-suff \
271 | --program-suf | --program-su | --program-s)
272 ac_prev=program_suffix ;;
273 -program-suffix=* | --program-suffix=* | --program-suffi=* \
274 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
275 program_suffix="$ac_optarg" ;;
276
277 -program-transform-name | --program-transform-name \
278 | --program-transform-nam | --program-transform-na \
279 | --program-transform-n | --program-transform- \
280 | --program-transform | --program-transfor \
281 | --program-transfo | --program-transf \
282 | --program-trans | --program-tran \
283 | --progr-tra | --program-tr | --program-t)
284 ac_prev=program_transform_name ;;
285 -program-transform-name=* | --program-transform-name=* \
286 | --program-transform-nam=* | --program-transform-na=* \
287 | --program-transform-n=* | --program-transform-=* \
288 | --program-transform=* | --program-transfor=* \
289 | --program-transfo=* | --program-transf=* \
290 | --program-trans=* | --program-tran=* \
291 | --progr-tra=* | --program-tr=* | --program-t=*)
292 program_transform_name="$ac_optarg" ;;
293
294 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
295 | -silent | --silent | --silen | --sile | --sil)
296 silent=yes ;;
297
caf2a913
ILT
298 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
299 ac_prev=sbindir ;;
300 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
301 | --sbi=* | --sb=*)
302 sbindir="$ac_optarg" ;;
303
304 -sharedstatedir | --sharedstatedir | --sharedstatedi \
305 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
306 | --sharedst | --shareds | --shared | --share | --shar \
307 | --sha | --sh)
308 ac_prev=sharedstatedir ;;
309 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
310 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
311 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
312 | --sha=* | --sh=*)
313 sharedstatedir="$ac_optarg" ;;
314
ef346f1a
ILT
315 -site | --site | --sit)
316 ac_prev=site ;;
317 -site=* | --site=* | --sit=*)
318 site="$ac_optarg" ;;
319
320 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
321 ac_prev=srcdir ;;
322 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
323 srcdir="$ac_optarg" ;;
324
caf2a913
ILT
325 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
326 | --syscon | --sysco | --sysc | --sys | --sy)
327 ac_prev=sysconfdir ;;
328 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
329 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
330 sysconfdir="$ac_optarg" ;;
331
ef346f1a
ILT
332 -target | --target | --targe | --targ | --tar | --ta | --t)
333 ac_prev=target ;;
334 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
335 target="$ac_optarg" ;;
336
337 -v | -verbose | --verbose | --verbos | --verbo | --verb)
338 verbose=yes ;;
339
340 -version | --version | --versio | --versi | --vers)
b9a5c27f 341 echo "configure generated by autoconf version 2.12"
ef346f1a
ILT
342 exit 0 ;;
343
344 -with-* | --with-*)
345 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
346 # Reject names that are not valid shell variable names.
347 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
348 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
349 fi
350 ac_package=`echo $ac_package| sed 's/-/_/g'`
351 case "$ac_option" in
352 *=*) ;;
353 *) ac_optarg=yes ;;
354 esac
355 eval "with_${ac_package}='$ac_optarg'" ;;
356
357 -without-* | --without-*)
358 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
359 # Reject names that are not valid shell variable names.
360 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
361 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
362 fi
363 ac_package=`echo $ac_package| sed 's/-/_/g'`
364 eval "with_${ac_package}=no" ;;
365
366 --x)
367 # Obsolete; use --with-x.
368 with_x=yes ;;
369
370 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
371 | --x-incl | --x-inc | --x-in | --x-i)
372 ac_prev=x_includes ;;
373 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
374 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
375 x_includes="$ac_optarg" ;;
376
377 -x-libraries | --x-libraries | --x-librarie | --x-librari \
378 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
379 ac_prev=x_libraries ;;
380 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
381 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
382 x_libraries="$ac_optarg" ;;
383
384 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
385 ;;
386
caf2a913 387 *)
ef346f1a
ILT
388 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
389 echo "configure: warning: $ac_option: invalid host type" 1>&2
390 fi
391 if test "x$nonopt" != xNONE; then
392 { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
393 fi
394 nonopt="$ac_option"
395 ;;
396
397 esac
398done
2ee11735 399
ef346f1a
ILT
400if test -n "$ac_prev"; then
401 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
402fi
eb02fd64 403
ef346f1a
ILT
404trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
405
406# File descriptor usage:
407# 0 standard input
408# 1 file creation
409# 2 errors and warnings
410# 3 some systems may open it to /dev/tty
411# 4 used on the Kubota Titan
412# 6 checking for... messages and results
413# 5 compiler messages saved in config.log
414if test "$silent" = yes; then
415 exec 6>/dev/null
416else
417 exec 6>&1
418fi
419exec 5>./config.log
420
421echo "\
422This file contains any messages produced by compilers while
423running configure, to aid debugging if configure makes a mistake.
424" 1>&5
eb02fd64 425
ef346f1a
ILT
426# Strip out --no-create and --no-recursion so they do not pile up.
427# Also quote any args containing shell metacharacters.
428ac_configure_args=
429for ac_arg
eb02fd64 430do
ef346f1a
ILT
431 case "$ac_arg" in
432 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
433 | --no-cr | --no-c) ;;
434 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
435 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
436 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
437 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
438 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
439 esac
eb02fd64
RP
440done
441
ef346f1a 442# NLS nuisances.
b9a5c27f
RS
443# Only set these to C if already set. These must not be set unconditionally
444# because not all systems understand e.g. LANG=C (notably SCO).
445# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
446# Non-C LC_CTYPE values break the ctype check.
ef346f1a 447if test "${LANG+set}" = set; then LANG=C; export LANG; fi
b9a5c27f
RS
448if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
449if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
450if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
ef346f1a
ILT
451
452# confdefs.h avoids OS command line length limits that DEFS can exceed.
453rm -rf conftest* confdefs.h
454# AIX cpp loses on an empty file, so make sure it contains at least a newline.
455echo > confdefs.h
456
457# A filename unique to this package, relative to the directory that
458# configure is in, which we can look for to find out if srcdir is correct.
459ac_unique_file=ldmain.c
460
461# Find the source files, if location was not specified.
462if test -z "$srcdir"; then
463 ac_srcdir_defaulted=yes
464 # Try the directory containing this script, then its parent.
465 ac_prog=$0
466 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
467 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
468 srcdir=$ac_confdir
469 if test ! -r $srcdir/$ac_unique_file; then
470 srcdir=..
471 fi
472else
473 ac_srcdir_defaulted=no
474fi
475if test ! -r $srcdir/$ac_unique_file; then
476 if test "$ac_srcdir_defaulted" = yes; then
477 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
478 else
479 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
480 fi
8c32cf6e 481fi
ef346f1a
ILT
482srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
483
484# Prefer explicitly selected file to automatically selected ones.
485if test -z "$CONFIG_SITE"; then
486 if test "x$prefix" != xNONE; then
487 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
488 else
489 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
490 fi
491fi
492for ac_site_file in $CONFIG_SITE; do
493 if test -r "$ac_site_file"; then
494 echo "loading site script $ac_site_file"
495 . "$ac_site_file"
496 fi
497done
8c32cf6e 498
ef346f1a
ILT
499if test -r "$cache_file"; then
500 echo "loading cache $cache_file"
501 . $cache_file
502else
503 echo "creating cache $cache_file"
504 > $cache_file
f2e91404 505fi
eb02fd64 506
ef346f1a
ILT
507ac_ext=c
508# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
b9a5c27f
RS
509ac_cpp='$CPP $CPPFLAGS'
510ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
511ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
512cross_compiling=$ac_cv_prog_cc_cross
ef346f1a
ILT
513
514if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
515 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
516 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
517 ac_n= ac_c='
518' ac_t=' '
519 else
520 ac_n=-n ac_c= ac_t=
521 fi
522else
523 ac_n= ac_c='\c' ac_t=
524fi
525
526
8c32cf6e 527
ef346f1a 528# Check whether --enable-targets or --disable-targets was given.
caf2a913
ILT
529if test "${enable_targets+set}" = set; then
530 enableval="$enable_targets"
ef346f1a
ILT
531 case "${enableval}" in
532 yes | "") { echo "configure: error: enable-targets option must specify target names or 'all'" 1>&2; exit 1; }
533 ;;
534 no) enable_targets= ;;
535 *) enable_targets=$enableval ;;
536esac
2ee11735 537fi
2e598345
ILT
538# Check whether --enable-shared or --disable-shared was given.
539if test "${enable_shared+set}" = set; then
540 enableval="$enable_shared"
541 case "${enableval}" in
542 yes) shared=true ;;
543 no) shared=false ;;
b9a5c27f
RS
544 *bfd*) shared=true ;;
545 *) shared=false ;;
2e598345
ILT
546esac
547fi
b9a5c27f
RS
548# Check whether --enable-64-bit-bfd or --disable-64-bit-bfd was given.
549if test "${enable_64_bit_bfd+set}" = set; then
550 enableval="$enable_64_bit_bfd"
551 case "${enableval}" in
552 yes) want64=true ;;
553 no) want64=false ;;
554 *) { echo "configure: error: bad value ${enableval} for 64-bit-bfd option" 1>&2; exit 1; } ;;
555esac
556else
557 want64=false
558fi
eb02fd64 559
eb02fd64 560
eb02fd64 561
ef346f1a
ILT
562ac_aux_dir=
563for ac_dir in `cd $srcdir/..; pwd` $srcdir/`cd $srcdir/..; pwd`; do
564 if test -f $ac_dir/install-sh; then
565 ac_aux_dir=$ac_dir
566 ac_install_sh="$ac_aux_dir/install-sh -c"
567 break
568 elif test -f $ac_dir/install.sh; then
569 ac_aux_dir=$ac_dir
570 ac_install_sh="$ac_aux_dir/install.sh -c"
571 break
572 fi
573done
574if test -z "$ac_aux_dir"; then
575 { echo "configure: error: can not find install-sh or install.sh in `cd $srcdir/..; pwd` $srcdir/`cd $srcdir/..; pwd`" 1>&2; exit 1; }
576fi
577ac_config_guess=$ac_aux_dir/config.guess
578ac_config_sub=$ac_aux_dir/config.sub
579ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
eb02fd64 580
eb02fd64 581
ef346f1a
ILT
582# Do some error checking and defaulting for the host and target type.
583# The inputs are:
584# configure --host=HOST --target=TARGET --build=BUILD NONOPT
585#
586# The rules are:
587# 1. You are not allowed to specify --host, --target, and nonopt at the
caf2a913 588# same time.
ef346f1a
ILT
589# 2. Host defaults to nonopt.
590# 3. If nonopt is not specified, then host defaults to the current host,
591# as determined by config.guess.
592# 4. Target and build default to nonopt.
593# 5. If nonopt is not specified, then target and build default to host.
594
595# The aliases save the names the user supplied, while $host etc.
596# will get canonicalized.
597case $host---$target---$nonopt in
598NONE---*---* | *---NONE---* | *---*---NONE) ;;
599*) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
600esac
eb02fd64 601
c0b47bae 602
ef346f1a
ILT
603# Make sure we can run config.sub.
604if $ac_config_sub sun4 >/dev/null 2>&1; then :
605else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
606fi
c0b47bae 607
ef346f1a 608echo $ac_n "checking host system type""... $ac_c" 1>&6
b9a5c27f 609echo "configure:610: checking host system type" >&5
ef346f1a
ILT
610
611host_alias=$host
612case "$host_alias" in
613NONE)
614 case $nonopt in
615 NONE)
616 if host_alias=`$ac_config_guess`; then :
617 else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
618 fi ;;
619 *) host_alias=$nonopt ;;
620 esac ;;
621esac
c0b47bae 622
ef346f1a 623host=`$ac_config_sub $host_alias`
b9a5c27f
RS
624host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
625host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
626host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
ef346f1a
ILT
627echo "$ac_t""$host" 1>&6
628
629echo $ac_n "checking target system type""... $ac_c" 1>&6
b9a5c27f 630echo "configure:631: checking target system type" >&5
ef346f1a
ILT
631
632target_alias=$target
633case "$target_alias" in
634NONE)
635 case $nonopt in
636 NONE) target_alias=$host_alias ;;
637 *) target_alias=$nonopt ;;
638 esac ;;
639esac
eb02fd64 640
ef346f1a 641target=`$ac_config_sub $target_alias`
b9a5c27f
RS
642target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
643target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
644target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
ef346f1a
ILT
645echo "$ac_t""$target" 1>&6
646
647echo $ac_n "checking build system type""... $ac_c" 1>&6
b9a5c27f 648echo "configure:649: checking build system type" >&5
ef346f1a
ILT
649
650build_alias=$build
651case "$build_alias" in
652NONE)
653 case $nonopt in
654 NONE) build_alias=$host_alias ;;
655 *) build_alias=$nonopt ;;
656 esac ;;
657esac
eb02fd64 658
ef346f1a 659build=`$ac_config_sub $build_alias`
b9a5c27f
RS
660build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
661build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
662build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
ef346f1a
ILT
663echo "$ac_t""$build" 1>&6
664
665test "$host_alias" != "$target_alias" &&
666 test "$program_prefix$program_suffix$program_transform_name" = \
667 NONENONEs,x,x, &&
668 program_prefix=${target_alias}-
eb02fd64 669
ef346f1a
ILT
670if test -z "$target" ; then
671 { echo "configure: error: Unrecognized target system type; please check config.sub." 1>&2; exit 1; }
ec342d7d 672fi
ef346f1a
ILT
673if test -z "$host" ; then
674 { echo "configure: error: Unrecognized host system type; please check config.sub." 1>&2; exit 1; }
675fi
676if test "$program_transform_name" = s,x,x,; then
677 program_transform_name=
678else
2e598345
ILT
679 # Double any \ or $. echo might interpret backslashes.
680 cat <<\EOF_SED > conftestsed
681s,\\,\\\\,g; s,\$,$$,g
682EOF_SED
ef346f1a
ILT
683 program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
684 rm -f conftestsed
685fi
686test "$program_prefix" != NONE &&
687 program_transform_name="s,^,${program_prefix},; $program_transform_name"
688# Use a double $ so make ignores it.
689test "$program_suffix" != NONE &&
690 program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
691
692# sed with no file args requires a program.
693test "$program_transform_name" = "" && program_transform_name="s,x,x,"
694
695
696# host-specific stuff:
697
caf2a913
ILT
698# Extract the first word of "gcc", so it can be a program name with args.
699set dummy gcc; ac_word=$2
700echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
b9a5c27f 701echo "configure:702: checking for $ac_word" >&5
caf2a913
ILT
702if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
703 echo $ac_n "(cached) $ac_c" 1>&6
704else
705 if test -n "$CC"; then
706 ac_cv_prog_CC="$CC" # Let the user override the test.
707else
708 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
709 for ac_dir in $PATH; do
710 test -z "$ac_dir" && ac_dir=.
711 if test -f $ac_dir/$ac_word; then
712 ac_cv_prog_CC="gcc"
713 break
714 fi
715 done
716 IFS="$ac_save_ifs"
caf2a913
ILT
717fi
718fi
719CC="$ac_cv_prog_CC"
720if test -n "$CC"; then
721 echo "$ac_t""$CC" 1>&6
722else
723 echo "$ac_t""no" 1>&6
724fi
725
b9a5c27f
RS
726if test -z "$CC"; then
727 # Extract the first word of "cc", so it can be a program name with args.
728set dummy cc; ac_word=$2
729echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
730echo "configure:731: checking for $ac_word" >&5
731if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
732 echo $ac_n "(cached) $ac_c" 1>&6
733else
734 if test -n "$CC"; then
735 ac_cv_prog_CC="$CC" # Let the user override the test.
736else
737 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
738 ac_prog_rejected=no
739 for ac_dir in $PATH; do
740 test -z "$ac_dir" && ac_dir=.
741 if test -f $ac_dir/$ac_word; then
742 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
743 ac_prog_rejected=yes
744 continue
745 fi
746 ac_cv_prog_CC="cc"
747 break
748 fi
749 done
750 IFS="$ac_save_ifs"
751if test $ac_prog_rejected = yes; then
752 # We found a bogon in the path, so make sure we never use it.
753 set dummy $ac_cv_prog_CC
754 shift
755 if test $# -gt 0; then
756 # We chose a different compiler from the bogus one.
757 # However, it has the same basename, so the bogon will be chosen
758 # first if we set CC to just the basename; use the full file name.
759 shift
760 set dummy "$ac_dir/$ac_word" "$@"
761 shift
762 ac_cv_prog_CC="$@"
763 fi
764fi
765fi
766fi
767CC="$ac_cv_prog_CC"
768if test -n "$CC"; then
769 echo "$ac_t""$CC" 1>&6
770else
771 echo "$ac_t""no" 1>&6
772fi
773
774 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
775fi
776
777echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
778echo "configure:779: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
779
780ac_ext=c
781# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
782ac_cpp='$CPP $CPPFLAGS'
783ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
784ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
785cross_compiling=$ac_cv_prog_cc_cross
786
787cat > conftest.$ac_ext <<EOF
788#line 789 "configure"
789#include "confdefs.h"
790main(){return(0);}
791EOF
792if { (eval echo configure:793: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
793 ac_cv_prog_cc_works=yes
794 # If we can't run a trivial program, we are probably using a cross compiler.
795 if (./conftest; exit) 2>/dev/null; then
796 ac_cv_prog_cc_cross=no
797 else
798 ac_cv_prog_cc_cross=yes
799 fi
800else
801 echo "configure: failed program was:" >&5
802 cat conftest.$ac_ext >&5
803 ac_cv_prog_cc_works=no
804fi
805rm -fr conftest*
806
807echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
808if test $ac_cv_prog_cc_works = no; then
809 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
810fi
811echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
812echo "configure:813: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
813echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
814cross_compiling=$ac_cv_prog_cc_cross
ef346f1a 815
caf2a913 816echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
b9a5c27f 817echo "configure:818: checking whether we are using GNU C" >&5
caf2a913
ILT
818if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
819 echo $ac_n "(cached) $ac_c" 1>&6
820else
821 cat > conftest.c <<EOF
ef346f1a
ILT
822#ifdef __GNUC__
823 yes;
824#endif
825EOF
b9a5c27f 826if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:827: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
caf2a913
ILT
827 ac_cv_prog_gcc=yes
828else
829 ac_cv_prog_gcc=no
830fi
831fi
832
833echo "$ac_t""$ac_cv_prog_gcc" 1>&6
b9a5c27f 834
caf2a913 835if test $ac_cv_prog_gcc = yes; then
ef346f1a 836 GCC=yes
b9a5c27f
RS
837 ac_test_CFLAGS="${CFLAGS+set}"
838 ac_save_CFLAGS="$CFLAGS"
839 CFLAGS=
840 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
841echo "configure:842: checking whether ${CC-cc} accepts -g" >&5
842if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
caf2a913
ILT
843 echo $ac_n "(cached) $ac_c" 1>&6
844else
845 echo 'void f(){}' > conftest.c
846if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
b9a5c27f 847 ac_cv_prog_cc_g=yes
caf2a913 848else
b9a5c27f 849 ac_cv_prog_cc_g=no
caf2a913
ILT
850fi
851rm -f conftest*
852
853fi
854
b9a5c27f
RS
855echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
856 if test "$ac_test_CFLAGS" = set; then
857 CFLAGS="$ac_save_CFLAGS"
858 elif test $ac_cv_prog_cc_g = yes; then
859 CFLAGS="-g -O2"
860 else
861 CFLAGS="-O2"
ef346f1a
ILT
862 fi
863else
864 GCC=
865 test "${CFLAGS+set}" = set || CFLAGS="-g"
866fi
ef346f1a 867
b9a5c27f
RS
868# Find a good install program. We prefer a C program (faster),
869# so one script is as good as another. But avoid the broken or
870# incompatible versions:
871# SysV /etc/install, /usr/sbin/install
872# SunOS /usr/etc/install
873# IRIX /sbin/install
874# AIX /bin/install
875# AFS /usr/afsws/bin/install, which mishandles nonexistent args
876# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
877# ./install, which can be erroneously created by make from ./install.sh.
878echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
879echo "configure:880: checking for a BSD compatible install" >&5
880if test -z "$INSTALL"; then
881if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
882 echo $ac_n "(cached) $ac_c" 1>&6
883else
884 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="${IFS}:"
885 for ac_dir in $PATH; do
886 # Account for people who put trailing slashes in PATH elements.
887 case "$ac_dir/" in
888 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
889 *)
890 # OSF1 and SCO ODT 3.0 have their own names for install.
891 for ac_prog in ginstall installbsd scoinst install; do
892 if test -f $ac_dir/$ac_prog; then
893 if test $ac_prog = install &&
894 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
895 # AIX install. It has an incompatible calling convention.
896 # OSF/1 installbsd also uses dspmsg, but is usable.
897 :
898 else
899 ac_cv_path_install="$ac_dir/$ac_prog -c"
900 break 2
901 fi
902 fi
903 done
904 ;;
905 esac
906 done
907 IFS="$ac_save_IFS"
908
909fi
910 if test "${ac_cv_path_install+set}" = set; then
911 INSTALL="$ac_cv_path_install"
912 else
913 # As a last resort, use the slow shell script. We don't cache a
914 # path for INSTALL within a source directory, because that will
915 # break other packages using the cache if that directory is
916 # removed, or if the path is relative.
917 INSTALL="$ac_install_sh"
918 fi
919fi
920echo "$ac_t""$INSTALL" 1>&6
921
922# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
923# It thinks the first close brace ends the variable substitution.
924test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
925
926test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
927
928echo $ac_n "checking for Cygwin32 environment""... $ac_c" 1>&6
929echo "configure:930: checking for Cygwin32 environment" >&5
930if eval "test \"`echo '$''{'am_cv_cygwin32'+set}'`\" = set"; then
931 echo $ac_n "(cached) $ac_c" 1>&6
932else
933 cat > conftest.$ac_ext <<EOF
934#line 935 "configure"
935#include "confdefs.h"
936
937int main() {
938int main () { return __CYGWIN32__; }
939; return 0; }
940EOF
941if { (eval echo configure:942: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
942 rm -rf conftest*
943 am_cv_cygwin32=yes
944else
945 echo "configure: failed program was:" >&5
946 cat conftest.$ac_ext >&5
947 rm -rf conftest*
948 am_cv_cygwin32=no
949fi
950rm -f conftest*
951rm -f conftest*
952fi
953
954echo "$ac_t""$am_cv_cygwin32" 1>&6
955CYGWIN32=
956test "$am_cv_cygwin32" = yes && CYGWIN32=yes
957echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
958echo "configure:959: checking for executable suffix" >&5
959if eval "test \"`echo '$''{'am_cv_exeext'+set}'`\" = set"; then
960 echo $ac_n "(cached) $ac_c" 1>&6
961else
962 if test "$CYGWIN32" = yes; then
963am_cv_exeext=.exe
964else
965cat > am_c_test.c << 'EOF'
966int main() {
967/* Nothing needed here */
968}
969EOF
970${CC-cc} -o am_c_test $CFLAGS $CPPFLAGS $LDFLAGS am_c_test.c $LIBS 1>&5
971am_cv_exeext=`ls am_c_test.* | grep -v am_c_test.c | sed -e s/am_c_test//`
972rm -f am_c_test*
973fi
974
975test x"${am_cv_exeext}" = x && am_cv_exeext=no
976fi
977EXEEXT=""
978test x"${am_cv_exeext}" != xno && EXEEXT=${am_cv_exeext}
979echo "$ac_t""${am_cv_exeext}" 1>&6
980
ec342d7d 981
7e19f60e
ILT
982. ${srcdir}/configure.host
983
984
eb02fd64 985
5a168a17 986
6c18e393 987
3d6f0983 988
ef346f1a 989
2e598345 990
ad43e45b 991
2e598345
ILT
992# For most hosts we can use a simple definition to pick up the BFD and
993# opcodes libraries. However, if we are building shared libraries, we
994# need to handle some hosts specially.
995BFDLIB='-L../bfd -lbfd'
b9a5c27f
RS
996case "${host}" in
997*-*-sunos*)
998 # On SunOS, we must link against the name we are going to install,
999 # not -lbfd, since SunOS does not support SONAME.
1000 if test "${shared}" = "true"; then
2e598345 1001 BFDLIB='-L../bfd -l`echo bfd | sed '"'"'$(program_transform_name)'"'"'`'
b9a5c27f
RS
1002 fi
1003 ;;
1004alpha*-*-osf*)
1005 # On Alpha OSF/1, the native linker searches all the -L
1006 # directories for any LIB.so files, and only then searches for any
1007 # LIB.a files. That means that if there is an installed
1008 # libbfd.so, but this build is not done with --enable-shared, the
1009 # link will wind up being against the install libbfd.so rather
1010 # than the newly built libbfd. To avoid this, we must explicitly
1011 # link against libbfd.a when --enable-shared is not used.
1012 if test "${shared}" != "true"; then
1013 BFDLIB='../bfd/libbfd.a'
1014 fi
1015 ;;
1016esac
2e598345
ILT
1017
1018
ef346f1a 1019echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
b9a5c27f 1020echo "configure:1021: checking how to run the C preprocessor" >&5
ef346f1a
ILT
1021# On Suns, sometimes $CPP names a directory.
1022if test -n "$CPP" && test -d "$CPP"; then
1023 CPP=
1024fi
1025if test -z "$CPP"; then
1026if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1027 echo $ac_n "(cached) $ac_c" 1>&6
c0b47bae 1028else
ef346f1a
ILT
1029 # This must be in double quotes, not single quotes, because CPP may get
1030 # substituted into the Makefile and "${CC-cc}" will confuse make.
1031 CPP="${CC-cc} -E"
1032 # On the NeXT, cc -E runs the code through the compiler's parser,
1033 # not just through cpp.
1034 cat > conftest.$ac_ext <<EOF
b9a5c27f 1035#line 1036 "configure"
ef346f1a
ILT
1036#include "confdefs.h"
1037#include <assert.h>
1038Syntax Error
1039EOF
b9a5c27f
RS
1040ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1041{ (eval echo configure:1042: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ef346f1a
ILT
1042ac_err=`grep -v '^ *+' conftest.out`
1043if test -z "$ac_err"; then
1044 :
1045else
1046 echo "$ac_err" >&5
b9a5c27f
RS
1047 echo "configure: failed program was:" >&5
1048 cat conftest.$ac_ext >&5
ef346f1a
ILT
1049 rm -rf conftest*
1050 CPP="${CC-cc} -E -traditional-cpp"
1051 cat > conftest.$ac_ext <<EOF
b9a5c27f 1052#line 1053 "configure"
ef346f1a
ILT
1053#include "confdefs.h"
1054#include <assert.h>
1055Syntax Error
1056EOF
b9a5c27f
RS
1057ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1058{ (eval echo configure:1059: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ef346f1a
ILT
1059ac_err=`grep -v '^ *+' conftest.out`
1060if test -z "$ac_err"; then
1061 :
1062else
1063 echo "$ac_err" >&5
b9a5c27f
RS
1064 echo "configure: failed program was:" >&5
1065 cat conftest.$ac_ext >&5
ef346f1a
ILT
1066 rm -rf conftest*
1067 CPP=/lib/cpp
1068fi
1069rm -f conftest*
1070fi
1071rm -f conftest*
1072 ac_cv_prog_CPP="$CPP"
c0b47bae 1073fi
ef346f1a
ILT
1074 CPP="$ac_cv_prog_CPP"
1075else
1076 ac_cv_prog_CPP="$CPP"
1077fi
1078echo "$ac_t""$CPP" 1>&6
c0b47bae 1079
ef346f1a
ILT
1080for ac_hdr in string.h strings.h stdlib.h unistd.h
1081do
b9a5c27f 1082ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
ef346f1a 1083echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
b9a5c27f 1084echo "configure:1085: checking for $ac_hdr" >&5
ef346f1a
ILT
1085if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1086 echo $ac_n "(cached) $ac_c" 1>&6
1087else
1088 cat > conftest.$ac_ext <<EOF
b9a5c27f 1089#line 1090 "configure"
ef346f1a
ILT
1090#include "confdefs.h"
1091#include <$ac_hdr>
1092EOF
b9a5c27f
RS
1093ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1094{ (eval echo configure:1095: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ef346f1a
ILT
1095ac_err=`grep -v '^ *+' conftest.out`
1096if test -z "$ac_err"; then
1097 rm -rf conftest*
1098 eval "ac_cv_header_$ac_safe=yes"
1099else
1100 echo "$ac_err" >&5
b9a5c27f
RS
1101 echo "configure: failed program was:" >&5
1102 cat conftest.$ac_ext >&5
ef346f1a
ILT
1103 rm -rf conftest*
1104 eval "ac_cv_header_$ac_safe=no"
1105fi
1106rm -f conftest*
1107fi
1108if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1109 echo "$ac_t""yes" 1>&6
b9a5c27f 1110 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
ef346f1a
ILT
1111 cat >> confdefs.h <<EOF
1112#define $ac_tr_hdr 1
1113EOF
1114
1115else
1116 echo "$ac_t""no" 1>&6
c0b47bae 1117fi
ef346f1a 1118done
8c32cf6e 1119
ef346f1a
ILT
1120for ac_func in sbrk
1121do
1122echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
b9a5c27f 1123echo "configure:1124: checking for $ac_func" >&5
ef346f1a
ILT
1124if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1125 echo $ac_n "(cached) $ac_c" 1>&6
1126else
1127 cat > conftest.$ac_ext <<EOF
b9a5c27f 1128#line 1129 "configure"
ef346f1a
ILT
1129#include "confdefs.h"
1130/* System header to define __stub macros and hopefully few prototypes,
1131 which can conflict with char $ac_func(); below. */
1132#include <assert.h>
1133/* Override any gcc2 internal prototype to avoid an error. */
b9a5c27f
RS
1134/* We use char because int might match the return type of a gcc2
1135 builtin and then its argument prototype would still apply. */
caf2a913 1136char $ac_func();
ef346f1a 1137
b9a5c27f 1138int main() {
ef346f1a
ILT
1139
1140/* The GNU C library defines this for functions which it implements
1141 to always fail with ENOSYS. Some functions are actually named
1142 something starting with __ and the normal name is an alias. */
1143#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1144choke me
1145#else
1146$ac_func();
1147#endif
1148
1149; return 0; }
1150EOF
b9a5c27f 1151if { (eval echo configure:1152: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
ef346f1a
ILT
1152 rm -rf conftest*
1153 eval "ac_cv_func_$ac_func=yes"
1154else
b9a5c27f
RS
1155 echo "configure: failed program was:" >&5
1156 cat conftest.$ac_ext >&5
ef346f1a
ILT
1157 rm -rf conftest*
1158 eval "ac_cv_func_$ac_func=no"
1159fi
1160rm -f conftest*
ef346f1a 1161fi
b9a5c27f 1162
ef346f1a
ILT
1163if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1164 echo "$ac_t""yes" 1>&6
caf2a913 1165 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
ef346f1a
ILT
1166 cat >> confdefs.h <<EOF
1167#define $ac_tr_func 1
1168EOF
1169
1170else
1171 echo "$ac_t""no" 1>&6
1172fi
1173done
c0b47bae 1174
caf2a913
ILT
1175ac_header_dirent=no
1176for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
1177do
b9a5c27f 1178ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
caf2a913 1179echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
b9a5c27f 1180echo "configure:1181: checking for $ac_hdr that defines DIR" >&5
caf2a913
ILT
1181if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
1182 echo $ac_n "(cached) $ac_c" 1>&6
1183else
1184 cat > conftest.$ac_ext <<EOF
b9a5c27f 1185#line 1186 "configure"
caf2a913
ILT
1186#include "confdefs.h"
1187#include <sys/types.h>
1188#include <$ac_hdr>
b9a5c27f 1189int main() {
caf2a913
ILT
1190DIR *dirp = 0;
1191; return 0; }
1192EOF
b9a5c27f 1193if { (eval echo configure:1194: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
caf2a913
ILT
1194 rm -rf conftest*
1195 eval "ac_cv_header_dirent_$ac_safe=yes"
1196else
b9a5c27f
RS
1197 echo "configure: failed program was:" >&5
1198 cat conftest.$ac_ext >&5
caf2a913
ILT
1199 rm -rf conftest*
1200 eval "ac_cv_header_dirent_$ac_safe=no"
1201fi
1202rm -f conftest*
caf2a913
ILT
1203fi
1204if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
1205 echo "$ac_t""yes" 1>&6
b9a5c27f 1206 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
caf2a913
ILT
1207 cat >> confdefs.h <<EOF
1208#define $ac_tr_hdr 1
1209EOF
1210 ac_header_dirent=$ac_hdr; break
1211else
1212 echo "$ac_t""no" 1>&6
1213fi
1214done
1215# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
1216if test $ac_header_dirent = dirent.h; then
b9a5c27f
RS
1217echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
1218echo "configure:1219: checking for opendir in -ldir" >&5
1219ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
caf2a913
ILT
1220if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1221 echo $ac_n "(cached) $ac_c" 1>&6
1222else
1223 ac_save_LIBS="$LIBS"
1224LIBS="-ldir $LIBS"
1225cat > conftest.$ac_ext <<EOF
b9a5c27f 1226#line 1227 "configure"
caf2a913 1227#include "confdefs.h"
b9a5c27f
RS
1228/* Override any gcc2 internal prototype to avoid an error. */
1229/* We use char because int might match the return type of a gcc2
1230 builtin and then its argument prototype would still apply. */
1231char opendir();
caf2a913 1232
b9a5c27f 1233int main() {
caf2a913
ILT
1234opendir()
1235; return 0; }
1236EOF
b9a5c27f 1237if { (eval echo configure:1238: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
caf2a913
ILT
1238 rm -rf conftest*
1239 eval "ac_cv_lib_$ac_lib_var=yes"
1240else
b9a5c27f
RS
1241 echo "configure: failed program was:" >&5
1242 cat conftest.$ac_ext >&5
caf2a913
ILT
1243 rm -rf conftest*
1244 eval "ac_cv_lib_$ac_lib_var=no"
1245fi
1246rm -f conftest*
1247LIBS="$ac_save_LIBS"
1248
1249fi
1250if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1251 echo "$ac_t""yes" 1>&6
1252 LIBS="$LIBS -ldir"
1253else
1254 echo "$ac_t""no" 1>&6
1255fi
1256
1257else
b9a5c27f
RS
1258echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
1259echo "configure:1260: checking for opendir in -lx" >&5
1260ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
caf2a913
ILT
1261if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1262 echo $ac_n "(cached) $ac_c" 1>&6
1263else
1264 ac_save_LIBS="$LIBS"
1265LIBS="-lx $LIBS"
1266cat > conftest.$ac_ext <<EOF
b9a5c27f 1267#line 1268 "configure"
caf2a913 1268#include "confdefs.h"
b9a5c27f
RS
1269/* Override any gcc2 internal prototype to avoid an error. */
1270/* We use char because int might match the return type of a gcc2
1271 builtin and then its argument prototype would still apply. */
1272char opendir();
caf2a913 1273
b9a5c27f 1274int main() {
caf2a913
ILT
1275opendir()
1276; return 0; }
1277EOF
b9a5c27f 1278if { (eval echo configure:1279: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
caf2a913
ILT
1279 rm -rf conftest*
1280 eval "ac_cv_lib_$ac_lib_var=yes"
1281else
b9a5c27f
RS
1282 echo "configure: failed program was:" >&5
1283 cat conftest.$ac_ext >&5
caf2a913
ILT
1284 rm -rf conftest*
1285 eval "ac_cv_lib_$ac_lib_var=no"
1286fi
1287rm -f conftest*
1288LIBS="$ac_save_LIBS"
1289
1290fi
1291if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1292 echo "$ac_t""yes" 1>&6
1293 LIBS="$LIBS -lx"
1294else
1295 echo "$ac_t""no" 1>&6
1296fi
1297
1298fi
1299
1300
c0b47bae 1301
ef346f1a 1302case "${host}" in
b9a5c27f 1303i[345]86-*-msdos* | i[345]86-*-go32* | *-*-cygwin32 | *-*-windows)
ef346f1a
ILT
1304 cat >> confdefs.h <<\EOF
1305#define USE_BINARY_FOPEN 1
1306EOF
1307 ;;
1308esac
6c18e393 1309
b9a5c27f
RS
1310echo $ac_n "checking whether strstr must be declared""... $ac_c" 1>&6
1311echo "configure:1312: checking whether strstr must be declared" >&5
1312if eval "test \"`echo '$''{'bfd_cv_decl_needed_strstr'+set}'`\" = set"; then
1313 echo $ac_n "(cached) $ac_c" 1>&6
1314else
1315 cat > conftest.$ac_ext <<EOF
1316#line 1317 "configure"
1317#include "confdefs.h"
1318
1319#include <stdio.h>
1320#ifdef HAVE_STRING_H
1321#include <string.h>
1322#else
1323#ifdef HAVE_STRINGS_H
1324#include <strings.h>
1325#endif
1326#endif
1327#ifdef HAVE_STDLIB_H
1328#include <stdlib.h>
1329#endif
1330#ifdef HAVE_UNISTD_H
1331#include <unistd.h>
1332#endif
1333int main() {
1334char *(*pfn) = (char *(*)) strstr
1335; return 0; }
1336EOF
1337if { (eval echo configure:1338: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1338 rm -rf conftest*
1339 bfd_cv_decl_needed_strstr=no
1340else
1341 echo "configure: failed program was:" >&5
1342 cat conftest.$ac_ext >&5
1343 rm -rf conftest*
1344 bfd_cv_decl_needed_strstr=yes
1345fi
1346rm -f conftest*
1347fi
1348
1349echo "$ac_t""$bfd_cv_decl_needed_strstr" 1>&6
1350if test $bfd_cv_decl_needed_strstr = yes; then
1351 bfd_tr_decl=NEED_DECLARATION_`echo strstr | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1352 cat >> confdefs.h <<EOF
1353#define $bfd_tr_decl 1
1354EOF
1355
1356fi
1357
caf2a913 1358echo $ac_n "checking whether free must be declared""... $ac_c" 1>&6
b9a5c27f 1359echo "configure:1360: checking whether free must be declared" >&5
caf2a913
ILT
1360if eval "test \"`echo '$''{'bfd_cv_decl_needed_free'+set}'`\" = set"; then
1361 echo $ac_n "(cached) $ac_c" 1>&6
1362else
1363 cat > conftest.$ac_ext <<EOF
b9a5c27f 1364#line 1365 "configure"
caf2a913
ILT
1365#include "confdefs.h"
1366
1367#include <stdio.h>
b9a5c27f
RS
1368#ifdef HAVE_STRING_H
1369#include <string.h>
1370#else
1371#ifdef HAVE_STRINGS_H
1372#include <strings.h>
1373#endif
1374#endif
caf2a913
ILT
1375#ifdef HAVE_STDLIB_H
1376#include <stdlib.h>
1377#endif
1378#ifdef HAVE_UNISTD_H
1379#include <unistd.h>
1380#endif
b9a5c27f 1381int main() {
caf2a913
ILT
1382char *(*pfn) = (char *(*)) free
1383; return 0; }
1384EOF
b9a5c27f 1385if { (eval echo configure:1386: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
caf2a913
ILT
1386 rm -rf conftest*
1387 bfd_cv_decl_needed_free=no
1388else
b9a5c27f
RS
1389 echo "configure: failed program was:" >&5
1390 cat conftest.$ac_ext >&5
caf2a913
ILT
1391 rm -rf conftest*
1392 bfd_cv_decl_needed_free=yes
1393fi
1394rm -f conftest*
caf2a913
ILT
1395fi
1396
1397echo "$ac_t""$bfd_cv_decl_needed_free" 1>&6
1398if test $bfd_cv_decl_needed_free = yes; then
1399 bfd_tr_decl=NEED_DECLARATION_`echo free | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1400 cat >> confdefs.h <<EOF
1401#define $bfd_tr_decl 1
1402EOF
1403
1404fi
1405
b9a5c27f
RS
1406echo $ac_n "checking whether sbrk must be declared""... $ac_c" 1>&6
1407echo "configure:1408: checking whether sbrk must be declared" >&5
1408if eval "test \"`echo '$''{'bfd_cv_decl_needed_sbrk'+set}'`\" = set"; then
1409 echo $ac_n "(cached) $ac_c" 1>&6
1410else
1411 cat > conftest.$ac_ext <<EOF
1412#line 1413 "configure"
1413#include "confdefs.h"
1414
1415#include <stdio.h>
1416#ifdef HAVE_STRING_H
1417#include <string.h>
1418#else
1419#ifdef HAVE_STRINGS_H
1420#include <strings.h>
1421#endif
1422#endif
1423#ifdef HAVE_STDLIB_H
1424#include <stdlib.h>
1425#endif
1426#ifdef HAVE_UNISTD_H
1427#include <unistd.h>
1428#endif
1429int main() {
1430char *(*pfn) = (char *(*)) sbrk
1431; return 0; }
1432EOF
1433if { (eval echo configure:1434: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1434 rm -rf conftest*
1435 bfd_cv_decl_needed_sbrk=no
1436else
1437 echo "configure: failed program was:" >&5
1438 cat conftest.$ac_ext >&5
1439 rm -rf conftest*
1440 bfd_cv_decl_needed_sbrk=yes
1441fi
1442rm -f conftest*
1443fi
1444
1445echo "$ac_t""$bfd_cv_decl_needed_sbrk" 1>&6
1446if test $bfd_cv_decl_needed_sbrk = yes; then
1447 bfd_tr_decl=NEED_DECLARATION_`echo sbrk | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1448 cat >> confdefs.h <<EOF
1449#define $bfd_tr_decl 1
1450EOF
1451
1452fi
1453
1454echo $ac_n "checking whether getenv must be declared""... $ac_c" 1>&6
1455echo "configure:1456: checking whether getenv must be declared" >&5
1456if eval "test \"`echo '$''{'bfd_cv_decl_needed_getenv'+set}'`\" = set"; then
1457 echo $ac_n "(cached) $ac_c" 1>&6
1458else
1459 cat > conftest.$ac_ext <<EOF
1460#line 1461 "configure"
1461#include "confdefs.h"
1462
1463#include <stdio.h>
1464#ifdef HAVE_STRING_H
1465#include <string.h>
1466#else
1467#ifdef HAVE_STRINGS_H
1468#include <strings.h>
1469#endif
1470#endif
1471#ifdef HAVE_STDLIB_H
1472#include <stdlib.h>
1473#endif
1474#ifdef HAVE_UNISTD_H
1475#include <unistd.h>
1476#endif
1477int main() {
1478char *(*pfn) = (char *(*)) getenv
1479; return 0; }
1480EOF
1481if { (eval echo configure:1482: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1482 rm -rf conftest*
1483 bfd_cv_decl_needed_getenv=no
1484else
1485 echo "configure: failed program was:" >&5
1486 cat conftest.$ac_ext >&5
1487 rm -rf conftest*
1488 bfd_cv_decl_needed_getenv=yes
1489fi
1490rm -f conftest*
1491fi
1492
1493echo "$ac_t""$bfd_cv_decl_needed_getenv" 1>&6
1494if test $bfd_cv_decl_needed_getenv = yes; then
1495 bfd_tr_decl=NEED_DECLARATION_`echo getenv | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1496 cat >> confdefs.h <<EOF
1497#define $bfd_tr_decl 1
1498EOF
1499
1500fi
1501
caf2a913 1502
ef346f1a 1503# target-specific stuff:
3d6f0983 1504
95d31c3c 1505all_targets=
ef346f1a
ILT
1506EMUL=
1507all_emuls=
95d31c3c 1508TDIRS=
ef346f1a 1509
95d31c3c 1510for targ_alias in `echo $target_alias $enable_targets | sed 's/,/ /g'`
ef346f1a 1511do
95d31c3c
ILT
1512 if test "$targ_alias" = "all"; then
1513 all_targets=true
1514 else
1515 # Canonicalize the secondary target names.
b9a5c27f 1516 result=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $targ_alias 2>/dev/null`
95d31c3c
ILT
1517 if test -n "$result"; then
1518 targ=$result
ef346f1a 1519 else
95d31c3c 1520 targ=$targ_alias
ef346f1a 1521 fi
2ee11735 1522
95d31c3c 1523 . ${srcdir}/configure.tgt
ef346f1a 1524
95d31c3c
ILT
1525 if test "$targ" = "$target"; then
1526 EMUL=$targ_emul
1527 fi
ef346f1a 1528
95d31c3c
ILT
1529 for i in $targ_emul $targ_extra_emuls; do
1530 case " $all_emuls " in
1531 *" e${i}.o "*) ;;
1532 *)
1533 all_emuls="$all_emuls e${i}.o"
1534 eval result=\$tdir_$i
1535 test -z "$result" && result=$targ_alias
1536 TDIRS="$TDIRS\\
1537tdir_$i=$result"
1538 ;;
ef346f1a
ILT
1539 esac
1540 done
95d31c3c
ILT
1541 fi
1542done
ef346f1a 1543
ef346f1a 1544
ef346f1a
ILT
1545
1546
95d31c3c 1547if test x${all_targets} = xtrue; then
b9a5c27f
RS
1548 if test x${want64} = xtrue; then
1549 EMULATION_OFILES='$(ALL_EMULATIONS) $(ALL_64_EMULATIONS)'
1550 else
1551 EMULATION_OFILES='$(ALL_EMULATIONS)'
1552 fi
95d31c3c
ILT
1553else
1554 EMULATION_OFILES=$all_emuls
1555fi
1556
ef346f1a
ILT
1557
1558trap '' 1 2 15
1559cat > confcache <<\EOF
1560# This file is a shell script that caches the results of configure
1561# tests run on this system so they can be shared between configure
1562# scripts and configure runs. It is not useful on other systems.
1563# If it contains results you don't want to keep, you may remove or edit it.
1564#
1565# By default, configure uses ./config.cache as the cache file,
1566# creating it if it does not exist already. You can give configure
1567# the --cache-file=FILE option to use a different cache file; that is
1568# what configure does when it calls configure scripts in
1569# subdirectories, so they share the cache.
1570# Giving --cache-file=/dev/null disables caching, for debugging configure.
1571# config.status only pays attention to the cache file if you give it the
1572# --recheck option to rerun configure.
1573#
1574EOF
b9a5c27f
RS
1575# The following way of writing the cache mishandles newlines in values,
1576# but we know of no workaround that is simple, portable, and efficient.
1577# So, don't put newlines in cache variables' values.
ef346f1a
ILT
1578# Ultrix sh set writes to stderr and can't be redirected directly,
1579# and sets the high bit in the cache file unless we assign to the vars.
1580(set) 2>&1 |
b9a5c27f
RS
1581 case `(ac_space=' '; set) 2>&1` in
1582 *ac_space=\ *)
1583 # `set' does not quote correctly, so add quotes (double-quote substitution
1584 # turns \\\\ into \\, and sed turns \\ into \).
1585 sed -n \
1586 -e "s/'/'\\\\''/g" \
1587 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
1588 ;;
1589 *)
1590 # `set' quotes correctly as required by POSIX, so do not add quotes.
1591 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
1592 ;;
1593 esac >> confcache
ef346f1a
ILT
1594if cmp -s $cache_file confcache; then
1595 :
1596else
1597 if test -w $cache_file; then
1598 echo "updating cache $cache_file"
1599 cat confcache > $cache_file
1600 else
1601 echo "not updating unwritable cache $cache_file"
1602 fi
1603fi
1604rm -f confcache
1605
1606trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
1607
1608test "x$prefix" = xNONE && prefix=$ac_default_prefix
1609# Let make expand exec_prefix.
1610test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
1611
1612# Any assignment to VPATH causes Sun make to only execute
1613# the first set of double-colon rules, so remove it if not needed.
1614# If there is a colon in the path, we need to keep it.
1615if test "x$srcdir" = x.; then
1616 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
1617fi
1618
1619trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
1620
1621DEFS=-DHAVE_CONFIG_H
1622
1623# Without the "./", some shells look in PATH for config.status.
1624: ${CONFIG_STATUS=./config.status}
1625
1626echo creating $CONFIG_STATUS
1627rm -f $CONFIG_STATUS
1628cat > $CONFIG_STATUS <<EOF
1629#! /bin/sh
1630# Generated automatically by configure.
1631# Run this file to recreate the current configuration.
1632# This directory was configured as follows,
1633# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
1634#
1635# $0 $ac_configure_args
8c32cf6e 1636#
ef346f1a
ILT
1637# Compiler output produced by configure, useful for debugging
1638# configure, is in ./config.log if it exists.
1639
1640ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
1641for ac_option
1642do
1643 case "\$ac_option" in
1644 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
1645 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
1646 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
1647 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
b9a5c27f 1648 echo "$CONFIG_STATUS generated by autoconf version 2.12"
ef346f1a
ILT
1649 exit 0 ;;
1650 -help | --help | --hel | --he | --h)
1651 echo "\$ac_cs_usage"; exit 0 ;;
1652 *) echo "\$ac_cs_usage"; exit 1 ;;
1653 esac
1654done
1655
1656ac_given_srcdir=$srcdir
b9a5c27f 1657ac_given_INSTALL="$INSTALL"
ef346f1a
ILT
1658
1659trap 'rm -fr `echo "Makefile config.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
2e598345
ILT
1660EOF
1661cat >> $CONFIG_STATUS <<EOF
ef346f1a 1662
caf2a913 1663# Protect against being on the right side of a sed subst in config.status.
2e598345
ILT
1664sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
1665 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
ef346f1a
ILT
1666$ac_vpsub
1667$extrasub
1668s%@CFLAGS@%$CFLAGS%g
1669s%@CPPFLAGS@%$CPPFLAGS%g
1670s%@CXXFLAGS@%$CXXFLAGS%g
1671s%@DEFS@%$DEFS%g
1672s%@LDFLAGS@%$LDFLAGS%g
1673s%@LIBS@%$LIBS%g
1674s%@exec_prefix@%$exec_prefix%g
1675s%@prefix@%$prefix%g
1676s%@program_transform_name@%$program_transform_name%g
caf2a913
ILT
1677s%@bindir@%$bindir%g
1678s%@sbindir@%$sbindir%g
1679s%@libexecdir@%$libexecdir%g
1680s%@datadir@%$datadir%g
1681s%@sysconfdir@%$sysconfdir%g
1682s%@sharedstatedir@%$sharedstatedir%g
1683s%@localstatedir@%$localstatedir%g
1684s%@libdir@%$libdir%g
1685s%@includedir@%$includedir%g
1686s%@oldincludedir@%$oldincludedir%g
1687s%@infodir@%$infodir%g
1688s%@mandir@%$mandir%g
ef346f1a
ILT
1689s%@host@%$host%g
1690s%@host_alias@%$host_alias%g
1691s%@host_cpu@%$host_cpu%g
1692s%@host_vendor@%$host_vendor%g
1693s%@host_os@%$host_os%g
1694s%@target@%$target%g
1695s%@target_alias@%$target_alias%g
1696s%@target_cpu@%$target_cpu%g
1697s%@target_vendor@%$target_vendor%g
1698s%@target_os@%$target_os%g
1699s%@build@%$build%g
1700s%@build_alias@%$build_alias%g
1701s%@build_cpu@%$build_cpu%g
1702s%@build_vendor@%$build_vendor%g
1703s%@build_os@%$build_os%g
1704s%@CC@%$CC%g
b9a5c27f
RS
1705s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
1706s%@INSTALL_DATA@%$INSTALL_DATA%g
1707s%@EXEEXT@%$EXEEXT%g
2e598345 1708s%@HLDFLAGS@%$HLDFLAGS%g
b9a5c27f 1709s%@HLDENV@%$HLDENV%g
ad43e45b 1710s%@RPATH_ENVVAR@%$RPATH_ENVVAR%g
ef346f1a
ILT
1711s%@HDEFINES@%$HDEFINES%g
1712s%@HOSTING_CRT0@%$HOSTING_CRT0%g
1713s%@HOSTING_LIBS@%$HOSTING_LIBS%g
1714s%@NATIVE_LIB_DIRS@%$NATIVE_LIB_DIRS%g
2e598345 1715s%@BFDLIB@%$BFDLIB%g
ef346f1a
ILT
1716s%@CPP@%$CPP%g
1717s%@EMUL@%$EMUL%g
95d31c3c 1718s%@TDIRS@%$TDIRS%g
ef346f1a
ILT
1719s%@EMULATION_OFILES@%$EMULATION_OFILES%g
1720
1721CEOF
1722EOF
b9a5c27f
RS
1723
1724cat >> $CONFIG_STATUS <<\EOF
1725
1726# Split the substitutions into bite-sized pieces for seds with
1727# small command number limits, like on Digital OSF/1 and HP-UX.
1728ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
1729ac_file=1 # Number of current file.
1730ac_beg=1 # First line for current file.
1731ac_end=$ac_max_sed_cmds # Line after last line for current file.
1732ac_more_lines=:
1733ac_sed_cmds=""
1734while $ac_more_lines; do
1735 if test $ac_beg -gt 1; then
1736 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
1737 else
1738 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
1739 fi
1740 if test ! -s conftest.s$ac_file; then
1741 ac_more_lines=false
1742 rm -f conftest.s$ac_file
1743 else
1744 if test -z "$ac_sed_cmds"; then
1745 ac_sed_cmds="sed -f conftest.s$ac_file"
1746 else
1747 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
1748 fi
1749 ac_file=`expr $ac_file + 1`
1750 ac_beg=$ac_end
1751 ac_end=`expr $ac_end + $ac_max_sed_cmds`
1752 fi
1753done
1754if test -z "$ac_sed_cmds"; then
1755 ac_sed_cmds=cat
1756fi
1757EOF
1758
ef346f1a
ILT
1759cat >> $CONFIG_STATUS <<EOF
1760
1761CONFIG_FILES=\${CONFIG_FILES-"Makefile"}
1762EOF
1763cat >> $CONFIG_STATUS <<\EOF
1764for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
b9a5c27f 1765 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
ef346f1a 1766 case "$ac_file" in
b9a5c27f 1767 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
ef346f1a
ILT
1768 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
1769 *) ac_file_in="${ac_file}.in" ;;
1770 esac
1771
b9a5c27f 1772 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
ef346f1a
ILT
1773
1774 # Remove last slash and all that follows it. Not all systems have dirname.
1775 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
1776 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
1777 # The file is in a subdirectory.
1778 test ! -d "$ac_dir" && mkdir "$ac_dir"
1779 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
1780 # A "../" for each directory in $ac_dir_suffix.
1781 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
1782 else
1783 ac_dir_suffix= ac_dots=
1784 fi
1785
1786 case "$ac_given_srcdir" in
1787 .) srcdir=.
1788 if test -z "$ac_dots"; then top_srcdir=.
1789 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
1790 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
b9a5c27f 1791 ?:*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
ef346f1a
ILT
1792 *) # Relative path.
1793 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
1794 top_srcdir="$ac_dots$ac_given_srcdir" ;;
1795 esac
1796
b9a5c27f
RS
1797 case "$ac_given_INSTALL" in
1798 [/$]*) INSTALL="$ac_given_INSTALL" ;;
1799 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
1800 esac
1801
ef346f1a
ILT
1802 echo creating "$ac_file"
1803 rm -f "$ac_file"
1804 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
1805 case "$ac_file" in
1806 *Makefile*) ac_comsub="1i\\
1807# $configure_input" ;;
1808 *) ac_comsub= ;;
1809 esac
b9a5c27f
RS
1810
1811 ac_file_inputs=`echo $ac_file_in|sed -e "s%:% $ac_given_srcdir/%" -e "s%^%$ac_given_srcdir/%g"`
ef346f1a
ILT
1812 sed -e "$ac_comsub
1813s%@configure_input@%$configure_input%g
1814s%@srcdir@%$srcdir%g
1815s%@top_srcdir@%$top_srcdir%g
b9a5c27f
RS
1816s%@INSTALL@%$INSTALL%g
1817" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
ef346f1a 1818fi; done
b9a5c27f 1819rm -f conftest.s*
ef346f1a
ILT
1820
1821# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
1822# NAME is the cpp macro being defined and VALUE is the value it is being given.
8c32cf6e 1823#
ef346f1a
ILT
1824# ac_d sets the value in "#define NAME VALUE" lines.
1825ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
1826ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
1827ac_dC='\3'
1828ac_dD='%g'
1829# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
1830ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
1831ac_uB='\([ ]\)%\1#\2define\3'
1832ac_uC=' '
1833ac_uD='\4%g'
1834# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
1835ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
1836ac_eB='$%\1#\2define\3'
1837ac_eC=' '
1838ac_eD='%g'
1839
b9a5c27f
RS
1840if test "${CONFIG_HEADERS+set}" != set; then
1841EOF
1842cat >> $CONFIG_STATUS <<EOF
1843 CONFIG_HEADERS="config.h:config.in"
1844EOF
1845cat >> $CONFIG_STATUS <<\EOF
1846fi
ef346f1a 1847for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
b9a5c27f 1848 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
ef346f1a 1849 case "$ac_file" in
b9a5c27f 1850 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
ef346f1a
ILT
1851 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
1852 *) ac_file_in="${ac_file}.in" ;;
1853 esac
1854
1855 echo creating $ac_file
1856
1857 rm -f conftest.frag conftest.in conftest.out
b9a5c27f
RS
1858 ac_file_inputs=`echo $ac_file_in|sed -e "s%:% $ac_given_srcdir/%" -e "s%^%$ac_given_srcdir/%g"`
1859 cat $ac_file_inputs > conftest.in
ef346f1a
ILT
1860
1861EOF
1862
1863# Transform confdefs.h into a sed script conftest.vals that substitutes
1864# the proper values into config.h.in to produce config.h. And first:
caf2a913 1865# Protect against being on the right side of a sed subst in config.status.
ef346f1a
ILT
1866# Protect against being in an unquoted here document in config.status.
1867rm -f conftest.vals
1868cat > conftest.hdr <<\EOF
1869s/[\\&%]/\\&/g
1870s%[\\$`]%\\&%g
b9a5c27f 1871s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
ef346f1a
ILT
1872s%ac_d%ac_u%gp
1873s%ac_u%ac_e%gp
1874EOF
1875sed -n -f conftest.hdr confdefs.h > conftest.vals
1876rm -f conftest.hdr
1877
1878# This sed command replaces #undef with comments. This is necessary, for
1879# example, in the case of _POSIX_SOURCE, which is predefined and required
1880# on some systems where configure will not decide to define it.
1881cat >> conftest.vals <<\EOF
1882s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
1883EOF
1884
1885# Break up conftest.vals because some shells have a limit on
1886# the size of here documents, and old seds have small limits too.
ef346f1a
ILT
1887
1888rm -f conftest.tail
1889while :
1890do
1891 ac_lines=`grep -c . conftest.vals`
1892 # grep -c gives empty output for an empty file on some AIX systems.
1893 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
1894 # Write a limited-size here document to conftest.frag.
1895 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
1896 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
1897 echo 'CEOF
1898 sed -f conftest.frag conftest.in > conftest.out
1899 rm -f conftest.in
1900 mv conftest.out conftest.in
1901' >> $CONFIG_STATUS
1902 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
1903 rm -f conftest.vals
1904 mv conftest.tail conftest.vals
1905done
1906rm -f conftest.vals
1907
1908cat >> $CONFIG_STATUS <<\EOF
1909 rm -f conftest.frag conftest.h
1910 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
1911 cat conftest.in >> conftest.h
1912 rm -f conftest.in
1913 if cmp -s $ac_file conftest.h 2>/dev/null; then
1914 echo "$ac_file is unchanged"
1915 rm -f conftest.h
1916 else
b9a5c27f
RS
1917 # Remove last slash and all that follows it. Not all systems have dirname.
1918 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
1919 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
1920 # The file is in a subdirectory.
1921 test ! -d "$ac_dir" && mkdir "$ac_dir"
1922 fi
ef346f1a
ILT
1923 rm -f $ac_file
1924 mv conftest.h $ac_file
1925 fi
1926fi; done
1927
b9a5c27f
RS
1928EOF
1929cat >> $CONFIG_STATUS <<EOF
ef346f1a 1930
b9a5c27f
RS
1931EOF
1932cat >> $CONFIG_STATUS <<\EOF
ef346f1a
ILT
1933case x$CONFIG_HEADERS in xconfig.h:config.in) echo > stamp-h ;; esac
1934exit 0
1935EOF
1936chmod +x $CONFIG_STATUS
1937rm -fr confdefs* $ac_clean_files
1938test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
2ee11735 1939
This page took 0.294934 seconds and 4 git commands to generate.