Wed Jan 28 16:41:19 1998 J.J. van der Heijden <J.J.vanderHeijden@student.utwente.nl>
[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='$(SHELL) $(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 p=${PACKAGE-bogus-package-name}
1169 case "$enableval" in
1170 yes) enable_shared=yes ;;
1171 no) enable_shared=no ;;
1172 # The value of $p (aka $PACKAGE) is assumed to come from AM_INIT_AUTOMAKE.
1173 # If it didn't, it'll be `bogus-package-name', thus making this condition
1174 # not be used.
1175 *$p*) enable_shared=yes ;;
1176 *) shared=no ;;
1177 esac
1178 fi
1179
1180 libtool_shared=
1181 test "$enable_shared" = no && libtool_shared=" --disable-shared"
1182
1183 # Check whether --enable-static or --disable-static was given.
1184 if test "${enable_static+set}" = set; then
1185 enableval="$enable_static"
1186 if test "$enableval" = no; then
1187 enable_static=no
1188 else
1189 enable_static=yes
1190 fi
1191 fi
1192
1193 libtool_static=
1194 test "$enable_static" = no && libtool_static=" --disable-static"
1195
1196 libtool_flags="$libtool_shared$libtool_static"
1197 test "$silent" = yes && libtool_flags="$libtool_flags --silent"
1198 test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
1199 test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
1200
1201 # Some flags need to be propagated to the compiler or linker for good
1202 # libtool support.
1203 case "$host" in
1204 *-*-irix6*)
1205 ac_save_CFLAGS="$CFLAGS"
1206 # -n32 always needs to be added to the linker when using GCC.
1207 test "$ac_cv_prog_gcc" = yes && CFLAGS="$CFLAGS -n32"
1208 for f in '-32' '-64' '-cckr' '-n32' '-mips1' '-mips2' '-mips3' '-mips4'; do
1209 if echo " $CC $CFLAGS " | egrep -e "[ ]$f[ ]" > /dev/null; then
1210 LD="${LD-ld} $f"
1211 fi
1212 done
1213 CFLAGS="$ac_save_CFLAGS"
1214 ;;
1215
1216 *-*-sco3.2v5*)
1217 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
1218 CFLAGS="$CFLAGS -belf"
1219 ;;
1220 esac
1221
1222 # Actually configure libtool. ac_aux_dir is where install-sh is found.
1223 CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
1224 LD="$LD" RANLIB="$RANLIB" LN_S="$LN_S" \
1225 ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig \
1226 $libtool_flags --no-verify $ac_aux_dir/ltmain.sh $host \
1227 || { echo "configure: error: libtool configure failed" 1>&2; exit 1; }
1228
1229
1230 user_bfd_gas=
1231 # Check whether --enable-bfd-assembler or --disable-bfd-assembler was given.
1232 if test "${enable_bfd_assembler+set}" = set; then
1233 enableval="$enable_bfd_assembler"
1234 case "${enableval}" in
1235 yes) need_bfd=yes user_bfd_gas=yes ;;
1236 no) user_bfd_gas=no ;;
1237 *) { echo "configure: error: bad value ${enableval} given for bfd-assembler option" 1>&2; exit 1; } ;;
1238 esac
1239 fi
1240 # Check whether --enable-targets or --disable-targets was given.
1241 if test "${enable_targets+set}" = set; then
1242 enableval="$enable_targets"
1243 case "${enableval}" in
1244 yes | "") { echo "configure: error: enable-targets option must specify target names or 'all'" 1>&2; exit 1; }
1245 ;;
1246 no) enable_targets= ;;
1247 *) enable_targets=$enableval ;;
1248 esac
1249 fi
1250 # Check whether --enable-commonbfdlib or --disable-commonbfdlib was given.
1251 if test "${enable_commonbfdlib+set}" = set; then
1252 enableval="$enable_commonbfdlib"
1253 case "${enableval}" in
1254 yes) commonbfdlib=true ;;
1255 no) commonbfdlib=false ;;
1256 *) { echo "configure: error: bad value ${enableval} for BFD commonbfdlib option" 1>&2; exit 1; } ;;
1257 esac
1258 fi
1259
1260 # Generate a header file
1261
1262
1263
1264
1265 te_file=generic
1266
1267 canon_targets=""
1268 if test -n "$enable_targets" ; then
1269 for t in `echo $enable_targets | sed 's/,/ /g'`; do
1270 result=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $t 2>/dev/null`
1271 if test -n "$result" ; then
1272 canon_targets="$canon_targets $result"
1273 # else
1274 # # Permit "all", etc. We don't support it yet though.
1275 # canon_targets="$canon_targets $t"
1276 fi
1277 done
1278 _gas_uniq_list="$canon_targets"
1279 _gas_uniq_newlist=""
1280 for _gas_uniq_i in _gas_uniq_dummy $_gas_uniq_list ; do
1281 case $_gas_uniq_i in
1282 _gas_uniq_dummy) ;;
1283 *) case " $_gas_uniq_newlist " in
1284 *" $_gas_uniq_i "*) ;;
1285 *) _gas_uniq_newlist="$_gas_uniq_newlist $_gas_uniq_i" ;;
1286 esac ;;
1287 esac
1288 done
1289 canon_targets=$_gas_uniq_newlist
1290
1291 fi
1292
1293 emulations=""
1294
1295 for this_target in $target $canon_targets ; do
1296
1297 eval `echo $this_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/cpu=\1 vendor=\2 os=\3/'`
1298
1299 # check for architecture variants
1300 arch=
1301 endian=
1302 case ${cpu} in
1303 alpha*) cpu_type=alpha ;;
1304 armeb) cpu_type=arm endian=big ;;
1305 arm*) cpu_type=arm endian=little ;;
1306 thumb*) cpu_type=arm endian=little ;;
1307 hppa*) cpu_type=hppa ;;
1308 i[456]86) cpu_type=i386 ;;
1309 m680[012346]0) cpu_type=m68k ;;
1310 m68008) cpu_type=m68k ;;
1311 m683??) cpu_type=m68k ;;
1312 m8*) cpu_type=m88k ;;
1313 mips*el) cpu_type=mips endian=little ;;
1314 # start-sanitize-r5900
1315 mips*5900*) cpu_type=mips endian=little ;;
1316 # end-sanitize-r5900
1317 mips*) cpu_type=mips endian=big ;;
1318 powerpcle*) cpu_type=ppc endian=little ;;
1319 powerpc*) cpu_type=ppc endian=big ;;
1320 rs6000*) cpu_type=ppc ;;
1321 sparclite*) cpu_type=sparc arch=sparclite ;;
1322 sparclet*) cpu_type=sparc arch=sparclet ;;
1323 sparc64*) cpu_type=sparc arch=v9-64 ;;
1324 sparc*) cpu_type=sparc arch=sparclite ;; # ??? See tc-sparc.c.
1325 v850*) cpu_type=v850 ;;
1326 *) cpu_type=${cpu} ;;
1327 esac
1328
1329 if test ${this_target} = $target ; then
1330 target_cpu_type=${cpu_type}
1331 if test x${endian} = xbig; then
1332 cat >> confdefs.h <<\EOF
1333 #define TARGET_BYTES_BIG_ENDIAN 1
1334 EOF
1335
1336 elif test x${endian} = xlittle; then
1337 cat >> confdefs.h <<\EOF
1338 #define TARGET_BYTES_BIG_ENDIAN 0
1339 EOF
1340
1341 fi
1342 elif test ${target_cpu_type} != ${cpu_type} ; then
1343 continue
1344 fi
1345
1346 generic_target=${cpu_type}-$vendor-$os
1347 dev=no
1348 bfd_gas=no
1349 em=generic
1350
1351 # assign object format
1352 case ${generic_target} in
1353 a29k-*-coff) fmt=coff ;;
1354 a29k-amd-udi) fmt=coff ;;
1355 a29k-amd-ebmon) fmt=coff ;;
1356 a29k-nyu-sym1) fmt=coff ;;
1357 a29k-*-vxworks*) fmt=coff ;;
1358
1359 alpha*-*-*vms*) fmt=evax ;;
1360 alpha*-*-netware*) fmt=ecoff ;;
1361 alpha*-*-openbsd*) fmt=ecoff ;;
1362 alpha*-*-osf*) fmt=ecoff ;;
1363 alpha*-*-linuxecoff*) fmt=ecoff ;;
1364 alpha*-*-linux*) fmt=elf em=linux ;;
1365
1366 arc-*-elf*) fmt=elf bfd_gas=yes ;;
1367
1368 arm-*-riscix*) fmt=aout em=riscix ;;
1369 arm-*-aout) fmt=aout ;;
1370 arm-*-coff | thumb-*-coff) fmt=coff ;;
1371 arm-*-riscix*) fmt=aout ;;
1372 arm-*-pe) fmt=coff em=pe ;;
1373
1374 d10v-*-*) fmt=elf bfd_gas=yes ;;
1375 # start-sanitize-d30v
1376 d30v-*-*) fmt=elf bfd_gas=yes ;;
1377 # end-sanitize-d30v
1378
1379 hppa-*-*elf*) fmt=elf em=hppa ;;
1380 hppa-*-lites*) fmt=elf em=hppa ;;
1381 hppa-*-osf*) fmt=som em=hppa ;;
1382 hppa-*-rtems*) fmt=elf em=hppa ;;
1383 hppa-*-hpux*) fmt=som em=hppa ;;
1384 hppa-*-bsd*) fmt=som em=hppa ;;
1385 hppa-*-hiux*) fmt=som em=hppa ;;
1386
1387 h8300-*-coff) fmt=coff ;;
1388
1389 i386-ibm-aix*) fmt=coff em=i386aix ;;
1390 i386-sequent-bsd*) fmt=aout em=dynix bfd_gas=yes ;;
1391 i386-*-bsd*) fmt=aout em=386bsd ;;
1392 i386-*-netbsd0.8) fmt=aout em=386bsd ;;
1393 i386-*-netbsd*) fmt=aout em=nbsd bfd_gas=yes;;
1394 i386-*-openbsd*) fmt=aout em=nbsd bfd_gas=yes;;
1395 i386-*-linux*aout* | i386-*-linuxoldld) fmt=aout em=linux ;;
1396 i386-*-linux*coff*) fmt=coff em=linux ;;
1397 i386-*-linux*) fmt=elf em=linux ;;
1398 i386-*-lynxos*) fmt=coff em=lynx ;;
1399 i386-*-sysv4* | i386-*-solaris* | i386-*-elf)
1400 fmt=elf ;;
1401 i386-*-freebsdelf*) fmt=elf ;;
1402 i386-*-freebsd*) fmt=aout em=386bsd ;;
1403 i386-*-coff | i386-*-sysv* | i386-*-sco3.2v5*coff | i386-*-isc*)
1404 fmt=coff ;;
1405 i386-*-sco3.2v5*) fmt=elf
1406 if test ${this_target} = $target; then
1407 cat >> confdefs.h <<\EOF
1408 #define SCO_ELF 1
1409 EOF
1410
1411 fi
1412 ;;
1413 i386-*-sco3.2*) fmt=coff ;;
1414 i386-*-vsta) fmt=aout ;;
1415 i386-*-msdosdjgpp* | i386-*-go32* | i386-go32-rtems*)
1416 fmt=coff em=go32;;
1417 i386-*-rtems*) fmt=coff ;;
1418 i386-*-gnu*) fmt=elf ;;
1419 i386-*-mach*)
1420 fmt=aout em=mach bfd_gas=yes ;;
1421 i386-*-msdos*) fmt=aout ;;
1422 i386-*-moss*) fmt=elf ;;
1423 i386-*-pe) fmt=coff em=pe ;;
1424 i386-*-cygwin32*) fmt=coff em=pe bfd_gas=yes ;;
1425 i386-*-mingw32*) fmt=coff em=pe bfd_gas=yes ;;
1426 i386-*-*nt*) fmt=coff em=pe ;;
1427 i960-*-bout) fmt=bout ;;
1428 i960-*-coff) fmt=coff em=ic960 ;;
1429 i960-*-rtems*) fmt=coff em=ic960 ;;
1430 i960-*-nindy*) fmt=bout ;;
1431 i960-*-vxworks4*) fmt=bout ;;
1432 i960-*-vxworks5.0) fmt=bout ;;
1433 i960-*-vxworks5.*) fmt=coff em=ic960 ;;
1434 i960-*-vxworks*) fmt=bout ;;
1435
1436 m32r-*-*) fmt=elf bfd_gas=yes ;;
1437
1438 m68k-*-vxworks* | m68k-ericsson-ose | m68k-*-sunos*)
1439 fmt=aout em=sun3 ;;
1440 m68k-motorola-sysv*) fmt=coff em=delta ;;
1441 m68k-bull-sysv3*) fmt=coff em=dpx2 ;;
1442 m68k-apollo-*) fmt=coff em=apollo ;;
1443 m68k-*-sysv4*) # must be before -sysv*
1444 fmt=elf em=svr4 ;;
1445 m68k-*-elf*) fmt=elf ;;
1446 m68k-*-coff | m68k-*-sysv* | m68k-*-rtems*)
1447 fmt=coff ;;
1448 m68k-*-hpux*) fmt=hp300 em=hp300 ;;
1449 m68k-*-linux*aout*) fmt=aout em=linux ;;
1450 m68k-*-linux*) fmt=elf em=linux ;;
1451 m68k-*-lynxos*) fmt=coff em=lynx ;;
1452 m68k-*-netbsd*) fmt=aout em=nbsd bfd_gas=yes ;;
1453 m68k-*-openbsd*) fmt=aout em=nbsd bfd_gas=yes ;;
1454 m68k-apple-aux*) fmt=coff em=aux ;;
1455 m68k-*-psos*) fmt=elf em=psos;;
1456
1457 m88k-motorola-sysv3*) fmt=coff em=delt88 ;;
1458 m88k-*-coff*) fmt=coff ;;
1459
1460 # don't change em like *-*-bsd does
1461 mips-dec-netbsd*) fmt=elf endian=little ;;
1462 mips-dec-openbsd*) fmt=elf endian=little ;;
1463 mips-dec-bsd*) fmt=aout ;;
1464 mips-sony-bsd*) fmt=ecoff ;;
1465 mips-*-bsd*) { echo "configure: error: Unknown vendor for mips-bsd configuration." 1>&2; exit 1; } ;;
1466 mips-*-ultrix*) fmt=ecoff endian=little ;;
1467 mips-*-osf*) fmt=ecoff endian=little ;;
1468 mips-*-ecoff*) fmt=ecoff ;;
1469 mips-*-ecoff*) fmt=ecoff ;;
1470 mips-*-irix6*) fmt=elf ;;
1471 mips-*-irix5*) fmt=elf ;;
1472 mips-*-irix*) fmt=ecoff ;;
1473 mips-*-lnews*) fmt=ecoff em=lnews ;;
1474 mips-*-riscos*) fmt=ecoff ;;
1475 mips-*-sysv*) fmt=ecoff ;;
1476 mips-*-elf* | mips-*-rtems* | mips-*-linux* | mips-*-gnu* | mips-*-openbsd*)
1477 fmt=elf ;;
1478 mn10200-*-*) fmt=elf bfd_gas=yes ;;
1479 mn10300-*-*) fmt=elf bfd_gas=yes ;;
1480 ppc-*-pe | ppc-*-cygwin32 | ppc-*-winnt*)
1481 fmt=coff em=pe ;;
1482 ppc-*-aix*) fmt=coff ;;
1483 ppc-*-beos*) fmt=coff ;;
1484 ppc-*-*bsd* | ppc-*-elf* | ppc-*-eabi* | ppc-*-sysv4*)
1485 fmt=elf ;;
1486 ppc-*-linux*) fmt=elf
1487 case "$endian" in
1488 big) ;;
1489 *) { echo "configure: error: Linux must be configured big endian" 1>&2; exit 1; } ;;
1490 esac
1491 ;;
1492 ppc-*-solaris*) fmt=elf
1493 if test ${this_target} = $target; then
1494 cat >> confdefs.h <<\EOF
1495 #define TARGET_SOLARIS_COMMENT 1
1496 EOF
1497
1498 fi
1499 if test x${endian} = xbig; then
1500 { echo "configure: error: Solaris must be configured little endian" 1>&2; exit 1; }
1501 fi
1502 ;;
1503 ppc-*-rtems*) fmt=elf ;;
1504 ppc-*-macos* | ppc-*-mpw*)
1505 fmt=coff em=macos ;;
1506 ppc-*-netware*) fmt=elf em=ppcnw ;;
1507
1508 sh-*-elf*) fmt=elf ;;
1509 sh-*-coff*) fmt=coff ;;
1510 sh-*-rtems*) fmt=elf ;;
1511
1512 ns32k-pc532-mach* | ns32k-pc532-ux*) fmt=aout em=pc532mach ;;
1513 ns32k-pc532-netbsd* | ns32k-pc532-lites*) fmt=aout em=nbsd532 ;;
1514 ns32k-pc532-openbsd*) fmt=aout em=nbsd532 ;;
1515
1516 sparc-*-rtems*) fmt=aout ;;
1517 sparc-*-sunos4*) fmt=aout em=sun3 ;;
1518 sparc-*-aout | sparc*-*-vxworks*)
1519 fmt=aout em=sparcaout ;;
1520 sparc-*-coff) fmt=coff ;;
1521 sparc-*-linux*aout*) fmt=aout em=linux ;;
1522 sparc-*-linux*) fmt=elf em=linux ;;
1523 sparc-*-lynxos*) fmt=coff em=lynx ;;
1524 sparc-fujitsu-none) fmt=aout ;;
1525 sparc-*-elf | sparc-*-sysv4* | sparc-*-solaris*)
1526 fmt=elf ;;
1527 sparc-*-netbsd*) fmt=aout em=nbsd bfd_gas=yes ;;
1528 sparc-*-openbsd*) fmt=aout em=nbsd bfd_gas=yes ;;
1529
1530 # start-sanitize-tic80
1531 tic80-*-*) fmt=coff ;;
1532 # end-sanitize-tic80
1533
1534 # start-sanitize-sky
1535 dvp-*-*) fmt=elf bfd_gas=yes ;;
1536 # end-sanitize-sky
1537
1538 v850-*-*) fmt=elf bfd_gas=yes ;;
1539
1540 # start-sanitize-v850e
1541 v850e-*-*) fmt=elf bfd_gas=yes ;;
1542 v850ea-*-*) fmt=elf bfd_gas=yes ;;
1543 # end-sanitize-v850e
1544 vax-*-bsd* | vax-*-ultrix*)
1545 fmt=aout ;;
1546 vax-*-vms) fmt=vms ;;
1547
1548 z8k-*-coff | z8k-*-sim)
1549 fmt=coff ;;
1550
1551 w65-*-*) fmt=coff ;;
1552
1553 *-*-aout | *-*-scout)
1554 fmt=aout ;;
1555 *-*-nindy*)
1556 fmt=bout ;;
1557 *-*-bsd*)
1558 fmt=aout em=sun3 ;;
1559 *-*-generic) fmt=generic ;;
1560 *-*-xray | *-*-hms) fmt=coff ;;
1561 *-*-sim) fmt=coff ;;
1562 *-*-elf | *-*-sysv4* | *-*-solaris*)
1563 echo "configure: warning: GAS support for ${generic_target} is incomplete." 1>&2
1564 fmt=elf dev=yes ;;
1565 *-*-vxworks) fmt=aout ;;
1566 *-*-netware) fmt=elf ;;
1567 esac
1568
1569 case ${cpu_type}-${fmt} in
1570 alpha*-*) bfd_gas=yes ;;
1571 arm-*) bfd_gas=yes ;;
1572 # not yet
1573 # i386-aout) bfd_gas=preferred ;;
1574 mips-*) bfd_gas=yes ;;
1575 ns32k-*) bfd_gas=yes ;;
1576 ppc-*) bfd_gas=yes ;;
1577 sparc-*) bfd_gas=yes ;;
1578 *-elf) bfd_gas=yes ;;
1579 *-ecoff) bfd_gas=yes ;;
1580 *-som) bfd_gas=yes ;;
1581 *) ;;
1582 esac
1583
1584 # Other random stuff.
1585
1586 # do we need the opcodes library?
1587 case ${cpu_type} in
1588 vax | i386)
1589 ;;
1590 *)
1591 need_opcodes=yes
1592 if test "${shared_opcodes}" = "true"; then
1593 # A shared libopcodes must be linked against libbfd.
1594 need_bfd=yes
1595 fi
1596 ;;
1597 esac
1598
1599 case ${cpu_type} in
1600 m32r)
1601 case ${extra_objects} in
1602 *cgen.o*) ;;
1603 *) extra_objects="$extra_objects cgen.o"
1604 cat >> confdefs.h <<\EOF
1605 #define USING_CGEN 1
1606 EOF
1607
1608 ;;
1609 esac
1610 ;;
1611
1612 m68k)
1613 case ${extra_objects} in
1614 *m68k-parse.o*) ;;
1615 *) extra_objects="$extra_objects m68k-parse.o" ;;
1616 esac
1617 ;;
1618
1619 mips)
1620 echo ${extra_objects} | grep -s "itbl-parse.o"
1621 if test $? -ne 0 ; then
1622 extra_objects="$extra_objects itbl-parse.o"
1623 fi
1624
1625 echo ${extra_objects} | grep -s "itbl-lex.o"
1626 if test $? -ne 0 ; then
1627 extra_objects="$extra_objects itbl-lex.o"
1628 fi
1629
1630 echo ${extra_objects} | grep -s "itbl-ops.o"
1631 if test $? -ne 0 ; then
1632 extra_objects="$extra_objects itbl-ops.o"
1633 fi
1634 ;;
1635
1636 sparc)
1637 if test $this_target = $target ; then
1638 cat >> confdefs.h <<EOF
1639 #define DEFAULT_ARCH "${arch}"
1640 EOF
1641
1642 fi
1643 ;;
1644
1645 *)
1646 ;;
1647 esac
1648
1649 # See if we really can support this configuration with the emulation code.
1650
1651 if test $this_target = $target ; then
1652 primary_bfd_gas=$bfd_gas
1653 obj_format=$fmt
1654 te_file=$em
1655
1656 if test $bfd_gas = no ; then
1657 # Can't support other configurations this way.
1658 break
1659 fi
1660 elif test $bfd_gas = no ; then
1661 # Can't support this configuration.
1662 break
1663 fi
1664
1665 # From target name and format, produce a list of supported emulations.
1666
1667 case ${generic_target}-${fmt} in
1668 mips-*-irix5*-*) emulation="mipsbelf mipslelf mipself mipsbecoff mipslecoff mipsecoff" ;;
1669 mips-*-linux*-*) case "$endian" in
1670 big) emulation="mipsbelf mipslelf mipself mipsbecoff mipslecoff mipsecoff" ;;
1671 *) emulation="mipslelf mipsbelf mipself mipslecoff mipsbecoff mipsecoff" ;;
1672 esac ;;
1673 mips-*-lnews*-ecoff) ;;
1674 mips-*-*-ecoff) case "$endian" in
1675 big) emulation="mipsbecoff mipslecoff mipsecoff" ;;
1676 *) emulation="mipslecoff mipsbecoff mipsecoff" ;;
1677 esac ;;
1678 mips-*-*-elf) case "$endian" in
1679 big) emulation="mipsbelf mipslelf mipself" ;;
1680 *) emulation="mipslelf mipsbelf mipself" ;;
1681 # Uncommenting the next line will turn on support for i386 COFF
1682 # in any i386 ELF configuration. This probably doesn't work
1683 # correctly.
1684 # i386-*-*-elf) emulation="i386coff i386elf" ;;
1685 esac ;;
1686 esac
1687
1688 emulations="$emulations $emulation"
1689
1690 done
1691
1692 # Assign floating point type. Most processors with FP support
1693 # IEEE FP. On those that don't support FP at all, usually IEEE
1694 # is emulated.
1695 case ${target_cpu} in
1696 vax | tahoe ) atof=${target_cpu} ;;
1697 *) atof=ieee ;;
1698 esac
1699
1700 case "${obj_format}" in
1701 "") { echo "configure: error: GAS does not know what format to use for target ${target}" 1>&2; exit 1; } ;;
1702 esac
1703
1704
1705 if test ! -r ${srcdir}/config/tc-${target_cpu_type}.c; then
1706 { echo "configure: error: GAS does not support target CPU ${target_cpu_type}" 1>&2; exit 1; }
1707 fi
1708
1709 if test ! -r ${srcdir}/config/obj-${obj_format}.c; then
1710 { echo "configure: error: GAS does not have support for object file format ${obj_format}" 1>&2; exit 1; }
1711 fi
1712
1713 case ${user_bfd_gas}-${primary_bfd_gas} in
1714 yes-yes | no-no)
1715 # We didn't override user's choice.
1716 ;;
1717 no-yes)
1718 echo "configure: warning: Use of BFD is required for ${target}; overriding config options." 1>&2
1719 ;;
1720 no-preferred)
1721 primary_bfd_gas=no
1722 ;;
1723 *-preferred)
1724 primary_bfd_gas=yes
1725 ;;
1726 yes-*)
1727 primary_bfd_gas=yes
1728 ;;
1729 -*)
1730 # User specified nothing.
1731 ;;
1732 esac
1733
1734 # Some COFF configurations want these random other flags set.
1735 case ${obj_format} in
1736 coff)
1737 case ${target_cpu_type} in
1738 i386) cat >> confdefs.h <<\EOF
1739 #define I386COFF 1
1740 EOF
1741 ;;
1742 m68k) cat >> confdefs.h <<\EOF
1743 #define M68KCOFF 1
1744 EOF
1745 ;;
1746 m88k) cat >> confdefs.h <<\EOF
1747 #define M88KCOFF 1
1748 EOF
1749 ;;
1750 esac
1751 ;;
1752 esac
1753
1754 # Getting this done right is going to be a bitch. Each configuration specified
1755 # with --enable-targets=... should be checked for environment, format, cpu, and
1756 # bfd_gas setting.
1757 #
1758 # For each configuration, the necessary object file support code must be linked
1759 # in. This might be only one, it might be up to four. The necessary emulation
1760 # code needs to be provided, too.
1761 #
1762 # And then there's "--enable-targets=all"....
1763 #
1764 # For now, just always do it for MIPS ELF or ECOFF configurations. Sigh.
1765
1766 formats="${obj_format}"
1767 emfiles=""
1768 EMULATIONS=""
1769 _gas_uniq_list="$emulations"
1770 _gas_uniq_newlist=""
1771 for _gas_uniq_i in _gas_uniq_dummy $_gas_uniq_list ; do
1772 case $_gas_uniq_i in
1773 _gas_uniq_dummy) ;;
1774 *) case " $_gas_uniq_newlist " in
1775 *" $_gas_uniq_i "*) ;;
1776 *) _gas_uniq_newlist="$_gas_uniq_newlist $_gas_uniq_i" ;;
1777 esac ;;
1778 esac
1779 done
1780 emulations=$_gas_uniq_newlist
1781
1782 for em in . $emulations ; do
1783 case $em in
1784 .) continue ;;
1785 mipsbelf | mipslelf)
1786 fmt=elf file=mipself ;;
1787 mipsbecoff | mipslecoff)
1788 fmt=ecoff file=mipsecoff ;;
1789 i386coff)
1790 fmt=coff file=i386coff ;;
1791 i386elf)
1792 fmt=elf file=i386elf ;;
1793 esac
1794 formats="$formats $fmt"
1795 emfiles="$emfiles e-$file.o"
1796 EMULATIONS="$EMULATIONS &$em,"
1797 done
1798 _gas_uniq_list="$formats"
1799 _gas_uniq_newlist=""
1800 for _gas_uniq_i in _gas_uniq_dummy $_gas_uniq_list ; do
1801 case $_gas_uniq_i in
1802 _gas_uniq_dummy) ;;
1803 *) case " $_gas_uniq_newlist " in
1804 *" $_gas_uniq_i "*) ;;
1805 *) _gas_uniq_newlist="$_gas_uniq_newlist $_gas_uniq_i" ;;
1806 esac ;;
1807 esac
1808 done
1809 formats=$_gas_uniq_newlist
1810
1811 _gas_uniq_list="$emfiles"
1812 _gas_uniq_newlist=""
1813 for _gas_uniq_i in _gas_uniq_dummy $_gas_uniq_list ; do
1814 case $_gas_uniq_i in
1815 _gas_uniq_dummy) ;;
1816 *) case " $_gas_uniq_newlist " in
1817 *" $_gas_uniq_i "*) ;;
1818 *) _gas_uniq_newlist="$_gas_uniq_newlist $_gas_uniq_i" ;;
1819 esac ;;
1820 esac
1821 done
1822 emfiles=$_gas_uniq_newlist
1823
1824 if test `set . $formats ; shift ; echo $#` -gt 1 ; then
1825 for fmt in $formats ; do
1826 case $fmt in
1827 aout) cat >> confdefs.h <<\EOF
1828 #define OBJ_MAYBE_AOUT 1
1829 EOF
1830 ;;
1831 bout) cat >> confdefs.h <<\EOF
1832 #define OBJ_MAYBE_BOUT 1
1833 EOF
1834 ;;
1835 coff) cat >> confdefs.h <<\EOF
1836 #define OBJ_MAYBE_COFF 1
1837 EOF
1838 ;;
1839 ecoff) cat >> confdefs.h <<\EOF
1840 #define OBJ_MAYBE_ECOFF 1
1841 EOF
1842 ;;
1843 elf) cat >> confdefs.h <<\EOF
1844 #define OBJ_MAYBE_ELF 1
1845 EOF
1846 ;;
1847 generic) cat >> confdefs.h <<\EOF
1848 #define OBJ_MAYBE_GENERIC 1
1849 EOF
1850 ;;
1851 hp300) cat >> confdefs.h <<\EOF
1852 #define OBJ_MAYBE_HP300 1
1853 EOF
1854 ;;
1855 ieee) cat >> confdefs.h <<\EOF
1856 #define OBJ_MAYBE_IEEE 1
1857 EOF
1858 ;;
1859 som) cat >> confdefs.h <<\EOF
1860 #define OBJ_MAYBE_SOM 1
1861 EOF
1862 ;;
1863 vms) cat >> confdefs.h <<\EOF
1864 #define OBJ_MAYBE_VMS 1
1865 EOF
1866 ;;
1867 esac
1868 extra_objects="$extra_objects obj-$fmt.o"
1869 done
1870 obj_format=multi
1871 fi
1872 if test `set . $emfiles ; shift ; echo $#` -gt 0 ; then
1873 te_file=multi
1874 extra_objects="$extra_objects $emfiles"
1875 DEFAULT_EMULATION=`set . $emulations ; echo $2`
1876 cat >> confdefs.h <<\EOF
1877 #define USE_EMULATIONS 1
1878 EOF
1879
1880 fi
1881
1882 cat >> confdefs.h <<EOF
1883 #define EMULATIONS $EMULATIONS
1884 EOF
1885
1886 cat >> confdefs.h <<EOF
1887 #define DEFAULT_EMULATION "$DEFAULT_EMULATION"
1888 EOF
1889
1890
1891 case ${primary_bfd_gas}-${target_cpu_type}-${obj_format} in
1892 yes-*-coff) need_bfd=yes ;;
1893 no-*-coff) need_bfd=yes
1894 cat >> confdefs.h <<\EOF
1895 #define MANY_SEGMENTS 1
1896 EOF
1897 ;;
1898 esac
1899
1900 reject_dev_configs=yes
1901
1902 case ${reject_dev_configs}-${dev} in
1903 yes-yes) # Oops.
1904 { echo "configure: error: GAS does not support the ${generic_target} configuration." 1>&2; exit 1; }
1905 ;;
1906 esac
1907
1908
1909
1910
1911
1912
1913 case "${primary_bfd_gas}" in
1914 yes) cat >> confdefs.h <<\EOF
1915 #define BFD_ASSEMBLER 1
1916 EOF
1917
1918 need_bfd=yes ;;
1919 esac
1920
1921 # do we need the opcodes library?
1922 case "${need_opcodes}" in
1923 yes)
1924 OPCODES_LIB=../opcodes/libopcodes.la
1925 ;;
1926 esac
1927
1928 case "${need_bfd}" in
1929 yes)
1930 BFDLIB=../bfd/libbfd.la
1931 ALL_OBJ_DEPS="$ALL_OBJ_DEPS ../bfd/bfd.h"
1932 ;;
1933 esac
1934
1935
1936
1937
1938
1939
1940 cat >> confdefs.h <<EOF
1941 #define TARGET_ALIAS "${target_alias}"
1942 EOF
1943
1944 cat >> confdefs.h <<EOF
1945 #define TARGET_CANONICAL "${target}"
1946 EOF
1947
1948 cat >> confdefs.h <<EOF
1949 #define TARGET_CPU "${target_cpu}"
1950 EOF
1951
1952 cat >> confdefs.h <<EOF
1953 #define TARGET_VENDOR "${target_vendor}"
1954 EOF
1955
1956 cat >> confdefs.h <<EOF
1957 #define TARGET_OS "${target_os}"
1958 EOF
1959
1960
1961 # Extract the first word of "gcc", so it can be a program name with args.
1962 set dummy gcc; ac_word=$2
1963 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1964 echo "configure:1965: checking for $ac_word" >&5
1965 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1966 echo $ac_n "(cached) $ac_c" 1>&6
1967 else
1968 if test -n "$CC"; then
1969 ac_cv_prog_CC="$CC" # Let the user override the test.
1970 else
1971 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1972 for ac_dir in $PATH; do
1973 test -z "$ac_dir" && ac_dir=.
1974 if test -f $ac_dir/$ac_word; then
1975 ac_cv_prog_CC="gcc"
1976 break
1977 fi
1978 done
1979 IFS="$ac_save_ifs"
1980 fi
1981 fi
1982 CC="$ac_cv_prog_CC"
1983 if test -n "$CC"; then
1984 echo "$ac_t""$CC" 1>&6
1985 else
1986 echo "$ac_t""no" 1>&6
1987 fi
1988
1989 if test -z "$CC"; then
1990 # Extract the first word of "cc", so it can be a program name with args.
1991 set dummy cc; ac_word=$2
1992 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1993 echo "configure:1994: checking for $ac_word" >&5
1994 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1995 echo $ac_n "(cached) $ac_c" 1>&6
1996 else
1997 if test -n "$CC"; then
1998 ac_cv_prog_CC="$CC" # Let the user override the test.
1999 else
2000 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2001 ac_prog_rejected=no
2002 for ac_dir in $PATH; do
2003 test -z "$ac_dir" && ac_dir=.
2004 if test -f $ac_dir/$ac_word; then
2005 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
2006 ac_prog_rejected=yes
2007 continue
2008 fi
2009 ac_cv_prog_CC="cc"
2010 break
2011 fi
2012 done
2013 IFS="$ac_save_ifs"
2014 if test $ac_prog_rejected = yes; then
2015 # We found a bogon in the path, so make sure we never use it.
2016 set dummy $ac_cv_prog_CC
2017 shift
2018 if test $# -gt 0; then
2019 # We chose a different compiler from the bogus one.
2020 # However, it has the same basename, so the bogon will be chosen
2021 # first if we set CC to just the basename; use the full file name.
2022 shift
2023 set dummy "$ac_dir/$ac_word" "$@"
2024 shift
2025 ac_cv_prog_CC="$@"
2026 fi
2027 fi
2028 fi
2029 fi
2030 CC="$ac_cv_prog_CC"
2031 if test -n "$CC"; then
2032 echo "$ac_t""$CC" 1>&6
2033 else
2034 echo "$ac_t""no" 1>&6
2035 fi
2036
2037 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
2038 fi
2039
2040 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
2041 echo "configure:2042: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
2042
2043 ac_ext=c
2044 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2045 ac_cpp='$CPP $CPPFLAGS'
2046 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2047 ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2048 cross_compiling=$ac_cv_prog_cc_cross
2049
2050 cat > conftest.$ac_ext <<EOF
2051 #line 2052 "configure"
2052 #include "confdefs.h"
2053 main(){return(0);}
2054 EOF
2055 if { (eval echo configure:2056: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2056 ac_cv_prog_cc_works=yes
2057 # If we can't run a trivial program, we are probably using a cross compiler.
2058 if (./conftest; exit) 2>/dev/null; then
2059 ac_cv_prog_cc_cross=no
2060 else
2061 ac_cv_prog_cc_cross=yes
2062 fi
2063 else
2064 echo "configure: failed program was:" >&5
2065 cat conftest.$ac_ext >&5
2066 ac_cv_prog_cc_works=no
2067 fi
2068 rm -fr conftest*
2069
2070 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
2071 if test $ac_cv_prog_cc_works = no; then
2072 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
2073 fi
2074 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
2075 echo "configure:2076: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
2076 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
2077 cross_compiling=$ac_cv_prog_cc_cross
2078
2079 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
2080 echo "configure:2081: checking whether we are using GNU C" >&5
2081 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
2082 echo $ac_n "(cached) $ac_c" 1>&6
2083 else
2084 cat > conftest.c <<EOF
2085 #ifdef __GNUC__
2086 yes;
2087 #endif
2088 EOF
2089 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2090: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
2090 ac_cv_prog_gcc=yes
2091 else
2092 ac_cv_prog_gcc=no
2093 fi
2094 fi
2095
2096 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
2097
2098 if test $ac_cv_prog_gcc = yes; then
2099 GCC=yes
2100 ac_test_CFLAGS="${CFLAGS+set}"
2101 ac_save_CFLAGS="$CFLAGS"
2102 CFLAGS=
2103 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
2104 echo "configure:2105: checking whether ${CC-cc} accepts -g" >&5
2105 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
2106 echo $ac_n "(cached) $ac_c" 1>&6
2107 else
2108 echo 'void f(){}' > conftest.c
2109 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
2110 ac_cv_prog_cc_g=yes
2111 else
2112 ac_cv_prog_cc_g=no
2113 fi
2114 rm -f conftest*
2115
2116 fi
2117
2118 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
2119 if test "$ac_test_CFLAGS" = set; then
2120 CFLAGS="$ac_save_CFLAGS"
2121 elif test $ac_cv_prog_cc_g = yes; then
2122 CFLAGS="-g -O2"
2123 else
2124 CFLAGS="-O2"
2125 fi
2126 else
2127 GCC=
2128 test "${CFLAGS+set}" = set || CFLAGS="-g"
2129 fi
2130
2131
2132 for ac_prog in 'bison -y' byacc
2133 do
2134 # Extract the first word of "$ac_prog", so it can be a program name with args.
2135 set dummy $ac_prog; ac_word=$2
2136 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2137 echo "configure:2138: checking for $ac_word" >&5
2138 if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then
2139 echo $ac_n "(cached) $ac_c" 1>&6
2140 else
2141 if test -n "$YACC"; then
2142 ac_cv_prog_YACC="$YACC" # Let the user override the test.
2143 else
2144 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2145 for ac_dir in $PATH; do
2146 test -z "$ac_dir" && ac_dir=.
2147 if test -f $ac_dir/$ac_word; then
2148 ac_cv_prog_YACC="$ac_prog"
2149 break
2150 fi
2151 done
2152 IFS="$ac_save_ifs"
2153 fi
2154 fi
2155 YACC="$ac_cv_prog_YACC"
2156 if test -n "$YACC"; then
2157 echo "$ac_t""$YACC" 1>&6
2158 else
2159 echo "$ac_t""no" 1>&6
2160 fi
2161
2162 test -n "$YACC" && break
2163 done
2164 test -n "$YACC" || YACC="yacc"
2165
2166 # Extract the first word of "flex", so it can be a program name with args.
2167 set dummy flex; ac_word=$2
2168 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2169 echo "configure:2170: checking for $ac_word" >&5
2170 if eval "test \"`echo '$''{'ac_cv_prog_LEX'+set}'`\" = set"; then
2171 echo $ac_n "(cached) $ac_c" 1>&6
2172 else
2173 if test -n "$LEX"; then
2174 ac_cv_prog_LEX="$LEX" # Let the user override the test.
2175 else
2176 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2177 for ac_dir in $PATH; do
2178 test -z "$ac_dir" && ac_dir=.
2179 if test -f $ac_dir/$ac_word; then
2180 ac_cv_prog_LEX="flex"
2181 break
2182 fi
2183 done
2184 IFS="$ac_save_ifs"
2185 test -z "$ac_cv_prog_LEX" && ac_cv_prog_LEX="lex"
2186 fi
2187 fi
2188 LEX="$ac_cv_prog_LEX"
2189 if test -n "$LEX"; then
2190 echo "$ac_t""$LEX" 1>&6
2191 else
2192 echo "$ac_t""no" 1>&6
2193 fi
2194
2195 if test -z "$LEXLIB"
2196 then
2197 case "$LEX" in
2198 flex*) ac_lib=fl ;;
2199 *) ac_lib=l ;;
2200 esac
2201 echo $ac_n "checking for yywrap in -l$ac_lib""... $ac_c" 1>&6
2202 echo "configure:2203: checking for yywrap in -l$ac_lib" >&5
2203 ac_lib_var=`echo $ac_lib'_'yywrap | sed 'y%./+-%__p_%'`
2204 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2205 echo $ac_n "(cached) $ac_c" 1>&6
2206 else
2207 ac_save_LIBS="$LIBS"
2208 LIBS="-l$ac_lib $LIBS"
2209 cat > conftest.$ac_ext <<EOF
2210 #line 2211 "configure"
2211 #include "confdefs.h"
2212 /* Override any gcc2 internal prototype to avoid an error. */
2213 /* We use char because int might match the return type of a gcc2
2214 builtin and then its argument prototype would still apply. */
2215 char yywrap();
2216
2217 int main() {
2218 yywrap()
2219 ; return 0; }
2220 EOF
2221 if { (eval echo configure:2222: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2222 rm -rf conftest*
2223 eval "ac_cv_lib_$ac_lib_var=yes"
2224 else
2225 echo "configure: failed program was:" >&5
2226 cat conftest.$ac_ext >&5
2227 rm -rf conftest*
2228 eval "ac_cv_lib_$ac_lib_var=no"
2229 fi
2230 rm -f conftest*
2231 LIBS="$ac_save_LIBS"
2232
2233 fi
2234 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2235 echo "$ac_t""yes" 1>&6
2236 LEXLIB="-l$ac_lib"
2237 else
2238 echo "$ac_t""no" 1>&6
2239 fi
2240
2241 fi
2242
2243 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
2244 echo "configure:2245: checking how to run the C preprocessor" >&5
2245 # On Suns, sometimes $CPP names a directory.
2246 if test -n "$CPP" && test -d "$CPP"; then
2247 CPP=
2248 fi
2249 if test -z "$CPP"; then
2250 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
2251 echo $ac_n "(cached) $ac_c" 1>&6
2252 else
2253 # This must be in double quotes, not single quotes, because CPP may get
2254 # substituted into the Makefile and "${CC-cc}" will confuse make.
2255 CPP="${CC-cc} -E"
2256 # On the NeXT, cc -E runs the code through the compiler's parser,
2257 # not just through cpp.
2258 cat > conftest.$ac_ext <<EOF
2259 #line 2260 "configure"
2260 #include "confdefs.h"
2261 #include <assert.h>
2262 Syntax Error
2263 EOF
2264 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2265 { (eval echo configure:2266: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2266 ac_err=`grep -v '^ *+' conftest.out`
2267 if test -z "$ac_err"; then
2268 :
2269 else
2270 echo "$ac_err" >&5
2271 echo "configure: failed program was:" >&5
2272 cat conftest.$ac_ext >&5
2273 rm -rf conftest*
2274 CPP="${CC-cc} -E -traditional-cpp"
2275 cat > conftest.$ac_ext <<EOF
2276 #line 2277 "configure"
2277 #include "confdefs.h"
2278 #include <assert.h>
2279 Syntax Error
2280 EOF
2281 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2282 { (eval echo configure:2283: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2283 ac_err=`grep -v '^ *+' conftest.out`
2284 if test -z "$ac_err"; then
2285 :
2286 else
2287 echo "$ac_err" >&5
2288 echo "configure: failed program was:" >&5
2289 cat conftest.$ac_ext >&5
2290 rm -rf conftest*
2291 CPP=/lib/cpp
2292 fi
2293 rm -f conftest*
2294 fi
2295 rm -f conftest*
2296 ac_cv_prog_CPP="$CPP"
2297 fi
2298 CPP="$ac_cv_prog_CPP"
2299 else
2300 ac_cv_prog_CPP="$CPP"
2301 fi
2302 echo "$ac_t""$CPP" 1>&6
2303
2304 echo $ac_n "checking lex output file root""... $ac_c" 1>&6
2305 echo "configure:2306: checking lex output file root" >&5
2306 if eval "test \"`echo '$''{'ac_cv_prog_lex_root'+set}'`\" = set"; then
2307 echo $ac_n "(cached) $ac_c" 1>&6
2308 else
2309 # The minimal lex program is just a single line: %%. But some broken lexes
2310 # (Solaris, I think it was) want two %% lines, so accommodate them.
2311 echo '%%
2312 %%' | $LEX
2313 if test -f lex.yy.c; then
2314 ac_cv_prog_lex_root=lex.yy
2315 elif test -f lexyy.c; then
2316 ac_cv_prog_lex_root=lexyy
2317 else
2318 { echo "configure: error: cannot find output from $LEX; giving up" 1>&2; exit 1; }
2319 fi
2320 fi
2321
2322 echo "$ac_t""$ac_cv_prog_lex_root" 1>&6
2323 LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root
2324
2325 echo $ac_n "checking whether yytext is a pointer""... $ac_c" 1>&6
2326 echo "configure:2327: checking whether yytext is a pointer" >&5
2327 if eval "test \"`echo '$''{'ac_cv_prog_lex_yytext_pointer'+set}'`\" = set"; then
2328 echo $ac_n "(cached) $ac_c" 1>&6
2329 else
2330 # POSIX says lex can declare yytext either as a pointer or an array; the
2331 # default is implementation-dependent. Figure out which it is, since
2332 # not all implementations provide the %pointer and %array declarations.
2333 ac_cv_prog_lex_yytext_pointer=no
2334 echo 'extern char *yytext;' >>$LEX_OUTPUT_ROOT.c
2335 ac_save_LIBS="$LIBS"
2336 LIBS="$LIBS $LEXLIB"
2337 cat > conftest.$ac_ext <<EOF
2338 #line 2339 "configure"
2339 #include "confdefs.h"
2340 `cat $LEX_OUTPUT_ROOT.c`
2341 int main() {
2342
2343 ; return 0; }
2344 EOF
2345 if { (eval echo configure:2346: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2346 rm -rf conftest*
2347 ac_cv_prog_lex_yytext_pointer=yes
2348 else
2349 echo "configure: failed program was:" >&5
2350 cat conftest.$ac_ext >&5
2351 fi
2352 rm -f conftest*
2353 LIBS="$ac_save_LIBS"
2354 rm -f "${LEX_OUTPUT_ROOT}.c"
2355
2356 fi
2357
2358 echo "$ac_t""$ac_cv_prog_lex_yytext_pointer" 1>&6
2359 if test $ac_cv_prog_lex_yytext_pointer = yes; then
2360 cat >> confdefs.h <<\EOF
2361 #define YYTEXT_POINTER 1
2362 EOF
2363
2364 fi
2365
2366
2367 echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
2368 echo "configure:2369: checking whether to enable maintainer-specific portions of Makefiles" >&5
2369 # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
2370 if test "${enable_maintainer_mode+set}" = set; then
2371 enableval="$enable_maintainer_mode"
2372 USE_MAINTAINER_MODE=$enableval
2373 else
2374 USE_MAINTAINER_MODE=no
2375 fi
2376
2377 echo "$ac_t""$USE_MAINTAINER_MODE" 1>&6
2378 if test $USE_MAINTAINER_MODE = yes; then
2379 MAINT=
2380 else
2381 MAINT='#M#'
2382 fi
2383
2384
2385 echo $ac_n "checking for Cygwin32 environment""... $ac_c" 1>&6
2386 echo "configure:2387: checking for Cygwin32 environment" >&5
2387 if eval "test \"`echo '$''{'am_cv_cygwin32'+set}'`\" = set"; then
2388 echo $ac_n "(cached) $ac_c" 1>&6
2389 else
2390 cat > conftest.$ac_ext <<EOF
2391 #line 2392 "configure"
2392 #include "confdefs.h"
2393
2394 int main() {
2395 return __CYGWIN32__;
2396 ; return 0; }
2397 EOF
2398 if { (eval echo configure:2399: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2399 rm -rf conftest*
2400 am_cv_cygwin32=yes
2401 else
2402 echo "configure: failed program was:" >&5
2403 cat conftest.$ac_ext >&5
2404 rm -rf conftest*
2405 am_cv_cygwin32=no
2406 fi
2407 rm -f conftest*
2408 rm -f conftest*
2409 fi
2410
2411 echo "$ac_t""$am_cv_cygwin32" 1>&6
2412 CYGWIN32=
2413 test "$am_cv_cygwin32" = yes && CYGWIN32=yes
2414 echo $ac_n "checking for Mingw32 environment""... $ac_c" 1>&6
2415 echo "configure:2416: checking for Mingw32 environment" >&5
2416 if eval "test \"`echo '$''{'am_cv_mingw32'+set}'`\" = set"; then
2417 echo $ac_n "(cached) $ac_c" 1>&6
2418 else
2419 cat > conftest.$ac_ext <<EOF
2420 #line 2421 "configure"
2421 #include "confdefs.h"
2422
2423 int main() {
2424 return __MINGW32__;
2425 ; return 0; }
2426 EOF
2427 if { (eval echo configure:2428: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2428 rm -rf conftest*
2429 am_cv_mingw32=yes
2430 else
2431 echo "configure: failed program was:" >&5
2432 cat conftest.$ac_ext >&5
2433 rm -rf conftest*
2434 am_cv_mingw32=no
2435 fi
2436 rm -f conftest*
2437 rm -f conftest*
2438 fi
2439
2440 echo "$ac_t""$am_cv_mingw32" 1>&6
2441 MINGW32=
2442 test "$am_cv_mingw32" = yes && MINGW32=yes
2443
2444
2445 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
2446 echo "configure:2447: checking for executable suffix" >&5
2447 if eval "test \"`echo '$''{'am_cv_exeext'+set}'`\" = set"; then
2448 echo $ac_n "(cached) $ac_c" 1>&6
2449 else
2450
2451 if test "$CYGWIN32" = yes -o "$MINGW32" = yes; then
2452 am_cv_exeext=.exe
2453 else
2454 cat > am_c_test.c << 'EOF'
2455 int main() {
2456 /* Nothing needed here */
2457 }
2458 EOF
2459 ${CC-cc} -o am_c_test $CFLAGS $CPPFLAGS $LDFLAGS am_c_test.c $LIBS 1>&5
2460 am_cv_exeext=`echo am_c_test.* | grep -v am_c_test.c | sed -e s/am_c_test//`
2461 rm -f am_c_test*
2462 fi
2463
2464 test x"${am_cv_exeext}" = x && am_cv_exeext=no
2465 fi
2466 EXEEXT=""
2467 test x"${am_cv_exeext}" != xno && EXEEXT=${am_cv_exeext}
2468 echo "$ac_t""${am_cv_exeext}" 1>&6
2469
2470
2471 for ac_hdr in string.h stdlib.h memory.h strings.h unistd.h stdarg.h varargs.h errno.h sys/types.h
2472 do
2473 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2474 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2475 echo "configure:2476: checking for $ac_hdr" >&5
2476 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2477 echo $ac_n "(cached) $ac_c" 1>&6
2478 else
2479 cat > conftest.$ac_ext <<EOF
2480 #line 2481 "configure"
2481 #include "confdefs.h"
2482 #include <$ac_hdr>
2483 EOF
2484 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2485 { (eval echo configure:2486: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2486 ac_err=`grep -v '^ *+' conftest.out`
2487 if test -z "$ac_err"; then
2488 rm -rf conftest*
2489 eval "ac_cv_header_$ac_safe=yes"
2490 else
2491 echo "$ac_err" >&5
2492 echo "configure: failed program was:" >&5
2493 cat conftest.$ac_ext >&5
2494 rm -rf conftest*
2495 eval "ac_cv_header_$ac_safe=no"
2496 fi
2497 rm -f conftest*
2498 fi
2499 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2500 echo "$ac_t""yes" 1>&6
2501 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2502 cat >> confdefs.h <<EOF
2503 #define $ac_tr_hdr 1
2504 EOF
2505
2506 else
2507 echo "$ac_t""no" 1>&6
2508 fi
2509 done
2510
2511
2512 # Put this here so that autoconf's "cross-compiling" message doesn't confuse
2513 # people who are not cross-compiling but are compiling cross-assemblers.
2514 echo $ac_n "checking whether compiling a cross-assembler""... $ac_c" 1>&6
2515 echo "configure:2516: checking whether compiling a cross-assembler" >&5
2516 if test "${host}" = "${target}"; then
2517 cross_gas=no
2518 else
2519 cross_gas=yes
2520 cat >> confdefs.h <<\EOF
2521 #define CROSS_COMPILE 1
2522 EOF
2523
2524 fi
2525 echo "$ac_t""$cross_gas" 1>&6
2526
2527 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
2528 # for constant arguments. Useless!
2529 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
2530 echo "configure:2531: checking for working alloca.h" >&5
2531 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
2532 echo $ac_n "(cached) $ac_c" 1>&6
2533 else
2534 cat > conftest.$ac_ext <<EOF
2535 #line 2536 "configure"
2536 #include "confdefs.h"
2537 #include <alloca.h>
2538 int main() {
2539 char *p = alloca(2 * sizeof(int));
2540 ; return 0; }
2541 EOF
2542 if { (eval echo configure:2543: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2543 rm -rf conftest*
2544 ac_cv_header_alloca_h=yes
2545 else
2546 echo "configure: failed program was:" >&5
2547 cat conftest.$ac_ext >&5
2548 rm -rf conftest*
2549 ac_cv_header_alloca_h=no
2550 fi
2551 rm -f conftest*
2552 fi
2553
2554 echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
2555 if test $ac_cv_header_alloca_h = yes; then
2556 cat >> confdefs.h <<\EOF
2557 #define HAVE_ALLOCA_H 1
2558 EOF
2559
2560 fi
2561
2562 echo $ac_n "checking for alloca""... $ac_c" 1>&6
2563 echo "configure:2564: checking for alloca" >&5
2564 if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
2565 echo $ac_n "(cached) $ac_c" 1>&6
2566 else
2567 cat > conftest.$ac_ext <<EOF
2568 #line 2569 "configure"
2569 #include "confdefs.h"
2570
2571 #ifdef __GNUC__
2572 # define alloca __builtin_alloca
2573 #else
2574 # if HAVE_ALLOCA_H
2575 # include <alloca.h>
2576 # else
2577 # ifdef _AIX
2578 #pragma alloca
2579 # else
2580 # ifndef alloca /* predefined by HP cc +Olibcalls */
2581 char *alloca ();
2582 # endif
2583 # endif
2584 # endif
2585 #endif
2586
2587 int main() {
2588 char *p = (char *) alloca(1);
2589 ; return 0; }
2590 EOF
2591 if { (eval echo configure:2592: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2592 rm -rf conftest*
2593 ac_cv_func_alloca_works=yes
2594 else
2595 echo "configure: failed program was:" >&5
2596 cat conftest.$ac_ext >&5
2597 rm -rf conftest*
2598 ac_cv_func_alloca_works=no
2599 fi
2600 rm -f conftest*
2601 fi
2602
2603 echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
2604 if test $ac_cv_func_alloca_works = yes; then
2605 cat >> confdefs.h <<\EOF
2606 #define HAVE_ALLOCA 1
2607 EOF
2608
2609 fi
2610
2611 if test $ac_cv_func_alloca_works = no; then
2612 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
2613 # that cause trouble. Some versions do not even contain alloca or
2614 # contain a buggy version. If you still want to use their alloca,
2615 # use ar to extract alloca.o from them instead of compiling alloca.c.
2616 ALLOCA=alloca.o
2617 cat >> confdefs.h <<\EOF
2618 #define C_ALLOCA 1
2619 EOF
2620
2621
2622 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
2623 echo "configure:2624: checking whether alloca needs Cray hooks" >&5
2624 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
2625 echo $ac_n "(cached) $ac_c" 1>&6
2626 else
2627 cat > conftest.$ac_ext <<EOF
2628 #line 2629 "configure"
2629 #include "confdefs.h"
2630 #if defined(CRAY) && ! defined(CRAY2)
2631 webecray
2632 #else
2633 wenotbecray
2634 #endif
2635
2636 EOF
2637 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2638 egrep "webecray" >/dev/null 2>&1; then
2639 rm -rf conftest*
2640 ac_cv_os_cray=yes
2641 else
2642 rm -rf conftest*
2643 ac_cv_os_cray=no
2644 fi
2645 rm -f conftest*
2646
2647 fi
2648
2649 echo "$ac_t""$ac_cv_os_cray" 1>&6
2650 if test $ac_cv_os_cray = yes; then
2651 for ac_func in _getb67 GETB67 getb67; do
2652 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2653 echo "configure:2654: checking for $ac_func" >&5
2654 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2655 echo $ac_n "(cached) $ac_c" 1>&6
2656 else
2657 cat > conftest.$ac_ext <<EOF
2658 #line 2659 "configure"
2659 #include "confdefs.h"
2660 /* System header to define __stub macros and hopefully few prototypes,
2661 which can conflict with char $ac_func(); below. */
2662 #include <assert.h>
2663 /* Override any gcc2 internal prototype to avoid an error. */
2664 /* We use char because int might match the return type of a gcc2
2665 builtin and then its argument prototype would still apply. */
2666 char $ac_func();
2667
2668 int main() {
2669
2670 /* The GNU C library defines this for functions which it implements
2671 to always fail with ENOSYS. Some functions are actually named
2672 something starting with __ and the normal name is an alias. */
2673 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2674 choke me
2675 #else
2676 $ac_func();
2677 #endif
2678
2679 ; return 0; }
2680 EOF
2681 if { (eval echo configure:2682: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2682 rm -rf conftest*
2683 eval "ac_cv_func_$ac_func=yes"
2684 else
2685 echo "configure: failed program was:" >&5
2686 cat conftest.$ac_ext >&5
2687 rm -rf conftest*
2688 eval "ac_cv_func_$ac_func=no"
2689 fi
2690 rm -f conftest*
2691 fi
2692
2693 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2694 echo "$ac_t""yes" 1>&6
2695 cat >> confdefs.h <<EOF
2696 #define CRAY_STACKSEG_END $ac_func
2697 EOF
2698
2699 break
2700 else
2701 echo "$ac_t""no" 1>&6
2702 fi
2703
2704 done
2705 fi
2706
2707 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
2708 echo "configure:2709: checking stack direction for C alloca" >&5
2709 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
2710 echo $ac_n "(cached) $ac_c" 1>&6
2711 else
2712 if test "$cross_compiling" = yes; then
2713 ac_cv_c_stack_direction=0
2714 else
2715 cat > conftest.$ac_ext <<EOF
2716 #line 2717 "configure"
2717 #include "confdefs.h"
2718 find_stack_direction ()
2719 {
2720 static char *addr = 0;
2721 auto char dummy;
2722 if (addr == 0)
2723 {
2724 addr = &dummy;
2725 return find_stack_direction ();
2726 }
2727 else
2728 return (&dummy > addr) ? 1 : -1;
2729 }
2730 main ()
2731 {
2732 exit (find_stack_direction() < 0);
2733 }
2734 EOF
2735 if { (eval echo configure:2736: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
2736 then
2737 ac_cv_c_stack_direction=1
2738 else
2739 echo "configure: failed program was:" >&5
2740 cat conftest.$ac_ext >&5
2741 rm -fr conftest*
2742 ac_cv_c_stack_direction=-1
2743 fi
2744 rm -fr conftest*
2745 fi
2746
2747 fi
2748
2749 echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
2750 cat >> confdefs.h <<EOF
2751 #define STACK_DIRECTION $ac_cv_c_stack_direction
2752 EOF
2753
2754 fi
2755
2756 echo $ac_n "checking for inline""... $ac_c" 1>&6
2757 echo "configure:2758: checking for inline" >&5
2758 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
2759 echo $ac_n "(cached) $ac_c" 1>&6
2760 else
2761 ac_cv_c_inline=no
2762 for ac_kw in inline __inline__ __inline; do
2763 cat > conftest.$ac_ext <<EOF
2764 #line 2765 "configure"
2765 #include "confdefs.h"
2766
2767 int main() {
2768 } $ac_kw foo() {
2769 ; return 0; }
2770 EOF
2771 if { (eval echo configure:2772: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2772 rm -rf conftest*
2773 ac_cv_c_inline=$ac_kw; break
2774 else
2775 echo "configure: failed program was:" >&5
2776 cat conftest.$ac_ext >&5
2777 fi
2778 rm -f conftest*
2779 done
2780
2781 fi
2782
2783 echo "$ac_t""$ac_cv_c_inline" 1>&6
2784 case "$ac_cv_c_inline" in
2785 inline | yes) ;;
2786 no) cat >> confdefs.h <<\EOF
2787 #define inline
2788 EOF
2789 ;;
2790 *) cat >> confdefs.h <<EOF
2791 #define inline $ac_cv_c_inline
2792 EOF
2793 ;;
2794 esac
2795
2796
2797 # VMS doesn't have unlink.
2798 for ac_func in unlink remove
2799 do
2800 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2801 echo "configure:2802: checking for $ac_func" >&5
2802 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2803 echo $ac_n "(cached) $ac_c" 1>&6
2804 else
2805 cat > conftest.$ac_ext <<EOF
2806 #line 2807 "configure"
2807 #include "confdefs.h"
2808 /* System header to define __stub macros and hopefully few prototypes,
2809 which can conflict with char $ac_func(); below. */
2810 #include <assert.h>
2811 /* Override any gcc2 internal prototype to avoid an error. */
2812 /* We use char because int might match the return type of a gcc2
2813 builtin and then its argument prototype would still apply. */
2814 char $ac_func();
2815
2816 int main() {
2817
2818 /* The GNU C library defines this for functions which it implements
2819 to always fail with ENOSYS. Some functions are actually named
2820 something starting with __ and the normal name is an alias. */
2821 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2822 choke me
2823 #else
2824 $ac_func();
2825 #endif
2826
2827 ; return 0; }
2828 EOF
2829 if { (eval echo configure:2830: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2830 rm -rf conftest*
2831 eval "ac_cv_func_$ac_func=yes"
2832 else
2833 echo "configure: failed program was:" >&5
2834 cat conftest.$ac_ext >&5
2835 rm -rf conftest*
2836 eval "ac_cv_func_$ac_func=no"
2837 fi
2838 rm -f conftest*
2839 fi
2840
2841 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2842 echo "$ac_t""yes" 1>&6
2843 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2844 cat >> confdefs.h <<EOF
2845 #define $ac_tr_func 1
2846 EOF
2847 break
2848 else
2849 echo "$ac_t""no" 1>&6
2850 fi
2851 done
2852
2853
2854 # Some systems don't have sbrk().
2855 for ac_func in sbrk
2856 do
2857 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2858 echo "configure:2859: checking for $ac_func" >&5
2859 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2860 echo $ac_n "(cached) $ac_c" 1>&6
2861 else
2862 cat > conftest.$ac_ext <<EOF
2863 #line 2864 "configure"
2864 #include "confdefs.h"
2865 /* System header to define __stub macros and hopefully few prototypes,
2866 which can conflict with char $ac_func(); below. */
2867 #include <assert.h>
2868 /* Override any gcc2 internal prototype to avoid an error. */
2869 /* We use char because int might match the return type of a gcc2
2870 builtin and then its argument prototype would still apply. */
2871 char $ac_func();
2872
2873 int main() {
2874
2875 /* The GNU C library defines this for functions which it implements
2876 to always fail with ENOSYS. Some functions are actually named
2877 something starting with __ and the normal name is an alias. */
2878 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2879 choke me
2880 #else
2881 $ac_func();
2882 #endif
2883
2884 ; return 0; }
2885 EOF
2886 if { (eval echo configure:2887: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2887 rm -rf conftest*
2888 eval "ac_cv_func_$ac_func=yes"
2889 else
2890 echo "configure: failed program was:" >&5
2891 cat conftest.$ac_ext >&5
2892 rm -rf conftest*
2893 eval "ac_cv_func_$ac_func=no"
2894 fi
2895 rm -f conftest*
2896 fi
2897
2898 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2899 echo "$ac_t""yes" 1>&6
2900 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2901 cat >> confdefs.h <<EOF
2902 #define $ac_tr_func 1
2903 EOF
2904
2905 else
2906 echo "$ac_t""no" 1>&6
2907 fi
2908 done
2909
2910
2911 # Some non-ANSI preprocessors botch requoting inside strings. That's bad
2912 # enough, but on some of those systems, the assert macro relies on requoting
2913 # working properly!
2914 echo $ac_n "checking for working assert macro""... $ac_c" 1>&6
2915 echo "configure:2916: checking for working assert macro" >&5
2916 if eval "test \"`echo '$''{'gas_cv_assert_ok'+set}'`\" = set"; then
2917 echo $ac_n "(cached) $ac_c" 1>&6
2918 else
2919 cat > conftest.$ac_ext <<EOF
2920 #line 2921 "configure"
2921 #include "confdefs.h"
2922 #include <assert.h>
2923 #include <stdio.h>
2924 int main() {
2925
2926 /* check for requoting problems */
2927 static int a, b, c, d;
2928 static char *s;
2929 assert (!strcmp(s, "foo bar baz quux"));
2930 /* check for newline handling */
2931 assert (a == b
2932 || c == d);
2933
2934 ; return 0; }
2935 EOF
2936 if { (eval echo configure:2937: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2937 rm -rf conftest*
2938 gas_cv_assert_ok=yes
2939 else
2940 echo "configure: failed program was:" >&5
2941 cat conftest.$ac_ext >&5
2942 rm -rf conftest*
2943 gas_cv_assert_ok=no
2944 fi
2945 rm -f conftest*
2946 fi
2947 echo "$ac_t""$gas_cv_assert_ok" 1>&6
2948 test $gas_cv_assert_ok = yes || cat >> confdefs.h <<\EOF
2949 #define BROKEN_ASSERT 1
2950 EOF
2951
2952
2953
2954 # On some systems, the system header files may not declare malloc, realloc,
2955 # and free. There are places where gas needs these functions to have been
2956 # declared -- such as when taking their addresses.
2957 gas_test_headers="
2958 #ifdef HAVE_MEMORY_H
2959 #include <memory.h>
2960 #endif
2961 #ifdef HAVE_STRING_H
2962 #include <string.h>
2963 #else
2964 #ifdef HAVE_STRINGS_H
2965 #include <strings.h>
2966 #endif
2967 #endif
2968 #ifdef HAVE_STDLIB_H
2969 #include <stdlib.h>
2970 #endif
2971 #ifdef HAVE_UNISTD_H
2972 #include <unistd.h>
2973 #endif
2974 "
2975
2976 echo $ac_n "checking whether declaration is required for strstr""... $ac_c" 1>&6
2977 echo "configure:2978: checking whether declaration is required for strstr" >&5
2978 if eval "test \"`echo '$''{'gas_cv_decl_needed_strstr'+set}'`\" = set"; then
2979 echo $ac_n "(cached) $ac_c" 1>&6
2980 else
2981 cat > conftest.$ac_ext <<EOF
2982 #line 2983 "configure"
2983 #include "confdefs.h"
2984 $gas_test_headers
2985 int main() {
2986
2987 typedef char *(*f)();
2988 f x;
2989 x = (f) strstr;
2990
2991 ; return 0; }
2992 EOF
2993 if { (eval echo configure:2994: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2994 rm -rf conftest*
2995 gas_cv_decl_needed_strstr=no
2996 else
2997 echo "configure: failed program was:" >&5
2998 cat conftest.$ac_ext >&5
2999 rm -rf conftest*
3000 gas_cv_decl_needed_strstr=yes
3001 fi
3002 rm -f conftest*
3003 fi
3004 echo "$ac_t""$gas_cv_decl_needed_strstr" 1>&6
3005 test $gas_cv_decl_needed_strstr = no || {
3006 cat >> confdefs.h <<\EOF
3007 #define NEED_DECLARATION_STRSTR 1
3008 EOF
3009
3010 }
3011
3012
3013 echo $ac_n "checking whether declaration is required for malloc""... $ac_c" 1>&6
3014 echo "configure:3015: checking whether declaration is required for malloc" >&5
3015 if eval "test \"`echo '$''{'gas_cv_decl_needed_malloc'+set}'`\" = set"; then
3016 echo $ac_n "(cached) $ac_c" 1>&6
3017 else
3018 cat > conftest.$ac_ext <<EOF
3019 #line 3020 "configure"
3020 #include "confdefs.h"
3021 $gas_test_headers
3022 int main() {
3023
3024 typedef char *(*f)();
3025 f x;
3026 x = (f) malloc;
3027
3028 ; return 0; }
3029 EOF
3030 if { (eval echo configure:3031: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3031 rm -rf conftest*
3032 gas_cv_decl_needed_malloc=no
3033 else
3034 echo "configure: failed program was:" >&5
3035 cat conftest.$ac_ext >&5
3036 rm -rf conftest*
3037 gas_cv_decl_needed_malloc=yes
3038 fi
3039 rm -f conftest*
3040 fi
3041 echo "$ac_t""$gas_cv_decl_needed_malloc" 1>&6
3042 test $gas_cv_decl_needed_malloc = no || {
3043 cat >> confdefs.h <<\EOF
3044 #define NEED_DECLARATION_MALLOC 1
3045 EOF
3046
3047 }
3048
3049
3050 echo $ac_n "checking whether declaration is required for free""... $ac_c" 1>&6
3051 echo "configure:3052: checking whether declaration is required for free" >&5
3052 if eval "test \"`echo '$''{'gas_cv_decl_needed_free'+set}'`\" = set"; then
3053 echo $ac_n "(cached) $ac_c" 1>&6
3054 else
3055 cat > conftest.$ac_ext <<EOF
3056 #line 3057 "configure"
3057 #include "confdefs.h"
3058 $gas_test_headers
3059 int main() {
3060
3061 typedef void (*f)();
3062 f x;
3063 x = (f) free;
3064
3065 ; return 0; }
3066 EOF
3067 if { (eval echo configure:3068: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3068 rm -rf conftest*
3069 gas_cv_decl_needed_free=no
3070 else
3071 echo "configure: failed program was:" >&5
3072 cat conftest.$ac_ext >&5
3073 rm -rf conftest*
3074 gas_cv_decl_needed_free=yes
3075 fi
3076 rm -f conftest*
3077 fi
3078 echo "$ac_t""$gas_cv_decl_needed_free" 1>&6
3079 test $gas_cv_decl_needed_free = no || {
3080 cat >> confdefs.h <<\EOF
3081 #define NEED_DECLARATION_FREE 1
3082 EOF
3083
3084 }
3085
3086
3087 echo $ac_n "checking whether declaration is required for sbrk""... $ac_c" 1>&6
3088 echo "configure:3089: checking whether declaration is required for sbrk" >&5
3089 if eval "test \"`echo '$''{'gas_cv_decl_needed_sbrk'+set}'`\" = set"; then
3090 echo $ac_n "(cached) $ac_c" 1>&6
3091 else
3092 cat > conftest.$ac_ext <<EOF
3093 #line 3094 "configure"
3094 #include "confdefs.h"
3095 $gas_test_headers
3096 int main() {
3097
3098 typedef char *(*f)();
3099 f x;
3100 x = (f) sbrk;
3101
3102 ; return 0; }
3103 EOF
3104 if { (eval echo configure:3105: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3105 rm -rf conftest*
3106 gas_cv_decl_needed_sbrk=no
3107 else
3108 echo "configure: failed program was:" >&5
3109 cat conftest.$ac_ext >&5
3110 rm -rf conftest*
3111 gas_cv_decl_needed_sbrk=yes
3112 fi
3113 rm -f conftest*
3114 fi
3115 echo "$ac_t""$gas_cv_decl_needed_sbrk" 1>&6
3116 test $gas_cv_decl_needed_sbrk = no || {
3117 cat >> confdefs.h <<\EOF
3118 #define NEED_DECLARATION_SBRK 1
3119 EOF
3120
3121 }
3122
3123
3124 # Does errno.h declare errno, or do we have to add a separate declaration
3125 # for it?
3126
3127 echo $ac_n "checking whether declaration is required for errno""... $ac_c" 1>&6
3128 echo "configure:3129: checking whether declaration is required for errno" >&5
3129 if eval "test \"`echo '$''{'gas_cv_decl_needed_errno'+set}'`\" = set"; then
3130 echo $ac_n "(cached) $ac_c" 1>&6
3131 else
3132 cat > conftest.$ac_ext <<EOF
3133 #line 3134 "configure"
3134 #include "confdefs.h"
3135
3136 #ifdef HAVE_ERRNO_H
3137 #include <errno.h>
3138 #endif
3139
3140 int main() {
3141
3142 typedef int f;
3143 f x;
3144 x = (f) errno;
3145
3146 ; return 0; }
3147 EOF
3148 if { (eval echo configure:3149: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3149 rm -rf conftest*
3150 gas_cv_decl_needed_errno=no
3151 else
3152 echo "configure: failed program was:" >&5
3153 cat conftest.$ac_ext >&5
3154 rm -rf conftest*
3155 gas_cv_decl_needed_errno=yes
3156 fi
3157 rm -f conftest*
3158 fi
3159 echo "$ac_t""$gas_cv_decl_needed_errno" 1>&6
3160 test $gas_cv_decl_needed_errno = no || {
3161 cat >> confdefs.h <<\EOF
3162 #define NEED_DECLARATION_ERRNO 1
3163 EOF
3164
3165 }
3166
3167
3168
3169
3170 trap '' 1 2 15
3171 cat > confcache <<\EOF
3172 # This file is a shell script that caches the results of configure
3173 # tests run on this system so they can be shared between configure
3174 # scripts and configure runs. It is not useful on other systems.
3175 # If it contains results you don't want to keep, you may remove or edit it.
3176 #
3177 # By default, configure uses ./config.cache as the cache file,
3178 # creating it if it does not exist already. You can give configure
3179 # the --cache-file=FILE option to use a different cache file; that is
3180 # what configure does when it calls configure scripts in
3181 # subdirectories, so they share the cache.
3182 # Giving --cache-file=/dev/null disables caching, for debugging configure.
3183 # config.status only pays attention to the cache file if you give it the
3184 # --recheck option to rerun configure.
3185 #
3186 EOF
3187 # The following way of writing the cache mishandles newlines in values,
3188 # but we know of no workaround that is simple, portable, and efficient.
3189 # So, don't put newlines in cache variables' values.
3190 # Ultrix sh set writes to stderr and can't be redirected directly,
3191 # and sets the high bit in the cache file unless we assign to the vars.
3192 (set) 2>&1 |
3193 case `(ac_space=' '; set) 2>&1 | grep ac_space` in
3194 *ac_space=\ *)
3195 # `set' does not quote correctly, so add quotes (double-quote substitution
3196 # turns \\\\ into \\, and sed turns \\ into \).
3197 sed -n \
3198 -e "s/'/'\\\\''/g" \
3199 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
3200 ;;
3201 *)
3202 # `set' quotes correctly as required by POSIX, so do not add quotes.
3203 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
3204 ;;
3205 esac >> confcache
3206 if cmp -s $cache_file confcache; then
3207 :
3208 else
3209 if test -w $cache_file; then
3210 echo "updating cache $cache_file"
3211 cat confcache > $cache_file
3212 else
3213 echo "not updating unwritable cache $cache_file"
3214 fi
3215 fi
3216 rm -f confcache
3217
3218 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
3219
3220 test "x$prefix" = xNONE && prefix=$ac_default_prefix
3221 # Let make expand exec_prefix.
3222 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
3223
3224 # Any assignment to VPATH causes Sun make to only execute
3225 # the first set of double-colon rules, so remove it if not needed.
3226 # If there is a colon in the path, we need to keep it.
3227 if test "x$srcdir" = x.; then
3228 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
3229 fi
3230
3231 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
3232
3233 DEFS=-DHAVE_CONFIG_H
3234
3235 # Without the "./", some shells look in PATH for config.status.
3236 : ${CONFIG_STATUS=./config.status}
3237
3238 echo creating $CONFIG_STATUS
3239 rm -f $CONFIG_STATUS
3240 cat > $CONFIG_STATUS <<EOF
3241 #! /bin/sh
3242 # Generated automatically by configure.
3243 # Run this file to recreate the current configuration.
3244 # This directory was configured as follows,
3245 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
3246 #
3247 # $0 $ac_configure_args
3248 #
3249 # Compiler output produced by configure, useful for debugging
3250 # configure, is in ./config.log if it exists.
3251
3252 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
3253 for ac_option
3254 do
3255 case "\$ac_option" in
3256 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
3257 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
3258 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
3259 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
3260 echo "$CONFIG_STATUS generated by autoconf version 2.12.1"
3261 exit 0 ;;
3262 -help | --help | --hel | --he | --h)
3263 echo "\$ac_cs_usage"; exit 0 ;;
3264 *) echo "\$ac_cs_usage"; exit 1 ;;
3265 esac
3266 done
3267
3268 ac_given_srcdir=$srcdir
3269 ac_given_INSTALL="$INSTALL"
3270
3271 trap 'rm -fr `echo "Makefile doc/Makefile .gdbinit:gdbinit.in config.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
3272 EOF
3273 cat >> $CONFIG_STATUS <<EOF
3274
3275 # Protect against being on the right side of a sed subst in config.status.
3276 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
3277 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
3278 $ac_vpsub
3279 $extrasub
3280 s%@SHELL@%$SHELL%g
3281 s%@CFLAGS@%$CFLAGS%g
3282 s%@CPPFLAGS@%$CPPFLAGS%g
3283 s%@CXXFLAGS@%$CXXFLAGS%g
3284 s%@DEFS@%$DEFS%g
3285 s%@LDFLAGS@%$LDFLAGS%g
3286 s%@LIBS@%$LIBS%g
3287 s%@exec_prefix@%$exec_prefix%g
3288 s%@prefix@%$prefix%g
3289 s%@program_transform_name@%$program_transform_name%g
3290 s%@bindir@%$bindir%g
3291 s%@sbindir@%$sbindir%g
3292 s%@libexecdir@%$libexecdir%g
3293 s%@datadir@%$datadir%g
3294 s%@sysconfdir@%$sysconfdir%g
3295 s%@sharedstatedir@%$sharedstatedir%g
3296 s%@localstatedir@%$localstatedir%g
3297 s%@libdir@%$libdir%g
3298 s%@includedir@%$includedir%g
3299 s%@oldincludedir@%$oldincludedir%g
3300 s%@infodir@%$infodir%g
3301 s%@mandir@%$mandir%g
3302 s%@host@%$host%g
3303 s%@host_alias@%$host_alias%g
3304 s%@host_cpu@%$host_cpu%g
3305 s%@host_vendor@%$host_vendor%g
3306 s%@host_os@%$host_os%g
3307 s%@target@%$target%g
3308 s%@target_alias@%$target_alias%g
3309 s%@target_cpu@%$target_cpu%g
3310 s%@target_vendor@%$target_vendor%g
3311 s%@target_os@%$target_os%g
3312 s%@build@%$build%g
3313 s%@build_alias@%$build_alias%g
3314 s%@build_cpu@%$build_cpu%g
3315 s%@build_vendor@%$build_vendor%g
3316 s%@build_os@%$build_os%g
3317 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
3318 s%@INSTALL_DATA@%$INSTALL_DATA%g
3319 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
3320 s%@PACKAGE@%$PACKAGE%g
3321 s%@VERSION@%$VERSION%g
3322 s%@ACLOCAL@%$ACLOCAL%g
3323 s%@AUTOCONF@%$AUTOCONF%g
3324 s%@AUTOMAKE@%$AUTOMAKE%g
3325 s%@AUTOHEADER@%$AUTOHEADER%g
3326 s%@MAKEINFO@%$MAKEINFO%g
3327 s%@SET_MAKE@%$SET_MAKE%g
3328 s%@CC@%$CC%g
3329 s%@RANLIB@%$RANLIB%g
3330 s%@LD@%$LD%g
3331 s%@LN_S@%$LN_S%g
3332 s%@LIBTOOL@%$LIBTOOL%g
3333 s%@extra_objects@%$extra_objects%g
3334 s%@target_cpu_type@%$target_cpu_type%g
3335 s%@obj_format@%$obj_format%g
3336 s%@te_file@%$te_file%g
3337 s%@atof@%$atof%g
3338 s%@BFDLIB@%$BFDLIB%g
3339 s%@OPCODES_LIB@%$OPCODES_LIB%g
3340 s%@ALL_OBJ_DEPS@%$ALL_OBJ_DEPS%g
3341 s%@YACC@%$YACC%g
3342 s%@LEX@%$LEX%g
3343 s%@LEXLIB@%$LEXLIB%g
3344 s%@CPP@%$CPP%g
3345 s%@LEX_OUTPUT_ROOT@%$LEX_OUTPUT_ROOT%g
3346 s%@MAINT@%$MAINT%g
3347 s%@EXEEXT@%$EXEEXT%g
3348 s%@ALLOCA@%$ALLOCA%g
3349
3350 CEOF
3351 EOF
3352
3353 cat >> $CONFIG_STATUS <<\EOF
3354
3355 # Split the substitutions into bite-sized pieces for seds with
3356 # small command number limits, like on Digital OSF/1 and HP-UX.
3357 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
3358 ac_file=1 # Number of current file.
3359 ac_beg=1 # First line for current file.
3360 ac_end=$ac_max_sed_cmds # Line after last line for current file.
3361 ac_more_lines=:
3362 ac_sed_cmds=""
3363 while $ac_more_lines; do
3364 if test $ac_beg -gt 1; then
3365 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
3366 else
3367 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
3368 fi
3369 if test ! -s conftest.s$ac_file; then
3370 ac_more_lines=false
3371 rm -f conftest.s$ac_file
3372 else
3373 if test -z "$ac_sed_cmds"; then
3374 ac_sed_cmds="sed -f conftest.s$ac_file"
3375 else
3376 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
3377 fi
3378 ac_file=`expr $ac_file + 1`
3379 ac_beg=$ac_end
3380 ac_end=`expr $ac_end + $ac_max_sed_cmds`
3381 fi
3382 done
3383 if test -z "$ac_sed_cmds"; then
3384 ac_sed_cmds=cat
3385 fi
3386 EOF
3387
3388 cat >> $CONFIG_STATUS <<EOF
3389
3390 CONFIG_FILES=\${CONFIG_FILES-"Makefile doc/Makefile .gdbinit:gdbinit.in"}
3391 EOF
3392 cat >> $CONFIG_STATUS <<\EOF
3393 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
3394 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
3395 case "$ac_file" in
3396 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
3397 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
3398 *) ac_file_in="${ac_file}.in" ;;
3399 esac
3400
3401 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
3402
3403 # Remove last slash and all that follows it. Not all systems have dirname.
3404 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
3405 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
3406 # The file is in a subdirectory.
3407 test ! -d "$ac_dir" && mkdir "$ac_dir"
3408 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
3409 # A "../" for each directory in $ac_dir_suffix.
3410 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
3411 else
3412 ac_dir_suffix= ac_dots=
3413 fi
3414
3415 case "$ac_given_srcdir" in
3416 .) srcdir=.
3417 if test -z "$ac_dots"; then top_srcdir=.
3418 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
3419 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
3420 *) # Relative path.
3421 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
3422 top_srcdir="$ac_dots$ac_given_srcdir" ;;
3423 esac
3424
3425 case "$ac_given_INSTALL" in
3426 [/$]*) INSTALL="$ac_given_INSTALL" ;;
3427 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
3428 esac
3429
3430 echo creating "$ac_file"
3431 rm -f "$ac_file"
3432 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
3433 case "$ac_file" in
3434 *Makefile*) ac_comsub="1i\\
3435 # $configure_input" ;;
3436 *) ac_comsub= ;;
3437 esac
3438
3439 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
3440 sed -e "$ac_comsub
3441 s%@configure_input@%$configure_input%g
3442 s%@srcdir@%$srcdir%g
3443 s%@top_srcdir@%$top_srcdir%g
3444 s%@INSTALL@%$INSTALL%g
3445 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
3446 fi; done
3447 rm -f conftest.s*
3448
3449 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
3450 # NAME is the cpp macro being defined and VALUE is the value it is being given.
3451 #
3452 # ac_d sets the value in "#define NAME VALUE" lines.
3453 ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
3454 ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
3455 ac_dC='\3'
3456 ac_dD='%g'
3457 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
3458 ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
3459 ac_uB='\([ ]\)%\1#\2define\3'
3460 ac_uC=' '
3461 ac_uD='\4%g'
3462 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
3463 ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
3464 ac_eB='$%\1#\2define\3'
3465 ac_eC=' '
3466 ac_eD='%g'
3467
3468 if test "${CONFIG_HEADERS+set}" != set; then
3469 EOF
3470 cat >> $CONFIG_STATUS <<EOF
3471 CONFIG_HEADERS="config.h:config.in"
3472 EOF
3473 cat >> $CONFIG_STATUS <<\EOF
3474 fi
3475 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
3476 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
3477 case "$ac_file" in
3478 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
3479 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
3480 *) ac_file_in="${ac_file}.in" ;;
3481 esac
3482
3483 echo creating $ac_file
3484
3485 rm -f conftest.frag conftest.in conftest.out
3486 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
3487 cat $ac_file_inputs > conftest.in
3488
3489 EOF
3490
3491 # Transform confdefs.h into a sed script conftest.vals that substitutes
3492 # the proper values into config.h.in to produce config.h. And first:
3493 # Protect against being on the right side of a sed subst in config.status.
3494 # Protect against being in an unquoted here document in config.status.
3495 rm -f conftest.vals
3496 cat > conftest.hdr <<\EOF
3497 s/[\\&%]/\\&/g
3498 s%[\\$`]%\\&%g
3499 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
3500 s%ac_d%ac_u%gp
3501 s%ac_u%ac_e%gp
3502 EOF
3503 sed -n -f conftest.hdr confdefs.h > conftest.vals
3504 rm -f conftest.hdr
3505
3506 # This sed command replaces #undef with comments. This is necessary, for
3507 # example, in the case of _POSIX_SOURCE, which is predefined and required
3508 # on some systems where configure will not decide to define it.
3509 cat >> conftest.vals <<\EOF
3510 s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
3511 EOF
3512
3513 # Break up conftest.vals because some shells have a limit on
3514 # the size of here documents, and old seds have small limits too.
3515
3516 rm -f conftest.tail
3517 while :
3518 do
3519 ac_lines=`grep -c . conftest.vals`
3520 # grep -c gives empty output for an empty file on some AIX systems.
3521 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
3522 # Write a limited-size here document to conftest.frag.
3523 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
3524 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
3525 echo 'CEOF
3526 sed -f conftest.frag conftest.in > conftest.out
3527 rm -f conftest.in
3528 mv conftest.out conftest.in
3529 ' >> $CONFIG_STATUS
3530 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
3531 rm -f conftest.vals
3532 mv conftest.tail conftest.vals
3533 done
3534 rm -f conftest.vals
3535
3536 cat >> $CONFIG_STATUS <<\EOF
3537 rm -f conftest.frag conftest.h
3538 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
3539 cat conftest.in >> conftest.h
3540 rm -f conftest.in
3541 if cmp -s $ac_file conftest.h 2>/dev/null; then
3542 echo "$ac_file is unchanged"
3543 rm -f conftest.h
3544 else
3545 # Remove last slash and all that follows it. Not all systems have dirname.
3546 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
3547 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
3548 # The file is in a subdirectory.
3549 test ! -d "$ac_dir" && mkdir "$ac_dir"
3550 fi
3551 rm -f $ac_file
3552 mv conftest.h $ac_file
3553 fi
3554 fi; done
3555
3556 EOF
3557 cat >> $CONFIG_STATUS <<EOF
3558
3559 target_cpu_type=${target_cpu_type}
3560 obj_format=${obj_format}
3561 te_file=${te_file}
3562 EOF
3563 cat >> $CONFIG_STATUS <<\EOF
3564 test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h
3565 rm -f targ-cpu.c targ-cpu.h obj-format.h obj-format.c targ-env.h atof-targ.c itbl-cpu.h
3566 echo '#include "tc-'"${target_cpu_type}"'.h"' > targ-cpu.h
3567 echo '#include "obj-'"${obj_format}"'.h"' > obj-format.h
3568 echo '#include "te-'"${te_file}"'.h"' > targ-env.h
3569 echo '#include "itbl-'"${target_cpu_type}"'.h"' > itbl-cpu.h
3570 case ${target_cpu_type} in
3571 m32r) echo '#include "opcodes/'"${target_cpu_type}"'-opc.h"' > cgen-opc.h ;;
3572 esac
3573 exit 0
3574 EOF
3575 chmod +x $CONFIG_STATUS
3576 rm -fr confdefs* $ac_clean_files
3577 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
3578
This page took 0.171639 seconds and 5 git commands to generate.