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