First stab at Windows resource compiler:
[deliverable/binutils-gdb.git] / binutils / configure
CommitLineData
5ab6ca68 1#! /bin/sh
99a42820 2
5ab6ca68 3# Guess values for system-dependent variables and create Makefiles.
33106b60
ILT
4# Generated automatically using autoconf version 2.12
5# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
5ab6ca68
ILT
6#
7# This configure script is free software; the Free Software Foundation
8# gives unlimited permission to copy, distribute and modify it.
9
10# Defaults:
11ac_help=
12ac_default_prefix=/usr/local
13# Any additions from configure.in:
14ac_help="$ac_help
15 --enable-targets alternative target configurations"
36fb98be
ILT
16ac_help="$ac_help
17 --enable-shared build shared BFD library"
33106b60
ILT
18ac_help="$ac_help
19 --enable-commonbfdlib build shared BFD/opcodes/libiberty library"
5ab6ca68
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
626a6542
SC
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'
99a42820 54
5ab6ca68
ILT
55# Initialize some other variables.
56subdirs=
626a6542 57MFLAGS= MAKEFLAGS=
33106b60
ILT
58# Maximum number of lines to put in a shell here document.
59ac_max_here_lines=12
99a42820 60
5ab6ca68
ILT
61ac_prev=
62for ac_option
63do
99a42820 64
5ab6ca68
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
626a6542
SC
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)
5ab6ca68 87 ac_prev=build ;;
626a6542 88 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
5ab6ca68
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
626a6542
SC
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
5ab6ca68
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]
626a6542 154 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
5ab6ca68 155 [same as prefix]
626a6542
SC
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]
5ab6ca68
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
626a6542
SC
173 --program-transform-name=PROGRAM
174 run sed PROGRAM on installed program names
175EOF
176 cat << EOF
5ab6ca68
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
5ab6ca68 188EOF
626a6542
SC
189 if test -n "$ac_help"; then
190 echo "--enable and --with options recognized:$ac_help"
191 fi
5ab6ca68
ILT
192 exit 0 ;;
193
194 -host | --host | --hos | --ho)
195 ac_prev=host ;;
196 -host=* | --host=* | --hos=* | --ho=*)
197 host="$ac_optarg" ;;
198
626a6542
SC
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
5ab6ca68
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
626a6542
SC
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
5ab6ca68
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
626a6542
SC
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
5ab6ca68
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
626a6542
SC
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
5ab6ca68
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)
33106b60 341 echo "configure generated by autoconf version 2.12"
5ab6ca68
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
626a6542 387 *)
5ab6ca68
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
a10d26a1 399
5ab6ca68
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
99a42820 403
5ab6ca68
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
99a42820 420
5ab6ca68
ILT
421echo "\
422This file contains any messages produced by compilers while
423running configure, to aid debugging if configure makes a mistake.
424" 1>&5
425
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
99a42820 430do
5ab6ca68
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
99a42820
RP
440done
441
5ab6ca68 442# NLS nuisances.
33106b60
ILT
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.
5ab6ca68 447if test "${LANG+set}" = set; then LANG=C; export LANG; fi
33106b60
ILT
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
5ab6ca68
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=ar.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
481fi
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
b5132a6b 491fi
5ab6ca68
ILT
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
b5132a6b 498
5ab6ca68
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
505fi
506
507ac_ext=c
508# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ea2488ad
ILT
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'
33106b60 512cross_compiling=$ac_cv_prog_cc_cross
5ab6ca68
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=
f2e91404 524fi
99a42820 525
b5132a6b 526
5ab6ca68
ILT
527
528# Check whether --enable-targets or --disable-targets was given.
626a6542
SC
529if test "${enable_targets+set}" = set; then
530 enableval="$enable_targets"
5ab6ca68
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
a10d26a1 537fi
36fb98be
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
33106b60 542 yes) shared=true shared_bfd=true shared_opcodes=true ;;
36fb98be 543 no) shared=false ;;
33106b60
ILT
544 *bfd*opcodes*) shared=true shared_bfd=true shared_opcodes=true ;;
545 *opcodes*bfd*) shared=true shared_bfd=true shared_opcodes=true ;;
546 *bfd*) shared=true shared_bfd=true ;;
547 *opcodes*) shared=true shared_opcodes=true ;;
548 *) shared=false ;;
549esac
550fi
551# Check whether --enable-commonbfdlib or --disable-commonbfdlib was given.
552if test "${enable_commonbfdlib+set}" = set; then
553 enableval="$enable_commonbfdlib"
554 case "${enableval}" in
555 yes) commonbfdlib=true ;;
556 no) commonbfdlib=false ;;
557 *) { echo "configure: error: bad value ${enableval} for BFD commonbfdlib option" 1>&2; exit 1; } ;;
36fb98be
ILT
558esac
559fi
99a42820 560
99a42820 561
b5132a6b 562
5ab6ca68
ILT
563ac_aux_dir=
564for ac_dir in `cd $srcdir/..; pwd` $srcdir/`cd $srcdir/..; pwd`; do
565 if test -f $ac_dir/install-sh; then
566 ac_aux_dir=$ac_dir
567 ac_install_sh="$ac_aux_dir/install-sh -c"
568 break
569 elif test -f $ac_dir/install.sh; then
570 ac_aux_dir=$ac_dir
571 ac_install_sh="$ac_aux_dir/install.sh -c"
572 break
573 fi
574done
575if test -z "$ac_aux_dir"; then
576 { echo "configure: error: can not find install-sh or install.sh in `cd $srcdir/..; pwd` $srcdir/`cd $srcdir/..; pwd`" 1>&2; exit 1; }
577fi
578ac_config_guess=$ac_aux_dir/config.guess
579ac_config_sub=$ac_aux_dir/config.sub
580ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
99a42820 581
99a42820 582
5ab6ca68
ILT
583# Do some error checking and defaulting for the host and target type.
584# The inputs are:
585# configure --host=HOST --target=TARGET --build=BUILD NONOPT
586#
587# The rules are:
588# 1. You are not allowed to specify --host, --target, and nonopt at the
626a6542 589# same time.
5ab6ca68
ILT
590# 2. Host defaults to nonopt.
591# 3. If nonopt is not specified, then host defaults to the current host,
592# as determined by config.guess.
593# 4. Target and build default to nonopt.
594# 5. If nonopt is not specified, then target and build default to host.
595
596# The aliases save the names the user supplied, while $host etc.
597# will get canonicalized.
598case $host---$target---$nonopt in
599NONE---*---* | *---NONE---* | *---*---NONE) ;;
600*) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
601esac
602
603
604# Make sure we can run config.sub.
605if $ac_config_sub sun4 >/dev/null 2>&1; then :
606else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
607fi
99a42820 608
5ab6ca68 609echo $ac_n "checking host system type""... $ac_c" 1>&6
33106b60 610echo "configure:611: checking host system type" >&5
5ab6ca68
ILT
611
612host_alias=$host
613case "$host_alias" in
614NONE)
615 case $nonopt in
616 NONE)
617 if host_alias=`$ac_config_guess`; then :
618 else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
619 fi ;;
620 *) host_alias=$nonopt ;;
621 esac ;;
622esac
623
624host=`$ac_config_sub $host_alias`
33106b60
ILT
625host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
626host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
627host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
5ab6ca68
ILT
628echo "$ac_t""$host" 1>&6
629
630echo $ac_n "checking target system type""... $ac_c" 1>&6
33106b60 631echo "configure:632: checking target system type" >&5
5ab6ca68
ILT
632
633target_alias=$target
634case "$target_alias" in
635NONE)
636 case $nonopt in
637 NONE) target_alias=$host_alias ;;
638 *) target_alias=$nonopt ;;
639 esac ;;
640esac
641
642target=`$ac_config_sub $target_alias`
33106b60
ILT
643target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
644target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
645target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
5ab6ca68
ILT
646echo "$ac_t""$target" 1>&6
647
648echo $ac_n "checking build system type""... $ac_c" 1>&6
33106b60 649echo "configure:650: checking build system type" >&5
5ab6ca68
ILT
650
651build_alias=$build
652case "$build_alias" in
653NONE)
654 case $nonopt in
655 NONE) build_alias=$host_alias ;;
656 *) build_alias=$nonopt ;;
657 esac ;;
658esac
659
660build=`$ac_config_sub $build_alias`
33106b60
ILT
661build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
662build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
663build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
5ab6ca68
ILT
664echo "$ac_t""$build" 1>&6
665
666test "$host_alias" != "$target_alias" &&
667 test "$program_prefix$program_suffix$program_transform_name" = \
668 NONENONEs,x,x, &&
669 program_prefix=${target_alias}-
670
671if test -z "$target" ; then
672 { echo "configure: error: Unrecognized target system type; please check config.sub." 1>&2; exit 1; }
673fi
674if test -z "$host" ; then
675 { echo "configure: error: Unrecognized host system type; please check config.sub." 1>&2; exit 1; }
676fi
677if test "$program_transform_name" = s,x,x,; then
678 program_transform_name=
679else
626a6542
SC
680 # Double any \ or $. echo might interpret backslashes.
681 cat <<\EOF_SED > conftestsed
682s,\\,\\\\,g; s,\$,$$,g
683EOF_SED
5ab6ca68
ILT
684 program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
685 rm -f conftestsed
686fi
687test "$program_prefix" != NONE &&
688 program_transform_name="s,^,${program_prefix},; $program_transform_name"
689# Use a double $ so make ignores it.
690test "$program_suffix" != NONE &&
691 program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
692
693# sed with no file args requires a program.
694test "$program_transform_name" = "" && program_transform_name="s,x,x,"
695
696
697# host-specific stuff:
698
699HDEFINES=
36fb98be 700HLDFLAGS=
33106b60 701HLDENV=
efa86453 702RPATH_ENVVAR=LD_LIBRARY_PATH
5ab6ca68 703
53fb794b
ILT
704# Extract the first word of "gcc", so it can be a program name with args.
705set dummy gcc; ac_word=$2
706echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
33106b60 707echo "configure:708: checking for $ac_word" >&5
53fb794b
ILT
708if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
709 echo $ac_n "(cached) $ac_c" 1>&6
710else
711 if test -n "$CC"; then
712 ac_cv_prog_CC="$CC" # Let the user override the test.
713else
714 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
715 for ac_dir in $PATH; do
716 test -z "$ac_dir" && ac_dir=.
717 if test -f $ac_dir/$ac_word; then
718 ac_cv_prog_CC="gcc"
719 break
720 fi
721 done
722 IFS="$ac_save_ifs"
53fb794b
ILT
723fi
724fi
725CC="$ac_cv_prog_CC"
726if test -n "$CC"; then
727 echo "$ac_t""$CC" 1>&6
728else
729 echo "$ac_t""no" 1>&6
730fi
5ab6ca68 731
ea2488ad
ILT
732if test -z "$CC"; then
733 # Extract the first word of "cc", so it can be a program name with args.
734set dummy cc; ac_word=$2
735echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
33106b60 736echo "configure:737: checking for $ac_word" >&5
ea2488ad
ILT
737if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
738 echo $ac_n "(cached) $ac_c" 1>&6
739else
740 if test -n "$CC"; then
741 ac_cv_prog_CC="$CC" # Let the user override the test.
742else
743 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
744 ac_prog_rejected=no
745 for ac_dir in $PATH; do
746 test -z "$ac_dir" && ac_dir=.
747 if test -f $ac_dir/$ac_word; then
748 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
749 ac_prog_rejected=yes
750 continue
751 fi
752 ac_cv_prog_CC="cc"
753 break
754 fi
755 done
756 IFS="$ac_save_ifs"
757if test $ac_prog_rejected = yes; then
758 # We found a bogon in the path, so make sure we never use it.
759 set dummy $ac_cv_prog_CC
760 shift
761 if test $# -gt 0; then
762 # We chose a different compiler from the bogus one.
763 # However, it has the same basename, so the bogon will be chosen
764 # first if we set CC to just the basename; use the full file name.
765 shift
766 set dummy "$ac_dir/$ac_word" "$@"
767 shift
768 ac_cv_prog_CC="$@"
769 fi
770fi
771fi
772fi
773CC="$ac_cv_prog_CC"
774if test -n "$CC"; then
775 echo "$ac_t""$CC" 1>&6
776else
777 echo "$ac_t""no" 1>&6
778fi
779
780 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
781fi
53fb794b 782
33106b60
ILT
783echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
784echo "configure:785: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
785
786ac_ext=c
787# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
788ac_cpp='$CPP $CPPFLAGS'
789ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
790ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
791cross_compiling=$ac_cv_prog_cc_cross
792
793cat > conftest.$ac_ext <<EOF
794#line 795 "configure"
795#include "confdefs.h"
796main(){return(0);}
797EOF
798if { (eval echo configure:799: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
799 ac_cv_prog_cc_works=yes
800 # If we can't run a trivial program, we are probably using a cross compiler.
801 if (./conftest; exit) 2>/dev/null; then
802 ac_cv_prog_cc_cross=no
803 else
804 ac_cv_prog_cc_cross=yes
805 fi
806else
807 echo "configure: failed program was:" >&5
808 cat conftest.$ac_ext >&5
809 ac_cv_prog_cc_works=no
810fi
811rm -fr conftest*
812
813echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
814if test $ac_cv_prog_cc_works = no; then
815 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
816fi
817echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
818echo "configure:819: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
819echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
820cross_compiling=$ac_cv_prog_cc_cross
821
53fb794b 822echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
33106b60 823echo "configure:824: checking whether we are using GNU C" >&5
53fb794b
ILT
824if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
825 echo $ac_n "(cached) $ac_c" 1>&6
826else
827 cat > conftest.c <<EOF
5ab6ca68
ILT
828#ifdef __GNUC__
829 yes;
830#endif
831EOF
33106b60 832if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:833: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
53fb794b
ILT
833 ac_cv_prog_gcc=yes
834else
835 ac_cv_prog_gcc=no
836fi
837fi
626a6542 838
53fb794b 839echo "$ac_t""$ac_cv_prog_gcc" 1>&6
33106b60 840
53fb794b 841if test $ac_cv_prog_gcc = yes; then
5ab6ca68 842 GCC=yes
33106b60
ILT
843 ac_test_CFLAGS="${CFLAGS+set}"
844 ac_save_CFLAGS="$CFLAGS"
845 CFLAGS=
846 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
847echo "configure:848: checking whether ${CC-cc} accepts -g" >&5
848if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
53fb794b
ILT
849 echo $ac_n "(cached) $ac_c" 1>&6
850else
851 echo 'void f(){}' > conftest.c
852if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
33106b60 853 ac_cv_prog_cc_g=yes
53fb794b 854else
33106b60 855 ac_cv_prog_cc_g=no
53fb794b
ILT
856fi
857rm -f conftest*
858
859fi
626a6542 860
33106b60
ILT
861echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
862 if test "$ac_test_CFLAGS" = set; then
863 CFLAGS="$ac_save_CFLAGS"
864 elif test $ac_cv_prog_cc_g = yes; then
865 CFLAGS="-g -O2"
866 else
867 CFLAGS="-O2"
5ab6ca68
ILT
868 fi
869else
870 GCC=
871 test "${CFLAGS+set}" = set || CFLAGS="-g"
872fi
99a42820 873
5a168a17 874
ea2488ad 875. ${srcdir}/../bfd/configure.host
5a168a17 876
5a168a17 877
36fb98be 878
efa86453 879
33106b60 880
5ab6ca68
ILT
881AR=${AR-ar}
882
883# Extract the first word of "ranlib", so it can be a program name with args.
884set dummy ranlib; ac_word=$2
885echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
33106b60 886echo "configure:887: checking for $ac_word" >&5
5ab6ca68
ILT
887if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
888 echo $ac_n "(cached) $ac_c" 1>&6
889else
890 if test -n "$RANLIB"; then
891 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
892else
893 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
894 for ac_dir in $PATH; do
895 test -z "$ac_dir" && ac_dir=.
896 if test -f $ac_dir/$ac_word; then
897 ac_cv_prog_RANLIB="ranlib"
898 break
899 fi
900 done
901 IFS="$ac_save_ifs"
902 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
903fi
904fi
905RANLIB="$ac_cv_prog_RANLIB"
906if test -n "$RANLIB"; then
907 echo "$ac_t""$RANLIB" 1>&6
908else
909 echo "$ac_t""no" 1>&6
910fi
911
912# Find a good install program. We prefer a C program (faster),
913# so one script is as good as another. But avoid the broken or
914# incompatible versions:
915# SysV /etc/install, /usr/sbin/install
916# SunOS /usr/etc/install
917# IRIX /sbin/install
918# AIX /bin/install
919# AFS /usr/afsws/bin/install, which mishandles nonexistent args
920# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
921# ./install, which can be erroneously created by make from ./install.sh.
922echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
33106b60 923echo "configure:924: checking for a BSD compatible install" >&5
5ab6ca68
ILT
924if test -z "$INSTALL"; then
925if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
926 echo $ac_n "(cached) $ac_c" 1>&6
927else
33106b60 928 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="${IFS}:"
5ab6ca68
ILT
929 for ac_dir in $PATH; do
930 # Account for people who put trailing slashes in PATH elements.
931 case "$ac_dir/" in
932 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
933 *)
934 # OSF1 and SCO ODT 3.0 have their own names for install.
935 for ac_prog in ginstall installbsd scoinst install; do
936 if test -f $ac_dir/$ac_prog; then
937 if test $ac_prog = install &&
938 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
939 # AIX install. It has an incompatible calling convention.
940 # OSF/1 installbsd also uses dspmsg, but is usable.
941 :
942 else
943 ac_cv_path_install="$ac_dir/$ac_prog -c"
944 break 2
945 fi
99a42820 946 fi
5ab6ca68
ILT
947 done
948 ;;
949 esac
950 done
33106b60 951 IFS="$ac_save_IFS"
626a6542 952
5ab6ca68 953fi
626a6542
SC
954 if test "${ac_cv_path_install+set}" = set; then
955 INSTALL="$ac_cv_path_install"
956 else
957 # As a last resort, use the slow shell script. We don't cache a
958 # path for INSTALL within a source directory, because that will
959 # break other packages using the cache if that directory is
960 # removed, or if the path is relative.
961 INSTALL="$ac_install_sh"
962 fi
5ab6ca68
ILT
963fi
964echo "$ac_t""$INSTALL" 1>&6
965
966# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
967# It thinks the first close brace ends the variable substitution.
968test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
969
970test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
99a42820 971
5ab6ca68 972
36fb98be
ILT
973# For most hosts we can use a simple definition to pick up the BFD and
974# opcodes libraries. However, if we are building shared libraries, we
975# need to handle some hosts specially.
976BFDLIB='-L../bfd -lbfd'
977OPCODES='-L../opcodes -lopcodes'
33106b60
ILT
978
979case "${host}" in
980*-*-sunos*)
981 # On SunOS, we must link against the name we are going to install,
982 # not -lbfd, since SunOS does not support SONAME.
983 if test "${shared_bfd}" = "true"; then
36fb98be 984 BFDLIB='-L../bfd -l`echo bfd | sed '"'"'$(program_transform_name)'"'"'`'
33106b60
ILT
985 fi
986 if test "${shared_opcodes}" = "true"; then
36fb98be 987 OPCODES='-L../opcodes -l`echo opcodes | sed '"'"'$(program_transform_name)'"'"'`'
33106b60
ILT
988 fi
989 ;;
990alpha*-*-osf*)
991 # On Alpha OSF/1, the native linker searches all the -L
992 # directories for any LIB.so files, and only then searches for any
993 # LIB.a files. That means that if there is an installed
994 # libbfd.so, but this build is not done with --enable-shared, the
995 # link will wind up being against the install libbfd.so rather
996 # than the newly built libbfd. To avoid this, we must explicitly
997 # link against libbfd.a when --enable-shared is not used.
998 if test "${shared_bfd}" != "true"; then
999 BFDLIB='../bfd/libbfd.a'
1000 fi
1001 if test "${shared_opcodes}" != "true"; then
1002 OPCODES='../opcodes/libopcodes.a'
1003 fi
1004 ;;
1005esac
36fb98be 1006
33106b60
ILT
1007if test "${commonbfdlib}" = "true"; then
1008 # when a shared libbfd is built with --enable-commonbfdlib,
1d371d35
ILT
1009 # all of libopcodes is available in libbfd.so. Unfortunately, on
1010 # HP/UX, when using gcc -g, the linker does a static link, so we
1011 # need to continue linking against opcodes on that platform.
1012 case "${host}" in
1013 *-*-hpux*) ;;
1014 *) OPCODES= ;;
1015 esac
33106b60 1016fi
36fb98be
ILT
1017
1018
626a6542 1019
320d4f29
ILT
1020
1021# Put a plausible default for CC_FOR_BUILD in Makefile.
ae0daa11
ILT
1022if test -z "$CC_FOR_BUILD"; then
1023 if test "x$cross_compiling" = "xno"; then
1024 CC_FOR_BUILD='$(CC)'
1025 else
1026 CC_FOR_BUILD=gcc
1027 fi
320d4f29
ILT
1028fi
1029
1030
5ab6ca68 1031echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
1d371d35 1032echo "configure:1033: checking how to run the C preprocessor" >&5
5ab6ca68
ILT
1033# On Suns, sometimes $CPP names a directory.
1034if test -n "$CPP" && test -d "$CPP"; then
1035 CPP=
1036fi
1037if test -z "$CPP"; then
1038if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1039 echo $ac_n "(cached) $ac_c" 1>&6
1040else
1041 # This must be in double quotes, not single quotes, because CPP may get
1042 # substituted into the Makefile and "${CC-cc}" will confuse make.
1043 CPP="${CC-cc} -E"
1044 # On the NeXT, cc -E runs the code through the compiler's parser,
1045 # not just through cpp.
1046 cat > conftest.$ac_ext <<EOF
1d371d35 1047#line 1048 "configure"
5ab6ca68
ILT
1048#include "confdefs.h"
1049#include <assert.h>
1050Syntax Error
1051EOF
ea2488ad 1052ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1d371d35 1053{ (eval echo configure:1054: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ab6ca68
ILT
1054ac_err=`grep -v '^ *+' conftest.out`
1055if test -z "$ac_err"; then
1056 :
1057else
1058 echo "$ac_err" >&5
33106b60
ILT
1059 echo "configure: failed program was:" >&5
1060 cat conftest.$ac_ext >&5
5ab6ca68
ILT
1061 rm -rf conftest*
1062 CPP="${CC-cc} -E -traditional-cpp"
1063 cat > conftest.$ac_ext <<EOF
1d371d35 1064#line 1065 "configure"
5ab6ca68
ILT
1065#include "confdefs.h"
1066#include <assert.h>
1067Syntax Error
1068EOF
ea2488ad 1069ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1d371d35 1070{ (eval echo configure:1071: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ab6ca68
ILT
1071ac_err=`grep -v '^ *+' conftest.out`
1072if test -z "$ac_err"; then
1073 :
1074else
1075 echo "$ac_err" >&5
33106b60
ILT
1076 echo "configure: failed program was:" >&5
1077 cat conftest.$ac_ext >&5
5ab6ca68
ILT
1078 rm -rf conftest*
1079 CPP=/lib/cpp
1080fi
1081rm -f conftest*
1082fi
1083rm -f conftest*
1084 ac_cv_prog_CPP="$CPP"
1085fi
1086 CPP="$ac_cv_prog_CPP"
1087else
1088 ac_cv_prog_CPP="$CPP"
99a42820 1089fi
5ab6ca68 1090echo "$ac_t""$CPP" 1>&6
99a42820 1091
5ab6ca68
ILT
1092for ac_hdr in string.h strings.h stdlib.h unistd.h fcntl.h sys/file.h
1093do
33106b60 1094ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5ab6ca68 1095echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1d371d35 1096echo "configure:1097: checking for $ac_hdr" >&5
5ab6ca68
ILT
1097if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1098 echo $ac_n "(cached) $ac_c" 1>&6
1099else
1100 cat > conftest.$ac_ext <<EOF
1d371d35 1101#line 1102 "configure"
5ab6ca68
ILT
1102#include "confdefs.h"
1103#include <$ac_hdr>
1104EOF
ea2488ad 1105ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1d371d35 1106{ (eval echo configure:1107: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ab6ca68
ILT
1107ac_err=`grep -v '^ *+' conftest.out`
1108if test -z "$ac_err"; then
1109 rm -rf conftest*
1110 eval "ac_cv_header_$ac_safe=yes"
1111else
1112 echo "$ac_err" >&5
33106b60
ILT
1113 echo "configure: failed program was:" >&5
1114 cat conftest.$ac_ext >&5
5ab6ca68
ILT
1115 rm -rf conftest*
1116 eval "ac_cv_header_$ac_safe=no"
ec342d7d 1117fi
5ab6ca68
ILT
1118rm -f conftest*
1119fi
1120if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1121 echo "$ac_t""yes" 1>&6
33106b60 1122 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5ab6ca68
ILT
1123 cat >> confdefs.h <<EOF
1124#define $ac_tr_hdr 1
1125EOF
1126
1127else
1128 echo "$ac_t""no" 1>&6
1129fi
1130done
ec342d7d 1131
27fca56f 1132echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
1d371d35 1133echo "configure:1134: checking for sys/wait.h that is POSIX.1 compatible" >&5
27fca56f
ILT
1134if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
1135 echo $ac_n "(cached) $ac_c" 1>&6
1136else
1137 cat > conftest.$ac_ext <<EOF
1d371d35 1138#line 1139 "configure"
27fca56f
ILT
1139#include "confdefs.h"
1140#include <sys/types.h>
1141#include <sys/wait.h>
1142#ifndef WEXITSTATUS
1143#define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
1144#endif
1145#ifndef WIFEXITED
1146#define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
1147#endif
33106b60 1148int main() {
27fca56f
ILT
1149int s;
1150wait (&s);
1151s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
1152; return 0; }
1153EOF
1d371d35 1154if { (eval echo configure:1155: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
27fca56f
ILT
1155 rm -rf conftest*
1156 ac_cv_header_sys_wait_h=yes
1157else
33106b60
ILT
1158 echo "configure: failed program was:" >&5
1159 cat conftest.$ac_ext >&5
27fca56f
ILT
1160 rm -rf conftest*
1161 ac_cv_header_sys_wait_h=no
1162fi
1163rm -f conftest*
27fca56f 1164fi
626a6542 1165
27fca56f
ILT
1166echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
1167if test $ac_cv_header_sys_wait_h = yes; then
1168 cat >> confdefs.h <<\EOF
1169#define HAVE_SYS_WAIT_H 1
1170EOF
1171
1172fi
1173
33106b60
ILT
1174# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
1175# for constant arguments. Useless!
1176echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
1d371d35 1177echo "configure:1178: checking for working alloca.h" >&5
33106b60
ILT
1178if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
1179 echo $ac_n "(cached) $ac_c" 1>&6
1180else
1181 cat > conftest.$ac_ext <<EOF
1d371d35 1182#line 1183 "configure"
33106b60
ILT
1183#include "confdefs.h"
1184#include <alloca.h>
1185int main() {
1186char *p = alloca(2 * sizeof(int));
1187; return 0; }
1188EOF
1d371d35 1189if { (eval echo configure:1190: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
33106b60
ILT
1190 rm -rf conftest*
1191 ac_cv_header_alloca_h=yes
1192else
1193 echo "configure: failed program was:" >&5
1194 cat conftest.$ac_ext >&5
1195 rm -rf conftest*
1196 ac_cv_header_alloca_h=no
1197fi
1198rm -f conftest*
1199fi
1200
1201echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
1202if test $ac_cv_header_alloca_h = yes; then
1203 cat >> confdefs.h <<\EOF
1204#define HAVE_ALLOCA_H 1
1205EOF
1206
1207fi
1208
1209echo $ac_n "checking for alloca""... $ac_c" 1>&6
1d371d35 1210echo "configure:1211: checking for alloca" >&5
33106b60
ILT
1211if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
1212 echo $ac_n "(cached) $ac_c" 1>&6
1213else
1214 cat > conftest.$ac_ext <<EOF
1d371d35 1215#line 1216 "configure"
33106b60
ILT
1216#include "confdefs.h"
1217
1218#ifdef __GNUC__
1219# define alloca __builtin_alloca
1220#else
1221# if HAVE_ALLOCA_H
1222# include <alloca.h>
1223# else
1224# ifdef _AIX
1225 #pragma alloca
1226# else
1227# ifndef alloca /* predefined by HP cc +Olibcalls */
1228char *alloca ();
1229# endif
1230# endif
1231# endif
1232#endif
1233
1234int main() {
1235char *p = (char *) alloca(1);
1236; return 0; }
1237EOF
1d371d35 1238if { (eval echo configure:1239: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
33106b60
ILT
1239 rm -rf conftest*
1240 ac_cv_func_alloca_works=yes
1241else
1242 echo "configure: failed program was:" >&5
1243 cat conftest.$ac_ext >&5
1244 rm -rf conftest*
1245 ac_cv_func_alloca_works=no
1246fi
1247rm -f conftest*
1248fi
1249
1250echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
1251if test $ac_cv_func_alloca_works = yes; then
1252 cat >> confdefs.h <<\EOF
1253#define HAVE_ALLOCA 1
1254EOF
1255
1256fi
1257
1258if test $ac_cv_func_alloca_works = no; then
1259 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
1260 # that cause trouble. Some versions do not even contain alloca or
1261 # contain a buggy version. If you still want to use their alloca,
1262 # use ar to extract alloca.o from them instead of compiling alloca.c.
1263 ALLOCA=alloca.o
1264 cat >> confdefs.h <<\EOF
1265#define C_ALLOCA 1
1266EOF
1267
1268
1269echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
1d371d35 1270echo "configure:1271: checking whether alloca needs Cray hooks" >&5
33106b60
ILT
1271if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
1272 echo $ac_n "(cached) $ac_c" 1>&6
1273else
1274 cat > conftest.$ac_ext <<EOF
1d371d35 1275#line 1276 "configure"
33106b60
ILT
1276#include "confdefs.h"
1277#if defined(CRAY) && ! defined(CRAY2)
1278webecray
1279#else
1280wenotbecray
1281#endif
1282
1283EOF
1284if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1285 egrep "webecray" >/dev/null 2>&1; then
1286 rm -rf conftest*
1287 ac_cv_os_cray=yes
1288else
1289 rm -rf conftest*
1290 ac_cv_os_cray=no
1291fi
1292rm -f conftest*
1293
1294fi
1295
1296echo "$ac_t""$ac_cv_os_cray" 1>&6
1297if test $ac_cv_os_cray = yes; then
1298for ac_func in _getb67 GETB67 getb67; do
1299 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1d371d35 1300echo "configure:1301: checking for $ac_func" >&5
33106b60
ILT
1301if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1302 echo $ac_n "(cached) $ac_c" 1>&6
1303else
1304 cat > conftest.$ac_ext <<EOF
1d371d35 1305#line 1306 "configure"
33106b60
ILT
1306#include "confdefs.h"
1307/* System header to define __stub macros and hopefully few prototypes,
1308 which can conflict with char $ac_func(); below. */
1309#include <assert.h>
1310/* Override any gcc2 internal prototype to avoid an error. */
1311/* We use char because int might match the return type of a gcc2
1312 builtin and then its argument prototype would still apply. */
1313char $ac_func();
1314
1315int main() {
1316
1317/* The GNU C library defines this for functions which it implements
1318 to always fail with ENOSYS. Some functions are actually named
1319 something starting with __ and the normal name is an alias. */
1320#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1321choke me
1322#else
1323$ac_func();
1324#endif
1325
1326; return 0; }
1327EOF
1d371d35 1328if { (eval echo configure:1329: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
33106b60
ILT
1329 rm -rf conftest*
1330 eval "ac_cv_func_$ac_func=yes"
1331else
1332 echo "configure: failed program was:" >&5
1333 cat conftest.$ac_ext >&5
1334 rm -rf conftest*
1335 eval "ac_cv_func_$ac_func=no"
1336fi
1337rm -f conftest*
1338fi
1339
1340if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1341 echo "$ac_t""yes" 1>&6
1342 cat >> confdefs.h <<EOF
1343#define CRAY_STACKSEG_END $ac_func
1344EOF
1345
1346 break
1347else
1348 echo "$ac_t""no" 1>&6
1349fi
1350
1351done
1352fi
1353
1354echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
1d371d35 1355echo "configure:1356: checking stack direction for C alloca" >&5
33106b60
ILT
1356if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
1357 echo $ac_n "(cached) $ac_c" 1>&6
1358else
1359 if test "$cross_compiling" = yes; then
1360 ac_cv_c_stack_direction=0
1361else
1362 cat > conftest.$ac_ext <<EOF
1d371d35 1363#line 1364 "configure"
33106b60
ILT
1364#include "confdefs.h"
1365find_stack_direction ()
1366{
1367 static char *addr = 0;
1368 auto char dummy;
1369 if (addr == 0)
1370 {
1371 addr = &dummy;
1372 return find_stack_direction ();
1373 }
1374 else
1375 return (&dummy > addr) ? 1 : -1;
1376}
1377main ()
1378{
1379 exit (find_stack_direction() < 0);
1380}
1381EOF
1d371d35 1382if { (eval echo configure:1383: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
33106b60
ILT
1383then
1384 ac_cv_c_stack_direction=1
1385else
1386 echo "configure: failed program was:" >&5
1387 cat conftest.$ac_ext >&5
1388 rm -fr conftest*
1389 ac_cv_c_stack_direction=-1
1390fi
1391rm -fr conftest*
1392fi
1393
1394fi
1395
1396echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
1397cat >> confdefs.h <<EOF
1398#define STACK_DIRECTION $ac_cv_c_stack_direction
1399EOF
1400
1401fi
1402
5ab6ca68
ILT
1403for ac_func in sbrk utimes
1404do
1405echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1d371d35 1406echo "configure:1407: checking for $ac_func" >&5
5ab6ca68
ILT
1407if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1408 echo $ac_n "(cached) $ac_c" 1>&6
1409else
1410 cat > conftest.$ac_ext <<EOF
1d371d35 1411#line 1412 "configure"
5ab6ca68
ILT
1412#include "confdefs.h"
1413/* System header to define __stub macros and hopefully few prototypes,
1414 which can conflict with char $ac_func(); below. */
1415#include <assert.h>
1416/* Override any gcc2 internal prototype to avoid an error. */
33106b60
ILT
1417/* We use char because int might match the return type of a gcc2
1418 builtin and then its argument prototype would still apply. */
626a6542 1419char $ac_func();
5ab6ca68 1420
33106b60 1421int main() {
5ab6ca68
ILT
1422
1423/* The GNU C library defines this for functions which it implements
1424 to always fail with ENOSYS. Some functions are actually named
1425 something starting with __ and the normal name is an alias. */
1426#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1427choke me
1428#else
1429$ac_func();
1430#endif
1431
1432; return 0; }
1433EOF
1d371d35 1434if { (eval echo configure:1435: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
5ab6ca68
ILT
1435 rm -rf conftest*
1436 eval "ac_cv_func_$ac_func=yes"
1437else
33106b60
ILT
1438 echo "configure: failed program was:" >&5
1439 cat conftest.$ac_ext >&5
5ab6ca68
ILT
1440 rm -rf conftest*
1441 eval "ac_cv_func_$ac_func=no"
1442fi
1443rm -f conftest*
5ab6ca68 1444fi
33106b60 1445
5ab6ca68
ILT
1446if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1447 echo "$ac_t""yes" 1>&6
626a6542 1448 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5ab6ca68
ILT
1449 cat >> confdefs.h <<EOF
1450#define $ac_tr_func 1
1451EOF
1452
1453else
1454 echo "$ac_t""no" 1>&6
1455fi
1456done
1457
33106b60
ILT
1458if test "x$cross_compiling" = "xno"; then
1459 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
1d371d35 1460echo "configure:1461: checking for ANSI C header files" >&5
33106b60
ILT
1461if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1462 echo $ac_n "(cached) $ac_c" 1>&6
1463else
1464 cat > conftest.$ac_ext <<EOF
1d371d35 1465#line 1466 "configure"
33106b60
ILT
1466#include "confdefs.h"
1467#include <stdlib.h>
1468#include <stdarg.h>
1469#include <string.h>
1470#include <float.h>
1471EOF
1472ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1d371d35 1473{ (eval echo configure:1474: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
33106b60
ILT
1474ac_err=`grep -v '^ *+' conftest.out`
1475if test -z "$ac_err"; then
1476 rm -rf conftest*
1477 ac_cv_header_stdc=yes
1478else
1479 echo "$ac_err" >&5
1480 echo "configure: failed program was:" >&5
1481 cat conftest.$ac_ext >&5
1482 rm -rf conftest*
1483 ac_cv_header_stdc=no
1484fi
1485rm -f conftest*
1486
1487if test $ac_cv_header_stdc = yes; then
1488 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1489cat > conftest.$ac_ext <<EOF
1d371d35 1490#line 1491 "configure"
33106b60
ILT
1491#include "confdefs.h"
1492#include <string.h>
1493EOF
1494if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1495 egrep "memchr" >/dev/null 2>&1; then
1496 :
1497else
1498 rm -rf conftest*
1499 ac_cv_header_stdc=no
1500fi
1501rm -f conftest*
1502
1503fi
1504
1505if test $ac_cv_header_stdc = yes; then
1506 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1507cat > conftest.$ac_ext <<EOF
1d371d35 1508#line 1509 "configure"
33106b60
ILT
1509#include "confdefs.h"
1510#include <stdlib.h>
1511EOF
1512if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1513 egrep "free" >/dev/null 2>&1; then
1514 :
1515else
1516 rm -rf conftest*
1517 ac_cv_header_stdc=no
1518fi
1519rm -f conftest*
1520
1521fi
1522
1523if test $ac_cv_header_stdc = yes; then
1524 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1525if test "$cross_compiling" = yes; then
1526 :
1527else
1528 cat > conftest.$ac_ext <<EOF
1d371d35 1529#line 1530 "configure"
33106b60
ILT
1530#include "confdefs.h"
1531#include <ctype.h>
1532#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1533#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
1534#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
1535int main () { int i; for (i = 0; i < 256; i++)
1536if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1537exit (0); }
1538
1539EOF
1d371d35 1540if { (eval echo configure:1541: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
33106b60
ILT
1541then
1542 :
1543else
1544 echo "configure: failed program was:" >&5
1545 cat conftest.$ac_ext >&5
1546 rm -fr conftest*
1547 ac_cv_header_stdc=no
1548fi
1549rm -fr conftest*
1550fi
1551
1552fi
1553fi
1554
1555echo "$ac_t""$ac_cv_header_stdc" 1>&6
1556if test $ac_cv_header_stdc = yes; then
1557 cat >> confdefs.h <<\EOF
1558#define STDC_HEADERS 1
1559EOF
1560
1561fi
1562
1563echo $ac_n "checking for pid_t""... $ac_c" 1>&6
1d371d35 1564echo "configure:1565: checking for pid_t" >&5
33106b60
ILT
1565if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
1566 echo $ac_n "(cached) $ac_c" 1>&6
1567else
1568 cat > conftest.$ac_ext <<EOF
1d371d35 1569#line 1570 "configure"
33106b60
ILT
1570#include "confdefs.h"
1571#include <sys/types.h>
1572#if STDC_HEADERS
1573#include <stdlib.h>
1574#include <stddef.h>
1575#endif
1576EOF
1577if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1578 egrep "pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
1579 rm -rf conftest*
1580 ac_cv_type_pid_t=yes
1581else
1582 rm -rf conftest*
1583 ac_cv_type_pid_t=no
1584fi
1585rm -f conftest*
1586
1587fi
1588echo "$ac_t""$ac_cv_type_pid_t" 1>&6
1589if test $ac_cv_type_pid_t = no; then
1590 cat >> confdefs.h <<\EOF
1591#define pid_t int
1592EOF
1593
1594fi
1595
1596ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'`
1597echo $ac_n "checking for vfork.h""... $ac_c" 1>&6
1d371d35 1598echo "configure:1599: checking for vfork.h" >&5
33106b60
ILT
1599if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1600 echo $ac_n "(cached) $ac_c" 1>&6
1601else
1602 cat > conftest.$ac_ext <<EOF
1d371d35 1603#line 1604 "configure"
33106b60
ILT
1604#include "confdefs.h"
1605#include <vfork.h>
1606EOF
1607ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1d371d35 1608{ (eval echo configure:1609: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
33106b60
ILT
1609ac_err=`grep -v '^ *+' conftest.out`
1610if test -z "$ac_err"; then
1611 rm -rf conftest*
1612 eval "ac_cv_header_$ac_safe=yes"
1613else
1614 echo "$ac_err" >&5
1615 echo "configure: failed program was:" >&5
1616 cat conftest.$ac_ext >&5
1617 rm -rf conftest*
1618 eval "ac_cv_header_$ac_safe=no"
1619fi
1620rm -f conftest*
1621fi
1622if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1623 echo "$ac_t""yes" 1>&6
1624 cat >> confdefs.h <<\EOF
1625#define HAVE_VFORK_H 1
1626EOF
1627
1628else
1629 echo "$ac_t""no" 1>&6
1630fi
1631
1632echo $ac_n "checking for working vfork""... $ac_c" 1>&6
1d371d35 1633echo "configure:1634: checking for working vfork" >&5
33106b60
ILT
1634if eval "test \"`echo '$''{'ac_cv_func_vfork_works'+set}'`\" = set"; then
1635 echo $ac_n "(cached) $ac_c" 1>&6
1636else
1637 if test "$cross_compiling" = yes; then
1638 echo $ac_n "checking for vfork""... $ac_c" 1>&6
1d371d35 1639echo "configure:1640: checking for vfork" >&5
33106b60
ILT
1640if eval "test \"`echo '$''{'ac_cv_func_vfork'+set}'`\" = set"; then
1641 echo $ac_n "(cached) $ac_c" 1>&6
1642else
1643 cat > conftest.$ac_ext <<EOF
1d371d35 1644#line 1645 "configure"
33106b60
ILT
1645#include "confdefs.h"
1646/* System header to define __stub macros and hopefully few prototypes,
1647 which can conflict with char vfork(); below. */
1648#include <assert.h>
1649/* Override any gcc2 internal prototype to avoid an error. */
1650/* We use char because int might match the return type of a gcc2
1651 builtin and then its argument prototype would still apply. */
1652char vfork();
1653
1654int main() {
1655
1656/* The GNU C library defines this for functions which it implements
1657 to always fail with ENOSYS. Some functions are actually named
1658 something starting with __ and the normal name is an alias. */
1659#if defined (__stub_vfork) || defined (__stub___vfork)
1660choke me
1661#else
1662vfork();
1663#endif
1664
1665; return 0; }
1666EOF
1d371d35 1667if { (eval echo configure:1668: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
33106b60
ILT
1668 rm -rf conftest*
1669 eval "ac_cv_func_vfork=yes"
1670else
1671 echo "configure: failed program was:" >&5
1672 cat conftest.$ac_ext >&5
1673 rm -rf conftest*
1674 eval "ac_cv_func_vfork=no"
1675fi
1676rm -f conftest*
1677fi
1678
1679if eval "test \"`echo '$ac_cv_func_'vfork`\" = yes"; then
1680 echo "$ac_t""yes" 1>&6
1681 :
1682else
1683 echo "$ac_t""no" 1>&6
1684fi
1685
1686else
1687 cat > conftest.$ac_ext <<EOF
1d371d35 1688#line 1689 "configure"
33106b60
ILT
1689#include "confdefs.h"
1690/* Thanks to Paul Eggert for this test. */
1691#include <stdio.h>
1692#include <sys/types.h>
1693#include <sys/stat.h>
1694#ifdef HAVE_UNISTD_H
1695#include <unistd.h>
1696#endif
1697#ifdef HAVE_VFORK_H
1698#include <vfork.h>
1699#endif
1700/* On some sparc systems, changes by the child to local and incoming
1701 argument registers are propagated back to the parent.
1702 The compiler is told about this with #include <vfork.h>,
1703 but some compilers (e.g. gcc -O) don't grok <vfork.h>.
1704 Test for this by using a static variable whose address
1705 is put into a register that is clobbered by the vfork. */
1706static
1707#ifdef __cplusplus
1708sparc_address_test (int arg)
1709#else
1710sparc_address_test (arg) int arg;
1711#endif
1712{
1713 static pid_t child;
1714 if (!child) {
1715 child = vfork ();
1716 if (child < 0) {
1717 perror ("vfork");
1718 _exit(2);
1719 }
1720 if (!child) {
1721 arg = getpid();
1722 write(-1, "", 0);
1723 _exit (arg);
1724 }
1725 }
1726}
1727main() {
1728 pid_t parent = getpid ();
1729 pid_t child;
1730
1731 sparc_address_test ();
1732
1733 child = vfork ();
1734
1735 if (child == 0) {
1736 /* Here is another test for sparc vfork register problems.
1737 This test uses lots of local variables, at least
1738 as many local variables as main has allocated so far
1739 including compiler temporaries. 4 locals are enough for
1740 gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe.
1741 A buggy compiler should reuse the register of parent
1742 for one of the local variables, since it will think that
1743 parent can't possibly be used any more in this routine.
1744 Assigning to the local variable will thus munge parent
1745 in the parent process. */
1746 pid_t
1747 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
1748 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
1749 /* Convince the compiler that p..p7 are live; otherwise, it might
1750 use the same hardware register for all 8 local variables. */
1751 if (p != p1 || p != p2 || p != p3 || p != p4
1752 || p != p5 || p != p6 || p != p7)
1753 _exit(1);
1754
1755 /* On some systems (e.g. IRIX 3.3),
1756 vfork doesn't separate parent from child file descriptors.
1757 If the child closes a descriptor before it execs or exits,
1758 this munges the parent's descriptor as well.
1759 Test for this by closing stdout in the child. */
1760 _exit(close(fileno(stdout)) != 0);
1761 } else {
1762 int status;
1763 struct stat st;
1764
1765 while (wait(&status) != child)
1766 ;
1767 exit(
1768 /* Was there some problem with vforking? */
1769 child < 0
1770
1771 /* Did the child fail? (This shouldn't happen.) */
1772 || status
1773
1774 /* Did the vfork/compiler bug occur? */
1775 || parent != getpid()
1776
1777 /* Did the file descriptor bug occur? */
1778 || fstat(fileno(stdout), &st) != 0
1779 );
1780 }
1781}
1782EOF
1d371d35 1783if { (eval echo configure:1784: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
33106b60
ILT
1784then
1785 ac_cv_func_vfork_works=yes
1786else
1787 echo "configure: failed program was:" >&5
1788 cat conftest.$ac_ext >&5
1789 rm -fr conftest*
1790 ac_cv_func_vfork_works=no
1791fi
1792rm -fr conftest*
1793fi
1794
1795fi
1796
1797echo "$ac_t""$ac_cv_func_vfork_works" 1>&6
1798if test $ac_cv_func_vfork_works = no; then
1799 cat >> confdefs.h <<\EOF
1800#define vfork fork
1801EOF
1802
1803fi
1804
1805else
1806 echo $ac_n "checking for vfork""... $ac_c" 1>&6
1d371d35 1807echo "configure:1808: checking for vfork" >&5
33106b60
ILT
1808if eval "test \"`echo '$''{'ac_cv_func_vfork'+set}'`\" = set"; then
1809 echo $ac_n "(cached) $ac_c" 1>&6
1810else
1811 cat > conftest.$ac_ext <<EOF
1d371d35 1812#line 1813 "configure"
33106b60
ILT
1813#include "confdefs.h"
1814/* System header to define __stub macros and hopefully few prototypes,
1815 which can conflict with char vfork(); below. */
1816#include <assert.h>
1817/* Override any gcc2 internal prototype to avoid an error. */
1818/* We use char because int might match the return type of a gcc2
1819 builtin and then its argument prototype would still apply. */
1820char vfork();
1821
1822int main() {
1823
1824/* The GNU C library defines this for functions which it implements
1825 to always fail with ENOSYS. Some functions are actually named
1826 something starting with __ and the normal name is an alias. */
1827#if defined (__stub_vfork) || defined (__stub___vfork)
1828choke me
1829#else
1830vfork();
1831#endif
1832
1833; return 0; }
1834EOF
1d371d35 1835if { (eval echo configure:1836: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
33106b60
ILT
1836 rm -rf conftest*
1837 eval "ac_cv_func_vfork=yes"
1838else
1839 echo "configure: failed program was:" >&5
1840 cat conftest.$ac_ext >&5
1841 rm -rf conftest*
1842 eval "ac_cv_func_vfork=no"
1843fi
1844rm -f conftest*
1845fi
1846
1847if eval "test \"`echo '$ac_cv_func_'vfork`\" = yes"; then
1848 echo "$ac_t""yes" 1>&6
1849 :
1850else
1851 echo "$ac_t""no" 1>&6
1852cat >> confdefs.h <<\EOF
1853#define vfork fork
1854EOF
1855
1856fi
1857
1858fi
5ab6ca68
ILT
1859
1860echo $ac_n "checking for time_t in time.h""... $ac_c" 1>&6
1d371d35 1861echo "configure:1862: checking for time_t in time.h" >&5
5ab6ca68
ILT
1862if eval "test \"`echo '$''{'bu_cv_decl_time_t_time_h'+set}'`\" = set"; then
1863 echo $ac_n "(cached) $ac_c" 1>&6
1864else
1865 cat > conftest.$ac_ext <<EOF
1d371d35 1866#line 1867 "configure"
5ab6ca68
ILT
1867#include "confdefs.h"
1868#include <time.h>
33106b60 1869int main() {
5ab6ca68
ILT
1870time_t i;
1871; return 0; }
1872EOF
1d371d35 1873if { (eval echo configure:1874: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5ab6ca68
ILT
1874 rm -rf conftest*
1875 bu_cv_decl_time_t_time_h=yes
1876else
33106b60
ILT
1877 echo "configure: failed program was:" >&5
1878 cat conftest.$ac_ext >&5
5ab6ca68
ILT
1879 rm -rf conftest*
1880 bu_cv_decl_time_t_time_h=no
1881fi
1882rm -f conftest*
5ab6ca68 1883fi
6c18e393 1884
5ab6ca68
ILT
1885echo "$ac_t""$bu_cv_decl_time_t_time_h" 1>&6
1886if test $bu_cv_decl_time_t_time_h = yes; then
1887 cat >> confdefs.h <<\EOF
1888#define HAVE_TIME_T_IN_TIME_H 1
1889EOF
1890
1891fi
99a42820 1892
5ab6ca68 1893echo $ac_n "checking for time_t in sys/types.h""... $ac_c" 1>&6
1d371d35 1894echo "configure:1895: checking for time_t in sys/types.h" >&5
5ab6ca68
ILT
1895if eval "test \"`echo '$''{'bu_cv_decl_time_t_types_h'+set}'`\" = set"; then
1896 echo $ac_n "(cached) $ac_c" 1>&6
5a168a17 1897else
5ab6ca68 1898 cat > conftest.$ac_ext <<EOF
1d371d35 1899#line 1900 "configure"
5ab6ca68
ILT
1900#include "confdefs.h"
1901#include <sys/types.h>
33106b60 1902int main() {
5ab6ca68
ILT
1903time_t i;
1904; return 0; }
1905EOF
1d371d35 1906if { (eval echo configure:1907: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5ab6ca68
ILT
1907 rm -rf conftest*
1908 bu_cv_decl_time_t_types_h=yes
1909else
33106b60
ILT
1910 echo "configure: failed program was:" >&5
1911 cat conftest.$ac_ext >&5
5ab6ca68
ILT
1912 rm -rf conftest*
1913 bu_cv_decl_time_t_types_h=no
1914fi
1915rm -f conftest*
5ab6ca68
ILT
1916fi
1917
1918echo "$ac_t""$bu_cv_decl_time_t_types_h" 1>&6
1919if test $bu_cv_decl_time_t_types_h = yes; then
1920 cat >> confdefs.h <<\EOF
1921#define HAVE_TIME_T_IN_TYPES_H 1
1922EOF
1923
1924fi
1925
1926# Under Next 3.2 <utime.h> apparently does not define struct utimbuf
1927# by default.
1928echo $ac_n "checking for utime.h""... $ac_c" 1>&6
1d371d35 1929echo "configure:1930: checking for utime.h" >&5
5ab6ca68
ILT
1930if eval "test \"`echo '$''{'bu_cv_header_utime_h'+set}'`\" = set"; then
1931 echo $ac_n "(cached) $ac_c" 1>&6
1932else
1933 cat > conftest.$ac_ext <<EOF
1d371d35 1934#line 1935 "configure"
5ab6ca68
ILT
1935#include "confdefs.h"
1936#include <sys/types.h>
1937#ifdef HAVE_TIME_H
1938#include <time.h>
1939#endif
1940#include <utime.h>
33106b60 1941int main() {
5ab6ca68
ILT
1942struct utimbuf s;
1943; return 0; }
1944EOF
1d371d35 1945if { (eval echo configure:1946: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5ab6ca68
ILT
1946 rm -rf conftest*
1947 bu_cv_header_utime_h=yes
1948else
33106b60
ILT
1949 echo "configure: failed program was:" >&5
1950 cat conftest.$ac_ext >&5
5ab6ca68
ILT
1951 rm -rf conftest*
1952 bu_cv_header_utime_h=no
1953fi
1954rm -f conftest*
5ab6ca68
ILT
1955fi
1956
1957echo "$ac_t""$bu_cv_header_utime_h" 1>&6
1958if test $bu_cv_header_utime_h = yes; then
1959 cat >> confdefs.h <<\EOF
1960#define HAVE_GOOD_UTIME_H 1
1961EOF
1962
5a168a17
RP
1963fi
1964
5ab6ca68 1965echo $ac_n "checking whether fprintf must be declared""... $ac_c" 1>&6
1d371d35 1966echo "configure:1967: checking whether fprintf must be declared" >&5
53fb794b 1967if eval "test \"`echo '$''{'bfd_cv_decl_needed_fprintf'+set}'`\" = set"; then
5ab6ca68
ILT
1968 echo $ac_n "(cached) $ac_c" 1>&6
1969else
1970 cat > conftest.$ac_ext <<EOF
1d371d35 1971#line 1972 "configure"
5ab6ca68 1972#include "confdefs.h"
53fb794b 1973
5ab6ca68 1974#include <stdio.h>
33106b60
ILT
1975#ifdef HAVE_STRING_H
1976#include <string.h>
1977#else
1978#ifdef HAVE_STRINGS_H
1979#include <strings.h>
1980#endif
1981#endif
53fb794b
ILT
1982#ifdef HAVE_STDLIB_H
1983#include <stdlib.h>
1984#endif
1985#ifdef HAVE_UNISTD_H
1986#include <unistd.h>
1987#endif
33106b60 1988int main() {
53fb794b 1989char *(*pfn) = (char *(*)) fprintf
5ab6ca68
ILT
1990; return 0; }
1991EOF
1d371d35 1992if { (eval echo configure:1993: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5ab6ca68 1993 rm -rf conftest*
53fb794b 1994 bfd_cv_decl_needed_fprintf=no
5ab6ca68 1995else
33106b60
ILT
1996 echo "configure: failed program was:" >&5
1997 cat conftest.$ac_ext >&5
5ab6ca68 1998 rm -rf conftest*
53fb794b 1999 bfd_cv_decl_needed_fprintf=yes
5ab6ca68
ILT
2000fi
2001rm -f conftest*
5ab6ca68
ILT
2002fi
2003
53fb794b
ILT
2004echo "$ac_t""$bfd_cv_decl_needed_fprintf" 1>&6
2005if test $bfd_cv_decl_needed_fprintf = yes; then
2006 bfd_tr_decl=NEED_DECLARATION_`echo fprintf | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2007 cat >> confdefs.h <<EOF
2008#define $bfd_tr_decl 1
5ab6ca68
ILT
2009EOF
2010
2011fi
2012
33106b60 2013echo $ac_n "checking whether strstr must be declared""... $ac_c" 1>&6
1d371d35 2014echo "configure:2015: checking whether strstr must be declared" >&5
33106b60
ILT
2015if eval "test \"`echo '$''{'bfd_cv_decl_needed_strstr'+set}'`\" = set"; then
2016 echo $ac_n "(cached) $ac_c" 1>&6
2017else
2018 cat > conftest.$ac_ext <<EOF
1d371d35 2019#line 2020 "configure"
33106b60
ILT
2020#include "confdefs.h"
2021
2022#include <stdio.h>
2023#ifdef HAVE_STRING_H
2024#include <string.h>
2025#else
2026#ifdef HAVE_STRINGS_H
2027#include <strings.h>
2028#endif
2029#endif
2030#ifdef HAVE_STDLIB_H
2031#include <stdlib.h>
2032#endif
2033#ifdef HAVE_UNISTD_H
2034#include <unistd.h>
2035#endif
2036int main() {
2037char *(*pfn) = (char *(*)) strstr
2038; return 0; }
2039EOF
1d371d35 2040if { (eval echo configure:2041: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
33106b60
ILT
2041 rm -rf conftest*
2042 bfd_cv_decl_needed_strstr=no
2043else
2044 echo "configure: failed program was:" >&5
2045 cat conftest.$ac_ext >&5
2046 rm -rf conftest*
2047 bfd_cv_decl_needed_strstr=yes
2048fi
2049rm -f conftest*
2050fi
2051
2052echo "$ac_t""$bfd_cv_decl_needed_strstr" 1>&6
2053if test $bfd_cv_decl_needed_strstr = yes; then
2054 bfd_tr_decl=NEED_DECLARATION_`echo strstr | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2055 cat >> confdefs.h <<EOF
2056#define $bfd_tr_decl 1
2057EOF
2058
2059fi
2060
2061echo $ac_n "checking whether sbrk must be declared""... $ac_c" 1>&6
1d371d35 2062echo "configure:2063: checking whether sbrk must be declared" >&5
33106b60
ILT
2063if eval "test \"`echo '$''{'bfd_cv_decl_needed_sbrk'+set}'`\" = set"; then
2064 echo $ac_n "(cached) $ac_c" 1>&6
2065else
2066 cat > conftest.$ac_ext <<EOF
1d371d35 2067#line 2068 "configure"
33106b60
ILT
2068#include "confdefs.h"
2069
2070#include <stdio.h>
2071#ifdef HAVE_STRING_H
2072#include <string.h>
2073#else
2074#ifdef HAVE_STRINGS_H
2075#include <strings.h>
2076#endif
2077#endif
2078#ifdef HAVE_STDLIB_H
2079#include <stdlib.h>
2080#endif
2081#ifdef HAVE_UNISTD_H
2082#include <unistd.h>
2083#endif
2084int main() {
2085char *(*pfn) = (char *(*)) sbrk
2086; return 0; }
2087EOF
1d371d35 2088if { (eval echo configure:2089: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
33106b60
ILT
2089 rm -rf conftest*
2090 bfd_cv_decl_needed_sbrk=no
2091else
2092 echo "configure: failed program was:" >&5
2093 cat conftest.$ac_ext >&5
2094 rm -rf conftest*
2095 bfd_cv_decl_needed_sbrk=yes
2096fi
2097rm -f conftest*
2098fi
2099
2100echo "$ac_t""$bfd_cv_decl_needed_sbrk" 1>&6
2101if test $bfd_cv_decl_needed_sbrk = yes; then
2102 bfd_tr_decl=NEED_DECLARATION_`echo sbrk | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2103 cat >> confdefs.h <<EOF
2104#define $bfd_tr_decl 1
2105EOF
2106
2107fi
2108
2109echo $ac_n "checking whether getenv must be declared""... $ac_c" 1>&6
1d371d35 2110echo "configure:2111: checking whether getenv must be declared" >&5
33106b60
ILT
2111if eval "test \"`echo '$''{'bfd_cv_decl_needed_getenv'+set}'`\" = set"; then
2112 echo $ac_n "(cached) $ac_c" 1>&6
2113else
2114 cat > conftest.$ac_ext <<EOF
1d371d35 2115#line 2116 "configure"
33106b60
ILT
2116#include "confdefs.h"
2117
2118#include <stdio.h>
2119#ifdef HAVE_STRING_H
2120#include <string.h>
2121#else
2122#ifdef HAVE_STRINGS_H
2123#include <strings.h>
2124#endif
2125#endif
2126#ifdef HAVE_STDLIB_H
2127#include <stdlib.h>
2128#endif
2129#ifdef HAVE_UNISTD_H
2130#include <unistd.h>
2131#endif
2132int main() {
2133char *(*pfn) = (char *(*)) getenv
2134; return 0; }
2135EOF
1d371d35 2136if { (eval echo configure:2137: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
33106b60
ILT
2137 rm -rf conftest*
2138 bfd_cv_decl_needed_getenv=no
2139else
2140 echo "configure: failed program was:" >&5
2141 cat conftest.$ac_ext >&5
2142 rm -rf conftest*
2143 bfd_cv_decl_needed_getenv=yes
2144fi
2145rm -f conftest*
2146fi
2147
2148echo "$ac_t""$bfd_cv_decl_needed_getenv" 1>&6
2149if test $bfd_cv_decl_needed_getenv = yes; then
2150 bfd_tr_decl=NEED_DECLARATION_`echo getenv | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2151 cat >> confdefs.h <<EOF
2152#define $bfd_tr_decl 1
2153EOF
2154
2155fi
2156
53fb794b
ILT
2157
2158
5ab6ca68 2159case "${host}" in
33106b60 2160i[345]86-*-msdos* | i[345]86-*-go32* | *-*-cygwin32 | *-*-windows)
5ab6ca68
ILT
2161 cat >> confdefs.h <<\EOF
2162#define USE_BINARY_FOPEN 1
2163EOF
2164 ;;
2165esac
2166
2167# target-specific stuff:
2168
2169# Canonicalize the secondary target names.
5ab6ca68
ILT
2170if test -n "$enable_targets"; then
2171 for targ in `echo $enable_targets | sed 's/,/ /g'`
2172 do
1d371d35 2173 result=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $targ 2>/dev/null`
5ab6ca68
ILT
2174 if test -n "$result"; then
2175 canon_targets="$canon_targets $result"
2176 else
2177 # Allow targets that config.sub doesn't recognize, like "all".
2178 canon_targets="$canon_targets $targ"
4101d868 2179 fi
5ab6ca68 2180 done
5ab6ca68 2181fi
99a42820 2182
5ab6ca68
ILT
2183all_targets=false
2184BUILD_NLMCONV=
2185NLMCONV_DEFS=
2186BUILD_SRCONV=
2187BUILD_DLLTOOL=
2188DLLTOOL_DEFS=
1d371d35 2189BUILD_WINDRES=
5ab6ca68
ILT
2190
2191for targ in $target $canon_targets
2192do
2193 if test "x$targ" = "xall"; then
2194 all_targets=true
2195 BUILD_NLMCONV='$(NLMCONV_PROG)'
2196 BUILD_SRCONV='$(SRCONV_PROG)'
2197 NLMCONV_DEFS="-DNLMCONV_I386 -DNLMCONV_ALPHA -DNLMCONV_POWERPC -DNLMCONV_SPARC"
2198 else
2199 case $targ in
33106b60 2200 i[3456]86*-*-netware*)
5ab6ca68
ILT
2201 BUILD_NLMCONV='$(NLMCONV_PROG)'
2202 NLMCONV_DEFS="$NLMCONV_DEFS -DNLMCONV_I386"
2203 ;;
2204 alpha*-*-netware*)
2205 BUILD_NLMCONV='$(NLMCONV_PROG)'
2206 NLMCONV_DEFS="$NLMCONV_DEFS -DNLMCONV_ALPHA"
2207 ;;
2208 powerpc*-*-netware*)
2209 BUILD_NLMCONV='$(NLMCONV_PROG)'
2210 NLMCONV_DEFS="$NLMCONV_DEFS -DNLMCONV_POWERPC"
2211 ;;
2212 sparc*-*-netware*)
2213 BUILD_NLMCONV='$(NLMCONV_PROG)'
2214 NLMCONV_DEFS="$NLMCONV_DEFS -DNLMCONV_SPARC"
2215 ;;
2216 esac
2217 case $targ in
2218 *-*-hms*) BUILD_SRCONV='$(SRCONV_PROG)' ;;
2219 esac
2220 case $targ in
2221 arm-*pe*)
2222 BUILD_DLLTOOL='$(DLLTOOL_PROG)'
2223 DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_ARM"
1d371d35 2224 BUILD_WINDRES='$(WINDRES_PROG)'
5ab6ca68 2225 ;;
904fe36b 2226 i[3-6]86-*pe* | i[3-6]86-*-cygwin32)
5ab6ca68
ILT
2227 BUILD_DLLTOOL='$(DLLTOOL_PROG)'
2228 DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_I386"
1d371d35 2229 BUILD_WINDRES='$(WINDRES_PROG)'
5ab6ca68 2230 ;;
904fe36b 2231 powerpc*-*-*pe* | powerpc*-*-cygwin32)
53fb794b
ILT
2232 BUILD_DLLTOOL='$(DLLTOOL_PROG)'
2233 DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_PPC"
1d371d35 2234 BUILD_WINDRES='$(WINDRES_PROG)'
53fb794b 2235 ;;
5ab6ca68
ILT
2236 esac
2237 fi
2238done
2239
2240
2241
2242
2243
2244
2245
1d371d35 2246
5ab6ca68
ILT
2247targ=$target
2248. $srcdir/../bfd/config.bfd
2249if test "x$targ_underscore" = "xyes"; then
2250 UNDERSCORE=1
2251else
2252 UNDERSCORE=0
2253fi
2254
2255
2256trap '' 1 2 15
2257cat > confcache <<\EOF
2258# This file is a shell script that caches the results of configure
2259# tests run on this system so they can be shared between configure
2260# scripts and configure runs. It is not useful on other systems.
2261# If it contains results you don't want to keep, you may remove or edit it.
2262#
2263# By default, configure uses ./config.cache as the cache file,
2264# creating it if it does not exist already. You can give configure
2265# the --cache-file=FILE option to use a different cache file; that is
2266# what configure does when it calls configure scripts in
2267# subdirectories, so they share the cache.
2268# Giving --cache-file=/dev/null disables caching, for debugging configure.
2269# config.status only pays attention to the cache file if you give it the
2270# --recheck option to rerun configure.
2271#
2272EOF
33106b60
ILT
2273# The following way of writing the cache mishandles newlines in values,
2274# but we know of no workaround that is simple, portable, and efficient.
2275# So, don't put newlines in cache variables' values.
5ab6ca68
ILT
2276# Ultrix sh set writes to stderr and can't be redirected directly,
2277# and sets the high bit in the cache file unless we assign to the vars.
2278(set) 2>&1 |
33106b60
ILT
2279 case `(ac_space=' '; set) 2>&1` in
2280 *ac_space=\ *)
2281 # `set' does not quote correctly, so add quotes (double-quote substitution
2282 # turns \\\\ into \\, and sed turns \\ into \).
2283 sed -n \
2284 -e "s/'/'\\\\''/g" \
2285 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
2286 ;;
2287 *)
2288 # `set' quotes correctly as required by POSIX, so do not add quotes.
2289 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
2290 ;;
2291 esac >> confcache
5ab6ca68
ILT
2292if cmp -s $cache_file confcache; then
2293 :
2294else
2295 if test -w $cache_file; then
2296 echo "updating cache $cache_file"
2297 cat confcache > $cache_file
2298 else
2299 echo "not updating unwritable cache $cache_file"
2300 fi
2301fi
2302rm -f confcache
2303
2304trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
2305
2306test "x$prefix" = xNONE && prefix=$ac_default_prefix
2307# Let make expand exec_prefix.
2308test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
2309
2310# Any assignment to VPATH causes Sun make to only execute
2311# the first set of double-colon rules, so remove it if not needed.
2312# If there is a colon in the path, we need to keep it.
2313if test "x$srcdir" = x.; then
2314 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
2315fi
2316
2317trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
2318
2319DEFS=-DHAVE_CONFIG_H
2320
2321# Without the "./", some shells look in PATH for config.status.
2322: ${CONFIG_STATUS=./config.status}
2323
2324echo creating $CONFIG_STATUS
2325rm -f $CONFIG_STATUS
2326cat > $CONFIG_STATUS <<EOF
2327#! /bin/sh
2328# Generated automatically by configure.
2329# Run this file to recreate the current configuration.
2330# This directory was configured as follows,
2331# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
b5132a6b 2332#
5ab6ca68 2333# $0 $ac_configure_args
b5132a6b 2334#
5ab6ca68
ILT
2335# Compiler output produced by configure, useful for debugging
2336# configure, is in ./config.log if it exists.
2337
2338ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
2339for ac_option
2340do
2341 case "\$ac_option" in
2342 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
2343 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
2344 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
2345 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
33106b60 2346 echo "$CONFIG_STATUS generated by autoconf version 2.12"
5ab6ca68
ILT
2347 exit 0 ;;
2348 -help | --help | --hel | --he | --h)
2349 echo "\$ac_cs_usage"; exit 0 ;;
2350 *) echo "\$ac_cs_usage"; exit 1 ;;
2351 esac
2352done
2353
2354ac_given_srcdir=$srcdir
2355ac_given_INSTALL="$INSTALL"
2356
320d4f29 2357trap 'rm -fr `echo "Makefile config.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
626a6542
SC
2358EOF
2359cat >> $CONFIG_STATUS <<EOF
5ab6ca68 2360
626a6542
SC
2361# Protect against being on the right side of a sed subst in config.status.
2362sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
2363 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
5ab6ca68
ILT
2364$ac_vpsub
2365$extrasub
2366s%@CFLAGS@%$CFLAGS%g
2367s%@CPPFLAGS@%$CPPFLAGS%g
2368s%@CXXFLAGS@%$CXXFLAGS%g
2369s%@DEFS@%$DEFS%g
2370s%@LDFLAGS@%$LDFLAGS%g
2371s%@LIBS@%$LIBS%g
2372s%@exec_prefix@%$exec_prefix%g
2373s%@prefix@%$prefix%g
2374s%@program_transform_name@%$program_transform_name%g
626a6542
SC
2375s%@bindir@%$bindir%g
2376s%@sbindir@%$sbindir%g
2377s%@libexecdir@%$libexecdir%g
2378s%@datadir@%$datadir%g
2379s%@sysconfdir@%$sysconfdir%g
2380s%@sharedstatedir@%$sharedstatedir%g
2381s%@localstatedir@%$localstatedir%g
2382s%@libdir@%$libdir%g
2383s%@includedir@%$includedir%g
2384s%@oldincludedir@%$oldincludedir%g
2385s%@infodir@%$infodir%g
2386s%@mandir@%$mandir%g
5ab6ca68
ILT
2387s%@host@%$host%g
2388s%@host_alias@%$host_alias%g
2389s%@host_cpu@%$host_cpu%g
2390s%@host_vendor@%$host_vendor%g
2391s%@host_os@%$host_os%g
2392s%@target@%$target%g
2393s%@target_alias@%$target_alias%g
2394s%@target_cpu@%$target_cpu%g
2395s%@target_vendor@%$target_vendor%g
2396s%@target_os@%$target_os%g
2397s%@build@%$build%g
2398s%@build_alias@%$build_alias%g
2399s%@build_cpu@%$build_cpu%g
2400s%@build_vendor@%$build_vendor%g
2401s%@build_os@%$build_os%g
2402s%@CC@%$CC%g
2403s%@HDEFINES@%$HDEFINES%g
36fb98be 2404s%@HLDFLAGS@%$HLDFLAGS%g
33106b60 2405s%@HLDENV@%$HLDENV%g
efa86453 2406s%@RPATH_ENVVAR@%$RPATH_ENVVAR%g
5ab6ca68
ILT
2407s%@AR@%$AR%g
2408s%@RANLIB@%$RANLIB%g
2409s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
2410s%@INSTALL_DATA@%$INSTALL_DATA%g
36fb98be
ILT
2411s%@BFDLIB@%$BFDLIB%g
2412s%@OPCODES@%$OPCODES%g
320d4f29 2413s%@CC_FOR_BUILD@%$CC_FOR_BUILD%g
5ab6ca68 2414s%@CPP@%$CPP%g
33106b60 2415s%@ALLOCA@%$ALLOCA%g
5ab6ca68
ILT
2416s%@NLMCONV_DEFS@%$NLMCONV_DEFS%g
2417s%@BUILD_NLMCONV@%$BUILD_NLMCONV%g
2418s%@BUILD_SRCONV@%$BUILD_SRCONV%g
2419s%@BUILD_DLLTOOL@%$BUILD_DLLTOOL%g
2420s%@DLLTOOL_DEFS@%$DLLTOOL_DEFS%g
1d371d35 2421s%@BUILD_WINDRES@%$BUILD_WINDRES%g
5ab6ca68
ILT
2422s%@UNDERSCORE@%$UNDERSCORE%g
2423
2424CEOF
2425EOF
33106b60
ILT
2426
2427cat >> $CONFIG_STATUS <<\EOF
2428
2429# Split the substitutions into bite-sized pieces for seds with
2430# small command number limits, like on Digital OSF/1 and HP-UX.
2431ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
2432ac_file=1 # Number of current file.
2433ac_beg=1 # First line for current file.
2434ac_end=$ac_max_sed_cmds # Line after last line for current file.
2435ac_more_lines=:
2436ac_sed_cmds=""
2437while $ac_more_lines; do
2438 if test $ac_beg -gt 1; then
2439 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
2440 else
2441 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
2442 fi
2443 if test ! -s conftest.s$ac_file; then
2444 ac_more_lines=false
2445 rm -f conftest.s$ac_file
2446 else
2447 if test -z "$ac_sed_cmds"; then
2448 ac_sed_cmds="sed -f conftest.s$ac_file"
2449 else
2450 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
2451 fi
2452 ac_file=`expr $ac_file + 1`
2453 ac_beg=$ac_end
2454 ac_end=`expr $ac_end + $ac_max_sed_cmds`
2455 fi
2456done
2457if test -z "$ac_sed_cmds"; then
2458 ac_sed_cmds=cat
2459fi
2460EOF
2461
5ab6ca68
ILT
2462cat >> $CONFIG_STATUS <<EOF
2463
2464CONFIG_FILES=\${CONFIG_FILES-"Makefile"}
2465EOF
2466cat >> $CONFIG_STATUS <<\EOF
2467for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
33106b60 2468 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
5ab6ca68 2469 case "$ac_file" in
33106b60 2470 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
5ab6ca68
ILT
2471 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
2472 *) ac_file_in="${ac_file}.in" ;;
2473 esac
2474
33106b60 2475 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
5ab6ca68
ILT
2476
2477 # Remove last slash and all that follows it. Not all systems have dirname.
2478 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
2479 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
2480 # The file is in a subdirectory.
2481 test ! -d "$ac_dir" && mkdir "$ac_dir"
2482 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
2483 # A "../" for each directory in $ac_dir_suffix.
2484 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
2485 else
2486 ac_dir_suffix= ac_dots=
2487 fi
2488
2489 case "$ac_given_srcdir" in
2490 .) srcdir=.
2491 if test -z "$ac_dots"; then top_srcdir=.
2492 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
2493 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
2494 *) # Relative path.
2495 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
2496 top_srcdir="$ac_dots$ac_given_srcdir" ;;
2497 esac
2498
2499 case "$ac_given_INSTALL" in
2500 [/$]*) INSTALL="$ac_given_INSTALL" ;;
2501 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
2502 esac
33106b60 2503
5ab6ca68
ILT
2504 echo creating "$ac_file"
2505 rm -f "$ac_file"
2506 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
2507 case "$ac_file" in
2508 *Makefile*) ac_comsub="1i\\
2509# $configure_input" ;;
2510 *) ac_comsub= ;;
2511 esac
33106b60
ILT
2512
2513 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
5ab6ca68
ILT
2514 sed -e "$ac_comsub
2515s%@configure_input@%$configure_input%g
2516s%@srcdir@%$srcdir%g
2517s%@top_srcdir@%$top_srcdir%g
2518s%@INSTALL@%$INSTALL%g
33106b60 2519" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
5ab6ca68 2520fi; done
33106b60 2521rm -f conftest.s*
5ab6ca68
ILT
2522
2523# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
2524# NAME is the cpp macro being defined and VALUE is the value it is being given.
2525#
2526# ac_d sets the value in "#define NAME VALUE" lines.
2527ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
2528ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
2529ac_dC='\3'
2530ac_dD='%g'
2531# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
2532ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
2533ac_uB='\([ ]\)%\1#\2define\3'
2534ac_uC=' '
2535ac_uD='\4%g'
2536# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
2537ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
2538ac_eB='$%\1#\2define\3'
2539ac_eC=' '
2540ac_eD='%g'
2541
33106b60
ILT
2542if test "${CONFIG_HEADERS+set}" != set; then
2543EOF
2544cat >> $CONFIG_STATUS <<EOF
2545 CONFIG_HEADERS="config.h:config.in"
2546EOF
2547cat >> $CONFIG_STATUS <<\EOF
2548fi
5ab6ca68 2549for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
33106b60 2550 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
5ab6ca68 2551 case "$ac_file" in
33106b60 2552 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
5ab6ca68
ILT
2553 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
2554 *) ac_file_in="${ac_file}.in" ;;
2555 esac
2556
2557 echo creating $ac_file
2558
2559 rm -f conftest.frag conftest.in conftest.out
33106b60
ILT
2560 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
2561 cat $ac_file_inputs > conftest.in
5ab6ca68
ILT
2562
2563EOF
2564
2565# Transform confdefs.h into a sed script conftest.vals that substitutes
2566# the proper values into config.h.in to produce config.h. And first:
626a6542 2567# Protect against being on the right side of a sed subst in config.status.
5ab6ca68
ILT
2568# Protect against being in an unquoted here document in config.status.
2569rm -f conftest.vals
2570cat > conftest.hdr <<\EOF
2571s/[\\&%]/\\&/g
2572s%[\\$`]%\\&%g
33106b60 2573s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
5ab6ca68
ILT
2574s%ac_d%ac_u%gp
2575s%ac_u%ac_e%gp
2576EOF
2577sed -n -f conftest.hdr confdefs.h > conftest.vals
2578rm -f conftest.hdr
2579
2580# This sed command replaces #undef with comments. This is necessary, for
2581# example, in the case of _POSIX_SOURCE, which is predefined and required
2582# on some systems where configure will not decide to define it.
2583cat >> conftest.vals <<\EOF
2584s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
2585EOF
2586
2587# Break up conftest.vals because some shells have a limit on
2588# the size of here documents, and old seds have small limits too.
5ab6ca68
ILT
2589
2590rm -f conftest.tail
2591while :
2592do
2593 ac_lines=`grep -c . conftest.vals`
2594 # grep -c gives empty output for an empty file on some AIX systems.
2595 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
2596 # Write a limited-size here document to conftest.frag.
2597 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
2598 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
2599 echo 'CEOF
2600 sed -f conftest.frag conftest.in > conftest.out
2601 rm -f conftest.in
2602 mv conftest.out conftest.in
2603' >> $CONFIG_STATUS
2604 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
2605 rm -f conftest.vals
2606 mv conftest.tail conftest.vals
2607done
2608rm -f conftest.vals
2609
2610cat >> $CONFIG_STATUS <<\EOF
2611 rm -f conftest.frag conftest.h
2612 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
2613 cat conftest.in >> conftest.h
2614 rm -f conftest.in
2615 if cmp -s $ac_file conftest.h 2>/dev/null; then
2616 echo "$ac_file is unchanged"
2617 rm -f conftest.h
2618 else
33106b60
ILT
2619 # Remove last slash and all that follows it. Not all systems have dirname.
2620 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
2621 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
2622 # The file is in a subdirectory.
2623 test ! -d "$ac_dir" && mkdir "$ac_dir"
2624 fi
5ab6ca68
ILT
2625 rm -f $ac_file
2626 mv conftest.h $ac_file
2627 fi
2628fi; done
2629
33106b60
ILT
2630EOF
2631cat >> $CONFIG_STATUS <<EOF
5ab6ca68 2632
33106b60
ILT
2633EOF
2634cat >> $CONFIG_STATUS <<\EOF
320d4f29 2635case x$CONFIG_HEADERS in xconfig.h:config.in) echo > stamp-h ;; esac
5ab6ca68
ILT
2636exit 0
2637EOF
2638chmod +x $CONFIG_STATUS
2639rm -fr confdefs* $ac_clean_files
2640test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
a10d26a1 2641
This page took 0.30742 seconds and 4 git commands to generate.