* gas/h8300/{movb.s,movw.s}: Correct predecrement syntax.
[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.8
5 # Copyright (C) 1992, 1993, 1994 Free Software Foundation, Inc.
6 #
7 # This configure script is free software; the Free Software Foundation
8 # gives unlimited permission to copy, distribute and modify it.
9
10 # Defaults:
11 ac_help=
12 ac_default_prefix=/usr/local
13 # Any additions from configure.in:
14 ac_help="$ac_help
15 --enable-bfd-assembler use BFD back end for writing object files"
16 ac_help="$ac_help
17 targets alternative target configurations besides the primary"
18 ac_help="$ac_help
19 --enable-shared build shared BFD library"
20
21 # Initialize some variables set by options.
22 # The variables have the same names as the options, with
23 # dashes changed to underlines.
24 build=NONE
25 cache_file=./config.cache
26 exec_prefix=NONE
27 host=NONE
28 no_create=
29 nonopt=NONE
30 no_recursion=
31 prefix=NONE
32 program_prefix=NONE
33 program_suffix=NONE
34 program_transform_name=s,x,x,
35 silent=
36 site=
37 srcdir=
38 target=NONE
39 verbose=
40 x_includes=NONE
41 x_libraries=NONE
42 bindir='${exec_prefix}/bin'
43 sbindir='${exec_prefix}/sbin'
44 libexecdir='${exec_prefix}/libexec'
45 datadir='${prefix}/share'
46 sysconfdir='${prefix}/etc'
47 sharedstatedir='${prefix}/com'
48 localstatedir='${prefix}/var'
49 libdir='${exec_prefix}/lib'
50 includedir='${prefix}/include'
51 oldincludedir='/usr/include'
52 infodir='${prefix}/info'
53 mandir='${prefix}/man'
54
55 # Initialize some other variables.
56 subdirs=
57 MFLAGS= MAKEFLAGS=
58
59 ac_prev=
60 for ac_option
61 do
62
63 # If the previous option needs an argument, assign it.
64 if test -n "$ac_prev"; then
65 eval "$ac_prev=\$ac_option"
66 ac_prev=
67 continue
68 fi
69
70 case "$ac_option" in
71 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
72 *) ac_optarg= ;;
73 esac
74
75 # Accept the important Cygnus configure options, so we can diagnose typos.
76
77 case "$ac_option" in
78
79 -bindir | --bindir | --bindi | --bind | --bin | --bi)
80 ac_prev=bindir ;;
81 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
82 bindir="$ac_optarg" ;;
83
84 -build | --build | --buil | --bui | --bu)
85 ac_prev=build ;;
86 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
87 build="$ac_optarg" ;;
88
89 -cache-file | --cache-file | --cache-fil | --cache-fi \
90 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
91 ac_prev=cache_file ;;
92 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
93 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
94 cache_file="$ac_optarg" ;;
95
96 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
97 ac_prev=datadir ;;
98 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
99 | --da=*)
100 datadir="$ac_optarg" ;;
101
102 -disable-* | --disable-*)
103 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
104 # Reject names that are not valid shell variable names.
105 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
106 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
107 fi
108 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
109 eval "enable_${ac_feature}=no" ;;
110
111 -enable-* | --enable-*)
112 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
113 # Reject names that are not valid shell variable names.
114 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
115 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
116 fi
117 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
118 case "$ac_option" in
119 *=*) ;;
120 *) ac_optarg=yes ;;
121 esac
122 eval "enable_${ac_feature}='$ac_optarg'" ;;
123
124 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
125 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
126 | --exec | --exe | --ex)
127 ac_prev=exec_prefix ;;
128 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
129 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
130 | --exec=* | --exe=* | --ex=*)
131 exec_prefix="$ac_optarg" ;;
132
133 -gas | --gas | --ga | --g)
134 # Obsolete; use --with-gas.
135 with_gas=yes ;;
136
137 -help | --help | --hel | --he)
138 # Omit some internal or obsolete options to make the list less imposing.
139 # This message is too long to be a string in the A/UX 3.1 sh.
140 cat << EOF
141 Usage: configure [options] [host]
142 Options: [defaults in brackets after descriptions]
143 Configuration:
144 --cache-file=FILE cache test results in FILE
145 --help print this message
146 --no-create do not create output files
147 --quiet, --silent do not print \`checking...' messages
148 --version print the version of autoconf that created configure
149 Directory and file names:
150 --prefix=PREFIX install architecture-independent files in PREFIX
151 [$ac_default_prefix]
152 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
153 [same as prefix]
154 --bindir=DIR user executables in DIR [EPREFIX/bin]
155 --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
156 --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
157 --datadir=DIR read-only architecture-independent data in DIR
158 [PREFIX/share]
159 --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
160 --sharedstatedir=DIR modifiable architecture-independent data in DIR
161 [PREFIX/com]
162 --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
163 --libdir=DIR object code libraries in DIR [EPREFIX/lib]
164 --includedir=DIR C header files in DIR [PREFIX/include]
165 --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
166 --infodir=DIR info documentation in DIR [PREFIX/info]
167 --mandir=DIR man documentation in DIR [PREFIX/man]
168 --srcdir=DIR find the sources in DIR [configure dir or ..]
169 --program-prefix=PREFIX prepend PREFIX to installed program names
170 --program-suffix=SUFFIX append SUFFIX to installed program names
171 --program-transform-name=PROGRAM
172 run sed PROGRAM on installed program names
173 EOF
174 cat << EOF
175 Host type:
176 --build=BUILD configure for building on BUILD [BUILD=HOST]
177 --host=HOST configure for HOST [guessed]
178 --target=TARGET configure for TARGET [TARGET=HOST]
179 Features and packages:
180 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
181 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
182 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
183 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
184 --x-includes=DIR X include files are in DIR
185 --x-libraries=DIR X library files are in DIR
186 EOF
187 if test -n "$ac_help"; then
188 echo "--enable and --with options recognized:$ac_help"
189 fi
190 exit 0 ;;
191
192 -host | --host | --hos | --ho)
193 ac_prev=host ;;
194 -host=* | --host=* | --hos=* | --ho=*)
195 host="$ac_optarg" ;;
196
197 -includedir | --includedir | --includedi | --included | --include \
198 | --includ | --inclu | --incl | --inc)
199 ac_prev=includedir ;;
200 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
201 | --includ=* | --inclu=* | --incl=* | --inc=*)
202 includedir="$ac_optarg" ;;
203
204 -infodir | --infodir | --infodi | --infod | --info | --inf)
205 ac_prev=infodir ;;
206 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
207 infodir="$ac_optarg" ;;
208
209 -libdir | --libdir | --libdi | --libd)
210 ac_prev=libdir ;;
211 -libdir=* | --libdir=* | --libdi=* | --libd=*)
212 libdir="$ac_optarg" ;;
213
214 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
215 | --libexe | --libex | --libe)
216 ac_prev=libexecdir ;;
217 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
218 | --libexe=* | --libex=* | --libe=*)
219 libexecdir="$ac_optarg" ;;
220
221 -localstatedir | --localstatedir | --localstatedi | --localstated \
222 | --localstate | --localstat | --localsta | --localst \
223 | --locals | --local | --loca | --loc | --lo)
224 ac_prev=localstatedir ;;
225 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
226 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
227 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
228 localstatedir="$ac_optarg" ;;
229
230 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
231 ac_prev=mandir ;;
232 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
233 mandir="$ac_optarg" ;;
234
235 -nfp | --nfp | --nf)
236 # Obsolete; use --without-fp.
237 with_fp=no ;;
238
239 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
240 | --no-cr | --no-c)
241 no_create=yes ;;
242
243 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
244 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
245 no_recursion=yes ;;
246
247 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
248 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
249 | --oldin | --oldi | --old | --ol | --o)
250 ac_prev=oldincludedir ;;
251 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
252 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
253 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
254 oldincludedir="$ac_optarg" ;;
255
256 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
257 ac_prev=prefix ;;
258 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
259 prefix="$ac_optarg" ;;
260
261 -program-prefix | --program-prefix | --program-prefi | --program-pref \
262 | --program-pre | --program-pr | --program-p)
263 ac_prev=program_prefix ;;
264 -program-prefix=* | --program-prefix=* | --program-prefi=* \
265 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
266 program_prefix="$ac_optarg" ;;
267
268 -program-suffix | --program-suffix | --program-suffi | --program-suff \
269 | --program-suf | --program-su | --program-s)
270 ac_prev=program_suffix ;;
271 -program-suffix=* | --program-suffix=* | --program-suffi=* \
272 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
273 program_suffix="$ac_optarg" ;;
274
275 -program-transform-name | --program-transform-name \
276 | --program-transform-nam | --program-transform-na \
277 | --program-transform-n | --program-transform- \
278 | --program-transform | --program-transfor \
279 | --program-transfo | --program-transf \
280 | --program-trans | --program-tran \
281 | --progr-tra | --program-tr | --program-t)
282 ac_prev=program_transform_name ;;
283 -program-transform-name=* | --program-transform-name=* \
284 | --program-transform-nam=* | --program-transform-na=* \
285 | --program-transform-n=* | --program-transform-=* \
286 | --program-transform=* | --program-transfor=* \
287 | --program-transfo=* | --program-transf=* \
288 | --program-trans=* | --program-tran=* \
289 | --progr-tra=* | --program-tr=* | --program-t=*)
290 program_transform_name="$ac_optarg" ;;
291
292 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
293 | -silent | --silent | --silen | --sile | --sil)
294 silent=yes ;;
295
296 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
297 ac_prev=sbindir ;;
298 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
299 | --sbi=* | --sb=*)
300 sbindir="$ac_optarg" ;;
301
302 -sharedstatedir | --sharedstatedir | --sharedstatedi \
303 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
304 | --sharedst | --shareds | --shared | --share | --shar \
305 | --sha | --sh)
306 ac_prev=sharedstatedir ;;
307 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
308 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
309 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
310 | --sha=* | --sh=*)
311 sharedstatedir="$ac_optarg" ;;
312
313 -site | --site | --sit)
314 ac_prev=site ;;
315 -site=* | --site=* | --sit=*)
316 site="$ac_optarg" ;;
317
318 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
319 ac_prev=srcdir ;;
320 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
321 srcdir="$ac_optarg" ;;
322
323 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
324 | --syscon | --sysco | --sysc | --sys | --sy)
325 ac_prev=sysconfdir ;;
326 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
327 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
328 sysconfdir="$ac_optarg" ;;
329
330 -target | --target | --targe | --targ | --tar | --ta | --t)
331 ac_prev=target ;;
332 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
333 target="$ac_optarg" ;;
334
335 -v | -verbose | --verbose | --verbos | --verbo | --verb)
336 verbose=yes ;;
337
338 -version | --version | --versio | --versi | --vers)
339 echo "configure generated by autoconf version 2.8"
340 exit 0 ;;
341
342 -with-* | --with-*)
343 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
344 # Reject names that are not valid shell variable names.
345 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
346 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
347 fi
348 ac_package=`echo $ac_package| sed 's/-/_/g'`
349 case "$ac_option" in
350 *=*) ;;
351 *) ac_optarg=yes ;;
352 esac
353 eval "with_${ac_package}='$ac_optarg'" ;;
354
355 -without-* | --without-*)
356 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
357 # Reject names that are not valid shell variable names.
358 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
359 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
360 fi
361 ac_package=`echo $ac_package| sed 's/-/_/g'`
362 eval "with_${ac_package}=no" ;;
363
364 --x)
365 # Obsolete; use --with-x.
366 with_x=yes ;;
367
368 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
369 | --x-incl | --x-inc | --x-in | --x-i)
370 ac_prev=x_includes ;;
371 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
372 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
373 x_includes="$ac_optarg" ;;
374
375 -x-libraries | --x-libraries | --x-librarie | --x-librari \
376 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
377 ac_prev=x_libraries ;;
378 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
379 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
380 x_libraries="$ac_optarg" ;;
381
382 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
383 ;;
384
385 *)
386 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
387 echo "configure: warning: $ac_option: invalid host type" 1>&2
388 fi
389 if test "x$nonopt" != xNONE; then
390 { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
391 fi
392 nonopt="$ac_option"
393 ;;
394
395 esac
396 done
397
398 if test -n "$ac_prev"; then
399 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
400 fi
401
402 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
403
404 # File descriptor usage:
405 # 0 standard input
406 # 1 file creation
407 # 2 errors and warnings
408 # 3 some systems may open it to /dev/tty
409 # 4 used on the Kubota Titan
410 # 6 checking for... messages and results
411 # 5 compiler messages saved in config.log
412 if test "$silent" = yes; then
413 exec 6>/dev/null
414 else
415 exec 6>&1
416 fi
417 exec 5>./config.log
418
419 echo "\
420 This file contains any messages produced by compilers while
421 running configure, to aid debugging if configure makes a mistake.
422 " 1>&5
423
424 # Strip out --no-create and --no-recursion so they do not pile up.
425 # Also quote any args containing shell metacharacters.
426 ac_configure_args=
427 for ac_arg
428 do
429 case "$ac_arg" in
430 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
431 | --no-cr | --no-c) ;;
432 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
433 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
434 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
435 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
436 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
437 esac
438 done
439
440 # NLS nuisances.
441 # Only set LANG and LC_ALL to C if already set.
442 # These must not be set unconditionally because not all systems understand
443 # e.g. LANG=C (notably SCO).
444 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
445 if test "${LANG+set}" = set; then LANG=C; export LANG; fi
446
447 # confdefs.h avoids OS command line length limits that DEFS can exceed.
448 rm -rf conftest* confdefs.h
449 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
450 echo > confdefs.h
451
452 # A filename unique to this package, relative to the directory that
453 # configure is in, which we can look for to find out if srcdir is correct.
454 ac_unique_file=as.h
455
456 # Find the source files, if location was not specified.
457 if test -z "$srcdir"; then
458 ac_srcdir_defaulted=yes
459 # Try the directory containing this script, then its parent.
460 ac_prog=$0
461 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
462 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
463 srcdir=$ac_confdir
464 if test ! -r $srcdir/$ac_unique_file; then
465 srcdir=..
466 fi
467 else
468 ac_srcdir_defaulted=no
469 fi
470 if test ! -r $srcdir/$ac_unique_file; then
471 if test "$ac_srcdir_defaulted" = yes; then
472 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
473 else
474 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
475 fi
476 fi
477 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
478
479 # Prefer explicitly selected file to automatically selected ones.
480 if test -z "$CONFIG_SITE"; then
481 if test "x$prefix" != xNONE; then
482 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
483 else
484 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
485 fi
486 fi
487 for ac_site_file in $CONFIG_SITE; do
488 if test -r "$ac_site_file"; then
489 echo "loading site script $ac_site_file"
490 . "$ac_site_file"
491 fi
492 done
493
494 if test -r "$cache_file"; then
495 echo "loading cache $cache_file"
496 . $cache_file
497 else
498 echo "creating cache $cache_file"
499 > $cache_file
500 fi
501
502 ac_ext=c
503 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
504 ac_cpp='$CPP $CPPFLAGS'
505 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
506 ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
507
508 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
509 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
510 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
511 ac_n= ac_c='
512 ' ac_t=' '
513 else
514 ac_n=-n ac_c= ac_t=
515 fi
516 else
517 ac_n= ac_c='\c' ac_t=
518 fi
519
520 user_bfd_gas=
521 # Check whether --enable-bfd-assembler or --disable-bfd-assembler was given.
522 if test "${enable_bfd_assembler+set}" = set; then
523 enableval="$enable_bfd_assembler"
524 case "${enableval}" in
525 yes) need_bfd=yes user_bfd_gas=yes ;;
526 no) user_bfd_gas=no ;;
527 *) { echo "configure: error: bad value ${enableval} given for bfd-assembler option" 1>&2; exit 1; } ;;
528 esac
529 fi
530 # Check whether --enable-targets or --disable-targets was given.
531 if test "${enable_targets+set}" = set; then
532 enableval="$enable_targets"
533 case "${enableval}" in
534 yes | "") { echo "configure: error: enable-targets option must specify target names or 'all'" 1>&2; exit 1; }
535 ;;
536 no) enable_targets= ;;
537 *) enable_targets=$enableval ;;
538 esac
539 fi
540 # Check whether --enable-shared or --disable-shared was given.
541 if test "${enable_shared+set}" = set; then
542 enableval="$enable_shared"
543 case "${enableval}" in
544 yes) shared=true ;;
545 no) shared=false ;;
546 *) { echo "configure: error: bad value ${enableval} for BFD shared option" 1>&2; exit 1; } ;;
547 esac
548 fi
549
550 # Generate a header file -- gets more post-processing by Makefile later.
551
552
553 ac_aux_dir=
554 for ac_dir in `cd $srcdir;pwd`/.. $srcdir/`cd $srcdir;pwd`/..; do
555 if test -f $ac_dir/install-sh; then
556 ac_aux_dir=$ac_dir
557 ac_install_sh="$ac_aux_dir/install-sh -c"
558 break
559 elif test -f $ac_dir/install.sh; then
560 ac_aux_dir=$ac_dir
561 ac_install_sh="$ac_aux_dir/install.sh -c"
562 break
563 fi
564 done
565 if test -z "$ac_aux_dir"; then
566 { echo "configure: error: can not find install-sh or install.sh in `cd $srcdir;pwd`/.. $srcdir/`cd $srcdir;pwd`/.." 1>&2; exit 1; }
567 fi
568 ac_config_guess=$ac_aux_dir/config.guess
569 ac_config_sub=$ac_aux_dir/config.sub
570 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
571
572
573 # Do some error checking and defaulting for the host and target type.
574 # The inputs are:
575 # configure --host=HOST --target=TARGET --build=BUILD NONOPT
576 #
577 # The rules are:
578 # 1. You are not allowed to specify --host, --target, and nonopt at the
579 # same time.
580 # 2. Host defaults to nonopt.
581 # 3. If nonopt is not specified, then host defaults to the current host,
582 # as determined by config.guess.
583 # 4. Target and build default to nonopt.
584 # 5. If nonopt is not specified, then target and build default to host.
585
586 # The aliases save the names the user supplied, while $host etc.
587 # will get canonicalized.
588 case $host---$target---$nonopt in
589 NONE---*---* | *---NONE---* | *---*---NONE) ;;
590 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
591 esac
592
593
594 # Make sure we can run config.sub.
595 if $ac_config_sub sun4 >/dev/null 2>&1; then :
596 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
597 fi
598
599 echo $ac_n "checking host system type""... $ac_c" 1>&6
600
601 host_alias=$host
602 case "$host_alias" in
603 NONE)
604 case $nonopt in
605 NONE)
606 if host_alias=`$ac_config_guess`; then :
607 else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
608 fi ;;
609 *) host_alias=$nonopt ;;
610 esac ;;
611 esac
612
613 host=`$ac_config_sub $host_alias`
614 host_cpu=`echo $host | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\1/'`
615 host_vendor=`echo $host | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\2/'`
616 host_os=`echo $host | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\3/'`
617 echo "$ac_t""$host" 1>&6
618
619 echo $ac_n "checking target system type""... $ac_c" 1>&6
620
621 target_alias=$target
622 case "$target_alias" in
623 NONE)
624 case $nonopt in
625 NONE) target_alias=$host_alias ;;
626 *) target_alias=$nonopt ;;
627 esac ;;
628 esac
629
630 target=`$ac_config_sub $target_alias`
631 target_cpu=`echo $target | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\1/'`
632 target_vendor=`echo $target | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\2/'`
633 target_os=`echo $target | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\3/'`
634 echo "$ac_t""$target" 1>&6
635
636 echo $ac_n "checking build system type""... $ac_c" 1>&6
637
638 build_alias=$build
639 case "$build_alias" in
640 NONE)
641 case $nonopt in
642 NONE) build_alias=$host_alias ;;
643 *) build_alias=$nonopt ;;
644 esac ;;
645 esac
646
647 build=`$ac_config_sub $build_alias`
648 build_cpu=`echo $build | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\1/'`
649 build_vendor=`echo $build | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\2/'`
650 build_os=`echo $build | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\3/'`
651 echo "$ac_t""$build" 1>&6
652
653 test "$host_alias" != "$target_alias" &&
654 test "$program_prefix$program_suffix$program_transform_name" = \
655 NONENONEs,x,x, &&
656 program_prefix=${target_alias}-
657
658 if test "$program_transform_name" = s,x,x,; then
659 program_transform_name=
660 else
661 # Double any \ or $. echo might interpret backslashes.
662 cat <<\EOF_SED > conftestsed
663 s,\\,\\\\,g; s,\$,$$,g
664 EOF_SED
665 program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
666 rm -f conftestsed
667 fi
668 test "$program_prefix" != NONE &&
669 program_transform_name="s,^,${program_prefix},; $program_transform_name"
670 # Use a double $ so make ignores it.
671 test "$program_suffix" != NONE &&
672 program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
673
674 # sed with no file args requires a program.
675 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
676
677
678 te_file=generic
679
680 canon_targets=""
681 if test -n "$enable_targets" ; then
682 for t in `echo $enable_targets | sed 's/,/ /g'`; do
683 result=`$ac_config_sub $t 2>/dev/null`
684 if test -n "$result" ; then
685 canon_targets="$canon_targets $result"
686 # else
687 # # Permit "all", etc. We don't support it yet though.
688 # canon_targets="$canon_targets $t"
689 fi
690 done
691 _gas_uniq_list="$canon_targets"
692 _gas_uniq_newlist=""
693 for _gas_uniq_i in _gas_uniq_dummy $_gas_uniq_list ; do
694 case $_gas_uniq_i in
695 _gas_uniq_dummy) ;;
696 *) case " $_gas_uniq_newlist " in
697 *" $_gas_uniq_i "*) ;;
698 *) _gas_uniq_newlist="$_gas_uniq_newlist $_gas_uniq_i" ;;
699 esac ;;
700 esac
701 done
702 canon_targets=$_gas_uniq_newlist
703
704 fi
705
706 emulations=""
707
708 for this_target in $target $canon_targets ; do
709
710 eval `echo $this_target | sed 's/^\(.*\)-\(.*\)-\(.*\)$/cpu=\1 vendor=\2 os=\3/'`
711
712 # check for architecture variants
713 case ${cpu} in
714 armeb) cpu_type=arm endian=big ;;
715 arm*) cpu_type=arm endian=little ;;
716 hppa*) cpu_type=hppa ;;
717 i[456]86) cpu_type=i386 ;;
718 m680[012346]0) cpu_type=m68k ;;
719 m68008) cpu_type=m68k ;;
720 m683??) cpu_type=m68k ;;
721 m8*) cpu_type=m88k ;;
722 mips*el) cpu_type=mips endian=little;;
723 mips*) cpu_type=mips endian=big ;;
724 powerpcle*) cpu_type=ppc endian=little ;;
725 powerpc*) cpu_type=ppc endian=big ;;
726 rs6000*) cpu_type=ppc ;;
727 sparc64) cpu_type=sparc want_sparc_v9=true ;;
728 sparc*) cpu_type=sparc ;;
729 *) cpu_type=${cpu} ;;
730 esac
731
732 if test ${this_target} = $target ; then
733 target_cpu_type=${cpu_type}
734 elif test ${target_cpu_type} != ${cpu_type} ; then
735 continue
736 fi
737
738 targ=${cpu_type}
739 generic_target=${cpu_type}-$vendor-$os
740 dev=no
741 bfd_gas=no
742 em=generic
743
744 # assign object format
745 case ${generic_target} in
746 a29k-*-coff) fmt=coff targ=ebmon29k ;;
747 a29k-amd-udi) fmt=coff targ=ebmon29k ;;
748 a29k-amd-ebmon) fmt=coff targ=ebmon29k ;;
749 a29k-nyu-sym1) fmt=coff targ=ebmon29k ;;
750 a29k-*-vxworks*) fmt=coff ;;
751
752 alpha-*-netware*) fmt=ecoff ;;
753 alpha-*-osf*) fmt=ecoff ;;
754 alpha-*-linux*) fmt=ecoff ;;
755
756 # start-sanitize-arc
757 arc-*-elf*) fmt=elf bfd_gas=yes ;;
758 # end-sanitize-arc
759
760 arm-*-riscix*) fmt=aout targ=arm-lit ;;
761 arm-*-aout) fmt=aout
762 case "$endian" in
763 big) targ=arm-big ;;
764 *) targ=arm-lit ;;
765 esac
766 ;;
767 arm-*-coff) fmt=coff ;;
768 arm-*-riscix*) fmt=aout ;;
769 arm-*-pe) fmt=coff targ=armcoff em=pe ;;
770
771 hppa-*-*elf*) fmt=elf em=hppa ;;
772 hppa-*-lites*) fmt=elf em=hppa ;;
773 hppa-*-osf*) fmt=som em=hppa ;;
774 hppa-*-hpux*) fmt=som em=hppa ;;
775 hppa-*-bsd*) fmt=som em=hppa ;;
776 hppa-*-hiux*) fmt=som em=hppa ;;
777
778 h8300-*-coff) fmt=coff ;;
779
780 i386-ibm-aix*) fmt=coff targ=i386coff
781 em=i386aix ;;
782 i386-*-bsd*) fmt=aout em=386bsd ;;
783 i386-*-netbsd0.8) fmt=aout em=386bsd ;;
784 i386-*-netbsd*) fmt=aout em=nbsd bfd_gas=yes;;
785 i386-*-linux*aout* | i386-*-linuxoldld) fmt=aout em=linux ;;
786 i386-*-linux*coff*) fmt=coff em=linux
787 targ=i386coff ;;
788 i386-*-linux*) fmt=elf em=linux ;;
789 i386-*-lynxos*) fmt=coff targ=i386coff
790 em=lynx ;;
791 i386-*-sysv4* | i386-*-solaris* | i386-*-elf)
792 fmt=elf ;;
793 i386-*-sco*elf*) fmt=elf targ=sco5 ;;
794 i386-*-coff | i386-*-sysv* | i386-*-sco* | i386-*-isc*)
795 fmt=coff targ=i386coff ;;
796 i386-*-vsta) fmt=aout ;;
797 i386-*-go32) fmt=coff targ=i386coff ;;
798 i386-*-gnu*) fmt=elf ;;
799 i386-*-mach*)
800 fmt=aout em=mach bfd_gas=yes ;;
801 i386-*-msdos*) fmt=aout ;;
802 i386-*-moss*) fmt=elf ;;
803 i386-*-pe) fmt=coff targ=i386coff em=pe ;;
804 i386-*-cygwin32) fmt=coff targ=i386coff em=pe ;;
805 i386-*-*nt) fmt=coff targ=i386coff em=pe ;;
806 i960-*-bout) fmt=bout ;;
807 i960-*-coff) fmt=coff em=ic960 targ=ic960coff ;;
808 i960-*-nindy*) fmt=bout ;;
809 i960-*-vxworks4*) fmt=bout ;;
810 i960-*-vxworks5.0) fmt=bout ;;
811 i960-*-vxworks5.*) fmt=coff em=ic960 targ=ic960coff ;;
812 i960-*-vxworks*) fmt=bout ;;
813
814 m68k-*-vxworks* | m68k-ericsson-ose | m68k-*-sunos*)
815 fmt=aout em=sun3 ;;
816 m68k-motorola-sysv*) fmt=coff targ=m68kcoff em=delta ;;
817 m68k-bull-sysv3*) fmt=coff targ=m68kcoff em=dpx2 ;;
818 m68k-apollo-*) fmt=coff targ=apollo em=apollo ;;
819 m68k-*-sysv4 | m68k-*-elf) # must be before -sysv*
820 fmt=elf ;;
821 m68k-*-coff | m68k-*-sysv*)
822 fmt=coff targ=m68kcoff ;;
823 m68k-*-hpux*) fmt=hp300 em=hp300 ;;
824 m68k-*-linux*aout*) fmt=aout em=linux ;;
825 m68k-*-linux*) fmt=elf em=linux ;;
826 m68k-*-lynxos*) fmt=coff targ=m68kcoff
827 em=lynx ;;
828 m68k-*-netbsd*) fmt=aout em=nbsd bfd_gas=yes ;;
829 m68k-apple-aux*) fmt=coff targ=m68kcoff em=aux ;;
830 m68k-*-psos*) fmt=elf em=psos;;
831
832 m88k-motorola-sysv3*) fmt=coff targ=m88kcoff em=delt88 ;;
833 m88k-*-coff*) fmt=coff targ=m88kcoff ;;
834
835 # don't change em like *-*-bsd does
836 mips-dec-netbsd*) fmt=elf targ=mips-lit endian=little ;;
837 mips-dec-bsd*) fmt=aout targ=mips-lit ;;
838 mips-sony-bsd*) fmt=ecoff targ=mips-big ;;
839 mips-*-bsd*) { echo "configure: error: Unknown vendor for mips-bsd configuration." 1>&2; exit 1; } ;;
840 mips-*-ultrix*) fmt=ecoff targ=mips-lit endian=little ;;
841 mips-*-ecoff*) fmt=ecoff
842 case "$endian" in
843 big) targ=mips-big ;;
844 *) targ=mips-lit ;;
845 esac
846 ;;
847 mips-*-ecoff*) fmt=ecoff targ=mips-big ;;
848 mips-*-gnu*) fmt=aout
849 case "$endian" in
850 big) targ=mips-big ;;
851 *) targ=mips-lit ;;
852 esac
853 ;;
854 mips-*-irix5*) fmt=elf targ=mips-big ;;
855 mips-*-irix*) fmt=ecoff targ=mips-big ;;
856 mips-*-riscos*) fmt=ecoff targ=mips-big ;;
857 mips-*-sysv*) fmt=ecoff targ=mips-big ;;
858 mips-*-elf*) fmt=elf
859 case "$endian" in
860 big) targ=mips-big ;;
861 *) targ=mips-lit ;;
862 esac
863 ;;
864 ppc-*-pe | ppc-*-cygwin32 | ppc-*-winnt*)
865 fmt=coff em=pe
866 case "$endian" in
867 big) targ=ppc-big ;;
868 *) targ=ppc-lit ;;
869 esac
870 ;;
871 ppc-*-aix*) fmt=coff ;;
872 ppc-*-elf* | ppc-*-eabi* | ppc-*-sysv4*)
873 fmt=elf
874 case "$endian" in
875 big) targ=ppc-big ;;
876 *) targ=ppc-lit ;;
877 esac
878 ;;
879 ppc-*-macos* | ppc-*-mpw*)
880 fmt=coff em=macos ;;
881 ppc-*-netware*) fmt=elf em=ppcnw ;;
882
883 sh-*-coff) fmt=coff ;;
884
885 # start-sanitize-rce
886 rce-*-aout) fmt=aout ;;
887 # end-sanitize-rce
888
889 ns32k-pc532-mach* | ns32k-pc532-ux*) fmt=aout em=pc532mach ;;
890 ns32k-pc532-netbsd* | ns32k-pc532-lites*) fmt=aout em=nbsd532 ;;
891
892 sparc-*-sunos4*) fmt=aout em=sun3 ;;
893 sparc-*-aout | sparc*-*-vxworks)
894 fmt=aout ;;
895 sparc-*-coff) fmt=coff ;;
896 sparc-*-lynxos*) fmt=coff em=lynx ;;
897 sparc-fujitsu-none) fmt=aout ;;
898 sparc-*-elf | sparc-*-solaris*)
899 fmt=elf ;;
900 sparc-*-netbsd*) fmt=aout em=nbsd bfd_gas=yes ;;
901
902 vax-*-bsd* | vax-*-ultrix*)
903 fmt=aout ;;
904 vax-*-vms) fmt=vms ;;
905
906 z8k-*-coff | z8k-*-sim)
907 fmt=coff ;;
908
909 w65-*-*) fmt=coff ;;
910
911 *-*-aout | *-*-scout)
912 fmt=aout ;;
913 *-*-nindy*)
914 fmt=bout ;;
915 *-*-bsd*)
916 fmt=aout em=sun3 ;;
917 *-*-generic) fmt=generic ;;
918 *-*-xray | *-*-hms) fmt=coff ;;
919 *-*-sim) fmt=coff ;;
920 *-*-elf | *-*-sysv4* | *-*-solaris*)
921 echo "configure: warning: GAS support for ${generic_target} is incomplete." 1>&2
922 fmt=elf dev=yes ;;
923 *-*-vxworks) fmt=aout ;;
924 *-*-netware) fmt=elf ;;
925 esac
926
927 case ${cpu_type}-${fmt} in
928 arm-*) bfd_gas=yes ;;
929 # not yet
930 # i386-aout) bfd_gas=preferred ;;
931 mips-*) bfd_gas=yes ;;
932 ns32k-*) bfd_gas=yes ;;
933 ppc-*) bfd_gas=yes ;;
934 sparc-*) bfd_gas=yes ;;
935 *-elf) bfd_gas=yes ;;
936 *-ecoff) bfd_gas=yes ;;
937 *-som) bfd_gas=yes ;;
938 *) ;;
939 esac
940
941 # Other random stuff.
942
943 # do we need the opcodes library?
944 case ${cpu_type} in
945 alpha | vax | i386)
946 ;;
947 *)
948 need_opcodes=yes
949 if test "${shared}" = "true"; then
950 # A shared libopcodes must be linked against libbfd.
951 need_bfd=yes
952 fi
953 ;;
954 esac
955
956 test -n "$want_sparc_v9" && cat >> confdefs.h <<\EOF
957 #define SPARC_V9 1
958 EOF
959
960
961 case ${cpu}-${vendor}-${os} in
962 sparc64-*-elf*) cat >> confdefs.h <<\EOF
963 #define SPARC_ARCH64 1
964 EOF
965 ;;
966 esac
967
968 case ${cpu_type} in
969 m68k)
970 case ${extra_objects} in
971 *m68k-parse.o*) ;;
972 *) extra_objects="$extra_objects m68k-parse.o" ;;
973 esac
974 ;;
975 esac
976
977 # See if we really can support this configuration with the emulation code.
978
979 if test $this_target = $target ; then
980 primary_bfd_gas=$bfd_gas
981 obj_format=$fmt
982 gas_target=$targ
983 te_file=$em
984
985 if test $bfd_gas = no ; then
986 # Can't support other configurations this way.
987 break
988 fi
989 elif test $bfd_gas = no ; then
990 # Can't support this configuration.
991 break
992 fi
993
994 # From target name and format, produce a list of supported emulations.
995
996 case ${generic_target}-${fmt} in
997 mips-*-irix5*-*) emulation="mipsbelf mipslelf mipself mipsbecoff mipslecoff mipsecoff" ;;
998 mips-*-*-ecoff) case "$endian" in
999 big) emulation="mipsbecoff mipslecoff mipsecoff" ;;
1000 *) emulation="mipslecoff mipsbecoff mipsecoff" ;;
1001 esac ;;
1002 mips-*-*-elf) case "$endian" in
1003 big) emulation="mipsbelf mipslelf mipself" ;;
1004 *) emulation="mipslelf mipsbelf mipself" ;;
1005 esac ;;
1006 esac
1007
1008 emulations="$emulations $emulation"
1009
1010 done
1011
1012 # Assign floating point type. Most processors with FP support
1013 # IEEE FP. On those that don't support FP at all, usually IEEE
1014 # is emulated.
1015 case ${target_cpu} in
1016 vax | tahoe ) atof=${target_cpu} ;;
1017 *) atof=ieee ;;
1018 esac
1019
1020 case "${obj_format}" in
1021 "") { echo "configure: error: GAS does not know what format to use for target ${target}" 1>&2; exit 1; } ;;
1022 esac
1023
1024
1025 if test ! -r ${srcdir}/config/tc-${target_cpu_type}.c; then
1026 { echo "configure: error: GAS does not support target CPU ${target_cpu_type}" 1>&2; exit 1; }
1027 fi
1028
1029 if test ! -r ${srcdir}/config/obj-${obj_format}.c; then
1030 { echo "configure: error: GAS does not have support for object file format ${obj_format}" 1>&2; exit 1; }
1031 fi
1032
1033 # and target makefile frag
1034
1035 target_frag=${srcdir}/config/${gas_target}.mt
1036 if test ! -r ${target_frag}; then
1037 target_frag=/dev/null # ick! but subst_file can't be conditionalized
1038 fi
1039
1040
1041 case ${user_bfd_gas}-${primary_bfd_gas} in
1042 yes-yes | no-no)
1043 # We didn't override user's choice.
1044 ;;
1045 no-yes)
1046 echo "configure: warning: Use of BFD is required for ${target}; overriding config options." 1>&2
1047 ;;
1048 no-preferred)
1049 primary_bfd_gas=no
1050 ;;
1051 *-preferred)
1052 primary_bfd_gas=yes
1053 ;;
1054 yes-*)
1055 primary_bfd_gas=yes
1056 ;;
1057 -*)
1058 # User specified nothing.
1059 ;;
1060 esac
1061
1062 # Some COFF configurations want these random other flags set.
1063 case ${obj_format} in
1064 coff)
1065 case ${target_cpu_type} in
1066 i386) cat >> confdefs.h <<\EOF
1067 #define I386COFF 1
1068 EOF
1069 ;;
1070 m68k) cat >> confdefs.h <<\EOF
1071 #define M68KCOFF 1
1072 EOF
1073 ;;
1074 m88k) cat >> confdefs.h <<\EOF
1075 #define M88KCOFF 1
1076 EOF
1077 ;;
1078 esac
1079 ;;
1080 esac
1081
1082 # Getting this done right is going to be a bitch. Each configuration specified
1083 # with --enable-targets=... should be checked for environment, format, cpu, and
1084 # bfd_gas setting.
1085 #
1086 # For each configuration, the necessary object file support code must be linked
1087 # in. This might be only one, it might be up to four. The necessary emulation
1088 # code needs to be provided, too.
1089 #
1090 # And then there's "--enable-targets=all"....
1091 #
1092 # For now, just always do it for MIPS ELF or ECOFF configurations. Sigh.
1093
1094 formats="${obj_format}"
1095 emfiles=""
1096 EMULATIONS=""
1097 _gas_uniq_list="$emulations"
1098 _gas_uniq_newlist=""
1099 for _gas_uniq_i in _gas_uniq_dummy $_gas_uniq_list ; do
1100 case $_gas_uniq_i in
1101 _gas_uniq_dummy) ;;
1102 *) case " $_gas_uniq_newlist " in
1103 *" $_gas_uniq_i "*) ;;
1104 *) _gas_uniq_newlist="$_gas_uniq_newlist $_gas_uniq_i" ;;
1105 esac ;;
1106 esac
1107 done
1108 emulations=$_gas_uniq_newlist
1109
1110 for em in . $emulations ; do
1111 case $em in
1112 .) continue ;;
1113 mipsbelf | mipslelf)
1114 fmt=elf file=mipself ;;
1115 mipsbecoff | mipslecoff)
1116 fmt=ecoff file=mipsecoff ;;
1117 esac
1118 formats="$formats $fmt"
1119 emfiles="$emfiles e-$file.o"
1120 EMULATIONS="$EMULATIONS &$em,"
1121 done
1122 _gas_uniq_list="$formats"
1123 _gas_uniq_newlist=""
1124 for _gas_uniq_i in _gas_uniq_dummy $_gas_uniq_list ; do
1125 case $_gas_uniq_i in
1126 _gas_uniq_dummy) ;;
1127 *) case " $_gas_uniq_newlist " in
1128 *" $_gas_uniq_i "*) ;;
1129 *) _gas_uniq_newlist="$_gas_uniq_newlist $_gas_uniq_i" ;;
1130 esac ;;
1131 esac
1132 done
1133 formats=$_gas_uniq_newlist
1134
1135 _gas_uniq_list="$emfiles"
1136 _gas_uniq_newlist=""
1137 for _gas_uniq_i in _gas_uniq_dummy $_gas_uniq_list ; do
1138 case $_gas_uniq_i in
1139 _gas_uniq_dummy) ;;
1140 *) case " $_gas_uniq_newlist " in
1141 *" $_gas_uniq_i "*) ;;
1142 *) _gas_uniq_newlist="$_gas_uniq_newlist $_gas_uniq_i" ;;
1143 esac ;;
1144 esac
1145 done
1146 emfiles=$_gas_uniq_newlist
1147
1148 if test `set . $formats ; shift ; echo $#` -gt 1 ; then
1149 for fmt in $formats ; do
1150 case $fmt in
1151 aout) cat >> confdefs.h <<\EOF
1152 #define OBJ_MAYBE_AOUT 1
1153 EOF
1154 ;;
1155 bout) cat >> confdefs.h <<\EOF
1156 #define OBJ_MAYBE_BOUT 1
1157 EOF
1158 ;;
1159 coff) cat >> confdefs.h <<\EOF
1160 #define OBJ_MAYBE_COFF 1
1161 EOF
1162 ;;
1163 ecoff) cat >> confdefs.h <<\EOF
1164 #define OBJ_MAYBE_ECOFF 1
1165 EOF
1166 ;;
1167 elf) cat >> confdefs.h <<\EOF
1168 #define OBJ_MAYBE_ELF 1
1169 EOF
1170 ;;
1171 generic) cat >> confdefs.h <<\EOF
1172 #define OBJ_MAYBE_GENERIC 1
1173 EOF
1174 ;;
1175 hp300) cat >> confdefs.h <<\EOF
1176 #define OBJ_MAYBE_HP300 1
1177 EOF
1178 ;;
1179 ieee) cat >> confdefs.h <<\EOF
1180 #define OBJ_MAYBE_IEEE 1
1181 EOF
1182 ;;
1183 som) cat >> confdefs.h <<\EOF
1184 #define OBJ_MAYBE_SOM 1
1185 EOF
1186 ;;
1187 vms) cat >> confdefs.h <<\EOF
1188 #define OBJ_MAYBE_VMS 1
1189 EOF
1190 ;;
1191 esac
1192 extra_objects="$extra_objects obj-$fmt.o"
1193 done
1194 obj_format=multi
1195 fi
1196 if test `set . $emfiles ; shift ; echo $#` -gt 0 ; then
1197 te_file=multi
1198 extra_objects="$extra_objects $emfiles"
1199 DEFAULT_EMULATION=`set . $emulations ; echo $2`
1200 cat >> confdefs.h <<\EOF
1201 #define USE_EMULATIONS 1
1202 EOF
1203
1204 fi
1205
1206 cat >> confdefs.h <<EOF
1207 #define EMULATIONS $EMULATIONS
1208 EOF
1209
1210 cat >> confdefs.h <<EOF
1211 #define DEFAULT_EMULATION "$DEFAULT_EMULATION"
1212 EOF
1213
1214
1215 files="config/tc-${target_cpu_type}.c config/tc-${target_cpu_type}.h \
1216 config/obj-${obj_format}.h config/obj-${obj_format}.c \
1217 config/te-${te_file}.h config/atof-${atof}.c \
1218 $extra_files"
1219 links="targ-cpu.c targ-cpu.h obj-format.h obj-format.c targ-env.h atof-targ.c \
1220 $extra_links"
1221
1222 case ${primary_bfd_gas}-${target_cpu_type}-${obj_format} in
1223 yes-*-coff) need_bfd=yes ;;
1224 no-*-coff) need_bfd=yes
1225 cat >> confdefs.h <<\EOF
1226 #define MANY_SEGMENTS 1
1227 EOF
1228 ;;
1229 esac
1230
1231 reject_dev_configs=yes
1232
1233 case ${reject_dev_configs}-${dev} in
1234 yes-yes) # Oops.
1235 { echo "configure: error: GAS does not support the ${generic_target} configuration." 1>&2; exit 1; }
1236 ;;
1237 esac
1238
1239
1240
1241
1242
1243
1244
1245 case "${primary_bfd_gas}" in
1246 yes) cat >> confdefs.h <<\EOF
1247 #define BFD_ASSEMBLER 1
1248 EOF
1249
1250 need_bfd=yes ;;
1251 esac
1252
1253 # do we need the opcodes library?
1254 case "${need_opcodes}" in
1255 yes)
1256 OPCODES_DEP=../opcodes/libopcodes.a
1257 OPCODES_LIB='-L../opcodes -lopcodes'
1258
1259 # We need to handle some special cases if opcodes was built shared.
1260 if test "${shared}" = "true"; then
1261 case "${host}" in
1262 *-*-sunos*)
1263 # On SunOS, we must link against the name we are going to install,
1264 # not -lbfd, since SunOS does not support SONAME.
1265 OPCODES_LIB='-L../opcodes -l`echo opcodes | sed '"'"'$(program_transform_name)'"'"'`'
1266 ;;
1267 esac
1268 fi
1269 ;;
1270 esac
1271
1272
1273
1274 case "${need_bfd}" in
1275 yes)
1276 BFDDEP=../bfd/libbfd.a
1277 BFDLIB='-L../bfd -lbfd'
1278 ALL_OBJ_DEPS="$ALL_OBJ_DEPS ../bfd/bfd.h"
1279
1280 # We need to handle some special cases if BFD was built shared.
1281 if test "${shared}" = "true"; then
1282 case "${host}" in
1283 *-*-sunos*)
1284 # On SunOS, we must link against the name we are going to install,
1285 # not -lbfd, since SunOS does not support SONAME.
1286 BFDLIB='-L../bfd -l`echo bfd | sed '"'"'$(program_transform_name)'"'"'`'
1287 ;;
1288 esac
1289 fi
1290 ;;
1291 esac
1292
1293
1294
1295
1296 cat >> confdefs.h <<EOF
1297 #define TARGET_ALIAS "${target_alias}"
1298 EOF
1299
1300 cat >> confdefs.h <<EOF
1301 #define TARGET_CANONICAL "${target}"
1302 EOF
1303
1304 cat >> confdefs.h <<EOF
1305 #define TARGET_CPU "${target_cpu}"
1306 EOF
1307
1308 cat >> confdefs.h <<EOF
1309 #define TARGET_VENDOR "${target_vendor}"
1310 EOF
1311
1312 cat >> confdefs.h <<EOF
1313 #define TARGET_OS "${target_os}"
1314 EOF
1315
1316
1317 # Extract the first word of "gcc", so it can be a program name with args.
1318 set dummy gcc; ac_word=$2
1319 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1320 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1321 echo $ac_n "(cached) $ac_c" 1>&6
1322 else
1323 if test -n "$CC"; then
1324 ac_cv_prog_CC="$CC" # Let the user override the test.
1325 else
1326 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1327 for ac_dir in $PATH; do
1328 test -z "$ac_dir" && ac_dir=.
1329 if test -f $ac_dir/$ac_word; then
1330 ac_cv_prog_CC="gcc"
1331 break
1332 fi
1333 done
1334 IFS="$ac_save_ifs"
1335 fi
1336 fi
1337 CC="$ac_cv_prog_CC"
1338 if test -n "$CC"; then
1339 echo "$ac_t""$CC" 1>&6
1340 else
1341 echo "$ac_t""no" 1>&6
1342 fi
1343
1344 if test -z "$CC"; then
1345 # Extract the first word of "cc", so it can be a program name with args.
1346 set dummy cc; ac_word=$2
1347 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1348 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1349 echo $ac_n "(cached) $ac_c" 1>&6
1350 else
1351 if test -n "$CC"; then
1352 ac_cv_prog_CC="$CC" # Let the user override the test.
1353 else
1354 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1355 ac_prog_rejected=no
1356 for ac_dir in $PATH; do
1357 test -z "$ac_dir" && ac_dir=.
1358 if test -f $ac_dir/$ac_word; then
1359 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1360 ac_prog_rejected=yes
1361 continue
1362 fi
1363 ac_cv_prog_CC="cc"
1364 break
1365 fi
1366 done
1367 IFS="$ac_save_ifs"
1368 if test $ac_prog_rejected = yes; then
1369 # We found a bogon in the path, so make sure we never use it.
1370 set dummy $ac_cv_prog_CC
1371 shift
1372 if test $# -gt 0; then
1373 # We chose a different compiler from the bogus one.
1374 # However, it has the same basename, so the bogon will be chosen
1375 # first if we set CC to just the basename; use the full file name.
1376 shift
1377 set dummy "$ac_dir/$ac_word" "$@"
1378 shift
1379 ac_cv_prog_CC="$@"
1380 fi
1381 fi
1382 fi
1383 fi
1384 CC="$ac_cv_prog_CC"
1385 if test -n "$CC"; then
1386 echo "$ac_t""$CC" 1>&6
1387 else
1388 echo "$ac_t""no" 1>&6
1389 fi
1390
1391 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1392 fi
1393
1394 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1395 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
1396 echo $ac_n "(cached) $ac_c" 1>&6
1397 else
1398 cat > conftest.c <<EOF
1399 #ifdef __GNUC__
1400 yes;
1401 #endif
1402 EOF
1403 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1404: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1404 ac_cv_prog_gcc=yes
1405 else
1406 ac_cv_prog_gcc=no
1407 fi
1408 fi
1409
1410 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1411 if test $ac_cv_prog_gcc = yes; then
1412 GCC=yes
1413 if test "${CFLAGS+set}" != set; then
1414 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1415 if eval "test \"`echo '$''{'ac_cv_prog_gcc_g'+set}'`\" = set"; then
1416 echo $ac_n "(cached) $ac_c" 1>&6
1417 else
1418 echo 'void f(){}' > conftest.c
1419 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1420 ac_cv_prog_gcc_g=yes
1421 else
1422 ac_cv_prog_gcc_g=no
1423 fi
1424 rm -f conftest*
1425
1426 fi
1427
1428 echo "$ac_t""$ac_cv_prog_gcc_g" 1>&6
1429 if test $ac_cv_prog_gcc_g = yes; then
1430 CFLAGS="-g -O"
1431 else
1432 CFLAGS="-O"
1433 fi
1434 fi
1435 else
1436 GCC=
1437 test "${CFLAGS+set}" = set || CFLAGS="-g"
1438 fi
1439
1440 # Find a good install program. We prefer a C program (faster),
1441 # so one script is as good as another. But avoid the broken or
1442 # incompatible versions:
1443 # SysV /etc/install, /usr/sbin/install
1444 # SunOS /usr/etc/install
1445 # IRIX /sbin/install
1446 # AIX /bin/install
1447 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
1448 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1449 # ./install, which can be erroneously created by make from ./install.sh.
1450 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
1451 if test -z "$INSTALL"; then
1452 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
1453 echo $ac_n "(cached) $ac_c" 1>&6
1454 else
1455 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1456 for ac_dir in $PATH; do
1457 # Account for people who put trailing slashes in PATH elements.
1458 case "$ac_dir/" in
1459 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1460 *)
1461 # OSF1 and SCO ODT 3.0 have their own names for install.
1462 for ac_prog in ginstall installbsd scoinst install; do
1463 if test -f $ac_dir/$ac_prog; then
1464 if test $ac_prog = install &&
1465 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1466 # AIX install. It has an incompatible calling convention.
1467 # OSF/1 installbsd also uses dspmsg, but is usable.
1468 :
1469 else
1470 ac_cv_path_install="$ac_dir/$ac_prog -c"
1471 break 2
1472 fi
1473 fi
1474 done
1475 ;;
1476 esac
1477 done
1478 IFS="$ac_save_ifs"
1479
1480 fi
1481 if test "${ac_cv_path_install+set}" = set; then
1482 INSTALL="$ac_cv_path_install"
1483 else
1484 # As a last resort, use the slow shell script. We don't cache a
1485 # path for INSTALL within a source directory, because that will
1486 # break other packages using the cache if that directory is
1487 # removed, or if the path is relative.
1488 INSTALL="$ac_install_sh"
1489 fi
1490 fi
1491 echo "$ac_t""$INSTALL" 1>&6
1492
1493 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1494 # It thinks the first close brace ends the variable substitution.
1495 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1496
1497 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1498
1499
1500 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
1501 # On Suns, sometimes $CPP names a directory.
1502 if test -n "$CPP" && test -d "$CPP"; then
1503 CPP=
1504 fi
1505 if test -z "$CPP"; then
1506 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1507 echo $ac_n "(cached) $ac_c" 1>&6
1508 else
1509 # This must be in double quotes, not single quotes, because CPP may get
1510 # substituted into the Makefile and "${CC-cc}" will confuse make.
1511 CPP="${CC-cc} -E"
1512 # On the NeXT, cc -E runs the code through the compiler's parser,
1513 # not just through cpp.
1514 cat > conftest.$ac_ext <<EOF
1515 #line 1516 "configure"
1516 #include "confdefs.h"
1517 #include <assert.h>
1518 Syntax Error
1519 EOF
1520 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1521 { (eval echo configure:1522: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1522 ac_err=`grep -v '^ *+' conftest.out`
1523 if test -z "$ac_err"; then
1524 :
1525 else
1526 echo "$ac_err" >&5
1527 rm -rf conftest*
1528 CPP="${CC-cc} -E -traditional-cpp"
1529 cat > conftest.$ac_ext <<EOF
1530 #line 1531 "configure"
1531 #include "confdefs.h"
1532 #include <assert.h>
1533 Syntax Error
1534 EOF
1535 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1536 { (eval echo configure:1537: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1537 ac_err=`grep -v '^ *+' conftest.out`
1538 if test -z "$ac_err"; then
1539 :
1540 else
1541 echo "$ac_err" >&5
1542 rm -rf conftest*
1543 CPP=/lib/cpp
1544 fi
1545 rm -f conftest*
1546 fi
1547 rm -f conftest*
1548 ac_cv_prog_CPP="$CPP"
1549 fi
1550 CPP="$ac_cv_prog_CPP"
1551 else
1552 ac_cv_prog_CPP="$CPP"
1553 fi
1554 echo "$ac_t""$CPP" 1>&6
1555
1556 for ac_hdr in string.h stdlib.h memory.h strings.h unistd.h stdarg.h varargs.h errno.h sys/types.h
1557 do
1558 ac_safe=`echo "$ac_hdr" | tr './\055' '___'`
1559 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1560 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1561 echo $ac_n "(cached) $ac_c" 1>&6
1562 else
1563 cat > conftest.$ac_ext <<EOF
1564 #line 1565 "configure"
1565 #include "confdefs.h"
1566 #include <$ac_hdr>
1567 EOF
1568 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1569 { (eval echo configure:1570: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1570 ac_err=`grep -v '^ *+' conftest.out`
1571 if test -z "$ac_err"; then
1572 rm -rf conftest*
1573 eval "ac_cv_header_$ac_safe=yes"
1574 else
1575 echo "$ac_err" >&5
1576 rm -rf conftest*
1577 eval "ac_cv_header_$ac_safe=no"
1578 fi
1579 rm -f conftest*
1580 fi
1581 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1582 echo "$ac_t""yes" 1>&6
1583 ac_tr_hdr=HAVE_`echo $ac_hdr | tr 'abcdefghijklmnopqrstuvwxyz./\055' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ___'`
1584 cat >> confdefs.h <<EOF
1585 #define $ac_tr_hdr 1
1586 EOF
1587
1588 else
1589 echo "$ac_t""no" 1>&6
1590 fi
1591 done
1592
1593
1594 # Put this here so that autoconf's "cross-compiling" message doesn't confuse
1595 # people who are not cross-compiling but are compiling cross-assemblers.
1596 echo $ac_n "checking whether compiling a cross-assembler""... $ac_c" 1>&6
1597 if test "${host}" = "${target}"; then
1598 cross_gas=no
1599 else
1600 cross_gas=yes
1601 cat >> confdefs.h <<\EOF
1602 #define CROSS_COMPILE 1
1603 EOF
1604
1605 fi
1606 echo "$ac_t""$cross_gas" 1>&6
1607
1608 # If we cannot run a trivial program, we must be cross compiling.
1609 echo $ac_n "checking whether cross-compiling""... $ac_c" 1>&6
1610 if eval "test \"`echo '$''{'ac_cv_c_cross'+set}'`\" = set"; then
1611 echo $ac_n "(cached) $ac_c" 1>&6
1612 else
1613 if test "$cross_compiling" = yes; then
1614 ac_cv_c_cross=yes
1615 else
1616 cat > conftest.$ac_ext <<EOF
1617 #line 1618 "configure"
1618 #include "confdefs.h"
1619 main(){return(0);}
1620 EOF
1621 { (eval echo configure:1622: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
1622 if test -s conftest && (./conftest; exit) 2>/dev/null; then
1623 ac_cv_c_cross=no
1624 else
1625 ac_cv_c_cross=yes
1626 fi
1627 fi
1628 rm -fr conftest*
1629 fi
1630
1631 echo "$ac_t""$ac_cv_c_cross" 1>&6
1632 cross_compiling=$ac_cv_c_cross
1633
1634 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
1635 # for constant arguments. Useless!
1636 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
1637 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
1638 echo $ac_n "(cached) $ac_c" 1>&6
1639 else
1640 cat > conftest.$ac_ext <<EOF
1641 #line 1642 "configure"
1642 #include "confdefs.h"
1643 #include <alloca.h>
1644 int main() { return 0; }
1645 int t() {
1646 char *p = alloca(2 * sizeof(int));
1647 ; return 0; }
1648 EOF
1649 if { (eval echo configure:1650: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
1650 rm -rf conftest*
1651 ac_cv_header_alloca_h=yes
1652 else
1653 rm -rf conftest*
1654 ac_cv_header_alloca_h=no
1655 fi
1656 rm -f conftest*
1657
1658 fi
1659
1660 echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
1661 if test $ac_cv_header_alloca_h = yes; then
1662 cat >> confdefs.h <<\EOF
1663 #define HAVE_ALLOCA_H 1
1664 EOF
1665
1666 fi
1667
1668 echo $ac_n "checking for alloca""... $ac_c" 1>&6
1669 if eval "test \"`echo '$''{'ac_cv_func_alloca'+set}'`\" = set"; then
1670 echo $ac_n "(cached) $ac_c" 1>&6
1671 else
1672 cat > conftest.$ac_ext <<EOF
1673 #line 1674 "configure"
1674 #include "confdefs.h"
1675
1676 #ifdef __GNUC__
1677 # define alloca __builtin_alloca
1678 #else
1679 # if HAVE_ALLOCA_H
1680 # include <alloca.h>
1681 # else
1682 # ifdef _AIX
1683 #pragma alloca
1684 # else
1685 # ifndef alloca /* predefined by HP cc +Olibcalls */
1686 char *alloca ();
1687 # endif
1688 # endif
1689 # endif
1690 #endif
1691
1692 int main() { return 0; }
1693 int t() {
1694 char *p = (char *) alloca(1);
1695 ; return 0; }
1696 EOF
1697 if { (eval echo configure:1698: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
1698 rm -rf conftest*
1699 ac_cv_func_alloca=yes
1700 else
1701 rm -rf conftest*
1702 ac_cv_func_alloca=no
1703 fi
1704 rm -f conftest*
1705
1706 fi
1707
1708 echo "$ac_t""$ac_cv_func_alloca" 1>&6
1709 if test $ac_cv_func_alloca = yes; then
1710 cat >> confdefs.h <<\EOF
1711 #define HAVE_ALLOCA 1
1712 EOF
1713
1714 fi
1715
1716 if test $ac_cv_func_alloca = no; then
1717 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
1718 # that cause trouble. Some versions do not even contain alloca or
1719 # contain a buggy version. If you still want to use their alloca,
1720 # use ar to extract alloca.o from them instead of compiling alloca.c.
1721 ALLOCA=alloca.o
1722 cat >> confdefs.h <<\EOF
1723 #define C_ALLOCA 1
1724 EOF
1725
1726
1727 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
1728 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
1729 echo $ac_n "(cached) $ac_c" 1>&6
1730 else
1731 cat > conftest.$ac_ext <<EOF
1732 #line 1733 "configure"
1733 #include "confdefs.h"
1734 #if defined(CRAY) && ! defined(CRAY2)
1735 webecray
1736 #else
1737 wenotbecray
1738 #endif
1739
1740 EOF
1741 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1742 egrep "webecray" >/dev/null 2>&1; then
1743 rm -rf conftest*
1744 ac_cv_os_cray=yes
1745 else
1746 rm -rf conftest*
1747 ac_cv_os_cray=no
1748 fi
1749 rm -f conftest*
1750
1751 fi
1752
1753 echo "$ac_t""$ac_cv_os_cray" 1>&6
1754 if test $ac_cv_os_cray = yes; then
1755 for ac_func in _getb67 GETB67 getb67; do
1756 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1757 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1758 echo $ac_n "(cached) $ac_c" 1>&6
1759 else
1760 cat > conftest.$ac_ext <<EOF
1761 #line 1762 "configure"
1762 #include "confdefs.h"
1763 /* System header to define __stub macros and hopefully few prototypes,
1764 which can conflict with char $ac_func(); below. */
1765 #include <assert.h>
1766 /* Override any gcc2 internal prototype to avoid an error. */
1767 char $ac_func();
1768
1769 int main() { return 0; }
1770 int t() {
1771
1772 /* The GNU C library defines this for functions which it implements
1773 to always fail with ENOSYS. Some functions are actually named
1774 something starting with __ and the normal name is an alias. */
1775 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1776 choke me
1777 #else
1778 $ac_func();
1779 #endif
1780
1781 ; return 0; }
1782 EOF
1783 if { (eval echo configure:1784: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
1784 rm -rf conftest*
1785 eval "ac_cv_func_$ac_func=yes"
1786 else
1787 rm -rf conftest*
1788 eval "ac_cv_func_$ac_func=no"
1789 fi
1790 rm -f conftest*
1791
1792 fi
1793 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1794 echo "$ac_t""yes" 1>&6
1795 cat >> confdefs.h <<EOF
1796 #define CRAY_STACKSEG_END $ac_func
1797 EOF
1798
1799 break
1800 else
1801 echo "$ac_t""no" 1>&6
1802 fi
1803
1804 done
1805 fi
1806
1807 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
1808 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
1809 echo $ac_n "(cached) $ac_c" 1>&6
1810 else
1811 if test "$cross_compiling" = yes; then
1812 ac_cv_c_stack_direction=0
1813 else
1814 cat > conftest.$ac_ext <<EOF
1815 #line 1816 "configure"
1816 #include "confdefs.h"
1817 find_stack_direction ()
1818 {
1819 static char *addr = 0;
1820 auto char dummy;
1821 if (addr == 0)
1822 {
1823 addr = &dummy;
1824 return find_stack_direction ();
1825 }
1826 else
1827 return (&dummy > addr) ? 1 : -1;
1828 }
1829 main ()
1830 {
1831 exit (find_stack_direction() < 0);
1832 }
1833 EOF
1834 { (eval echo configure:1835: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
1835 if test -s conftest && (./conftest; exit) 2>/dev/null; then
1836 ac_cv_c_stack_direction=1
1837 else
1838 ac_cv_c_stack_direction=-1
1839 fi
1840 fi
1841 rm -fr conftest*
1842 fi
1843
1844 echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
1845 cat >> confdefs.h <<EOF
1846 #define STACK_DIRECTION $ac_cv_c_stack_direction
1847 EOF
1848
1849 fi
1850
1851 echo $ac_n "checking for inline""... $ac_c" 1>&6
1852 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
1853 echo $ac_n "(cached) $ac_c" 1>&6
1854 else
1855 ac_cv_c_inline=no
1856 for ac_kw in inline __inline__ __inline; do
1857 cat > conftest.$ac_ext <<EOF
1858 #line 1859 "configure"
1859 #include "confdefs.h"
1860
1861 int main() { return 0; }
1862 int t() {
1863 } $ac_kw foo() {
1864 ; return 0; }
1865 EOF
1866 if { (eval echo configure:1867: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1867 rm -rf conftest*
1868 ac_cv_c_inline=$ac_kw; break
1869 fi
1870 rm -f conftest*
1871
1872 done
1873
1874 fi
1875
1876 echo "$ac_t""$ac_cv_c_inline" 1>&6
1877 case "$ac_cv_c_inline" in
1878 inline | yes) ;;
1879 no) cat >> confdefs.h <<\EOF
1880 #define inline
1881 EOF
1882 ;;
1883 *) cat >> confdefs.h <<EOF
1884 #define inline $ac_cv_c_inline
1885 EOF
1886 ;;
1887 esac
1888
1889
1890 # VMS doesn't have unlink.
1891 for ac_func in unlink remove
1892 do
1893 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1894 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1895 echo $ac_n "(cached) $ac_c" 1>&6
1896 else
1897 cat > conftest.$ac_ext <<EOF
1898 #line 1899 "configure"
1899 #include "confdefs.h"
1900 /* System header to define __stub macros and hopefully few prototypes,
1901 which can conflict with char $ac_func(); below. */
1902 #include <assert.h>
1903 /* Override any gcc2 internal prototype to avoid an error. */
1904 char $ac_func();
1905
1906 int main() { return 0; }
1907 int t() {
1908
1909 /* The GNU C library defines this for functions which it implements
1910 to always fail with ENOSYS. Some functions are actually named
1911 something starting with __ and the normal name is an alias. */
1912 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1913 choke me
1914 #else
1915 $ac_func();
1916 #endif
1917
1918 ; return 0; }
1919 EOF
1920 if { (eval echo configure:1921: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
1921 rm -rf conftest*
1922 eval "ac_cv_func_$ac_func=yes"
1923 else
1924 rm -rf conftest*
1925 eval "ac_cv_func_$ac_func=no"
1926 fi
1927 rm -f conftest*
1928
1929 fi
1930 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1931 echo "$ac_t""yes" 1>&6
1932 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1933 cat >> confdefs.h <<EOF
1934 #define $ac_tr_func 1
1935 EOF
1936 break
1937 else
1938 echo "$ac_t""no" 1>&6
1939 fi
1940 done
1941
1942
1943 # Some systems don't have sbrk().
1944 for ac_func in sbrk
1945 do
1946 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1947 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1948 echo $ac_n "(cached) $ac_c" 1>&6
1949 else
1950 cat > conftest.$ac_ext <<EOF
1951 #line 1952 "configure"
1952 #include "confdefs.h"
1953 /* System header to define __stub macros and hopefully few prototypes,
1954 which can conflict with char $ac_func(); below. */
1955 #include <assert.h>
1956 /* Override any gcc2 internal prototype to avoid an error. */
1957 char $ac_func();
1958
1959 int main() { return 0; }
1960 int t() {
1961
1962 /* The GNU C library defines this for functions which it implements
1963 to always fail with ENOSYS. Some functions are actually named
1964 something starting with __ and the normal name is an alias. */
1965 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1966 choke me
1967 #else
1968 $ac_func();
1969 #endif
1970
1971 ; return 0; }
1972 EOF
1973 if { (eval echo configure:1974: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
1974 rm -rf conftest*
1975 eval "ac_cv_func_$ac_func=yes"
1976 else
1977 rm -rf conftest*
1978 eval "ac_cv_func_$ac_func=no"
1979 fi
1980 rm -f conftest*
1981
1982 fi
1983 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1984 echo "$ac_t""yes" 1>&6
1985 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1986 cat >> confdefs.h <<EOF
1987 #define $ac_tr_func 1
1988 EOF
1989
1990 else
1991 echo "$ac_t""no" 1>&6
1992 fi
1993 done
1994
1995
1996 # Some non-ANSI preprocessors botch requoting inside strings. That's bad
1997 # enough, but on some of those systems, the assert macro relies on requoting
1998 # working properly!
1999 echo $ac_n "checking for working assert macro""... $ac_c" 1>&6
2000 if eval "test \"`echo '$''{'gas_cv_assert_ok'+set}'`\" = set"; then
2001 echo $ac_n "(cached) $ac_c" 1>&6
2002 else
2003 cat > conftest.$ac_ext <<EOF
2004 #line 2005 "configure"
2005 #include "confdefs.h"
2006 #include <assert.h>
2007 #include <stdio.h>
2008 int main() { return 0; }
2009 int t() {
2010
2011 /* check for requoting problems */
2012 static int a, b, c, d;
2013 static char *s;
2014 assert (!strcmp(s, "foo bar baz quux"));
2015 /* check for newline handling */
2016 assert (a == b
2017 || c == d);
2018
2019 ; return 0; }
2020 EOF
2021 if { (eval echo configure:2022: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
2022 rm -rf conftest*
2023 gas_cv_assert_ok=yes
2024 else
2025 rm -rf conftest*
2026 gas_cv_assert_ok=no
2027 fi
2028 rm -f conftest*
2029
2030 fi
2031 echo "$ac_t""$gas_cv_assert_ok" 1>&6
2032 test $gas_cv_assert_ok = yes || cat >> confdefs.h <<\EOF
2033 #define BROKEN_ASSERT 1
2034 EOF
2035
2036
2037
2038 # On some systems, the system header files may not declare malloc, realloc,
2039 # and free. There are places where gas needs these functions to have been
2040 # declared -- such as when taking their addresses.
2041 gas_test_headers="
2042 #ifdef HAVE_MEMORY_H
2043 #include <memory.h>
2044 #endif
2045 #ifdef HAVE_STRING_H
2046 #include <string.h>
2047 #endif
2048 #ifdef HAVE_STDLIB_H
2049 #include <stdlib.h>
2050 #endif
2051 #ifdef HAVE_UNISTD_H
2052 #include <unistd.h>
2053 #endif
2054 "
2055
2056 echo $ac_n "checking whether declaration is required for malloc""... $ac_c" 1>&6
2057 if eval "test \"`echo '$''{'gas_cv_decl_needed_malloc'+set}'`\" = set"; then
2058 echo $ac_n "(cached) $ac_c" 1>&6
2059 else
2060 cat > conftest.$ac_ext <<EOF
2061 #line 2062 "configure"
2062 #include "confdefs.h"
2063 $gas_test_headers
2064 int main() { return 0; }
2065 int t() {
2066
2067 typedef char *(*f)();
2068 f x;
2069 x = (f) malloc;
2070
2071 ; return 0; }
2072 EOF
2073 if { (eval echo configure:2074: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
2074 rm -rf conftest*
2075 gas_cv_decl_needed_malloc=no
2076 else
2077 rm -rf conftest*
2078 gas_cv_decl_needed_malloc=yes
2079 fi
2080 rm -f conftest*
2081
2082 fi
2083 echo "$ac_t""$gas_cv_decl_needed_malloc" 1>&6
2084 test $gas_cv_decl_needed_malloc = no || {
2085 cat >> confdefs.h <<\EOF
2086 #define NEED_DECLARATION_MALLOC 1
2087 EOF
2088
2089 }
2090
2091
2092 echo $ac_n "checking whether declaration is required for free""... $ac_c" 1>&6
2093 if eval "test \"`echo '$''{'gas_cv_decl_needed_free'+set}'`\" = set"; then
2094 echo $ac_n "(cached) $ac_c" 1>&6
2095 else
2096 cat > conftest.$ac_ext <<EOF
2097 #line 2098 "configure"
2098 #include "confdefs.h"
2099 $gas_test_headers
2100 int main() { return 0; }
2101 int t() {
2102
2103 typedef void (*f)();
2104 f x;
2105 x = (f) free;
2106
2107 ; return 0; }
2108 EOF
2109 if { (eval echo configure:2110: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
2110 rm -rf conftest*
2111 gas_cv_decl_needed_free=no
2112 else
2113 rm -rf conftest*
2114 gas_cv_decl_needed_free=yes
2115 fi
2116 rm -f conftest*
2117
2118 fi
2119 echo "$ac_t""$gas_cv_decl_needed_free" 1>&6
2120 test $gas_cv_decl_needed_free = no || {
2121 cat >> confdefs.h <<\EOF
2122 #define NEED_DECLARATION_FREE 1
2123 EOF
2124
2125 }
2126
2127
2128 # Does errno.h declare errno, or do we have to add a separate declaration
2129 # for it?
2130
2131 echo $ac_n "checking whether declaration is required for errno""... $ac_c" 1>&6
2132 if eval "test \"`echo '$''{'gas_cv_decl_needed_errno'+set}'`\" = set"; then
2133 echo $ac_n "(cached) $ac_c" 1>&6
2134 else
2135 cat > conftest.$ac_ext <<EOF
2136 #line 2137 "configure"
2137 #include "confdefs.h"
2138
2139 #ifdef HAVE_ERRNO_H
2140 #include <errno.h>
2141 #endif
2142
2143 int main() { return 0; }
2144 int t() {
2145
2146 typedef int f;
2147 f x;
2148 x = (f) errno;
2149
2150 ; return 0; }
2151 EOF
2152 if { (eval echo configure:2153: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
2153 rm -rf conftest*
2154 gas_cv_decl_needed_errno=no
2155 else
2156 rm -rf conftest*
2157 gas_cv_decl_needed_errno=yes
2158 fi
2159 rm -f conftest*
2160
2161 fi
2162 echo "$ac_t""$gas_cv_decl_needed_errno" 1>&6
2163 test $gas_cv_decl_needed_errno = no || {
2164 cat >> confdefs.h <<\EOF
2165 #define NEED_DECLARATION_ERRNO 1
2166 EOF
2167
2168 }
2169
2170
2171 HLDFLAGS=
2172 RPATH_ENVVAR=LD_LIBRARY_PATH
2173 # If we have shared libraries, try to set rpath reasonably.
2174 if test "${shared}" = "true"; then
2175 case "${host}" in
2176 *-*-hpux*)
2177 HLDFLAGS='-Wl,+s,+b,$(libdir)'
2178 RPATH_ENVVAR=SHLIB_PATH
2179 ;;
2180 *-*-irix5*)
2181 HLDFLAGS='-Wl,-rpath,$(libdir)'
2182 ;;
2183 *-*-linux*aout*)
2184 ;;
2185 *-*-linux*)
2186 HLDFLAGS='-Wl,-rpath,$(libdir)'
2187 ;;
2188 *-*-sysv4* | *-*-solaris*)
2189 HLDFLAGS='-R $(libdir)'
2190 ;;
2191 esac
2192 fi
2193
2194 # On SunOS, if the linker supports the -rpath option, use it to
2195 # prevent ../bfd and ../opcodes from being included in the run time
2196 # search path.
2197 case "${host}" in
2198 *-*-sunos*)
2199 echo 'main () { }' > conftest.c
2200 ${CC} -o conftest -Wl,-rpath= conftest.c >/dev/null 2>conftest.t
2201 if grep 'unrecognized' conftest.t >/dev/null 2>&1; then
2202 :
2203 elif grep 'No such file' conftest.t >/dev/null 2>&1; then
2204 :
2205 elif grep 'do not mix' conftest.t >/dev/null 2>&1; then
2206 :
2207 elif test "${shared}" = "true"; then
2208 HLDFLAGS='-Wl,-rpath=$(libdir)'
2209 else
2210 HLDFLAGS='-Wl,-rpath='
2211 fi
2212 rm -f conftest.t conftest.c conftest
2213 ;;
2214 esac
2215
2216
2217
2218 trap '' 1 2 15
2219 cat > confcache <<\EOF
2220 # This file is a shell script that caches the results of configure
2221 # tests run on this system so they can be shared between configure
2222 # scripts and configure runs. It is not useful on other systems.
2223 # If it contains results you don't want to keep, you may remove or edit it.
2224 #
2225 # By default, configure uses ./config.cache as the cache file,
2226 # creating it if it does not exist already. You can give configure
2227 # the --cache-file=FILE option to use a different cache file; that is
2228 # what configure does when it calls configure scripts in
2229 # subdirectories, so they share the cache.
2230 # Giving --cache-file=/dev/null disables caching, for debugging configure.
2231 # config.status only pays attention to the cache file if you give it the
2232 # --recheck option to rerun configure.
2233 #
2234 EOF
2235 # Ultrix sh set writes to stderr and can't be redirected directly,
2236 # and sets the high bit in the cache file unless we assign to the vars.
2237 (set) 2>&1 |
2238 sed -n "s/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=\${\1='\2'}/p" \
2239 >> confcache
2240 if cmp -s $cache_file confcache; then
2241 :
2242 else
2243 if test -w $cache_file; then
2244 echo "updating cache $cache_file"
2245 cat confcache > $cache_file
2246 else
2247 echo "not updating unwritable cache $cache_file"
2248 fi
2249 fi
2250 rm -f confcache
2251
2252 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
2253
2254 test "x$prefix" = xNONE && prefix=$ac_default_prefix
2255 # Let make expand exec_prefix.
2256 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
2257
2258 # Any assignment to VPATH causes Sun make to only execute
2259 # the first set of double-colon rules, so remove it if not needed.
2260 # If there is a colon in the path, we need to keep it.
2261 if test "x$srcdir" = x.; then
2262 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
2263 fi
2264
2265 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
2266
2267 DEFS=-DHAVE_CONFIG_H
2268
2269 # Without the "./", some shells look in PATH for config.status.
2270 : ${CONFIG_STATUS=./config.status}
2271
2272 echo creating $CONFIG_STATUS
2273 rm -f $CONFIG_STATUS
2274 cat > $CONFIG_STATUS <<EOF
2275 #! /bin/sh
2276 # Generated automatically by configure.
2277 # Run this file to recreate the current configuration.
2278 # This directory was configured as follows,
2279 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
2280 #
2281 # $0 $ac_configure_args
2282 #
2283 # Compiler output produced by configure, useful for debugging
2284 # configure, is in ./config.log if it exists.
2285
2286 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
2287 for ac_option
2288 do
2289 case "\$ac_option" in
2290 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
2291 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
2292 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
2293 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
2294 echo "$CONFIG_STATUS generated by autoconf version 2.8"
2295 exit 0 ;;
2296 -help | --help | --hel | --he | --h)
2297 echo "\$ac_cs_usage"; exit 0 ;;
2298 *) echo "\$ac_cs_usage"; exit 1 ;;
2299 esac
2300 done
2301
2302 ac_given_srcdir=$srcdir
2303 ac_given_INSTALL="$INSTALL"
2304
2305 trap 'rm -fr `echo "Makefile doc/Makefile .gdbinit:gdbinit.in conf" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
2306 EOF
2307 cat >> $CONFIG_STATUS <<EOF
2308
2309 # Protect against being on the right side of a sed subst in config.status.
2310 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
2311 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
2312 $ac_vpsub
2313 $extrasub
2314 s%@CFLAGS@%$CFLAGS%g
2315 s%@CPPFLAGS@%$CPPFLAGS%g
2316 s%@CXXFLAGS@%$CXXFLAGS%g
2317 s%@DEFS@%$DEFS%g
2318 s%@LDFLAGS@%$LDFLAGS%g
2319 s%@LIBS@%$LIBS%g
2320 s%@exec_prefix@%$exec_prefix%g
2321 s%@prefix@%$prefix%g
2322 s%@program_transform_name@%$program_transform_name%g
2323 s%@bindir@%$bindir%g
2324 s%@sbindir@%$sbindir%g
2325 s%@libexecdir@%$libexecdir%g
2326 s%@datadir@%$datadir%g
2327 s%@sysconfdir@%$sysconfdir%g
2328 s%@sharedstatedir@%$sharedstatedir%g
2329 s%@localstatedir@%$localstatedir%g
2330 s%@libdir@%$libdir%g
2331 s%@includedir@%$includedir%g
2332 s%@oldincludedir@%$oldincludedir%g
2333 s%@infodir@%$infodir%g
2334 s%@mandir@%$mandir%g
2335 s%@host@%$host%g
2336 s%@host_alias@%$host_alias%g
2337 s%@host_cpu@%$host_cpu%g
2338 s%@host_vendor@%$host_vendor%g
2339 s%@host_os@%$host_os%g
2340 s%@target@%$target%g
2341 s%@target_alias@%$target_alias%g
2342 s%@target_cpu@%$target_cpu%g
2343 s%@target_vendor@%$target_vendor%g
2344 s%@target_os@%$target_os%g
2345 s%@build@%$build%g
2346 s%@build_alias@%$build_alias%g
2347 s%@build_cpu@%$build_cpu%g
2348 s%@build_vendor@%$build_vendor%g
2349 s%@build_os@%$build_os%g
2350 /@target_frag@/r $target_frag
2351 s%@target_frag@%%g
2352 s%@extra_objects@%$extra_objects%g
2353 s%@target_cpu_type@%$target_cpu_type%g
2354 s%@obj_format@%$obj_format%g
2355 s%@atof@%$atof%g
2356 s%@OPCODES_DEP@%$OPCODES_DEP%g
2357 s%@OPCODES_LIB@%$OPCODES_LIB%g
2358 s%@BFDDEP@%$BFDDEP%g
2359 s%@BFDLIB@%$BFDLIB%g
2360 s%@ALL_OBJ_DEPS@%$ALL_OBJ_DEPS%g
2361 s%@CC@%$CC%g
2362 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
2363 s%@INSTALL_DATA@%$INSTALL_DATA%g
2364 s%@CPP@%$CPP%g
2365 s%@ALLOCA@%$ALLOCA%g
2366 s%@HLDFLAGS@%$HLDFLAGS%g
2367 s%@RPATH_ENVVAR@%$RPATH_ENVVAR%g
2368
2369 CEOF
2370 EOF
2371 cat >> $CONFIG_STATUS <<EOF
2372
2373 CONFIG_FILES=\${CONFIG_FILES-"Makefile doc/Makefile .gdbinit:gdbinit.in"}
2374 EOF
2375 cat >> $CONFIG_STATUS <<\EOF
2376 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
2377 # Support "outfile[:infile]", defaulting infile="outfile.in".
2378 case "$ac_file" in
2379 *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'`
2380 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
2381 *) ac_file_in="${ac_file}.in" ;;
2382 esac
2383
2384 # Adjust relative srcdir, etc. for subdirectories.
2385
2386 # Remove last slash and all that follows it. Not all systems have dirname.
2387 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
2388 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
2389 # The file is in a subdirectory.
2390 test ! -d "$ac_dir" && mkdir "$ac_dir"
2391 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
2392 # A "../" for each directory in $ac_dir_suffix.
2393 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
2394 else
2395 ac_dir_suffix= ac_dots=
2396 fi
2397
2398 case "$ac_given_srcdir" in
2399 .) srcdir=.
2400 if test -z "$ac_dots"; then top_srcdir=.
2401 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
2402 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
2403 *) # Relative path.
2404 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
2405 top_srcdir="$ac_dots$ac_given_srcdir" ;;
2406 esac
2407
2408 case "$ac_given_INSTALL" in
2409 [/$]*) INSTALL="$ac_given_INSTALL" ;;
2410 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
2411 esac
2412 echo creating "$ac_file"
2413 rm -f "$ac_file"
2414 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
2415 case "$ac_file" in
2416 *Makefile*) ac_comsub="1i\\
2417 # $configure_input" ;;
2418 *) ac_comsub= ;;
2419 esac
2420 sed -e "$ac_comsub
2421 s%@configure_input@%$configure_input%g
2422 s%@srcdir@%$srcdir%g
2423 s%@top_srcdir@%$top_srcdir%g
2424 s%@INSTALL@%$INSTALL%g
2425 " -f conftest.subs $ac_given_srcdir/$ac_file_in > $ac_file
2426 fi; done
2427 rm -f conftest.subs
2428
2429 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
2430 # NAME is the cpp macro being defined and VALUE is the value it is being given.
2431 #
2432 # ac_d sets the value in "#define NAME VALUE" lines.
2433 ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
2434 ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
2435 ac_dC='\3'
2436 ac_dD='%g'
2437 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
2438 ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
2439 ac_uB='\([ ]\)%\1#\2define\3'
2440 ac_uC=' '
2441 ac_uD='\4%g'
2442 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
2443 ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
2444 ac_eB='$%\1#\2define\3'
2445 ac_eC=' '
2446 ac_eD='%g'
2447
2448 CONFIG_HEADERS=${CONFIG_HEADERS-"conf"}
2449 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
2450 # Support "outfile[:infile]", defaulting infile="outfile.in".
2451 case "$ac_file" in
2452 *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'`
2453 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
2454 *) ac_file_in="${ac_file}.in" ;;
2455 esac
2456
2457 echo creating $ac_file
2458
2459 rm -f conftest.frag conftest.in conftest.out
2460 cp $ac_given_srcdir/$ac_file_in conftest.in
2461
2462 EOF
2463
2464 # Transform confdefs.h into a sed script conftest.vals that substitutes
2465 # the proper values into config.h.in to produce config.h. And first:
2466 # Protect against being on the right side of a sed subst in config.status.
2467 # Protect against being in an unquoted here document in config.status.
2468 rm -f conftest.vals
2469 cat > conftest.hdr <<\EOF
2470 s/[\\&%]/\\&/g
2471 s%[\\$`]%\\&%g
2472 s%#define \([A-Za-z_][A-Za-z0-9_]*\) \(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
2473 s%ac_d%ac_u%gp
2474 s%ac_u%ac_e%gp
2475 EOF
2476 sed -n -f conftest.hdr confdefs.h > conftest.vals
2477 rm -f conftest.hdr
2478
2479 # This sed command replaces #undef with comments. This is necessary, for
2480 # example, in the case of _POSIX_SOURCE, which is predefined and required
2481 # on some systems where configure will not decide to define it.
2482 cat >> conftest.vals <<\EOF
2483 s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
2484 EOF
2485
2486 # Break up conftest.vals because some shells have a limit on
2487 # the size of here documents, and old seds have small limits too.
2488 # Maximum number of lines to put in a single here document.
2489 ac_max_here_lines=12
2490
2491 rm -f conftest.tail
2492 while :
2493 do
2494 ac_lines=`grep -c . conftest.vals`
2495 # grep -c gives empty output for an empty file on some AIX systems.
2496 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
2497 # Write a limited-size here document to conftest.frag.
2498 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
2499 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
2500 echo 'CEOF
2501 sed -f conftest.frag conftest.in > conftest.out
2502 rm -f conftest.in
2503 mv conftest.out conftest.in
2504 ' >> $CONFIG_STATUS
2505 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
2506 rm -f conftest.vals
2507 mv conftest.tail conftest.vals
2508 done
2509 rm -f conftest.vals
2510
2511 cat >> $CONFIG_STATUS <<\EOF
2512 rm -f conftest.frag conftest.h
2513 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
2514 cat conftest.in >> conftest.h
2515 rm -f conftest.in
2516 if cmp -s $ac_file conftest.h 2>/dev/null; then
2517 echo "$ac_file is unchanged"
2518 rm -f conftest.h
2519 else
2520 rm -f $ac_file
2521 mv conftest.h $ac_file
2522 fi
2523 fi; done
2524
2525 EOF
2526
2527 cat >> $CONFIG_STATUS <<EOF
2528 ac_sources="$files"
2529 ac_dests="$links"
2530 EOF
2531
2532 cat >> $CONFIG_STATUS <<\EOF
2533 srcdir=$ac_given_srcdir
2534 while test -n "$ac_sources"; do
2535 set $ac_dests; ac_dest=$1; shift; ac_dests=$*
2536 set $ac_sources; ac_source=$1; shift; ac_sources=$*
2537
2538 echo "linking $srcdir/$ac_source to $ac_dest"
2539
2540 if test ! -r $srcdir/$ac_source; then
2541 { echo "configure: error: $srcdir/$ac_source: File not found" 1>&2; exit 1; }
2542 fi
2543 rm -f $ac_dest
2544
2545 # Make relative symlinks.
2546 # Remove last slash and all that follows it. Not all systems have dirname.
2547 ac_dest_dir=`echo $ac_dest|sed 's%/[^/][^/]*$%%'`
2548 if test "$ac_dest_dir" != "$ac_dest" && test "$ac_dest_dir" != .; then
2549 # The dest file is in a subdirectory.
2550 test ! -d "$ac_dest_dir" && mkdir "$ac_dest_dir"
2551 ac_dest_dir_suffix="/`echo $ac_dest_dir|sed 's%^\./%%'`"
2552 # A "../" for each directory in $ac_dest_dir_suffix.
2553 ac_dots=`echo $ac_dest_dir_suffix|sed 's%/[^/]*%../%g'`
2554 else
2555 ac_dest_dir_suffix= ac_dots=
2556 fi
2557
2558 case "$srcdir" in
2559 [/$]*) ac_rel_source="$srcdir/$ac_source" ;;
2560 *) ac_rel_source="$ac_dots$srcdir/$ac_source" ;;
2561 esac
2562
2563 # Make a symlink if possible; otherwise try a hard link.
2564 if ln -s $ac_rel_source $ac_dest 2>/dev/null ||
2565 ln $srcdir/$ac_source $ac_dest; then :
2566 else
2567 { echo "configure: error: can not link $ac_dest to $srcdir/$ac_source" 1>&2; exit 1; }
2568 fi
2569 done
2570
2571
2572 exit 0
2573 EOF
2574 chmod +x $CONFIG_STATUS
2575 rm -fr confdefs* $ac_clean_files
2576 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
2577
This page took 0.089767 seconds and 4 git commands to generate.