]>
Commit | Line | Data |
---|---|---|
8c693660 KR |
1 | #! /bin/sh |
2 | ||
3 | # Guess values for system-dependent variables and create Makefiles. | |
4 | # Generated automatically using autoconf version 2.4 | |
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 | |
e818c22e | 15 | --enable-64-bit-bfd 64-bit support (on hosts with narrower word sizes)" |
8c693660 | 16 | ac_help="$ac_help |
e818c22e | 17 | --enable-targets alternative target configurations" |
8c693660 KR |
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 | ||
41 | # Initialize some other variables. | |
42 | subdirs= | |
43 | ||
44 | ac_prev= | |
45 | for ac_option | |
46 | do | |
47 | ||
48 | # If the previous option needs an argument, assign it. | |
49 | if test -n "$ac_prev"; then | |
50 | eval "$ac_prev=\$ac_option" | |
51 | ac_prev= | |
52 | continue | |
53 | fi | |
54 | ||
55 | case "$ac_option" in | |
56 | -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;; | |
57 | *) ac_optarg= ;; | |
58 | esac | |
59 | ||
60 | # Accept the important Cygnus configure options, so we can diagnose typos. | |
61 | ||
62 | case "$ac_option" in | |
63 | ||
64 | -build | --build | --buil | --bui | --bu | --b) | |
65 | ac_prev=build ;; | |
66 | -build=* | --build=* | --buil=* | --bui=* | --bu=* | --b=*) | |
67 | build="$ac_optarg" ;; | |
68 | ||
69 | -cache-file | --cache-file | --cache-fil | --cache-fi \ | |
70 | | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) | |
71 | ac_prev=cache_file ;; | |
72 | -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | |
73 | | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) | |
74 | cache_file="$ac_optarg" ;; | |
75 | ||
76 | -disable-* | --disable-*) | |
77 | ac_feature=`echo $ac_option|sed -e 's/-*disable-//'` | |
78 | # Reject names that are not valid shell variable names. | |
79 | if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then | |
80 | { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } | |
81 | fi | |
82 | ac_feature=`echo $ac_feature| sed 's/-/_/g'` | |
83 | eval "enable_${ac_feature}=no" ;; | |
84 | ||
85 | -enable-* | --enable-*) | |
86 | ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'` | |
87 | # Reject names that are not valid shell variable names. | |
88 | if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then | |
89 | { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } | |
90 | fi | |
91 | ac_feature=`echo $ac_feature| sed 's/-/_/g'` | |
92 | case "$ac_option" in | |
93 | *=*) ;; | |
94 | *) ac_optarg=yes ;; | |
95 | esac | |
96 | eval "enable_${ac_feature}='$ac_optarg'" ;; | |
97 | ||
98 | -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | |
99 | | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | |
100 | | --exec | --exe | --ex) | |
101 | ac_prev=exec_prefix ;; | |
102 | -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | |
103 | | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | |
104 | | --exec=* | --exe=* | --ex=*) | |
105 | exec_prefix="$ac_optarg" ;; | |
106 | ||
107 | -gas | --gas | --ga | --g) | |
108 | # Obsolete; use --with-gas. | |
109 | with_gas=yes ;; | |
110 | ||
111 | -help | --help | --hel | --he) | |
112 | # Omit some internal or obsolete options to make the list less imposing. | |
113 | # This message is too long to be a string in the A/UX 3.1 sh. | |
114 | cat << EOF | |
115 | Usage: configure [options] [host] | |
116 | Options: [defaults in brackets after descriptions] | |
117 | Configuration: | |
118 | --cache-file=FILE cache test results in FILE | |
119 | --help print this message | |
120 | --no-create do not create output files | |
121 | --quiet, --silent do not print \`checking...' messages | |
122 | --version print the version of autoconf that created configure | |
123 | Directory and file names: | |
124 | --prefix=PREFIX install architecture-independent files in PREFIX | |
125 | [$ac_default_prefix] | |
126 | --exec-prefix=PREFIX install architecture-dependent files in PREFIX | |
127 | [same as prefix] | |
128 | --srcdir=DIR find the sources in DIR [configure dir or ..] | |
129 | --program-prefix=PREFIX prepend PREFIX to installed program names | |
130 | --program-suffix=SUFFIX append SUFFIX to installed program names | |
131 | --program-transform-name=PROGRAM run sed PROGRAM on installed program names | |
132 | Host type: | |
133 | --build=BUILD configure for building on BUILD [BUILD=HOST] | |
134 | --host=HOST configure for HOST [guessed] | |
135 | --target=TARGET configure for TARGET [TARGET=HOST] | |
136 | Features and packages: | |
137 | --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) | |
138 | --enable-FEATURE[=ARG] include FEATURE [ARG=yes] | |
139 | --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] | |
140 | --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) | |
141 | --x-includes=DIR X include files are in DIR | |
142 | --x-libraries=DIR X library files are in DIR | |
143 | --enable and --with options recognized:$ac_help | |
144 | EOF | |
145 | exit 0 ;; | |
146 | ||
147 | -host | --host | --hos | --ho) | |
148 | ac_prev=host ;; | |
149 | -host=* | --host=* | --hos=* | --ho=*) | |
150 | host="$ac_optarg" ;; | |
151 | ||
152 | -nfp | --nfp | --nf) | |
153 | # Obsolete; use --without-fp. | |
154 | with_fp=no ;; | |
155 | ||
156 | -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | |
157 | | --no-cr | --no-c) | |
158 | no_create=yes ;; | |
159 | ||
160 | -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | |
161 | | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) | |
162 | no_recursion=yes ;; | |
163 | ||
164 | -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) | |
165 | ac_prev=prefix ;; | |
166 | -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) | |
167 | prefix="$ac_optarg" ;; | |
168 | ||
169 | -program-prefix | --program-prefix | --program-prefi | --program-pref \ | |
170 | | --program-pre | --program-pr | --program-p) | |
171 | ac_prev=program_prefix ;; | |
172 | -program-prefix=* | --program-prefix=* | --program-prefi=* \ | |
173 | | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) | |
174 | program_prefix="$ac_optarg" ;; | |
175 | ||
176 | -program-suffix | --program-suffix | --program-suffi | --program-suff \ | |
177 | | --program-suf | --program-su | --program-s) | |
178 | ac_prev=program_suffix ;; | |
179 | -program-suffix=* | --program-suffix=* | --program-suffi=* \ | |
180 | | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) | |
181 | program_suffix="$ac_optarg" ;; | |
182 | ||
183 | -program-transform-name | --program-transform-name \ | |
184 | | --program-transform-nam | --program-transform-na \ | |
185 | | --program-transform-n | --program-transform- \ | |
186 | | --program-transform | --program-transfor \ | |
187 | | --program-transfo | --program-transf \ | |
188 | | --program-trans | --program-tran \ | |
189 | | --progr-tra | --program-tr | --program-t) | |
190 | ac_prev=program_transform_name ;; | |
191 | -program-transform-name=* | --program-transform-name=* \ | |
192 | | --program-transform-nam=* | --program-transform-na=* \ | |
193 | | --program-transform-n=* | --program-transform-=* \ | |
194 | | --program-transform=* | --program-transfor=* \ | |
195 | | --program-transfo=* | --program-transf=* \ | |
196 | | --program-trans=* | --program-tran=* \ | |
197 | | --progr-tra=* | --program-tr=* | --program-t=*) | |
198 | program_transform_name="$ac_optarg" ;; | |
199 | ||
200 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | |
201 | | -silent | --silent | --silen | --sile | --sil) | |
202 | silent=yes ;; | |
203 | ||
204 | -site | --site | --sit) | |
205 | ac_prev=site ;; | |
206 | -site=* | --site=* | --sit=*) | |
207 | site="$ac_optarg" ;; | |
208 | ||
209 | -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) | |
210 | ac_prev=srcdir ;; | |
211 | -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) | |
212 | srcdir="$ac_optarg" ;; | |
213 | ||
214 | -target | --target | --targe | --targ | --tar | --ta | --t) | |
215 | ac_prev=target ;; | |
216 | -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) | |
217 | target="$ac_optarg" ;; | |
218 | ||
219 | -v | -verbose | --verbose | --verbos | --verbo | --verb) | |
220 | verbose=yes ;; | |
221 | ||
222 | -version | --version | --versio | --versi | --vers) | |
223 | echo "configure generated by autoconf version 2.4" | |
224 | exit 0 ;; | |
225 | ||
226 | -with-* | --with-*) | |
227 | ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'` | |
228 | # Reject names that are not valid shell variable names. | |
229 | if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then | |
230 | { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } | |
231 | fi | |
232 | ac_package=`echo $ac_package| sed 's/-/_/g'` | |
233 | case "$ac_option" in | |
234 | *=*) ;; | |
235 | *) ac_optarg=yes ;; | |
236 | esac | |
237 | eval "with_${ac_package}='$ac_optarg'" ;; | |
238 | ||
239 | -without-* | --without-*) | |
240 | ac_package=`echo $ac_option|sed -e 's/-*without-//'` | |
241 | # Reject names that are not valid shell variable names. | |
242 | if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then | |
243 | { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } | |
244 | fi | |
245 | ac_package=`echo $ac_package| sed 's/-/_/g'` | |
246 | eval "with_${ac_package}=no" ;; | |
247 | ||
248 | --x) | |
249 | # Obsolete; use --with-x. | |
250 | with_x=yes ;; | |
251 | ||
252 | -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | |
253 | | --x-incl | --x-inc | --x-in | --x-i) | |
254 | ac_prev=x_includes ;; | |
255 | -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | |
256 | | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) | |
257 | x_includes="$ac_optarg" ;; | |
258 | ||
259 | -x-libraries | --x-libraries | --x-librarie | --x-librari \ | |
260 | | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) | |
261 | ac_prev=x_libraries ;; | |
262 | -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | |
263 | | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) | |
264 | x_libraries="$ac_optarg" ;; | |
265 | ||
266 | -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; } | |
267 | ;; | |
268 | ||
269 | *) | |
270 | if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then | |
271 | echo "configure: warning: $ac_option: invalid host type" 1>&2 | |
272 | fi | |
273 | if test "x$nonopt" != xNONE; then | |
274 | { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } | |
275 | fi | |
276 | nonopt="$ac_option" | |
277 | ;; | |
278 | ||
279 | esac | |
280 | done | |
281 | ||
282 | if test -n "$ac_prev"; then | |
283 | { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; } | |
284 | fi | |
285 | ||
286 | trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 | |
287 | ||
288 | # File descriptor usage: | |
289 | # 0 standard input | |
290 | # 1 file creation | |
291 | # 2 errors and warnings | |
292 | # 3 some systems may open it to /dev/tty | |
293 | # 4 used on the Kubota Titan | |
294 | # 6 checking for... messages and results | |
295 | # 5 compiler messages saved in config.log | |
296 | if test "$silent" = yes; then | |
297 | exec 6>/dev/null | |
298 | else | |
299 | exec 6>&1 | |
300 | fi | |
301 | exec 5>./config.log | |
302 | ||
303 | echo "\ | |
304 | This file contains any messages produced by compilers while | |
305 | running configure, to aid debugging if configure makes a mistake. | |
306 | " 1>&5 | |
307 | ||
308 | # Strip out --no-create and --no-recursion so they do not pile up. | |
309 | # Also quote any args containing shell metacharacters. | |
310 | ac_configure_args= | |
311 | for ac_arg | |
312 | do | |
313 | case "$ac_arg" in | |
314 | -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | |
315 | | --no-cr | --no-c) ;; | |
316 | -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | |
317 | | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;; | |
318 | *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*) | |
319 | ac_configure_args="$ac_configure_args '$ac_arg'" ;; | |
320 | *) ac_configure_args="$ac_configure_args $ac_arg" ;; | |
321 | esac | |
322 | done | |
323 | ||
324 | # NLS nuisances. | |
325 | # Only set LANG and LC_ALL to C if already set. | |
326 | # These must not be set unconditionally because not all systems understand | |
327 | # e.g. LANG=C (notably SCO). | |
328 | if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi | |
329 | if test "${LANG+set}" = set; then LANG=C; export LANG; fi | |
330 | ||
331 | # confdefs.h avoids OS command line length limits that DEFS can exceed. | |
332 | rm -rf conftest* confdefs.h | |
333 | # AIX cpp loses on an empty file, so make sure it contains at least a newline. | |
334 | echo > confdefs.h | |
335 | ||
336 | # A filename unique to this package, relative to the directory that | |
337 | # configure is in, which we can look for to find out if srcdir is correct. | |
338 | ac_unique_file=libbfd.c | |
339 | ||
340 | # Find the source files, if location was not specified. | |
341 | if test -z "$srcdir"; then | |
342 | ac_srcdir_defaulted=yes | |
343 | # Try the directory containing this script, then its parent. | |
344 | ac_prog=$0 | |
345 | ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'` | |
346 | test "x$ac_confdir" = "x$ac_prog" && ac_confdir=. | |
347 | srcdir=$ac_confdir | |
348 | if test ! -r $srcdir/$ac_unique_file; then | |
349 | srcdir=.. | |
350 | fi | |
351 | else | |
352 | ac_srcdir_defaulted=no | |
353 | fi | |
354 | if test ! -r $srcdir/$ac_unique_file; then | |
355 | if test "$ac_srcdir_defaulted" = yes; then | |
356 | { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; } | |
357 | else | |
358 | { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; } | |
359 | fi | |
360 | fi | |
361 | srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'` | |
362 | ||
363 | # Prefer explicitly selected file to automatically selected ones. | |
364 | if test -z "$CONFIG_SITE"; then | |
365 | if test "x$prefix" != xNONE; then | |
366 | CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" | |
367 | else | |
368 | CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" | |
369 | fi | |
370 | fi | |
371 | for ac_site_file in $CONFIG_SITE; do | |
372 | if test -r "$ac_site_file"; then | |
373 | echo "loading site script $ac_site_file" | |
374 | . "$ac_site_file" | |
375 | fi | |
376 | done | |
377 | ||
378 | if test -r "$cache_file"; then | |
379 | echo "loading cache $cache_file" | |
380 | . $cache_file | |
381 | else | |
382 | echo "creating cache $cache_file" | |
383 | > $cache_file | |
384 | fi | |
385 | ||
386 | ac_ext=c | |
387 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. | |
388 | ac_cpp='$CPP $CPPFLAGS' | |
389 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5 2>&5' | |
390 | ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5 2>&5' | |
391 | ||
392 | if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then | |
393 | # Stardent Vistra SVR4 grep lacks -e, says [email protected]. | |
394 | if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then | |
395 | ac_n= ac_c=' | |
396 | ' ac_t=' ' | |
397 | else | |
398 | ac_n=-n ac_c= ac_t= | |
399 | fi | |
400 | else | |
401 | ac_n= ac_c='\c' ac_t= | |
402 | fi | |
403 | ||
404 | ||
405 | ||
406 | # Check whether --enable-64-bit-bfd or --disable-64-bit-bfd was given. | |
407 | enableval="$enable_64_bit_bfd" | |
408 | if test -n "$enableval"; then | |
a52a3ce8 | 409 | case "${enableval}" in |
8c693660 KR |
410 | yes) want64=true ;; |
411 | no) want64=false ;; | |
412 | *) { echo "configure: error: bad value ${enableval} for 64-bit-bfd option" 1>&2; exit 1; } ;; | |
413 | esac | |
414 | else | |
415 | want64=false | |
416 | fi | |
417 | # Check whether --enable-targets or --disable-targets was given. | |
418 | enableval="$enable_targets" | |
419 | if test -n "$enableval"; then | |
420 | case "${enableval}" in | |
421 | yes | "") { echo "configure: error: enable-targets option must specify target names or 'all'" 1>&2; exit 1; } | |
422 | ;; | |
423 | no) enable_targets= ;; | |
424 | *) enable_targets=$enableval ;; | |
425 | esac | |
426 | fi | |
427 | ||
b7577823 ILT |
428 | |
429 | ||
8c693660 KR |
430 | ac_aux_dir= |
431 | for ac_dir in `cd $srcdir/..;pwd` $srcdir/`cd $srcdir/..;pwd`; do | |
432 | if test -f $ac_dir/install-sh; then | |
433 | ac_aux_dir=$ac_dir | |
434 | ac_install_sh="$ac_aux_dir/install-sh -c" | |
435 | break | |
436 | elif test -f $ac_dir/install.sh; then | |
437 | ac_aux_dir=$ac_dir | |
438 | ac_install_sh="$ac_aux_dir/install.sh -c" | |
439 | break | |
440 | fi | |
441 | done | |
442 | if test -z "$ac_aux_dir"; then | |
443 | { echo "configure: error: can not find install-sh or install.sh in `cd $srcdir/..;pwd` $srcdir/`cd $srcdir/..;pwd`" 1>&2; exit 1; } | |
444 | fi | |
445 | ac_config_guess=$ac_aux_dir/config.guess | |
446 | ac_config_sub=$ac_aux_dir/config.sub | |
447 | ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. | |
448 | ||
449 | ||
450 | # Do some error checking and defaulting for the host and target type. | |
451 | # The inputs are: | |
452 | # configure --host=HOST --target=TARGET --build=BUILD NONOPT | |
453 | # | |
454 | # The rules are: | |
455 | # 1. You are not allowed to specify --host, --target, and nonopt at the | |
456 | # same time. | |
457 | # 2. Host defaults to nonopt. | |
458 | # 3. If nonopt is not specified, then host defaults to the current host, | |
459 | # as determined by config.guess. | |
460 | # 4. Target and build default to nonopt. | |
461 | # 5. If nonopt is not specified, then target and build default to host. | |
462 | ||
463 | # The aliases save the names the user supplied, while $host etc. | |
464 | # will get canonicalized. | |
465 | case $host---$target---$nonopt in | |
466 | NONE---*---* | *---NONE---* | *---*---NONE) ;; | |
467 | *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;; | |
468 | esac | |
469 | ||
470 | ||
471 | # Make sure we can run config.sub. | |
472 | if $ac_config_sub sun4 >/dev/null 2>&1; then : | |
473 | else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; } | |
474 | fi | |
475 | ||
476 | echo $ac_n "checking host system type""... $ac_c" 1>&6 | |
477 | ||
478 | host_alias=$host | |
479 | case "$host_alias" in | |
480 | NONE) | |
481 | case $nonopt in | |
482 | NONE) | |
483 | if host_alias=`$ac_config_guess`; then : | |
484 | else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; } | |
485 | fi ;; | |
486 | *) host_alias=$nonopt ;; | |
487 | esac ;; | |
488 | esac | |
489 | ||
490 | host=`$ac_config_sub $host_alias` | |
491 | host_cpu=`echo $host | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\1/'` | |
492 | host_vendor=`echo $host | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\2/'` | |
493 | host_os=`echo $host | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\3/'` | |
494 | echo "$ac_t""$host" 1>&6 | |
495 | ||
496 | echo $ac_n "checking target system type""... $ac_c" 1>&6 | |
497 | ||
498 | target_alias=$target | |
499 | case "$target_alias" in | |
500 | NONE) | |
501 | case $nonopt in | |
502 | NONE) target_alias=$host_alias ;; | |
503 | *) target_alias=$nonopt ;; | |
504 | esac ;; | |
505 | esac | |
506 | ||
507 | target=`$ac_config_sub $target_alias` | |
508 | target_cpu=`echo $target | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\1/'` | |
509 | target_vendor=`echo $target | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\2/'` | |
510 | target_os=`echo $target | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\3/'` | |
511 | echo "$ac_t""$target" 1>&6 | |
512 | ||
513 | echo $ac_n "checking build system type""... $ac_c" 1>&6 | |
514 | ||
515 | build_alias=$build | |
516 | case "$build_alias" in | |
517 | NONE) | |
518 | case $nonopt in | |
519 | NONE) build_alias=$host_alias ;; | |
520 | *) build_alias=$nonopt ;; | |
521 | esac ;; | |
522 | esac | |
523 | ||
524 | build=`$ac_config_sub $build_alias` | |
525 | build_cpu=`echo $build | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\1/'` | |
526 | build_vendor=`echo $build | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\2/'` | |
527 | build_os=`echo $build | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\3/'` | |
528 | echo "$ac_t""$build" 1>&6 | |
529 | ||
530 | test "$host_alias" != "$target_alias" && | |
531 | test "$program_prefix$program_suffix$program_transform_name" = \ | |
532 | NONENONEs,x,x, && | |
533 | program_prefix=${target_alias}- | |
534 | ||
535 | if test -z "$target" ; then | |
536 | { echo "configure: error: Unrecognized target system type; please check config.sub." 1>&2; exit 1; } | |
537 | fi | |
538 | if test "$program_transform_name" = s,x,x,; then | |
539 | program_transform_name= | |
540 | else | |
541 | # Double any \ or $. | |
542 | echo 's,\\,\\\\,g; s,\$,$$,g' > conftestsed | |
543 | program_transform_name="`echo $program_transform_name|sed -f conftestsed`" | |
544 | rm -f conftestsed | |
545 | fi | |
546 | test "$program_prefix" != NONE && | |
547 | program_transform_name="s,^,${program_prefix},; $program_transform_name" | |
548 | # Use a double $ so make ignores it. | |
549 | test "$program_suffix" != NONE && | |
550 | program_transform_name="s,\$\$,${program_suffix},; $program_transform_name" | |
551 | ||
552 | # sed with no file args requires a program. | |
553 | test "$program_transform_name" = "" && program_transform_name="s,x,x," | |
554 | ||
555 | ||
556 | host64=false | |
557 | target64=false | |
558 | ||
559 | # host stuff: | |
560 | ||
f515fb2f | 561 | # Permit host specific settings. |
8c693660 KR |
562 | . ${srcdir}/configure.host |
563 | ||
f515fb2f | 564 | echo $ac_n "checking for CC""... $ac_c" 1>&6 |
4c2e4d0e | 565 | test -z "$CC" && test -r ../Makefile && CC=`egrep '^CC *=' ../Makefile | tail -1 | sed 's/^CC *= *//'` |
f515fb2f ILT |
566 | test -z "$CC" && CC=cc |
567 | echo "$ac_t""setting CC to $CC" 1>&6 | |
568 | ||
569 | cat > conftest.c <<EOF | |
570 | #ifdef __GNUC__ | |
571 | yes; | |
572 | #endif | |
573 | EOF | |
574 | if ${CC-cc} -E conftest.c 2>&5 | egrep yes >/dev/null 2>&1; then | |
575 | GCC=yes | |
576 | if test "${CFLAGS+set}" != set; then | |
577 | echo 'void f(){}' > conftest.c | |
578 | if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then | |
579 | CFLAGS="-g -O" | |
580 | else | |
581 | CFLAGS="-O" | |
582 | fi | |
583 | fi | |
584 | else | |
585 | GCC= | |
586 | test "${CFLAGS+set}" = set || CFLAGS="-g" | |
587 | fi | |
588 | rm -f conftest* | |
589 | ||
590 | ||
591 | ||
592 | AR=${AR-ar} | |
593 | ||
8c693660 KR |
594 | # Extract the first word of "ranlib", so it can be a program name with args. |
595 | set dummy ranlib; ac_word=$2 | |
596 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
597 | if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then | |
598 | echo $ac_n "(cached) $ac_c" 1>&6 | |
599 | else | |
600 | if test -n "$RANLIB"; then | |
601 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. | |
602 | else | |
603 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
604 | for ac_dir in $PATH; do | |
605 | test -z "$ac_dir" && ac_dir=. | |
606 | if test -f $ac_dir/$ac_word; then | |
607 | ac_cv_prog_RANLIB="ranlib" | |
608 | break | |
609 | fi | |
610 | done | |
611 | IFS="$ac_save_ifs" | |
612 | test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":" | |
613 | fi | |
614 | fi | |
615 | RANLIB="$ac_cv_prog_RANLIB" | |
616 | if test -n "$RANLIB"; then | |
617 | echo "$ac_t""$RANLIB" 1>&6 | |
618 | else | |
619 | echo "$ac_t""no" 1>&6 | |
620 | fi | |
621 | ||
f515fb2f ILT |
622 | # Find a good install program. We prefer a C program (faster), |
623 | # so one script is as good as another. But avoid the broken or | |
624 | # incompatible versions: | |
625 | # SysV /etc/install, /usr/sbin/install | |
626 | # SunOS /usr/etc/install | |
627 | # IRIX /sbin/install | |
628 | # AIX /bin/install | |
629 | # AFS /usr/afsws/bin/install, which mishandles nonexistent args | |
630 | # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" | |
631 | # ./install, which can be erroneously created by make from ./install.sh. | |
632 | echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 | |
633 | if test -z "$INSTALL"; then | |
634 | if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then | |
635 | echo $ac_n "(cached) $ac_c" 1>&6 | |
636 | else | |
637 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
638 | for ac_dir in $PATH; do | |
639 | # Account for people who put trailing slashes in PATH elements. | |
640 | case "$ac_dir/" in | |
641 | /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;; | |
642 | *) | |
643 | # OSF1 and SCO ODT 3.0 have their own names for install. | |
644 | for ac_prog in ginstall installbsd scoinst install; do | |
645 | if test -f $ac_dir/$ac_prog; then | |
646 | if test $ac_prog = install && | |
647 | grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then | |
648 | # AIX install. It has an incompatible calling convention. | |
649 | # OSF/1 installbsd also uses dspmsg, but is usable. | |
650 | : | |
651 | else | |
652 | ac_cv_path_install="$ac_dir/$ac_prog -c" | |
653 | break 2 | |
654 | fi | |
655 | fi | |
656 | done | |
657 | ;; | |
658 | esac | |
659 | done | |
660 | IFS="$ac_save_ifs" | |
661 | # As a last resort, use the slow shell script. | |
662 | test -z "$ac_cv_path_install" && ac_cv_path_install="$ac_install_sh" | |
663 | fi | |
664 | INSTALL="$ac_cv_path_install" | |
665 | fi | |
666 | echo "$ac_t""$INSTALL" 1>&6 | |
8c693660 | 667 | |
f515fb2f ILT |
668 | # Use test -z because SunOS4 sh mishandles braces in ${var-val}. |
669 | # It thinks the first close brace ends the variable substitution. | |
670 | test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' | |
8c693660 | 671 | |
f515fb2f | 672 | test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' |
8c693660 KR |
673 | |
674 | ||
b7577823 ILT |
675 | HOST_64BIT_LONG=0 |
676 | if test "x${HOST_64BIT_TYPE}" = "xlong"; then | |
677 | HOST_64BIT_LONG=1 | |
678 | fi | |
679 | ||
680 | ||
f515fb2f ILT |
681 | # If we cannot run a trivial program, we must be cross compiling. |
682 | echo $ac_n "checking whether cross-compiling""... $ac_c" 1>&6 | |
683 | if eval "test \"`echo '$''{'ac_cv_c_cross'+set}'`\" = set"; then | |
684 | echo $ac_n "(cached) $ac_c" 1>&6 | |
685 | else | |
686 | if test "$cross_compiling" = yes; then | |
687 | ac_cv_c_cross=yes | |
688 | else | |
689 | cat > conftest.$ac_ext <<EOF | |
b7577823 | 690 | #line 691 "configure" |
f515fb2f ILT |
691 | #include "confdefs.h" |
692 | main(){return(0);} | |
693 | EOF | |
694 | eval $ac_link | |
695 | if test -s conftest && (./conftest; exit) 2>/dev/null; then | |
696 | ac_cv_c_cross=no | |
697 | else | |
698 | ac_cv_c_cross=yes | |
699 | fi | |
700 | fi | |
701 | rm -fr conftest* | |
702 | fi | |
703 | cross_compiling=$ac_cv_c_cross | |
704 | echo "$ac_t""$ac_cv_c_cross" 1>&6 | |
8c693660 | 705 | |
b7577823 | 706 | # Put a plausible default for CC_FOR_BUILD in Makefile. |
f515fb2f ILT |
707 | if test "x$cross_compiling" = "xno"; then |
708 | CC_FOR_BUILD='$(CC)' | |
8c693660 | 709 | else |
f515fb2f | 710 | CC_FOR_BUILD=gcc |
8c693660 KR |
711 | fi |
712 | ||
f515fb2f | 713 | |
b7577823 ILT |
714 | echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 |
715 | # On Suns, sometimes $CPP names a directory. | |
716 | if test -n "$CPP" && test -d "$CPP"; then | |
717 | CPP= | |
718 | fi | |
719 | if test -z "$CPP"; then | |
720 | if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then | |
721 | echo $ac_n "(cached) $ac_c" 1>&6 | |
722 | else | |
723 | # This must be in double quotes, not single quotes, because CPP may get | |
724 | # substituted into the Makefile and "${CC-cc}" will confuse make. | |
725 | CPP="${CC-cc} -E" | |
726 | # On the NeXT, cc -E runs the code through the compiler's parser, | |
727 | # not just through cpp. | |
728 | cat > conftest.$ac_ext <<EOF | |
729 | #line 730 "configure" | |
730 | #include "confdefs.h" | |
731 | #include <assert.h> | |
732 | Syntax Error | |
733 | EOF | |
734 | eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
735 | ac_err=`grep -v '^ *+' conftest.out` | |
736 | if test -z "$ac_err"; then | |
737 | : | |
738 | else | |
739 | echo "$ac_err" >&5 | |
740 | rm -rf conftest* | |
741 | CPP="${CC-cc} -E -traditional-cpp" | |
742 | cat > conftest.$ac_ext <<EOF | |
743 | #line 744 "configure" | |
744 | #include "confdefs.h" | |
745 | #include <assert.h> | |
746 | Syntax Error | |
747 | EOF | |
748 | eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
749 | ac_err=`grep -v '^ *+' conftest.out` | |
750 | if test -z "$ac_err"; then | |
751 | : | |
752 | else | |
753 | echo "$ac_err" >&5 | |
754 | rm -rf conftest* | |
755 | CPP=/lib/cpp | |
756 | fi | |
757 | rm -f conftest* | |
758 | fi | |
759 | rm -f conftest* | |
760 | ac_cv_prog_CPP="$CPP" | |
761 | fi | |
762 | CPP="$ac_cv_prog_CPP" | |
763 | else | |
764 | ac_cv_prog_CPP="$CPP" | |
765 | fi | |
766 | echo "$ac_t""$CPP" 1>&6 | |
767 | ||
768 | for ac_hdr in stddef.h string.h strings.h stdlib.h time.h unistd.h | |
769 | do | |
770 | ac_safe=`echo "$ac_hdr" | tr './\055' '___'` | |
771 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
772 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then | |
773 | echo $ac_n "(cached) $ac_c" 1>&6 | |
774 | else | |
775 | cat > conftest.$ac_ext <<EOF | |
776 | #line 777 "configure" | |
777 | #include "confdefs.h" | |
778 | #include <$ac_hdr> | |
779 | EOF | |
780 | eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
781 | ac_err=`grep -v '^ *+' conftest.out` | |
782 | if test -z "$ac_err"; then | |
783 | rm -rf conftest* | |
784 | eval "ac_cv_header_$ac_safe=yes" | |
785 | else | |
786 | echo "$ac_err" >&5 | |
787 | rm -rf conftest* | |
788 | eval "ac_cv_header_$ac_safe=no" | |
789 | fi | |
790 | rm -f conftest* | |
791 | fi | |
792 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
793 | echo "$ac_t""yes" 1>&6 | |
794 | ac_tr_hdr=HAVE_`echo $ac_hdr | tr '[a-z]./\055' '[A-Z]___'` | |
795 | cat >> confdefs.h <<EOF | |
796 | #define $ac_tr_hdr 1 | |
797 | EOF | |
798 | ||
799 | else | |
800 | echo "$ac_t""no" 1>&6 | |
801 | fi | |
802 | done | |
803 | ||
1dff7902 | 804 | for ac_hdr in fcntl.h sys/file.h |
b7577823 ILT |
805 | do |
806 | ac_safe=`echo "$ac_hdr" | tr './\055' '___'` | |
807 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
808 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then | |
809 | echo $ac_n "(cached) $ac_c" 1>&6 | |
810 | else | |
811 | cat > conftest.$ac_ext <<EOF | |
812 | #line 813 "configure" | |
813 | #include "confdefs.h" | |
814 | #include <$ac_hdr> | |
815 | EOF | |
816 | eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
817 | ac_err=`grep -v '^ *+' conftest.out` | |
818 | if test -z "$ac_err"; then | |
819 | rm -rf conftest* | |
820 | eval "ac_cv_header_$ac_safe=yes" | |
821 | else | |
822 | echo "$ac_err" >&5 | |
823 | rm -rf conftest* | |
824 | eval "ac_cv_header_$ac_safe=no" | |
825 | fi | |
826 | rm -f conftest* | |
827 | fi | |
828 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
829 | echo "$ac_t""yes" 1>&6 | |
830 | ac_tr_hdr=HAVE_`echo $ac_hdr | tr '[a-z]./\055' '[A-Z]___'` | |
831 | cat >> confdefs.h <<EOF | |
832 | #define $ac_tr_hdr 1 | |
833 | EOF | |
834 | ||
835 | else | |
836 | echo "$ac_t""no" 1>&6 | |
837 | fi | |
838 | done | |
839 | ||
840 | for ac_func in fcntl | |
841 | do | |
842 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
843 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then | |
844 | echo $ac_n "(cached) $ac_c" 1>&6 | |
845 | else | |
846 | cat > conftest.$ac_ext <<EOF | |
847 | #line 848 "configure" | |
848 | #include "confdefs.h" | |
849 | /* System header to define __stub macros and hopefully few prototypes, | |
850 | which can conflict with char $ac_func(); below. */ | |
851 | #include <assert.h> | |
852 | /* Override any gcc2 internal prototype to avoid an error. */ | |
853 | char $ac_func(); | |
854 | ||
855 | int main() { return 0; } | |
856 | int t() { | |
857 | ||
858 | /* The GNU C library defines this for functions which it implements | |
859 | to always fail with ENOSYS. Some functions are actually named | |
860 | something starting with __ and the normal name is an alias. */ | |
861 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
862 | choke me | |
863 | #else | |
864 | $ac_func(); | |
865 | #endif | |
866 | ||
867 | ; return 0; } | |
868 | EOF | |
869 | if eval $ac_link; then | |
870 | rm -rf conftest* | |
871 | eval "ac_cv_func_$ac_func=yes" | |
872 | else | |
873 | rm -rf conftest* | |
874 | eval "ac_cv_func_$ac_func=no" | |
875 | fi | |
876 | rm -f conftest* | |
877 | ||
878 | fi | |
879 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
880 | echo "$ac_t""yes" 1>&6 | |
881 | ac_tr_func=HAVE_`echo $ac_func | tr '[a-z]' '[A-Z]'` | |
882 | cat >> confdefs.h <<EOF | |
883 | #define $ac_tr_func 1 | |
884 | EOF | |
885 | ||
886 | else | |
887 | echo "$ac_t""no" 1>&6 | |
888 | fi | |
889 | done | |
890 | ||
891 | ||
892 | case "${host}" in | |
893 | i[345]86-*-msdos* | i[345]86-*-go32* | i[345]86-*-win32) | |
894 | cat >> confdefs.h <<\EOF | |
895 | #define USE_BINARY_FOPEN 1 | |
896 | EOF | |
897 | ;; | |
898 | esac | |
899 | ||
900 | echo $ac_n "checking whether malloc must be declared""... $ac_c" 1>&6 | |
901 | if eval "test \"`echo '$''{'bfd_cv_decl_needed_malloc'+set}'`\" = set"; then | |
902 | echo $ac_n "(cached) $ac_c" 1>&6 | |
903 | else | |
904 | cat > conftest.$ac_ext <<EOF | |
905 | #line 906 "configure" | |
906 | #include "confdefs.h" | |
907 | ||
908 | #include <stdio.h> | |
909 | #ifdef HAVE_STDLIB_H | |
910 | #include <stdlib.h> | |
911 | #endif | |
912 | #ifdef HAVE_UNISTD_H | |
913 | #include <unistd.h> | |
914 | #endif | |
915 | int main() { return 0; } | |
916 | int t() { | |
917 | char *(*pfn) = (char *(*)) malloc | |
918 | ; return 0; } | |
919 | EOF | |
920 | if eval $ac_compile; then | |
921 | rm -rf conftest* | |
922 | bfd_cv_decl_needed_malloc=no | |
923 | else | |
924 | rm -rf conftest* | |
925 | bfd_cv_decl_needed_malloc=yes | |
926 | fi | |
927 | rm -f conftest* | |
928 | ||
929 | fi | |
930 | ||
931 | echo "$ac_t""$bfd_cv_decl_needed_malloc" 1>&6 | |
932 | if test $bfd_cv_decl_needed_malloc = yes; then | |
933 | cat >> confdefs.h <<\EOF | |
934 | #define NEED_DECLARATION_MALLOC 1 | |
935 | EOF | |
f515fb2f | 936 | |
2b79a104 ILT |
937 | fi |
938 | ||
b7577823 ILT |
939 | echo $ac_n "checking whether free must be declared""... $ac_c" 1>&6 |
940 | if eval "test \"`echo '$''{'bfd_cv_decl_needed_free'+set}'`\" = set"; then | |
941 | echo $ac_n "(cached) $ac_c" 1>&6 | |
942 | else | |
943 | cat > conftest.$ac_ext <<EOF | |
944 | #line 945 "configure" | |
945 | #include "confdefs.h" | |
8c693660 | 946 | |
b7577823 ILT |
947 | #include <stdio.h> |
948 | #ifdef HAVE_STDLIB_H | |
949 | #include <stdlib.h> | |
950 | #endif | |
951 | #ifdef HAVE_UNISTD_H | |
952 | #include <unistd.h> | |
953 | #endif | |
954 | int main() { return 0; } | |
955 | int t() { | |
956 | int (*pfn) = (int (*)) free | |
957 | ; return 0; } | |
958 | EOF | |
959 | if eval $ac_compile; then | |
960 | rm -rf conftest* | |
961 | bfd_cv_decl_needed_free=no | |
962 | else | |
963 | rm -rf conftest* | |
964 | bfd_cv_decl_needed_free=yes | |
965 | fi | |
966 | rm -f conftest* | |
967 | ||
968 | fi | |
969 | ||
970 | echo "$ac_t""$bfd_cv_decl_needed_free" 1>&6 | |
971 | if test $bfd_cv_decl_needed_free = yes; then | |
972 | cat >> confdefs.h <<\EOF | |
973 | #define NEED_DECLARATION_FREE 1 | |
974 | EOF | |
975 | ||
976 | fi | |
f515fb2f | 977 | |
a52a3ce8 ILT |
978 | # If we are configured native, pick a core file support file. |
979 | COREFILE= | |
980 | COREFLAG= | |
981 | if test "${target}" = "${host}"; then | |
982 | case "${host}" in | |
983 | alpha-*-*) COREFILE=osf-core.o ;; | |
984 | arm-*-riscix) COREFILE=trad-core.o ;; | |
985 | hppa*-*-hpux*) COREFILE=hpux-core.o ;; | |
986 | hppa*-*-hiux*) COREFILE=hpux-core.o ;; | |
987 | hppa*-*-bsd*) COREFILE="hpux-core.o hppabsd-core.o" | |
988 | COREFLAG="-DHPUX_CORE -DHPPABSD_CORE" ;; | |
b7577823 ILT |
989 | i[345]86-sequent-bsd*) |
990 | COREFILE=trad-core.o; | |
991 | cat >> confdefs.h <<\EOF | |
992 | #define TRAD_HEADER "hosts/symmetry.h" | |
993 | EOF | |
994 | ||
995 | ;; | |
2cb159a5 | 996 | i[345]86-sequent-sysv4*) ;; |
b7577823 ILT |
997 | i[345]86-sequent-sysv*) |
998 | COREFILE=trad-core.o | |
999 | cat >> confdefs.h <<\EOF | |
1000 | #define TRAD_HEADER "hosts/symmetry.h" | |
1001 | EOF | |
1002 | ||
1003 | ;; | |
1004 | i[345]86-*-bsd* | i[345]86-*-freebsd* | i[345]86-*-netbsd*) | |
1005 | COREFILE=trad-core.o | |
1006 | cat >> confdefs.h <<\EOF | |
1007 | #define TRAD_HEADER "hosts/i386bsd.h" | |
1008 | EOF | |
1009 | ||
1010 | ;; | |
1011 | i[345]86-esix-sysv3*) | |
1012 | COREFILE=trad-core.o | |
1013 | cat >> confdefs.h <<\EOF | |
1014 | #define TRAD_HEADER "hosts/esix.h" | |
1015 | EOF | |
1016 | ||
1017 | ;; | |
1018 | i[345]86-*-sco* | i[345]86-*-isc*) | |
1019 | COREFILE=trad-core.o | |
1020 | cat >> confdefs.h <<\EOF | |
1021 | #define TRAD_HEADER "hosts/i386sco.h" | |
1022 | EOF | |
1023 | ||
1024 | ;; | |
1025 | i[345]86-*-mach3*) | |
1026 | COREFILE=trad-core.o | |
1027 | cat >> confdefs.h <<\EOF | |
1028 | #define TRAD_HEADER "hosts/i386mach3.h" | |
1029 | EOF | |
1030 | ||
1031 | ;; | |
1032 | i[345]86-*-linux*) | |
1033 | COREFILE=trad-core.o | |
1034 | cat >> confdefs.h <<\EOF | |
1035 | #define TRAD_HEADER "hosts/i386linux.h" | |
1036 | EOF | |
1037 | ||
1038 | ;; | |
2cb159a5 KR |
1039 | i[345]86-*-isc*) COREFILE=trad-core.o ;; |
1040 | i[345]86-*-aix*) COREFILE=aix386-core.o ;; | |
b7577823 ILT |
1041 | mips-dec-bsd*) |
1042 | COREFILE=trad-core.o | |
1043 | cat >> confdefs.h <<\EOF | |
1044 | #define TRAD_HEADER "hosts/mipsbsd.h" | |
1045 | EOF | |
1046 | ||
1047 | ;; | |
1048 | mips-dec-mach3*) | |
1049 | COREFILE=trad-core.o | |
1050 | cat >> confdefs.h <<\EOF | |
1051 | #define TRAD_HEADER "hosts/mipsmach3.h" | |
1052 | EOF | |
1053 | ||
1054 | ;; | |
049df0a8 | 1055 | mips-dec-netbsd*) ;; |
b7577823 ILT |
1056 | mips-dec-*) |
1057 | COREFILE=trad-core.o | |
1058 | cat >> confdefs.h <<\EOF | |
1059 | #define TRAD_HEADER "hosts/decstation.h" | |
1060 | EOF | |
1061 | ||
1062 | ;; | |
a52a3ce8 ILT |
1063 | mips-sgi-irix4*) COREFILE=irix-core.o ;; |
1064 | mips-sgi-irix5*) COREFILE=irix-core.o ;; | |
b7577823 ILT |
1065 | mips-*-mach3*) |
1066 | COREFILE=trad-core.o | |
1067 | cat >> confdefs.h <<\EOF | |
1068 | #define TRAD_HEADER "hosts/mipsmach3.h" | |
1069 | EOF | |
1070 | ||
1071 | ;; | |
a52a3ce8 | 1072 | mips-*-sysv4*) ;; |
b7577823 ILT |
1073 | mips-*-sysv* | mips-*-riscos*) |
1074 | COREFILE=trad-core.o | |
1075 | cat >> confdefs.h <<\EOF | |
1076 | #define TRAD_HEADER "hosts/riscos.h" | |
1077 | EOF | |
1078 | ||
1079 | ;; | |
1080 | mips-sony-bsd*) | |
1081 | COREFILE=trad-core.o | |
1082 | cat >> confdefs.h <<\EOF | |
1083 | #define TRAD_HEADER "hosts/news-mips".h | |
1084 | EOF | |
1085 | ||
1086 | ;; | |
1087 | m68*-bull*-sysv*) | |
1088 | COREFILE=trad-core.o | |
1089 | cat >> confdefs.h <<\EOF | |
1090 | #define TRAD_HEADER "hosts/dpx2.h" | |
1091 | EOF | |
1092 | ||
1093 | ;; | |
a52a3ce8 | 1094 | m68*-hp-hpux*) COREFILE=hpux-core.o ;; |
b7577823 ILT |
1095 | m68*-hp-bsd*) |
1096 | COREFILE=trad-core.o | |
1097 | cat >> confdefs.h <<\EOF | |
1098 | #define TRAD_HEADER "hosts/hp300bsd.h" | |
1099 | EOF | |
1100 | ||
1101 | ;; | |
a52a3ce8 | 1102 | m68*-motorola-sysv*) COREFILE=ptrace-core.o ;; |
b7577823 ILT |
1103 | m68*-sony-*) |
1104 | COREFILE=trad-core.o | |
1105 | cat >> confdefs.h <<\EOF | |
1106 | #define TRAD_HEADER "hosts/news.h" | |
1107 | EOF | |
1108 | ||
1109 | ;; | |
a52a3ce8 ILT |
1110 | m88*-*-sysv4*) ;; |
1111 | m88*-motorola-sysv*) COREFILE=trad-core.o ;; | |
b7577823 ILT |
1112 | m88*-*-mach3*) |
1113 | COREFILE=trad-core.o | |
1114 | cat >> confdefs.h <<\EOF | |
1115 | #define TRAD_HEADER "hosts/m88kmach3.h" | |
1116 | EOF | |
1117 | ||
1118 | ;; | |
1119 | ns32k-pc532-mach) | |
1120 | COREFILE=trad-core.o | |
1121 | cat >> confdefs.h <<\EOF | |
1122 | #define TRAD_HEADER "hosts/pc532mach.h" | |
1123 | EOF | |
1124 | ||
1125 | ;; | |
a52a3ce8 ILT |
1126 | rs6000-*-lynx*) COREFILE=lynx-core.o ;; |
1127 | rs6000-*-aix4*) COREFILE=rs6000-core.o | |
1128 | COREFLAG=-DALTERNATE_AIX_CORE_FORMAT ;; | |
1129 | rs6000-*-*) COREFILE=rs6000-core.o ;; | |
1130 | powerpc-*-aix4*) COREFILE=rs6000-core.o | |
1131 | COREFLAG=-DALTERNATE_AIX_CORE_FORMAT ;; | |
1132 | powerpc-*-aix*) COREFILE=rs6000-core.o ;; | |
b7577823 ILT |
1133 | tahoe-*-*) |
1134 | COREFILE=trad-core.o | |
1135 | cat >> confdefs.h <<\EOF | |
1136 | #define TRAD_HEADER "hosts/tahoe.h" | |
1137 | EOF | |
1138 | ||
1139 | ;; | |
1140 | vax-*-ultrix2*) | |
1141 | COREFILE=trad-core.o | |
1142 | cat >> confdefs.h <<\EOF | |
1143 | #define TRAD_HEADER "hosts/vaxult2.h" | |
1144 | EOF | |
1145 | ||
1146 | ;; | |
1147 | vax-*-ultrix*) | |
1148 | COREFILE=trad-core.o | |
1149 | cat >> confdefs.h <<\EOF | |
1150 | #define TRAD_HEADER "hosts/vaxult2.h" | |
1151 | EOF | |
1152 | ||
1153 | ;; | |
1154 | vax-*-*) | |
1155 | COREFILE=trad-core.o | |
1156 | cat >> confdefs.h <<\EOF | |
1157 | #define TRAD_HEADER "hosts/vaxbsd.h" | |
1158 | EOF | |
1159 | ||
1160 | ;; | |
a52a3ce8 ILT |
1161 | esac |
1162 | ||
1163 | case "$COREFILE" in | |
1164 | aix386-core.o) COREFLAG=-DAIX386_CORE ;; | |
1165 | hppabsd-core.o) COREFLAG=-DHPPABSD_CORE ;; | |
1166 | hpux-core.o) COREFLAG=-DHPUX_CORE ;; | |
1167 | irix-core.o) COREFLAG=-DIRIX_CORE ;; | |
1168 | lynx-core.o) COREFLAG=-DLYNX_CORE ;; | |
1169 | osf-core.o) COREFLAG=-DOSF_CORE ;; | |
1170 | ptrace-core.o) COREFLAG=-DPTRACE_CORE ;; | |
1171 | rs6000-core.o) COREFLAG="$COREFLAG -DAIX_CORE" ;; | |
b7577823 | 1172 | trad-core.o) COREFLAG="$COREFLAG -DTRAD_CORE" ;; |
a52a3ce8 | 1173 | esac |
1dff7902 ILT |
1174 | |
1175 | # The ELF code uses the native <sys/procfs.h> to handle core files. | |
1176 | # Define HAVE_SYS_PROCFS_H if the file exists and defines | |
1177 | # prstatus_t. | |
1178 | echo $ac_n "checking for sys/procfs.h""... $ac_c" 1>&6 | |
1179 | if eval "test \"`echo '$''{'bfd_cv_header_sys_procfs_h'+set}'`\" = set"; then | |
1180 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1181 | else | |
1182 | cat > conftest.$ac_ext <<EOF | |
049df0a8 | 1183 | #line 1184 "configure" |
1dff7902 ILT |
1184 | #include "confdefs.h" |
1185 | #include <sys/procfs.h> | |
1186 | int main() { return 0; } | |
1187 | int t() { | |
1188 | prstatus_t t; | |
1189 | ; return 0; } | |
1190 | EOF | |
1191 | if eval $ac_compile; then | |
1192 | rm -rf conftest* | |
1193 | bfd_cv_header_sys_procfs_h=yes | |
1194 | else | |
1195 | rm -rf conftest* | |
1196 | bfd_cv_header_sys_procfs_h=no | |
1197 | fi | |
1198 | rm -f conftest* | |
1199 | ||
1200 | fi | |
1201 | ||
1202 | echo "$ac_t""$bfd_cv_header_sys_procfs_h" 1>&6 | |
1203 | if test $bfd_cv_header_sys_procfs_h = yes; then | |
1204 | cat >> confdefs.h <<\EOF | |
1205 | #define HAVE_SYS_PROCFS_H 1 | |
1206 | EOF | |
1207 | ||
1208 | fi | |
1209 | ||
a52a3ce8 ILT |
1210 | fi |
1211 | ||
1212 | ||
1213 | ||
8c693660 KR |
1214 | # target stuff: |
1215 | ||
1216 | # Canonicalize the secondary target names. | |
1217 | if test -n "$enable_targets" ; then | |
1218 | for targ in `echo $enable_targets | sed 's/,/ /g'` | |
1219 | do | |
9525b61b | 1220 | result=`$ac_config_sub $targ 2>/dev/null` |
8c693660 KR |
1221 | if test -n "$result" ; then |
1222 | canon_targets="$canon_targets $result" | |
1223 | else | |
1224 | # Allow targets that config.sub doesn't recognize, like "all". | |
1225 | canon_targets="$canon_targets $targ" | |
1226 | fi | |
1227 | done | |
1228 | fi | |
1229 | ||
1230 | all_targets=false | |
2b79a104 ILT |
1231 | defvec= |
1232 | selvecs= | |
1233 | selarchs= | |
1234 | TDEFINES= | |
8c693660 KR |
1235 | for targ in $target $canon_targets |
1236 | do | |
2b79a104 | 1237 | if test "x$targ" = "xall"; then |
8c693660 KR |
1238 | all_targets=true |
1239 | else | |
2b79a104 ILT |
1240 | . $srcdir/config.bfd |
1241 | if test "x$targ" = "x$target"; then | |
1242 | defvec=$targ_defvec | |
8c693660 | 1243 | fi |
2b79a104 ILT |
1244 | selvecs="$selvecs $targ_defvec $targ_selvecs" |
1245 | selarchs="$selarchs $targ_archs" | |
1246 | TDEFINES="$TDEFINES $targ_cflags" | |
8c693660 KR |
1247 | fi |
1248 | done | |
1249 | ||
8c693660 KR |
1250 | |
1251 | # This processing still needs to be done if we're to decide properly whether | |
1252 | # 64-bit support needs to be compiled in. Currently, it will be included if | |
1253 | # the default or any other explicitly requested target requires it; it | |
1254 | # will not be included on a 32-bit host if no 64-bit target is requested, and | |
1255 | # no "--with-64-bit-bfd" option is given, even if "--with-targets=all" is | |
1256 | # used. | |
1257 | ||
2b79a104 | 1258 | # uniq the default and selected vectors in all the configured targets. |
8c693660 | 1259 | f="" |
2b79a104 | 1260 | for i in $selvecs ; do |
8c693660 KR |
1261 | case " $f " in |
1262 | *" $i "*) ;; | |
1263 | *) f="$f $i" ;; | |
1264 | esac | |
1265 | done | |
2b79a104 | 1266 | selvecs="$f" |
8c693660 | 1267 | |
2b79a104 | 1268 | # uniq the architectures in all the configured targets. |
8c693660 | 1269 | f="" |
2b79a104 | 1270 | for i in $selarchs ; do |
8c693660 KR |
1271 | case " $f " in |
1272 | *" $i "*) ;; | |
1273 | *) f="$f $i" ;; | |
1274 | esac | |
1275 | done | |
2b79a104 | 1276 | selarchs="$f" |
8c693660 KR |
1277 | |
1278 | # Target backend .o files. | |
1279 | tb= | |
1280 | ||
a52a3ce8 ILT |
1281 | elf="elf.o elflink.o" |
1282 | ||
2b79a104 | 1283 | for vec in $selvecs |
8c693660 KR |
1284 | do |
1285 | case "$vec" in | |
1286 | # This list is alphabetized to make it easy to compare | |
1287 | # with the two vector lists in targets.c. | |
1288 | a29kcoff_big_vec) tb="$tb coff-a29k.o cofflink.o" ;; | |
1289 | a_out_adobe_vec) tb="$tb aout-adobe.o aout32.o stab-syms.o" ;; | |
a11e10fe DE |
1290 | armcoff_little_vec) tb="$tb coff-arm.o cofflink.o " ;; |
1291 | armcoff_big_vec) tb="$tb coff-arm.o cofflink.o " ;; | |
a52a3ce8 ILT |
1292 | armpe_little_vec) tb="$tb pe-arm.o cofflink.o " ;; |
1293 | armpe_big_vec) tb="$tb pe-arm.o cofflink.o " ;; | |
1294 | armpei_little_vec) tb="$tb pei-arm.o cofflink.o " ;; | |
1295 | armpei_big_vec) tb="$tb pei-arm.o cofflink.o " ;; | |
8c693660 KR |
1296 | aout0_big_vec) tb="$tb aout0.o aout32.o stab-syms.o" ;; |
1297 | aout_arm_big_vec) tb="$tb aout-arm.o aout32.o stab-syms.o" ;; | |
1298 | aout_arm_little_vec) tb="$tb aout-arm.o aout32.o stab-syms.o" ;; | |
1299 | aout_mips_big_vec) tb="$tb mipsbsd.o aout32.o stab-syms.o" ;; | |
1300 | aout_mips_little_vec) tb="$tb mipsbsd.o aout32.o stab-syms.o" ;; | |
1301 | apollocoff_vec) tb="$tb coff-apollo.o" ;; | |
1302 | b_out_vec_big_host) tb="$tb bout.o aout32.o stab-syms.o" ;; | |
1303 | b_out_vec_little_host) tb="$tb bout.o aout32.o stab-syms.o" ;; | |
1304 | # start-sanitize-arc | |
a52a3ce8 ILT |
1305 | bfd_elf32_littlearc_vec) tb="$tb elf32-arc.o elf32.o $elf" ;; |
1306 | bfd_elf32_bigarc_vec) tb="$tb elf32-arc.o elf32.o $elf" ;; | |
8c693660 | 1307 | # end-sanitize-arc |
a52a3ce8 ILT |
1308 | bfd_elf32_big_generic_vec) tb="$tb elf32-gen.o elf32.o $elf" ;; |
1309 | bfd_elf32_bigmips_vec) tb="$tb elf32-mips.o elf32.o $elf ecofflink.o" ;; | |
1310 | bfd_elf32_hppa_vec) tb="$tb elf32-hppa.o elf32.o $elf" ;; | |
1311 | bfd_elf32_i386_vec) tb="$tb elf32-i386.o elf32.o $elf" ;; | |
1312 | bfd_elf32_i860_vec) tb="$tb elf32-i860.o elf32.o $elf" ;; | |
1313 | bfd_elf32_little_generic_vec) tb="$tb elf32-gen.o elf32.o $elf" ;; | |
1314 | bfd_elf32_littlemips_vec) tb="$tb elf32-mips.o elf32.o $elf ecofflink.o" ;; | |
1315 | bfd_elf32_m68k_vec) tb="$tb elf32-m68k.o elf32.o $elf" ;; | |
1316 | bfd_elf32_m88k_vec) tb="$tb elf32-m88k.o elf32.o $elf" ;; | |
1317 | bfd_elf32_powerpc_vec) tb="$tb elf32-ppc.o elf32.o $elf" ;; | |
1318 | bfd_elf32_powerpcle_vec) tb="$tb elf32-ppc.o elf32.o $elf" ;; | |
1319 | bfd_elf32_sparc_vec) tb="$tb elf32-sparc.o elf32.o $elf" ;; | |
1320 | bfd_elf64_big_generic_vec) tb="$tb elf64-gen.o elf64.o $elf" | |
8c693660 | 1321 | target64=true ;; |
a52a3ce8 | 1322 | bfd_elf64_little_generic_vec) tb="$tb elf64-gen.o elf64.o $elf" |
8c693660 | 1323 | target64=true ;; |
a52a3ce8 | 1324 | bfd_elf64_sparc_vec) tb="$tb elf64-sparc.o elf64.o $elf" |
8c693660 KR |
1325 | target64=true ;; |
1326 | cisco_core_vec) tb="$tb cisco-core.o" ;; | |
1327 | demo_64_vec) tb="$tb demo64.o aout64.o stab-syms.o" | |
1328 | target64=true ;; | |
1329 | ecoff_big_vec) tb="$tb coff-mips.o ecoff.o ecofflink.o" ;; | |
1330 | ecoff_little_vec) tb="$tb coff-mips.o ecoff.o ecofflink.o" ;; | |
1331 | ecoffalpha_little_vec) tb="$tb coff-alpha.o ecoff.o ecofflink.o" | |
1332 | target64=true ;; | |
1333 | h8300coff_vec) tb="$tb coff-h8300.o reloc16.o" ;; | |
1334 | h8500coff_vec) tb="$tb coff-h8500.o reloc16.o" ;; | |
1335 | host_aout_vec) tb="$tb host-aout.o aout32.o stab-syms.o" ;; | |
1336 | hp300bsd_vec) tb="$tb hp300bsd.o aout32.o stab-syms.o" ;; | |
1337 | hp300hpux_vec) tb="$tb hp300hpux.o aout32.o stab-syms.o" ;; | |
1338 | i386aout_vec) tb="$tb i386aout.o aout32.o stab-syms.o" ;; | |
1339 | i386bsd_vec) tb="$tb i386bsd.o aout32.o stab-syms.o" ;; | |
1340 | i386dynix_vec) tb="$tb i386dynix.o aout32.o stab-syms.o" ;; | |
1341 | i386coff_vec) tb="$tb coff-i386.o cofflink.o" ;; | |
1342 | i386msdos_vec) tb="$tb i386msdos.o" ;; | |
1343 | i386pe_vec) tb="$tb pe-i386.o cofflink.o " ;; | |
1344 | i386pei_vec) tb="$tb pei-i386.o cofflink.o" ;; | |
1345 | i386linux_vec) tb="$tb i386linux.o aout32.o stab-syms.o" ;; | |
1346 | i386lynx_aout_vec) tb="$tb i386lynx.o lynx-core.o aout32.o stab-syms.o" ;; | |
1347 | i386lynx_coff_vec) tb="$tb cf-i386lynx.o cofflink.o lynx-core.o stab-syms.o" ;; | |
1348 | i386mach3_vec) tb="$tb i386mach3.o aout32.o stab-syms.o" ;; | |
1349 | i386netbsd_vec) tb="$tb i386netbsd.o aout32.o stab-syms.o" ;; | |
1350 | i386os9k_vec) tb="$tb i386os9k.o aout32.o stab-syms.o" ;; | |
a208a70f ILT |
1351 | icoff_big_vec) tb="$tb coff-i960.o cofflink.o" ;; |
1352 | icoff_little_vec) tb="$tb coff-i960.o cofflink.o" ;; | |
8c693660 KR |
1353 | ieee_vec) tb="$tb ieee.o" ;; |
1354 | m68kcoff_vec) tb="$tb coff-m68k.o cofflink.o" ;; | |
1355 | m68kcoffun_vec) tb="$tb coff-u68k.o coff-m68k.o cofflink.o" ;; | |
1356 | m68klynx_aout_vec) tb="$tb m68klynx.o lynx-core.o aout32.o stab-syms.o" ;; | |
1357 | m68klynx_coff_vec) tb="$tb cf-m68klynx.o coff-m68k.o cofflink.o lynx-core.o stab-syms.o" ;; | |
1358 | m68knetbsd_vec) tb="$tb m68knetbsd.o aout32.o stab-syms.o" ;; | |
1359 | m88kbcs_vec) tb="$tb coff-m88k.o" ;; | |
1360 | newsos3_vec) tb="$tb newsos3.o aout32.o stab-syms.o" ;; | |
1361 | nlm32_i386_vec) tb="$tb nlm32-i386.o nlm32.o nlm.o" ;; | |
1362 | nlm32_sparc_vec) tb="$tb nlm32-sparc.o nlm32.o nlm.o" ;; | |
1363 | nlm32_alpha_vec) tb="$tb nlm32-alpha.o nlm32.o nlm.o" | |
1364 | target64=true ;; | |
1365 | riscix_vec) tb="$tb aout32.o riscix.o stab-syms.o" ;; | |
1366 | nlm32_powerpc_vec) tb="$tb nlm32-ppc.o nlm32.o nlm.o" ;; | |
1367 | pc532netbsd_vec) tb="$tb ns32knetbsd.o aout-ns32k.o stab-syms.o" ;; | |
1368 | pc532machaout_vec) tb="$tb pc532-mach.o aout-ns32k.o stab-syms.o" ;; | |
698e0075 | 1369 | pmac_xcoff_vec) tb="$tb coff-pmac.o cofflink.o" ;; |
8c693660 | 1370 | rs6000coff_vec) tb="$tb coff-rs6000.o" ;; |
e0c10737 KK |
1371 | bfd_powerpc_pe_vec) tb="$tb pe-ppc.o cofflink.o" ;; |
1372 | bfd_powerpcle_pe_vec) tb="$tb pe-ppc.o cofflink.o" ;; | |
1373 | bfd_powerpc_pei_vec) tb="$tb pei-ppc.o cofflink.o" ;; | |
1374 | bfd_powerpcle_pei_vec) tb="$tb pei-ppc.o cofflink.o" ;; | |
8c693660 KR |
1375 | shcoff_vec) tb="$tb coff-sh.o cofflink.o" ;; |
1376 | # start-sanitize-rce | |
1377 | rce_aout_vec) tb="$tb aout-rce.o aout32.o stab-syms.o" ;; | |
1378 | # end-sanitize-rce | |
1379 | shlcoff_vec) tb="$tb coff-sh.o cofflink.o" ;; | |
1380 | som_vec) tb="$tb som.o" ;; | |
1381 | sparclynx_aout_vec) tb="$tb sparclynx.o lynx-core.o aout32.o stab-syms.o" ;; | |
1382 | sparclynx_coff_vec) tb="$tb cf-sparclynx.o lynx-core.o stab-syms.o" ;; | |
1383 | sparcnetbsd_vec) tb="$tb sparcnetbsd.o aout32.o stab-syms.o" ;; | |
1384 | sparccoff_vec) tb="$tb coff-sparc.o" ;; | |
1385 | srec_vec) tb="$tb srec.o" ;; | |
1386 | sunos_big_vec) tb="$tb sunos.o aout32.o stab-syms.o" ;; | |
1387 | symbolsrec_vec) tb="$tb srec.o" ;; | |
1388 | tekhex_vec) tb="$tb tekhex.o" ;; | |
1389 | we32kcoff_vec) tb="$tb coff-we32k.o" ;; | |
1390 | z8kcoff_vec) tb="$tb coff-z8k.o reloc16.o" ;; | |
1391 | w65_vec) tb="$tb coff-w65.o reloc16.o" ;; | |
1392 | versados_vec) tb="$tb versados.o" ;; | |
1393 | ||
1394 | "") ;; | |
1395 | *) { echo "configure: error: *** unknown target vector $vec" 1>&2; exit 1; } ;; | |
1396 | esac | |
1397 | done | |
1398 | ||
1399 | # Target architecture .o files. | |
2b79a104 | 1400 | ta=`echo $selarchs | sed -e s/bfd_/cpu-/g -e s/_arch/.o/g` |
8c693660 KR |
1401 | |
1402 | # Weed out duplicate .o files. | |
1403 | f="" | |
1404 | for i in $tb ; do | |
1405 | case " $f " in | |
1406 | *" $i "*) ;; | |
1407 | *) f="$f $i" ;; | |
1408 | esac | |
1409 | done | |
1410 | tb="$f" | |
1411 | ||
1412 | f="" | |
1413 | for i in $ta ; do | |
1414 | case " $f " in | |
1415 | *" $i "*) ;; | |
1416 | *) f="$f $i" ;; | |
1417 | esac | |
1418 | done | |
1419 | ta="$f" | |
1420 | ||
1421 | bfd_backends="$tb" | |
1422 | bfd_machines="$ta" | |
1423 | ||
1424 | if test x${all_targets} = xtrue ; then | |
1425 | bfd_backends="${bfd_backends}"' $(ALL_BACKENDS)' | |
1426 | bfd_machines="${bfd_machines}"' $(ALL_MACHINES)' | |
2b79a104 ILT |
1427 | selvecs= |
1428 | selarchs= | |
8c693660 KR |
1429 | else # all_targets is true |
1430 | # Only set these if they will be nonempty, for the clever echo. | |
2b79a104 ILT |
1431 | test -n "$selvecs" && |
1432 | selvecs=`echo $selvecs | sed -e 's/^/\&/' -e 's/ \(.\)/,\&\1/g'` | |
1433 | test -n "$selarchs" && | |
2ffbb79a | 1434 | selarchs=`echo $selarchs | sed -e 's/^/\&/' -e 's/ \(.\)/,\&\1/g'` |
8c693660 KR |
1435 | fi # all_targets is true |
1436 | ||
1437 | case ${host64}-${target64}-${want64} in | |
1438 | *true*) | |
1439 | wordsize=64 | |
1440 | all_backends='$(BFD64_BACKENDS) $(BFD32_BACKENDS)' | |
1441 | ;; | |
1442 | false-false-false) | |
1443 | wordsize=32 | |
1444 | all_backends='$(BFD32_BACKENDS)' | |
1445 | ;; | |
1446 | esac | |
1447 | ||
1448 | ||
1449 | ||
1450 | ||
1451 | ||
1452 | ||
8c693660 KR |
1453 | tdefaults="" |
1454 | test -n "${defvec}" && tdefaults="${tdefaults} -DDEFAULT_VECTOR=${defvec}" | |
1455 | test -n "${selvecs}" && tdefaults="${tdefaults} -DSELECT_VECS='${selvecs}'" | |
1456 | test -n "${selarchs}" && tdefaults="${tdefaults} -DSELECT_ARCHITECTURES='${selarchs}'" | |
1457 | ||
1458 | ||
1459 | rm -f doc/config.status | |
1460 | trap '' 1 2 15 | |
1461 | cat > confcache <<\EOF | |
1462 | # This file is a shell script that caches the results of configure | |
1463 | # tests run on this system so they can be shared between configure | |
1464 | # scripts and configure runs. It is not useful on other systems. | |
1465 | # If it contains results you don't want to keep, you may remove or edit it. | |
1466 | # | |
1467 | # By default, configure uses ./config.cache as the cache file, | |
1468 | # creating it if it does not exist already. You can give configure | |
1469 | # the --cache-file=FILE option to use a different cache file; that is | |
1470 | # what configure does when it calls configure scripts in | |
1471 | # subdirectories, so they share the cache. | |
1472 | # Giving --cache-file=/dev/null disables caching, for debugging configure. | |
1473 | # config.status only pays attention to the cache file if you give it the | |
1474 | # --recheck option to rerun configure. | |
1475 | # | |
1476 | EOF | |
1477 | # Ultrix sh set writes to stderr and can't be redirected directly, | |
1478 | # and sets the high bit in the cache file unless we assign to the vars. | |
1479 | (set) 2>&1 | | |
1480 | sed -n "s/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=\${\1='\2'}/p" \ | |
1481 | >> confcache | |
1482 | if cmp -s $cache_file confcache; then | |
1483 | : | |
1484 | else | |
1485 | if test -w $cache_file; then | |
1486 | echo "updating cache $cache_file" | |
1487 | cat confcache > $cache_file | |
1488 | else | |
1489 | echo "not updating unwritable cache $cache_file" | |
1490 | fi | |
1491 | fi | |
1492 | rm -f confcache | |
1493 | ||
1494 | trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 | |
1495 | ||
1496 | test "x$prefix" = xNONE && prefix=$ac_default_prefix | |
1497 | # Let make expand exec_prefix. | |
1498 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
1499 | ||
1500 | # Any assignment to VPATH causes Sun make to only execute | |
1501 | # the first set of double-colon rules, so remove it if not needed. | |
1502 | # If there is a colon in the path, we need to keep it. | |
1503 | if test "x$srcdir" = x.; then | |
1504 | ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d' | |
1505 | fi | |
1506 | ||
1507 | trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15 | |
1508 | ||
b7577823 | 1509 | DEFS=-DHAVE_CONFIG_H |
8c693660 KR |
1510 | |
1511 | # Without the "./", some shells look in PATH for config.status. | |
1512 | : ${CONFIG_STATUS=./config.status} | |
1513 | ||
1514 | echo creating $CONFIG_STATUS | |
1515 | rm -f $CONFIG_STATUS | |
1516 | cat > $CONFIG_STATUS <<EOF | |
1517 | #! /bin/sh | |
1518 | # Generated automatically by configure. | |
1519 | # Run this file to recreate the current configuration. | |
1520 | # This directory was configured as follows, | |
1521 | # on host `(hostname || uname -n) 2>/dev/null | sed 1q`: | |
1522 | # | |
1523 | # $0 $ac_configure_args | |
1524 | # | |
1525 | # Compiler output produced by configure, useful for debugging | |
1526 | # configure, is in ./config.log if it exists. | |
1527 | ||
1528 | ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]" | |
1529 | for ac_option | |
1530 | do | |
1531 | case "\$ac_option" in | |
1532 | -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) | |
1533 | echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" | |
1534 | exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; | |
1535 | -version | --version | --versio | --versi | --vers | --ver | --ve | --v) | |
1536 | echo "$CONFIG_STATUS generated by autoconf version 2.4" | |
1537 | exit 0 ;; | |
1538 | -help | --help | --hel | --he | --h) | |
1539 | echo "\$ac_cs_usage"; exit 0 ;; | |
1540 | *) echo "\$ac_cs_usage"; exit 1 ;; | |
1541 | esac | |
1542 | done | |
1543 | ||
1544 | ac_given_srcdir=$srcdir | |
f515fb2f | 1545 | ac_given_INSTALL="$INSTALL" |
8c693660 | 1546 | |
936b870c | 1547 | trap 'rm -fr `echo "Makefile doc/Makefile config.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 |
8c693660 KR |
1548 | |
1549 | # Protect against being on the right side of a sed subst in config.status. | |
1550 | sed 's/%@/@@/; s/@%/@@/; s/%g$/@g/; /@g$/s/[\\\\&%]/\\\\&/g; | |
1551 | s/@@/%@/; s/@@/@%/; s/@g$/%g/' > conftest.subs <<\CEOF | |
1552 | $ac_vpsub | |
1553 | $extrasub | |
1554 | s%@CFLAGS@%$CFLAGS%g | |
1555 | s%@CPPFLAGS@%$CPPFLAGS%g | |
1556 | s%@CXXFLAGS@%$CXXFLAGS%g | |
1557 | s%@DEFS@%$DEFS%g | |
1558 | s%@LDFLAGS@%$LDFLAGS%g | |
1559 | s%@LIBS@%$LIBS%g | |
1560 | s%@exec_prefix@%$exec_prefix%g | |
1561 | s%@prefix@%$prefix%g | |
1562 | s%@program_transform_name@%$program_transform_name%g | |
1563 | s%@host@%$host%g | |
1564 | s%@host_alias@%$host_alias%g | |
1565 | s%@host_cpu@%$host_cpu%g | |
1566 | s%@host_vendor@%$host_vendor%g | |
1567 | s%@host_os@%$host_os%g | |
1568 | s%@target@%$target%g | |
1569 | s%@target_alias@%$target_alias%g | |
1570 | s%@target_cpu@%$target_cpu%g | |
1571 | s%@target_vendor@%$target_vendor%g | |
1572 | s%@target_os@%$target_os%g | |
1573 | s%@build@%$build%g | |
1574 | s%@build_alias@%$build_alias%g | |
1575 | s%@build_cpu@%$build_cpu%g | |
1576 | s%@build_vendor@%$build_vendor%g | |
1577 | s%@build_os@%$build_os%g | |
f515fb2f ILT |
1578 | s%@CC@%$CC%g |
1579 | s%@HDEFINES@%$HDEFINES%g | |
1580 | s%@AR@%$AR%g | |
8c693660 | 1581 | s%@RANLIB@%$RANLIB%g |
f515fb2f ILT |
1582 | s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g |
1583 | s%@INSTALL_DATA@%$INSTALL_DATA%g | |
b7577823 | 1584 | s%@HOST_64BIT_LONG@%$HOST_64BIT_LONG%g |
f515fb2f | 1585 | s%@CC_FOR_BUILD@%$CC_FOR_BUILD%g |
b7577823 | 1586 | s%@CPP@%$CPP%g |
a52a3ce8 ILT |
1587 | s%@COREFILE@%$COREFILE%g |
1588 | s%@COREFLAG@%$COREFLAG%g | |
2b79a104 | 1589 | s%@TDEFINES@%$TDEFINES%g |
8c693660 KR |
1590 | s%@wordsize@%$wordsize%g |
1591 | s%@all_backends@%$all_backends%g | |
1592 | s%@bfd_backends@%$bfd_backends%g | |
1593 | s%@bfd_machines@%$bfd_machines%g | |
1594 | s%@tdefaults@%$tdefaults%g | |
1595 | ||
1596 | CEOF | |
1597 | EOF | |
1598 | cat >> $CONFIG_STATUS <<EOF | |
1599 | ||
1600 | CONFIG_FILES=\${CONFIG_FILES-"Makefile doc/Makefile"} | |
1601 | EOF | |
1602 | cat >> $CONFIG_STATUS <<\EOF | |
1603 | for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then | |
1604 | # Support "outfile[:infile]", defaulting infile="outfile.in". | |
1605 | case "$ac_file" in | |
1606 | *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'` | |
1607 | ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; | |
1608 | *) ac_file_in="${ac_file}.in" ;; | |
1609 | esac | |
1610 | ||
1611 | # Adjust relative srcdir, etc. for subdirectories. | |
1612 | ||
1613 | # Remove last slash and all that follows it. Not all systems have dirname. | |
1614 | ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` | |
1615 | if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then | |
1616 | # The file is in a subdirectory. | |
1617 | test ! -d "$ac_dir" && mkdir "$ac_dir" | |
1618 | ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`" | |
1619 | # A "../" for each directory in $ac_dir_suffix. | |
1620 | ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'` | |
1621 | else | |
1622 | ac_dir_suffix= ac_dots= | |
1623 | fi | |
1624 | ||
1625 | case "$ac_given_srcdir" in | |
1626 | .) srcdir=. | |
1627 | if test -z "$ac_dots"; then top_srcdir=. | |
1628 | else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;; | |
1629 | /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;; | |
1630 | *) # Relative path. | |
1631 | srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix" | |
1632 | top_srcdir="$ac_dots$ac_given_srcdir" ;; | |
1633 | esac | |
1634 | ||
f515fb2f ILT |
1635 | case "$ac_given_INSTALL" in |
1636 | [/$]*) INSTALL="$ac_given_INSTALL" ;; | |
1637 | *) INSTALL="$ac_dots$ac_given_INSTALL" ;; | |
1638 | esac | |
8c693660 KR |
1639 | echo creating "$ac_file" |
1640 | rm -f "$ac_file" | |
1641 | configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure." | |
1642 | case "$ac_file" in | |
1643 | *Makefile*) ac_comsub="1i\\ | |
1644 | # $configure_input" ;; | |
1645 | *) ac_comsub= ;; | |
1646 | esac | |
1647 | sed -e "$ac_comsub | |
1648 | s%@configure_input@%$configure_input%g | |
1649 | s%@srcdir@%$srcdir%g | |
1650 | s%@top_srcdir@%$top_srcdir%g | |
f515fb2f | 1651 | s%@INSTALL@%$INSTALL%g |
8c693660 KR |
1652 | " -f conftest.subs $ac_given_srcdir/$ac_file_in > $ac_file |
1653 | fi; done | |
1654 | rm -f conftest.subs | |
1655 | ||
b7577823 ILT |
1656 | # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where |
1657 | # NAME is the cpp macro being defined and VALUE is the value it is being given. | |
1658 | # | |
1659 | # ac_d sets the value in "#define NAME VALUE" lines. | |
1660 | ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)' | |
1661 | ac_dB='\([ ][ ]*\)[^ ]*%\1#\2' | |
1662 | ac_dC='\3' | |
1663 | ac_dD='%g' | |
1664 | # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE". | |
1665 | ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' | |
1666 | ac_uB='\([ ]\)%\1#\2define\3' | |
1667 | ac_uC=' ' | |
1668 | ac_uD='\4%g' | |
1669 | # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE". | |
1670 | ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' | |
1671 | ac_eB='$%\1#\2define\3' | |
1672 | ac_eC=' ' | |
1673 | ac_eD='%g' | |
1674 | ||
936b870c | 1675 | CONFIG_HEADERS=${CONFIG_HEADERS-"config.h:config.in"} |
b7577823 ILT |
1676 | for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then |
1677 | # Support "outfile[:infile]", defaulting infile="outfile.in". | |
1678 | case "$ac_file" in | |
1679 | *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'` | |
1680 | ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; | |
1681 | *) ac_file_in="${ac_file}.in" ;; | |
1682 | esac | |
8c693660 | 1683 | |
b7577823 | 1684 | echo creating $ac_file |
8c693660 | 1685 | |
b7577823 ILT |
1686 | rm -f conftest.frag conftest.in conftest.out |
1687 | cp $ac_given_srcdir/$ac_file_in conftest.in | |
8c693660 | 1688 | |
b7577823 | 1689 | EOF |
8c693660 | 1690 | |
b7577823 ILT |
1691 | # Transform confdefs.h into a sed script conftest.vals that substitutes |
1692 | # the proper values into config.h.in to produce config.h. And first: | |
1693 | # Protect against being on the right side of a sed subst in config.status. | |
1694 | # Protect against being in an unquoted here document in config.status. | |
1695 | rm -f conftest.vals | |
1696 | cat > conftest.hdr <<\EOF | |
1697 | s/[\\&%]/\\&/g | |
1698 | s%[\\$`]%\\&%g | |
1699 | s%#define \([A-Za-z_][A-Za-z0-9_]*\) \(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp | |
1700 | s%ac_d%ac_u%gp | |
1701 | s%ac_u%ac_e%gp | |
1702 | EOF | |
1703 | sed -n -f conftest.hdr confdefs.h > conftest.vals | |
1704 | rm -f conftest.hdr | |
1705 | ||
1706 | # This sed command replaces #undef with comments. This is necessary, for | |
1707 | # example, in the case of _POSIX_SOURCE, which is predefined and required | |
1708 | # on some systems where configure will not decide to define it. | |
1709 | cat >> conftest.vals <<\EOF | |
1710 | s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */% | |
1711 | EOF | |
8c693660 | 1712 | |
b7577823 ILT |
1713 | # Break up conftest.vals because some shells have a limit on |
1714 | # the size of here documents, and old seds have small limits too. | |
1715 | # Maximum number of lines to put in a single here document. | |
1716 | ac_max_here_lines=12 | |
8c693660 | 1717 | |
b7577823 ILT |
1718 | rm -f conftest.tail |
1719 | while : | |
1720 | do | |
1721 | ac_lines=`grep -c . conftest.vals` | |
1722 | # grep -c gives empty output for an empty file on some AIX systems. | |
1723 | if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi | |
1724 | # Write a limited-size here document to conftest.frag. | |
1725 | echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS | |
1726 | sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS | |
1727 | echo 'CEOF | |
1728 | sed -f conftest.frag conftest.in > conftest.out | |
1729 | rm -f conftest.in | |
1730 | mv conftest.out conftest.in | |
1731 | ' >> $CONFIG_STATUS | |
1732 | sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail | |
1733 | rm -f conftest.vals | |
1734 | mv conftest.tail conftest.vals | |
1735 | done | |
1736 | rm -f conftest.vals | |
8c693660 | 1737 | |
b7577823 ILT |
1738 | cat >> $CONFIG_STATUS <<\EOF |
1739 | rm -f conftest.frag conftest.h | |
1740 | echo "/* $ac_file. Generated automatically by configure. */" > conftest.h | |
1741 | cat conftest.in >> conftest.h | |
1742 | rm -f conftest.in | |
1743 | if cmp -s $ac_file conftest.h 2>/dev/null; then | |
1744 | echo "$ac_file is unchanged" | |
1745 | rm -f conftest.h | |
8c693660 | 1746 | else |
b7577823 ILT |
1747 | rm -f $ac_file |
1748 | mv conftest.h $ac_file | |
8c693660 | 1749 | fi |
b7577823 ILT |
1750 | fi; done |
1751 | ||
8c693660 | 1752 | |
a7873a6c | 1753 | case x$CONFIG_HEADERS in xconfig.h:config.in) echo > stamp-h ;; esac |
8c693660 KR |
1754 | exit 0 |
1755 | EOF | |
1756 | chmod +x $CONFIG_STATUS | |
1757 | rm -fr confdefs* $ac_clean_files | |
1758 | test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 | |
1759 |