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