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