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