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