]>
Commit | Line | Data |
---|---|---|
b11fb939 KR |
1 | #!/bin/sh |
2 | # Guess values for system-dependent variables and create Makefiles. | |
3 | # Generated automatically using autoconf version 1.107 | |
4 | # Copyright (C) 1991, 1992, 1993, 1994 Free Software Foundation, Inc. | |
5 | # | |
6 | # This configure script is free software; you can redistribute it and/or | |
7 | # modify it under the terms of the GNU General Public License as published | |
8 | # by the Free Software Foundation; either version 2, or (at your option) | |
9 | # any later version. | |
10 | # | |
11 | # This script is distributed in the hope that it will be useful, but | |
12 | # WITHOUT ANY WARRANTY; without even the implied warranty of | |
13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General | |
14 | # Public License for more details. | |
15 | # | |
16 | # You should have received a copy of the GNU General Public License | |
17 | # along with this program; if not, write to the Free Software | |
18 | # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | |
19 | ||
20 | ac_help= | |
21 | ac_help="${ac_help} | |
22 | bfd-assembler use BFD back end for writing object files" | |
23 | # Save the original args to write them into config.status later. | |
24 | configure_args="$@" | |
25 | ||
26 | # Omit some internal, obsolete, or unimplemented options to make the | |
27 | # list less imposing. | |
28 | ac_usage="Usage: configure [options] [host] | |
29 | Options: [defaults in brackets after descriptions] | |
30 | Configuration: | |
31 | --cache-file=FILE cache test results in FILE | |
32 | --help print this message | |
33 | --no-create do not create output files | |
34 | --quiet, --silent do not print \`checking...' messages | |
35 | --version print the version of autoconf that created configure | |
36 | Directories: | |
37 | --exec-prefix=PREFIX install host dependent files in PREFIX [/usr/local] | |
38 | --prefix=PREFIX install host independent files in PREFIX [/usr/local] | |
39 | --srcdir=DIR find the sources in DIR [configure dir or ..] | |
40 | Host type: | |
41 | --build=BUILD configure for building on BUILD [BUILD=HOST] | |
42 | --host=HOST configure for HOST [guessed] | |
43 | --target=TARGET configure for TARGET [TARGET=HOST] | |
44 | Features and packages: | |
45 | --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) | |
46 | --enable-FEATURE[=ARG] include FEATURE [ARG=yes] | |
47 | --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] | |
48 | --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) | |
49 | --x-includes=DIR X include files are in DIR | |
50 | --x-libraries=DIR X library files are in DIR | |
51 | --enable and --with options recognized:$ac_help" | |
52 | ||
53 | # Initialize some variables set by options. | |
54 | # The variables have the same names as the options, with | |
55 | # dashes changed to underlines. | |
56 | build=NONE | |
57 | cache_file=./config.cache | |
58 | exec_prefix=NONE | |
59 | host=NONE | |
60 | no_create= | |
61 | nonopt=NONE | |
62 | norecursion= | |
63 | prefix=NONE | |
64 | program_prefix= | |
65 | program_suffix= | |
66 | program_transform_name= | |
67 | silent= | |
68 | srcdir= | |
69 | target=NONE | |
70 | verbose= | |
71 | x_includes=NONE | |
72 | x_libraries=NONE | |
73 | ||
74 | # Initialize some other variables. | |
75 | subdirs= | |
76 | ||
77 | ac_prev= | |
78 | for ac_option | |
79 | do | |
80 | ||
81 | # If the previous option needs an argument, assign it. | |
82 | if test -n "$ac_prev"; then | |
83 | eval "$ac_prev=\$ac_option" | |
84 | ac_prev= | |
85 | continue | |
86 | fi | |
87 | ||
88 | case "$ac_option" in | |
89 | -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;; | |
90 | *) ac_optarg= ;; | |
91 | esac | |
92 | ||
93 | # Accept (but ignore some of) the important Cygnus configure | |
94 | # options, so we can diagnose typos. | |
95 | ||
96 | case "$ac_option" in | |
97 | ||
98 | -build | --build | --buil | --bui | --bu | --b) | |
99 | ac_prev=build ;; | |
100 | -build=* | --build=* | --buil=* | --bui=* | --bu=* | --b=*) | |
101 | build="$ac_optarg" ;; | |
102 | ||
103 | -cache-file | --cache-file | --cache-fil | --cache-fi \ | |
104 | | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) | |
105 | ac_prev=cache_file ;; | |
106 | -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | |
107 | | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) | |
108 | cache_file="$ac_optarg" ;; | |
109 | ||
110 | -disable-* | --disable-*) | |
111 | ac_feature=`echo $ac_option|sed -e 's/-*disable-//'` | |
112 | # Reject names that are not valid shell variable names. | |
113 | if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then | |
114 | { echo "configure: $ac_feature: invalid feature name" 1>&2; exit 1; } | |
115 | fi | |
116 | ac_feature=`echo $ac_feature| sed 's/-/_/g'` | |
117 | eval "enable_${ac_feature}=no" ;; | |
118 | ||
119 | -enable-* | --enable-*) | |
120 | ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'` | |
121 | # Reject names that are not valid shell variable names. | |
122 | if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then | |
123 | { echo "configure: $ac_feature: invalid feature name" 1>&2; exit 1; } | |
124 | fi | |
125 | ac_feature=`echo $ac_feature| sed 's/-/_/g'` | |
126 | case "$ac_option" in | |
127 | *=*) ;; | |
128 | *) ac_optarg=yes ;; | |
129 | esac | |
130 | eval "enable_${ac_feature}='$ac_optarg'" ;; | |
131 | ||
132 | -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | |
133 | | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | |
134 | | --exec | --exe | --ex) | |
135 | ac_prev=exec_prefix ;; | |
136 | -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | |
137 | | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | |
138 | | --exec=* | --exe=* | --ex=*) | |
139 | exec_prefix="$ac_optarg" ;; | |
140 | ||
141 | -gas | --gas | --ga | --g) | |
142 | # Obsolete; use --with-gas. | |
143 | with_gas=yes ;; | |
144 | ||
145 | -help | --help | --hel | --he) | |
146 | cat << EOF | |
147 | $ac_usage | |
148 | EOF | |
149 | exit 0 ;; | |
150 | ||
151 | -host | --host | --hos | --ho) | |
152 | ac_prev=host ;; | |
153 | -host=* | --host=* | --hos=* | --ho=*) | |
154 | host="$ac_optarg" ;; | |
155 | ||
156 | -nfp | --nfp | --nf) | |
157 | # Obsolete; use --without-fp. | |
158 | with_fp=no ;; | |
159 | ||
160 | -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | |
161 | | --no-cr | --no-c) | |
162 | no_create=yes ;; | |
163 | ||
164 | -norecursion | --norecursion | --norecursio | --norecursi \ | |
165 | | --norecurs | --norecur | --norecu | --norec | --nore | --nor) | |
166 | norecursion=yes ;; | |
167 | ||
168 | -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) | |
169 | ac_prev=prefix ;; | |
170 | -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) | |
171 | prefix="$ac_optarg" ;; | |
172 | ||
173 | -program-prefix | --program-prefix | --program-prefi | --program-pref \ | |
174 | | --program-pre | --program-pr | --program-p) | |
175 | ac_prev=program_prefix ;; | |
176 | -program-prefix=* | --program-prefix=* | --program-prefi=* \ | |
177 | | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) | |
178 | program_prefix="$ac_optarg" ;; | |
179 | ||
180 | -program-suffix | --program-suffix | --program-suffi | --program-suff \ | |
181 | | --program-suf | --program-su | --program-s) | |
182 | ac_prev=program_suffix ;; | |
183 | -program-suffix=* | --program-suffix=* | --program-suffi=* \ | |
184 | | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) | |
185 | program_suffix="$ac_optarg" ;; | |
186 | ||
187 | -program-transform-name | --program-transform-name \ | |
188 | | --program-transform-nam | --program-transform-na \ | |
189 | | --program-transform-n | --program-transform- \ | |
190 | | --program-transform | --program-transfor \ | |
191 | | --program-transfo | --program-transf \ | |
192 | | --program-trans | --program-tran \ | |
193 | | --progr-tra | --program-tr | --program-t) | |
194 | ac_prev=program_transform_name ;; | |
195 | -program-transform-name=* | --program-transform-name=* \ | |
196 | | --program-transform-nam=* | --program-transform-na=* \ | |
197 | | --program-transform-n=* | --program-transform-=* \ | |
198 | | --program-transform=* | --program-transfor=* \ | |
199 | | --program-transfo=* | --program-transf=* \ | |
200 | | --program-trans=* | --program-tran=* \ | |
201 | | --progr-tra=* | --program-tr=* | --program-t=*) | |
202 | program_transform_name="$ac_optarg" ;; | |
203 | ||
204 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | |
205 | | -silent | --silent | --silen | --sile | --sil) | |
206 | silent=yes ;; | |
207 | ||
208 | -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) | |
209 | ac_prev=srcdir ;; | |
210 | -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) | |
211 | srcdir="$ac_optarg" ;; | |
212 | ||
213 | -target | --target | --targe | --targ | --tar | --ta | --t) | |
214 | ac_prev=target ;; | |
215 | -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) | |
216 | target="$ac_optarg" ;; | |
217 | ||
218 | -v | -verbose | --verbose | --verbos | --verbo | --verb) | |
219 | verbose=yes ;; | |
220 | ||
221 | -version | --version | --versio | --versi | --vers) | |
222 | echo "configure generated by autoconf version 1.107" | |
223 | exit 0 ;; | |
224 | ||
225 | -with-* | --with-*) | |
226 | ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'` | |
227 | # Reject names that are not valid shell variable names. | |
228 | if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then | |
229 | { echo "configure: $ac_package: invalid package name" 1>&2; exit 1; } | |
230 | fi | |
231 | ac_package=`echo $ac_package| sed 's/-/_/g'` | |
232 | case "$ac_option" in | |
233 | *=*) ;; | |
234 | *) ac_optarg=yes ;; | |
235 | esac | |
236 | eval "with_${ac_package}='$ac_optarg'" ;; | |
237 | ||
238 | -without-* | --without-*) | |
239 | ac_package=`echo $ac_option|sed -e 's/-*without-//'` | |
240 | # Reject names that are not valid shell variable names. | |
241 | if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then | |
242 | { echo "configure: $ac_package: invalid package name" 1>&2; exit 1; } | |
243 | fi | |
244 | ac_package=`echo $ac_package| sed 's/-/_/g'` | |
245 | eval "with_${ac_package}=no" ;; | |
246 | ||
247 | --x) | |
248 | # Obsolete; use --with-x. | |
249 | with_x=yes ;; | |
250 | ||
251 | -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | |
252 | | --x-incl | --x-inc | --x-in | --x-i) | |
253 | ac_prev=x_includes ;; | |
254 | -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | |
255 | | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) | |
256 | x_includes="$ac_optarg" ;; | |
257 | ||
258 | -x-libraries | --x-libraries | --x-librarie | --x-librari \ | |
259 | | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) | |
260 | ac_prev=x_libraries ;; | |
261 | -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | |
262 | | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) | |
263 | x_libraries="$ac_optarg" ;; | |
264 | ||
265 | -*) { echo "configure: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; } | |
266 | ;; | |
267 | ||
268 | *) | |
269 | if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then | |
270 | echo "configure: warning: $ac_option: invalid host type" 1>&2 | |
271 | fi | |
272 | if test "x$nonopt" != xNONE; then | |
273 | { echo "configure: can only configure for one host and one target at a time" 1>&2; exit 1; } | |
274 | fi | |
275 | nonopt="$ac_option" | |
276 | ;; | |
277 | ||
278 | esac | |
279 | done | |
280 | ||
281 | if test -n "$ac_prev"; then | |
282 | { echo "configure: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; } | |
283 | fi | |
284 | ||
285 | trap 'rm -fr conftest* confdefs* core $ac_clean_files; exit 1' 1 2 15 | |
286 | trap 'rm -fr confdefs* $ac_clean_files' 0 | |
287 | ||
288 | # File descriptor usage: | |
289 | # 0 unused; standard input | |
290 | # 1 file creation | |
291 | # 2 errors and warnings | |
292 | # 3 unused; some systems may open it to /dev/tty | |
293 | # 4 checking for... messages and results | |
294 | # 5 compiler messages saved in config.log | |
295 | if test "$silent" = yes; then | |
296 | exec 4>/dev/null | |
297 | else | |
298 | exec 4>&1 | |
299 | fi | |
300 | exec 5>./config.log | |
301 | ||
302 | echo "\ | |
303 | This file contains any messages produced by compilers while | |
304 | running configure, to aid debugging if configure makes a mistake. | |
305 | " 1>&5 | |
306 | ||
307 | # Save the original args if we used an alternate arg parser. | |
308 | ac_configure_temp="${configure_args-$@}" | |
309 | # Strip out --no-create and --norecursion so they do not pile up. | |
310 | # Also quote any args containing spaces. | |
311 | configure_args= | |
312 | for ac_arg in $ac_configure_temp; do | |
313 | case "$ac_arg" in | |
314 | -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | |
315 | | --no-cr | --no-c) ;; | |
316 | -norecursion | --norecursion | --norecursio | --norecursi \ | |
317 | | --norecurs | --norecur | --norecu | --norec | --nore | --nor) ;; | |
318 | *[" "]*) configure_args="$configure_args '$ac_arg'" ;; | |
319 | *) configure_args="$configure_args $ac_arg" ;; | |
320 | esac | |
321 | done | |
322 | ||
323 | # NLS nuisances. | |
324 | # Only set LANG and LC_ALL to C if already set. | |
325 | # These must not be set unconditionally because not all systems understand | |
326 | # e.g. LANG=C (notably SCO). | |
327 | if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi | |
328 | if test "${LANG+set}" = set; then LANG=C; export LANG; fi | |
329 | ||
330 | # confdefs.h avoids OS command line length limits that DEFS can exceed. | |
331 | rm -rf conftest* confdefs.h | |
332 | # AIX cpp loses on an empty file, so make sure it contains at least a newline. | |
333 | echo > confdefs.h | |
334 | ||
335 | # A filename unique to this package, relative to the directory that | |
336 | # configure is in, which we can look for to find out if srcdir is correct. | |
337 | ac_unique_file=as.h | |
338 | ||
339 | # Find the source files, if location was not specified. | |
340 | if test -z "$srcdir"; then | |
341 | ac_srcdir_defaulted=yes | |
342 | # Try the directory containing this script, then its parent. | |
343 | ac_prog=$0 | |
344 | ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'` | |
345 | test "x$ac_confdir" = "x$ac_prog" && ac_confdir=. | |
346 | srcdir=$ac_confdir | |
347 | if test ! -r $srcdir/$ac_unique_file; then | |
348 | srcdir=.. | |
349 | fi | |
350 | else | |
351 | ac_srcdir_defaulted=no | |
352 | fi | |
353 | if test ! -r $srcdir/$ac_unique_file; then | |
354 | if test "$ac_srcdir_defaulted" = yes; then | |
355 | { echo "configure: can not find sources in ${ac_confdir} or .." 1>&2; exit 1; } | |
356 | else | |
357 | { echo "configure: can not find sources in ${srcdir}" 1>&2; exit 1; } | |
358 | fi | |
359 | fi | |
360 | ||
361 | # Prefer explicitly selected file to automatically selected ones. | |
362 | if test ! -r "$CONFIG_SITE"; then | |
363 | if test "x$prefix" != xNONE; then | |
364 | CONFIG_SITE=$prefix/lib/config.site | |
365 | else | |
366 | CONFIG_SITE=/usr/local/lib/config.site | |
367 | fi | |
368 | # System dependent files override system independent ones. | |
369 | if test "x$exec_prefix" != xNONE && test "x$exec_prefix" != "x$prefix"; then | |
370 | CONFIG_SITE="$CONFIG_SITE $exec_prefix/lib/config.site" | |
371 | fi | |
372 | fi | |
373 | for ac_site_file in $CONFIG_SITE; do | |
374 | if test -r "$ac_site_file"; then | |
375 | echo "loading site script $ac_site_file" | |
376 | . "$ac_site_file" | |
377 | fi | |
378 | done | |
379 | ||
380 | if test -r "$cache_file"; then | |
381 | echo "loading cache $cache_file" | |
382 | . $cache_file | |
383 | else | |
384 | echo "creating cache $cache_file" | |
385 | > $cache_file | |
386 | fi | |
387 | ||
388 | ac_ext=c | |
389 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. | |
390 | ac_cpp='${CPP} $CPPFLAGS' | |
391 | ac_compile='${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS conftest.${ac_ext} -o conftest $LIBS 1>&5 2>&5' | |
392 | ||
393 | ||
394 | # Check whether --enable-bfd-assembler or --disable-bfd-assembler was given. | |
395 | enableval="$enable_bfd_assembler" | |
396 | if test -n "$enableval"; then | |
397 | case "${enableval}" in | |
398 | yes) need_bfd=yes bfd_gas=yes ;; | |
399 | no) ;; | |
400 | *) { echo "configure: bad value ${enableval} given for bfd-assembler option" 1>&2; exit 1; } ;; | |
401 | esac | |
402 | fi | |
403 | ||
404 | # Generate a header file -- gets more post-processing by Makefile later. | |
405 | ||
406 | ||
407 | ac_aux_dir= | |
408 | for ac_dir in `cd $srcdir;pwd`/.. ${srcdir}/`cd $srcdir;pwd`/..; do | |
409 | if test -f $ac_dir/install.sh; then | |
410 | ac_aux_dir=$ac_dir; break | |
411 | fi | |
412 | done | |
413 | if test -z "$ac_aux_dir"; then | |
414 | { echo "configure: can not find install.sh in `cd $srcdir;pwd`/.. ${srcdir}/`cd $srcdir;pwd`/.." 1>&2; exit 1; } | |
415 | fi | |
416 | ac_config_guess=${ac_aux_dir}/config.guess | |
417 | ac_config_sub=${ac_aux_dir}/config.sub | |
418 | ac_configure=${ac_aux_dir}/configure # This should be Cygnus configure. | |
419 | ac_install_sh="${ac_aux_dir}/install.sh -c" | |
420 | ||
421 | # Do some error checking and defaulting for the host and target type. | |
422 | # The inputs are: | |
423 | # configure --host=HOST --target=TARGET --build=BUILD NONOPT | |
424 | # | |
425 | # The rules are: | |
426 | # 1. You are not allowed to specify --host, --target, and nonopt at the | |
427 | # same time. | |
428 | # 2. Host defaults to nonopt. | |
429 | # 3. If nonopt is not specified, then host defaults to the current host, | |
430 | # as determined by config.guess. | |
431 | # 4. Target defaults to nonopt. | |
432 | # 5. If nonopt is not specified, then target defaults to host. | |
433 | # 6. build defaults to empty (but implicitly to host). | |
434 | ||
435 | # The aliases save the names the user supplied, while $host etc. | |
436 | # will get canonicalized. | |
437 | case $host---$target---$nonopt in | |
438 | NONE---*---* | *---NONE---* | *---*---NONE) ;; | |
439 | *) { echo "configure: can only configure for one host and one target at a time" 1>&2; exit 1; } ;; | |
440 | esac | |
441 | ||
442 | # Make sure we can run config.sub. | |
443 | if ${ac_config_sub} sun4 >/dev/null 2>&1; then : | |
444 | else { echo "configure: can not run ${ac_config_sub}" 1>&2; exit 1; } | |
445 | fi | |
446 | ||
447 | if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then | |
448 | # Stardent Vistra SVR4 grep lacks -e, says [email protected]. | |
449 | if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then | |
450 | ac_n= ac_c=' | |
451 | ' ac_t=' ' | |
452 | else | |
453 | ac_n=-n ac_c= ac_t= | |
454 | fi | |
455 | else | |
456 | ac_n= ac_c='\c' ac_t= | |
457 | fi | |
458 | echo $ac_n "checking host system type""... $ac_c" 1>&4 | |
459 | ||
460 | host_alias=$host | |
461 | case "${host_alias}" in | |
462 | NONE) | |
463 | case $nonopt in | |
464 | NONE) | |
465 | if host_alias=`${ac_config_guess}`; then : | |
466 | else { echo "configure: can not guess host type; you must specify one" 1>&2; exit 1; } | |
467 | fi ;; | |
468 | *) host_alias=$nonopt ;; | |
469 | esac ;; | |
470 | esac | |
471 | ||
472 | host=`${ac_config_sub} ${host_alias}` | |
473 | host_cpu=`echo $host | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\1/'` | |
474 | host_vendor=`echo $host | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\2/'` | |
475 | host_os=`echo $host | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\3/'` | |
476 | echo "$ac_t""$host" 1>&4 | |
477 | ||
478 | echo $ac_n "checking target system type""... $ac_c" 1>&4 | |
479 | ||
480 | target_alias=$target | |
481 | case "${target_alias}" in | |
482 | NONE) | |
483 | case $nonopt in | |
484 | NONE) target_alias=$host_alias ;; | |
485 | *) target_alias=$nonopt ;; | |
486 | esac ;; | |
487 | esac | |
488 | ||
489 | target=`${ac_config_sub} ${target_alias}` | |
490 | target_cpu=`echo $target | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\1/'` | |
491 | target_vendor=`echo $target | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\2/'` | |
492 | target_os=`echo $target | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\3/'` | |
493 | echo "$ac_t""$target" 1>&4 | |
494 | ||
495 | echo $ac_n "checking build system type""... $ac_c" 1>&4 | |
496 | ||
497 | build_alias=$build | |
498 | case "${build_alias}" in | |
499 | NONE) build= build_alias= ;; | |
500 | *) | |
501 | build=`${ac_config_sub} ${build_alias}` | |
502 | build_cpu=`echo $build | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\1/'` | |
503 | build_vendor=`echo $build | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\2/'` | |
504 | build_os=`echo $build | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\3/'` | |
505 | ;; | |
506 | esac | |
507 | echo "$ac_t""$build" 1>&4 | |
508 | ||
509 | ||
510 | ||
511 | emulation=generic | |
512 | ||
513 | # assign cpu type | |
514 | ||
515 | # check for architecture variants | |
516 | case ${target_cpu} in | |
517 | hppa*) cpu_type=hppa ;; | |
518 | i[45]86) cpu_type=i386 ;; | |
519 | m680[012346]0) cpu_type=m68k ;; | |
520 | m68008) cpu_type=m68k ;; | |
521 | m683??) cpu_type=m68k ;; | |
522 | m8*) cpu_type=m88k ;; | |
523 | mips*el) cpu_type=mips endian=little;; | |
524 | mips*) cpu_type=mips endian=big ;; | |
525 | powerpc*) cpu_type=ppc ;; | |
526 | rs6000*) cpu_type=ppc ;; | |
527 | sparc64) cpu_type=sparc obj_format=elf cat >> confdefs.h <<\EOF | |
528 | #define sparcv9 1 | |
529 | EOF | |
530 | ;; | |
531 | sparclite*) cpu_type=sparc ;; | |
532 | *) cpu_type=${target_cpu} ;; | |
533 | esac | |
534 | ||
535 | # do we need the opcodes library? | |
536 | case ${cpu_type} in | |
537 | alpha | vax) | |
538 | ;; | |
539 | *) | |
540 | OPCODES_LIB="../opcodes/libopcodes.a" | |
541 | ;; | |
542 | esac | |
543 | ||
544 | ||
545 | gas_target=${cpu_type} | |
546 | generic_target=${cpu_type}-${target_vendor}-${target_os} | |
547 | dev=no | |
548 | ||
549 | # assign object format | |
550 | case ${generic_target} in | |
551 | a29k-amd-udi) obj_format=coff gas_target=ebmon29k ;; | |
552 | a29k-amd-ebmon) obj_format=coff gas_target=ebmon29k ;; | |
553 | ||
554 | alpha-*-netware*) obj_format=ecoff ;; | |
555 | alpha-*-osf*) obj_format=ecoff ;; | |
556 | ||
557 | hppa-*-*elf*) obj_format=elf emulation=hppa ;; | |
558 | hppa-*-osf*) obj_format=som emulation=hppa ;; | |
559 | hppa-*-hpux*) obj_format=som emulation=hppa ;; | |
560 | hppa-*-bsd*) obj_format=som emulation=hppa ;; | |
561 | hppa-*-hiux*) obj_format=som emulation=hppa ;; | |
562 | ||
563 | h8300-*-coff) obj_format=coff ;; | |
564 | ||
565 | i386-ibm-aix*) obj_format=coff gas_target=i386coff | |
566 | emulation=i386aix ;; | |
567 | i386-*-bsd*) obj_format=aout emulation=386bsd ;; | |
568 | i386-*-netbsd0.8) obj_format=aout emulation=386bsd ;; | |
569 | i386-*-netbsd*) obj_format=aout emulation=netbsd ;; | |
570 | i386-*-linux*elf*) obj_format=elf emulation=linux ;; | |
571 | i386-*-linux*coff*) obj_format=coff emulation=linux | |
572 | gas_target=i386coff ;; | |
573 | i386-*-linux*) obj_format=aout emulation=linux ;; | |
574 | i386-*-lynxos*) obj_format=coff gas_target=i386coff | |
575 | emulation=lynx ;; | |
576 | i386-*-sysv4* | i386-*-solaris* | i386-*-elf) | |
577 | obj_format=elf ;; | |
578 | i386-*-coff | i386-*-sysv* | i386-*-sco* | i386-*-isc*) | |
579 | obj_format=coff gas_target=i386coff ;; | |
580 | i386-*-vsta) obj_format=aout ;; | |
581 | i386-*-go32) obj_format=coff gas_target=i386coff ;; | |
582 | i386-*-mach* | i386-*-gnu*) | |
583 | obj_format=aout emulation=mach bfd_gas=yes ;; | |
584 | ||
585 | i960-*-bout) obj_format=bout ;; | |
586 | i960-*-coff) obj_format=coff emulation=ic960 gas_target=ic960coff ;; | |
587 | i960-*-nindy*) obj_format=bout ;; | |
588 | i960-*-vxworks4*) obj_format=bout ;; | |
589 | i960-*-vxworks5.0) obj_format=bout ;; | |
590 | i960-*-vxworks5.*) obj_format=coff emulation=ic960 gas_target=ic960coff ;; | |
591 | i960-*-vxworks*) obj_format=bout ;; | |
592 | ||
593 | m68k-wrs-vxworks | m68k-ericsson-ose | m68k-*-sunos*) | |
594 | obj_format=aout emulation=sun3 ;; | |
595 | m68k-motorola-sysv) obj_format=coff gas_target=m68kcoff emulation=delta ;; | |
596 | m68k-bull-sysv3*) obj_format=coff gas_target=m68kcoff emulation=dpx2 ;; | |
597 | m68k-apollo-*) obj_format=coff gas_target=apollo emulation=apollo ;; | |
598 | m68k-*-coff | m68k-*-sysv*) | |
599 | obj_format=coff gas_target=m68kcoff ;; | |
600 | m68k-*-hpux) obj_format=hp300 emulation=hp300 ;; | |
601 | m68k-*-lynxos*) obj_format=coff gas_target=m68kcoff | |
602 | emulation=lynx ;; | |
603 | ||
604 | m88k-*-coff*) obj_format=coff gas_target=m88kcoff ;; | |
605 | ||
606 | # don't change emulation like *-*-bsd does | |
607 | mips-*-bsd*) bfd_gas=yes obj_format=aout gas_target=mips-lit ;; | |
608 | mips-*-ultrix*) obj_format=ecoff gas_target=mips-lit ;; | |
609 | mips-*-ecoff*) obj_format=ecoff | |
610 | case "$endian" in | |
611 | big) gas_target=mips-big ;; | |
612 | *) gas_target=mips-lit ;; | |
613 | esac | |
614 | ;; | |
615 | mips-*-ecoff*) obj_format=ecoff gas_target=mips-big ;; | |
616 | mips-*-irix5*) obj_format=elf gas_target=mips-big ;; | |
617 | mips-*-irix*) obj_format=ecoff gas_target=mips-big ;; | |
618 | mips-*-riscos*) obj_format=ecoff gas_target=mips-big ;; | |
619 | mips-*-sysv*) obj_format=ecoff gas_target=mips-big ;; | |
620 | mips-*-elf*) obj_format=elf | |
621 | case "$endian" in | |
622 | big) gas_target=mips-big ;; | |
623 | *) gas_target=mips-lit ;; | |
624 | esac | |
625 | ;; | |
626 | ppc-*-aix*) obj_format=coff bfd_gas=yes ;; | |
627 | ppc-*-elf*) obj_format=elf bfd_gas=yes ;; | |
628 | ppc-*-netware*) obj_format=elf emulation=ppcnw ;; | |
629 | ppc-*-sysv4*) obj_format=elf bfd_gas=yes ;; | |
630 | ||
631 | sh-*-coff) obj_format=coff ;; | |
632 | ||
633 | ns32k-pc532-mach*) obj_format=aout emulation=pc532 bfd_gas=yes ;; | |
634 | ns32k-pc532-netbsd*) obj_format=aout emulation=netbsd532 bfd_gas=yes ;; | |
635 | ||
636 | sparc*-*-sunos4*) obj_format=aout emulation=sun3 bfd_gas=yes ;; | |
637 | sparc*-*-aout | sparc*-*-vxworks) | |
638 | obj_format=aout bfd_gas=yes ;; | |
639 | sparc*-*-coff) obj_format=coff bfd_gas=yes ;; | |
640 | sparc*-*-lynxos*) obj_format=coff bfd_gas=yes emulation=lynx ;; | |
641 | sparc*-fujitsu-none) obj_format=aout bfd_gas=yes ;; | |
642 | sparc*-*-elf | sparc*-*-solaris*) | |
643 | obj_format=elf ;; | |
644 | ||
645 | vax-*-bsd* | vax-*-ultrix*) | |
646 | obj_format=aout ;; | |
647 | vax-*-vms) obj_format=vms ;; | |
648 | ||
649 | z8k-*-coff | z8k-*-sim) | |
650 | obj_format=coff ;; | |
651 | ||
652 | *-*-aout | *-*-scout) | |
653 | obj_format=aout ;; | |
654 | *-*-nindy*) | |
655 | obj_format=bout ;; | |
656 | *-*-bsd*) | |
657 | obj_format=aout emulation=sun3 ;; | |
658 | *-*-generic) obj_format=generic ;; | |
659 | *-*-xray | *-*-hms) obj_format=coff ;; | |
660 | *-*-sim) obj_format=coff ;; | |
661 | *-*-elf | *-*-sysv4* | *-*-solaris*) | |
662 | echo "configure: warning: GAS support for ELF format is incomplete" 1>&2 | |
663 | obj_format=elf dev=yes ;; | |
664 | *-*-vxworks) obj_format=aout ;; | |
665 | *-*-netware) obj_format=elf ;; | |
666 | esac | |
667 | ||
668 | # Assign floating point type. Most processors with FP support | |
669 | # IEEE FP. On those that don't support FP at all, usually IEEE | |
670 | # is emulated. | |
671 | case ${target_cpu} in | |
672 | vax | tahoe ) atof=${target_cpu} ;; | |
673 | *) atof=ieee ;; | |
674 | esac | |
675 | ||
676 | case "${obj_format}" in | |
677 | "") { echo "configure: GAS does not know what format to use for target ${target}" 1>&2; exit 1; } ;; | |
678 | esac | |
679 | ||
680 | ||
681 | ||
682 | if [ ! -r ${srcdir}/config/tc-${cpu_type}.c ]; then | |
683 | { echo "configure: GAS does not support target CPU ${cpu_type}" 1>&2; exit 1; } | |
684 | fi | |
685 | ||
686 | if [ ! -r ${srcdir}/config/obj-${obj_format}.c ]; then | |
687 | { echo "configure: GAS does not have support for object file format ${obj_format}" 1>&2; exit 1; } | |
688 | fi | |
689 | ||
690 | ||
691 | # and target makefile frag | |
692 | ||
693 | target_frag=${srcdir}/config/${gas_target}.mt | |
694 | ||
695 | ||
696 | case ${bfd_gas}-${obj_format} in | |
697 | yes-coff) need_bfd=yes ;; | |
698 | no-coff) need_bfd=yes | |
699 | cat >> confdefs.h <<\EOF | |
700 | #define MANY_SEGMENTS 1 | |
701 | EOF | |
702 | ;; | |
703 | *-elf) bfd_gas=yes ;; | |
704 | *-ecoff) bfd_gas=yes ;; | |
705 | *-som) bfd_gas=yes ;; | |
706 | *) ;; | |
707 | esac | |
708 | ||
709 | case ${with_bfd_assembler}-${bfd_gas} in | |
710 | yes-yes | no-no) | |
711 | # We didn't override user's choice. | |
712 | ;; | |
713 | no-yes) | |
714 | echo "configure: warning: Use of BFD is required for ${target}; overriding config options." 1>&2 | |
715 | ;; | |
716 | no-preferred) | |
717 | bfd_gas=no | |
718 | ;; | |
719 | *-preferred) | |
720 | bfd_gas=yes | |
721 | ;; | |
722 | -*) | |
723 | # User specified nothing. | |
724 | ;; | |
725 | esac | |
726 | ||
727 | reject_dev_configs=yes | |
728 | ||
729 | case ${reject_dev_configs}-${dev} in | |
730 | yes-yes) # Oops. | |
731 | { echo "configure: GAS does not support the ${generic_target} configuration." 1>&2; exit 1; } | |
732 | ;; | |
733 | esac | |
734 | ||
735 | ||
736 | ||
737 | ||
738 | case "${bfd_gas}" in | |
739 | yes) cat >> confdefs.h <<\EOF | |
740 | #define BFD_ASSEMBLER 1 | |
741 | EOF | |
742 | ||
743 | need_bfd=yes ;; | |
744 | esac | |
745 | ||
746 | case "${need_bfd}" in | |
747 | yes) BFDLIB=../bfd/libbfd.a | |
748 | ALL_OBJ_DEPS="$ALL_OBJ_DEPS ../bfd/bfd.h" | |
749 | ;; | |
750 | esac | |
751 | ||
752 | ||
753 | ||
754 | case "x${host_canon}" in | |
755 | x${target_canon}) ;; | |
756 | *) cat >> confdefs.h <<\EOF | |
757 | #define CROSS_COMPILE 1 | |
758 | EOF | |
759 | ;; | |
760 | esac | |
761 | ||
762 | cat >> confdefs.h <<EOF | |
763 | #define TARGET_ALIAS "${target_alias}" | |
764 | EOF | |
765 | ||
766 | cat >> confdefs.h <<EOF | |
767 | #define TARGET_CANONICAL "${target}" | |
768 | EOF | |
769 | ||
770 | cat >> confdefs.h <<EOF | |
771 | #define TARGET_CPU "${target_cpu}" | |
772 | EOF | |
773 | ||
774 | cat >> confdefs.h <<EOF | |
775 | #define TARGET_VENDOR "${target_vendor}" | |
776 | EOF | |
777 | ||
778 | cat >> confdefs.h <<EOF | |
779 | #define TARGET_OS "${target_os}" | |
780 | EOF | |
781 | ||
782 | ||
783 | case ${host} in | |
784 | rs6000-*-*) | |
785 | # The IBM compiler mis-compiles some expressions used in gas. | |
786 | # This will tell gas to work around this lossage. | |
787 | cat >> confdefs.h <<\EOF | |
788 | #define IBM_COMPILER_SUX 1 | |
789 | EOF | |
790 | ;; | |
791 | i386-*-go32) | |
792 | # Using fopen(..., "w") for a binary file breaks under DOS. | |
793 | cat >> confdefs.h <<\EOF | |
794 | #define WANT_FOPEN_BIN 1 | |
795 | EOF | |
796 | ;; | |
797 | esac | |
798 | ||
799 | echo $ac_n "checking for CC""... $ac_c" 1>&4 | |
800 | test -z "$CC" && CC=`egrep '^CC *=' ../Makefile | tail -1 | sed 's/^CC *= *//'` | |
801 | test -z "$CC" && CC=cc | |
802 | echo "$ac_t""setting CC to $CC" 1>&4 | |
803 | ||
804 | # Find out if we are using GNU C, under whatever name. | |
805 | cat > conftest.c <<EOF | |
806 | #ifdef __GNUC__ | |
807 | yes | |
808 | #endif | |
809 | EOF | |
810 | ${CC-cc} -E conftest.c > conftest.out 2>&1 | |
811 | if egrep yes conftest.out >/dev/null 2>&1; then | |
812 | GCC=yes | |
813 | else | |
814 | GCC= | |
815 | fi | |
816 | rm -f conftest* | |
817 | ||
818 | # Make sure to not get an incompatible install: | |
819 | # SysV /etc/install, /usr/sbin/install | |
820 | # SunOS /usr/etc/install | |
821 | # IRIX /sbin/install | |
822 | # AIX /bin/install | |
823 | # AFS /usr/afsws/bin/install, which mishandles nonexistent args | |
824 | # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" | |
825 | # ./install, which can be erroneously created by make from ./install.sh. | |
826 | echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&4 | |
827 | if test -z "${INSTALL}"; then | |
828 | if eval "test \"`echo '${'ac_cv_path_install'+set}'`\" = set"; then | |
829 | echo $ac_n "(cached) $ac_c" 1>&4 | |
830 | else | |
831 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
832 | for ac_dir in $PATH; do | |
833 | case "$ac_dir" in | |
834 | ''|.|/etc|/usr/sbin|/usr/etc|/sbin|/usr/afsws/bin|/usr/ucb) ;; | |
835 | *) | |
836 | # OSF1 and SCO ODT 3.0 have their own names for install. | |
837 | for ac_prog in ginstall installbsd scoinst install; do | |
838 | if test -f $ac_dir/$ac_prog; then | |
839 | if test $ac_prog = install && | |
840 | grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then | |
841 | # AIX install. It has an incompatible calling convention. | |
842 | # OSF/1 installbsd also uses dspmsg, but is usable. | |
843 | : | |
844 | else | |
845 | ac_cv_path_install="$ac_dir/$ac_prog -c" | |
846 | break 2 | |
847 | fi | |
848 | fi | |
849 | done | |
850 | ;; | |
851 | esac | |
852 | done | |
853 | IFS="$ac_save_ifs" | |
854 | # As a last resort, use the slow shell script. | |
855 | test -z "$ac_cv_path_install" && ac_cv_path_install="$ac_install_sh" | |
856 | fi | |
857 | INSTALL="$ac_cv_path_install" | |
858 | fi | |
859 | echo "$ac_t""$INSTALL" 1>&4 | |
860 | ||
861 | # Use test -z because SunOS4 sh mishandles braces in ${var-val}. | |
862 | # It thinks the first close brace ends the variable substitution. | |
863 | test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' | |
864 | ||
865 | test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' | |
866 | ||
867 | ||
868 | echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&4 | |
869 | # On Suns, sometimes $CPP names a directory. | |
870 | if test -n "$CPP" && test -d "$CPP"; then | |
871 | CPP= | |
872 | fi | |
873 | if test -z "$CPP"; then | |
874 | if eval "test \"`echo '${'ac_cv_prog_CPP'+set}'`\" = set"; then | |
875 | echo $ac_n "(cached) $ac_c" 1>&4 | |
876 | else | |
877 | # This must be in double quotes, not single quotes, because CPP may get | |
878 | # substituted into the Makefile and "${CC-cc}" will confuse make. | |
879 | CPP="${CC-cc} -E" | |
880 | # On the NeXT, cc -E runs the code through the compiler's parser, | |
881 | # not just through cpp. | |
882 | cat > conftest.${ac_ext} <<EOF | |
883 | #line 884 "configure" | |
884 | #include "confdefs.h" | |
885 | #include <stdio.h> | |
886 | Syntax Error | |
887 | EOF | |
888 | # Some shells (Coherent) do redirections in the wrong order, so need | |
889 | # the parens. | |
890 | ac_err=`eval "($ac_cpp conftest.${ac_ext} >/dev/null) 2>&1"` | |
891 | if test -z "$ac_err"; then | |
892 | : | |
893 | else | |
894 | rm -rf conftest* | |
895 | CPP="${CC-cc} -E -traditional-cpp" | |
896 | cat > conftest.${ac_ext} <<EOF | |
897 | #line 898 "configure" | |
898 | #include "confdefs.h" | |
899 | #include <stdio.h> | |
900 | Syntax Error | |
901 | EOF | |
902 | # Some shells (Coherent) do redirections in the wrong order, so need | |
903 | # the parens. | |
904 | ac_err=`eval "($ac_cpp conftest.${ac_ext} >/dev/null) 2>&1"` | |
905 | if test -z "$ac_err"; then | |
906 | : | |
907 | else | |
908 | rm -rf conftest* | |
909 | CPP=/lib/cpp | |
910 | fi | |
911 | rm -f conftest* | |
912 | fi | |
913 | rm -f conftest* | |
914 | ac_cv_prog_CPP="$CPP" | |
915 | fi | |
916 | fi | |
917 | CPP="$ac_cv_prog_CPP" | |
918 | echo "$ac_t""$CPP" 1>&4 | |
919 | echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&4 | |
920 | if eval "test \"`echo '${'ac_cv_header_stdc'+set}'`\" = set"; then | |
921 | echo $ac_n "(cached) $ac_c" 1>&4 | |
922 | else | |
923 | cat > conftest.${ac_ext} <<EOF | |
924 | #line 925 "configure" | |
925 | #include "confdefs.h" | |
926 | #include <stdlib.h> | |
927 | #include <stdarg.h> | |
928 | #include <string.h> | |
929 | #include <float.h> | |
930 | EOF | |
931 | # Some shells (Coherent) do redirections in the wrong order, so need | |
932 | # the parens. | |
933 | ac_err=`eval "($ac_cpp conftest.${ac_ext} >/dev/null) 2>&1"` | |
934 | if test -z "$ac_err"; then | |
935 | rm -rf conftest* | |
936 | ac_cv_header_stdc=yes | |
937 | else | |
938 | rm -rf conftest* | |
939 | ac_cv_header_stdc=no | |
940 | fi | |
941 | rm -f conftest* | |
942 | ||
943 | if test $ac_cv_header_stdc = yes; then | |
944 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. | |
945 | cat > conftest.${ac_ext} <<EOF | |
946 | #line 947 "configure" | |
947 | #include "confdefs.h" | |
948 | #include <string.h> | |
949 | EOF | |
950 | eval "$ac_cpp conftest.${ac_ext} > conftest.out 2>&1" | |
951 | if egrep "memchr" conftest.out >/dev/null 2>&1; then | |
952 | : | |
953 | else | |
954 | rm -rf conftest* | |
955 | ac_cv_header_stdc=no | |
956 | fi | |
957 | rm -f conftest* | |
958 | ||
959 | fi | |
960 | ||
961 | if test $ac_cv_header_stdc = yes; then | |
962 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. | |
963 | cat > conftest.${ac_ext} <<EOF | |
964 | #line 965 "configure" | |
965 | #include "confdefs.h" | |
966 | #include <stdlib.h> | |
967 | EOF | |
968 | eval "$ac_cpp conftest.${ac_ext} > conftest.out 2>&1" | |
969 | if egrep "free" conftest.out >/dev/null 2>&1; then | |
970 | : | |
971 | else | |
972 | rm -rf conftest* | |
973 | ac_cv_header_stdc=no | |
974 | fi | |
975 | rm -f conftest* | |
976 | ||
977 | fi | |
978 | ||
979 | if test $ac_cv_header_stdc = yes; then | |
980 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. | |
981 | # If we cannot run a trivial program, we must be cross compiling. | |
982 | echo $ac_n "checking whether cross-compiling""... $ac_c" 1>&4 | |
983 | if eval "test \"`echo '${'ac_cv_c_cross'+set}'`\" = set"; then | |
984 | echo $ac_n "(cached) $ac_c" 1>&4 | |
985 | else | |
986 | if test "$cross_compiling" = yes; then | |
987 | { echo "configure: can not run test program while cross compiling" 1>&2; exit 1; } | |
988 | else | |
989 | cat > conftest.${ac_ext} <<EOF | |
990 | #line 991 "configure" | |
991 | #include "confdefs.h" | |
992 | main(){exit(0);} | |
993 | EOF | |
994 | eval $ac_compile | |
995 | if test -s conftest && (./conftest; exit) 2>/dev/null; then | |
996 | ac_cv_c_cross=no | |
997 | else | |
998 | ac_cv_c_cross=yes | |
999 | fi | |
1000 | fi | |
1001 | rm -fr conftest* | |
1002 | fi | |
1003 | cross_compiling=$ac_cv_c_cross | |
1004 | echo "$ac_t""$ac_cv_c_cross" 1>&4 | |
1005 | if test "$cross_compiling" = yes; then | |
1006 | { echo "configure: can not run test program while cross compiling" 1>&2; exit 1; } | |
1007 | else | |
1008 | cat > conftest.${ac_ext} <<EOF | |
1009 | #line 1010 "configure" | |
1010 | #include "confdefs.h" | |
1011 | #include <ctype.h> | |
1012 | #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') | |
1013 | #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) | |
1014 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) | |
1015 | int main () { int i; for (i = 0; i < 256; i++) | |
1016 | if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); | |
1017 | exit (0); } | |
1018 | ||
1019 | EOF | |
1020 | eval $ac_compile | |
1021 | if test -s conftest && (./conftest; exit) 2>/dev/null; then | |
1022 | : | |
1023 | else | |
1024 | ac_stdc_headers=no | |
1025 | fi | |
1026 | fi | |
1027 | rm -fr conftest* | |
1028 | fi | |
1029 | fi | |
1030 | echo "$ac_t""$ac_cv_header_stdc" 1>&4 | |
1031 | if test $ac_cv_header_stdc = yes; then | |
1032 | cat >> confdefs.h <<\EOF | |
1033 | #define STDC_HEADERS 1 | |
1034 | EOF | |
1035 | ||
1036 | fi | |
1037 | ||
1038 | for ac_hdr in string.h stdlib.h memory.h strings.h unistd.h stdarg.h varargs.h errno.h sys/types.h | |
1039 | do | |
1040 | ac_safe=`echo "${ac_hdr}" | tr './' '__'` | |
1041 | echo $ac_n "checking for ${ac_hdr}""... $ac_c" 1>&4 | |
1042 | if eval "test \"`echo '${'ac_cv_header_$ac_safe'+set}'`\" = set"; then | |
1043 | echo $ac_n "(cached) $ac_c" 1>&4 | |
1044 | else | |
1045 | cat > conftest.${ac_ext} <<EOF | |
1046 | #line 1047 "configure" | |
1047 | #include "confdefs.h" | |
1048 | #include <${ac_hdr}> | |
1049 | EOF | |
1050 | # Some shells (Coherent) do redirections in the wrong order, so need | |
1051 | # the parens. | |
1052 | ac_err=`eval "($ac_cpp conftest.${ac_ext} >/dev/null) 2>&1"` | |
1053 | if test -z "$ac_err"; then | |
1054 | rm -rf conftest* | |
1055 | eval "ac_cv_header_$ac_safe=yes" | |
1056 | else | |
1057 | rm -rf conftest* | |
1058 | eval "ac_cv_header_$ac_safe=no" | |
1059 | fi | |
1060 | rm -f conftest* | |
1061 | fi | |
1062 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
1063 | echo "$ac_t""yes" 1>&4 | |
1064 | ac_tr_hdr=HAVE_`echo $ac_hdr | tr '[a-z]./' '[A-Z]__'` | |
1065 | cat >> confdefs.h <<EOF | |
1066 | #define ${ac_tr_hdr} 1 | |
1067 | EOF | |
1068 | ||
1069 | else | |
1070 | echo "$ac_t""no" 1>&4 | |
1071 | fi | |
1072 | done | |
1073 | ||
1074 | ||
1075 | # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works | |
1076 | # for constant arguments. Useless! | |
1077 | echo $ac_n "checking for working alloca.h""... $ac_c" 1>&4 | |
1078 | if eval "test \"`echo '${'ac_cv_header_alloca_h'+set}'`\" = set"; then | |
1079 | echo $ac_n "(cached) $ac_c" 1>&4 | |
1080 | else | |
1081 | cat > conftest.${ac_ext} <<EOF | |
1082 | #line 1083 "configure" | |
1083 | #include "confdefs.h" | |
1084 | #include <alloca.h> | |
1085 | int main() { return 0; } | |
1086 | int t() { | |
1087 | char *p = alloca(2 * sizeof(int)); | |
1088 | ; return 0; } | |
1089 | EOF | |
1090 | if eval $ac_compile; then | |
1091 | rm -rf conftest* | |
1092 | ac_cv_header_alloca_h=yes | |
1093 | else | |
1094 | rm -rf conftest* | |
1095 | ac_cv_header_alloca_h=no | |
1096 | fi | |
1097 | rm -f conftest* | |
1098 | ||
1099 | fi | |
1100 | echo "$ac_t""$ac_cv_header_alloca_h" 1>&4 | |
1101 | if test $ac_cv_header_alloca_h = yes; then | |
1102 | cat >> confdefs.h <<\EOF | |
1103 | #define HAVE_ALLOCA_H 1 | |
1104 | EOF | |
1105 | ||
1106 | fi | |
1107 | ||
1108 | echo $ac_n "checking for alloca""... $ac_c" 1>&4 | |
1109 | if eval "test \"`echo '${'ac_cv_func_alloca'+set}'`\" = set"; then | |
1110 | echo $ac_n "(cached) $ac_c" 1>&4 | |
1111 | else | |
1112 | cat > conftest.${ac_ext} <<EOF | |
1113 | #line 1114 "configure" | |
1114 | #include "confdefs.h" | |
1115 | ||
1116 | #ifdef __GNUC__ | |
1117 | # define alloca __builtin_alloca | |
1118 | #else | |
1119 | # if HAVE_ALLOCA_H | |
1120 | # include <alloca.h> | |
1121 | # else | |
1122 | # ifdef _AIX | |
1123 | #pragma alloca | |
1124 | # else | |
1125 | # ifndef alloca /* predefined by HP cc +Olibcalls */ | |
1126 | char *alloca (); | |
1127 | # endif | |
1128 | # endif | |
1129 | # endif | |
1130 | #endif | |
1131 | ||
1132 | int main() { return 0; } | |
1133 | int t() { | |
1134 | char *p = (char *) alloca(1); | |
1135 | ; return 0; } | |
1136 | EOF | |
1137 | if eval $ac_compile; then | |
1138 | rm -rf conftest* | |
1139 | ac_cv_func_alloca=yes | |
1140 | else | |
1141 | rm -rf conftest* | |
1142 | ac_cv_func_alloca=no | |
1143 | fi | |
1144 | rm -f conftest* | |
1145 | ||
1146 | fi | |
1147 | echo "$ac_t""$ac_cv_func_alloca" 1>&4 | |
1148 | if test $ac_cv_func_alloca = yes; then | |
1149 | cat >> confdefs.h <<\EOF | |
1150 | #define HAVE_ALLOCA 1 | |
1151 | EOF | |
1152 | ||
1153 | fi | |
1154 | ||
1155 | if test $ac_cv_func_alloca = no; then | |
1156 | # The SVR3 libPW and SVR4 libucb both contain incompatible functions | |
1157 | # that cause trouble. Some versions do not even contain alloca or | |
1158 | # contain a buggy version. If you still want to use their alloca, | |
1159 | # use ar to extract alloca.o from them instead of compiling alloca.c. | |
1160 | ALLOCA=alloca.o | |
1161 | cat >> confdefs.h <<\EOF | |
1162 | #define C_ALLOCA 1 | |
1163 | EOF | |
1164 | ||
1165 | ||
1166 | echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&4 | |
1167 | if eval "test \"`echo '${'ac_cv_os_cray'+set}'`\" = set"; then | |
1168 | echo $ac_n "(cached) $ac_c" 1>&4 | |
1169 | else | |
1170 | cat > conftest.${ac_ext} <<EOF | |
1171 | #line 1172 "configure" | |
1172 | #include "confdefs.h" | |
1173 | #if defined(CRAY) && ! defined(CRAY2) | |
1174 | webecray | |
1175 | #else | |
1176 | wenotbecray | |
1177 | #endif | |
1178 | ||
1179 | EOF | |
1180 | eval "$ac_cpp conftest.${ac_ext} > conftest.out 2>&1" | |
1181 | if egrep "webecray" conftest.out >/dev/null 2>&1; then | |
1182 | rm -rf conftest* | |
1183 | ac_cv_os_cray=yes | |
1184 | else | |
1185 | rm -rf conftest* | |
1186 | ac_cv_os_cray=no | |
1187 | fi | |
1188 | rm -f conftest* | |
1189 | ||
1190 | fi | |
1191 | echo "$ac_t""$ac_cv_os_cray" 1>&4 | |
1192 | if test $ac_cv_os_cray = yes; then | |
1193 | echo $ac_n "checking for _getb67""... $ac_c" 1>&4 | |
1194 | if eval "test \"`echo '${'ac_cv_func__getb67'+set}'`\" = set"; then | |
1195 | echo $ac_n "(cached) $ac_c" 1>&4 | |
1196 | else | |
1197 | cat > conftest.${ac_ext} <<EOF | |
1198 | #line 1199 "configure" | |
1199 | #include "confdefs.h" | |
1200 | #include <ctype.h> /* Arbitrary system header to define __stub macros. */ | |
1201 | int main() { return 0; } | |
1202 | int t() { | |
1203 | ||
1204 | /* The GNU C library defines this for functions which it implements | |
1205 | to always fail with ENOSYS. Some functions are actually named | |
1206 | something starting with __ and the normal name is an alias. */ | |
1207 | #if defined (__stub__getb67) || defined (__stub____getb67) | |
1208 | choke me | |
1209 | #else | |
1210 | /* Override any gcc2 internal prototype to avoid an error. */ | |
1211 | char _getb67(); _getb67(); | |
1212 | #endif | |
1213 | ||
1214 | ; return 0; } | |
1215 | EOF | |
1216 | if eval $ac_compile; then | |
1217 | rm -rf conftest* | |
1218 | eval "ac_cv_func__getb67=yes" | |
1219 | else | |
1220 | rm -rf conftest* | |
1221 | eval "ac_cv_func__getb67=no" | |
1222 | fi | |
1223 | rm -f conftest* | |
1224 | ||
1225 | fi | |
1226 | if eval "test \"`echo '$ac_cv_func_'_getb67`\" = yes"; then | |
1227 | echo "$ac_t""yes" 1>&4 | |
1228 | cat >> confdefs.h <<\EOF | |
1229 | #define CRAY_STACKSEG_END _getb67 | |
1230 | EOF | |
1231 | ||
1232 | else | |
1233 | echo "$ac_t""no" 1>&4 | |
1234 | echo $ac_n "checking for GETB67""... $ac_c" 1>&4 | |
1235 | if eval "test \"`echo '${'ac_cv_func_GETB67'+set}'`\" = set"; then | |
1236 | echo $ac_n "(cached) $ac_c" 1>&4 | |
1237 | else | |
1238 | cat > conftest.${ac_ext} <<EOF | |
1239 | #line 1240 "configure" | |
1240 | #include "confdefs.h" | |
1241 | #include <ctype.h> /* Arbitrary system header to define __stub macros. */ | |
1242 | int main() { return 0; } | |
1243 | int t() { | |
1244 | ||
1245 | /* The GNU C library defines this for functions which it implements | |
1246 | to always fail with ENOSYS. Some functions are actually named | |
1247 | something starting with __ and the normal name is an alias. */ | |
1248 | #if defined (__stub_GETB67) || defined (__stub___GETB67) | |
1249 | choke me | |
1250 | #else | |
1251 | /* Override any gcc2 internal prototype to avoid an error. */ | |
1252 | char GETB67(); GETB67(); | |
1253 | #endif | |
1254 | ||
1255 | ; return 0; } | |
1256 | EOF | |
1257 | if eval $ac_compile; then | |
1258 | rm -rf conftest* | |
1259 | eval "ac_cv_func_GETB67=yes" | |
1260 | else | |
1261 | rm -rf conftest* | |
1262 | eval "ac_cv_func_GETB67=no" | |
1263 | fi | |
1264 | rm -f conftest* | |
1265 | ||
1266 | fi | |
1267 | if eval "test \"`echo '$ac_cv_func_'GETB67`\" = yes"; then | |
1268 | echo "$ac_t""yes" 1>&4 | |
1269 | cat >> confdefs.h <<\EOF | |
1270 | #define CRAY_STACKSEG_END GETB67 | |
1271 | EOF | |
1272 | ||
1273 | else | |
1274 | echo "$ac_t""no" 1>&4 | |
1275 | echo $ac_n "checking for getb67""... $ac_c" 1>&4 | |
1276 | if eval "test \"`echo '${'ac_cv_func_getb67'+set}'`\" = set"; then | |
1277 | echo $ac_n "(cached) $ac_c" 1>&4 | |
1278 | else | |
1279 | cat > conftest.${ac_ext} <<EOF | |
1280 | #line 1281 "configure" | |
1281 | #include "confdefs.h" | |
1282 | #include <ctype.h> /* Arbitrary system header to define __stub macros. */ | |
1283 | int main() { return 0; } | |
1284 | int t() { | |
1285 | ||
1286 | /* The GNU C library defines this for functions which it implements | |
1287 | to always fail with ENOSYS. Some functions are actually named | |
1288 | something starting with __ and the normal name is an alias. */ | |
1289 | #if defined (__stub_getb67) || defined (__stub___getb67) | |
1290 | choke me | |
1291 | #else | |
1292 | /* Override any gcc2 internal prototype to avoid an error. */ | |
1293 | char getb67(); getb67(); | |
1294 | #endif | |
1295 | ||
1296 | ; return 0; } | |
1297 | EOF | |
1298 | if eval $ac_compile; then | |
1299 | rm -rf conftest* | |
1300 | eval "ac_cv_func_getb67=yes" | |
1301 | else | |
1302 | rm -rf conftest* | |
1303 | eval "ac_cv_func_getb67=no" | |
1304 | fi | |
1305 | rm -f conftest* | |
1306 | ||
1307 | fi | |
1308 | if eval "test \"`echo '$ac_cv_func_'getb67`\" = yes"; then | |
1309 | echo "$ac_t""yes" 1>&4 | |
1310 | cat >> confdefs.h <<\EOF | |
1311 | #define CRAY_STACKSEG_END getb67 | |
1312 | EOF | |
1313 | ||
1314 | else | |
1315 | echo "$ac_t""no" 1>&4 | |
1316 | fi | |
1317 | ||
1318 | fi | |
1319 | ||
1320 | fi | |
1321 | ||
1322 | fi | |
1323 | ||
1324 | echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&4 | |
1325 | if eval "test \"`echo '${'ac_cv_c_stack_direction'+set}'`\" = set"; then | |
1326 | echo $ac_n "(cached) $ac_c" 1>&4 | |
1327 | else | |
1328 | if test "$cross_compiling" = yes; then | |
1329 | echo "configure: warning: using default for cross-compiling" 1>&2 | |
1330 | ac_cv_c_stack_direction=0 | |
1331 | ||
1332 | else | |
1333 | cat > conftest.${ac_ext} <<EOF | |
1334 | #line 1335 "configure" | |
1335 | #include "confdefs.h" | |
1336 | find_stack_direction () | |
1337 | { | |
1338 | static char *addr = 0; | |
1339 | auto char dummy; | |
1340 | if (addr == 0) | |
1341 | { | |
1342 | addr = &dummy; | |
1343 | return find_stack_direction (); | |
1344 | } | |
1345 | else | |
1346 | return (&dummy > addr) ? 1 : -1; | |
1347 | } | |
1348 | main () | |
1349 | { | |
1350 | exit (find_stack_direction() < 0); | |
1351 | } | |
1352 | EOF | |
1353 | eval $ac_compile | |
1354 | if test -s conftest && (./conftest; exit) 2>/dev/null; then | |
1355 | ac_cv_c_stack_direction=1 | |
1356 | else | |
1357 | ac_cv_c_stack_direction=-1 | |
1358 | fi | |
1359 | fi | |
1360 | rm -fr conftest* | |
1361 | fi | |
1362 | echo "$ac_t""$ac_cv_c_stack_direction" 1>&4 | |
1363 | cat >> confdefs.h <<EOF | |
1364 | #define STACK_DIRECTION $ac_cv_c_stack_direction | |
1365 | EOF | |
1366 | ||
1367 | fi | |
1368 | ||
1369 | echo $ac_n "checking for inline""... $ac_c" 1>&4 | |
1370 | if eval "test \"`echo '${'ac_cv_c_inline'+set}'`\" = set"; then | |
1371 | echo $ac_n "(cached) $ac_c" 1>&4 | |
1372 | else | |
1373 | if test "$GCC" = yes; then | |
1374 | cat > conftest.${ac_ext} <<EOF | |
1375 | #line 1376 "configure" | |
1376 | #include "confdefs.h" | |
1377 | ||
1378 | int main() { return 0; } | |
1379 | int t() { | |
1380 | } inline foo() { | |
1381 | ; return 0; } | |
1382 | EOF | |
1383 | if eval $ac_compile; then | |
1384 | rm -rf conftest* | |
1385 | ac_cv_c_inline=yes | |
1386 | else | |
1387 | rm -rf conftest* | |
1388 | ac_cv_c_inline=no | |
1389 | fi | |
1390 | rm -f conftest* | |
1391 | ||
1392 | else | |
1393 | ac_cv_c_inline=no | |
1394 | fi | |
1395 | fi | |
1396 | echo "$ac_t""$ac_cv_c_inline" 1>&4 | |
1397 | if test $ac_cv_c_inline = no; then | |
1398 | cat >> confdefs.h <<\EOF | |
1399 | #define inline __inline | |
1400 | EOF | |
1401 | ||
1402 | fi | |
1403 | ||
1404 | ||
1405 | # Some non-ANSI preprocessors botch requoting inside strings. That's bad | |
1406 | # enough, but on some of those systems, the assert macro relies on requoting | |
1407 | # working properly! | |
1408 | echo "checking for working assert macro" 1>&4 | |
1409 | cat > conftest.${ac_ext} <<EOF | |
1410 | #line 1411 "configure" | |
1411 | #include "confdefs.h" | |
1412 | #include <assert.h> | |
1413 | #include <stdio.h> | |
1414 | int main() { return 0; } | |
1415 | int t() { | |
1416 | ||
1417 | /* check for requoting problems */ | |
1418 | static int a, b, c, d; | |
1419 | static char *s; | |
1420 | assert (!strcmp(s, "foo bar baz quux")); | |
1421 | /* check for newline handling */ | |
1422 | assert (a == b | |
1423 | || c == d); | |
1424 | ||
1425 | ; return 0; } | |
1426 | EOF | |
1427 | if eval $ac_compile; then | |
1428 | : | |
1429 | else | |
1430 | rm -rf conftest* | |
1431 | cat >> confdefs.h <<\EOF | |
1432 | #define BROKEN_ASSERT 1 | |
1433 | EOF | |
1434 | ||
1435 | fi | |
1436 | rm -f conftest* | |
1437 | ||
1438 | ||
1439 | # On some systems, the system header files may not declare malloc, realloc, | |
1440 | # and free. There are places where gas needs these functions to have been | |
1441 | # declared -- such as when taking their addresses. | |
1442 | echo "checking whether malloc declaration is required" 1>&4 | |
1443 | cat > conftest.${ac_ext} <<EOF | |
1444 | #line 1445 "configure" | |
1445 | #include "confdefs.h" | |
1446 | ||
1447 | #ifdef HAVE_MEMORY_H | |
1448 | #include <memory.h> | |
1449 | #endif | |
1450 | #ifdef HAVE_STRING_H | |
1451 | #include <string.h> | |
1452 | #endif | |
1453 | #ifdef HAVE_STDLIB_H | |
1454 | #include <stdlib.h> | |
1455 | #endif | |
1456 | #ifdef HAVE_UNISTD_H | |
1457 | #include <unistd.h> | |
1458 | #endif | |
1459 | ||
1460 | int main() { return 0; } | |
1461 | int t() { | |
1462 | ||
1463 | char *(*f) (); | |
1464 | f = (char *(*)()) malloc; | |
1465 | ||
1466 | ; return 0; } | |
1467 | EOF | |
1468 | if eval $ac_compile; then | |
1469 | : | |
1470 | else | |
1471 | rm -rf conftest* | |
1472 | cat >> confdefs.h <<\EOF | |
1473 | #define NEED_MALLOC_DECLARATION 1 | |
1474 | EOF | |
1475 | ||
1476 | fi | |
1477 | rm -f conftest* | |
1478 | ||
1479 | echo "checking free declaration required" 1>&4 | |
1480 | cat > conftest.${ac_ext} <<EOF | |
1481 | #line 1482 "configure" | |
1482 | #include "confdefs.h" | |
1483 | ||
1484 | #ifdef HAVE_MEMORY_H | |
1485 | #include <memory.h> | |
1486 | #endif | |
1487 | #ifdef HAVE_STRING_H | |
1488 | #include <string.h> | |
1489 | #endif | |
1490 | #ifdef HAVE_STDLIB_H | |
1491 | #include <stdlib.h> | |
1492 | #endif | |
1493 | #ifdef HAVE_UNISTD_H | |
1494 | #include <unistd.h> | |
1495 | #endif | |
1496 | ||
1497 | int main() { return 0; } | |
1498 | int t() { | |
1499 | ||
1500 | int (*f) (); | |
1501 | f = (int (*)()) free; | |
1502 | ||
1503 | ; return 0; } | |
1504 | EOF | |
1505 | if eval $ac_compile; then | |
1506 | : | |
1507 | else | |
1508 | rm -rf conftest* | |
1509 | cat >> confdefs.h <<\EOF | |
1510 | #define NEED_FREE_DECLARATION 1 | |
1511 | EOF | |
1512 | ||
1513 | fi | |
1514 | rm -f conftest* | |
1515 | ||
1516 | ||
1517 | # Does errno.h declare errno, or do we have to add a separate declaration | |
1518 | # for it? | |
1519 | echo "checking errno declaration required" 1>&4 | |
1520 | cat > conftest.${ac_ext} <<EOF | |
1521 | #line 1522 "configure" | |
1522 | #include "confdefs.h" | |
1523 | ||
1524 | #ifdef HAVE_ERRNO_H | |
1525 | #include <errno.h> | |
1526 | #endif | |
1527 | ||
1528 | int main() { return 0; } | |
1529 | int t() { | |
1530 | ||
1531 | int x; | |
1532 | x = errno; | |
1533 | ||
1534 | ; return 0; } | |
1535 | EOF | |
1536 | if eval $ac_compile; then | |
1537 | : | |
1538 | else | |
1539 | rm -rf conftest* | |
1540 | cat >> confdefs.h <<\EOF | |
1541 | #define NEED_ERRNO_DECLARATION 1 | |
1542 | EOF | |
1543 | ||
1544 | fi | |
1545 | rm -f conftest* | |
1546 | ||
1547 | ||
1548 | subdirs="testsuite" | |
1549 | ||
1550 | ||
1551 | if test -w $cache_file; then | |
1552 | echo "updating cache $cache_file" | |
1553 | cat > $cache_file <<\EOF | |
1554 | # This file is a shell script that caches the results of configure | |
1555 | # tests run on this system so they can be shared between configure | |
1556 | # scripts and configure runs. It is not useful on other systems. | |
1557 | # If its contents are invalid for some reason, you may delete or edit it. | |
1558 | # | |
1559 | # By default, configure uses ./config.cache as the cache file, | |
1560 | # creating it if it does not exist already. You can give configure | |
1561 | # the --cache-file=FILE option to use a different cache file; that is | |
1562 | # what configure does when it calls configure scripts in | |
1563 | # subdirectories, so they share the cache. | |
1564 | # Giving --cache-file=/dev/null disables caching, for debugging configure. | |
1565 | # config.status only pays attention to the cache file if you give it the | |
1566 | # --recheck option to rerun configure. | |
1567 | EOF | |
1568 | # Ultrix sh set writes to stderr and can't be redirected directly. | |
1569 | (set) 2>&1 | sed -n "s/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=\${\1-'\2'}/p" >> $cache_file | |
1570 | else | |
1571 | echo "not updating unwritable cache $cache_file" | |
1572 | fi | |
1573 | ||
1574 | ||
1575 | test "x$prefix" = xNONE && prefix=/usr/local | |
1576 | # Let make expand exec_prefix. | |
1577 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
1578 | ||
1579 | # Any assignment to VPATH causes Sun make to only execute | |
1580 | # the first set of double-colon rules, so remove it if not needed. | |
1581 | # If there is a colon in the path, we need to keep it. | |
1582 | if test "x$srcdir" = x.; then | |
1583 | ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d' | |
1584 | fi | |
1585 | ||
1586 | trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15 | |
1587 | ||
1588 | DEFS=-DHAVE_CONFIG_H | |
1589 | ||
1590 | # Without the "./", some shells look in PATH for config.status. | |
1591 | : ${CONFIG_STATUS=./config.status} | |
1592 | ||
1593 | echo creating ${CONFIG_STATUS} | |
1594 | rm -f ${CONFIG_STATUS} | |
1595 | cat > ${CONFIG_STATUS} <<EOF | |
1596 | #!/bin/sh | |
1597 | # Generated automatically by configure. | |
1598 | # Run this file to recreate the current configuration. | |
1599 | # This directory was configured as follows, | |
1600 | # on host `(hostname || uname -n) 2>/dev/null | sed 1q`: | |
1601 | # | |
1602 | # $0 $configure_args | |
1603 | # | |
1604 | # Compiler output produced by configure, useful for debugging | |
1605 | # configure, is in ./config.log if it exists. | |
1606 | ||
1607 | ac_cs_usage="Usage: ${CONFIG_STATUS} [--recheck] [--version] [--help]" | |
1608 | for ac_option | |
1609 | do | |
1610 | case "\$ac_option" in | |
1611 | -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) | |
1612 | echo running \${CONFIG_SHELL-/bin/sh} $0 $configure_args --no-create --norecursion | |
1613 | exec \${CONFIG_SHELL-/bin/sh} $0 $configure_args --no-create --norecursion ;; | |
1614 | -version | --version | --versio | --versi | --vers | --ver | --ve | --v) | |
1615 | echo "${CONFIG_STATUS} generated by autoconf version 1.107" | |
1616 | exit 0 ;; | |
1617 | -help | --help | --hel | --he | --h) | |
1618 | echo "\$ac_cs_usage"; exit 0 ;; | |
1619 | *) echo "\$ac_cs_usage"; exit 1 ;; | |
1620 | esac | |
1621 | done | |
1622 | ||
1623 | ac_given_srcdir=$srcdir | |
1624 | ac_given_INSTALL="$INSTALL" | |
1625 | ||
1626 | trap 'rm -fr doc/Makefile Makefile conf conftest*; exit 1' 1 2 15 | |
1627 | ||
1628 | # Protect against being on the right side of a sed subst in config.status. | |
1629 | sed 's/%@/@@/; s/@%/@@/; s/%g$/@g/; /@g$/s/[\\\\&%]/\\\\&/g; | |
1630 | s/@@/%@/; s/@@/@%/; s/@g$/%g/' > conftest.subs <<\CEOF | |
1631 | $ac_vpsub | |
1632 | $extrasub | |
1633 | s%@LIBS@%$LIBS%g | |
1634 | s%@prefix@%$prefix%g | |
1635 | s%@exec_prefix@%$exec_prefix%g | |
1636 | s%@DEFS@%$DEFS%g | |
1637 | s%@CFLAGS@%$CFLAGS%g | |
1638 | s%@CXXFLAGS@%$CXXFLAGS%g | |
1639 | s%@CPPFLAGS@%$CPPFLAGS%g | |
1640 | s%@LDFLAGS@%$LDFLAGS%g | |
1641 | s%@host@%$host%g | |
1642 | s%@host_alias@%$host_alias%g | |
1643 | s%@host_cpu@%$host_cpu%g | |
1644 | s%@host_vendor@%$host_vendor%g | |
1645 | s%@host_os@%$host_os%g | |
1646 | s%@target@%$target%g | |
1647 | s%@target_alias@%$target_alias%g | |
1648 | s%@target_cpu@%$target_cpu%g | |
1649 | s%@target_vendor@%$target_vendor%g | |
1650 | s%@target_os@%$target_os%g | |
1651 | s%@build@%$build%g | |
1652 | s%@build_alias@%$build_alias%g | |
1653 | s%@build_cpu@%$build_cpu%g | |
1654 | s%@build_vendor@%$build_vendor%g | |
1655 | s%@build_os@%$build_os%g | |
1656 | s%@OPCODES_LIB@%$OPCODES_LIB%g | |
1657 | /@target_frag@/r $target_frag | |
1658 | s%@target_frag@%%g | |
1659 | s%@cpu_type@%$cpu_type%g | |
1660 | s%@obj_format@%$obj_format%g | |
1661 | s%@emulation@%$emulation%g | |
1662 | s%@atof@%$atof%g | |
1663 | s%@BFDLIB@%$BFDLIB%g | |
1664 | s%@ALL_OBJ_DEPS@%$ALL_OBJ_DEPS%g | |
1665 | s%@CC@%$CC%g | |
1666 | s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g | |
1667 | s%@INSTALL_DATA@%$INSTALL_DATA%g | |
1668 | s%@CPP@%$CPP%g | |
1669 | s%@ALLOCA@%$ALLOCA%g | |
1670 | s%@subdirs@%$subdirs%g | |
1671 | ||
1672 | CEOF | |
1673 | EOF | |
1674 | cat >> ${CONFIG_STATUS} <<\EOF | |
1675 | ||
1676 | CONFIG_FILES=${CONFIG_FILES-"doc/Makefile Makefile"} | |
1677 | for ac_file in .. ${CONFIG_FILES}; do if test "x$ac_file" != x..; then | |
1678 | # Support "outfile[:infile]", defaulting infile="outfile.in". | |
1679 | case "$ac_file" in | |
1680 | *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'` | |
1681 | ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; | |
1682 | *) ac_file_in="${ac_file}.in" ;; | |
1683 | esac | |
1684 | ||
1685 | # Adjust relative srcdir, etc. for subdirectories. | |
1686 | ||
1687 | # Remove last slash and all that follows it. Not all systems have dirname. | |
1688 | ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` | |
1689 | if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then | |
1690 | # The file is in a subdirectory. | |
1691 | test ! -d "$ac_dir" && mkdir "$ac_dir" | |
1692 | ac_dir_suffix="/$ac_dir" | |
1693 | # A "../" for each directory in $ac_dir_suffix. | |
1694 | ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'` | |
1695 | else | |
1696 | ac_dir_suffix= ac_dots= | |
1697 | fi | |
1698 | ||
1699 | case "$ac_given_srcdir" in | |
1700 | .) srcdir=. | |
1701 | if test -z "$ac_dots"; then top_srcdir=. | |
1702 | else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;; | |
1703 | /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;; | |
1704 | *) # Relative path. | |
1705 | srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix" | |
1706 | top_srcdir="$ac_dots$ac_given_srcdir" ;; | |
1707 | esac | |
1708 | ||
1709 | case "$ac_given_INSTALL" in | |
1710 | [/$]*) INSTALL="$ac_given_INSTALL" ;; | |
1711 | *) INSTALL="$ac_dots$ac_given_INSTALL" ;; | |
1712 | esac | |
1713 | echo creating "$ac_file" | |
1714 | rm -f "$ac_file" | |
1715 | comment_str="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure." | |
1716 | case "$ac_file" in | |
1717 | *.c | *.h | *.C | *.cc | *.cpp | *.hpp | *.m ) | |
1718 | ac_comsub="1i\\ | |
1719 | /* $comment_str */" ;; | |
1720 | * ) # Add the comment on the second line of scripts, first line of others. | |
1721 | ac_comsub=" | |
1722 | 1{ | |
1723 | s/^#!/&/ | |
1724 | t script | |
1725 | i\\ | |
1726 | # $comment_str | |
1727 | b done | |
1728 | : script | |
1729 | a\\ | |
1730 | # $comment_str | |
1731 | : done | |
1732 | } | |
1733 | " ;; | |
1734 | esac | |
1735 | sed -e "$ac_comsub | |
1736 | s%@srcdir@%$srcdir%g | |
1737 | s%@top_srcdir@%$top_srcdir%g | |
1738 | s%@INSTALL@%$INSTALL%g | |
1739 | " -f conftest.subs $ac_given_srcdir/$ac_file_in > $ac_file | |
1740 | fi; done | |
1741 | rm -f conftest.subs | |
1742 | ||
1743 | # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where | |
1744 | # NAME is the cpp macro being defined and VALUE is the value it is being given. | |
1745 | # | |
1746 | # ac_d sets the value in "#define NAME VALUE" lines. | |
1747 | ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)' | |
1748 | ac_dB='\([ ][ ]*\)[^ ]*%\1#\2' | |
1749 | ac_dC='\3' | |
1750 | ac_dD='%g' | |
1751 | # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE". | |
1752 | ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' | |
1753 | ac_uB='\([ ]\)%\1#\2define\3' | |
1754 | ac_uC=' ' | |
1755 | ac_uD='\4%g' | |
1756 | # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE". | |
1757 | ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' | |
1758 | ac_eB='$%\1#\2define\3' | |
1759 | ac_eC=' ' | |
1760 | ac_eD='%g' | |
1761 | ||
1762 | CONFIG_HEADERS=${CONFIG_HEADERS-"conf"} | |
1763 | for ac_file in .. ${CONFIG_HEADERS}; do if test "x$ac_file" != x..; then | |
1764 | # Support "outfile[:infile]", defaulting infile="outfile.in". | |
1765 | case "$ac_file" in | |
1766 | *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'` | |
1767 | ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; | |
1768 | *) ac_file_in="${ac_file}.in" ;; | |
1769 | esac | |
1770 | ||
1771 | echo creating $ac_file | |
1772 | ||
1773 | rm -f conftest.frag conftest.in conftest.out | |
1774 | cp $ac_given_srcdir/$ac_file_in conftest.in | |
1775 | ||
1776 | EOF | |
1777 | ||
1778 | # Transform confdefs.h into a sed script conftest.vals that substitutes | |
1779 | # the proper values into config.h.in to produce config.h. | |
1780 | rm -f conftest.vals | |
1781 | cat > conftest.hdr <<\EOF | |
1782 | # Protect against being on the right side of a sed subst in config.status. | |
1783 | s/[\\&%]/\\&/g | |
1784 | # Protect against being in an unquoted here document in config.status. | |
1785 | s%[\\$`]%\\&%g | |
1786 | s%#define \([A-Za-z_][A-Za-z0-9_]*\) \(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp | |
1787 | s%ac_d%ac_u%gp | |
1788 | s%ac_u%ac_e%gp | |
1789 | EOF | |
1790 | sed -n -f conftest.hdr confdefs.h > conftest.vals | |
1791 | rm -f conftest.hdr | |
1792 | ||
1793 | # This sed command replaces #undef with comments. This is necessary, for | |
1794 | # example, in the case of _POSIX_SOURCE, which is predefined and required | |
1795 | # on some systems where configure will not decide to define it. | |
1796 | cat >> conftest.vals <<\EOF | |
1797 | s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */% | |
1798 | EOF | |
1799 | ||
1800 | # Break up conftest.vals because some shells have a limit on | |
1801 | # the size of here documents, and old seds have small limits too. | |
1802 | # Maximum number of lines to put in a single here document. | |
1803 | ac_max_here_lines=12 | |
1804 | ||
1805 | rm -f conftest.tail | |
1806 | while : | |
1807 | do | |
1808 | ac_lines=`grep -c . conftest.vals` | |
1809 | # grep -c gives empty output for an empty file on some AIX systems. | |
1810 | if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi | |
1811 | # Write a limited-size here document to conftest.frag. | |
1812 | echo ' cat > conftest.frag <<CEOF' >> ${CONFIG_STATUS} | |
1813 | sed ${ac_max_here_lines}q conftest.vals >> ${CONFIG_STATUS} | |
1814 | echo 'CEOF | |
1815 | sed -f conftest.frag conftest.in > conftest.out | |
1816 | rm -f conftest.in | |
1817 | mv conftest.out conftest.in | |
1818 | ' >> ${CONFIG_STATUS} | |
1819 | sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail | |
1820 | rm -f conftest.vals | |
1821 | mv conftest.tail conftest.vals | |
1822 | done | |
1823 | rm -f conftest.vals | |
1824 | ||
1825 | # Now back to your regularly scheduled config.status. | |
1826 | cat >> ${CONFIG_STATUS} <<\EOF | |
1827 | rm -f conftest.frag conftest.h | |
1828 | echo "/* $ac_file. Generated automatically by configure. */" > conftest.h | |
1829 | cat conftest.in >> conftest.h | |
1830 | rm -f conftest.in | |
1831 | if cmp -s $ac_file conftest.h 2>/dev/null; then | |
1832 | echo "$ac_file is unchanged" | |
1833 | rm -f conftest.h | |
1834 | else | |
1835 | rm -f $ac_file | |
1836 | mv conftest.h $ac_file | |
1837 | fi | |
1838 | fi; done | |
1839 | ||
1840 | EOF | |
1841 | ||
1842 | cat >> ${CONFIG_STATUS} <<EOF | |
1843 | ac_links="targ-cpu.c targ-cpu.h obj-format.h obj-format.c targ-env.h atof-targ.c" | |
1844 | ac_files="config/tc-${cpu_type}.c config/tc-${cpu_type}.h \ | |
1845 | config/obj-${obj_format}.h config/obj-${obj_format}.c \ | |
1846 | config/te-${emulation}.h config/atof-${atof}.c" | |
1847 | EOF | |
1848 | ||
1849 | cat >> ${CONFIG_STATUS} <<\EOF | |
1850 | while test -n "${ac_files}"; do | |
1851 | set ${ac_links}; ac_link=$1; shift; ac_links=$* | |
1852 | set ${ac_files}; ac_file=$1; shift; ac_files=$* | |
1853 | ||
1854 | echo "linking ${ac_link} to ${srcdir}/${ac_file}" | |
1855 | ||
1856 | if test ! -r ${srcdir}/${ac_file}; then | |
1857 | { echo "configure: ${srcdir}/${ac_file}: File not found" 1>&2; exit 1; } | |
1858 | fi | |
1859 | rm -f ${ac_link} | |
1860 | # Make a symlink if possible; otherwise try a hard link. | |
1861 | if ln -s ${srcdir}/${ac_file} ${ac_link} 2>/dev/null || | |
1862 | ln ${srcdir}/${ac_file} ${ac_link}; then : | |
1863 | else | |
1864 | { echo "configure: can not link ${ac_link} to ${srcdir}/${ac_file}" 1>&2; exit 1; } | |
1865 | fi | |
1866 | done | |
1867 | ||
1868 | EOF | |
1869 | chmod +x ${CONFIG_STATUS} | |
1870 | test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} ${CONFIG_STATUS} | |
1871 | ||
1872 | if test "${norecursion}" != yes; then | |
1873 | ||
1874 | # Remove --cache-file and --srcdir arguments so they do not pile up. | |
1875 | ac_sub_configure_args= | |
1876 | ac_prev= | |
1877 | for ac_arg in $configure_args; do | |
1878 | if test -n "$ac_prev"; then | |
1879 | ac_prev= | |
1880 | continue | |
1881 | fi | |
1882 | case "$ac_arg" in | |
1883 | -cache-file | --cache-file | --cache-fil | --cache-fi \ | |
1884 | | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) | |
1885 | ac_prev=cache_file ;; | |
1886 | -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | |
1887 | | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) | |
1888 | ;; | |
1889 | -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) | |
1890 | ac_prev=srcdir ;; | |
1891 | -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) | |
1892 | ;; | |
1893 | *[" "]*) ac_sub_configure_args="$ac_sub_configure_args '$ac_arg'" ;; | |
1894 | *) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;; | |
1895 | esac | |
1896 | done | |
1897 | ||
1898 | for ac_config_dir in testsuite; do | |
1899 | ||
1900 | # Do not complain, so a configure script can configure whichever | |
1901 | # parts of a large source tree are present. | |
1902 | if test ! -d ${srcdir}/${ac_config_dir}; then | |
1903 | continue | |
1904 | fi | |
1905 | ||
1906 | echo configuring in ${ac_config_dir} | |
1907 | ||
1908 | case "${srcdir}" in | |
1909 | .) ;; | |
1910 | *) | |
1911 | if test -d ./${ac_config_dir} || mkdir ./${ac_config_dir}; then :; | |
1912 | else | |
1913 | { echo "configure: can not create `pwd`/${ac_config_dir}" 1>&2; exit 1; } | |
1914 | fi | |
1915 | ;; | |
1916 | esac | |
1917 | ||
1918 | ac_popdir=`pwd` | |
1919 | cd ${ac_config_dir} | |
1920 | ||
1921 | case "${srcdir}" in | |
1922 | .) # No --srcdir option. We are building in place. | |
1923 | ac_sub_srcdir=${srcdir} ;; | |
1924 | /*) # Absolute path. | |
1925 | ac_sub_srcdir=${srcdir}/${ac_config_dir} ;; | |
1926 | *) # Relative path. | |
1927 | ac_sub_srcdir=../${srcdir}/${ac_config_dir} ;; | |
1928 | esac | |
1929 | ||
1930 | # Check for guested configure; otherwise get Cygnus style configure. | |
1931 | if test -f ${ac_sub_srcdir}/configure; then | |
1932 | ac_sub_configure=${ac_sub_srcdir}/configure | |
1933 | elif test -f ${ac_sub_srcdir}/configure.in; then | |
1934 | ac_sub_configure=${ac_configure} | |
1935 | else | |
1936 | echo "configure: warning: no configuration information is in ${ac_config_dir}" 1>&2 | |
1937 | ac_sub_configure= | |
1938 | fi | |
1939 | ||
1940 | # The recursion is here. | |
1941 | if test -n "${ac_sub_configure}"; then | |
1942 | ||
1943 | # Make the cache file name correct relative to the subdirectory. | |
1944 | # A "../" for each directory in /${ac_config_dir}. | |
1945 | ac_dots=`echo /${ac_config_dir}|sed 's%/[^/]*%../%g'` | |
1946 | case "$cache_file" in | |
1947 | /*) ac_sub_cache_file=$cache_file ;; | |
1948 | *) # Relative path. | |
1949 | ac_sub_cache_file="$ac_dots$cache_file" ;; | |
1950 | esac | |
1951 | ||
1952 | echo "running ${CONFIG_SHELL-/bin/sh} ${ac_sub_configure} ${ac_sub_configure_args} --cache-file=$ac_sub_cache_file --srcdir=${ac_sub_srcdir}" | |
1953 | if ${CONFIG_SHELL-/bin/sh} ${ac_sub_configure} ${ac_sub_configure_args} --cache-file=$ac_sub_cache_file --srcdir=${ac_sub_srcdir} | |
1954 | then : | |
1955 | else | |
1956 | { echo "configure: ${ac_sub_configure} failed for ${ac_config_dir}" 1>&2; exit 1; } | |
1957 | fi | |
1958 | fi | |
1959 | ||
1960 | cd ${ac_popdir} | |
1961 | done | |
1962 | fi | |
1963 |