34377f14f6b1d7a3675ea6c2de866cd6a9c49742
[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.6
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.6"
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 $.
654 echo 's,\\,\\\\,g; s,\$,$$,g' > conftestsed
655 program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
656 rm -f conftestsed
657 fi
658 test "$program_prefix" != NONE &&
659 program_transform_name="s,^,${program_prefix},; $program_transform_name"
660 # Use a double $ so make ignores it.
661 test "$program_suffix" != NONE &&
662 program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
663
664 # sed with no file args requires a program.
665 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
666
667
668 te_file=generic
669
670 # assign cpu type
671
672 # check for architecture variants
673 case ${target_cpu} in
674 armeb) cpu_type=arm endian=big ;;
675 arm*) cpu_type=arm endian=little ;;
676 hppa*) cpu_type=hppa ;;
677 i[45]86) cpu_type=i386 ;;
678 m680[012346]0) cpu_type=m68k ;;
679 m68008) cpu_type=m68k ;;
680 m683??) cpu_type=m68k ;;
681 m8*) cpu_type=m88k ;;
682 mips*el) cpu_type=mips endian=little;;
683 mips*) cpu_type=mips endian=big ;;
684 powerpcle*) cpu_type=ppc endian=little ;;
685 powerpc*) cpu_type=ppc endian=big ;;
686 rs6000*) cpu_type=ppc ;;
687 sparc64) cpu_type=sparc obj_format=elf
688 cat >> confdefs.h <<\EOF
689 #define sparcv9 1
690 EOF
691 ;;
692 sparclite*) cpu_type=sparc ;;
693 *) cpu_type=${target_cpu} ;;
694 esac
695
696 # do we need the opcodes library?
697 case ${cpu_type} in
698 alpha | vax)
699 ;;
700 *)
701 OPCODES_LIB="../opcodes/libopcodes.a"
702 ;;
703 esac
704
705
706 gas_target=${cpu_type}
707 this_target=${generic_target}
708
709 canon_targets=""
710 if test -n "$enable_targets" ; then
711 for t in `echo $enable_targets | sed 's/,/ /g'`; do
712 result=`$ac_config_sub $t 2>/dev/null`
713 if test -n "$result" ; then
714 canon_targets="$canon_targets $result"
715 # else
716 # # Permit "all", etc. We don't support it yet though.
717 # canon_targets="$canon_targets $t"
718 fi
719 done
720 _gas_uniq_list="$canon_targets"
721 _gas_uniq_newlist=""
722 for _gas_uniq_i in _gas_uniq_dummy $_gas_uniq_list ; do
723 case $_gas_uniq_i in
724 _gas_uniq_dummy) ;;
725 *) case " $_gas_uniq_newlist " in
726 *" $_gas_uniq_i "*) ;;
727 *) _gas_uniq_newlist="$_gas_uniq_newlist $_gas_uniq_i" ;;
728 esac ;;
729 esac
730 done
731 canon_targets=$_gas_uniq_newlist
732
733 fi
734
735 emulations=""
736
737 for this_target in $target $canon_targets ; do
738
739 eval `echo $this_target | sed 's/^\(.*\)-\(.*\)-\(.*\)$/cpu=\1 vendor=\2 os=\3/'`
740
741 # check for architecture variants
742 case ${cpu} in
743 hppa*) cpu_type=hppa ;;
744 i[45]86) cpu_type=i386 ;;
745 m680[012346]0) cpu_type=m68k ;;
746 m68008) cpu_type=m68k ;;
747 m683??) cpu_type=m68k ;;
748 m8*) cpu_type=m88k ;;
749 mips*el) cpu_type=mips endian=little;;
750 mips*) cpu_type=mips endian=big ;;
751 powerpcle*) cpu_type=ppc endian=little ;;
752 powerpc*) cpu_type=ppc endian=big ;;
753 rs6000*) cpu_type=ppc ;;
754 sparc64) cpu_type=sparc obj_format=elf want_sparcv9=true ;;
755 sparclite*) cpu_type=sparc ;;
756 *) cpu_type=${cpu} ;;
757 esac
758
759 if test ${this_target} = $target ; then
760 target_cpu_type=${cpu_type}
761 elif test ${target_cpu_type} != ${cpu_type} ; then
762 continue
763 fi
764
765 targ=${cpu_type}
766 generic_target=${cpu_type}-$vendor-$os
767 dev=no
768 bfd_gas=no
769 em=generic
770
771 # assign object format
772 case ${generic_target} in
773 a29k-amd-udi) fmt=coff targ=ebmon29k ;;
774 a29k-amd-ebmon) fmt=coff targ=ebmon29k ;;
775 a29k-nyu-sym1) fmt=coff targ=ebmon29k ;;
776 a29k-*-vxworks*) fmt=coff ;;
777
778 alpha-*-netware*) fmt=ecoff ;;
779 alpha-*-osf*) fmt=ecoff ;;
780 alpha-*-linux*) fmt=ecoff ;;
781
782 # start-sanitize-arc
783 arc-*-elf*) fmt=elf bfd_gas=yes ;;
784 # end-sanitize-arc
785
786 arm-*-riscix*) fmt=aout targ=arm-lit ;;
787 arm-*-aout) fmt=aout
788 case "$endian" in
789 big) targ=arm-big ;;
790 *) targ=arm-lit ;;
791 esac
792 ;;
793 arm-*-coff) fmt=coff ;;
794 arm-*-riscix*) fmt=aout ;;
795 arm-*-pe) fmt=coff targ=armcoff em=pe ;;
796
797 hppa-*-*elf*) fmt=elf em=hppa ;;
798 hppa-*-lites*) fmt=elf em=hppa ;;
799 hppa-*-osf*) fmt=som em=hppa ;;
800 hppa-*-hpux*) fmt=som em=hppa ;;
801 hppa-*-bsd*) fmt=som em=hppa ;;
802 hppa-*-hiux*) fmt=som em=hppa ;;
803
804 h8300-*-coff) fmt=coff ;;
805
806 i386-ibm-aix*) fmt=coff targ=i386coff
807 em=i386aix ;;
808 i386-*-bsd*) fmt=aout em=386bsd ;;
809 i386-*-netbsd0.8) fmt=aout em=386bsd ;;
810 i386-*-netbsd*) fmt=aout em=nbsd bfd_gas=yes;;
811 i386-*-linux*aout* | i386-*-linuxoldld) fmt=aout em=linux ;;
812 i386-*-linux*coff*) fmt=coff em=linux
813 targ=i386coff ;;
814 i386-*-linux*) fmt=elf em=linux ;;
815 i386-*-lynxos*) fmt=coff targ=i386coff
816 em=lynx ;;
817 i386-*-sysv4* | i386-*-solaris* | i386-*-elf)
818 fmt=elf ;;
819 i386-*-coff | i386-*-sysv* | i386-*-sco* | i386-*-isc*)
820 fmt=coff targ=i386coff ;;
821 i386-*-vsta) fmt=aout ;;
822 i386-*-go32) fmt=coff targ=i386coff ;;
823 i386-*-gnu*) fmt=elf ;;
824 i386-*-mach*)
825 fmt=aout em=mach bfd_gas=yes ;;
826 i386-*-msdos*) fmt=aout ;;
827 i386-*-moss*) fmt=elf ;;
828 i386-*-pe) fmt=coff targ=i386coff em=pe ;;
829 i386-*-win32) fmt=coff targ=i386coff em=pe ;;
830 i386-*-*nt) fmt=coff targ=i386coff em=pe ;;
831 i960-*-bout) fmt=bout ;;
832 i960-*-coff) fmt=coff em=ic960 targ=ic960coff ;;
833 i960-*-nindy*) fmt=bout ;;
834 i960-*-vxworks4*) fmt=bout ;;
835 i960-*-vxworks5.0) fmt=bout ;;
836 i960-*-vxworks5.*) fmt=coff em=ic960 targ=ic960coff ;;
837 i960-*-vxworks*) fmt=bout ;;
838
839 m68k-*-vxworks* | m68k-ericsson-ose | m68k-*-sunos*)
840 fmt=aout em=sun3 ;;
841 m68k-motorola-sysv*) fmt=coff targ=m68kcoff em=delta ;;
842 m68k-bull-sysv3*) fmt=coff targ=m68kcoff em=dpx2 ;;
843 m68k-apollo-*) fmt=coff targ=apollo em=apollo ;;
844 m68k-*-coff | m68k-*-sysv*)
845 fmt=coff targ=m68kcoff ;;
846 m68k-*-elf) fmt=elf ;;
847 m68k-*-hpux*) fmt=hp300 em=hp300 ;;
848 m68k-*-lynxos*) fmt=coff targ=m68kcoff
849 em=lynx ;;
850 m68k-*-netbsd*) fmt=aout em=nbsd bfd_gas=yes ;;
851
852 m88k-motorola-sysv3*) fmt=coff targ=m88kcoff em=delt88 ;;
853 m88k-*-coff*) fmt=coff targ=m88kcoff ;;
854
855 # don't change em like *-*-bsd does
856 mips-dec-netbsd*) fmt=elf targ=mips-lit endian=little ;;
857 mips-dec-bsd*) fmt=aout targ=mips-lit ;;
858 mips-sony-bsd*) fmt=ecoff targ=mips-big ;;
859 mips-*-bsd*) { echo "configure: error: Unknown vendor for mips-bsd configuration." 1>&2; exit 1; } ;;
860 mips-*-ultrix*) fmt=ecoff targ=mips-lit endian=little ;;
861 mips-*-ecoff*) fmt=ecoff
862 case "$endian" in
863 big) targ=mips-big ;;
864 *) targ=mips-lit ;;
865 esac
866 ;;
867 mips-*-ecoff*) fmt=ecoff targ=mips-big ;;
868 mips-*-gnu*) fmt=aout
869 case "$endian" in
870 big) targ=mips-big ;;
871 *) targ=mips-lit ;;
872 esac
873 ;;
874 mips-*-irix5*) fmt=elf targ=mips-big ;;
875 mips-*-irix*) fmt=ecoff targ=mips-big ;;
876 mips-*-riscos*) fmt=ecoff targ=mips-big ;;
877 mips-*-sysv*) fmt=ecoff targ=mips-big ;;
878 mips-*-elf*) fmt=elf
879 case "$endian" in
880 big) targ=mips-big ;;
881 *) targ=mips-lit ;;
882 esac
883 ;;
884 ppc-*-pe) fmt=coff em=pe
885 case "$endian" in
886 big) targ=ppc-big ;;
887 *) targ=ppc-lit ;;
888 esac
889 ;;
890 ppc-*-winnt*) fmt=coff em=pe
891 case "$endian" in
892 big) targ=ppc-big ;;
893 *) targ=ppc-lit ;;
894 esac
895 ;;
896 ppc-*-aix*) fmt=coff ;;
897 ppc-*-elf* | ppc-*-eabi* | ppc-*-sysv4*)
898 fmt=elf
899 case "$endian" in
900 big) targ=ppc-big ;;
901 *) targ=ppc-lit ;;
902 esac
903 ;;
904 ppc-*-macos* | ppc-*-mpw*)
905 fmt=coff em=macos ;;
906 ppc-*-netware*) fmt=elf em=ppcnw ;;
907
908 sh-*-coff) fmt=coff ;;
909
910 # start-sanitize-rce
911 rce-*-aout) fmt=aout ;;
912 # end-sanitize-rce
913
914 ns32k-pc532-mach* | ns32k-pc532-ux*) fmt=aout em=pc532mach ;;
915 ns32k-pc532-netbsd* | ns32k-pc532-lites*) fmt=aout em=nbsd532 ;;
916
917 sparc-*-sunos4*) fmt=aout em=sun3 ;;
918 sparc-*-aout | sparc*-*-vxworks)
919 fmt=aout ;;
920 sparc-*-coff) fmt=coff ;;
921 sparc-*-lynxos*) fmt=coff em=lynx ;;
922 sparc-fujitsu-none) fmt=aout ;;
923 sparc-*-elf | sparc*-*-solaris*)
924 fmt=elf ;;
925 sparc-*-netbsd*) fmt=aout em=nbsd bfd_gas=yes ;;
926
927 vax-*-bsd* | vax-*-ultrix*)
928 fmt=aout ;;
929 vax-*-vms) fmt=vms ;;
930
931 z8k-*-coff | z8k-*-sim)
932 fmt=coff ;;
933
934 w65-*-*) fmt=coff ;;
935
936 *-*-aout | *-*-scout)
937 fmt=aout ;;
938 *-*-nindy*)
939 fmt=bout ;;
940 *-*-bsd*)
941 fmt=aout em=sun3 ;;
942 *-*-generic) fmt=generic ;;
943 *-*-xray | *-*-hms) fmt=coff ;;
944 *-*-sim) fmt=coff ;;
945 *-*-elf | *-*-sysv4* | *-*-solaris*)
946 echo "configure: warning: GAS support for ELF format is incomplete." 1>&2
947 fmt=elf dev=yes ;;
948 *-*-vxworks) fmt=aout ;;
949 *-*-netware) fmt=elf ;;
950 esac
951
952 case ${cpu_type}-${fmt} in
953 arm-*) bfd_gas=yes ;;
954 # not yet
955 # i386-aout) bfd_gas=preferred ;;
956 mips-*) bfd_gas=yes ;;
957 ns32k-*) bfd_gas=yes ;;
958 ppc-*) bfd_gas=yes ;;
959 sparc-*) bfd_gas=yes ;;
960 *-elf) bfd_gas=yes ;;
961 *-ecoff) bfd_gas=yes ;;
962 *-som) bfd_gas=yes ;;
963 *) ;;
964 esac
965
966 # Other random stuff.
967
968 test -n "$want_sparcv9" && cat >> confdefs.h <<\EOF
969 #define sparcv9 1
970 EOF
971
972
973 case ${cpu_type} in
974 m68k) extra_objects="$extra_objects m68k-parse.o" ;;
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 case "${need_bfd}" in
1254 yes) BFDLIB=../bfd/libbfd.a
1255 ALL_OBJ_DEPS="$ALL_OBJ_DEPS ../bfd/bfd.h"
1256 ;;
1257 esac
1258
1259
1260
1261 cat >> confdefs.h <<EOF
1262 #define TARGET_ALIAS "${target_alias}"
1263 EOF
1264
1265 cat >> confdefs.h <<EOF
1266 #define TARGET_CANONICAL "${target}"
1267 EOF
1268
1269 cat >> confdefs.h <<EOF
1270 #define TARGET_CPU "${target_cpu}"
1271 EOF
1272
1273 cat >> confdefs.h <<EOF
1274 #define TARGET_VENDOR "${target_vendor}"
1275 EOF
1276
1277 cat >> confdefs.h <<EOF
1278 #define TARGET_OS "${target_os}"
1279 EOF
1280
1281
1282 # Extract the first word of "gcc", so it can be a program name with args.
1283 set dummy gcc; ac_word=$2
1284 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1285 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1286 echo $ac_n "(cached) $ac_c" 1>&6
1287 else
1288 if test -n "$CC"; then
1289 ac_cv_prog_CC="$CC" # Let the user override the test.
1290 else
1291 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1292 for ac_dir in $PATH; do
1293 test -z "$ac_dir" && ac_dir=.
1294 if test -f $ac_dir/$ac_word; then
1295 ac_cv_prog_CC="gcc"
1296 break
1297 fi
1298 done
1299 IFS="$ac_save_ifs"
1300 test -z "$ac_cv_prog_CC" && ac_cv_prog_CC="cc"
1301 fi
1302 fi
1303 CC="$ac_cv_prog_CC"
1304 if test -n "$CC"; then
1305 echo "$ac_t""$CC" 1>&6
1306 else
1307 echo "$ac_t""no" 1>&6
1308 fi
1309
1310
1311 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1312 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
1313 echo $ac_n "(cached) $ac_c" 1>&6
1314 else
1315 cat > conftest.c <<EOF
1316 #ifdef __GNUC__
1317 yes;
1318 #endif
1319 EOF
1320 if ${CC-cc} -E conftest.c 2>&5 | egrep yes >/dev/null 2>&1; then
1321 ac_cv_prog_gcc=yes
1322 else
1323 ac_cv_prog_gcc=no
1324 fi
1325 fi
1326
1327 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1328 if test $ac_cv_prog_gcc = yes; then
1329 GCC=yes
1330 if test "${CFLAGS+set}" != set; then
1331 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1332 if eval "test \"`echo '$''{'ac_cv_prog_gcc_g'+set}'`\" = set"; then
1333 echo $ac_n "(cached) $ac_c" 1>&6
1334 else
1335 echo 'void f(){}' > conftest.c
1336 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1337 ac_cv_prog_gcc_g=yes
1338 else
1339 ac_cv_prog_gcc_g=no
1340 fi
1341 rm -f conftest*
1342
1343 fi
1344
1345 echo "$ac_t""$ac_cv_prog_gcc_g" 1>&6
1346 if test $ac_cv_prog_gcc_g = yes; then
1347 CFLAGS="-g -O"
1348 else
1349 CFLAGS="-O"
1350 fi
1351 fi
1352 else
1353 GCC=
1354 test "${CFLAGS+set}" = set || CFLAGS="-g"
1355 fi
1356
1357 # Find a good install program. We prefer a C program (faster),
1358 # so one script is as good as another. But avoid the broken or
1359 # incompatible versions:
1360 # SysV /etc/install, /usr/sbin/install
1361 # SunOS /usr/etc/install
1362 # IRIX /sbin/install
1363 # AIX /bin/install
1364 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
1365 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1366 # ./install, which can be erroneously created by make from ./install.sh.
1367 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
1368 if test -z "$INSTALL"; then
1369 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
1370 echo $ac_n "(cached) $ac_c" 1>&6
1371 else
1372 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1373 for ac_dir in $PATH; do
1374 # Account for people who put trailing slashes in PATH elements.
1375 case "$ac_dir/" in
1376 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1377 *)
1378 # OSF1 and SCO ODT 3.0 have their own names for install.
1379 for ac_prog in ginstall installbsd scoinst install; do
1380 if test -f $ac_dir/$ac_prog; then
1381 if test $ac_prog = install &&
1382 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1383 # AIX install. It has an incompatible calling convention.
1384 # OSF/1 installbsd also uses dspmsg, but is usable.
1385 :
1386 else
1387 ac_cv_path_install="$ac_dir/$ac_prog -c"
1388 break 2
1389 fi
1390 fi
1391 done
1392 ;;
1393 esac
1394 done
1395 IFS="$ac_save_ifs"
1396
1397 fi
1398 if test "${ac_cv_path_install+set}" = set; then
1399 INSTALL="$ac_cv_path_install"
1400 else
1401 # As a last resort, use the slow shell script. We don't cache a
1402 # path for INSTALL within a source directory, because that will
1403 # break other packages using the cache if that directory is
1404 # removed, or if the path is relative.
1405 INSTALL="$ac_install_sh"
1406 fi
1407 fi
1408 echo "$ac_t""$INSTALL" 1>&6
1409
1410 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1411 # It thinks the first close brace ends the variable substitution.
1412 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1413
1414 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1415
1416
1417 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
1418 # On Suns, sometimes $CPP names a directory.
1419 if test -n "$CPP" && test -d "$CPP"; then
1420 CPP=
1421 fi
1422 if test -z "$CPP"; then
1423 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1424 echo $ac_n "(cached) $ac_c" 1>&6
1425 else
1426 # This must be in double quotes, not single quotes, because CPP may get
1427 # substituted into the Makefile and "${CC-cc}" will confuse make.
1428 CPP="${CC-cc} -E"
1429 # On the NeXT, cc -E runs the code through the compiler's parser,
1430 # not just through cpp.
1431 cat > conftest.$ac_ext <<EOF
1432 #line 1433 "configure"
1433 #include "confdefs.h"
1434 #include <assert.h>
1435 Syntax Error
1436 EOF
1437 eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1438 ac_err=`grep -v '^ *+' conftest.out`
1439 if test -z "$ac_err"; then
1440 :
1441 else
1442 echo "$ac_err" >&5
1443 rm -rf conftest*
1444 CPP="${CC-cc} -E -traditional-cpp"
1445 cat > conftest.$ac_ext <<EOF
1446 #line 1447 "configure"
1447 #include "confdefs.h"
1448 #include <assert.h>
1449 Syntax Error
1450 EOF
1451 eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1452 ac_err=`grep -v '^ *+' conftest.out`
1453 if test -z "$ac_err"; then
1454 :
1455 else
1456 echo "$ac_err" >&5
1457 rm -rf conftest*
1458 CPP=/lib/cpp
1459 fi
1460 rm -f conftest*
1461 fi
1462 rm -f conftest*
1463 ac_cv_prog_CPP="$CPP"
1464 fi
1465 CPP="$ac_cv_prog_CPP"
1466 else
1467 ac_cv_prog_CPP="$CPP"
1468 fi
1469 echo "$ac_t""$CPP" 1>&6
1470
1471 for ac_hdr in string.h stdlib.h memory.h strings.h unistd.h stdarg.h varargs.h errno.h sys/types.h
1472 do
1473 ac_safe=`echo "$ac_hdr" | tr './\055' '___'`
1474 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1475 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1476 echo $ac_n "(cached) $ac_c" 1>&6
1477 else
1478 cat > conftest.$ac_ext <<EOF
1479 #line 1480 "configure"
1480 #include "confdefs.h"
1481 #include <$ac_hdr>
1482 EOF
1483 eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1484 ac_err=`grep -v '^ *+' conftest.out`
1485 if test -z "$ac_err"; then
1486 rm -rf conftest*
1487 eval "ac_cv_header_$ac_safe=yes"
1488 else
1489 echo "$ac_err" >&5
1490 rm -rf conftest*
1491 eval "ac_cv_header_$ac_safe=no"
1492 fi
1493 rm -f conftest*
1494 fi
1495 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1496 echo "$ac_t""yes" 1>&6
1497 ac_tr_hdr=HAVE_`echo $ac_hdr | tr 'abcdefghijklmnopqrstuvwxyz./\055' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ___'`
1498 cat >> confdefs.h <<EOF
1499 #define $ac_tr_hdr 1
1500 EOF
1501
1502 else
1503 echo "$ac_t""no" 1>&6
1504 fi
1505 done
1506
1507
1508 # Put this here so that autoconf's "cross-compiling" message doesn't confuse
1509 # people who are not cross-compiling but are compiling cross-assemblers.
1510 echo $ac_n "checking whether compiling a cross-assembler""... $ac_c" 1>&6
1511 if test "${host}" = "${target}"; then
1512 cross_gas=no
1513 else
1514 cross_gas=yes
1515 cat >> confdefs.h <<\EOF
1516 #define CROSS_COMPILE 1
1517 EOF
1518
1519 fi
1520 echo "$ac_t""$cross_gas" 1>&6
1521
1522 # If we cannot run a trivial program, we must be cross compiling.
1523 echo $ac_n "checking whether cross-compiling""... $ac_c" 1>&6
1524 if eval "test \"`echo '$''{'ac_cv_c_cross'+set}'`\" = set"; then
1525 echo $ac_n "(cached) $ac_c" 1>&6
1526 else
1527 if test "$cross_compiling" = yes; then
1528 ac_cv_c_cross=yes
1529 else
1530 cat > conftest.$ac_ext <<EOF
1531 #line 1532 "configure"
1532 #include "confdefs.h"
1533 main(){return(0);}
1534 EOF
1535 eval $ac_link
1536 if test -s conftest && (./conftest; exit) 2>/dev/null; then
1537 ac_cv_c_cross=no
1538 else
1539 ac_cv_c_cross=yes
1540 fi
1541 fi
1542 rm -fr conftest*
1543 fi
1544
1545 echo "$ac_t""$ac_cv_c_cross" 1>&6
1546 cross_compiling=$ac_cv_c_cross
1547
1548 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
1549 # for constant arguments. Useless!
1550 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
1551 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
1552 echo $ac_n "(cached) $ac_c" 1>&6
1553 else
1554 cat > conftest.$ac_ext <<EOF
1555 #line 1556 "configure"
1556 #include "confdefs.h"
1557 #include <alloca.h>
1558 int main() { return 0; }
1559 int t() {
1560 char *p = alloca(2 * sizeof(int));
1561 ; return 0; }
1562 EOF
1563 if eval $ac_link; then
1564 rm -rf conftest*
1565 ac_cv_header_alloca_h=yes
1566 else
1567 rm -rf conftest*
1568 ac_cv_header_alloca_h=no
1569 fi
1570 rm -f conftest*
1571
1572 fi
1573
1574 echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
1575 if test $ac_cv_header_alloca_h = yes; then
1576 cat >> confdefs.h <<\EOF
1577 #define HAVE_ALLOCA_H 1
1578 EOF
1579
1580 fi
1581
1582 echo $ac_n "checking for alloca""... $ac_c" 1>&6
1583 if eval "test \"`echo '$''{'ac_cv_func_alloca'+set}'`\" = set"; then
1584 echo $ac_n "(cached) $ac_c" 1>&6
1585 else
1586 cat > conftest.$ac_ext <<EOF
1587 #line 1588 "configure"
1588 #include "confdefs.h"
1589
1590 #ifdef __GNUC__
1591 # define alloca __builtin_alloca
1592 #else
1593 # if HAVE_ALLOCA_H
1594 # include <alloca.h>
1595 # else
1596 # ifdef _AIX
1597 #pragma alloca
1598 # else
1599 # ifndef alloca /* predefined by HP cc +Olibcalls */
1600 char *alloca ();
1601 # endif
1602 # endif
1603 # endif
1604 #endif
1605
1606 int main() { return 0; }
1607 int t() {
1608 char *p = (char *) alloca(1);
1609 ; return 0; }
1610 EOF
1611 if eval $ac_link; then
1612 rm -rf conftest*
1613 ac_cv_func_alloca=yes
1614 else
1615 rm -rf conftest*
1616 ac_cv_func_alloca=no
1617 fi
1618 rm -f conftest*
1619
1620 fi
1621
1622 echo "$ac_t""$ac_cv_func_alloca" 1>&6
1623 if test $ac_cv_func_alloca = yes; then
1624 cat >> confdefs.h <<\EOF
1625 #define HAVE_ALLOCA 1
1626 EOF
1627
1628 fi
1629
1630 if test $ac_cv_func_alloca = no; then
1631 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
1632 # that cause trouble. Some versions do not even contain alloca or
1633 # contain a buggy version. If you still want to use their alloca,
1634 # use ar to extract alloca.o from them instead of compiling alloca.c.
1635 ALLOCA=alloca.o
1636 cat >> confdefs.h <<\EOF
1637 #define C_ALLOCA 1
1638 EOF
1639
1640
1641 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
1642 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
1643 echo $ac_n "(cached) $ac_c" 1>&6
1644 else
1645 cat > conftest.$ac_ext <<EOF
1646 #line 1647 "configure"
1647 #include "confdefs.h"
1648 #if defined(CRAY) && ! defined(CRAY2)
1649 webecray
1650 #else
1651 wenotbecray
1652 #endif
1653
1654 EOF
1655 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1656 egrep "webecray" >/dev/null 2>&1; then
1657 rm -rf conftest*
1658 ac_cv_os_cray=yes
1659 else
1660 rm -rf conftest*
1661 ac_cv_os_cray=no
1662 fi
1663 rm -f conftest*
1664
1665 fi
1666
1667 echo "$ac_t""$ac_cv_os_cray" 1>&6
1668 if test $ac_cv_os_cray = yes; then
1669 for ac_func in _getb67 GETB67 getb67; do
1670 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1671 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1672 echo $ac_n "(cached) $ac_c" 1>&6
1673 else
1674 cat > conftest.$ac_ext <<EOF
1675 #line 1676 "configure"
1676 #include "confdefs.h"
1677 /* System header to define __stub macros and hopefully few prototypes,
1678 which can conflict with char $ac_func(); below. */
1679 #include <assert.h>
1680 /* Override any gcc2 internal prototype to avoid an error. */
1681 char $ac_func();
1682
1683 int main() { return 0; }
1684 int t() {
1685
1686 /* The GNU C library defines this for functions which it implements
1687 to always fail with ENOSYS. Some functions are actually named
1688 something starting with __ and the normal name is an alias. */
1689 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1690 choke me
1691 #else
1692 $ac_func();
1693 #endif
1694
1695 ; return 0; }
1696 EOF
1697 if eval $ac_link; then
1698 rm -rf conftest*
1699 eval "ac_cv_func_$ac_func=yes"
1700 else
1701 rm -rf conftest*
1702 eval "ac_cv_func_$ac_func=no"
1703 fi
1704 rm -f conftest*
1705
1706 fi
1707 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1708 echo "$ac_t""yes" 1>&6
1709 cat >> confdefs.h <<EOF
1710 #define CRAY_STACKSEG_END $ac_func
1711 EOF
1712
1713 break
1714 else
1715 echo "$ac_t""no" 1>&6
1716 fi
1717
1718 done
1719 fi
1720
1721 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
1722 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
1723 echo $ac_n "(cached) $ac_c" 1>&6
1724 else
1725 if test "$cross_compiling" = yes; then
1726 ac_cv_c_stack_direction=0
1727 else
1728 cat > conftest.$ac_ext <<EOF
1729 #line 1730 "configure"
1730 #include "confdefs.h"
1731 find_stack_direction ()
1732 {
1733 static char *addr = 0;
1734 auto char dummy;
1735 if (addr == 0)
1736 {
1737 addr = &dummy;
1738 return find_stack_direction ();
1739 }
1740 else
1741 return (&dummy > addr) ? 1 : -1;
1742 }
1743 main ()
1744 {
1745 exit (find_stack_direction() < 0);
1746 }
1747 EOF
1748 eval $ac_link
1749 if test -s conftest && (./conftest; exit) 2>/dev/null; then
1750 ac_cv_c_stack_direction=1
1751 else
1752 ac_cv_c_stack_direction=-1
1753 fi
1754 fi
1755 rm -fr conftest*
1756 fi
1757
1758 echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
1759 cat >> confdefs.h <<EOF
1760 #define STACK_DIRECTION $ac_cv_c_stack_direction
1761 EOF
1762
1763 fi
1764
1765 echo $ac_n "checking for inline""... $ac_c" 1>&6
1766 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
1767 echo $ac_n "(cached) $ac_c" 1>&6
1768 else
1769 ac_cv_c_inline=no
1770 for ac_kw in inline __inline__ __inline; do
1771 cat > conftest.$ac_ext <<EOF
1772 #line 1773 "configure"
1773 #include "confdefs.h"
1774
1775 int main() { return 0; }
1776 int t() {
1777 } $ac_kw foo() {
1778 ; return 0; }
1779 EOF
1780 if eval $ac_compile; then
1781 rm -rf conftest*
1782 ac_cv_c_inline=$ac_kw; break
1783 fi
1784 rm -f conftest*
1785
1786 done
1787
1788 fi
1789
1790 echo "$ac_t""$ac_cv_c_inline" 1>&6
1791 case "$ac_cv_c_inline" in
1792 inline | yes) ;;
1793 no) cat >> confdefs.h <<\EOF
1794 #define inline
1795 EOF
1796 ;;
1797 *) cat >> confdefs.h <<EOF
1798 #define inline $ac_cv_c_inline
1799 EOF
1800 ;;
1801 esac
1802
1803
1804 # VMS doesn't have unlink.
1805 for ac_func in unlink remove
1806 do
1807 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1808 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1809 echo $ac_n "(cached) $ac_c" 1>&6
1810 else
1811 cat > conftest.$ac_ext <<EOF
1812 #line 1813 "configure"
1813 #include "confdefs.h"
1814 /* System header to define __stub macros and hopefully few prototypes,
1815 which can conflict with char $ac_func(); below. */
1816 #include <assert.h>
1817 /* Override any gcc2 internal prototype to avoid an error. */
1818 char $ac_func();
1819
1820 int main() { return 0; }
1821 int t() {
1822
1823 /* The GNU C library defines this for functions which it implements
1824 to always fail with ENOSYS. Some functions are actually named
1825 something starting with __ and the normal name is an alias. */
1826 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1827 choke me
1828 #else
1829 $ac_func();
1830 #endif
1831
1832 ; return 0; }
1833 EOF
1834 if eval $ac_link; then
1835 rm -rf conftest*
1836 eval "ac_cv_func_$ac_func=yes"
1837 else
1838 rm -rf conftest*
1839 eval "ac_cv_func_$ac_func=no"
1840 fi
1841 rm -f conftest*
1842
1843 fi
1844 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1845 echo "$ac_t""yes" 1>&6
1846 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1847 cat >> confdefs.h <<EOF
1848 #define $ac_tr_func 1
1849 EOF
1850 break
1851 else
1852 echo "$ac_t""no" 1>&6
1853 fi
1854 done
1855
1856
1857 # Some systems don't have sbrk().
1858 for ac_func in sbrk
1859 do
1860 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1861 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1862 echo $ac_n "(cached) $ac_c" 1>&6
1863 else
1864 cat > conftest.$ac_ext <<EOF
1865 #line 1866 "configure"
1866 #include "confdefs.h"
1867 /* System header to define __stub macros and hopefully few prototypes,
1868 which can conflict with char $ac_func(); below. */
1869 #include <assert.h>
1870 /* Override any gcc2 internal prototype to avoid an error. */
1871 char $ac_func();
1872
1873 int main() { return 0; }
1874 int t() {
1875
1876 /* The GNU C library defines this for functions which it implements
1877 to always fail with ENOSYS. Some functions are actually named
1878 something starting with __ and the normal name is an alias. */
1879 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1880 choke me
1881 #else
1882 $ac_func();
1883 #endif
1884
1885 ; return 0; }
1886 EOF
1887 if eval $ac_link; then
1888 rm -rf conftest*
1889 eval "ac_cv_func_$ac_func=yes"
1890 else
1891 rm -rf conftest*
1892 eval "ac_cv_func_$ac_func=no"
1893 fi
1894 rm -f conftest*
1895
1896 fi
1897 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1898 echo "$ac_t""yes" 1>&6
1899 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1900 cat >> confdefs.h <<EOF
1901 #define $ac_tr_func 1
1902 EOF
1903
1904 else
1905 echo "$ac_t""no" 1>&6
1906 fi
1907 done
1908
1909
1910 # Some non-ANSI preprocessors botch requoting inside strings. That's bad
1911 # enough, but on some of those systems, the assert macro relies on requoting
1912 # working properly!
1913 echo $ac_n "checking for working assert macro""... $ac_c" 1>&6
1914 if eval "test \"`echo '$''{'gas_cv_assert_ok'+set}'`\" = set"; then
1915 echo $ac_n "(cached) $ac_c" 1>&6
1916 else
1917 cat > conftest.$ac_ext <<EOF
1918 #line 1919 "configure"
1919 #include "confdefs.h"
1920 #include <assert.h>
1921 #include <stdio.h>
1922 int main() { return 0; }
1923 int t() {
1924
1925 /* check for requoting problems */
1926 static int a, b, c, d;
1927 static char *s;
1928 assert (!strcmp(s, "foo bar baz quux"));
1929 /* check for newline handling */
1930 assert (a == b
1931 || c == d);
1932
1933 ; return 0; }
1934 EOF
1935 if eval $ac_link; then
1936 rm -rf conftest*
1937 gas_cv_assert_ok=yes
1938 else
1939 rm -rf conftest*
1940 gas_cv_assert_ok=no
1941 fi
1942 rm -f conftest*
1943
1944 fi
1945 echo "$ac_t""$gas_cv_assert_ok" 1>&6
1946 test $gas_cv_assert_ok = yes || cat >> confdefs.h <<\EOF
1947 #define BROKEN_ASSERT 1
1948 EOF
1949
1950
1951
1952 # On some systems, the system header files may not declare malloc, realloc,
1953 # and free. There are places where gas needs these functions to have been
1954 # declared -- such as when taking their addresses.
1955 gas_test_headers="
1956 #ifdef HAVE_MEMORY_H
1957 #include <memory.h>
1958 #endif
1959 #ifdef HAVE_STRING_H
1960 #include <string.h>
1961 #endif
1962 #ifdef HAVE_STDLIB_H
1963 #include <stdlib.h>
1964 #endif
1965 #ifdef HAVE_UNISTD_H
1966 #include <unistd.h>
1967 #endif
1968 "
1969
1970 echo $ac_n "checking whether declaration is required for malloc""... $ac_c" 1>&6
1971 if eval "test \"`echo '$''{'gas_cv_decl_needed_malloc'+set}'`\" = set"; then
1972 echo $ac_n "(cached) $ac_c" 1>&6
1973 else
1974 cat > conftest.$ac_ext <<EOF
1975 #line 1976 "configure"
1976 #include "confdefs.h"
1977 $gas_test_headers
1978 int main() { return 0; }
1979 int t() {
1980
1981 typedef char *(*f)();
1982 f x;
1983 x = (f) malloc;
1984
1985 ; return 0; }
1986 EOF
1987 if eval $ac_link; then
1988 rm -rf conftest*
1989 gas_cv_decl_needed_malloc=no
1990 else
1991 rm -rf conftest*
1992 gas_cv_decl_needed_malloc=yes
1993 fi
1994 rm -f conftest*
1995
1996 fi
1997 echo "$ac_t""$gas_cv_decl_needed_malloc" 1>&6
1998 test $gas_cv_decl_needed_malloc = no || {
1999 cat >> confdefs.h <<\EOF
2000 #define NEED_DECLARATION_MALLOC 1
2001 EOF
2002
2003 }
2004
2005
2006 echo $ac_n "checking whether declaration is required for free""... $ac_c" 1>&6
2007 if eval "test \"`echo '$''{'gas_cv_decl_needed_free'+set}'`\" = set"; then
2008 echo $ac_n "(cached) $ac_c" 1>&6
2009 else
2010 cat > conftest.$ac_ext <<EOF
2011 #line 2012 "configure"
2012 #include "confdefs.h"
2013 $gas_test_headers
2014 int main() { return 0; }
2015 int t() {
2016
2017 typedef void (*f)();
2018 f x;
2019 x = (f) free;
2020
2021 ; return 0; }
2022 EOF
2023 if eval $ac_link; then
2024 rm -rf conftest*
2025 gas_cv_decl_needed_free=no
2026 else
2027 rm -rf conftest*
2028 gas_cv_decl_needed_free=yes
2029 fi
2030 rm -f conftest*
2031
2032 fi
2033 echo "$ac_t""$gas_cv_decl_needed_free" 1>&6
2034 test $gas_cv_decl_needed_free = no || {
2035 cat >> confdefs.h <<\EOF
2036 #define NEED_DECLARATION_FREE 1
2037 EOF
2038
2039 }
2040
2041
2042 # Does errno.h declare errno, or do we have to add a separate declaration
2043 # for it?
2044
2045 echo $ac_n "checking whether declaration is required for errno""... $ac_c" 1>&6
2046 if eval "test \"`echo '$''{'gas_cv_decl_needed_errno'+set}'`\" = set"; then
2047 echo $ac_n "(cached) $ac_c" 1>&6
2048 else
2049 cat > conftest.$ac_ext <<EOF
2050 #line 2051 "configure"
2051 #include "confdefs.h"
2052
2053 #ifdef HAVE_ERRNO_H
2054 #include <errno.h>
2055 #endif
2056
2057 int main() { return 0; }
2058 int t() {
2059
2060 typedef int f;
2061 f x;
2062 x = (f) errno;
2063
2064 ; return 0; }
2065 EOF
2066 if eval $ac_link; then
2067 rm -rf conftest*
2068 gas_cv_decl_needed_errno=no
2069 else
2070 rm -rf conftest*
2071 gas_cv_decl_needed_errno=yes
2072 fi
2073 rm -f conftest*
2074
2075 fi
2076 echo "$ac_t""$gas_cv_decl_needed_errno" 1>&6
2077 test $gas_cv_decl_needed_errno = no || {
2078 cat >> confdefs.h <<\EOF
2079 #define NEED_DECLARATION_ERRNO 1
2080 EOF
2081
2082 }
2083
2084
2085 trap '' 1 2 15
2086 cat > confcache <<\EOF
2087 # This file is a shell script that caches the results of configure
2088 # tests run on this system so they can be shared between configure
2089 # scripts and configure runs. It is not useful on other systems.
2090 # If it contains results you don't want to keep, you may remove or edit it.
2091 #
2092 # By default, configure uses ./config.cache as the cache file,
2093 # creating it if it does not exist already. You can give configure
2094 # the --cache-file=FILE option to use a different cache file; that is
2095 # what configure does when it calls configure scripts in
2096 # subdirectories, so they share the cache.
2097 # Giving --cache-file=/dev/null disables caching, for debugging configure.
2098 # config.status only pays attention to the cache file if you give it the
2099 # --recheck option to rerun configure.
2100 #
2101 EOF
2102 # Ultrix sh set writes to stderr and can't be redirected directly,
2103 # and sets the high bit in the cache file unless we assign to the vars.
2104 (set) 2>&1 |
2105 sed -n "s/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=\${\1='\2'}/p" \
2106 >> confcache
2107 if cmp -s $cache_file confcache; then
2108 :
2109 else
2110 if test -w $cache_file; then
2111 echo "updating cache $cache_file"
2112 cat confcache > $cache_file
2113 else
2114 echo "not updating unwritable cache $cache_file"
2115 fi
2116 fi
2117 rm -f confcache
2118
2119 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
2120
2121 test "x$prefix" = xNONE && prefix=$ac_default_prefix
2122 # Let make expand exec_prefix.
2123 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
2124
2125 # Any assignment to VPATH causes Sun make to only execute
2126 # the first set of double-colon rules, so remove it if not needed.
2127 # If there is a colon in the path, we need to keep it.
2128 if test "x$srcdir" = x.; then
2129 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
2130 fi
2131
2132 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
2133
2134 DEFS=-DHAVE_CONFIG_H
2135
2136 # Without the "./", some shells look in PATH for config.status.
2137 : ${CONFIG_STATUS=./config.status}
2138
2139 echo creating $CONFIG_STATUS
2140 rm -f $CONFIG_STATUS
2141 cat > $CONFIG_STATUS <<EOF
2142 #! /bin/sh
2143 # Generated automatically by configure.
2144 # Run this file to recreate the current configuration.
2145 # This directory was configured as follows,
2146 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
2147 #
2148 # $0 $ac_configure_args
2149 #
2150 # Compiler output produced by configure, useful for debugging
2151 # configure, is in ./config.log if it exists.
2152
2153 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
2154 for ac_option
2155 do
2156 case "\$ac_option" in
2157 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
2158 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
2159 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
2160 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
2161 echo "$CONFIG_STATUS generated by autoconf version 2.6"
2162 exit 0 ;;
2163 -help | --help | --hel | --he | --h)
2164 echo "\$ac_cs_usage"; exit 0 ;;
2165 *) echo "\$ac_cs_usage"; exit 1 ;;
2166 esac
2167 done
2168
2169 ac_given_srcdir=$srcdir
2170 ac_given_INSTALL="$INSTALL"
2171
2172 trap 'rm -fr `echo "Makefile doc/Makefile .gdbinit:gdbinit.in conf" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
2173
2174 # Protect against being on the right side of a sed subst in config.status.
2175 sed 's/%@/@@/; s/@%/@@/; s/%g$/@g/; /@g$/s/[\\\\&%]/\\\\&/g;
2176 s/@@/%@/; s/@@/@%/; s/@g$/%g/' > conftest.subs <<\CEOF
2177 $ac_vpsub
2178 $extrasub
2179 s%@CFLAGS@%$CFLAGS%g
2180 s%@CPPFLAGS@%$CPPFLAGS%g
2181 s%@CXXFLAGS@%$CXXFLAGS%g
2182 s%@DEFS@%$DEFS%g
2183 s%@LDFLAGS@%$LDFLAGS%g
2184 s%@LIBS@%$LIBS%g
2185 s%@exec_prefix@%$exec_prefix%g
2186 s%@prefix@%$prefix%g
2187 s%@program_transform_name@%$program_transform_name%g
2188 s%@bindir@%$bindir%g
2189 s%@sbindir@%$sbindir%g
2190 s%@libexecdir@%$libexecdir%g
2191 s%@datadir@%$datadir%g
2192 s%@sysconfdir@%$sysconfdir%g
2193 s%@sharedstatedir@%$sharedstatedir%g
2194 s%@localstatedir@%$localstatedir%g
2195 s%@libdir@%$libdir%g
2196 s%@includedir@%$includedir%g
2197 s%@oldincludedir@%$oldincludedir%g
2198 s%@infodir@%$infodir%g
2199 s%@mandir@%$mandir%g
2200 s%@host@%$host%g
2201 s%@host_alias@%$host_alias%g
2202 s%@host_cpu@%$host_cpu%g
2203 s%@host_vendor@%$host_vendor%g
2204 s%@host_os@%$host_os%g
2205 s%@target@%$target%g
2206 s%@target_alias@%$target_alias%g
2207 s%@target_cpu@%$target_cpu%g
2208 s%@target_vendor@%$target_vendor%g
2209 s%@target_os@%$target_os%g
2210 s%@build@%$build%g
2211 s%@build_alias@%$build_alias%g
2212 s%@build_cpu@%$build_cpu%g
2213 s%@build_vendor@%$build_vendor%g
2214 s%@build_os@%$build_os%g
2215 s%@OPCODES_LIB@%$OPCODES_LIB%g
2216 /@target_frag@/r $target_frag
2217 s%@target_frag@%%g
2218 s%@extra_objects@%$extra_objects%g
2219 s%@target_cpu_type@%$target_cpu_type%g
2220 s%@obj_format@%$obj_format%g
2221 s%@atof@%$atof%g
2222 s%@BFDLIB@%$BFDLIB%g
2223 s%@ALL_OBJ_DEPS@%$ALL_OBJ_DEPS%g
2224 s%@CC@%$CC%g
2225 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
2226 s%@INSTALL_DATA@%$INSTALL_DATA%g
2227 s%@CPP@%$CPP%g
2228 s%@ALLOCA@%$ALLOCA%g
2229
2230 CEOF
2231 EOF
2232 cat >> $CONFIG_STATUS <<EOF
2233
2234 CONFIG_FILES=\${CONFIG_FILES-"Makefile doc/Makefile .gdbinit:gdbinit.in"}
2235 EOF
2236 cat >> $CONFIG_STATUS <<\EOF
2237 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
2238 # Support "outfile[:infile]", defaulting infile="outfile.in".
2239 case "$ac_file" in
2240 *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'`
2241 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
2242 *) ac_file_in="${ac_file}.in" ;;
2243 esac
2244
2245 # Adjust relative srcdir, etc. for subdirectories.
2246
2247 # Remove last slash and all that follows it. Not all systems have dirname.
2248 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
2249 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
2250 # The file is in a subdirectory.
2251 test ! -d "$ac_dir" && mkdir "$ac_dir"
2252 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
2253 # A "../" for each directory in $ac_dir_suffix.
2254 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
2255 else
2256 ac_dir_suffix= ac_dots=
2257 fi
2258
2259 case "$ac_given_srcdir" in
2260 .) srcdir=.
2261 if test -z "$ac_dots"; then top_srcdir=.
2262 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
2263 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
2264 *) # Relative path.
2265 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
2266 top_srcdir="$ac_dots$ac_given_srcdir" ;;
2267 esac
2268
2269 case "$ac_given_INSTALL" in
2270 [/$]*) INSTALL="$ac_given_INSTALL" ;;
2271 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
2272 esac
2273 echo creating "$ac_file"
2274 rm -f "$ac_file"
2275 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
2276 case "$ac_file" in
2277 *Makefile*) ac_comsub="1i\\
2278 # $configure_input" ;;
2279 *) ac_comsub= ;;
2280 esac
2281 sed -e "$ac_comsub
2282 s%@configure_input@%$configure_input%g
2283 s%@srcdir@%$srcdir%g
2284 s%@top_srcdir@%$top_srcdir%g
2285 s%@INSTALL@%$INSTALL%g
2286 " -f conftest.subs $ac_given_srcdir/$ac_file_in > $ac_file
2287 fi; done
2288 rm -f conftest.subs
2289
2290 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
2291 # NAME is the cpp macro being defined and VALUE is the value it is being given.
2292 #
2293 # ac_d sets the value in "#define NAME VALUE" lines.
2294 ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
2295 ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
2296 ac_dC='\3'
2297 ac_dD='%g'
2298 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
2299 ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
2300 ac_uB='\([ ]\)%\1#\2define\3'
2301 ac_uC=' '
2302 ac_uD='\4%g'
2303 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
2304 ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
2305 ac_eB='$%\1#\2define\3'
2306 ac_eC=' '
2307 ac_eD='%g'
2308
2309 CONFIG_HEADERS=${CONFIG_HEADERS-"conf"}
2310 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
2311 # Support "outfile[:infile]", defaulting infile="outfile.in".
2312 case "$ac_file" in
2313 *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'`
2314 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
2315 *) ac_file_in="${ac_file}.in" ;;
2316 esac
2317
2318 echo creating $ac_file
2319
2320 rm -f conftest.frag conftest.in conftest.out
2321 cp $ac_given_srcdir/$ac_file_in conftest.in
2322
2323 EOF
2324
2325 # Transform confdefs.h into a sed script conftest.vals that substitutes
2326 # the proper values into config.h.in to produce config.h. And first:
2327 # Protect against being on the right side of a sed subst in config.status.
2328 # Protect against being in an unquoted here document in config.status.
2329 rm -f conftest.vals
2330 cat > conftest.hdr <<\EOF
2331 s/[\\&%]/\\&/g
2332 s%[\\$`]%\\&%g
2333 s%#define \([A-Za-z_][A-Za-z0-9_]*\) \(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
2334 s%ac_d%ac_u%gp
2335 s%ac_u%ac_e%gp
2336 EOF
2337 sed -n -f conftest.hdr confdefs.h > conftest.vals
2338 rm -f conftest.hdr
2339
2340 # This sed command replaces #undef with comments. This is necessary, for
2341 # example, in the case of _POSIX_SOURCE, which is predefined and required
2342 # on some systems where configure will not decide to define it.
2343 cat >> conftest.vals <<\EOF
2344 s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
2345 EOF
2346
2347 # Break up conftest.vals because some shells have a limit on
2348 # the size of here documents, and old seds have small limits too.
2349 # Maximum number of lines to put in a single here document.
2350 ac_max_here_lines=12
2351
2352 rm -f conftest.tail
2353 while :
2354 do
2355 ac_lines=`grep -c . conftest.vals`
2356 # grep -c gives empty output for an empty file on some AIX systems.
2357 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
2358 # Write a limited-size here document to conftest.frag.
2359 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
2360 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
2361 echo 'CEOF
2362 sed -f conftest.frag conftest.in > conftest.out
2363 rm -f conftest.in
2364 mv conftest.out conftest.in
2365 ' >> $CONFIG_STATUS
2366 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
2367 rm -f conftest.vals
2368 mv conftest.tail conftest.vals
2369 done
2370 rm -f conftest.vals
2371
2372 cat >> $CONFIG_STATUS <<\EOF
2373 rm -f conftest.frag conftest.h
2374 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
2375 cat conftest.in >> conftest.h
2376 rm -f conftest.in
2377 if cmp -s $ac_file conftest.h 2>/dev/null; then
2378 echo "$ac_file is unchanged"
2379 rm -f conftest.h
2380 else
2381 rm -f $ac_file
2382 mv conftest.h $ac_file
2383 fi
2384 fi; done
2385
2386 EOF
2387
2388 cat >> $CONFIG_STATUS <<EOF
2389 ac_sources="$files"
2390 ac_dests="$links"
2391 EOF
2392
2393 cat >> $CONFIG_STATUS <<\EOF
2394 srcdir=$ac_given_srcdir
2395 while test -n "$ac_sources"; do
2396 set $ac_dests; ac_dest=$1; shift; ac_dests=$*
2397 set $ac_sources; ac_source=$1; shift; ac_sources=$*
2398
2399 echo "linking $srcdir/$ac_source to $ac_dest"
2400
2401 if test ! -r $srcdir/$ac_source; then
2402 { echo "configure: error: $srcdir/$ac_source: File not found" 1>&2; exit 1; }
2403 fi
2404 rm -f $ac_dest
2405
2406 # Make relative symlinks.
2407 # Remove last slash and all that follows it. Not all systems have dirname.
2408 ac_dest_dir=`echo $ac_dest|sed 's%/[^/][^/]*$%%'`
2409 if test "$ac_dest_dir" != "$ac_dest" && test "$ac_dest_dir" != .; then
2410 # The dest file is in a subdirectory.
2411 test ! -d "$ac_dest_dir" && mkdir "$ac_dest_dir"
2412 ac_dest_dir_suffix="/`echo $ac_dest_dir|sed 's%^\./%%'`"
2413 # A "../" for each directory in $ac_dest_dir_suffix.
2414 ac_dots=`echo $ac_dest_dir_suffix|sed 's%/[^/]*%../%g'`
2415 else
2416 ac_dest_dir_suffix= ac_dots=
2417 fi
2418
2419 case "$srcdir" in
2420 [/$]*) ac_rel_source="$srcdir/$ac_source" ;;
2421 *) ac_rel_source="$ac_dots$srcdir/$ac_source" ;;
2422 esac
2423
2424 # Make a symlink if possible; otherwise try a hard link.
2425 if ln -s $ac_rel_source $ac_dest 2>/dev/null ||
2426 ln $srcdir/$ac_source $ac_dest; then :
2427 else
2428 { echo "configure: error: can not link $ac_dest to $srcdir/$ac_source" 1>&2; exit 1; }
2429 fi
2430 done
2431
2432
2433 exit 0
2434 EOF
2435 chmod +x $CONFIG_STATUS
2436 rm -fr confdefs* $ac_clean_files
2437 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
2438
This page took 0.101833 seconds and 4 git commands to generate.