First stab at Windows resource compiler:
[binutils-gdb.git] / binutils / configure
1 #! /bin/sh
2
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated automatically using autoconf version 2.12
5 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
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:
11 ac_help=
12 ac_default_prefix=/usr/local
13 # Any additions from configure.in:
14 ac_help="$ac_help
15 --enable-targets alternative target configurations"
16 ac_help="$ac_help
17 --enable-shared build shared BFD library"
18 ac_help="$ac_help
19 --enable-commonbfdlib build shared BFD/opcodes/libiberty library"
20
21 # Initialize some variables set by options.
22 # The variables have the same names as the options, with
23 # dashes changed to underlines.
24 build=NONE
25 cache_file=./config.cache
26 exec_prefix=NONE
27 host=NONE
28 no_create=
29 nonopt=NONE
30 no_recursion=
31 prefix=NONE
32 program_prefix=NONE
33 program_suffix=NONE
34 program_transform_name=s,x,x,
35 silent=
36 site=
37 srcdir=
38 target=NONE
39 verbose=
40 x_includes=NONE
41 x_libraries=NONE
42 bindir='${exec_prefix}/bin'
43 sbindir='${exec_prefix}/sbin'
44 libexecdir='${exec_prefix}/libexec'
45 datadir='${prefix}/share'
46 sysconfdir='${prefix}/etc'
47 sharedstatedir='${prefix}/com'
48 localstatedir='${prefix}/var'
49 libdir='${exec_prefix}/lib'
50 includedir='${prefix}/include'
51 oldincludedir='/usr/include'
52 infodir='${prefix}/info'
53 mandir='${prefix}/man'
54
55 # Initialize some other variables.
56 subdirs=
57 MFLAGS= MAKEFLAGS=
58 # Maximum number of lines to put in a shell here document.
59 ac_max_here_lines=12
60
61 ac_prev=
62 for ac_option
63 do
64
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
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)
87 ac_prev=build ;;
88 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
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
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
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
143 Usage: configure [options] [host]
144 Options: [defaults in brackets after descriptions]
145 Configuration:
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
151 Directory and file names:
152 --prefix=PREFIX install architecture-independent files in PREFIX
153 [$ac_default_prefix]
154 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
155 [same as prefix]
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]
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
173 --program-transform-name=PROGRAM
174 run sed PROGRAM on installed program names
175 EOF
176 cat << EOF
177 Host 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]
181 Features 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
188 EOF
189 if test -n "$ac_help"; then
190 echo "--enable and --with options recognized:$ac_help"
191 fi
192 exit 0 ;;
193
194 -host | --host | --hos | --ho)
195 ac_prev=host ;;
196 -host=* | --host=* | --hos=* | --ho=*)
197 host="$ac_optarg" ;;
198
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
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
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
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
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
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
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
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)
341 echo "configure generated by autoconf version 2.12"
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
387 *)
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
398 done
399
400 if test -n "$ac_prev"; then
401 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
402 fi
403
404 trap '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
414 if test "$silent" = yes; then
415 exec 6>/dev/null
416 else
417 exec 6>&1
418 fi
419 exec 5>./config.log
420
421 echo "\
422 This file contains any messages produced by compilers while
423 running 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.
428 ac_configure_args=
429 for ac_arg
430 do
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
440 done
441
442 # NLS nuisances.
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.
447 if test "${LANG+set}" = set; then LANG=C; export LANG; fi
448 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
449 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
450 if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
451
452 # confdefs.h avoids OS command line length limits that DEFS can exceed.
453 rm -rf conftest* confdefs.h
454 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
455 echo > 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.
459 ac_unique_file=ar.c
460
461 # Find the source files, if location was not specified.
462 if 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
472 else
473 ac_srcdir_defaulted=no
474 fi
475 if 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
481 fi
482 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
483
484 # Prefer explicitly selected file to automatically selected ones.
485 if 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
491 fi
492 for 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
497 done
498
499 if test -r "$cache_file"; then
500 echo "loading cache $cache_file"
501 . $cache_file
502 else
503 echo "creating cache $cache_file"
504 > $cache_file
505 fi
506
507 ac_ext=c
508 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
509 ac_cpp='$CPP $CPPFLAGS'
510 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
511 ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
512 cross_compiling=$ac_cv_prog_cc_cross
513
514 if (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
522 else
523 ac_n= ac_c='\c' ac_t=
524 fi
525
526
527
528 # Check whether --enable-targets or --disable-targets was given.
529 if test "${enable_targets+set}" = set; then
530 enableval="$enable_targets"
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 ;;
536 esac
537 fi
538 # Check whether --enable-shared or --disable-shared was given.
539 if test "${enable_shared+set}" = set; then
540 enableval="$enable_shared"
541 case "${enableval}" in
542 yes) shared=true shared_bfd=true shared_opcodes=true ;;
543 no) shared=false ;;
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 ;;
549 esac
550 fi
551 # Check whether --enable-commonbfdlib or --disable-commonbfdlib was given.
552 if 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; } ;;
558 esac
559 fi
560
561
562
563 ac_aux_dir=
564 for 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
574 done
575 if 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; }
577 fi
578 ac_config_guess=$ac_aux_dir/config.guess
579 ac_config_sub=$ac_aux_dir/config.sub
580 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
581
582
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
589 # same time.
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.
598 case $host---$target---$nonopt in
599 NONE---*---* | *---NONE---* | *---*---NONE) ;;
600 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
601 esac
602
603
604 # Make sure we can run config.sub.
605 if $ac_config_sub sun4 >/dev/null 2>&1; then :
606 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
607 fi
608
609 echo $ac_n "checking host system type""... $ac_c" 1>&6
610 echo "configure:611: checking host system type" >&5
611
612 host_alias=$host
613 case "$host_alias" in
614 NONE)
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 ;;
622 esac
623
624 host=`$ac_config_sub $host_alias`
625 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
626 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
627 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
628 echo "$ac_t""$host" 1>&6
629
630 echo $ac_n "checking target system type""... $ac_c" 1>&6
631 echo "configure:632: checking target system type" >&5
632
633 target_alias=$target
634 case "$target_alias" in
635 NONE)
636 case $nonopt in
637 NONE) target_alias=$host_alias ;;
638 *) target_alias=$nonopt ;;
639 esac ;;
640 esac
641
642 target=`$ac_config_sub $target_alias`
643 target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
644 target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
645 target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
646 echo "$ac_t""$target" 1>&6
647
648 echo $ac_n "checking build system type""... $ac_c" 1>&6
649 echo "configure:650: checking build system type" >&5
650
651 build_alias=$build
652 case "$build_alias" in
653 NONE)
654 case $nonopt in
655 NONE) build_alias=$host_alias ;;
656 *) build_alias=$nonopt ;;
657 esac ;;
658 esac
659
660 build=`$ac_config_sub $build_alias`
661 build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
662 build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
663 build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
664 echo "$ac_t""$build" 1>&6
665
666 test "$host_alias" != "$target_alias" &&
667 test "$program_prefix$program_suffix$program_transform_name" = \
668 NONENONEs,x,x, &&
669 program_prefix=${target_alias}-
670
671 if test -z "$target" ; then
672 { echo "configure: error: Unrecognized target system type; please check config.sub." 1>&2; exit 1; }
673 fi
674 if test -z "$host" ; then
675 { echo "configure: error: Unrecognized host system type; please check config.sub." 1>&2; exit 1; }
676 fi
677 if test "$program_transform_name" = s,x,x,; then
678 program_transform_name=
679 else
680 # Double any \ or $. echo might interpret backslashes.
681 cat <<\EOF_SED > conftestsed
682 s,\\,\\\\,g; s,\$,$$,g
683 EOF_SED
684 program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
685 rm -f conftestsed
686 fi
687 test "$program_prefix" != NONE &&
688 program_transform_name="s,^,${program_prefix},; $program_transform_name"
689 # Use a double $ so make ignores it.
690 test "$program_suffix" != NONE &&
691 program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
692
693 # sed with no file args requires a program.
694 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
695
696
697 # host-specific stuff:
698
699 HDEFINES=
700 HLDFLAGS=
701 HLDENV=
702 RPATH_ENVVAR=LD_LIBRARY_PATH
703
704 # Extract the first word of "gcc", so it can be a program name with args.
705 set dummy gcc; ac_word=$2
706 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
707 echo "configure:708: checking for $ac_word" >&5
708 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
709 echo $ac_n "(cached) $ac_c" 1>&6
710 else
711 if test -n "$CC"; then
712 ac_cv_prog_CC="$CC" # Let the user override the test.
713 else
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"
723 fi
724 fi
725 CC="$ac_cv_prog_CC"
726 if test -n "$CC"; then
727 echo "$ac_t""$CC" 1>&6
728 else
729 echo "$ac_t""no" 1>&6
730 fi
731
732 if test -z "$CC"; then
733 # Extract the first word of "cc", so it can be a program name with args.
734 set dummy cc; ac_word=$2
735 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
736 echo "configure:737: checking for $ac_word" >&5
737 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
738 echo $ac_n "(cached) $ac_c" 1>&6
739 else
740 if test -n "$CC"; then
741 ac_cv_prog_CC="$CC" # Let the user override the test.
742 else
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"
757 if 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
770 fi
771 fi
772 fi
773 CC="$ac_cv_prog_CC"
774 if test -n "$CC"; then
775 echo "$ac_t""$CC" 1>&6
776 else
777 echo "$ac_t""no" 1>&6
778 fi
779
780 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
781 fi
782
783 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
784 echo "configure:785: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
785
786 ac_ext=c
787 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
788 ac_cpp='$CPP $CPPFLAGS'
789 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
790 ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
791 cross_compiling=$ac_cv_prog_cc_cross
792
793 cat > conftest.$ac_ext <<EOF
794 #line 795 "configure"
795 #include "confdefs.h"
796 main(){return(0);}
797 EOF
798 if { (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
806 else
807 echo "configure: failed program was:" >&5
808 cat conftest.$ac_ext >&5
809 ac_cv_prog_cc_works=no
810 fi
811 rm -fr conftest*
812
813 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
814 if 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; }
816 fi
817 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
818 echo "configure:819: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
819 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
820 cross_compiling=$ac_cv_prog_cc_cross
821
822 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
823 echo "configure:824: checking whether we are using GNU C" >&5
824 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
825 echo $ac_n "(cached) $ac_c" 1>&6
826 else
827 cat > conftest.c <<EOF
828 #ifdef __GNUC__
829 yes;
830 #endif
831 EOF
832 if { 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
833 ac_cv_prog_gcc=yes
834 else
835 ac_cv_prog_gcc=no
836 fi
837 fi
838
839 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
840
841 if test $ac_cv_prog_gcc = yes; then
842 GCC=yes
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
847 echo "configure:848: checking whether ${CC-cc} accepts -g" >&5
848 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
849 echo $ac_n "(cached) $ac_c" 1>&6
850 else
851 echo 'void f(){}' > conftest.c
852 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
853 ac_cv_prog_cc_g=yes
854 else
855 ac_cv_prog_cc_g=no
856 fi
857 rm -f conftest*
858
859 fi
860
861 echo "$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"
868 fi
869 else
870 GCC=
871 test "${CFLAGS+set}" = set || CFLAGS="-g"
872 fi
873
874
875 . ${srcdir}/../bfd/configure.host
876
877
878
879
880
881 AR=${AR-ar}
882
883 # Extract the first word of "ranlib", so it can be a program name with args.
884 set dummy ranlib; ac_word=$2
885 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
886 echo "configure:887: checking for $ac_word" >&5
887 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
888 echo $ac_n "(cached) $ac_c" 1>&6
889 else
890 if test -n "$RANLIB"; then
891 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
892 else
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=":"
903 fi
904 fi
905 RANLIB="$ac_cv_prog_RANLIB"
906 if test -n "$RANLIB"; then
907 echo "$ac_t""$RANLIB" 1>&6
908 else
909 echo "$ac_t""no" 1>&6
910 fi
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.
922 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
923 echo "configure:924: checking for a BSD compatible install" >&5
924 if test -z "$INSTALL"; then
925 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
926 echo $ac_n "(cached) $ac_c" 1>&6
927 else
928 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="${IFS}:"
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
946 fi
947 done
948 ;;
949 esac
950 done
951 IFS="$ac_save_IFS"
952
953 fi
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
963 fi
964 echo "$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.
968 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
969
970 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
971
972
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.
976 BFDLIB='-L../bfd -lbfd'
977 OPCODES='-L../opcodes -lopcodes'
978
979 case "${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
984 BFDLIB='-L../bfd -l`echo bfd | sed '"'"'$(program_transform_name)'"'"'`'
985 fi
986 if test "${shared_opcodes}" = "true"; then
987 OPCODES='-L../opcodes -l`echo opcodes | sed '"'"'$(program_transform_name)'"'"'`'
988 fi
989 ;;
990 alpha*-*-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 ;;
1005 esac
1006
1007 if test "${commonbfdlib}" = "true"; then
1008 # when a shared libbfd is built with --enable-commonbfdlib,
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
1016 fi
1017
1018
1019
1020
1021 # Put a plausible default for CC_FOR_BUILD in Makefile.
1022 if 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
1028 fi
1029
1030
1031 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
1032 echo "configure:1033: checking how to run the C preprocessor" >&5
1033 # On Suns, sometimes $CPP names a directory.
1034 if test -n "$CPP" && test -d "$CPP"; then
1035 CPP=
1036 fi
1037 if test -z "$CPP"; then
1038 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1039 echo $ac_n "(cached) $ac_c" 1>&6
1040 else
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
1047 #line 1048 "configure"
1048 #include "confdefs.h"
1049 #include <assert.h>
1050 Syntax Error
1051 EOF
1052 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1053 { (eval echo configure:1054: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1054 ac_err=`grep -v '^ *+' conftest.out`
1055 if test -z "$ac_err"; then
1056 :
1057 else
1058 echo "$ac_err" >&5
1059 echo "configure: failed program was:" >&5
1060 cat conftest.$ac_ext >&5
1061 rm -rf conftest*
1062 CPP="${CC-cc} -E -traditional-cpp"
1063 cat > conftest.$ac_ext <<EOF
1064 #line 1065 "configure"
1065 #include "confdefs.h"
1066 #include <assert.h>
1067 Syntax Error
1068 EOF
1069 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1070 { (eval echo configure:1071: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1071 ac_err=`grep -v '^ *+' conftest.out`
1072 if test -z "$ac_err"; then
1073 :
1074 else
1075 echo "$ac_err" >&5
1076 echo "configure: failed program was:" >&5
1077 cat conftest.$ac_ext >&5
1078 rm -rf conftest*
1079 CPP=/lib/cpp
1080 fi
1081 rm -f conftest*
1082 fi
1083 rm -f conftest*
1084 ac_cv_prog_CPP="$CPP"
1085 fi
1086 CPP="$ac_cv_prog_CPP"
1087 else
1088 ac_cv_prog_CPP="$CPP"
1089 fi
1090 echo "$ac_t""$CPP" 1>&6
1091
1092 for ac_hdr in string.h strings.h stdlib.h unistd.h fcntl.h sys/file.h
1093 do
1094 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1095 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1096 echo "configure:1097: checking for $ac_hdr" >&5
1097 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1098 echo $ac_n "(cached) $ac_c" 1>&6
1099 else
1100 cat > conftest.$ac_ext <<EOF
1101 #line 1102 "configure"
1102 #include "confdefs.h"
1103 #include <$ac_hdr>
1104 EOF
1105 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1106 { (eval echo configure:1107: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1107 ac_err=`grep -v '^ *+' conftest.out`
1108 if test -z "$ac_err"; then
1109 rm -rf conftest*
1110 eval "ac_cv_header_$ac_safe=yes"
1111 else
1112 echo "$ac_err" >&5
1113 echo "configure: failed program was:" >&5
1114 cat conftest.$ac_ext >&5
1115 rm -rf conftest*
1116 eval "ac_cv_header_$ac_safe=no"
1117 fi
1118 rm -f conftest*
1119 fi
1120 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1121 echo "$ac_t""yes" 1>&6
1122 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1123 cat >> confdefs.h <<EOF
1124 #define $ac_tr_hdr 1
1125 EOF
1126
1127 else
1128 echo "$ac_t""no" 1>&6
1129 fi
1130 done
1131
1132 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
1133 echo "configure:1134: checking for sys/wait.h that is POSIX.1 compatible" >&5
1134 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
1135 echo $ac_n "(cached) $ac_c" 1>&6
1136 else
1137 cat > conftest.$ac_ext <<EOF
1138 #line 1139 "configure"
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
1148 int main() {
1149 int s;
1150 wait (&s);
1151 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
1152 ; return 0; }
1153 EOF
1154 if { (eval echo configure:1155: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1155 rm -rf conftest*
1156 ac_cv_header_sys_wait_h=yes
1157 else
1158 echo "configure: failed program was:" >&5
1159 cat conftest.$ac_ext >&5
1160 rm -rf conftest*
1161 ac_cv_header_sys_wait_h=no
1162 fi
1163 rm -f conftest*
1164 fi
1165
1166 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
1167 if test $ac_cv_header_sys_wait_h = yes; then
1168 cat >> confdefs.h <<\EOF
1169 #define HAVE_SYS_WAIT_H 1
1170 EOF
1171
1172 fi
1173
1174 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
1175 # for constant arguments. Useless!
1176 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
1177 echo "configure:1178: checking for working alloca.h" >&5
1178 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
1179 echo $ac_n "(cached) $ac_c" 1>&6
1180 else
1181 cat > conftest.$ac_ext <<EOF
1182 #line 1183 "configure"
1183 #include "confdefs.h"
1184 #include <alloca.h>
1185 int main() {
1186 char *p = alloca(2 * sizeof(int));
1187 ; return 0; }
1188 EOF
1189 if { (eval echo configure:1190: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1190 rm -rf conftest*
1191 ac_cv_header_alloca_h=yes
1192 else
1193 echo "configure: failed program was:" >&5
1194 cat conftest.$ac_ext >&5
1195 rm -rf conftest*
1196 ac_cv_header_alloca_h=no
1197 fi
1198 rm -f conftest*
1199 fi
1200
1201 echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
1202 if test $ac_cv_header_alloca_h = yes; then
1203 cat >> confdefs.h <<\EOF
1204 #define HAVE_ALLOCA_H 1
1205 EOF
1206
1207 fi
1208
1209 echo $ac_n "checking for alloca""... $ac_c" 1>&6
1210 echo "configure:1211: checking for alloca" >&5
1211 if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
1212 echo $ac_n "(cached) $ac_c" 1>&6
1213 else
1214 cat > conftest.$ac_ext <<EOF
1215 #line 1216 "configure"
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 */
1228 char *alloca ();
1229 # endif
1230 # endif
1231 # endif
1232 #endif
1233
1234 int main() {
1235 char *p = (char *) alloca(1);
1236 ; return 0; }
1237 EOF
1238 if { (eval echo configure:1239: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1239 rm -rf conftest*
1240 ac_cv_func_alloca_works=yes
1241 else
1242 echo "configure: failed program was:" >&5
1243 cat conftest.$ac_ext >&5
1244 rm -rf conftest*
1245 ac_cv_func_alloca_works=no
1246 fi
1247 rm -f conftest*
1248 fi
1249
1250 echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
1251 if test $ac_cv_func_alloca_works = yes; then
1252 cat >> confdefs.h <<\EOF
1253 #define HAVE_ALLOCA 1
1254 EOF
1255
1256 fi
1257
1258 if 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
1266 EOF
1267
1268
1269 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
1270 echo "configure:1271: checking whether alloca needs Cray hooks" >&5
1271 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
1272 echo $ac_n "(cached) $ac_c" 1>&6
1273 else
1274 cat > conftest.$ac_ext <<EOF
1275 #line 1276 "configure"
1276 #include "confdefs.h"
1277 #if defined(CRAY) && ! defined(CRAY2)
1278 webecray
1279 #else
1280 wenotbecray
1281 #endif
1282
1283 EOF
1284 if (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
1288 else
1289 rm -rf conftest*
1290 ac_cv_os_cray=no
1291 fi
1292 rm -f conftest*
1293
1294 fi
1295
1296 echo "$ac_t""$ac_cv_os_cray" 1>&6
1297 if test $ac_cv_os_cray = yes; then
1298 for ac_func in _getb67 GETB67 getb67; do
1299 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1300 echo "configure:1301: checking for $ac_func" >&5
1301 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1302 echo $ac_n "(cached) $ac_c" 1>&6
1303 else
1304 cat > conftest.$ac_ext <<EOF
1305 #line 1306 "configure"
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. */
1313 char $ac_func();
1314
1315 int 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)
1321 choke me
1322 #else
1323 $ac_func();
1324 #endif
1325
1326 ; return 0; }
1327 EOF
1328 if { (eval echo configure:1329: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1329 rm -rf conftest*
1330 eval "ac_cv_func_$ac_func=yes"
1331 else
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"
1336 fi
1337 rm -f conftest*
1338 fi
1339
1340 if 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
1344 EOF
1345
1346 break
1347 else
1348 echo "$ac_t""no" 1>&6
1349 fi
1350
1351 done
1352 fi
1353
1354 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
1355 echo "configure:1356: checking stack direction for C alloca" >&5
1356 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
1357 echo $ac_n "(cached) $ac_c" 1>&6
1358 else
1359 if test "$cross_compiling" = yes; then
1360 ac_cv_c_stack_direction=0
1361 else
1362 cat > conftest.$ac_ext <<EOF
1363 #line 1364 "configure"
1364 #include "confdefs.h"
1365 find_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 }
1377 main ()
1378 {
1379 exit (find_stack_direction() < 0);
1380 }
1381 EOF
1382 if { (eval echo configure:1383: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
1383 then
1384 ac_cv_c_stack_direction=1
1385 else
1386 echo "configure: failed program was:" >&5
1387 cat conftest.$ac_ext >&5
1388 rm -fr conftest*
1389 ac_cv_c_stack_direction=-1
1390 fi
1391 rm -fr conftest*
1392 fi
1393
1394 fi
1395
1396 echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
1397 cat >> confdefs.h <<EOF
1398 #define STACK_DIRECTION $ac_cv_c_stack_direction
1399 EOF
1400
1401 fi
1402
1403 for ac_func in sbrk utimes
1404 do
1405 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1406 echo "configure:1407: checking for $ac_func" >&5
1407 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1408 echo $ac_n "(cached) $ac_c" 1>&6
1409 else
1410 cat > conftest.$ac_ext <<EOF
1411 #line 1412 "configure"
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. */
1417 /* We use char because int might match the return type of a gcc2
1418 builtin and then its argument prototype would still apply. */
1419 char $ac_func();
1420
1421 int main() {
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)
1427 choke me
1428 #else
1429 $ac_func();
1430 #endif
1431
1432 ; return 0; }
1433 EOF
1434 if { (eval echo configure:1435: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1435 rm -rf conftest*
1436 eval "ac_cv_func_$ac_func=yes"
1437 else
1438 echo "configure: failed program was:" >&5
1439 cat conftest.$ac_ext >&5
1440 rm -rf conftest*
1441 eval "ac_cv_func_$ac_func=no"
1442 fi
1443 rm -f conftest*
1444 fi
1445
1446 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1447 echo "$ac_t""yes" 1>&6
1448 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1449 cat >> confdefs.h <<EOF
1450 #define $ac_tr_func 1
1451 EOF
1452
1453 else
1454 echo "$ac_t""no" 1>&6
1455 fi
1456 done
1457
1458 if test "x$cross_compiling" = "xno"; then
1459 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
1460 echo "configure:1461: checking for ANSI C header files" >&5
1461 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1462 echo $ac_n "(cached) $ac_c" 1>&6
1463 else
1464 cat > conftest.$ac_ext <<EOF
1465 #line 1466 "configure"
1466 #include "confdefs.h"
1467 #include <stdlib.h>
1468 #include <stdarg.h>
1469 #include <string.h>
1470 #include <float.h>
1471 EOF
1472 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1473 { (eval echo configure:1474: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1474 ac_err=`grep -v '^ *+' conftest.out`
1475 if test -z "$ac_err"; then
1476 rm -rf conftest*
1477 ac_cv_header_stdc=yes
1478 else
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
1484 fi
1485 rm -f conftest*
1486
1487 if test $ac_cv_header_stdc = yes; then
1488 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1489 cat > conftest.$ac_ext <<EOF
1490 #line 1491 "configure"
1491 #include "confdefs.h"
1492 #include <string.h>
1493 EOF
1494 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1495 egrep "memchr" >/dev/null 2>&1; then
1496 :
1497 else
1498 rm -rf conftest*
1499 ac_cv_header_stdc=no
1500 fi
1501 rm -f conftest*
1502
1503 fi
1504
1505 if test $ac_cv_header_stdc = yes; then
1506 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1507 cat > conftest.$ac_ext <<EOF
1508 #line 1509 "configure"
1509 #include "confdefs.h"
1510 #include <stdlib.h>
1511 EOF
1512 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1513 egrep "free" >/dev/null 2>&1; then
1514 :
1515 else
1516 rm -rf conftest*
1517 ac_cv_header_stdc=no
1518 fi
1519 rm -f conftest*
1520
1521 fi
1522
1523 if test $ac_cv_header_stdc = yes; then
1524 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1525 if test "$cross_compiling" = yes; then
1526 :
1527 else
1528 cat > conftest.$ac_ext <<EOF
1529 #line 1530 "configure"
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)))
1535 int main () { int i; for (i = 0; i < 256; i++)
1536 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1537 exit (0); }
1538
1539 EOF
1540 if { (eval echo configure:1541: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
1541 then
1542 :
1543 else
1544 echo "configure: failed program was:" >&5
1545 cat conftest.$ac_ext >&5
1546 rm -fr conftest*
1547 ac_cv_header_stdc=no
1548 fi
1549 rm -fr conftest*
1550 fi
1551
1552 fi
1553 fi
1554
1555 echo "$ac_t""$ac_cv_header_stdc" 1>&6
1556 if test $ac_cv_header_stdc = yes; then
1557 cat >> confdefs.h <<\EOF
1558 #define STDC_HEADERS 1
1559 EOF
1560
1561 fi
1562
1563 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
1564 echo "configure:1565: checking for pid_t" >&5
1565 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
1566 echo $ac_n "(cached) $ac_c" 1>&6
1567 else
1568 cat > conftest.$ac_ext <<EOF
1569 #line 1570 "configure"
1570 #include "confdefs.h"
1571 #include <sys/types.h>
1572 #if STDC_HEADERS
1573 #include <stdlib.h>
1574 #include <stddef.h>
1575 #endif
1576 EOF
1577 if (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
1581 else
1582 rm -rf conftest*
1583 ac_cv_type_pid_t=no
1584 fi
1585 rm -f conftest*
1586
1587 fi
1588 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
1589 if test $ac_cv_type_pid_t = no; then
1590 cat >> confdefs.h <<\EOF
1591 #define pid_t int
1592 EOF
1593
1594 fi
1595
1596 ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'`
1597 echo $ac_n "checking for vfork.h""... $ac_c" 1>&6
1598 echo "configure:1599: checking for vfork.h" >&5
1599 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1600 echo $ac_n "(cached) $ac_c" 1>&6
1601 else
1602 cat > conftest.$ac_ext <<EOF
1603 #line 1604 "configure"
1604 #include "confdefs.h"
1605 #include <vfork.h>
1606 EOF
1607 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1608 { (eval echo configure:1609: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1609 ac_err=`grep -v '^ *+' conftest.out`
1610 if test -z "$ac_err"; then
1611 rm -rf conftest*
1612 eval "ac_cv_header_$ac_safe=yes"
1613 else
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"
1619 fi
1620 rm -f conftest*
1621 fi
1622 if 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
1626 EOF
1627
1628 else
1629 echo "$ac_t""no" 1>&6
1630 fi
1631
1632 echo $ac_n "checking for working vfork""... $ac_c" 1>&6
1633 echo "configure:1634: checking for working vfork" >&5
1634 if eval "test \"`echo '$''{'ac_cv_func_vfork_works'+set}'`\" = set"; then
1635 echo $ac_n "(cached) $ac_c" 1>&6
1636 else
1637 if test "$cross_compiling" = yes; then
1638 echo $ac_n "checking for vfork""... $ac_c" 1>&6
1639 echo "configure:1640: checking for vfork" >&5
1640 if eval "test \"`echo '$''{'ac_cv_func_vfork'+set}'`\" = set"; then
1641 echo $ac_n "(cached) $ac_c" 1>&6
1642 else
1643 cat > conftest.$ac_ext <<EOF
1644 #line 1645 "configure"
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. */
1652 char vfork();
1653
1654 int 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)
1660 choke me
1661 #else
1662 vfork();
1663 #endif
1664
1665 ; return 0; }
1666 EOF
1667 if { (eval echo configure:1668: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1668 rm -rf conftest*
1669 eval "ac_cv_func_vfork=yes"
1670 else
1671 echo "configure: failed program was:" >&5
1672 cat conftest.$ac_ext >&5
1673 rm -rf conftest*
1674 eval "ac_cv_func_vfork=no"
1675 fi
1676 rm -f conftest*
1677 fi
1678
1679 if eval "test \"`echo '$ac_cv_func_'vfork`\" = yes"; then
1680 echo "$ac_t""yes" 1>&6
1681 :
1682 else
1683 echo "$ac_t""no" 1>&6
1684 fi
1685
1686 else
1687 cat > conftest.$ac_ext <<EOF
1688 #line 1689 "configure"
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. */
1706 static
1707 #ifdef __cplusplus
1708 sparc_address_test (int arg)
1709 #else
1710 sparc_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 }
1727 main() {
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 }
1782 EOF
1783 if { (eval echo configure:1784: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
1784 then
1785 ac_cv_func_vfork_works=yes
1786 else
1787 echo "configure: failed program was:" >&5
1788 cat conftest.$ac_ext >&5
1789 rm -fr conftest*
1790 ac_cv_func_vfork_works=no
1791 fi
1792 rm -fr conftest*
1793 fi
1794
1795 fi
1796
1797 echo "$ac_t""$ac_cv_func_vfork_works" 1>&6
1798 if test $ac_cv_func_vfork_works = no; then
1799 cat >> confdefs.h <<\EOF
1800 #define vfork fork
1801 EOF
1802
1803 fi
1804
1805 else
1806 echo $ac_n "checking for vfork""... $ac_c" 1>&6
1807 echo "configure:1808: checking for vfork" >&5
1808 if eval "test \"`echo '$''{'ac_cv_func_vfork'+set}'`\" = set"; then
1809 echo $ac_n "(cached) $ac_c" 1>&6
1810 else
1811 cat > conftest.$ac_ext <<EOF
1812 #line 1813 "configure"
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. */
1820 char vfork();
1821
1822 int 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)
1828 choke me
1829 #else
1830 vfork();
1831 #endif
1832
1833 ; return 0; }
1834 EOF
1835 if { (eval echo configure:1836: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1836 rm -rf conftest*
1837 eval "ac_cv_func_vfork=yes"
1838 else
1839 echo "configure: failed program was:" >&5
1840 cat conftest.$ac_ext >&5
1841 rm -rf conftest*
1842 eval "ac_cv_func_vfork=no"
1843 fi
1844 rm -f conftest*
1845 fi
1846
1847 if eval "test \"`echo '$ac_cv_func_'vfork`\" = yes"; then
1848 echo "$ac_t""yes" 1>&6
1849 :
1850 else
1851 echo "$ac_t""no" 1>&6
1852 cat >> confdefs.h <<\EOF
1853 #define vfork fork
1854 EOF
1855
1856 fi
1857
1858 fi
1859
1860 echo $ac_n "checking for time_t in time.h""... $ac_c" 1>&6
1861 echo "configure:1862: checking for time_t in time.h" >&5
1862 if eval "test \"`echo '$''{'bu_cv_decl_time_t_time_h'+set}'`\" = set"; then
1863 echo $ac_n "(cached) $ac_c" 1>&6
1864 else
1865 cat > conftest.$ac_ext <<EOF
1866 #line 1867 "configure"
1867 #include "confdefs.h"
1868 #include <time.h>
1869 int main() {
1870 time_t i;
1871 ; return 0; }
1872 EOF
1873 if { (eval echo configure:1874: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1874 rm -rf conftest*
1875 bu_cv_decl_time_t_time_h=yes
1876 else
1877 echo "configure: failed program was:" >&5
1878 cat conftest.$ac_ext >&5
1879 rm -rf conftest*
1880 bu_cv_decl_time_t_time_h=no
1881 fi
1882 rm -f conftest*
1883 fi
1884
1885 echo "$ac_t""$bu_cv_decl_time_t_time_h" 1>&6
1886 if test $bu_cv_decl_time_t_time_h = yes; then
1887 cat >> confdefs.h <<\EOF
1888 #define HAVE_TIME_T_IN_TIME_H 1
1889 EOF
1890
1891 fi
1892
1893 echo $ac_n "checking for time_t in sys/types.h""... $ac_c" 1>&6
1894 echo "configure:1895: checking for time_t in sys/types.h" >&5
1895 if eval "test \"`echo '$''{'bu_cv_decl_time_t_types_h'+set}'`\" = set"; then
1896 echo $ac_n "(cached) $ac_c" 1>&6
1897 else
1898 cat > conftest.$ac_ext <<EOF
1899 #line 1900 "configure"
1900 #include "confdefs.h"
1901 #include <sys/types.h>
1902 int main() {
1903 time_t i;
1904 ; return 0; }
1905 EOF
1906 if { (eval echo configure:1907: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1907 rm -rf conftest*
1908 bu_cv_decl_time_t_types_h=yes
1909 else
1910 echo "configure: failed program was:" >&5
1911 cat conftest.$ac_ext >&5
1912 rm -rf conftest*
1913 bu_cv_decl_time_t_types_h=no
1914 fi
1915 rm -f conftest*
1916 fi
1917
1918 echo "$ac_t""$bu_cv_decl_time_t_types_h" 1>&6
1919 if test $bu_cv_decl_time_t_types_h = yes; then
1920 cat >> confdefs.h <<\EOF
1921 #define HAVE_TIME_T_IN_TYPES_H 1
1922 EOF
1923
1924 fi
1925
1926 # Under Next 3.2 <utime.h> apparently does not define struct utimbuf
1927 # by default.
1928 echo $ac_n "checking for utime.h""... $ac_c" 1>&6
1929 echo "configure:1930: checking for utime.h" >&5
1930 if eval "test \"`echo '$''{'bu_cv_header_utime_h'+set}'`\" = set"; then
1931 echo $ac_n "(cached) $ac_c" 1>&6
1932 else
1933 cat > conftest.$ac_ext <<EOF
1934 #line 1935 "configure"
1935 #include "confdefs.h"
1936 #include <sys/types.h>
1937 #ifdef HAVE_TIME_H
1938 #include <time.h>
1939 #endif
1940 #include <utime.h>
1941 int main() {
1942 struct utimbuf s;
1943 ; return 0; }
1944 EOF
1945 if { (eval echo configure:1946: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1946 rm -rf conftest*
1947 bu_cv_header_utime_h=yes
1948 else
1949 echo "configure: failed program was:" >&5
1950 cat conftest.$ac_ext >&5
1951 rm -rf conftest*
1952 bu_cv_header_utime_h=no
1953 fi
1954 rm -f conftest*
1955 fi
1956
1957 echo "$ac_t""$bu_cv_header_utime_h" 1>&6
1958 if test $bu_cv_header_utime_h = yes; then
1959 cat >> confdefs.h <<\EOF
1960 #define HAVE_GOOD_UTIME_H 1
1961 EOF
1962
1963 fi
1964
1965 echo $ac_n "checking whether fprintf must be declared""... $ac_c" 1>&6
1966 echo "configure:1967: checking whether fprintf must be declared" >&5
1967 if eval "test \"`echo '$''{'bfd_cv_decl_needed_fprintf'+set}'`\" = set"; then
1968 echo $ac_n "(cached) $ac_c" 1>&6
1969 else
1970 cat > conftest.$ac_ext <<EOF
1971 #line 1972 "configure"
1972 #include "confdefs.h"
1973
1974 #include <stdio.h>
1975 #ifdef HAVE_STRING_H
1976 #include <string.h>
1977 #else
1978 #ifdef HAVE_STRINGS_H
1979 #include <strings.h>
1980 #endif
1981 #endif
1982 #ifdef HAVE_STDLIB_H
1983 #include <stdlib.h>
1984 #endif
1985 #ifdef HAVE_UNISTD_H
1986 #include <unistd.h>
1987 #endif
1988 int main() {
1989 char *(*pfn) = (char *(*)) fprintf
1990 ; return 0; }
1991 EOF
1992 if { (eval echo configure:1993: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1993 rm -rf conftest*
1994 bfd_cv_decl_needed_fprintf=no
1995 else
1996 echo "configure: failed program was:" >&5
1997 cat conftest.$ac_ext >&5
1998 rm -rf conftest*
1999 bfd_cv_decl_needed_fprintf=yes
2000 fi
2001 rm -f conftest*
2002 fi
2003
2004 echo "$ac_t""$bfd_cv_decl_needed_fprintf" 1>&6
2005 if 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
2009 EOF
2010
2011 fi
2012
2013 echo $ac_n "checking whether strstr must be declared""... $ac_c" 1>&6
2014 echo "configure:2015: checking whether strstr must be declared" >&5
2015 if eval "test \"`echo '$''{'bfd_cv_decl_needed_strstr'+set}'`\" = set"; then
2016 echo $ac_n "(cached) $ac_c" 1>&6
2017 else
2018 cat > conftest.$ac_ext <<EOF
2019 #line 2020 "configure"
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
2036 int main() {
2037 char *(*pfn) = (char *(*)) strstr
2038 ; return 0; }
2039 EOF
2040 if { (eval echo configure:2041: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2041 rm -rf conftest*
2042 bfd_cv_decl_needed_strstr=no
2043 else
2044 echo "configure: failed program was:" >&5
2045 cat conftest.$ac_ext >&5
2046 rm -rf conftest*
2047 bfd_cv_decl_needed_strstr=yes
2048 fi
2049 rm -f conftest*
2050 fi
2051
2052 echo "$ac_t""$bfd_cv_decl_needed_strstr" 1>&6
2053 if 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
2057 EOF
2058
2059 fi
2060
2061 echo $ac_n "checking whether sbrk must be declared""... $ac_c" 1>&6
2062 echo "configure:2063: checking whether sbrk must be declared" >&5
2063 if eval "test \"`echo '$''{'bfd_cv_decl_needed_sbrk'+set}'`\" = set"; then
2064 echo $ac_n "(cached) $ac_c" 1>&6
2065 else
2066 cat > conftest.$ac_ext <<EOF
2067 #line 2068 "configure"
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
2084 int main() {
2085 char *(*pfn) = (char *(*)) sbrk
2086 ; return 0; }
2087 EOF
2088 if { (eval echo configure:2089: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2089 rm -rf conftest*
2090 bfd_cv_decl_needed_sbrk=no
2091 else
2092 echo "configure: failed program was:" >&5
2093 cat conftest.$ac_ext >&5
2094 rm -rf conftest*
2095 bfd_cv_decl_needed_sbrk=yes
2096 fi
2097 rm -f conftest*
2098 fi
2099
2100 echo "$ac_t""$bfd_cv_decl_needed_sbrk" 1>&6
2101 if 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
2105 EOF
2106
2107 fi
2108
2109 echo $ac_n "checking whether getenv must be declared""... $ac_c" 1>&6
2110 echo "configure:2111: checking whether getenv must be declared" >&5
2111 if eval "test \"`echo '$''{'bfd_cv_decl_needed_getenv'+set}'`\" = set"; then
2112 echo $ac_n "(cached) $ac_c" 1>&6
2113 else
2114 cat > conftest.$ac_ext <<EOF
2115 #line 2116 "configure"
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
2132 int main() {
2133 char *(*pfn) = (char *(*)) getenv
2134 ; return 0; }
2135 EOF
2136 if { (eval echo configure:2137: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2137 rm -rf conftest*
2138 bfd_cv_decl_needed_getenv=no
2139 else
2140 echo "configure: failed program was:" >&5
2141 cat conftest.$ac_ext >&5
2142 rm -rf conftest*
2143 bfd_cv_decl_needed_getenv=yes
2144 fi
2145 rm -f conftest*
2146 fi
2147
2148 echo "$ac_t""$bfd_cv_decl_needed_getenv" 1>&6
2149 if 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
2153 EOF
2154
2155 fi
2156
2157
2158
2159 case "${host}" in
2160 i[345]86-*-msdos* | i[345]86-*-go32* | *-*-cygwin32 | *-*-windows)
2161 cat >> confdefs.h <<\EOF
2162 #define USE_BINARY_FOPEN 1
2163 EOF
2164 ;;
2165 esac
2166
2167 # target-specific stuff:
2168
2169 # Canonicalize the secondary target names.
2170 if test -n "$enable_targets"; then
2171 for targ in `echo $enable_targets | sed 's/,/ /g'`
2172 do
2173 result=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $targ 2>/dev/null`
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"
2179 fi
2180 done
2181 fi
2182
2183 all_targets=false
2184 BUILD_NLMCONV=
2185 NLMCONV_DEFS=
2186 BUILD_SRCONV=
2187 BUILD_DLLTOOL=
2188 DLLTOOL_DEFS=
2189 BUILD_WINDRES=
2190
2191 for targ in $target $canon_targets
2192 do
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
2200 i[3456]86*-*-netware*)
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"
2224 BUILD_WINDRES='$(WINDRES_PROG)'
2225 ;;
2226 i[3-6]86-*pe* | i[3-6]86-*-cygwin32)
2227 BUILD_DLLTOOL='$(DLLTOOL_PROG)'
2228 DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_I386"
2229 BUILD_WINDRES='$(WINDRES_PROG)'
2230 ;;
2231 powerpc*-*-*pe* | powerpc*-*-cygwin32)
2232 BUILD_DLLTOOL='$(DLLTOOL_PROG)'
2233 DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_PPC"
2234 BUILD_WINDRES='$(WINDRES_PROG)'
2235 ;;
2236 esac
2237 fi
2238 done
2239
2240
2241
2242
2243
2244
2245
2246
2247 targ=$target
2248 . $srcdir/../bfd/config.bfd
2249 if test "x$targ_underscore" = "xyes"; then
2250 UNDERSCORE=1
2251 else
2252 UNDERSCORE=0
2253 fi
2254
2255
2256 trap '' 1 2 15
2257 cat > 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 #
2272 EOF
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.
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 |
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
2292 if cmp -s $cache_file confcache; then
2293 :
2294 else
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
2301 fi
2302 rm -f confcache
2303
2304 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
2305
2306 test "x$prefix" = xNONE && prefix=$ac_default_prefix
2307 # Let make expand exec_prefix.
2308 test "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.
2313 if test "x$srcdir" = x.; then
2314 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
2315 fi
2316
2317 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
2318
2319 DEFS=-DHAVE_CONFIG_H
2320
2321 # Without the "./", some shells look in PATH for config.status.
2322 : ${CONFIG_STATUS=./config.status}
2323
2324 echo creating $CONFIG_STATUS
2325 rm -f $CONFIG_STATUS
2326 cat > $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`:
2332 #
2333 # $0 $ac_configure_args
2334 #
2335 # Compiler output produced by configure, useful for debugging
2336 # configure, is in ./config.log if it exists.
2337
2338 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
2339 for ac_option
2340 do
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)
2346 echo "$CONFIG_STATUS generated by autoconf version 2.12"
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
2352 done
2353
2354 ac_given_srcdir=$srcdir
2355 ac_given_INSTALL="$INSTALL"
2356
2357 trap 'rm -fr `echo "Makefile config.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
2358 EOF
2359 cat >> $CONFIG_STATUS <<EOF
2360
2361 # Protect against being on the right side of a sed subst in config.status.
2362 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
2363 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
2364 $ac_vpsub
2365 $extrasub
2366 s%@CFLAGS@%$CFLAGS%g
2367 s%@CPPFLAGS@%$CPPFLAGS%g
2368 s%@CXXFLAGS@%$CXXFLAGS%g
2369 s%@DEFS@%$DEFS%g
2370 s%@LDFLAGS@%$LDFLAGS%g
2371 s%@LIBS@%$LIBS%g
2372 s%@exec_prefix@%$exec_prefix%g
2373 s%@prefix@%$prefix%g
2374 s%@program_transform_name@%$program_transform_name%g
2375 s%@bindir@%$bindir%g
2376 s%@sbindir@%$sbindir%g
2377 s%@libexecdir@%$libexecdir%g
2378 s%@datadir@%$datadir%g
2379 s%@sysconfdir@%$sysconfdir%g
2380 s%@sharedstatedir@%$sharedstatedir%g
2381 s%@localstatedir@%$localstatedir%g
2382 s%@libdir@%$libdir%g
2383 s%@includedir@%$includedir%g
2384 s%@oldincludedir@%$oldincludedir%g
2385 s%@infodir@%$infodir%g
2386 s%@mandir@%$mandir%g
2387 s%@host@%$host%g
2388 s%@host_alias@%$host_alias%g
2389 s%@host_cpu@%$host_cpu%g
2390 s%@host_vendor@%$host_vendor%g
2391 s%@host_os@%$host_os%g
2392 s%@target@%$target%g
2393 s%@target_alias@%$target_alias%g
2394 s%@target_cpu@%$target_cpu%g
2395 s%@target_vendor@%$target_vendor%g
2396 s%@target_os@%$target_os%g
2397 s%@build@%$build%g
2398 s%@build_alias@%$build_alias%g
2399 s%@build_cpu@%$build_cpu%g
2400 s%@build_vendor@%$build_vendor%g
2401 s%@build_os@%$build_os%g
2402 s%@CC@%$CC%g
2403 s%@HDEFINES@%$HDEFINES%g
2404 s%@HLDFLAGS@%$HLDFLAGS%g
2405 s%@HLDENV@%$HLDENV%g
2406 s%@RPATH_ENVVAR@%$RPATH_ENVVAR%g
2407 s%@AR@%$AR%g
2408 s%@RANLIB@%$RANLIB%g
2409 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
2410 s%@INSTALL_DATA@%$INSTALL_DATA%g
2411 s%@BFDLIB@%$BFDLIB%g
2412 s%@OPCODES@%$OPCODES%g
2413 s%@CC_FOR_BUILD@%$CC_FOR_BUILD%g
2414 s%@CPP@%$CPP%g
2415 s%@ALLOCA@%$ALLOCA%g
2416 s%@NLMCONV_DEFS@%$NLMCONV_DEFS%g
2417 s%@BUILD_NLMCONV@%$BUILD_NLMCONV%g
2418 s%@BUILD_SRCONV@%$BUILD_SRCONV%g
2419 s%@BUILD_DLLTOOL@%$BUILD_DLLTOOL%g
2420 s%@DLLTOOL_DEFS@%$DLLTOOL_DEFS%g
2421 s%@BUILD_WINDRES@%$BUILD_WINDRES%g
2422 s%@UNDERSCORE@%$UNDERSCORE%g
2423
2424 CEOF
2425 EOF
2426
2427 cat >> $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.
2431 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
2432 ac_file=1 # Number of current file.
2433 ac_beg=1 # First line for current file.
2434 ac_end=$ac_max_sed_cmds # Line after last line for current file.
2435 ac_more_lines=:
2436 ac_sed_cmds=""
2437 while $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
2456 done
2457 if test -z "$ac_sed_cmds"; then
2458 ac_sed_cmds=cat
2459 fi
2460 EOF
2461
2462 cat >> $CONFIG_STATUS <<EOF
2463
2464 CONFIG_FILES=\${CONFIG_FILES-"Makefile"}
2465 EOF
2466 cat >> $CONFIG_STATUS <<\EOF
2467 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
2468 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
2469 case "$ac_file" in
2470 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
2471 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
2472 *) ac_file_in="${ac_file}.in" ;;
2473 esac
2474
2475 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
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
2503
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
2512
2513 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
2514 sed -e "$ac_comsub
2515 s%@configure_input@%$configure_input%g
2516 s%@srcdir@%$srcdir%g
2517 s%@top_srcdir@%$top_srcdir%g
2518 s%@INSTALL@%$INSTALL%g
2519 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
2520 fi; done
2521 rm -f conftest.s*
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.
2527 ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
2528 ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
2529 ac_dC='\3'
2530 ac_dD='%g'
2531 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
2532 ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
2533 ac_uB='\([ ]\)%\1#\2define\3'
2534 ac_uC=' '
2535 ac_uD='\4%g'
2536 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
2537 ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
2538 ac_eB='$%\1#\2define\3'
2539 ac_eC=' '
2540 ac_eD='%g'
2541
2542 if test "${CONFIG_HEADERS+set}" != set; then
2543 EOF
2544 cat >> $CONFIG_STATUS <<EOF
2545 CONFIG_HEADERS="config.h:config.in"
2546 EOF
2547 cat >> $CONFIG_STATUS <<\EOF
2548 fi
2549 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
2550 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
2551 case "$ac_file" in
2552 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
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
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
2562
2563 EOF
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:
2567 # Protect against being on the right side of a sed subst in config.status.
2568 # Protect against being in an unquoted here document in config.status.
2569 rm -f conftest.vals
2570 cat > conftest.hdr <<\EOF
2571 s/[\\&%]/\\&/g
2572 s%[\\$`]%\\&%g
2573 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
2574 s%ac_d%ac_u%gp
2575 s%ac_u%ac_e%gp
2576 EOF
2577 sed -n -f conftest.hdr confdefs.h > conftest.vals
2578 rm -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.
2583 cat >> conftest.vals <<\EOF
2584 s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
2585 EOF
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.
2589
2590 rm -f conftest.tail
2591 while :
2592 do
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
2607 done
2608 rm -f conftest.vals
2609
2610 cat >> $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
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
2625 rm -f $ac_file
2626 mv conftest.h $ac_file
2627 fi
2628 fi; done
2629
2630 EOF
2631 cat >> $CONFIG_STATUS <<EOF
2632
2633 EOF
2634 cat >> $CONFIG_STATUS <<\EOF
2635 case x$CONFIG_HEADERS in xconfig.h:config.in) echo > stamp-h ;; esac
2636 exit 0
2637 EOF
2638 chmod +x $CONFIG_STATUS
2639 rm -fr confdefs* $ac_clean_files
2640 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
2641