Commit | Line | Data |
---|---|---|
833c46e1 | 1 | #! /bin/sh |
fb589130 | 2 | |
b11fb939 | 3 | # Guess values for system-dependent variables and create Makefiles. |
b5db0960 | 4 | # Generated automatically using autoconf version 2.12.1 |
df586de2 | 5 | # Copyright (C) 1992, 93, 94, 95, 96 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: | |
e2b4bd2a | 14 | ac_help="$ac_help |
fc6f7f6c ILT |
15 | --enable-shared build shared libraries [default=yes] |
16 | --enable-shared=PKGS only build shared libraries if the current package | |
17 | appears as an element in the PKGS list" | |
e2b4bd2a | 18 | ac_help="$ac_help |
fc6f7f6c ILT |
19 | --enable-static build static libraries [default=yes] |
20 | --enable-static=PKGS only build shared libraries if the current package | |
21 | appears as an element in the PKGS list" | |
e2b4bd2a | 22 | ac_help="$ac_help |
fc6f7f6c | 23 | --with-gnu-ld assume the C compiler uses GNU ld [default=no]" |
28d3e4a3 | 24 | ac_help="$ac_help |
d7b2038f | 25 | --enable-bfd-assembler use BFD back end for writing object files" |
e7757ad0 KR |
26 | ac_help="$ac_help |
27 | targets alternative target configurations besides the primary" | |
2e013bb7 ILT |
28 | ac_help="$ac_help |
29 | --enable-commonbfdlib build shared BFD/opcodes/libiberty library" | |
48401fcf TT |
30 | ac_help="$ac_help |
31 | --disable-nls do not use Native Language Support" | |
32 | ac_help="$ac_help | |
33 | --with-included-gettext use the GNU gettext library included here" | |
e2b4bd2a ILT |
34 | ac_help="$ac_help |
35 | --enable-maintainer-mode enable make rules and dependencies not useful | |
36 | (and sometimes confusing) to the casual installer" | |
b11fb939 | 37 | |
b11fb939 KR |
38 | # Initialize some variables set by options. |
39 | # The variables have the same names as the options, with | |
40 | # dashes changed to underlines. | |
41 | build=NONE | |
42 | cache_file=./config.cache | |
43 | exec_prefix=NONE | |
44 | host=NONE | |
45 | no_create= | |
46 | nonopt=NONE | |
bf111c9f | 47 | no_recursion= |
b11fb939 | 48 | prefix=NONE |
bf111c9f KR |
49 | program_prefix=NONE |
50 | program_suffix=NONE | |
ba49e48d | 51 | program_transform_name=s,x,x, |
b11fb939 | 52 | silent= |
f2889110 | 53 | site= |
b11fb939 KR |
54 | srcdir= |
55 | target=NONE | |
56 | verbose= | |
57 | x_includes=NONE | |
58 | x_libraries=NONE | |
1c9dbb83 ILT |
59 | bindir='${exec_prefix}/bin' |
60 | sbindir='${exec_prefix}/sbin' | |
61 | libexecdir='${exec_prefix}/libexec' | |
62 | datadir='${prefix}/share' | |
63 | sysconfdir='${prefix}/etc' | |
64 | sharedstatedir='${prefix}/com' | |
65 | localstatedir='${prefix}/var' | |
66 | libdir='${exec_prefix}/lib' | |
67 | includedir='${prefix}/include' | |
68 | oldincludedir='/usr/include' | |
69 | infodir='${prefix}/info' | |
70 | mandir='${prefix}/man' | |
b11fb939 KR |
71 | |
72 | # Initialize some other variables. | |
73 | subdirs= | |
1c9dbb83 | 74 | MFLAGS= MAKEFLAGS= |
ed1ed9f9 | 75 | SHELL=${CONFIG_SHELL-/bin/sh} |
c6c7035c MM |
76 | # Maximum number of lines to put in a shell here document. |
77 | ac_max_here_lines=12 | |
b11fb939 KR |
78 | |
79 | ac_prev= | |
80 | for ac_option | |
81 | do | |
82 | ||
83 | # If the previous option needs an argument, assign it. | |
84 | if test -n "$ac_prev"; then | |
85 | eval "$ac_prev=\$ac_option" | |
86 | ac_prev= | |
87 | continue | |
88 | fi | |
89 | ||
90 | case "$ac_option" in | |
91 | -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;; | |
92 | *) ac_optarg= ;; | |
93 | esac | |
94 | ||
bf111c9f | 95 | # Accept the important Cygnus configure options, so we can diagnose typos. |
b11fb939 KR |
96 | |
97 | case "$ac_option" in | |
98 | ||
1c9dbb83 ILT |
99 | -bindir | --bindir | --bindi | --bind | --bin | --bi) |
100 | ac_prev=bindir ;; | |
101 | -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) | |
102 | bindir="$ac_optarg" ;; | |
103 | ||
104 | -build | --build | --buil | --bui | --bu) | |
b11fb939 | 105 | ac_prev=build ;; |
1c9dbb83 | 106 | -build=* | --build=* | --buil=* | --bui=* | --bu=*) |
b11fb939 KR |
107 | build="$ac_optarg" ;; |
108 | ||
109 | -cache-file | --cache-file | --cache-fil | --cache-fi \ | |
110 | | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) | |
111 | ac_prev=cache_file ;; | |
112 | -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | |
113 | | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) | |
114 | cache_file="$ac_optarg" ;; | |
115 | ||
1c9dbb83 ILT |
116 | -datadir | --datadir | --datadi | --datad | --data | --dat | --da) |
117 | ac_prev=datadir ;; | |
118 | -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ | |
119 | | --da=*) | |
120 | datadir="$ac_optarg" ;; | |
121 | ||
b11fb939 KR |
122 | -disable-* | --disable-*) |
123 | ac_feature=`echo $ac_option|sed -e 's/-*disable-//'` | |
124 | # Reject names that are not valid shell variable names. | |
125 | if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then | |
ba49e48d | 126 | { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } |
b11fb939 KR |
127 | fi |
128 | ac_feature=`echo $ac_feature| sed 's/-/_/g'` | |
129 | eval "enable_${ac_feature}=no" ;; | |
130 | ||
131 | -enable-* | --enable-*) | |
132 | ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'` | |
133 | # Reject names that are not valid shell variable names. | |
134 | if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then | |
ba49e48d | 135 | { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } |
b11fb939 KR |
136 | fi |
137 | ac_feature=`echo $ac_feature| sed 's/-/_/g'` | |
138 | case "$ac_option" in | |
139 | *=*) ;; | |
140 | *) ac_optarg=yes ;; | |
141 | esac | |
142 | eval "enable_${ac_feature}='$ac_optarg'" ;; | |
143 | ||
144 | -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | |
145 | | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | |
146 | | --exec | --exe | --ex) | |
147 | ac_prev=exec_prefix ;; | |
148 | -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | |
149 | | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | |
150 | | --exec=* | --exe=* | --ex=*) | |
151 | exec_prefix="$ac_optarg" ;; | |
152 | ||
153 | -gas | --gas | --ga | --g) | |
154 | # Obsolete; use --with-gas. | |
155 | with_gas=yes ;; | |
156 | ||
157 | -help | --help | --hel | --he) | |
f1698cb7 KR |
158 | # Omit some internal or obsolete options to make the list less imposing. |
159 | # This message is too long to be a string in the A/UX 3.1 sh. | |
b11fb939 | 160 | cat << EOF |
f1698cb7 KR |
161 | Usage: configure [options] [host] |
162 | Options: [defaults in brackets after descriptions] | |
163 | Configuration: | |
164 | --cache-file=FILE cache test results in FILE | |
165 | --help print this message | |
166 | --no-create do not create output files | |
167 | --quiet, --silent do not print \`checking...' messages | |
168 | --version print the version of autoconf that created configure | |
169 | Directory and file names: | |
170 | --prefix=PREFIX install architecture-independent files in PREFIX | |
171 | [$ac_default_prefix] | |
1c9dbb83 | 172 | --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX |
f1698cb7 | 173 | [same as prefix] |
1c9dbb83 ILT |
174 | --bindir=DIR user executables in DIR [EPREFIX/bin] |
175 | --sbindir=DIR system admin executables in DIR [EPREFIX/sbin] | |
176 | --libexecdir=DIR program executables in DIR [EPREFIX/libexec] | |
177 | --datadir=DIR read-only architecture-independent data in DIR | |
178 | [PREFIX/share] | |
179 | --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc] | |
180 | --sharedstatedir=DIR modifiable architecture-independent data in DIR | |
181 | [PREFIX/com] | |
182 | --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var] | |
183 | --libdir=DIR object code libraries in DIR [EPREFIX/lib] | |
184 | --includedir=DIR C header files in DIR [PREFIX/include] | |
185 | --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include] | |
186 | --infodir=DIR info documentation in DIR [PREFIX/info] | |
187 | --mandir=DIR man documentation in DIR [PREFIX/man] | |
f1698cb7 KR |
188 | --srcdir=DIR find the sources in DIR [configure dir or ..] |
189 | --program-prefix=PREFIX prepend PREFIX to installed program names | |
190 | --program-suffix=SUFFIX append SUFFIX to installed program names | |
1c9dbb83 ILT |
191 | --program-transform-name=PROGRAM |
192 | run sed PROGRAM on installed program names | |
193 | EOF | |
194 | cat << EOF | |
f1698cb7 KR |
195 | Host type: |
196 | --build=BUILD configure for building on BUILD [BUILD=HOST] | |
197 | --host=HOST configure for HOST [guessed] | |
198 | --target=TARGET configure for TARGET [TARGET=HOST] | |
199 | Features and packages: | |
200 | --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) | |
201 | --enable-FEATURE[=ARG] include FEATURE [ARG=yes] | |
202 | --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] | |
203 | --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) | |
204 | --x-includes=DIR X include files are in DIR | |
205 | --x-libraries=DIR X library files are in DIR | |
b11fb939 | 206 | EOF |
1c9dbb83 ILT |
207 | if test -n "$ac_help"; then |
208 | echo "--enable and --with options recognized:$ac_help" | |
209 | fi | |
b11fb939 KR |
210 | exit 0 ;; |
211 | ||
212 | -host | --host | --hos | --ho) | |
213 | ac_prev=host ;; | |
214 | -host=* | --host=* | --hos=* | --ho=*) | |
215 | host="$ac_optarg" ;; | |
216 | ||
1c9dbb83 ILT |
217 | -includedir | --includedir | --includedi | --included | --include \ |
218 | | --includ | --inclu | --incl | --inc) | |
219 | ac_prev=includedir ;; | |
220 | -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | |
221 | | --includ=* | --inclu=* | --incl=* | --inc=*) | |
222 | includedir="$ac_optarg" ;; | |
223 | ||
224 | -infodir | --infodir | --infodi | --infod | --info | --inf) | |
225 | ac_prev=infodir ;; | |
226 | -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) | |
227 | infodir="$ac_optarg" ;; | |
228 | ||
229 | -libdir | --libdir | --libdi | --libd) | |
230 | ac_prev=libdir ;; | |
231 | -libdir=* | --libdir=* | --libdi=* | --libd=*) | |
232 | libdir="$ac_optarg" ;; | |
233 | ||
234 | -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | |
235 | | --libexe | --libex | --libe) | |
236 | ac_prev=libexecdir ;; | |
237 | -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | |
238 | | --libexe=* | --libex=* | --libe=*) | |
239 | libexecdir="$ac_optarg" ;; | |
240 | ||
241 | -localstatedir | --localstatedir | --localstatedi | --localstated \ | |
242 | | --localstate | --localstat | --localsta | --localst \ | |
243 | | --locals | --local | --loca | --loc | --lo) | |
244 | ac_prev=localstatedir ;; | |
245 | -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | |
246 | | --localstate=* | --localstat=* | --localsta=* | --localst=* \ | |
247 | | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) | |
248 | localstatedir="$ac_optarg" ;; | |
249 | ||
250 | -mandir | --mandir | --mandi | --mand | --man | --ma | --m) | |
251 | ac_prev=mandir ;; | |
252 | -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) | |
253 | mandir="$ac_optarg" ;; | |
254 | ||
b11fb939 KR |
255 | -nfp | --nfp | --nf) |
256 | # Obsolete; use --without-fp. | |
257 | with_fp=no ;; | |
258 | ||
259 | -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | |
260 | | --no-cr | --no-c) | |
261 | no_create=yes ;; | |
262 | ||
bf111c9f KR |
263 | -no-recursion | --no-recursion | --no-recursio | --no-recursi \ |
264 | | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) | |
265 | no_recursion=yes ;; | |
b11fb939 | 266 | |
1c9dbb83 ILT |
267 | -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ |
268 | | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | |
269 | | --oldin | --oldi | --old | --ol | --o) | |
270 | ac_prev=oldincludedir ;; | |
271 | -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | |
272 | | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | |
273 | | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) | |
274 | oldincludedir="$ac_optarg" ;; | |
275 | ||
b11fb939 KR |
276 | -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) |
277 | ac_prev=prefix ;; | |
278 | -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) | |
279 | prefix="$ac_optarg" ;; | |
280 | ||
281 | -program-prefix | --program-prefix | --program-prefi | --program-pref \ | |
282 | | --program-pre | --program-pr | --program-p) | |
283 | ac_prev=program_prefix ;; | |
284 | -program-prefix=* | --program-prefix=* | --program-prefi=* \ | |
285 | | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) | |
286 | program_prefix="$ac_optarg" ;; | |
287 | ||
288 | -program-suffix | --program-suffix | --program-suffi | --program-suff \ | |
289 | | --program-suf | --program-su | --program-s) | |
290 | ac_prev=program_suffix ;; | |
291 | -program-suffix=* | --program-suffix=* | --program-suffi=* \ | |
292 | | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) | |
293 | program_suffix="$ac_optarg" ;; | |
294 | ||
295 | -program-transform-name | --program-transform-name \ | |
296 | | --program-transform-nam | --program-transform-na \ | |
297 | | --program-transform-n | --program-transform- \ | |
298 | | --program-transform | --program-transfor \ | |
299 | | --program-transfo | --program-transf \ | |
300 | | --program-trans | --program-tran \ | |
301 | | --progr-tra | --program-tr | --program-t) | |
302 | ac_prev=program_transform_name ;; | |
303 | -program-transform-name=* | --program-transform-name=* \ | |
304 | | --program-transform-nam=* | --program-transform-na=* \ | |
305 | | --program-transform-n=* | --program-transform-=* \ | |
306 | | --program-transform=* | --program-transfor=* \ | |
307 | | --program-transfo=* | --program-transf=* \ | |
308 | | --program-trans=* | --program-tran=* \ | |
309 | | --progr-tra=* | --program-tr=* | --program-t=*) | |
bf111c9f | 310 | program_transform_name="$ac_optarg" ;; |
b11fb939 KR |
311 | |
312 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | |
313 | | -silent | --silent | --silen | --sile | --sil) | |
314 | silent=yes ;; | |
315 | ||
1c9dbb83 ILT |
316 | -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) |
317 | ac_prev=sbindir ;; | |
318 | -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | |
319 | | --sbi=* | --sb=*) | |
320 | sbindir="$ac_optarg" ;; | |
321 | ||
322 | -sharedstatedir | --sharedstatedir | --sharedstatedi \ | |
323 | | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | |
324 | | --sharedst | --shareds | --shared | --share | --shar \ | |
325 | | --sha | --sh) | |
326 | ac_prev=sharedstatedir ;; | |
327 | -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | |
328 | | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | |
329 | | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | |
330 | | --sha=* | --sh=*) | |
331 | sharedstatedir="$ac_optarg" ;; | |
332 | ||
f2889110 KR |
333 | -site | --site | --sit) |
334 | ac_prev=site ;; | |
335 | -site=* | --site=* | --sit=*) | |
336 | site="$ac_optarg" ;; | |
337 | ||
b11fb939 KR |
338 | -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) |
339 | ac_prev=srcdir ;; | |
340 | -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) | |
341 | srcdir="$ac_optarg" ;; | |
342 | ||
1c9dbb83 ILT |
343 | -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ |
344 | | --syscon | --sysco | --sysc | --sys | --sy) | |
345 | ac_prev=sysconfdir ;; | |
346 | -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | |
347 | | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) | |
348 | sysconfdir="$ac_optarg" ;; | |
349 | ||
b11fb939 KR |
350 | -target | --target | --targe | --targ | --tar | --ta | --t) |
351 | ac_prev=target ;; | |
352 | -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) | |
353 | target="$ac_optarg" ;; | |
354 | ||
355 | -v | -verbose | --verbose | --verbos | --verbo | --verb) | |
356 | verbose=yes ;; | |
357 | ||
358 | -version | --version | --versio | --versi | --vers) | |
b5db0960 | 359 | echo "configure generated by autoconf version 2.12.1" |
b11fb939 KR |
360 | exit 0 ;; |
361 | ||
362 | -with-* | --with-*) | |
363 | ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'` | |
364 | # Reject names that are not valid shell variable names. | |
365 | if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then | |
ba49e48d | 366 | { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } |
b11fb939 KR |
367 | fi |
368 | ac_package=`echo $ac_package| sed 's/-/_/g'` | |
369 | case "$ac_option" in | |
370 | *=*) ;; | |
371 | *) ac_optarg=yes ;; | |
372 | esac | |
373 | eval "with_${ac_package}='$ac_optarg'" ;; | |
374 | ||
375 | -without-* | --without-*) | |
376 | ac_package=`echo $ac_option|sed -e 's/-*without-//'` | |
377 | # Reject names that are not valid shell variable names. | |
378 | if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then | |
ba49e48d | 379 | { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } |
b11fb939 KR |
380 | fi |
381 | ac_package=`echo $ac_package| sed 's/-/_/g'` | |
382 | eval "with_${ac_package}=no" ;; | |
383 | ||
384 | --x) | |
385 | # Obsolete; use --with-x. | |
386 | with_x=yes ;; | |
387 | ||
388 | -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | |
389 | | --x-incl | --x-inc | --x-in | --x-i) | |
390 | ac_prev=x_includes ;; | |
391 | -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | |
392 | | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) | |
393 | x_includes="$ac_optarg" ;; | |
394 | ||
395 | -x-libraries | --x-libraries | --x-librarie | --x-librari \ | |
396 | | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) | |
397 | ac_prev=x_libraries ;; | |
398 | -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | |
399 | | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) | |
400 | x_libraries="$ac_optarg" ;; | |
401 | ||
ba49e48d | 402 | -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; } |
b11fb939 KR |
403 | ;; |
404 | ||
1c9dbb83 | 405 | *) |
b11fb939 KR |
406 | if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then |
407 | echo "configure: warning: $ac_option: invalid host type" 1>&2 | |
408 | fi | |
409 | if test "x$nonopt" != xNONE; then | |
ba49e48d | 410 | { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } |
b11fb939 KR |
411 | fi |
412 | nonopt="$ac_option" | |
413 | ;; | |
414 | ||
415 | esac | |
416 | done | |
417 | ||
418 | if test -n "$ac_prev"; then | |
ba49e48d | 419 | { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; } |
b11fb939 KR |
420 | fi |
421 | ||
833c46e1 | 422 | trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 |
b11fb939 KR |
423 | |
424 | # File descriptor usage: | |
833c46e1 | 425 | # 0 standard input |
b11fb939 KR |
426 | # 1 file creation |
427 | # 2 errors and warnings | |
833c46e1 KR |
428 | # 3 some systems may open it to /dev/tty |
429 | # 4 used on the Kubota Titan | |
430 | # 6 checking for... messages and results | |
b11fb939 KR |
431 | # 5 compiler messages saved in config.log |
432 | if test "$silent" = yes; then | |
833c46e1 | 433 | exec 6>/dev/null |
b11fb939 | 434 | else |
833c46e1 | 435 | exec 6>&1 |
b11fb939 KR |
436 | fi |
437 | exec 5>./config.log | |
438 | ||
439 | echo "\ | |
440 | This file contains any messages produced by compilers while | |
441 | running configure, to aid debugging if configure makes a mistake. | |
442 | " 1>&5 | |
443 | ||
bf111c9f | 444 | # Strip out --no-create and --no-recursion so they do not pile up. |
e23b25ec KR |
445 | # Also quote any args containing shell metacharacters. |
446 | ac_configure_args= | |
447 | for ac_arg | |
448 | do | |
b11fb939 KR |
449 | case "$ac_arg" in |
450 | -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | |
451 | | --no-cr | --no-c) ;; | |
bf111c9f KR |
452 | -no-recursion | --no-recursion | --no-recursio | --no-recursi \ |
453 | | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;; | |
e23b25ec KR |
454 | *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*) |
455 | ac_configure_args="$ac_configure_args '$ac_arg'" ;; | |
456 | *) ac_configure_args="$ac_configure_args $ac_arg" ;; | |
b11fb939 KR |
457 | esac |
458 | done | |
459 | ||
460 | # NLS nuisances. | |
c6c7035c MM |
461 | # Only set these to C if already set. These must not be set unconditionally |
462 | # because not all systems understand e.g. LANG=C (notably SCO). | |
463 | # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'! | |
464 | # Non-C LC_CTYPE values break the ctype check. | |
7d0f8249 | 465 | if test "${LANG+set}" = set; then LANG=C; export LANG; fi |
c6c7035c MM |
466 | if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi |
467 | if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi | |
468 | if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi | |
b11fb939 KR |
469 | |
470 | # confdefs.h avoids OS command line length limits that DEFS can exceed. | |
471 | rm -rf conftest* confdefs.h | |
472 | # AIX cpp loses on an empty file, so make sure it contains at least a newline. | |
473 | echo > confdefs.h | |
474 | ||
475 | # A filename unique to this package, relative to the directory that | |
476 | # configure is in, which we can look for to find out if srcdir is correct. | |
477 | ac_unique_file=as.h | |
478 | ||
479 | # Find the source files, if location was not specified. | |
480 | if test -z "$srcdir"; then | |
481 | ac_srcdir_defaulted=yes | |
482 | # Try the directory containing this script, then its parent. | |
483 | ac_prog=$0 | |
484 | ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'` | |
485 | test "x$ac_confdir" = "x$ac_prog" && ac_confdir=. | |
486 | srcdir=$ac_confdir | |
487 | if test ! -r $srcdir/$ac_unique_file; then | |
488 | srcdir=.. | |
489 | fi | |
490 | else | |
491 | ac_srcdir_defaulted=no | |
492 | fi | |
493 | if test ! -r $srcdir/$ac_unique_file; then | |
494 | if test "$ac_srcdir_defaulted" = yes; then | |
ba49e48d | 495 | { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; } |
b11fb939 | 496 | else |
ba49e48d | 497 | { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; } |
b11fb939 KR |
498 | fi |
499 | fi | |
f2889110 | 500 | srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'` |
b11fb939 KR |
501 | |
502 | # Prefer explicitly selected file to automatically selected ones. | |
bf111c9f | 503 | if test -z "$CONFIG_SITE"; then |
b11fb939 | 504 | if test "x$prefix" != xNONE; then |
f2889110 | 505 | CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" |
b11fb939 | 506 | else |
f2889110 | 507 | CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" |
b11fb939 KR |
508 | fi |
509 | fi | |
510 | for ac_site_file in $CONFIG_SITE; do | |
511 | if test -r "$ac_site_file"; then | |
512 | echo "loading site script $ac_site_file" | |
513 | . "$ac_site_file" | |
514 | fi | |
515 | done | |
516 | ||
517 | if test -r "$cache_file"; then | |
518 | echo "loading cache $cache_file" | |
519 | . $cache_file | |
520 | else | |
521 | echo "creating cache $cache_file" | |
522 | > $cache_file | |
523 | fi | |
524 | ||
525 | ac_ext=c | |
526 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. | |
d0352cbb DE |
527 | ac_cpp='$CPP $CPPFLAGS' |
528 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' | |
529 | ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' | |
c6c7035c | 530 | cross_compiling=$ac_cv_prog_cc_cross |
b11fb939 | 531 | |
bf111c9f KR |
532 | if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then |
533 | # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. | |
534 | if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then | |
535 | ac_n= ac_c=' | |
536 | ' ac_t=' ' | |
537 | else | |
538 | ac_n=-n ac_c= ac_t= | |
539 | fi | |
540 | else | |
541 | ac_n= ac_c='\c' ac_t= | |
542 | fi | |
543 | ||
b11fb939 KR |
544 | |
545 | ||
546 | ac_aux_dir= | |
e2b4bd2a | 547 | for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do |
e23b25ec KR |
548 | if test -f $ac_dir/install-sh; then |
549 | ac_aux_dir=$ac_dir | |
28d3e4a3 | 550 | ac_install_sh="$ac_aux_dir/install-sh -c" |
e23b25ec KR |
551 | break |
552 | elif test -f $ac_dir/install.sh; then | |
553 | ac_aux_dir=$ac_dir | |
28d3e4a3 | 554 | ac_install_sh="$ac_aux_dir/install.sh -c" |
e23b25ec | 555 | break |
b11fb939 KR |
556 | fi |
557 | done | |
558 | if test -z "$ac_aux_dir"; then | |
e2b4bd2a | 559 | { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; } |
b11fb939 | 560 | fi |
28d3e4a3 KR |
561 | ac_config_guess=$ac_aux_dir/config.guess |
562 | ac_config_sub=$ac_aux_dir/config.sub | |
563 | ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. | |
b11fb939 | 564 | |
fb589130 | 565 | |
b11fb939 KR |
566 | # Do some error checking and defaulting for the host and target type. |
567 | # The inputs are: | |
568 | # configure --host=HOST --target=TARGET --build=BUILD NONOPT | |
569 | # | |
570 | # The rules are: | |
571 | # 1. You are not allowed to specify --host, --target, and nonopt at the | |
1c9dbb83 | 572 | # same time. |
b11fb939 KR |
573 | # 2. Host defaults to nonopt. |
574 | # 3. If nonopt is not specified, then host defaults to the current host, | |
575 | # as determined by config.guess. | |
f2889110 KR |
576 | # 4. Target and build default to nonopt. |
577 | # 5. If nonopt is not specified, then target and build default to host. | |
b11fb939 KR |
578 | |
579 | # The aliases save the names the user supplied, while $host etc. | |
580 | # will get canonicalized. | |
581 | case $host---$target---$nonopt in | |
582 | NONE---*---* | *---NONE---* | *---*---NONE) ;; | |
ba49e48d | 583 | *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;; |
b11fb939 KR |
584 | esac |
585 | ||
e23b25ec | 586 | |
b11fb939 | 587 | # Make sure we can run config.sub. |
b5db0960 | 588 | if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then : |
ba49e48d | 589 | else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; } |
b11fb939 KR |
590 | fi |
591 | ||
833c46e1 | 592 | echo $ac_n "checking host system type""... $ac_c" 1>&6 |
48401fcf | 593 | echo "configure:594: checking host system type" >&5 |
b11fb939 KR |
594 | |
595 | host_alias=$host | |
28d3e4a3 | 596 | case "$host_alias" in |
b11fb939 KR |
597 | NONE) |
598 | case $nonopt in | |
599 | NONE) | |
b5db0960 | 600 | if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then : |
ba49e48d | 601 | else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; } |
b11fb939 KR |
602 | fi ;; |
603 | *) host_alias=$nonopt ;; | |
604 | esac ;; | |
605 | esac | |
606 | ||
b5db0960 | 607 | host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias` |
c6c7035c MM |
608 | host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` |
609 | host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` | |
610 | host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` | |
833c46e1 | 611 | echo "$ac_t""$host" 1>&6 |
b11fb939 | 612 | |
833c46e1 | 613 | echo $ac_n "checking target system type""... $ac_c" 1>&6 |
48401fcf | 614 | echo "configure:615: checking target system type" >&5 |
b11fb939 KR |
615 | |
616 | target_alias=$target | |
28d3e4a3 | 617 | case "$target_alias" in |
b11fb939 KR |
618 | NONE) |
619 | case $nonopt in | |
620 | NONE) target_alias=$host_alias ;; | |
621 | *) target_alias=$nonopt ;; | |
622 | esac ;; | |
623 | esac | |
624 | ||
b5db0960 | 625 | target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias` |
c6c7035c MM |
626 | target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` |
627 | target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` | |
628 | target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` | |
833c46e1 | 629 | echo "$ac_t""$target" 1>&6 |
b11fb939 | 630 | |
833c46e1 | 631 | echo $ac_n "checking build system type""... $ac_c" 1>&6 |
48401fcf | 632 | echo "configure:633: checking build system type" >&5 |
b11fb939 KR |
633 | |
634 | build_alias=$build | |
28d3e4a3 | 635 | case "$build_alias" in |
f2889110 KR |
636 | NONE) |
637 | case $nonopt in | |
638 | NONE) build_alias=$host_alias ;; | |
639 | *) build_alias=$nonopt ;; | |
640 | esac ;; | |
641 | esac | |
642 | ||
b5db0960 | 643 | build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias` |
e2b4bd2a ILT |
644 | build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` |
645 | build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` | |
646 | build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` | |
647 | echo "$ac_t""$build" 1>&6 | |
648 | ||
649 | test "$host_alias" != "$target_alias" && | |
650 | test "$program_prefix$program_suffix$program_transform_name" = \ | |
651 | NONENONEs,x,x, && | |
652 | program_prefix=${target_alias}- | |
653 | ||
654 | ||
655 | # Find a good install program. We prefer a C program (faster), | |
656 | # so one script is as good as another. But avoid the broken or | |
657 | # incompatible versions: | |
658 | # SysV /etc/install, /usr/sbin/install | |
659 | # SunOS /usr/etc/install | |
660 | # IRIX /sbin/install | |
661 | # AIX /bin/install | |
ed1ed9f9 | 662 | # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag |
e2b4bd2a ILT |
663 | # AFS /usr/afsws/bin/install, which mishandles nonexistent args |
664 | # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" | |
665 | # ./install, which can be erroneously created by make from ./install.sh. | |
666 | echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 | |
48401fcf | 667 | echo "configure:668: checking for a BSD compatible install" >&5 |
e2b4bd2a ILT |
668 | if test -z "$INSTALL"; then |
669 | if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then | |
670 | echo $ac_n "(cached) $ac_c" 1>&6 | |
671 | else | |
672 | IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="${IFS}:" | |
673 | for ac_dir in $PATH; do | |
674 | # Account for people who put trailing slashes in PATH elements. | |
675 | case "$ac_dir/" in | |
676 | /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;; | |
677 | *) | |
678 | # OSF1 and SCO ODT 3.0 have their own names for install. | |
ed1ed9f9 ILT |
679 | # Don't use installbsd from OSF since it installs stuff as root |
680 | # by default. | |
681 | for ac_prog in ginstall scoinst install; do | |
e2b4bd2a ILT |
682 | if test -f $ac_dir/$ac_prog; then |
683 | if test $ac_prog = install && | |
684 | grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then | |
685 | # AIX install. It has an incompatible calling convention. | |
e2b4bd2a ILT |
686 | : |
687 | else | |
688 | ac_cv_path_install="$ac_dir/$ac_prog -c" | |
689 | break 2 | |
690 | fi | |
691 | fi | |
692 | done | |
693 | ;; | |
694 | esac | |
695 | done | |
696 | IFS="$ac_save_IFS" | |
697 | ||
698 | fi | |
699 | if test "${ac_cv_path_install+set}" = set; then | |
700 | INSTALL="$ac_cv_path_install" | |
701 | else | |
702 | # As a last resort, use the slow shell script. We don't cache a | |
703 | # path for INSTALL within a source directory, because that will | |
704 | # break other packages using the cache if that directory is | |
705 | # removed, or if the path is relative. | |
706 | INSTALL="$ac_install_sh" | |
707 | fi | |
708 | fi | |
709 | echo "$ac_t""$INSTALL" 1>&6 | |
710 | ||
711 | # Use test -z because SunOS4 sh mishandles braces in ${var-val}. | |
712 | # It thinks the first close brace ends the variable substitution. | |
713 | test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' | |
714 | ||
715 | test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' | |
716 | ||
717 | ||
718 | test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}' | |
719 | ||
e2b4bd2a | 720 | echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6 |
48401fcf | 721 | echo "configure:722: checking whether build environment is sane" >&5 |
e2b4bd2a ILT |
722 | # Just in case |
723 | sleep 1 | |
724 | echo timestamp > conftestfile | |
725 | # Do `set' in a subshell so we don't clobber the current shell's | |
726 | # arguments. Must try -L first in case configure is actually a | |
727 | # symlink; some systems play weird games with the mod time of symlinks | |
728 | # (eg FreeBSD returns the mod time of the symlink's containing | |
729 | # directory). | |
730 | if ( | |
731 | set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null` | |
22d3fbd6 | 732 | if test "$*" = "X"; then |
e2b4bd2a ILT |
733 | # -L didn't work. |
734 | set X `ls -t $srcdir/configure conftestfile` | |
735 | fi | |
22d3fbd6 NC |
736 | if test "$*" != "X $srcdir/configure conftestfile" \ |
737 | && test "$*" != "X conftestfile $srcdir/configure"; then | |
738 | ||
739 | # If neither matched, then we have a broken ls. This can happen | |
740 | # if, for instance, CONFIG_SHELL is bash and it inherits a | |
741 | # broken ls alias from the environment. This has actually | |
742 | # happened. Such a system could not be considered "sane". | |
743 | { echo "configure: error: ls -t appears to fail. Make sure there is not a broken | |
744 | alias in your environment" 1>&2; exit 1; } | |
745 | fi | |
746 | ||
e2b4bd2a ILT |
747 | test "$2" = conftestfile |
748 | ) | |
749 | then | |
750 | # Ok. | |
751 | : | |
752 | else | |
753 | { echo "configure: error: newly created file is older than distributed files! | |
754 | Check your system clock" 1>&2; exit 1; } | |
755 | fi | |
756 | rm -f conftest* | |
757 | echo "$ac_t""yes" 1>&6 | |
758 | if test "$program_transform_name" = s,x,x,; then | |
759 | program_transform_name= | |
760 | else | |
761 | # Double any \ or $. echo might interpret backslashes. | |
762 | cat <<\EOF_SED > conftestsed | |
763 | s,\\,\\\\,g; s,\$,$$,g | |
764 | EOF_SED | |
765 | program_transform_name="`echo $program_transform_name|sed -f conftestsed`" | |
766 | rm -f conftestsed | |
767 | fi | |
768 | test "$program_prefix" != NONE && | |
769 | program_transform_name="s,^,${program_prefix},; $program_transform_name" | |
770 | # Use a double $ so make ignores it. | |
771 | test "$program_suffix" != NONE && | |
772 | program_transform_name="s,\$\$,${program_suffix},; $program_transform_name" | |
773 | ||
774 | # sed with no file args requires a program. | |
775 | test "$program_transform_name" = "" && program_transform_name="s,x,x," | |
776 | ||
22d3fbd6 | 777 | echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 |
48401fcf | 778 | echo "configure:779: checking whether ${MAKE-make} sets \${MAKE}" >&5 |
22d3fbd6 NC |
779 | set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` |
780 | if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then | |
781 | echo $ac_n "(cached) $ac_c" 1>&6 | |
782 | else | |
783 | cat > conftestmake <<\EOF | |
784 | all: | |
785 | @echo 'ac_maketemp="${MAKE}"' | |
786 | EOF | |
787 | # GNU make sometimes prints "make[1]: Entering...", which would confuse us. | |
788 | eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=` | |
789 | if test -n "$ac_maketemp"; then | |
790 | eval ac_cv_prog_make_${ac_make}_set=yes | |
791 | else | |
792 | eval ac_cv_prog_make_${ac_make}_set=no | |
793 | fi | |
794 | rm -f conftestmake | |
795 | fi | |
796 | if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then | |
797 | echo "$ac_t""yes" 1>&6 | |
798 | SET_MAKE= | |
799 | else | |
800 | echo "$ac_t""no" 1>&6 | |
801 | SET_MAKE="MAKE=${MAKE-make}" | |
802 | fi | |
803 | ||
804 | ||
805 | PACKAGE=gas | |
806 | ||
f3aa01e2 | 807 | VERSION=2.9.1 |
22d3fbd6 NC |
808 | |
809 | if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then | |
810 | { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; } | |
811 | fi | |
812 | cat >> confdefs.h <<EOF | |
813 | #define PACKAGE "$PACKAGE" | |
814 | EOF | |
815 | ||
816 | cat >> confdefs.h <<EOF | |
817 | #define VERSION "$VERSION" | |
818 | EOF | |
819 | ||
820 | ||
821 | ||
e2b4bd2a ILT |
822 | missing_dir=`cd $ac_aux_dir && pwd` |
823 | echo $ac_n "checking for working aclocal""... $ac_c" 1>&6 | |
48401fcf | 824 | echo "configure:825: checking for working aclocal" >&5 |
e2b4bd2a ILT |
825 | # Run test in a subshell; some versions of sh will print an error if |
826 | # an executable is not found, even if stderr is redirected. | |
827 | # Redirect stdin to placate older versions of autoconf. Sigh. | |
828 | if (aclocal --version) < /dev/null > /dev/null 2>&1; then | |
829 | ACLOCAL=aclocal | |
830 | echo "$ac_t""found" 1>&6 | |
831 | else | |
832 | ACLOCAL="$missing_dir/missing aclocal" | |
833 | echo "$ac_t""missing" 1>&6 | |
834 | fi | |
835 | ||
836 | echo $ac_n "checking for working autoconf""... $ac_c" 1>&6 | |
48401fcf | 837 | echo "configure:838: checking for working autoconf" >&5 |
e2b4bd2a ILT |
838 | # Run test in a subshell; some versions of sh will print an error if |
839 | # an executable is not found, even if stderr is redirected. | |
840 | # Redirect stdin to placate older versions of autoconf. Sigh. | |
841 | if (autoconf --version) < /dev/null > /dev/null 2>&1; then | |
842 | AUTOCONF=autoconf | |
843 | echo "$ac_t""found" 1>&6 | |
844 | else | |
845 | AUTOCONF="$missing_dir/missing autoconf" | |
846 | echo "$ac_t""missing" 1>&6 | |
847 | fi | |
848 | ||
849 | echo $ac_n "checking for working automake""... $ac_c" 1>&6 | |
48401fcf | 850 | echo "configure:851: checking for working automake" >&5 |
e2b4bd2a ILT |
851 | # Run test in a subshell; some versions of sh will print an error if |
852 | # an executable is not found, even if stderr is redirected. | |
853 | # Redirect stdin to placate older versions of autoconf. Sigh. | |
854 | if (automake --version) < /dev/null > /dev/null 2>&1; then | |
855 | AUTOMAKE=automake | |
856 | echo "$ac_t""found" 1>&6 | |
857 | else | |
858 | AUTOMAKE="$missing_dir/missing automake" | |
859 | echo "$ac_t""missing" 1>&6 | |
860 | fi | |
861 | ||
862 | echo $ac_n "checking for working autoheader""... $ac_c" 1>&6 | |
48401fcf | 863 | echo "configure:864: checking for working autoheader" >&5 |
e2b4bd2a ILT |
864 | # Run test in a subshell; some versions of sh will print an error if |
865 | # an executable is not found, even if stderr is redirected. | |
866 | # Redirect stdin to placate older versions of autoconf. Sigh. | |
867 | if (autoheader --version) < /dev/null > /dev/null 2>&1; then | |
868 | AUTOHEADER=autoheader | |
869 | echo "$ac_t""found" 1>&6 | |
870 | else | |
871 | AUTOHEADER="$missing_dir/missing autoheader" | |
872 | echo "$ac_t""missing" 1>&6 | |
873 | fi | |
874 | ||
875 | echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6 | |
48401fcf | 876 | echo "configure:877: checking for working makeinfo" >&5 |
e2b4bd2a ILT |
877 | # Run test in a subshell; some versions of sh will print an error if |
878 | # an executable is not found, even if stderr is redirected. | |
879 | # Redirect stdin to placate older versions of autoconf. Sigh. | |
880 | if (makeinfo --version) < /dev/null > /dev/null 2>&1; then | |
881 | MAKEINFO=makeinfo | |
882 | echo "$ac_t""found" 1>&6 | |
883 | else | |
884 | MAKEINFO="$missing_dir/missing makeinfo" | |
885 | echo "$ac_t""missing" 1>&6 | |
886 | fi | |
887 | ||
e2b4bd2a ILT |
888 | |
889 | ||
fc6f7f6c ILT |
890 | # Check whether --enable-shared or --disable-shared was given. |
891 | if test "${enable_shared+set}" = set; then | |
892 | enableval="$enable_shared" | |
893 | p=${PACKAGE-default} | |
894 | case "$enableval" in | |
895 | yes) enable_shared=yes ;; | |
896 | no) enable_shared=no ;; | |
897 | *) | |
898 | enable_shared=no | |
899 | # Look at the argument we got. We use all the common list separators. | |
900 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," | |
901 | for pkg in $enableval; do | |
902 | if test "X$pkg" = "X$p"; then | |
903 | enable_shared=yes | |
904 | fi | |
905 | done | |
906 | IFS="$ac_save_ifs" | |
907 | ;; | |
908 | esac | |
909 | else | |
910 | enable_shared=yes | |
911 | fi | |
912 | ||
913 | # Check whether --enable-static or --disable-static was given. | |
914 | if test "${enable_static+set}" = set; then | |
915 | enableval="$enable_static" | |
916 | p=${PACKAGE-default} | |
917 | case "$enableval" in | |
918 | yes) enable_static=yes ;; | |
919 | no) enable_static=no ;; | |
920 | *) | |
921 | enable_static=no | |
922 | # Look at the argument we got. We use all the common list separators. | |
923 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," | |
924 | for pkg in $enableval; do | |
925 | if test "X$pkg" = "X$p"; then | |
926 | enable_static=yes | |
927 | fi | |
928 | done | |
929 | IFS="$ac_save_ifs" | |
930 | ;; | |
931 | esac | |
932 | else | |
933 | enable_static=yes | |
934 | fi | |
935 | ||
a52052db ILT |
936 | # Extract the first word of "ranlib", so it can be a program name with args. |
937 | set dummy ranlib; ac_word=$2 | |
938 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
48401fcf | 939 | echo "configure:940: checking for $ac_word" >&5 |
a52052db ILT |
940 | if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then |
941 | echo $ac_n "(cached) $ac_c" 1>&6 | |
942 | else | |
943 | if test -n "$RANLIB"; then | |
944 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. | |
945 | else | |
946 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
947 | for ac_dir in $PATH; do | |
948 | test -z "$ac_dir" && ac_dir=. | |
949 | if test -f $ac_dir/$ac_word; then | |
950 | ac_cv_prog_RANLIB="ranlib" | |
951 | break | |
952 | fi | |
953 | done | |
954 | IFS="$ac_save_ifs" | |
955 | test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":" | |
956 | fi | |
957 | fi | |
958 | RANLIB="$ac_cv_prog_RANLIB" | |
959 | if test -n "$RANLIB"; then | |
960 | echo "$ac_t""$RANLIB" 1>&6 | |
961 | else | |
962 | echo "$ac_t""no" 1>&6 | |
963 | fi | |
964 | ||
e2b4bd2a ILT |
965 | # Extract the first word of "gcc", so it can be a program name with args. |
966 | set dummy gcc; ac_word=$2 | |
967 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
48401fcf | 968 | echo "configure:969: checking for $ac_word" >&5 |
e2b4bd2a ILT |
969 | if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then |
970 | echo $ac_n "(cached) $ac_c" 1>&6 | |
971 | else | |
972 | if test -n "$CC"; then | |
973 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
974 | else | |
975 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
976 | for ac_dir in $PATH; do | |
977 | test -z "$ac_dir" && ac_dir=. | |
978 | if test -f $ac_dir/$ac_word; then | |
979 | ac_cv_prog_CC="gcc" | |
980 | break | |
981 | fi | |
982 | done | |
983 | IFS="$ac_save_ifs" | |
984 | fi | |
985 | fi | |
986 | CC="$ac_cv_prog_CC" | |
987 | if test -n "$CC"; then | |
988 | echo "$ac_t""$CC" 1>&6 | |
989 | else | |
990 | echo "$ac_t""no" 1>&6 | |
991 | fi | |
992 | ||
993 | if test -z "$CC"; then | |
994 | # Extract the first word of "cc", so it can be a program name with args. | |
995 | set dummy cc; ac_word=$2 | |
996 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
48401fcf | 997 | echo "configure:998: checking for $ac_word" >&5 |
e2b4bd2a ILT |
998 | if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then |
999 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1000 | else | |
1001 | if test -n "$CC"; then | |
1002 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
1003 | else | |
1004 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
1005 | ac_prog_rejected=no | |
1006 | for ac_dir in $PATH; do | |
1007 | test -z "$ac_dir" && ac_dir=. | |
1008 | if test -f $ac_dir/$ac_word; then | |
1009 | if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then | |
1010 | ac_prog_rejected=yes | |
1011 | continue | |
1012 | fi | |
1013 | ac_cv_prog_CC="cc" | |
1014 | break | |
1015 | fi | |
1016 | done | |
1017 | IFS="$ac_save_ifs" | |
1018 | if test $ac_prog_rejected = yes; then | |
1019 | # We found a bogon in the path, so make sure we never use it. | |
1020 | set dummy $ac_cv_prog_CC | |
1021 | shift | |
1022 | if test $# -gt 0; then | |
1023 | # We chose a different compiler from the bogus one. | |
1024 | # However, it has the same basename, so the bogon will be chosen | |
1025 | # first if we set CC to just the basename; use the full file name. | |
1026 | shift | |
1027 | set dummy "$ac_dir/$ac_word" "$@" | |
1028 | shift | |
1029 | ac_cv_prog_CC="$@" | |
1030 | fi | |
1031 | fi | |
1032 | fi | |
1033 | fi | |
1034 | CC="$ac_cv_prog_CC" | |
1035 | if test -n "$CC"; then | |
1036 | echo "$ac_t""$CC" 1>&6 | |
1037 | else | |
1038 | echo "$ac_t""no" 1>&6 | |
1039 | fi | |
1040 | ||
1041 | test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } | |
1042 | fi | |
1043 | ||
1044 | echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 | |
48401fcf | 1045 | echo "configure:1046: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 |
e2b4bd2a ILT |
1046 | |
1047 | ac_ext=c | |
1048 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. | |
1049 | ac_cpp='$CPP $CPPFLAGS' | |
1050 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' | |
1051 | ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' | |
1052 | cross_compiling=$ac_cv_prog_cc_cross | |
1053 | ||
1054 | cat > conftest.$ac_ext <<EOF | |
48401fcf | 1055 | #line 1056 "configure" |
e2b4bd2a ILT |
1056 | #include "confdefs.h" |
1057 | main(){return(0);} | |
1058 | EOF | |
48401fcf | 1059 | if { (eval echo configure:1060: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then |
e2b4bd2a ILT |
1060 | ac_cv_prog_cc_works=yes |
1061 | # If we can't run a trivial program, we are probably using a cross compiler. | |
1062 | if (./conftest; exit) 2>/dev/null; then | |
1063 | ac_cv_prog_cc_cross=no | |
1064 | else | |
1065 | ac_cv_prog_cc_cross=yes | |
1066 | fi | |
1067 | else | |
1068 | echo "configure: failed program was:" >&5 | |
1069 | cat conftest.$ac_ext >&5 | |
1070 | ac_cv_prog_cc_works=no | |
1071 | fi | |
1072 | rm -fr conftest* | |
1073 | ||
1074 | echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 | |
1075 | if test $ac_cv_prog_cc_works = no; then | |
1076 | { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } | |
1077 | fi | |
1078 | echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 | |
48401fcf | 1079 | echo "configure:1080: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 |
e2b4bd2a ILT |
1080 | echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 |
1081 | cross_compiling=$ac_cv_prog_cc_cross | |
1082 | ||
1083 | echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 | |
48401fcf | 1084 | echo "configure:1085: checking whether we are using GNU C" >&5 |
e2b4bd2a ILT |
1085 | if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then |
1086 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1087 | else | |
1088 | cat > conftest.c <<EOF | |
1089 | #ifdef __GNUC__ | |
1090 | yes; | |
1091 | #endif | |
1092 | EOF | |
48401fcf | 1093 | if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1094: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then |
e2b4bd2a ILT |
1094 | ac_cv_prog_gcc=yes |
1095 | else | |
1096 | ac_cv_prog_gcc=no | |
1097 | fi | |
1098 | fi | |
1099 | ||
1100 | echo "$ac_t""$ac_cv_prog_gcc" 1>&6 | |
1101 | ||
1102 | if test $ac_cv_prog_gcc = yes; then | |
1103 | GCC=yes | |
1104 | ac_test_CFLAGS="${CFLAGS+set}" | |
1105 | ac_save_CFLAGS="$CFLAGS" | |
1106 | CFLAGS= | |
1107 | echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 | |
48401fcf | 1108 | echo "configure:1109: checking whether ${CC-cc} accepts -g" >&5 |
e2b4bd2a ILT |
1109 | if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then |
1110 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1111 | else | |
1112 | echo 'void f(){}' > conftest.c | |
1113 | if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then | |
1114 | ac_cv_prog_cc_g=yes | |
1115 | else | |
1116 | ac_cv_prog_cc_g=no | |
1117 | fi | |
1118 | rm -f conftest* | |
1119 | ||
1120 | fi | |
1121 | ||
1122 | echo "$ac_t""$ac_cv_prog_cc_g" 1>&6 | |
1123 | if test "$ac_test_CFLAGS" = set; then | |
1124 | CFLAGS="$ac_save_CFLAGS" | |
1125 | elif test $ac_cv_prog_cc_g = yes; then | |
1126 | CFLAGS="-g -O2" | |
1127 | else | |
1128 | CFLAGS="-O2" | |
1129 | fi | |
1130 | else | |
1131 | GCC= | |
1132 | test "${CFLAGS+set}" = set || CFLAGS="-g" | |
1133 | fi | |
1134 | ||
e2b4bd2a ILT |
1135 | # Check whether --with-gnu-ld or --without-gnu-ld was given. |
1136 | if test "${with_gnu_ld+set}" = set; then | |
1137 | withval="$with_gnu_ld" | |
1138 | test "$withval" = no || with_gnu_ld=yes | |
1139 | else | |
1140 | with_gnu_ld=no | |
1141 | fi | |
1142 | ||
a52052db ILT |
1143 | |
1144 | ac_prog=ld | |
1145 | if test "$ac_cv_prog_gcc" = yes; then | |
1146 | # Check if gcc -print-prog-name=ld gives a path. | |
1147 | echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6 | |
48401fcf | 1148 | echo "configure:1149: checking for ld used by GCC" >&5 |
a52052db ILT |
1149 | ac_prog=`($CC -print-prog-name=ld) 2>&5` |
1150 | case "$ac_prog" in | |
1151 | # Accept absolute paths. | |
fc6f7f6c | 1152 | /* | [A-Za-z]:\\*) |
a52052db ILT |
1153 | test -z "$LD" && LD="$ac_prog" |
1154 | ;; | |
1155 | "") | |
1156 | # If it fails, then pretend we aren't using GCC. | |
1157 | ac_prog=ld | |
1158 | ;; | |
1159 | *) | |
1160 | # If it is relative, then search for the first ld in PATH. | |
1161 | with_gnu_ld=unknown | |
1162 | ;; | |
1163 | esac | |
1164 | elif test "$with_gnu_ld" = yes; then | |
e2b4bd2a | 1165 | echo $ac_n "checking for GNU ld""... $ac_c" 1>&6 |
48401fcf | 1166 | echo "configure:1167: checking for GNU ld" >&5 |
e2b4bd2a ILT |
1167 | else |
1168 | echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6 | |
48401fcf | 1169 | echo "configure:1170: checking for non-GNU ld" >&5 |
e2b4bd2a ILT |
1170 | fi |
1171 | if eval "test \"`echo '$''{'ac_cv_path_LD'+set}'`\" = set"; then | |
1172 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1173 | else | |
a52052db | 1174 | if test -z "$LD"; then |
e2b4bd2a ILT |
1175 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" |
1176 | for ac_dir in $PATH; do | |
1177 | test -z "$ac_dir" && ac_dir=. | |
a52052db ILT |
1178 | if test -f "$ac_dir/$ac_prog"; then |
1179 | ac_cv_path_LD="$ac_dir/$ac_prog" | |
e2b4bd2a ILT |
1180 | # Check to see if the program is GNU ld. I'd rather use --version, |
1181 | # but apparently some GNU ld's only accept -v. | |
1182 | # Break only if it was the GNU/non-GNU ld that we prefer. | |
a52052db ILT |
1183 | if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then |
1184 | test "$with_gnu_ld" != no && break | |
e2b4bd2a ILT |
1185 | else |
1186 | test "$with_gnu_ld" != yes && break | |
1187 | fi | |
1188 | fi | |
1189 | done | |
1190 | IFS="$ac_save_ifs" | |
a52052db | 1191 | else |
6cc7a938 | 1192 | ac_cv_path_LD="$LD" # Let the user override the test with a path. |
a52052db | 1193 | fi |
e2b4bd2a ILT |
1194 | fi |
1195 | ||
1196 | LD="$ac_cv_path_LD" | |
1197 | if test -n "$LD"; then | |
1198 | echo "$ac_t""$LD" 1>&6 | |
1199 | else | |
1200 | echo "$ac_t""no" 1>&6 | |
1201 | fi | |
1202 | test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; } | |
1203 | ||
a52052db | 1204 | echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6 |
48401fcf | 1205 | echo "configure:1206: checking if the linker ($LD) is GNU ld" >&5 |
e2b4bd2a ILT |
1206 | if eval "test \"`echo '$''{'ac_cv_prog_gnu_ld'+set}'`\" = set"; then |
1207 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1208 | else | |
1209 | # I'd rather use --version here, but apparently some GNU ld's only accept -v. | |
a52052db | 1210 | if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then |
e2b4bd2a ILT |
1211 | ac_cv_prog_gnu_ld=yes |
1212 | else | |
1213 | ac_cv_prog_gnu_ld=no | |
1214 | fi | |
1215 | fi | |
1216 | ||
1217 | echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6 | |
1218 | ||
1219 | ||
a52052db | 1220 | echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6 |
48401fcf | 1221 | echo "configure:1222: checking for BSD-compatible nm" >&5 |
a52052db ILT |
1222 | if eval "test \"`echo '$''{'ac_cv_path_NM'+set}'`\" = set"; then |
1223 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1224 | else | |
b2bb41f6 | 1225 | if test -z "$NM"; then |
a52052db ILT |
1226 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" |
1227 | for ac_dir in /usr/ucb /usr/ccs/bin $PATH /bin; do | |
fc6f7f6c | 1228 | test -z "$ac_dir" && ac_dir=. |
a52052db ILT |
1229 | if test -f $ac_dir/nm; then |
1230 | # Check to see if the nm accepts a BSD-compat flag. | |
fc6f7f6c | 1231 | # Adding the `sed 1q' prevents false positives on HP-UX, which says: |
a52052db | 1232 | # nm: unknown option "B" ignored |
fc6f7f6c | 1233 | if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then |
a52052db | 1234 | ac_cv_path_NM="$ac_dir/nm -B" |
fc6f7f6c | 1235 | elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then |
a52052db ILT |
1236 | ac_cv_path_NM="$ac_dir/nm -p" |
1237 | else | |
1238 | ac_cv_path_NM="$ac_dir/nm" | |
1239 | fi | |
1240 | break | |
1241 | fi | |
1242 | done | |
1243 | IFS="$ac_save_ifs" | |
1244 | test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm | |
b2bb41f6 ILT |
1245 | else |
1246 | ac_cv_path_NM="$NM" # Let the user override the test with a path. | |
1247 | fi | |
a52052db ILT |
1248 | fi |
1249 | ||
1250 | NM="$ac_cv_path_NM" | |
1251 | echo "$ac_t""$NM" 1>&6 | |
1252 | ||
1253 | ||
e2b4bd2a | 1254 | echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 |
48401fcf | 1255 | echo "configure:1256: checking whether ln -s works" >&5 |
e2b4bd2a ILT |
1256 | if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then |
1257 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1258 | else | |
1259 | rm -f conftestdata | |
1260 | if ln -s X conftestdata 2>/dev/null | |
1261 | then | |
1262 | rm -f conftestdata | |
1263 | ac_cv_prog_LN_S="ln -s" | |
1264 | else | |
1265 | ac_cv_prog_LN_S=ln | |
1266 | fi | |
1267 | fi | |
1268 | LN_S="$ac_cv_prog_LN_S" | |
1269 | if test "$ac_cv_prog_LN_S" = "ln -s"; then | |
1270 | echo "$ac_t""yes" 1>&6 | |
1271 | else | |
1272 | echo "$ac_t""no" 1>&6 | |
1273 | fi | |
1274 | ||
b2bb41f6 ILT |
1275 | if test $host != $build; then |
1276 | ac_tool_prefix=${host_alias}- | |
1277 | else | |
1278 | ac_tool_prefix= | |
1279 | fi | |
1280 | ||
e2b4bd2a | 1281 | # Always use our own libtool. |
0040c1e9 | 1282 | LIBTOOL='$(SHELL) $(top_builddir)/libtool' |
e2b4bd2a | 1283 | |
fc6f7f6c ILT |
1284 | # Check for any special flags to pass to ltconfig. |
1285 | libtool_flags= | |
1286 | test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared" | |
1287 | test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static" | |
e2b4bd2a ILT |
1288 | test "$silent" = yes && libtool_flags="$libtool_flags --silent" |
1289 | test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc" | |
1290 | test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld" | |
1291 | ||
1292 | # Some flags need to be propagated to the compiler or linker for good | |
1293 | # libtool support. | |
1294 | case "$host" in | |
fc6f7f6c | 1295 | *-*-irix6*) |
7ee4e307 | 1296 | # Find out which ABI we are using. |
48401fcf TT |
1297 | echo '#line 1298 "configure"' > conftest.$ac_ext |
1298 | if { (eval echo configure:1299: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then | |
7ee4e307 ILT |
1299 | case "`/usr/bin/file conftest.o`" in |
1300 | *32-bit*) | |
1301 | LD="${LD-ld} -32" | |
a52052db | 1302 | ;; |
7ee4e307 ILT |
1303 | *N32*) |
1304 | LD="${LD-ld} -n32" | |
1305 | ;; | |
1306 | *64-bit*) | |
1307 | LD="${LD-ld} -64" | |
a52052db ILT |
1308 | ;; |
1309 | esac | |
7ee4e307 ILT |
1310 | fi |
1311 | rm -rf conftest* | |
e2b4bd2a ILT |
1312 | ;; |
1313 | ||
1314 | *-*-sco3.2v5*) | |
1315 | # On SCO OpenServer 5, we need -belf to get full-featured binaries. | |
1316 | CFLAGS="$CFLAGS -belf" | |
1317 | ;; | |
b2bb41f6 ILT |
1318 | |
1319 | *-*-cygwin32*) | |
1320 | # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. | |
1321 | set dummy ${ac_tool_prefix}dlltool; ac_word=$2 | |
1322 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
48401fcf | 1323 | echo "configure:1324: checking for $ac_word" >&5 |
b2bb41f6 ILT |
1324 | if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL'+set}'`\" = set"; then |
1325 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1326 | else | |
1327 | if test -n "$DLLTOOL"; then | |
1328 | ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. | |
1329 | else | |
1330 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
1331 | for ac_dir in $PATH; do | |
1332 | test -z "$ac_dir" && ac_dir=. | |
1333 | if test -f $ac_dir/$ac_word; then | |
1334 | ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" | |
1335 | break | |
1336 | fi | |
1337 | done | |
1338 | IFS="$ac_save_ifs" | |
1339 | fi | |
1340 | fi | |
1341 | DLLTOOL="$ac_cv_prog_DLLTOOL" | |
1342 | if test -n "$DLLTOOL"; then | |
1343 | echo "$ac_t""$DLLTOOL" 1>&6 | |
1344 | else | |
1345 | echo "$ac_t""no" 1>&6 | |
1346 | fi | |
1347 | ||
1348 | ||
1349 | if test -z "$ac_cv_prog_DLLTOOL"; then | |
1350 | if test -n "$ac_tool_prefix"; then | |
1351 | # Extract the first word of "dlltool", so it can be a program name with args. | |
1352 | set dummy dlltool; ac_word=$2 | |
1353 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
48401fcf | 1354 | echo "configure:1355: checking for $ac_word" >&5 |
b2bb41f6 ILT |
1355 | if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL'+set}'`\" = set"; then |
1356 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1357 | else | |
1358 | if test -n "$DLLTOOL"; then | |
1359 | ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. | |
1360 | else | |
1361 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
1362 | for ac_dir in $PATH; do | |
1363 | test -z "$ac_dir" && ac_dir=. | |
1364 | if test -f $ac_dir/$ac_word; then | |
1365 | ac_cv_prog_DLLTOOL="dlltool" | |
1366 | break | |
1367 | fi | |
1368 | done | |
1369 | IFS="$ac_save_ifs" | |
1370 | test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="false" | |
1371 | fi | |
1372 | fi | |
1373 | DLLTOOL="$ac_cv_prog_DLLTOOL" | |
1374 | if test -n "$DLLTOOL"; then | |
1375 | echo "$ac_t""$DLLTOOL" 1>&6 | |
1376 | else | |
1377 | echo "$ac_t""no" 1>&6 | |
1378 | fi | |
1379 | ||
1380 | else | |
1381 | DLLTOOL="false" | |
1382 | fi | |
1383 | fi | |
1384 | ||
1385 | # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args. | |
1386 | set dummy ${ac_tool_prefix}as; ac_word=$2 | |
1387 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
48401fcf | 1388 | echo "configure:1389: checking for $ac_word" >&5 |
b2bb41f6 ILT |
1389 | if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then |
1390 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1391 | else | |
1392 | if test -n "$AS"; then | |
1393 | ac_cv_prog_AS="$AS" # Let the user override the test. | |
1394 | else | |
1395 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
1396 | for ac_dir in $PATH; do | |
1397 | test -z "$ac_dir" && ac_dir=. | |
1398 | if test -f $ac_dir/$ac_word; then | |
1399 | ac_cv_prog_AS="${ac_tool_prefix}as" | |
1400 | break | |
1401 | fi | |
1402 | done | |
1403 | IFS="$ac_save_ifs" | |
1404 | fi | |
1405 | fi | |
1406 | AS="$ac_cv_prog_AS" | |
1407 | if test -n "$AS"; then | |
1408 | echo "$ac_t""$AS" 1>&6 | |
1409 | else | |
1410 | echo "$ac_t""no" 1>&6 | |
1411 | fi | |
1412 | ||
1413 | ||
1414 | if test -z "$ac_cv_prog_AS"; then | |
1415 | if test -n "$ac_tool_prefix"; then | |
1416 | # Extract the first word of "as", so it can be a program name with args. | |
1417 | set dummy as; ac_word=$2 | |
1418 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
48401fcf | 1419 | echo "configure:1420: checking for $ac_word" >&5 |
b2bb41f6 ILT |
1420 | if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then |
1421 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1422 | else | |
1423 | if test -n "$AS"; then | |
1424 | ac_cv_prog_AS="$AS" # Let the user override the test. | |
1425 | else | |
1426 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
1427 | for ac_dir in $PATH; do | |
1428 | test -z "$ac_dir" && ac_dir=. | |
1429 | if test -f $ac_dir/$ac_word; then | |
1430 | ac_cv_prog_AS="as" | |
1431 | break | |
1432 | fi | |
1433 | done | |
1434 | IFS="$ac_save_ifs" | |
1435 | test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="false" | |
1436 | fi | |
1437 | fi | |
1438 | AS="$ac_cv_prog_AS" | |
1439 | if test -n "$AS"; then | |
1440 | echo "$ac_t""$AS" 1>&6 | |
1441 | else | |
1442 | echo "$ac_t""no" 1>&6 | |
1443 | fi | |
1444 | ||
1445 | else | |
1446 | AS="false" | |
1447 | fi | |
1448 | fi | |
1449 | ||
1450 | ||
1451 | ;; | |
1452 | ||
e2b4bd2a ILT |
1453 | esac |
1454 | ||
1455 | # Actually configure libtool. ac_aux_dir is where install-sh is found. | |
1456 | CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \ | |
a52052db | 1457 | LD="$LD" NM="$NM" RANLIB="$RANLIB" LN_S="$LN_S" \ |
b2bb41f6 | 1458 | DLLTOOL="$DLLTOOL" AS="$AS" \ |
e2b4bd2a ILT |
1459 | ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig \ |
1460 | $libtool_flags --no-verify $ac_aux_dir/ltmain.sh $host \ | |
1461 | || { echo "configure: error: libtool configure failed" 1>&2; exit 1; } | |
1462 | ||
1463 | ||
1464 | user_bfd_gas= | |
1465 | # Check whether --enable-bfd-assembler or --disable-bfd-assembler was given. | |
1466 | if test "${enable_bfd_assembler+set}" = set; then | |
1467 | enableval="$enable_bfd_assembler" | |
1468 | case "${enableval}" in | |
1469 | yes) need_bfd=yes user_bfd_gas=yes ;; | |
1470 | no) user_bfd_gas=no ;; | |
1471 | *) { echo "configure: error: bad value ${enableval} given for bfd-assembler option" 1>&2; exit 1; } ;; | |
1472 | esac | |
1473 | fi | |
1474 | # Check whether --enable-targets or --disable-targets was given. | |
1475 | if test "${enable_targets+set}" = set; then | |
1476 | enableval="$enable_targets" | |
1477 | case "${enableval}" in | |
1478 | yes | "") { echo "configure: error: enable-targets option must specify target names or 'all'" 1>&2; exit 1; } | |
1479 | ;; | |
1480 | no) enable_targets= ;; | |
1481 | *) enable_targets=$enableval ;; | |
1482 | esac | |
1483 | fi | |
1484 | # Check whether --enable-commonbfdlib or --disable-commonbfdlib was given. | |
1485 | if test "${enable_commonbfdlib+set}" = set; then | |
1486 | enableval="$enable_commonbfdlib" | |
1487 | case "${enableval}" in | |
1488 | yes) commonbfdlib=true ;; | |
1489 | no) commonbfdlib=false ;; | |
1490 | *) { echo "configure: error: bad value ${enableval} for BFD commonbfdlib option" 1>&2; exit 1; } ;; | |
1491 | esac | |
1492 | fi | |
1493 | ||
1494 | # Generate a header file | |
b11fb939 | 1495 | |
318b02b6 | 1496 | |
318b02b6 | 1497 | |
b11fb939 | 1498 | |
e7757ad0 | 1499 | te_file=generic |
b11fb939 | 1500 | |
e7757ad0 KR |
1501 | canon_targets="" |
1502 | if test -n "$enable_targets" ; then | |
1503 | for t in `echo $enable_targets | sed 's/,/ /g'`; do | |
ec2f730d | 1504 | result=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $t 2>/dev/null` |
e7757ad0 KR |
1505 | if test -n "$result" ; then |
1506 | canon_targets="$canon_targets $result" | |
1507 | # else | |
1508 | # # Permit "all", etc. We don't support it yet though. | |
1509 | # canon_targets="$canon_targets $t" | |
1510 | fi | |
1511 | done | |
1512 | _gas_uniq_list="$canon_targets" | |
1513 | _gas_uniq_newlist="" | |
1514 | for _gas_uniq_i in _gas_uniq_dummy $_gas_uniq_list ; do | |
1515 | case $_gas_uniq_i in | |
1516 | _gas_uniq_dummy) ;; | |
1517 | *) case " $_gas_uniq_newlist " in | |
1518 | *" $_gas_uniq_i "*) ;; | |
1519 | *) _gas_uniq_newlist="$_gas_uniq_newlist $_gas_uniq_i" ;; | |
1520 | esac ;; | |
1521 | esac | |
1522 | done | |
1523 | canon_targets=$_gas_uniq_newlist | |
b11fb939 | 1524 | |
e7757ad0 | 1525 | fi |
b11fb939 | 1526 | |
e7757ad0 KR |
1527 | emulations="" |
1528 | ||
1529 | for this_target in $target $canon_targets ; do | |
1530 | ||
64556643 | 1531 | eval `echo $this_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/cpu=\1 vendor=\2 os=\3/'` |
e7757ad0 KR |
1532 | |
1533 | # check for architecture variants | |
2b09622a | 1534 | arch= |
6ff87ead | 1535 | endian= |
e7757ad0 | 1536 | case ${cpu} in |
0170f1c3 | 1537 | alpha*) cpu_type=alpha ;; |
ae09d880 ILT |
1538 | armeb) cpu_type=arm endian=big ;; |
1539 | arm*) cpu_type=arm endian=little ;; | |
76fb6d2f | 1540 | thumb*) cpu_type=arm endian=little ;; |
e7757ad0 | 1541 | hppa*) cpu_type=hppa ;; |
7c2fadd1 | 1542 | i[456]86) cpu_type=i386 ;; |
e7757ad0 KR |
1543 | m680[012346]0) cpu_type=m68k ;; |
1544 | m68008) cpu_type=m68k ;; | |
1545 | m683??) cpu_type=m68k ;; | |
1546 | m8*) cpu_type=m88k ;; | |
e16b9537 | 1547 | mips*el) cpu_type=mips endian=little ;; |
01c655cc | 1548 | # start-sanitize-r5900 |
ea1c39ce | 1549 | mips*5900*) cpu_type=mips endian=little ;; |
01c655cc | 1550 | # end-sanitize-r5900 |
e7757ad0 KR |
1551 | mips*) cpu_type=mips endian=big ;; |
1552 | powerpcle*) cpu_type=ppc endian=little ;; | |
1553 | powerpc*) cpu_type=ppc endian=big ;; | |
1554 | rs6000*) cpu_type=ppc ;; | |
2b09622a DE |
1555 | sparclite*) cpu_type=sparc arch=sparclite ;; |
1556 | sparclet*) cpu_type=sparc arch=sparclet ;; | |
70ee7782 | 1557 | sparc64*) cpu_type=sparc arch=v9-64 ;; |
307edcc0 | 1558 | sparc86x*) cpu_type=sparc arch=sparc86x ;; |
2b09622a | 1559 | sparc*) cpu_type=sparc arch=sparclite ;; # ??? See tc-sparc.c. |
756adc97 | 1560 | v850*) cpu_type=v850 ;; |
a1c7c0f3 | 1561 | *) cpu_type=${cpu} ;; |
e7757ad0 KR |
1562 | esac |
1563 | ||
1564 | if test ${this_target} = $target ; then | |
1565 | target_cpu_type=${cpu_type} | |
6ff87ead NC |
1566 | if test x${endian} = xbig; then |
1567 | cat >> confdefs.h <<\EOF | |
1568 | #define TARGET_BYTES_BIG_ENDIAN 1 | |
1569 | EOF | |
1570 | ||
1571 | elif test x${endian} = xlittle; then | |
1572 | cat >> confdefs.h <<\EOF | |
1573 | #define TARGET_BYTES_BIG_ENDIAN 0 | |
1574 | EOF | |
1575 | ||
1576 | fi | |
e7757ad0 KR |
1577 | elif test ${target_cpu_type} != ${cpu_type} ; then |
1578 | continue | |
1579 | fi | |
1580 | ||
e7757ad0 KR |
1581 | generic_target=${cpu_type}-$vendor-$os |
1582 | dev=no | |
1583 | bfd_gas=no | |
1584 | em=generic | |
1585 | ||
1586 | # assign object format | |
1587 | case ${generic_target} in | |
6ff87ead NC |
1588 | a29k-*-coff) fmt=coff ;; |
1589 | a29k-amd-udi) fmt=coff ;; | |
1590 | a29k-amd-ebmon) fmt=coff ;; | |
1591 | a29k-nyu-sym1) fmt=coff ;; | |
e7757ad0 KR |
1592 | a29k-*-vxworks*) fmt=coff ;; |
1593 | ||
0170f1c3 RH |
1594 | alpha*-*-*vms*) fmt=evax ;; |
1595 | alpha*-*-netware*) fmt=ecoff ;; | |
1596 | alpha*-*-openbsd*) fmt=ecoff ;; | |
1597 | alpha*-*-osf*) fmt=ecoff ;; | |
1598 | alpha*-*-linuxecoff*) fmt=ecoff ;; | |
69d0b6d3 ILT |
1599 | alpha*-*-linux-gnu*) fmt=elf em=linux ;; |
1600 | alpha*-*-netbsd*) fmt=elf em=nbsd ;; | |
b11fb939 | 1601 | |
e7757ad0 | 1602 | arc-*-elf*) fmt=elf bfd_gas=yes ;; |
4181c985 | 1603 | |
6ff87ead NC |
1604 | arm-*-riscix*) fmt=aout em=riscix ;; |
1605 | arm-*-aout) fmt=aout ;; | |
76fb6d2f | 1606 | arm-*-coff | thumb-*-coff) fmt=coff ;; |
e7757ad0 | 1607 | arm-*-riscix*) fmt=aout ;; |
22d3fbd6 | 1608 | arm-*-pe | thumb-*-pe) fmt=coff em=pe ;; |
e7757ad0 | 1609 | |
cbe7dccb | 1610 | d10v-*-*) fmt=elf bfd_gas=yes ;; |
7d0f8249 MH |
1611 | # start-sanitize-d30v |
1612 | d30v-*-*) fmt=elf bfd_gas=yes ;; | |
1613 | # end-sanitize-d30v | |
7be9a312 | 1614 | |
e7757ad0 KR |
1615 | hppa-*-*elf*) fmt=elf em=hppa ;; |
1616 | hppa-*-lites*) fmt=elf em=hppa ;; | |
1617 | hppa-*-osf*) fmt=som em=hppa ;; | |
332d5c49 | 1618 | hppa-*-rtems*) fmt=elf em=hppa ;; |
e7757ad0 KR |
1619 | hppa-*-hpux*) fmt=som em=hppa ;; |
1620 | hppa-*-bsd*) fmt=som em=hppa ;; | |
1621 | hppa-*-hiux*) fmt=som em=hppa ;; | |
1622 | ||
1623 | h8300-*-coff) fmt=coff ;; | |
1624 | ||
6ff87ead | 1625 | i386-ibm-aix*) fmt=coff em=i386aix ;; |
7d0f8249 | 1626 | i386-sequent-bsd*) fmt=aout em=dynix bfd_gas=yes ;; |
e7757ad0 KR |
1627 | i386-*-bsd*) fmt=aout em=386bsd ;; |
1628 | i386-*-netbsd0.8) fmt=aout em=386bsd ;; | |
1629 | i386-*-netbsd*) fmt=aout em=nbsd bfd_gas=yes;; | |
76fb6d2f | 1630 | i386-*-openbsd*) fmt=aout em=nbsd bfd_gas=yes;; |
a1c7c0f3 | 1631 | i386-*-linux*aout* | i386-*-linuxoldld) fmt=aout em=linux ;; |
6ff87ead | 1632 | i386-*-linux*coff*) fmt=coff em=linux ;; |
69d0b6d3 | 1633 | i386-*-linux-gnu*) fmt=elf em=linux ;; |
6ff87ead | 1634 | i386-*-lynxos*) fmt=coff em=lynx ;; |
427a886a | 1635 | i386-*-sysv4* | i386-*-solaris* | i386-*-elf) |
e7757ad0 | 1636 | fmt=elf ;; |
427a886a ILT |
1637 | i386-*-freebsdelf*) fmt=elf ;; |
1638 | i386-*-freebsd*) fmt=aout em=386bsd ;; | |
6cc7a938 ILT |
1639 | i386-*-coff | i386-*-sysv* | i386-*-sco3.2v5*coff | i386-*-isc*) |
1640 | fmt=coff ;; | |
1641 | i386-*-sco3.2v5*) fmt=elf | |
6ff87ead NC |
1642 | if test ${this_target} = $target; then |
1643 | cat >> confdefs.h <<\EOF | |
1644 | #define SCO_ELF 1 | |
1645 | EOF | |
1646 | ||
1647 | fi | |
1648 | ;; | |
6cc7a938 | 1649 | i386-*-sco3.2*) fmt=coff ;; |
e7757ad0 | 1650 | i386-*-vsta) fmt=aout ;; |
60dc9fb2 | 1651 | i386-*-msdosdjgpp* | i386-*-go32* | i386-go32-rtems*) |
6ff87ead NC |
1652 | fmt=coff em=go32;; |
1653 | i386-*-rtems*) fmt=coff ;; | |
6c186c48 SC |
1654 | i386-*-gnu*) fmt=elf ;; |
1655 | i386-*-mach*) | |
e7757ad0 KR |
1656 | fmt=aout em=mach bfd_gas=yes ;; |
1657 | i386-*-msdos*) fmt=aout ;; | |
6c186c48 | 1658 | i386-*-moss*) fmt=elf ;; |
6ff87ead | 1659 | i386-*-pe) fmt=coff em=pe ;; |
0040c1e9 ILT |
1660 | i386-*-cygwin32*) fmt=coff em=pe bfd_gas=yes ;; |
1661 | i386-*-mingw32*) fmt=coff em=pe bfd_gas=yes ;; | |
1662 | i386-*-*nt*) fmt=coff em=pe ;; | |
e7757ad0 | 1663 | i960-*-bout) fmt=bout ;; |
6ff87ead NC |
1664 | i960-*-coff) fmt=coff em=ic960 ;; |
1665 | i960-*-rtems*) fmt=coff em=ic960 ;; | |
e7757ad0 KR |
1666 | i960-*-nindy*) fmt=bout ;; |
1667 | i960-*-vxworks4*) fmt=bout ;; | |
1668 | i960-*-vxworks5.0) fmt=bout ;; | |
6ff87ead | 1669 | i960-*-vxworks5.*) fmt=coff em=ic960 ;; |
e7757ad0 KR |
1670 | i960-*-vxworks*) fmt=bout ;; |
1671 | ||
374bdac7 DE |
1672 | m32r-*-*) fmt=elf bfd_gas=yes ;; |
1673 | ||
e7757ad0 KR |
1674 | m68k-*-vxworks* | m68k-ericsson-ose | m68k-*-sunos*) |
1675 | fmt=aout em=sun3 ;; | |
6ff87ead NC |
1676 | m68k-motorola-sysv*) fmt=coff em=delta ;; |
1677 | m68k-bull-sysv3*) fmt=coff em=dpx2 ;; | |
1678 | m68k-apollo-*) fmt=coff em=apollo ;; | |
fee3e248 ILT |
1679 | m68k-*-sysv4*) # must be before -sysv* |
1680 | fmt=elf em=svr4 ;; | |
1681 | m68k-*-elf*) fmt=elf ;; | |
7be9a312 | 1682 | m68k-*-coff | m68k-*-sysv* | m68k-*-rtems*) |
6ff87ead | 1683 | fmt=coff ;; |
e7757ad0 | 1684 | m68k-*-hpux*) fmt=hp300 em=hp300 ;; |
535cfd0f | 1685 | m68k-*-linux*aout*) fmt=aout em=linux ;; |
69d0b6d3 | 1686 | m68k-*-linux-gnu*) fmt=elf em=linux ;; |
6ff87ead | 1687 | m68k-*-lynxos*) fmt=coff em=lynx ;; |
e7757ad0 | 1688 | m68k-*-netbsd*) fmt=aout em=nbsd bfd_gas=yes ;; |
76fb6d2f | 1689 | m68k-*-openbsd*) fmt=aout em=nbsd bfd_gas=yes ;; |
6ff87ead | 1690 | m68k-apple-aux*) fmt=coff em=aux ;; |
2b37714a | 1691 | m68k-*-psos*) fmt=elf em=psos;; |
e7757ad0 | 1692 | |
6ff87ead NC |
1693 | m88k-motorola-sysv3*) fmt=coff em=delt88 ;; |
1694 | m88k-*-coff*) fmt=coff ;; | |
e7757ad0 KR |
1695 | |
1696 | # don't change em like *-*-bsd does | |
6ff87ead NC |
1697 | mips-dec-netbsd*) fmt=elf endian=little ;; |
1698 | mips-dec-openbsd*) fmt=elf endian=little ;; | |
1699 | mips-dec-bsd*) fmt=aout ;; | |
1700 | mips-sony-bsd*) fmt=ecoff ;; | |
e7757ad0 | 1701 | mips-*-bsd*) { echo "configure: error: Unknown vendor for mips-bsd configuration." 1>&2; exit 1; } ;; |
6ff87ead NC |
1702 | mips-*-ultrix*) fmt=ecoff endian=little ;; |
1703 | mips-*-osf*) fmt=ecoff endian=little ;; | |
1704 | mips-*-ecoff*) fmt=ecoff ;; | |
1705 | mips-*-ecoff*) fmt=ecoff ;; | |
1706 | mips-*-irix6*) fmt=elf ;; | |
1707 | mips-*-irix5*) fmt=elf ;; | |
1708 | mips-*-irix*) fmt=ecoff ;; | |
1709 | mips-*-lnews*) fmt=ecoff em=lnews ;; | |
1710 | mips-*-riscos*) fmt=ecoff ;; | |
1711 | mips-*-sysv*) fmt=ecoff ;; | |
69d0b6d3 | 1712 | mips-*-elf* | mips-*-rtems* | mips-*-linux-gnu* | mips-*-gnu* | mips-*-openbsd*) |
6ff87ead | 1713 | fmt=elf ;; |
ae1b99e4 JL |
1714 | mn10200-*-*) fmt=elf bfd_gas=yes ;; |
1715 | mn10300-*-*) fmt=elf bfd_gas=yes ;; | |
0ff513d9 | 1716 | ppc-*-pe | ppc-*-cygwin32 | ppc-*-winnt*) |
6ff87ead | 1717 | fmt=coff em=pe ;; |
e7757ad0 | 1718 | ppc-*-aix*) fmt=coff ;; |
515c7142 | 1719 | ppc-*-beos*) fmt=coff ;; |
76fb6d2f | 1720 | ppc-*-*bsd* | ppc-*-elf* | ppc-*-eabi* | ppc-*-sysv4*) |
6ff87ead | 1721 | fmt=elf ;; |
69d0b6d3 | 1722 | ppc-*-linux-gnu*) fmt=elf |
159e6ef8 | 1723 | case "$endian" in |
6ff87ead | 1724 | big) ;; |
69d0b6d3 | 1725 | *) { echo "configure: error: GNU/Linux must be configured big endian" 1>&2; exit 1; } ;; |
159e6ef8 MM |
1726 | esac |
1727 | ;; | |
1728 | ppc-*-solaris*) fmt=elf | |
6ff87ead NC |
1729 | if test ${this_target} = $target; then |
1730 | cat >> confdefs.h <<\EOF | |
1731 | #define TARGET_SOLARIS_COMMENT 1 | |
1732 | EOF | |
1733 | ||
1734 | fi | |
1735 | if test x${endian} = xbig; then | |
1736 | { echo "configure: error: Solaris must be configured little endian" 1>&2; exit 1; } | |
1737 | fi | |
7be9a312 | 1738 | ;; |
6ff87ead | 1739 | ppc-*-rtems*) fmt=elf ;; |
880b7429 KR |
1740 | ppc-*-macos* | ppc-*-mpw*) |
1741 | fmt=coff em=macos ;; | |
e7757ad0 KR |
1742 | ppc-*-netware*) fmt=elf em=ppcnw ;; |
1743 | ||
df4021c1 DE |
1744 | sh-*-elf*) fmt=elf ;; |
1745 | sh-*-coff*) fmt=coff ;; | |
f3aa01e2 | 1746 | sh-*-rtems*) fmt=coff ;; |
b11fb939 | 1747 | |
5f757edc ILT |
1748 | ns32k-pc532-mach* | ns32k-pc532-ux*) fmt=aout em=pc532mach ;; |
1749 | ns32k-pc532-netbsd* | ns32k-pc532-lites*) fmt=aout em=nbsd532 ;; | |
76fb6d2f | 1750 | ns32k-pc532-openbsd*) fmt=aout em=nbsd532 ;; |
e7757ad0 | 1751 | |
7be9a312 | 1752 | sparc-*-rtems*) fmt=aout ;; |
e7757ad0 | 1753 | sparc-*-sunos4*) fmt=aout em=sun3 ;; |
df586de2 | 1754 | sparc-*-aout | sparc*-*-vxworks*) |
df4021c1 | 1755 | fmt=aout em=sparcaout ;; |
e7757ad0 | 1756 | sparc-*-coff) fmt=coff ;; |
2e013bb7 | 1757 | sparc-*-linux*aout*) fmt=aout em=linux ;; |
69d0b6d3 | 1758 | sparc-*-linux-gnu*) fmt=elf em=linux ;; |
e7757ad0 KR |
1759 | sparc-*-lynxos*) fmt=coff em=lynx ;; |
1760 | sparc-fujitsu-none) fmt=aout ;; | |
0b27ea39 | 1761 | sparc-*-elf | sparc-*-sysv4* | sparc-*-solaris*) |
e7757ad0 KR |
1762 | fmt=elf ;; |
1763 | sparc-*-netbsd*) fmt=aout em=nbsd bfd_gas=yes ;; | |
76fb6d2f | 1764 | sparc-*-openbsd*) fmt=aout em=nbsd bfd_gas=yes ;; |
e7757ad0 | 1765 | |
0e034c77 ILT |
1766 | tic30-*-*aout*) fmt=aout bfd_gas=yes ;; |
1767 | tic30-*-*coff*) fmt=coff bfd_gas=yes ;; | |
64556643 | 1768 | # start-sanitize-tic80 |
6ff87ead | 1769 | tic80-*-*) fmt=coff ;; |
64556643 | 1770 | # end-sanitize-tic80 |
103dd764 DE |
1771 | |
1772 | # start-sanitize-sky | |
98b155a2 | 1773 | dvp-*-*) fmt=elf bfd_gas=yes ;; |
103dd764 DE |
1774 | # end-sanitize-sky |
1775 | ||
c6aa56bc | 1776 | v850-*-*) fmt=elf bfd_gas=yes ;; |
53bdc990 | 1777 | |
6ff87ead | 1778 | # start-sanitize-v850e |
53bdc990 | 1779 | v850e-*-*) fmt=elf bfd_gas=yes ;; |
60dc9fb2 | 1780 | v850ea-*-*) fmt=elf bfd_gas=yes ;; |
b5db0960 | 1781 | # end-sanitize-v850e |
e7757ad0 KR |
1782 | vax-*-bsd* | vax-*-ultrix*) |
1783 | fmt=aout ;; | |
1784 | vax-*-vms) fmt=vms ;; | |
1785 | ||
1786 | z8k-*-coff | z8k-*-sim) | |
1787 | fmt=coff ;; | |
1788 | ||
1789 | w65-*-*) fmt=coff ;; | |
1790 | ||
1791 | *-*-aout | *-*-scout) | |
1792 | fmt=aout ;; | |
1793 | *-*-nindy*) | |
1794 | fmt=bout ;; | |
1795 | *-*-bsd*) | |
1796 | fmt=aout em=sun3 ;; | |
1797 | *-*-generic) fmt=generic ;; | |
1798 | *-*-xray | *-*-hms) fmt=coff ;; | |
1799 | *-*-sim) fmt=coff ;; | |
1800 | *-*-elf | *-*-sysv4* | *-*-solaris*) | |
6df07e7f | 1801 | echo "configure: warning: GAS support for ${generic_target} is incomplete." 1>&2 |
e7757ad0 KR |
1802 | fmt=elf dev=yes ;; |
1803 | *-*-vxworks) fmt=aout ;; | |
1804 | *-*-netware) fmt=elf ;; | |
1805 | esac | |
1806 | ||
1807 | case ${cpu_type}-${fmt} in | |
ed1ed9f9 | 1808 | alpha*-*) bfd_gas=yes ;; |
e7757ad0 KR |
1809 | arm-*) bfd_gas=yes ;; |
1810 | # not yet | |
1811 | # i386-aout) bfd_gas=preferred ;; | |
1812 | mips-*) bfd_gas=yes ;; | |
1813 | ns32k-*) bfd_gas=yes ;; | |
1814 | ppc-*) bfd_gas=yes ;; | |
1815 | sparc-*) bfd_gas=yes ;; | |
1816 | *-elf) bfd_gas=yes ;; | |
1817 | *-ecoff) bfd_gas=yes ;; | |
1818 | *-som) bfd_gas=yes ;; | |
1819 | *) ;; | |
1820 | esac | |
1821 | ||
5f757edc ILT |
1822 | # Other random stuff. |
1823 | ||
ae09d880 ILT |
1824 | # do we need the opcodes library? |
1825 | case ${cpu_type} in | |
0e034c77 | 1826 | vax | i386 | tic30) |
7c2fadd1 ILT |
1827 | ;; |
1828 | *) | |
1829 | need_opcodes=yes | |
f2e272e0 ILT |
1830 | |
1831 | case "${enable_shared}" in | |
1832 | yes) shared_opcodes=true ;; | |
1833 | *opcodes*) shared_opcodes=true ;; | |
1834 | *) shared_opcodes=false ;; | |
1835 | esac | |
159e6ef8 | 1836 | if test "${shared_opcodes}" = "true"; then |
7c2fadd1 ILT |
1837 | # A shared libopcodes must be linked against libbfd. |
1838 | need_bfd=yes | |
1839 | fi | |
1840 | ;; | |
ae09d880 ILT |
1841 | esac |
1842 | ||
5f757edc | 1843 | case ${cpu_type} in |
374bdac7 DE |
1844 | m32r) |
1845 | case ${extra_objects} in | |
1846 | *cgen.o*) ;; | |
1847 | *) extra_objects="$extra_objects cgen.o" | |
374bdac7 DE |
1848 | cat >> confdefs.h <<\EOF |
1849 | #define USING_CGEN 1 | |
1850 | EOF | |
1851 | ||
1852 | ;; | |
1853 | esac | |
1854 | ;; | |
1855 | ||
1c9dbb83 ILT |
1856 | m68k) |
1857 | case ${extra_objects} in | |
1858 | *m68k-parse.o*) ;; | |
1859 | *) extra_objects="$extra_objects m68k-parse.o" ;; | |
1860 | esac | |
1861 | ;; | |
efec4a28 DP |
1862 | |
1863 | mips) | |
1864 | echo ${extra_objects} | grep -s "itbl-parse.o" | |
1865 | if test $? -ne 0 ; then | |
515c7142 | 1866 | extra_objects="$extra_objects itbl-parse.o" |
efec4a28 DP |
1867 | fi |
1868 | ||
1869 | echo ${extra_objects} | grep -s "itbl-lex.o" | |
1870 | if test $? -ne 0 ; then | |
515c7142 | 1871 | extra_objects="$extra_objects itbl-lex.o" |
efec4a28 DP |
1872 | fi |
1873 | ||
1874 | echo ${extra_objects} | grep -s "itbl-ops.o" | |
1875 | if test $? -ne 0 ; then | |
515c7142 | 1876 | extra_objects="$extra_objects itbl-ops.o" |
efec4a28 DP |
1877 | fi |
1878 | ;; | |
1879 | ||
2b09622a | 1880 | sparc) |
e01e18a8 DE |
1881 | if test $this_target = $target ; then |
1882 | cat >> confdefs.h <<EOF | |
2b09622a DE |
1883 | #define DEFAULT_ARCH "${arch}" |
1884 | EOF | |
1885 | ||
e01e18a8 | 1886 | fi |
2b09622a DE |
1887 | ;; |
1888 | ||
efec4a28 DP |
1889 | *) |
1890 | ;; | |
5f757edc ILT |
1891 | esac |
1892 | ||
e7757ad0 KR |
1893 | # See if we really can support this configuration with the emulation code. |
1894 | ||
1895 | if test $this_target = $target ; then | |
1896 | primary_bfd_gas=$bfd_gas | |
1897 | obj_format=$fmt | |
e7757ad0 KR |
1898 | te_file=$em |
1899 | ||
1900 | if test $bfd_gas = no ; then | |
1901 | # Can't support other configurations this way. | |
1902 | break | |
1903 | fi | |
1904 | elif test $bfd_gas = no ; then | |
1905 | # Can't support this configuration. | |
1906 | break | |
1907 | fi | |
1908 | ||
1909 | # From target name and format, produce a list of supported emulations. | |
1910 | ||
1911 | case ${generic_target}-${fmt} in | |
1cb0d00d | 1912 | mips-*-irix5*-*) emulation="mipsbelf mipslelf mipself mipsbecoff mipslecoff mipsecoff" ;; |
69d0b6d3 | 1913 | mips-*-linux-gnu*-*) case "$endian" in |
515c7142 ILT |
1914 | big) emulation="mipsbelf mipslelf mipself mipsbecoff mipslecoff mipsecoff" ;; |
1915 | *) emulation="mipslelf mipsbelf mipself mipslecoff mipsbecoff mipsecoff" ;; | |
1916 | esac ;; | |
1917 | mips-*-lnews*-ecoff) ;; | |
e7757ad0 | 1918 | mips-*-*-ecoff) case "$endian" in |
1cb0d00d KR |
1919 | big) emulation="mipsbecoff mipslecoff mipsecoff" ;; |
1920 | *) emulation="mipslecoff mipsbecoff mipsecoff" ;; | |
e7757ad0 KR |
1921 | esac ;; |
1922 | mips-*-*-elf) case "$endian" in | |
1cb0d00d KR |
1923 | big) emulation="mipsbelf mipslelf mipself" ;; |
1924 | *) emulation="mipslelf mipsbelf mipself" ;; | |
515c7142 ILT |
1925 | # Uncommenting the next line will turn on support for i386 COFF |
1926 | # in any i386 ELF configuration. This probably doesn't work | |
1927 | # correctly. | |
1928 | # i386-*-*-elf) emulation="i386coff i386elf" ;; | |
e7757ad0 KR |
1929 | esac ;; |
1930 | esac | |
1931 | ||
1932 | emulations="$emulations $emulation" | |
1933 | ||
e7757ad0 | 1934 | done |
b11fb939 KR |
1935 | |
1936 | # Assign floating point type. Most processors with FP support | |
1937 | # IEEE FP. On those that don't support FP at all, usually IEEE | |
1938 | # is emulated. | |
1939 | case ${target_cpu} in | |
1940 | vax | tahoe ) atof=${target_cpu} ;; | |
e7757ad0 | 1941 | *) atof=ieee ;; |
b11fb939 KR |
1942 | esac |
1943 | ||
1944 | case "${obj_format}" in | |
ba49e48d | 1945 | "") { echo "configure: error: GAS does not know what format to use for target ${target}" 1>&2; exit 1; } ;; |
b11fb939 KR |
1946 | esac |
1947 | ||
1948 | ||
bf4bd1fc ILT |
1949 | if test ! -r ${srcdir}/config/tc-${target_cpu_type}.c; then |
1950 | { echo "configure: error: GAS does not support target CPU ${target_cpu_type}" 1>&2; exit 1; } | |
b11fb939 KR |
1951 | fi |
1952 | ||
fb589130 | 1953 | if test ! -r ${srcdir}/config/obj-${obj_format}.c; then |
ba49e48d | 1954 | { echo "configure: error: GAS does not have support for object file format ${obj_format}" 1>&2; exit 1; } |
b11fb939 KR |
1955 | fi |
1956 | ||
e7757ad0 | 1957 | case ${user_bfd_gas}-${primary_bfd_gas} in |
b11fb939 KR |
1958 | yes-yes | no-no) |
1959 | # We didn't override user's choice. | |
1960 | ;; | |
1961 | no-yes) | |
1962 | echo "configure: warning: Use of BFD is required for ${target}; overriding config options." 1>&2 | |
1963 | ;; | |
1964 | no-preferred) | |
e7757ad0 | 1965 | primary_bfd_gas=no |
b11fb939 KR |
1966 | ;; |
1967 | *-preferred) | |
e7757ad0 | 1968 | primary_bfd_gas=yes |
b11fb939 | 1969 | ;; |
ba49e48d | 1970 | yes-*) |
e7757ad0 | 1971 | primary_bfd_gas=yes |
ba49e48d | 1972 | ;; |
b11fb939 KR |
1973 | -*) |
1974 | # User specified nothing. | |
1975 | ;; | |
1976 | esac | |
1977 | ||
e7757ad0 KR |
1978 | # Some COFF configurations want these random other flags set. |
1979 | case ${obj_format} in | |
1980 | coff) | |
1981 | case ${target_cpu_type} in | |
1982 | i386) cat >> confdefs.h <<\EOF | |
1983 | #define I386COFF 1 | |
1984 | EOF | |
1985 | ;; | |
1986 | m68k) cat >> confdefs.h <<\EOF | |
1987 | #define M68KCOFF 1 | |
1988 | EOF | |
1989 | ;; | |
1990 | m88k) cat >> confdefs.h <<\EOF | |
1991 | #define M88KCOFF 1 | |
1992 | EOF | |
1993 | ;; | |
1994 | esac | |
1995 | ;; | |
1996 | esac | |
1997 | ||
1998 | # Getting this done right is going to be a bitch. Each configuration specified | |
1999 | # with --enable-targets=... should be checked for environment, format, cpu, and | |
2000 | # bfd_gas setting. | |
2001 | # | |
2002 | # For each configuration, the necessary object file support code must be linked | |
2003 | # in. This might be only one, it might be up to four. The necessary emulation | |
2004 | # code needs to be provided, too. | |
2005 | # | |
2006 | # And then there's "--enable-targets=all".... | |
2007 | # | |
2008 | # For now, just always do it for MIPS ELF or ECOFF configurations. Sigh. | |
2009 | ||
2010 | formats="${obj_format}" | |
2011 | emfiles="" | |
2012 | EMULATIONS="" | |
2013 | _gas_uniq_list="$emulations" | |
2014 | _gas_uniq_newlist="" | |
2015 | for _gas_uniq_i in _gas_uniq_dummy $_gas_uniq_list ; do | |
2016 | case $_gas_uniq_i in | |
2017 | _gas_uniq_dummy) ;; | |
2018 | *) case " $_gas_uniq_newlist " in | |
2019 | *" $_gas_uniq_i "*) ;; | |
2020 | *) _gas_uniq_newlist="$_gas_uniq_newlist $_gas_uniq_i" ;; | |
2021 | esac ;; | |
2022 | esac | |
2023 | done | |
2024 | emulations=$_gas_uniq_newlist | |
2025 | ||
2026 | for em in . $emulations ; do | |
2027 | case $em in | |
2028 | .) continue ;; | |
2029 | mipsbelf | mipslelf) | |
2030 | fmt=elf file=mipself ;; | |
2031 | mipsbecoff | mipslecoff) | |
2032 | fmt=ecoff file=mipsecoff ;; | |
515c7142 ILT |
2033 | i386coff) |
2034 | fmt=coff file=i386coff ;; | |
2035 | i386elf) | |
2036 | fmt=elf file=i386elf ;; | |
e7757ad0 KR |
2037 | esac |
2038 | formats="$formats $fmt" | |
2039 | emfiles="$emfiles e-$file.o" | |
2040 | EMULATIONS="$EMULATIONS &$em," | |
2041 | done | |
2042 | _gas_uniq_list="$formats" | |
2043 | _gas_uniq_newlist="" | |
2044 | for _gas_uniq_i in _gas_uniq_dummy $_gas_uniq_list ; do | |
2045 | case $_gas_uniq_i in | |
2046 | _gas_uniq_dummy) ;; | |
2047 | *) case " $_gas_uniq_newlist " in | |
2048 | *" $_gas_uniq_i "*) ;; | |
2049 | *) _gas_uniq_newlist="$_gas_uniq_newlist $_gas_uniq_i" ;; | |
2050 | esac ;; | |
2051 | esac | |
2052 | done | |
2053 | formats=$_gas_uniq_newlist | |
2054 | ||
2055 | _gas_uniq_list="$emfiles" | |
2056 | _gas_uniq_newlist="" | |
2057 | for _gas_uniq_i in _gas_uniq_dummy $_gas_uniq_list ; do | |
2058 | case $_gas_uniq_i in | |
2059 | _gas_uniq_dummy) ;; | |
2060 | *) case " $_gas_uniq_newlist " in | |
2061 | *" $_gas_uniq_i "*) ;; | |
2062 | *) _gas_uniq_newlist="$_gas_uniq_newlist $_gas_uniq_i" ;; | |
2063 | esac ;; | |
2064 | esac | |
2065 | done | |
2066 | emfiles=$_gas_uniq_newlist | |
2067 | ||
2068 | if test `set . $formats ; shift ; echo $#` -gt 1 ; then | |
2069 | for fmt in $formats ; do | |
2070 | case $fmt in | |
2071 | aout) cat >> confdefs.h <<\EOF | |
2072 | #define OBJ_MAYBE_AOUT 1 | |
2073 | EOF | |
2074 | ;; | |
2075 | bout) cat >> confdefs.h <<\EOF | |
2076 | #define OBJ_MAYBE_BOUT 1 | |
2077 | EOF | |
2078 | ;; | |
2079 | coff) cat >> confdefs.h <<\EOF | |
2080 | #define OBJ_MAYBE_COFF 1 | |
2081 | EOF | |
2082 | ;; | |
2083 | ecoff) cat >> confdefs.h <<\EOF | |
2084 | #define OBJ_MAYBE_ECOFF 1 | |
2085 | EOF | |
2086 | ;; | |
2087 | elf) cat >> confdefs.h <<\EOF | |
2088 | #define OBJ_MAYBE_ELF 1 | |
2089 | EOF | |
2090 | ;; | |
2091 | generic) cat >> confdefs.h <<\EOF | |
2092 | #define OBJ_MAYBE_GENERIC 1 | |
2093 | EOF | |
2094 | ;; | |
2095 | hp300) cat >> confdefs.h <<\EOF | |
2096 | #define OBJ_MAYBE_HP300 1 | |
2097 | EOF | |
2098 | ;; | |
2099 | ieee) cat >> confdefs.h <<\EOF | |
2100 | #define OBJ_MAYBE_IEEE 1 | |
2101 | EOF | |
2102 | ;; | |
2103 | som) cat >> confdefs.h <<\EOF | |
2104 | #define OBJ_MAYBE_SOM 1 | |
2105 | EOF | |
2106 | ;; | |
2107 | vms) cat >> confdefs.h <<\EOF | |
2108 | #define OBJ_MAYBE_VMS 1 | |
2109 | EOF | |
2110 | ;; | |
2111 | esac | |
2112 | extra_objects="$extra_objects obj-$fmt.o" | |
2113 | done | |
2114 | obj_format=multi | |
2115 | fi | |
2116 | if test `set . $emfiles ; shift ; echo $#` -gt 0 ; then | |
2117 | te_file=multi | |
2118 | extra_objects="$extra_objects $emfiles" | |
2119 | DEFAULT_EMULATION=`set . $emulations ; echo $2` | |
2120 | cat >> confdefs.h <<\EOF | |
2121 | #define USE_EMULATIONS 1 | |
2122 | EOF | |
2123 | ||
2124 | fi | |
2125 | ||
2126 | cat >> confdefs.h <<EOF | |
2127 | #define EMULATIONS $EMULATIONS | |
2128 | EOF | |
2129 | ||
2130 | cat >> confdefs.h <<EOF | |
2131 | #define DEFAULT_EMULATION "$DEFAULT_EMULATION" | |
2132 | EOF | |
2133 | ||
2134 | ||
bf4bd1fc | 2135 | case ${primary_bfd_gas}-${target_cpu_type}-${obj_format} in |
318b02b6 KR |
2136 | yes-*-coff) need_bfd=yes ;; |
2137 | no-*-coff) need_bfd=yes | |
2138 | cat >> confdefs.h <<\EOF | |
2139 | #define MANY_SEGMENTS 1 | |
2140 | EOF | |
2141 | ;; | |
2142 | esac | |
2143 | ||
b11fb939 KR |
2144 | reject_dev_configs=yes |
2145 | ||
2146 | case ${reject_dev_configs}-${dev} in | |
2147 | yes-yes) # Oops. | |
ba49e48d | 2148 | { echo "configure: error: GAS does not support the ${generic_target} configuration." 1>&2; exit 1; } |
b11fb939 KR |
2149 | ;; |
2150 | esac | |
2151 | ||
b11fb939 KR |
2152 | |
2153 | ||
833c46e1 KR |
2154 | |
2155 | ||
2156 | ||
e7757ad0 | 2157 | case "${primary_bfd_gas}" in |
b11fb939 KR |
2158 | yes) cat >> confdefs.h <<\EOF |
2159 | #define BFD_ASSEMBLER 1 | |
2160 | EOF | |
2161 | ||
2162 | need_bfd=yes ;; | |
2163 | esac | |
2164 | ||
ae09d880 ILT |
2165 | # do we need the opcodes library? |
2166 | case "${need_opcodes}" in | |
7be9a312 | 2167 | yes) |
e2b4bd2a | 2168 | OPCODES_LIB=../opcodes/libopcodes.la |
7be9a312 | 2169 | ;; |
ae09d880 ILT |
2170 | esac |
2171 | ||
b11fb939 | 2172 | case "${need_bfd}" in |
7be9a312 | 2173 | yes) |
e2b4bd2a | 2174 | BFDLIB=../bfd/libbfd.la |
7be9a312 | 2175 | ALL_OBJ_DEPS="$ALL_OBJ_DEPS ../bfd/bfd.h" |
7be9a312 | 2176 | ;; |
b11fb939 KR |
2177 | esac |
2178 | ||
2179 | ||
2180 | ||
1c9dbb83 | 2181 | |
2e013bb7 ILT |
2182 | |
2183 | ||
b11fb939 KR |
2184 | cat >> confdefs.h <<EOF |
2185 | #define TARGET_ALIAS "${target_alias}" | |
2186 | EOF | |
2187 | ||
2188 | cat >> confdefs.h <<EOF | |
2189 | #define TARGET_CANONICAL "${target}" | |
2190 | EOF | |
2191 | ||
2192 | cat >> confdefs.h <<EOF | |
2193 | #define TARGET_CPU "${target_cpu}" | |
2194 | EOF | |
2195 | ||
2196 | cat >> confdefs.h <<EOF | |
2197 | #define TARGET_VENDOR "${target_vendor}" | |
2198 | EOF | |
2199 | ||
2200 | cat >> confdefs.h <<EOF | |
2201 | #define TARGET_OS "${target_os}" | |
2202 | EOF | |
2203 | ||
2204 | ||
330add8a ILT |
2205 | # Extract the first word of "gcc", so it can be a program name with args. |
2206 | set dummy gcc; ac_word=$2 | |
2207 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
48401fcf | 2208 | echo "configure:2209: checking for $ac_word" >&5 |
330add8a ILT |
2209 | if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then |
2210 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2211 | else | |
2212 | if test -n "$CC"; then | |
2213 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
2214 | else | |
2215 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
2216 | for ac_dir in $PATH; do | |
2217 | test -z "$ac_dir" && ac_dir=. | |
2218 | if test -f $ac_dir/$ac_word; then | |
2219 | ac_cv_prog_CC="gcc" | |
2220 | break | |
2221 | fi | |
2222 | done | |
2223 | IFS="$ac_save_ifs" | |
330add8a ILT |
2224 | fi |
2225 | fi | |
2226 | CC="$ac_cv_prog_CC" | |
2227 | if test -n "$CC"; then | |
2228 | echo "$ac_t""$CC" 1>&6 | |
2229 | else | |
2230 | echo "$ac_t""no" 1>&6 | |
2231 | fi | |
2232 | ||
d0352cbb DE |
2233 | if test -z "$CC"; then |
2234 | # Extract the first word of "cc", so it can be a program name with args. | |
2235 | set dummy cc; ac_word=$2 | |
2236 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
48401fcf | 2237 | echo "configure:2238: checking for $ac_word" >&5 |
d0352cbb DE |
2238 | if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then |
2239 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2240 | else | |
2241 | if test -n "$CC"; then | |
2242 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
2243 | else | |
2244 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
2245 | ac_prog_rejected=no | |
2246 | for ac_dir in $PATH; do | |
2247 | test -z "$ac_dir" && ac_dir=. | |
2248 | if test -f $ac_dir/$ac_word; then | |
2249 | if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then | |
2250 | ac_prog_rejected=yes | |
2251 | continue | |
2252 | fi | |
2253 | ac_cv_prog_CC="cc" | |
2254 | break | |
2255 | fi | |
2256 | done | |
2257 | IFS="$ac_save_ifs" | |
2258 | if test $ac_prog_rejected = yes; then | |
2259 | # We found a bogon in the path, so make sure we never use it. | |
2260 | set dummy $ac_cv_prog_CC | |
2261 | shift | |
2262 | if test $# -gt 0; then | |
2263 | # We chose a different compiler from the bogus one. | |
2264 | # However, it has the same basename, so the bogon will be chosen | |
2265 | # first if we set CC to just the basename; use the full file name. | |
2266 | shift | |
2267 | set dummy "$ac_dir/$ac_word" "$@" | |
2268 | shift | |
2269 | ac_cv_prog_CC="$@" | |
2270 | fi | |
2271 | fi | |
2272 | fi | |
2273 | fi | |
2274 | CC="$ac_cv_prog_CC" | |
2275 | if test -n "$CC"; then | |
2276 | echo "$ac_t""$CC" 1>&6 | |
2277 | else | |
2278 | echo "$ac_t""no" 1>&6 | |
2279 | fi | |
2280 | ||
2281 | test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } | |
2282 | fi | |
b11fb939 | 2283 | |
c6c7035c | 2284 | echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 |
48401fcf | 2285 | echo "configure:2286: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 |
c6c7035c MM |
2286 | |
2287 | ac_ext=c | |
2288 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. | |
2289 | ac_cpp='$CPP $CPPFLAGS' | |
2290 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' | |
2291 | ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' | |
2292 | cross_compiling=$ac_cv_prog_cc_cross | |
2293 | ||
2294 | cat > conftest.$ac_ext <<EOF | |
48401fcf | 2295 | #line 2296 "configure" |
c6c7035c MM |
2296 | #include "confdefs.h" |
2297 | main(){return(0);} | |
2298 | EOF | |
48401fcf | 2299 | if { (eval echo configure:2300: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then |
c6c7035c MM |
2300 | ac_cv_prog_cc_works=yes |
2301 | # If we can't run a trivial program, we are probably using a cross compiler. | |
2302 | if (./conftest; exit) 2>/dev/null; then | |
2303 | ac_cv_prog_cc_cross=no | |
2304 | else | |
2305 | ac_cv_prog_cc_cross=yes | |
2306 | fi | |
2307 | else | |
2308 | echo "configure: failed program was:" >&5 | |
2309 | cat conftest.$ac_ext >&5 | |
2310 | ac_cv_prog_cc_works=no | |
2311 | fi | |
2312 | rm -fr conftest* | |
2313 | ||
2314 | echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 | |
2315 | if test $ac_cv_prog_cc_works = no; then | |
2316 | { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } | |
2317 | fi | |
2318 | echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 | |
48401fcf | 2319 | echo "configure:2320: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 |
c6c7035c MM |
2320 | echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 |
2321 | cross_compiling=$ac_cv_prog_cc_cross | |
2322 | ||
330add8a | 2323 | echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 |
48401fcf | 2324 | echo "configure:2325: checking whether we are using GNU C" >&5 |
330add8a ILT |
2325 | if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then |
2326 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2327 | else | |
2328 | cat > conftest.c <<EOF | |
b11fb939 | 2329 | #ifdef __GNUC__ |
330add8a | 2330 | yes; |
b11fb939 KR |
2331 | #endif |
2332 | EOF | |
48401fcf | 2333 | if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2334: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then |
330add8a ILT |
2334 | ac_cv_prog_gcc=yes |
2335 | else | |
2336 | ac_cv_prog_gcc=no | |
2337 | fi | |
2338 | fi | |
1c9dbb83 | 2339 | |
330add8a | 2340 | echo "$ac_t""$ac_cv_prog_gcc" 1>&6 |
c6c7035c | 2341 | |
330add8a | 2342 | if test $ac_cv_prog_gcc = yes; then |
b11fb939 | 2343 | GCC=yes |
c6c7035c MM |
2344 | ac_test_CFLAGS="${CFLAGS+set}" |
2345 | ac_save_CFLAGS="$CFLAGS" | |
2346 | CFLAGS= | |
2347 | echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 | |
48401fcf | 2348 | echo "configure:2349: checking whether ${CC-cc} accepts -g" >&5 |
c6c7035c | 2349 | if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then |
330add8a | 2350 | echo $ac_n "(cached) $ac_c" 1>&6 |
b11fb939 | 2351 | else |
330add8a ILT |
2352 | echo 'void f(){}' > conftest.c |
2353 | if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then | |
c6c7035c | 2354 | ac_cv_prog_cc_g=yes |
330add8a | 2355 | else |
c6c7035c | 2356 | ac_cv_prog_cc_g=no |
b11fb939 KR |
2357 | fi |
2358 | rm -f conftest* | |
2359 | ||
330add8a | 2360 | fi |
1c9dbb83 | 2361 | |
c6c7035c MM |
2362 | echo "$ac_t""$ac_cv_prog_cc_g" 1>&6 |
2363 | if test "$ac_test_CFLAGS" = set; then | |
2364 | CFLAGS="$ac_save_CFLAGS" | |
2365 | elif test $ac_cv_prog_cc_g = yes; then | |
2366 | CFLAGS="-g -O2" | |
2367 | else | |
2368 | CFLAGS="-O2" | |
330add8a ILT |
2369 | fi |
2370 | else | |
2371 | GCC= | |
2372 | test "${CFLAGS+set}" = set || CFLAGS="-g" | |
2373 | fi | |
2374 | ||
b11fb939 | 2375 | |
e2b4bd2a ILT |
2376 | for ac_prog in 'bison -y' byacc |
2377 | do | |
2378 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
2379 | set dummy $ac_prog; ac_word=$2 | |
2380 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
48401fcf | 2381 | echo "configure:2382: checking for $ac_word" >&5 |
e2b4bd2a ILT |
2382 | if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then |
2383 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2384 | else | |
2385 | if test -n "$YACC"; then | |
2386 | ac_cv_prog_YACC="$YACC" # Let the user override the test. | |
2387 | else | |
2388 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
2389 | for ac_dir in $PATH; do | |
2390 | test -z "$ac_dir" && ac_dir=. | |
2391 | if test -f $ac_dir/$ac_word; then | |
2392 | ac_cv_prog_YACC="$ac_prog" | |
2393 | break | |
2394 | fi | |
2395 | done | |
2396 | IFS="$ac_save_ifs" | |
2397 | fi | |
2398 | fi | |
2399 | YACC="$ac_cv_prog_YACC" | |
2400 | if test -n "$YACC"; then | |
2401 | echo "$ac_t""$YACC" 1>&6 | |
2402 | else | |
2403 | echo "$ac_t""no" 1>&6 | |
2404 | fi | |
2405 | ||
2406 | test -n "$YACC" && break | |
2407 | done | |
2408 | test -n "$YACC" || YACC="yacc" | |
2409 | ||
b2bb41f6 | 2410 | echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 |
48401fcf | 2411 | echo "configure:2412: checking how to run the C preprocessor" >&5 |
b2bb41f6 ILT |
2412 | # On Suns, sometimes $CPP names a directory. |
2413 | if test -n "$CPP" && test -d "$CPP"; then | |
2414 | CPP= | |
2415 | fi | |
2416 | if test -z "$CPP"; then | |
2417 | if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then | |
2418 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2419 | else | |
2420 | # This must be in double quotes, not single quotes, because CPP may get | |
2421 | # substituted into the Makefile and "${CC-cc}" will confuse make. | |
2422 | CPP="${CC-cc} -E" | |
2423 | # On the NeXT, cc -E runs the code through the compiler's parser, | |
2424 | # not just through cpp. | |
2425 | cat > conftest.$ac_ext <<EOF | |
48401fcf | 2426 | #line 2427 "configure" |
b2bb41f6 ILT |
2427 | #include "confdefs.h" |
2428 | #include <assert.h> | |
2429 | Syntax Error | |
2430 | EOF | |
2431 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
48401fcf | 2432 | { (eval echo configure:2433: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
b2bb41f6 ILT |
2433 | ac_err=`grep -v '^ *+' conftest.out` |
2434 | if test -z "$ac_err"; then | |
2435 | : | |
2436 | else | |
2437 | echo "$ac_err" >&5 | |
2438 | echo "configure: failed program was:" >&5 | |
2439 | cat conftest.$ac_ext >&5 | |
2440 | rm -rf conftest* | |
2441 | CPP="${CC-cc} -E -traditional-cpp" | |
2442 | cat > conftest.$ac_ext <<EOF | |
48401fcf | 2443 | #line 2444 "configure" |
b2bb41f6 ILT |
2444 | #include "confdefs.h" |
2445 | #include <assert.h> | |
2446 | Syntax Error | |
2447 | EOF | |
2448 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
48401fcf | 2449 | { (eval echo configure:2450: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
b2bb41f6 ILT |
2450 | ac_err=`grep -v '^ *+' conftest.out` |
2451 | if test -z "$ac_err"; then | |
2452 | : | |
2453 | else | |
2454 | echo "$ac_err" >&5 | |
2455 | echo "configure: failed program was:" >&5 | |
2456 | cat conftest.$ac_ext >&5 | |
2457 | rm -rf conftest* | |
2458 | CPP=/lib/cpp | |
2459 | fi | |
2460 | rm -f conftest* | |
2461 | fi | |
2462 | rm -f conftest* | |
2463 | ac_cv_prog_CPP="$CPP" | |
2464 | fi | |
2465 | CPP="$ac_cv_prog_CPP" | |
2466 | else | |
2467 | ac_cv_prog_CPP="$CPP" | |
2468 | fi | |
2469 | echo "$ac_t""$CPP" 1>&6 | |
2470 | ||
2471 | missing_dir=`cd $ac_aux_dir && pwd` | |
2472 | for ac_prog in flex lex | |
2473 | do | |
2474 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
2475 | set dummy $ac_prog; ac_word=$2 | |
2476 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
48401fcf | 2477 | echo "configure:2478: checking for $ac_word" >&5 |
b2bb41f6 ILT |
2478 | if eval "test \"`echo '$''{'ac_cv_prog_LEX'+set}'`\" = set"; then |
2479 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2480 | else | |
2481 | if test -n "$LEX"; then | |
2482 | ac_cv_prog_LEX="$LEX" # Let the user override the test. | |
2483 | else | |
2484 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
2485 | for ac_dir in $PATH; do | |
2486 | test -z "$ac_dir" && ac_dir=. | |
2487 | if test -f $ac_dir/$ac_word; then | |
2488 | ac_cv_prog_LEX="$ac_prog" | |
2489 | break | |
2490 | fi | |
2491 | done | |
2492 | IFS="$ac_save_ifs" | |
2493 | fi | |
2494 | fi | |
2495 | LEX="$ac_cv_prog_LEX" | |
2496 | if test -n "$LEX"; then | |
2497 | echo "$ac_t""$LEX" 1>&6 | |
2498 | else | |
2499 | echo "$ac_t""no" 1>&6 | |
2500 | fi | |
2501 | ||
2502 | test -n "$LEX" && break | |
2503 | done | |
2504 | test -n "$LEX" || LEX=""$missing_dir/missing flex"" | |
2505 | ||
e2b4bd2a ILT |
2506 | # Extract the first word of "flex", so it can be a program name with args. |
2507 | set dummy flex; ac_word=$2 | |
2508 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
48401fcf | 2509 | echo "configure:2510: checking for $ac_word" >&5 |
e2b4bd2a ILT |
2510 | if eval "test \"`echo '$''{'ac_cv_prog_LEX'+set}'`\" = set"; then |
2511 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2512 | else | |
2513 | if test -n "$LEX"; then | |
2514 | ac_cv_prog_LEX="$LEX" # Let the user override the test. | |
2515 | else | |
2516 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
2517 | for ac_dir in $PATH; do | |
2518 | test -z "$ac_dir" && ac_dir=. | |
2519 | if test -f $ac_dir/$ac_word; then | |
2520 | ac_cv_prog_LEX="flex" | |
2521 | break | |
2522 | fi | |
2523 | done | |
2524 | IFS="$ac_save_ifs" | |
2525 | test -z "$ac_cv_prog_LEX" && ac_cv_prog_LEX="lex" | |
2526 | fi | |
2527 | fi | |
2528 | LEX="$ac_cv_prog_LEX" | |
2529 | if test -n "$LEX"; then | |
2530 | echo "$ac_t""$LEX" 1>&6 | |
2531 | else | |
2532 | echo "$ac_t""no" 1>&6 | |
2533 | fi | |
2534 | ||
2535 | if test -z "$LEXLIB" | |
2536 | then | |
2537 | case "$LEX" in | |
2538 | flex*) ac_lib=fl ;; | |
2539 | *) ac_lib=l ;; | |
2540 | esac | |
2541 | echo $ac_n "checking for yywrap in -l$ac_lib""... $ac_c" 1>&6 | |
48401fcf | 2542 | echo "configure:2543: checking for yywrap in -l$ac_lib" >&5 |
e2b4bd2a ILT |
2543 | ac_lib_var=`echo $ac_lib'_'yywrap | sed 'y%./+-%__p_%'` |
2544 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
2545 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2546 | else | |
2547 | ac_save_LIBS="$LIBS" | |
2548 | LIBS="-l$ac_lib $LIBS" | |
2549 | cat > conftest.$ac_ext <<EOF | |
48401fcf | 2550 | #line 2551 "configure" |
e2b4bd2a ILT |
2551 | #include "confdefs.h" |
2552 | /* Override any gcc2 internal prototype to avoid an error. */ | |
2553 | /* We use char because int might match the return type of a gcc2 | |
2554 | builtin and then its argument prototype would still apply. */ | |
2555 | char yywrap(); | |
2556 | ||
2557 | int main() { | |
2558 | yywrap() | |
2559 | ; return 0; } | |
2560 | EOF | |
48401fcf | 2561 | if { (eval echo configure:2562: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then |
e2b4bd2a ILT |
2562 | rm -rf conftest* |
2563 | eval "ac_cv_lib_$ac_lib_var=yes" | |
2564 | else | |
2565 | echo "configure: failed program was:" >&5 | |
2566 | cat conftest.$ac_ext >&5 | |
2567 | rm -rf conftest* | |
2568 | eval "ac_cv_lib_$ac_lib_var=no" | |
2569 | fi | |
2570 | rm -f conftest* | |
2571 | LIBS="$ac_save_LIBS" | |
2572 | ||
2573 | fi | |
2574 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
2575 | echo "$ac_t""yes" 1>&6 | |
2576 | LEXLIB="-l$ac_lib" | |
2577 | else | |
2578 | echo "$ac_t""no" 1>&6 | |
2579 | fi | |
2580 | ||
2581 | fi | |
2582 | ||
e2b4bd2a | 2583 | echo $ac_n "checking lex output file root""... $ac_c" 1>&6 |
48401fcf | 2584 | echo "configure:2585: checking lex output file root" >&5 |
e2b4bd2a | 2585 | if eval "test \"`echo '$''{'ac_cv_prog_lex_root'+set}'`\" = set"; then |
833c46e1 | 2586 | echo $ac_n "(cached) $ac_c" 1>&6 |
b11fb939 | 2587 | else |
e2b4bd2a ILT |
2588 | # The minimal lex program is just a single line: %%. But some broken lexes |
2589 | # (Solaris, I think it was) want two %% lines, so accommodate them. | |
2590 | echo '%% | |
2591 | %%' | $LEX | |
2592 | if test -f lex.yy.c; then | |
2593 | ac_cv_prog_lex_root=lex.yy | |
2594 | elif test -f lexyy.c; then | |
2595 | ac_cv_prog_lex_root=lexyy | |
2596 | else | |
2597 | { echo "configure: error: cannot find output from $LEX; giving up" 1>&2; exit 1; } | |
2598 | fi | |
2599 | fi | |
2600 | ||
2601 | echo "$ac_t""$ac_cv_prog_lex_root" 1>&6 | |
2602 | LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root | |
2603 | ||
2604 | echo $ac_n "checking whether yytext is a pointer""... $ac_c" 1>&6 | |
48401fcf | 2605 | echo "configure:2606: checking whether yytext is a pointer" >&5 |
e2b4bd2a ILT |
2606 | if eval "test \"`echo '$''{'ac_cv_prog_lex_yytext_pointer'+set}'`\" = set"; then |
2607 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2608 | else | |
2609 | # POSIX says lex can declare yytext either as a pointer or an array; the | |
2610 | # default is implementation-dependent. Figure out which it is, since | |
2611 | # not all implementations provide the %pointer and %array declarations. | |
2612 | ac_cv_prog_lex_yytext_pointer=no | |
2613 | echo 'extern char *yytext;' >>$LEX_OUTPUT_ROOT.c | |
2614 | ac_save_LIBS="$LIBS" | |
2615 | LIBS="$LIBS $LEXLIB" | |
2616 | cat > conftest.$ac_ext <<EOF | |
48401fcf | 2617 | #line 2618 "configure" |
b11fb939 | 2618 | #include "confdefs.h" |
e2b4bd2a ILT |
2619 | `cat $LEX_OUTPUT_ROOT.c` |
2620 | int main() { | |
2621 | ||
2622 | ; return 0; } | |
b11fb939 | 2623 | EOF |
48401fcf | 2624 | if { (eval echo configure:2625: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then |
b11fb939 | 2625 | rm -rf conftest* |
e2b4bd2a | 2626 | ac_cv_prog_lex_yytext_pointer=yes |
b11fb939 | 2627 | else |
c6c7035c MM |
2628 | echo "configure: failed program was:" >&5 |
2629 | cat conftest.$ac_ext >&5 | |
b11fb939 KR |
2630 | fi |
2631 | rm -f conftest* | |
e2b4bd2a ILT |
2632 | LIBS="$ac_save_LIBS" |
2633 | rm -f "${LEX_OUTPUT_ROOT}.c" | |
2634 | ||
b11fb939 | 2635 | fi |
e2b4bd2a ILT |
2636 | |
2637 | echo "$ac_t""$ac_cv_prog_lex_yytext_pointer" 1>&6 | |
2638 | if test $ac_cv_prog_lex_yytext_pointer = yes; then | |
2639 | cat >> confdefs.h <<\EOF | |
2640 | #define YYTEXT_POINTER 1 | |
b11fb939 | 2641 | EOF |
e2b4bd2a | 2642 | |
b11fb939 | 2643 | fi |
b11fb939 | 2644 | |
b11fb939 | 2645 | |
48401fcf TT |
2646 | ALL_LINGUAS= |
2647 | echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6 | |
2648 | echo "configure:2649: checking for POSIXized ISC" >&5 | |
2649 | if test -d /etc/conf/kconfig.d && | |
2650 | grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1 | |
2651 | then | |
2652 | echo "$ac_t""yes" 1>&6 | |
2653 | ISC=yes # If later tests want to check for ISC. | |
2654 | cat >> confdefs.h <<\EOF | |
2655 | #define _POSIX_SOURCE 1 | |
2656 | EOF | |
bf111c9f | 2657 | |
48401fcf TT |
2658 | if test "$GCC" = yes; then |
2659 | CC="$CC -posix" | |
e2b4bd2a | 2660 | else |
48401fcf | 2661 | CC="$CC -Xp" |
e2b4bd2a | 2662 | fi |
48401fcf TT |
2663 | else |
2664 | echo "$ac_t""no" 1>&6 | |
2665 | ISC= | |
2666 | fi | |
e2b4bd2a | 2667 | |
48401fcf TT |
2668 | echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 |
2669 | echo "configure:2670: checking for ANSI C header files" >&5 | |
2670 | if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then | |
e42b2520 RS |
2671 | echo $ac_n "(cached) $ac_c" 1>&6 |
2672 | else | |
2673 | cat > conftest.$ac_ext <<EOF | |
48401fcf | 2674 | #line 2675 "configure" |
e42b2520 | 2675 | #include "confdefs.h" |
48401fcf TT |
2676 | #include <stdlib.h> |
2677 | #include <stdarg.h> | |
2678 | #include <string.h> | |
2679 | #include <float.h> | |
e42b2520 | 2680 | EOF |
48401fcf TT |
2681 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
2682 | { (eval echo configure:2683: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } | |
2683 | ac_err=`grep -v '^ *+' conftest.out` | |
2684 | if test -z "$ac_err"; then | |
e42b2520 | 2685 | rm -rf conftest* |
48401fcf | 2686 | ac_cv_header_stdc=yes |
e42b2520 | 2687 | else |
48401fcf | 2688 | echo "$ac_err" >&5 |
e42b2520 RS |
2689 | echo "configure: failed program was:" >&5 |
2690 | cat conftest.$ac_ext >&5 | |
2691 | rm -rf conftest* | |
48401fcf | 2692 | ac_cv_header_stdc=no |
e42b2520 RS |
2693 | fi |
2694 | rm -f conftest* | |
48401fcf TT |
2695 | |
2696 | if test $ac_cv_header_stdc = yes; then | |
2697 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. | |
2698 | cat > conftest.$ac_ext <<EOF | |
2699 | #line 2700 "configure" | |
2700 | #include "confdefs.h" | |
2701 | #include <string.h> | |
2702 | EOF | |
2703 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
2704 | egrep "memchr" >/dev/null 2>&1; then | |
2705 | : | |
2706 | else | |
2707 | rm -rf conftest* | |
2708 | ac_cv_header_stdc=no | |
2709 | fi | |
e42b2520 | 2710 | rm -f conftest* |
48401fcf | 2711 | |
e42b2520 RS |
2712 | fi |
2713 | ||
48401fcf TT |
2714 | if test $ac_cv_header_stdc = yes; then |
2715 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. | |
2716 | cat > conftest.$ac_ext <<EOF | |
2717 | #line 2718 "configure" | |
2718 | #include "confdefs.h" | |
2719 | #include <stdlib.h> | |
2720 | EOF | |
2721 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
2722 | egrep "free" >/dev/null 2>&1; then | |
2723 | : | |
2724 | else | |
2725 | rm -rf conftest* | |
2726 | ac_cv_header_stdc=no | |
2727 | fi | |
2728 | rm -f conftest* | |
2729 | ||
2730 | fi | |
2731 | ||
2732 | if test $ac_cv_header_stdc = yes; then | |
2733 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. | |
2734 | if test "$cross_compiling" = yes; then | |
2735 | : | |
2736 | else | |
2737 | cat > conftest.$ac_ext <<EOF | |
2738 | #line 2739 "configure" | |
2739 | #include "confdefs.h" | |
2740 | #include <ctype.h> | |
2741 | #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') | |
2742 | #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) | |
2743 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) | |
2744 | int main () { int i; for (i = 0; i < 256; i++) | |
2745 | if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); | |
2746 | exit (0); } | |
2747 | ||
2748 | EOF | |
2749 | if { (eval echo configure:2750: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null | |
2750 | then | |
2751 | : | |
2752 | else | |
2753 | echo "configure: failed program was:" >&5 | |
2754 | cat conftest.$ac_ext >&5 | |
2755 | rm -fr conftest* | |
2756 | ac_cv_header_stdc=no | |
2757 | fi | |
2758 | rm -fr conftest* | |
2759 | fi | |
2760 | ||
2761 | fi | |
2762 | fi | |
2763 | ||
2764 | echo "$ac_t""$ac_cv_header_stdc" 1>&6 | |
2765 | if test $ac_cv_header_stdc = yes; then | |
2766 | cat >> confdefs.h <<\EOF | |
2767 | #define STDC_HEADERS 1 | |
2768 | EOF | |
2769 | ||
2770 | fi | |
2771 | ||
2772 | echo $ac_n "checking for working const""... $ac_c" 1>&6 | |
2773 | echo "configure:2774: checking for working const" >&5 | |
2774 | if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then | |
6cc7a938 ILT |
2775 | echo $ac_n "(cached) $ac_c" 1>&6 |
2776 | else | |
2777 | cat > conftest.$ac_ext <<EOF | |
48401fcf | 2778 | #line 2779 "configure" |
6cc7a938 ILT |
2779 | #include "confdefs.h" |
2780 | ||
2781 | int main() { | |
48401fcf TT |
2782 | |
2783 | /* Ultrix mips cc rejects this. */ | |
2784 | typedef int charset[2]; const charset x; | |
2785 | /* SunOS 4.1.1 cc rejects this. */ | |
2786 | char const *const *ccp; | |
2787 | char **p; | |
2788 | /* NEC SVR4.0.2 mips cc rejects this. */ | |
2789 | struct point {int x, y;}; | |
2790 | static struct point const zero = {0,0}; | |
2791 | /* AIX XL C 1.02.0.0 rejects this. | |
2792 | It does not let you subtract one const X* pointer from another in an arm | |
2793 | of an if-expression whose if-part is not a constant expression */ | |
2794 | const char *g = "string"; | |
2795 | ccp = &g + (g ? g-g : 0); | |
2796 | /* HPUX 7.0 cc rejects these. */ | |
2797 | ++ccp; | |
2798 | p = (char**) ccp; | |
2799 | ccp = (char const *const *) p; | |
2800 | { /* SCO 3.2v4 cc rejects this. */ | |
2801 | char *t; | |
2802 | char const *s = 0 ? (char *) 0 : (char const *) 0; | |
2803 | ||
2804 | *t++ = 0; | |
2805 | } | |
2806 | { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ | |
2807 | int x[] = {25, 17}; | |
2808 | const int *foo = &x[0]; | |
2809 | ++foo; | |
2810 | } | |
2811 | { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ | |
2812 | typedef const int *iptr; | |
2813 | iptr p = 0; | |
2814 | ++p; | |
2815 | } | |
2816 | { /* AIX XL C 1.02.0.0 rejects this saying | |
2817 | "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ | |
2818 | struct s { int j; const int *ap[3]; }; | |
2819 | struct s *b; b->j = 5; | |
2820 | } | |
2821 | { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ | |
2822 | const int foo = 10; | |
2823 | } | |
2824 | ||
6cc7a938 ILT |
2825 | ; return 0; } |
2826 | EOF | |
48401fcf | 2827 | if { (eval echo configure:2828: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
6cc7a938 | 2828 | rm -rf conftest* |
48401fcf | 2829 | ac_cv_c_const=yes |
6cc7a938 ILT |
2830 | else |
2831 | echo "configure: failed program was:" >&5 | |
2832 | cat conftest.$ac_ext >&5 | |
2833 | rm -rf conftest* | |
48401fcf | 2834 | ac_cv_c_const=no |
6cc7a938 ILT |
2835 | fi |
2836 | rm -f conftest* | |
6cc7a938 ILT |
2837 | fi |
2838 | ||
48401fcf TT |
2839 | echo "$ac_t""$ac_cv_c_const" 1>&6 |
2840 | if test $ac_cv_c_const = no; then | |
2841 | cat >> confdefs.h <<\EOF | |
2842 | #define const | |
2843 | EOF | |
6cc7a938 | 2844 | |
48401fcf | 2845 | fi |
e2b4bd2a | 2846 | |
48401fcf TT |
2847 | echo $ac_n "checking for inline""... $ac_c" 1>&6 |
2848 | echo "configure:2849: checking for inline" >&5 | |
2849 | if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then | |
e42b2520 RS |
2850 | echo $ac_n "(cached) $ac_c" 1>&6 |
2851 | else | |
48401fcf TT |
2852 | ac_cv_c_inline=no |
2853 | for ac_kw in inline __inline__ __inline; do | |
2854 | cat > conftest.$ac_ext <<EOF | |
2855 | #line 2856 "configure" | |
2856 | #include "confdefs.h" | |
2857 | ||
e42b2520 | 2858 | int main() { |
48401fcf TT |
2859 | } $ac_kw foo() { |
2860 | ; return 0; } | |
e42b2520 | 2861 | EOF |
48401fcf TT |
2862 | if { (eval echo configure:2863: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
2863 | rm -rf conftest* | |
2864 | ac_cv_c_inline=$ac_kw; break | |
2865 | else | |
2866 | echo "configure: failed program was:" >&5 | |
2867 | cat conftest.$ac_ext >&5 | |
e42b2520 | 2868 | fi |
48401fcf TT |
2869 | rm -f conftest* |
2870 | done | |
e42b2520 | 2871 | |
e42b2520 | 2872 | fi |
e42b2520 | 2873 | |
48401fcf TT |
2874 | echo "$ac_t""$ac_cv_c_inline" 1>&6 |
2875 | case "$ac_cv_c_inline" in | |
2876 | inline | yes) ;; | |
2877 | no) cat >> confdefs.h <<\EOF | |
2878 | #define inline | |
2879 | EOF | |
2880 | ;; | |
2881 | *) cat >> confdefs.h <<EOF | |
2882 | #define inline $ac_cv_c_inline | |
2883 | EOF | |
2884 | ;; | |
2885 | esac | |
e42b2520 | 2886 | |
48401fcf TT |
2887 | echo $ac_n "checking for off_t""... $ac_c" 1>&6 |
2888 | echo "configure:2889: checking for off_t" >&5 | |
2889 | if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then | |
e2b4bd2a ILT |
2890 | echo $ac_n "(cached) $ac_c" 1>&6 |
2891 | else | |
2892 | cat > conftest.$ac_ext <<EOF | |
48401fcf | 2893 | #line 2894 "configure" |
e2b4bd2a | 2894 | #include "confdefs.h" |
48401fcf TT |
2895 | #include <sys/types.h> |
2896 | #if STDC_HEADERS | |
2897 | #include <stdlib.h> | |
2898 | #include <stddef.h> | |
2899 | #endif | |
e2b4bd2a | 2900 | EOF |
48401fcf TT |
2901 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
2902 | egrep "off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then | |
e2b4bd2a | 2903 | rm -rf conftest* |
48401fcf | 2904 | ac_cv_type_off_t=yes |
e2b4bd2a | 2905 | else |
e2b4bd2a | 2906 | rm -rf conftest* |
48401fcf | 2907 | ac_cv_type_off_t=no |
e2b4bd2a ILT |
2908 | fi |
2909 | rm -f conftest* | |
48401fcf | 2910 | |
e2b4bd2a | 2911 | fi |
48401fcf TT |
2912 | echo "$ac_t""$ac_cv_type_off_t" 1>&6 |
2913 | if test $ac_cv_type_off_t = no; then | |
2914 | cat >> confdefs.h <<\EOF | |
2915 | #define off_t long | |
e2b4bd2a | 2916 | EOF |
e2b4bd2a | 2917 | |
48401fcf | 2918 | fi |
e2b4bd2a | 2919 | |
48401fcf TT |
2920 | echo $ac_n "checking for size_t""... $ac_c" 1>&6 |
2921 | echo "configure:2922: checking for size_t" >&5 | |
2922 | if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then | |
2923 | echo $ac_n "(cached) $ac_c" 1>&6 | |
e2b4bd2a | 2924 | else |
48401fcf TT |
2925 | cat > conftest.$ac_ext <<EOF |
2926 | #line 2927 "configure" | |
2927 | #include "confdefs.h" | |
2928 | #include <sys/types.h> | |
2929 | #if STDC_HEADERS | |
2930 | #include <stdlib.h> | |
2931 | #include <stddef.h> | |
2932 | #endif | |
2933 | EOF | |
2934 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
2935 | egrep "size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then | |
2936 | rm -rf conftest* | |
2937 | ac_cv_type_size_t=yes | |
2938 | else | |
2939 | rm -rf conftest* | |
2940 | ac_cv_type_size_t=no | |
2941 | fi | |
2942 | rm -f conftest* | |
2943 | ||
2944 | fi | |
2945 | echo "$ac_t""$ac_cv_type_size_t" 1>&6 | |
2946 | if test $ac_cv_type_size_t = no; then | |
e2b4bd2a | 2947 | cat >> confdefs.h <<\EOF |
48401fcf | 2948 | #define size_t unsigned |
e2b4bd2a ILT |
2949 | EOF |
2950 | ||
2951 | fi | |
e2b4bd2a | 2952 | |
b11fb939 KR |
2953 | # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works |
2954 | # for constant arguments. Useless! | |
833c46e1 | 2955 | echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6 |
48401fcf | 2956 | echo "configure:2957: checking for working alloca.h" >&5 |
833c46e1 KR |
2957 | if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then |
2958 | echo $ac_n "(cached) $ac_c" 1>&6 | |
b11fb939 | 2959 | else |
28d3e4a3 | 2960 | cat > conftest.$ac_ext <<EOF |
48401fcf | 2961 | #line 2962 "configure" |
b11fb939 KR |
2962 | #include "confdefs.h" |
2963 | #include <alloca.h> | |
c6c7035c | 2964 | int main() { |
b11fb939 KR |
2965 | char *p = alloca(2 * sizeof(int)); |
2966 | ; return 0; } | |
2967 | EOF | |
48401fcf | 2968 | if { (eval echo configure:2969: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then |
b11fb939 KR |
2969 | rm -rf conftest* |
2970 | ac_cv_header_alloca_h=yes | |
2971 | else | |
c6c7035c MM |
2972 | echo "configure: failed program was:" >&5 |
2973 | cat conftest.$ac_ext >&5 | |
b11fb939 KR |
2974 | rm -rf conftest* |
2975 | ac_cv_header_alloca_h=no | |
2976 | fi | |
2977 | rm -f conftest* | |
b11fb939 | 2978 | fi |
1c9dbb83 | 2979 | |
833c46e1 | 2980 | echo "$ac_t""$ac_cv_header_alloca_h" 1>&6 |
b11fb939 KR |
2981 | if test $ac_cv_header_alloca_h = yes; then |
2982 | cat >> confdefs.h <<\EOF | |
2983 | #define HAVE_ALLOCA_H 1 | |
2984 | EOF | |
2985 | ||
2986 | fi | |
2987 | ||
833c46e1 | 2988 | echo $ac_n "checking for alloca""... $ac_c" 1>&6 |
48401fcf | 2989 | echo "configure:2990: checking for alloca" >&5 |
c6c7035c | 2990 | if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then |
833c46e1 | 2991 | echo $ac_n "(cached) $ac_c" 1>&6 |
b11fb939 | 2992 | else |
28d3e4a3 | 2993 | cat > conftest.$ac_ext <<EOF |
48401fcf | 2994 | #line 2995 "configure" |
b11fb939 KR |
2995 | #include "confdefs.h" |
2996 | ||
2997 | #ifdef __GNUC__ | |
2998 | # define alloca __builtin_alloca | |
2999 | #else | |
3000 | # if HAVE_ALLOCA_H | |
3001 | # include <alloca.h> | |
3002 | # else | |
3003 | # ifdef _AIX | |
3004 | #pragma alloca | |
3005 | # else | |
3006 | # ifndef alloca /* predefined by HP cc +Olibcalls */ | |
3007 | char *alloca (); | |
3008 | # endif | |
3009 | # endif | |
3010 | # endif | |
3011 | #endif | |
3012 | ||
c6c7035c | 3013 | int main() { |
b11fb939 KR |
3014 | char *p = (char *) alloca(1); |
3015 | ; return 0; } | |
3016 | EOF | |
48401fcf | 3017 | if { (eval echo configure:3018: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then |
b11fb939 | 3018 | rm -rf conftest* |
c6c7035c | 3019 | ac_cv_func_alloca_works=yes |
b11fb939 | 3020 | else |
c6c7035c MM |
3021 | echo "configure: failed program was:" >&5 |
3022 | cat conftest.$ac_ext >&5 | |
b11fb939 | 3023 | rm -rf conftest* |
c6c7035c | 3024 | ac_cv_func_alloca_works=no |
b11fb939 KR |
3025 | fi |
3026 | rm -f conftest* | |
b11fb939 | 3027 | fi |
1c9dbb83 | 3028 | |
c6c7035c MM |
3029 | echo "$ac_t""$ac_cv_func_alloca_works" 1>&6 |
3030 | if test $ac_cv_func_alloca_works = yes; then | |
b11fb939 KR |
3031 | cat >> confdefs.h <<\EOF |
3032 | #define HAVE_ALLOCA 1 | |
3033 | EOF | |
3034 | ||
3035 | fi | |
3036 | ||
c6c7035c | 3037 | if test $ac_cv_func_alloca_works = no; then |
b11fb939 KR |
3038 | # The SVR3 libPW and SVR4 libucb both contain incompatible functions |
3039 | # that cause trouble. Some versions do not even contain alloca or | |
3040 | # contain a buggy version. If you still want to use their alloca, | |
3041 | # use ar to extract alloca.o from them instead of compiling alloca.c. | |
3042 | ALLOCA=alloca.o | |
3043 | cat >> confdefs.h <<\EOF | |
3044 | #define C_ALLOCA 1 | |
3045 | EOF | |
3046 | ||
3047 | ||
833c46e1 | 3048 | echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6 |
48401fcf | 3049 | echo "configure:3050: checking whether alloca needs Cray hooks" >&5 |
833c46e1 KR |
3050 | if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then |
3051 | echo $ac_n "(cached) $ac_c" 1>&6 | |
b11fb939 | 3052 | else |
28d3e4a3 | 3053 | cat > conftest.$ac_ext <<EOF |
48401fcf | 3054 | #line 3055 "configure" |
b11fb939 KR |
3055 | #include "confdefs.h" |
3056 | #if defined(CRAY) && ! defined(CRAY2) | |
3057 | webecray | |
3058 | #else | |
3059 | wenotbecray | |
3060 | #endif | |
3061 | ||
3062 | EOF | |
28d3e4a3 | 3063 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
fb589130 | 3064 | egrep "webecray" >/dev/null 2>&1; then |
b11fb939 KR |
3065 | rm -rf conftest* |
3066 | ac_cv_os_cray=yes | |
3067 | else | |
3068 | rm -rf conftest* | |
3069 | ac_cv_os_cray=no | |
3070 | fi | |
3071 | rm -f conftest* | |
3072 | ||
3073 | fi | |
1c9dbb83 | 3074 | |
833c46e1 | 3075 | echo "$ac_t""$ac_cv_os_cray" 1>&6 |
b11fb939 | 3076 | if test $ac_cv_os_cray = yes; then |
833c46e1 KR |
3077 | for ac_func in _getb67 GETB67 getb67; do |
3078 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
48401fcf | 3079 | echo "configure:3080: checking for $ac_func" >&5 |
833c46e1 KR |
3080 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
3081 | echo $ac_n "(cached) $ac_c" 1>&6 | |
b11fb939 | 3082 | else |
28d3e4a3 | 3083 | cat > conftest.$ac_ext <<EOF |
48401fcf | 3084 | #line 3085 "configure" |
b11fb939 | 3085 | #include "confdefs.h" |
833c46e1 KR |
3086 | /* System header to define __stub macros and hopefully few prototypes, |
3087 | which can conflict with char $ac_func(); below. */ | |
3088 | #include <assert.h> | |
f1698cb7 | 3089 | /* Override any gcc2 internal prototype to avoid an error. */ |
df586de2 ILT |
3090 | /* We use char because int might match the return type of a gcc2 |
3091 | builtin and then its argument prototype would still apply. */ | |
1c9dbb83 | 3092 | char $ac_func(); |
f1698cb7 | 3093 | |
c6c7035c | 3094 | int main() { |
b11fb939 KR |
3095 | |
3096 | /* The GNU C library defines this for functions which it implements | |
3097 | to always fail with ENOSYS. Some functions are actually named | |
3098 | something starting with __ and the normal name is an alias. */ | |
833c46e1 | 3099 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
b11fb939 KR |
3100 | choke me |
3101 | #else | |
833c46e1 | 3102 | $ac_func(); |
b11fb939 KR |
3103 | #endif |
3104 | ||
3105 | ; return 0; } | |
3106 | EOF | |
48401fcf | 3107 | if { (eval echo configure:3108: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then |
b11fb939 | 3108 | rm -rf conftest* |
833c46e1 | 3109 | eval "ac_cv_func_$ac_func=yes" |
b11fb939 | 3110 | else |
c6c7035c MM |
3111 | echo "configure: failed program was:" >&5 |
3112 | cat conftest.$ac_ext >&5 | |
b11fb939 | 3113 | rm -rf conftest* |
833c46e1 | 3114 | eval "ac_cv_func_$ac_func=no" |
b11fb939 KR |
3115 | fi |
3116 | rm -f conftest* | |
7d0f8249 | 3117 | fi |
c6c7035c | 3118 | |
833c46e1 KR |
3119 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
3120 | echo "$ac_t""yes" 1>&6 | |
3121 | cat >> confdefs.h <<EOF | |
3122 | #define CRAY_STACKSEG_END $ac_func | |
b11fb939 KR |
3123 | EOF |
3124 | ||
833c46e1 | 3125 | break |
b11fb939 | 3126 | else |
833c46e1 | 3127 | echo "$ac_t""no" 1>&6 |
b11fb939 KR |
3128 | fi |
3129 | ||
833c46e1 | 3130 | done |
b11fb939 KR |
3131 | fi |
3132 | ||
833c46e1 | 3133 | echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6 |
48401fcf | 3134 | echo "configure:3135: checking stack direction for C alloca" >&5 |
833c46e1 KR |
3135 | if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then |
3136 | echo $ac_n "(cached) $ac_c" 1>&6 | |
b11fb939 KR |
3137 | else |
3138 | if test "$cross_compiling" = yes; then | |
bf111c9f | 3139 | ac_cv_c_stack_direction=0 |
b11fb939 | 3140 | else |
c6c7035c | 3141 | cat > conftest.$ac_ext <<EOF |
48401fcf | 3142 | #line 3143 "configure" |
b11fb939 KR |
3143 | #include "confdefs.h" |
3144 | find_stack_direction () | |
3145 | { | |
3146 | static char *addr = 0; | |
3147 | auto char dummy; | |
3148 | if (addr == 0) | |
3149 | { | |
3150 | addr = &dummy; | |
3151 | return find_stack_direction (); | |
3152 | } | |
3153 | else | |
3154 | return (&dummy > addr) ? 1 : -1; | |
3155 | } | |
3156 | main () | |
3157 | { | |
3158 | exit (find_stack_direction() < 0); | |
3159 | } | |
3160 | EOF | |
48401fcf | 3161 | if { (eval echo configure:3162: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null |
c6c7035c | 3162 | then |
b11fb939 KR |
3163 | ac_cv_c_stack_direction=1 |
3164 | else | |
c6c7035c MM |
3165 | echo "configure: failed program was:" >&5 |
3166 | cat conftest.$ac_ext >&5 | |
3167 | rm -fr conftest* | |
b11fb939 KR |
3168 | ac_cv_c_stack_direction=-1 |
3169 | fi | |
7d0f8249 | 3170 | rm -fr conftest* |
64556643 FF |
3171 | fi |
3172 | ||
c6c7035c MM |
3173 | fi |
3174 | ||
833c46e1 | 3175 | echo "$ac_t""$ac_cv_c_stack_direction" 1>&6 |
b11fb939 KR |
3176 | cat >> confdefs.h <<EOF |
3177 | #define STACK_DIRECTION $ac_cv_c_stack_direction | |
3178 | EOF | |
3179 | ||
3180 | fi | |
3181 | ||
48401fcf TT |
3182 | for ac_hdr in unistd.h |
3183 | do | |
3184 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
3185 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
3186 | echo "configure:3187: checking for $ac_hdr" >&5 | |
3187 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then | |
833c46e1 | 3188 | echo $ac_n "(cached) $ac_c" 1>&6 |
b11fb939 | 3189 | else |
833c46e1 | 3190 | cat > conftest.$ac_ext <<EOF |
48401fcf | 3191 | #line 3192 "configure" |
b11fb939 | 3192 | #include "confdefs.h" |
48401fcf | 3193 | #include <$ac_hdr> |
b11fb939 | 3194 | EOF |
48401fcf TT |
3195 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
3196 | { (eval echo configure:3197: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } | |
3197 | ac_err=`grep -v '^ *+' conftest.out` | |
3198 | if test -z "$ac_err"; then | |
b11fb939 | 3199 | rm -rf conftest* |
48401fcf | 3200 | eval "ac_cv_header_$ac_safe=yes" |
c6c7035c | 3201 | else |
48401fcf | 3202 | echo "$ac_err" >&5 |
c6c7035c MM |
3203 | echo "configure: failed program was:" >&5 |
3204 | cat conftest.$ac_ext >&5 | |
48401fcf TT |
3205 | rm -rf conftest* |
3206 | eval "ac_cv_header_$ac_safe=no" | |
b11fb939 KR |
3207 | fi |
3208 | rm -f conftest* | |
b11fb939 | 3209 | fi |
48401fcf TT |
3210 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
3211 | echo "$ac_t""yes" 1>&6 | |
3212 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
3213 | cat >> confdefs.h <<EOF | |
3214 | #define $ac_tr_hdr 1 | |
833c46e1 | 3215 | EOF |
48401fcf TT |
3216 | |
3217 | else | |
3218 | echo "$ac_t""no" 1>&6 | |
3219 | fi | |
3220 | done | |
b11fb939 | 3221 | |
48401fcf | 3222 | for ac_func in getpagesize |
b9419dd2 | 3223 | do |
833c46e1 | 3224 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
48401fcf | 3225 | echo "configure:3226: checking for $ac_func" >&5 |
833c46e1 KR |
3226 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
3227 | echo $ac_n "(cached) $ac_c" 1>&6 | |
28d3e4a3 KR |
3228 | else |
3229 | cat > conftest.$ac_ext <<EOF | |
48401fcf | 3230 | #line 3231 "configure" |
28d3e4a3 | 3231 | #include "confdefs.h" |
833c46e1 KR |
3232 | /* System header to define __stub macros and hopefully few prototypes, |
3233 | which can conflict with char $ac_func(); below. */ | |
3234 | #include <assert.h> | |
f1698cb7 | 3235 | /* Override any gcc2 internal prototype to avoid an error. */ |
df586de2 ILT |
3236 | /* We use char because int might match the return type of a gcc2 |
3237 | builtin and then its argument prototype would still apply. */ | |
1c9dbb83 | 3238 | char $ac_func(); |
f1698cb7 | 3239 | |
c6c7035c | 3240 | int main() { |
28d3e4a3 KR |
3241 | |
3242 | /* The GNU C library defines this for functions which it implements | |
3243 | to always fail with ENOSYS. Some functions are actually named | |
3244 | something starting with __ and the normal name is an alias. */ | |
b9419dd2 | 3245 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
28d3e4a3 KR |
3246 | choke me |
3247 | #else | |
f1698cb7 | 3248 | $ac_func(); |
28d3e4a3 KR |
3249 | #endif |
3250 | ||
3251 | ; return 0; } | |
3252 | EOF | |
48401fcf TT |
3253 | if { (eval echo configure:3254: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then |
3254 | rm -rf conftest* | |
3255 | eval "ac_cv_func_$ac_func=yes" | |
3256 | else | |
3257 | echo "configure: failed program was:" >&5 | |
3258 | cat conftest.$ac_ext >&5 | |
3259 | rm -rf conftest* | |
3260 | eval "ac_cv_func_$ac_func=no" | |
3261 | fi | |
3262 | rm -f conftest* | |
3263 | fi | |
3264 | ||
3265 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
3266 | echo "$ac_t""yes" 1>&6 | |
3267 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
3268 | cat >> confdefs.h <<EOF | |
3269 | #define $ac_tr_func 1 | |
3270 | EOF | |
3271 | ||
3272 | else | |
3273 | echo "$ac_t""no" 1>&6 | |
3274 | fi | |
3275 | done | |
3276 | ||
3277 | echo $ac_n "checking for working mmap""... $ac_c" 1>&6 | |
3278 | echo "configure:3279: checking for working mmap" >&5 | |
3279 | if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then | |
3280 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3281 | else | |
3282 | if test "$cross_compiling" = yes; then | |
3283 | ac_cv_func_mmap_fixed_mapped=no | |
3284 | else | |
3285 | cat > conftest.$ac_ext <<EOF | |
3286 | #line 3287 "configure" | |
3287 | #include "confdefs.h" | |
3288 | ||
3289 | /* Thanks to Mike Haertel and Jim Avera for this test. | |
3290 | Here is a matrix of mmap possibilities: | |
3291 | mmap private not fixed | |
3292 | mmap private fixed at somewhere currently unmapped | |
3293 | mmap private fixed at somewhere already mapped | |
3294 | mmap shared not fixed | |
3295 | mmap shared fixed at somewhere currently unmapped | |
3296 | mmap shared fixed at somewhere already mapped | |
3297 | For private mappings, we should verify that changes cannot be read() | |
3298 | back from the file, nor mmap's back from the file at a different | |
3299 | address. (There have been systems where private was not correctly | |
3300 | implemented like the infamous i386 svr4.0, and systems where the | |
3301 | VM page cache was not coherent with the filesystem buffer cache | |
3302 | like early versions of FreeBSD and possibly contemporary NetBSD.) | |
3303 | For shared mappings, we should conversely verify that changes get | |
3304 | propogated back to all the places they're supposed to be. | |
3305 | ||
3306 | Grep wants private fixed already mapped. | |
3307 | The main things grep needs to know about mmap are: | |
3308 | * does it exist and is it safe to write into the mmap'd area | |
3309 | * how to use it (BSD variants) */ | |
3310 | #include <sys/types.h> | |
3311 | #include <fcntl.h> | |
3312 | #include <sys/mman.h> | |
3313 | ||
3314 | /* This mess was copied from the GNU getpagesize.h. */ | |
3315 | #ifndef HAVE_GETPAGESIZE | |
3316 | # ifdef HAVE_UNISTD_H | |
3317 | # include <unistd.h> | |
3318 | # endif | |
3319 | ||
3320 | /* Assume that all systems that can run configure have sys/param.h. */ | |
3321 | # ifndef HAVE_SYS_PARAM_H | |
3322 | # define HAVE_SYS_PARAM_H 1 | |
3323 | # endif | |
3324 | ||
3325 | # ifdef _SC_PAGESIZE | |
3326 | # define getpagesize() sysconf(_SC_PAGESIZE) | |
3327 | # else /* no _SC_PAGESIZE */ | |
3328 | # ifdef HAVE_SYS_PARAM_H | |
3329 | # include <sys/param.h> | |
3330 | # ifdef EXEC_PAGESIZE | |
3331 | # define getpagesize() EXEC_PAGESIZE | |
3332 | # else /* no EXEC_PAGESIZE */ | |
3333 | # ifdef NBPG | |
3334 | # define getpagesize() NBPG * CLSIZE | |
3335 | # ifndef CLSIZE | |
3336 | # define CLSIZE 1 | |
3337 | # endif /* no CLSIZE */ | |
3338 | # else /* no NBPG */ | |
3339 | # ifdef NBPC | |
3340 | # define getpagesize() NBPC | |
3341 | # else /* no NBPC */ | |
3342 | # ifdef PAGESIZE | |
3343 | # define getpagesize() PAGESIZE | |
3344 | # endif /* PAGESIZE */ | |
3345 | # endif /* no NBPC */ | |
3346 | # endif /* no NBPG */ | |
3347 | # endif /* no EXEC_PAGESIZE */ | |
3348 | # else /* no HAVE_SYS_PARAM_H */ | |
3349 | # define getpagesize() 8192 /* punt totally */ | |
3350 | # endif /* no HAVE_SYS_PARAM_H */ | |
3351 | # endif /* no _SC_PAGESIZE */ | |
3352 | ||
3353 | #endif /* no HAVE_GETPAGESIZE */ | |
3354 | ||
3355 | #ifdef __cplusplus | |
3356 | extern "C" { void *malloc(unsigned); } | |
3357 | #else | |
3358 | char *malloc(); | |
3359 | #endif | |
3360 | ||
3361 | int | |
3362 | main() | |
3363 | { | |
3364 | char *data, *data2, *data3; | |
3365 | int i, pagesize; | |
3366 | int fd; | |
3367 | ||
3368 | pagesize = getpagesize(); | |
3369 | ||
3370 | /* | |
3371 | * First, make a file with some known garbage in it. | |
3372 | */ | |
3373 | data = malloc(pagesize); | |
3374 | if (!data) | |
3375 | exit(1); | |
3376 | for (i = 0; i < pagesize; ++i) | |
3377 | *(data + i) = rand(); | |
3378 | umask(0); | |
3379 | fd = creat("conftestmmap", 0600); | |
3380 | if (fd < 0) | |
3381 | exit(1); | |
3382 | if (write(fd, data, pagesize) != pagesize) | |
3383 | exit(1); | |
3384 | close(fd); | |
3385 | ||
3386 | /* | |
3387 | * Next, try to mmap the file at a fixed address which | |
3388 | * already has something else allocated at it. If we can, | |
3389 | * also make sure that we see the same garbage. | |
3390 | */ | |
3391 | fd = open("conftestmmap", O_RDWR); | |
3392 | if (fd < 0) | |
3393 | exit(1); | |
3394 | data2 = malloc(2 * pagesize); | |
3395 | if (!data2) | |
3396 | exit(1); | |
3397 | data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1); | |
3398 | if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE, | |
3399 | MAP_PRIVATE | MAP_FIXED, fd, 0L)) | |
3400 | exit(1); | |
3401 | for (i = 0; i < pagesize; ++i) | |
3402 | if (*(data + i) != *(data2 + i)) | |
3403 | exit(1); | |
3404 | ||
3405 | /* | |
3406 | * Finally, make sure that changes to the mapped area | |
3407 | * do not percolate back to the file as seen by read(). | |
3408 | * (This is a bug on some variants of i386 svr4.0.) | |
3409 | */ | |
3410 | for (i = 0; i < pagesize; ++i) | |
3411 | *(data2 + i) = *(data2 + i) + 1; | |
3412 | data3 = malloc(pagesize); | |
3413 | if (!data3) | |
3414 | exit(1); | |
3415 | if (read(fd, data3, pagesize) != pagesize) | |
3416 | exit(1); | |
3417 | for (i = 0; i < pagesize; ++i) | |
3418 | if (*(data + i) != *(data3 + i)) | |
3419 | exit(1); | |
3420 | close(fd); | |
3421 | unlink("conftestmmap"); | |
3422 | exit(0); | |
3423 | } | |
3424 | ||
3425 | EOF | |
3426 | if { (eval echo configure:3427: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null | |
3427 | then | |
3428 | ac_cv_func_mmap_fixed_mapped=yes | |
3429 | else | |
3430 | echo "configure: failed program was:" >&5 | |
3431 | cat conftest.$ac_ext >&5 | |
3432 | rm -fr conftest* | |
3433 | ac_cv_func_mmap_fixed_mapped=no | |
3434 | fi | |
3435 | rm -fr conftest* | |
3436 | fi | |
3437 | ||
3438 | fi | |
3439 | ||
3440 | echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6 | |
3441 | if test $ac_cv_func_mmap_fixed_mapped = yes; then | |
3442 | cat >> confdefs.h <<\EOF | |
3443 | #define HAVE_MMAP 1 | |
3444 | EOF | |
3445 | ||
3446 | fi | |
3447 | ||
3448 | ||
3449 | for ac_hdr in argz.h limits.h locale.h nl_types.h malloc.h string.h \ | |
3450 | unistd.h values.h sys/param.h | |
3451 | do | |
3452 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
3453 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
3454 | echo "configure:3455: checking for $ac_hdr" >&5 | |
3455 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then | |
3456 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3457 | else | |
3458 | cat > conftest.$ac_ext <<EOF | |
3459 | #line 3460 "configure" | |
3460 | #include "confdefs.h" | |
3461 | #include <$ac_hdr> | |
3462 | EOF | |
3463 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
3464 | { (eval echo configure:3465: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } | |
3465 | ac_err=`grep -v '^ *+' conftest.out` | |
3466 | if test -z "$ac_err"; then | |
3467 | rm -rf conftest* | |
3468 | eval "ac_cv_header_$ac_safe=yes" | |
3469 | else | |
3470 | echo "$ac_err" >&5 | |
3471 | echo "configure: failed program was:" >&5 | |
3472 | cat conftest.$ac_ext >&5 | |
3473 | rm -rf conftest* | |
3474 | eval "ac_cv_header_$ac_safe=no" | |
3475 | fi | |
3476 | rm -f conftest* | |
3477 | fi | |
3478 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
3479 | echo "$ac_t""yes" 1>&6 | |
3480 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
3481 | cat >> confdefs.h <<EOF | |
3482 | #define $ac_tr_hdr 1 | |
3483 | EOF | |
3484 | ||
3485 | else | |
3486 | echo "$ac_t""no" 1>&6 | |
3487 | fi | |
3488 | done | |
3489 | ||
3490 | for ac_func in getcwd munmap putenv setenv setlocale strchr strcasecmp \ | |
3491 | __argz_count __argz_stringify __argz_next | |
3492 | do | |
3493 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
3494 | echo "configure:3495: checking for $ac_func" >&5 | |
3495 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then | |
3496 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3497 | else | |
3498 | cat > conftest.$ac_ext <<EOF | |
3499 | #line 3500 "configure" | |
3500 | #include "confdefs.h" | |
3501 | /* System header to define __stub macros and hopefully few prototypes, | |
3502 | which can conflict with char $ac_func(); below. */ | |
3503 | #include <assert.h> | |
3504 | /* Override any gcc2 internal prototype to avoid an error. */ | |
3505 | /* We use char because int might match the return type of a gcc2 | |
3506 | builtin and then its argument prototype would still apply. */ | |
3507 | char $ac_func(); | |
3508 | ||
3509 | int main() { | |
3510 | ||
3511 | /* The GNU C library defines this for functions which it implements | |
3512 | to always fail with ENOSYS. Some functions are actually named | |
3513 | something starting with __ and the normal name is an alias. */ | |
3514 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
3515 | choke me | |
3516 | #else | |
3517 | $ac_func(); | |
3518 | #endif | |
3519 | ||
3520 | ; return 0; } | |
3521 | EOF | |
3522 | if { (eval echo configure:3523: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then | |
3523 | rm -rf conftest* | |
3524 | eval "ac_cv_func_$ac_func=yes" | |
3525 | else | |
3526 | echo "configure: failed program was:" >&5 | |
3527 | cat conftest.$ac_ext >&5 | |
3528 | rm -rf conftest* | |
3529 | eval "ac_cv_func_$ac_func=no" | |
3530 | fi | |
3531 | rm -f conftest* | |
3532 | fi | |
3533 | ||
3534 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
3535 | echo "$ac_t""yes" 1>&6 | |
3536 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
3537 | cat >> confdefs.h <<EOF | |
3538 | #define $ac_tr_func 1 | |
3539 | EOF | |
3540 | ||
3541 | else | |
3542 | echo "$ac_t""no" 1>&6 | |
3543 | fi | |
3544 | done | |
3545 | ||
3546 | ||
3547 | if test "${ac_cv_func_stpcpy+set}" != "set"; then | |
3548 | for ac_func in stpcpy | |
3549 | do | |
3550 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
3551 | echo "configure:3552: checking for $ac_func" >&5 | |
3552 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then | |
3553 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3554 | else | |
3555 | cat > conftest.$ac_ext <<EOF | |
3556 | #line 3557 "configure" | |
3557 | #include "confdefs.h" | |
3558 | /* System header to define __stub macros and hopefully few prototypes, | |
3559 | which can conflict with char $ac_func(); below. */ | |
3560 | #include <assert.h> | |
3561 | /* Override any gcc2 internal prototype to avoid an error. */ | |
3562 | /* We use char because int might match the return type of a gcc2 | |
3563 | builtin and then its argument prototype would still apply. */ | |
3564 | char $ac_func(); | |
3565 | ||
3566 | int main() { | |
3567 | ||
3568 | /* The GNU C library defines this for functions which it implements | |
3569 | to always fail with ENOSYS. Some functions are actually named | |
3570 | something starting with __ and the normal name is an alias. */ | |
3571 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
3572 | choke me | |
3573 | #else | |
3574 | $ac_func(); | |
3575 | #endif | |
3576 | ||
3577 | ; return 0; } | |
3578 | EOF | |
3579 | if { (eval echo configure:3580: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then | |
3580 | rm -rf conftest* | |
3581 | eval "ac_cv_func_$ac_func=yes" | |
3582 | else | |
3583 | echo "configure: failed program was:" >&5 | |
3584 | cat conftest.$ac_ext >&5 | |
3585 | rm -rf conftest* | |
3586 | eval "ac_cv_func_$ac_func=no" | |
3587 | fi | |
3588 | rm -f conftest* | |
3589 | fi | |
3590 | ||
3591 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
3592 | echo "$ac_t""yes" 1>&6 | |
3593 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
3594 | cat >> confdefs.h <<EOF | |
3595 | #define $ac_tr_func 1 | |
3596 | EOF | |
3597 | ||
3598 | else | |
3599 | echo "$ac_t""no" 1>&6 | |
3600 | fi | |
3601 | done | |
3602 | ||
3603 | fi | |
3604 | if test "${ac_cv_func_stpcpy}" = "yes"; then | |
3605 | cat >> confdefs.h <<\EOF | |
3606 | #define HAVE_STPCPY 1 | |
3607 | EOF | |
3608 | ||
3609 | fi | |
3610 | ||
3611 | if test $ac_cv_header_locale_h = yes; then | |
3612 | echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6 | |
3613 | echo "configure:3614: checking for LC_MESSAGES" >&5 | |
3614 | if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then | |
3615 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3616 | else | |
3617 | cat > conftest.$ac_ext <<EOF | |
3618 | #line 3619 "configure" | |
3619 | #include "confdefs.h" | |
3620 | #include <locale.h> | |
3621 | int main() { | |
3622 | return LC_MESSAGES | |
3623 | ; return 0; } | |
3624 | EOF | |
3625 | if { (eval echo configure:3626: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then | |
3626 | rm -rf conftest* | |
3627 | am_cv_val_LC_MESSAGES=yes | |
3628 | else | |
3629 | echo "configure: failed program was:" >&5 | |
3630 | cat conftest.$ac_ext >&5 | |
3631 | rm -rf conftest* | |
3632 | am_cv_val_LC_MESSAGES=no | |
3633 | fi | |
3634 | rm -f conftest* | |
3635 | fi | |
3636 | ||
3637 | echo "$ac_t""$am_cv_val_LC_MESSAGES" 1>&6 | |
3638 | if test $am_cv_val_LC_MESSAGES = yes; then | |
3639 | cat >> confdefs.h <<\EOF | |
3640 | #define HAVE_LC_MESSAGES 1 | |
3641 | EOF | |
3642 | ||
3643 | fi | |
3644 | fi | |
3645 | echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6 | |
3646 | echo "configure:3647: checking whether NLS is requested" >&5 | |
3647 | # Check whether --enable-nls or --disable-nls was given. | |
3648 | if test "${enable_nls+set}" = set; then | |
3649 | enableval="$enable_nls" | |
3650 | USE_NLS=$enableval | |
3651 | else | |
3652 | USE_NLS=yes | |
3653 | fi | |
3654 | ||
3655 | echo "$ac_t""$USE_NLS" 1>&6 | |
3656 | ||
3657 | ||
3658 | USE_INCLUDED_LIBINTL=no | |
3659 | ||
3660 | if test "$USE_NLS" = "yes"; then | |
3661 | cat >> confdefs.h <<\EOF | |
3662 | #define ENABLE_NLS 1 | |
3663 | EOF | |
3664 | ||
3665 | echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6 | |
3666 | echo "configure:3667: checking whether included gettext is requested" >&5 | |
3667 | # Check whether --with-included-gettext or --without-included-gettext was given. | |
3668 | if test "${with_included_gettext+set}" = set; then | |
3669 | withval="$with_included_gettext" | |
3670 | nls_cv_force_use_gnu_gettext=$withval | |
3671 | else | |
3672 | nls_cv_force_use_gnu_gettext=no | |
3673 | fi | |
3674 | ||
3675 | echo "$ac_t""$nls_cv_force_use_gnu_gettext" 1>&6 | |
3676 | ||
3677 | nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext" | |
3678 | if test "$nls_cv_force_use_gnu_gettext" != "yes"; then | |
3679 | nls_cv_header_intl= | |
3680 | nls_cv_header_libgt= | |
3681 | CATOBJEXT=NONE | |
3682 | ||
3683 | ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'` | |
3684 | echo $ac_n "checking for libintl.h""... $ac_c" 1>&6 | |
3685 | echo "configure:3686: checking for libintl.h" >&5 | |
3686 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then | |
3687 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3688 | else | |
3689 | cat > conftest.$ac_ext <<EOF | |
3690 | #line 3691 "configure" | |
3691 | #include "confdefs.h" | |
3692 | #include <libintl.h> | |
3693 | EOF | |
3694 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
3695 | { (eval echo configure:3696: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } | |
3696 | ac_err=`grep -v '^ *+' conftest.out` | |
3697 | if test -z "$ac_err"; then | |
3698 | rm -rf conftest* | |
3699 | eval "ac_cv_header_$ac_safe=yes" | |
3700 | else | |
3701 | echo "$ac_err" >&5 | |
3702 | echo "configure: failed program was:" >&5 | |
3703 | cat conftest.$ac_ext >&5 | |
3704 | rm -rf conftest* | |
3705 | eval "ac_cv_header_$ac_safe=no" | |
3706 | fi | |
3707 | rm -f conftest* | |
3708 | fi | |
3709 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
3710 | echo "$ac_t""yes" 1>&6 | |
3711 | echo $ac_n "checking for gettext in libc""... $ac_c" 1>&6 | |
3712 | echo "configure:3713: checking for gettext in libc" >&5 | |
3713 | if eval "test \"`echo '$''{'gt_cv_func_gettext_libc'+set}'`\" = set"; then | |
3714 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3715 | else | |
3716 | cat > conftest.$ac_ext <<EOF | |
3717 | #line 3718 "configure" | |
3718 | #include "confdefs.h" | |
3719 | #include <libintl.h> | |
3720 | int main() { | |
3721 | return (int) gettext ("") | |
3722 | ; return 0; } | |
3723 | EOF | |
3724 | if { (eval echo configure:3725: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then | |
3725 | rm -rf conftest* | |
3726 | gt_cv_func_gettext_libc=yes | |
3727 | else | |
3728 | echo "configure: failed program was:" >&5 | |
3729 | cat conftest.$ac_ext >&5 | |
3730 | rm -rf conftest* | |
3731 | gt_cv_func_gettext_libc=no | |
3732 | fi | |
3733 | rm -f conftest* | |
3734 | fi | |
3735 | ||
3736 | echo "$ac_t""$gt_cv_func_gettext_libc" 1>&6 | |
3737 | ||
3738 | if test "$gt_cv_func_gettext_libc" != "yes"; then | |
3739 | echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6 | |
3740 | echo "configure:3741: checking for bindtextdomain in -lintl" >&5 | |
3741 | ac_lib_var=`echo intl'_'bindtextdomain | sed 'y%./+-%__p_%'` | |
3742 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
3743 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3744 | else | |
3745 | ac_save_LIBS="$LIBS" | |
3746 | LIBS="-lintl $LIBS" | |
3747 | cat > conftest.$ac_ext <<EOF | |
3748 | #line 3749 "configure" | |
3749 | #include "confdefs.h" | |
3750 | /* Override any gcc2 internal prototype to avoid an error. */ | |
3751 | /* We use char because int might match the return type of a gcc2 | |
3752 | builtin and then its argument prototype would still apply. */ | |
3753 | char bindtextdomain(); | |
3754 | ||
3755 | int main() { | |
3756 | bindtextdomain() | |
3757 | ; return 0; } | |
3758 | EOF | |
3759 | if { (eval echo configure:3760: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then | |
3760 | rm -rf conftest* | |
3761 | eval "ac_cv_lib_$ac_lib_var=yes" | |
3762 | else | |
3763 | echo "configure: failed program was:" >&5 | |
3764 | cat conftest.$ac_ext >&5 | |
3765 | rm -rf conftest* | |
3766 | eval "ac_cv_lib_$ac_lib_var=no" | |
3767 | fi | |
3768 | rm -f conftest* | |
3769 | LIBS="$ac_save_LIBS" | |
3770 | ||
3771 | fi | |
3772 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
3773 | echo "$ac_t""yes" 1>&6 | |
3774 | echo $ac_n "checking for gettext in libintl""... $ac_c" 1>&6 | |
3775 | echo "configure:3776: checking for gettext in libintl" >&5 | |
3776 | if eval "test \"`echo '$''{'gt_cv_func_gettext_libintl'+set}'`\" = set"; then | |
3777 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3778 | else | |
3779 | cat > conftest.$ac_ext <<EOF | |
3780 | #line 3781 "configure" | |
3781 | #include "confdefs.h" | |
3782 | ||
3783 | int main() { | |
3784 | return (int) gettext ("") | |
3785 | ; return 0; } | |
3786 | EOF | |
3787 | if { (eval echo configure:3788: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then | |
3788 | rm -rf conftest* | |
3789 | gt_cv_func_gettext_libintl=yes | |
3790 | else | |
3791 | echo "configure: failed program was:" >&5 | |
3792 | cat conftest.$ac_ext >&5 | |
3793 | rm -rf conftest* | |
3794 | gt_cv_func_gettext_libintl=no | |
3795 | fi | |
3796 | rm -f conftest* | |
3797 | fi | |
3798 | ||
3799 | echo "$ac_t""$gt_cv_func_gettext_libintl" 1>&6 | |
3800 | else | |
3801 | echo "$ac_t""no" 1>&6 | |
3802 | fi | |
3803 | ||
3804 | fi | |
3805 | ||
3806 | if test "$gt_cv_func_gettext_libc" = "yes" \ | |
3807 | || test "$gt_cv_func_gettext_libintl" = "yes"; then | |
3808 | cat >> confdefs.h <<\EOF | |
3809 | #define HAVE_GETTEXT 1 | |
3810 | EOF | |
3811 | ||
3812 | # Extract the first word of "msgfmt", so it can be a program name with args. | |
3813 | set dummy msgfmt; ac_word=$2 | |
3814 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
3815 | echo "configure:3816: checking for $ac_word" >&5 | |
3816 | if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then | |
3817 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3818 | else | |
3819 | case "$MSGFMT" in | |
3820 | /*) | |
3821 | ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path. | |
3822 | ;; | |
3823 | *) | |
3824 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
3825 | for ac_dir in $PATH; do | |
3826 | test -z "$ac_dir" && ac_dir=. | |
3827 | if test -f $ac_dir/$ac_word; then | |
3828 | if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then | |
3829 | ac_cv_path_MSGFMT="$ac_dir/$ac_word" | |
3830 | break | |
3831 | fi | |
3832 | fi | |
3833 | done | |
3834 | IFS="$ac_save_ifs" | |
3835 | test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="no" | |
3836 | ;; | |
3837 | esac | |
3838 | fi | |
3839 | MSGFMT="$ac_cv_path_MSGFMT" | |
3840 | if test -n "$MSGFMT"; then | |
3841 | echo "$ac_t""$MSGFMT" 1>&6 | |
3842 | else | |
3843 | echo "$ac_t""no" 1>&6 | |
3844 | fi | |
3845 | if test "$MSGFMT" != "no"; then | |
3846 | for ac_func in dcgettext | |
3847 | do | |
3848 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
3849 | echo "configure:3850: checking for $ac_func" >&5 | |
3850 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then | |
3851 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3852 | else | |
3853 | cat > conftest.$ac_ext <<EOF | |
3854 | #line 3855 "configure" | |
3855 | #include "confdefs.h" | |
3856 | /* System header to define __stub macros and hopefully few prototypes, | |
3857 | which can conflict with char $ac_func(); below. */ | |
3858 | #include <assert.h> | |
3859 | /* Override any gcc2 internal prototype to avoid an error. */ | |
3860 | /* We use char because int might match the return type of a gcc2 | |
3861 | builtin and then its argument prototype would still apply. */ | |
3862 | char $ac_func(); | |
3863 | ||
3864 | int main() { | |
3865 | ||
3866 | /* The GNU C library defines this for functions which it implements | |
3867 | to always fail with ENOSYS. Some functions are actually named | |
3868 | something starting with __ and the normal name is an alias. */ | |
3869 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
3870 | choke me | |
3871 | #else | |
3872 | $ac_func(); | |
3873 | #endif | |
3874 | ||
3875 | ; return 0; } | |
3876 | EOF | |
3877 | if { (eval echo configure:3878: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then | |
3878 | rm -rf conftest* | |
3879 | eval "ac_cv_func_$ac_func=yes" | |
3880 | else | |
3881 | echo "configure: failed program was:" >&5 | |
3882 | cat conftest.$ac_ext >&5 | |
3883 | rm -rf conftest* | |
3884 | eval "ac_cv_func_$ac_func=no" | |
3885 | fi | |
3886 | rm -f conftest* | |
3887 | fi | |
3888 | ||
3889 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
3890 | echo "$ac_t""yes" 1>&6 | |
3891 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
3892 | cat >> confdefs.h <<EOF | |
3893 | #define $ac_tr_func 1 | |
3894 | EOF | |
3895 | ||
3896 | else | |
3897 | echo "$ac_t""no" 1>&6 | |
3898 | fi | |
3899 | done | |
3900 | ||
3901 | # Extract the first word of "gmsgfmt", so it can be a program name with args. | |
3902 | set dummy gmsgfmt; ac_word=$2 | |
3903 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
3904 | echo "configure:3905: checking for $ac_word" >&5 | |
3905 | if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then | |
3906 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3907 | else | |
3908 | case "$GMSGFMT" in | |
3909 | /*) | |
3910 | ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path. | |
3911 | ;; | |
3912 | ?:/*) | |
3913 | ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path. | |
3914 | ;; | |
3915 | *) | |
3916 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
3917 | for ac_dir in $PATH; do | |
3918 | test -z "$ac_dir" && ac_dir=. | |
3919 | if test -f $ac_dir/$ac_word; then | |
3920 | ac_cv_path_GMSGFMT="$ac_dir/$ac_word" | |
3921 | break | |
3922 | fi | |
3923 | done | |
3924 | IFS="$ac_save_ifs" | |
3925 | test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT" | |
3926 | ;; | |
3927 | esac | |
3928 | fi | |
3929 | GMSGFMT="$ac_cv_path_GMSGFMT" | |
3930 | if test -n "$GMSGFMT"; then | |
3931 | echo "$ac_t""$GMSGFMT" 1>&6 | |
3932 | else | |
3933 | echo "$ac_t""no" 1>&6 | |
3934 | fi | |
3935 | ||
3936 | # Extract the first word of "xgettext", so it can be a program name with args. | |
3937 | set dummy xgettext; ac_word=$2 | |
3938 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
3939 | echo "configure:3940: checking for $ac_word" >&5 | |
3940 | if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then | |
3941 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3942 | else | |
3943 | case "$XGETTEXT" in | |
3944 | /*) | |
3945 | ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path. | |
3946 | ;; | |
3947 | *) | |
3948 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
3949 | for ac_dir in $PATH; do | |
3950 | test -z "$ac_dir" && ac_dir=. | |
3951 | if test -f $ac_dir/$ac_word; then | |
3952 | if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then | |
3953 | ac_cv_path_XGETTEXT="$ac_dir/$ac_word" | |
3954 | break | |
3955 | fi | |
3956 | fi | |
3957 | done | |
3958 | IFS="$ac_save_ifs" | |
3959 | test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":" | |
3960 | ;; | |
3961 | esac | |
3962 | fi | |
3963 | XGETTEXT="$ac_cv_path_XGETTEXT" | |
3964 | if test -n "$XGETTEXT"; then | |
3965 | echo "$ac_t""$XGETTEXT" 1>&6 | |
3966 | else | |
3967 | echo "$ac_t""no" 1>&6 | |
3968 | fi | |
3969 | ||
3970 | cat > conftest.$ac_ext <<EOF | |
3971 | #line 3972 "configure" | |
3972 | #include "confdefs.h" | |
3973 | ||
3974 | int main() { | |
3975 | extern int _nl_msg_cat_cntr; | |
3976 | return _nl_msg_cat_cntr | |
3977 | ; return 0; } | |
3978 | EOF | |
3979 | if { (eval echo configure:3980: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then | |
3980 | rm -rf conftest* | |
3981 | CATOBJEXT=.gmo | |
3982 | DATADIRNAME=share | |
3983 | else | |
3984 | echo "configure: failed program was:" >&5 | |
3985 | cat conftest.$ac_ext >&5 | |
3986 | rm -rf conftest* | |
3987 | CATOBJEXT=.mo | |
3988 | DATADIRNAME=lib | |
3989 | fi | |
3990 | rm -f conftest* | |
3991 | INSTOBJEXT=.mo | |
3992 | fi | |
3993 | fi | |
3994 | ||
3995 | else | |
3996 | echo "$ac_t""no" 1>&6 | |
3997 | fi | |
3998 | ||
3999 | ||
4000 | ||
4001 | if test "$CATOBJEXT" = "NONE"; then | |
4002 | nls_cv_use_gnu_gettext=yes | |
4003 | fi | |
4004 | fi | |
4005 | ||
4006 | if test "$nls_cv_use_gnu_gettext" = "yes"; then | |
4007 | INTLOBJS="\$(GETTOBJS)" | |
4008 | # Extract the first word of "msgfmt", so it can be a program name with args. | |
4009 | set dummy msgfmt; ac_word=$2 | |
4010 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
4011 | echo "configure:4012: checking for $ac_word" >&5 | |
4012 | if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then | |
4013 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4014 | else | |
4015 | case "$MSGFMT" in | |
4016 | /*) | |
4017 | ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path. | |
4018 | ;; | |
4019 | *) | |
4020 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
4021 | for ac_dir in $PATH; do | |
4022 | test -z "$ac_dir" && ac_dir=. | |
4023 | if test -f $ac_dir/$ac_word; then | |
4024 | if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then | |
4025 | ac_cv_path_MSGFMT="$ac_dir/$ac_word" | |
4026 | break | |
4027 | fi | |
4028 | fi | |
4029 | done | |
4030 | IFS="$ac_save_ifs" | |
4031 | test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="msgfmt" | |
4032 | ;; | |
4033 | esac | |
4034 | fi | |
4035 | MSGFMT="$ac_cv_path_MSGFMT" | |
4036 | if test -n "$MSGFMT"; then | |
4037 | echo "$ac_t""$MSGFMT" 1>&6 | |
4038 | else | |
4039 | echo "$ac_t""no" 1>&6 | |
4040 | fi | |
4041 | ||
4042 | # Extract the first word of "gmsgfmt", so it can be a program name with args. | |
4043 | set dummy gmsgfmt; ac_word=$2 | |
4044 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
4045 | echo "configure:4046: checking for $ac_word" >&5 | |
4046 | if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then | |
4047 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4048 | else | |
4049 | case "$GMSGFMT" in | |
4050 | /*) | |
4051 | ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path. | |
4052 | ;; | |
4053 | ?:/*) | |
4054 | ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path. | |
4055 | ;; | |
4056 | *) | |
4057 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
4058 | for ac_dir in $PATH; do | |
4059 | test -z "$ac_dir" && ac_dir=. | |
4060 | if test -f $ac_dir/$ac_word; then | |
4061 | ac_cv_path_GMSGFMT="$ac_dir/$ac_word" | |
4062 | break | |
4063 | fi | |
4064 | done | |
4065 | IFS="$ac_save_ifs" | |
4066 | test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT" | |
4067 | ;; | |
4068 | esac | |
4069 | fi | |
4070 | GMSGFMT="$ac_cv_path_GMSGFMT" | |
4071 | if test -n "$GMSGFMT"; then | |
4072 | echo "$ac_t""$GMSGFMT" 1>&6 | |
4073 | else | |
4074 | echo "$ac_t""no" 1>&6 | |
4075 | fi | |
4076 | ||
4077 | # Extract the first word of "xgettext", so it can be a program name with args. | |
4078 | set dummy xgettext; ac_word=$2 | |
4079 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
4080 | echo "configure:4081: checking for $ac_word" >&5 | |
4081 | if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then | |
4082 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4083 | else | |
4084 | case "$XGETTEXT" in | |
4085 | /*) | |
4086 | ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path. | |
4087 | ;; | |
4088 | *) | |
4089 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
4090 | for ac_dir in $PATH; do | |
4091 | test -z "$ac_dir" && ac_dir=. | |
4092 | if test -f $ac_dir/$ac_word; then | |
4093 | if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then | |
4094 | ac_cv_path_XGETTEXT="$ac_dir/$ac_word" | |
4095 | break | |
4096 | fi | |
4097 | fi | |
4098 | done | |
4099 | IFS="$ac_save_ifs" | |
4100 | test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":" | |
4101 | ;; | |
4102 | esac | |
4103 | fi | |
4104 | XGETTEXT="$ac_cv_path_XGETTEXT" | |
4105 | if test -n "$XGETTEXT"; then | |
4106 | echo "$ac_t""$XGETTEXT" 1>&6 | |
4107 | else | |
4108 | echo "$ac_t""no" 1>&6 | |
4109 | fi | |
4110 | ||
4111 | ||
4112 | USE_INCLUDED_LIBINTL=yes | |
4113 | CATOBJEXT=.gmo | |
4114 | INSTOBJEXT=.mo | |
4115 | DATADIRNAME=share | |
4116 | INTLDEPS='$(top_builddir)/../intl/libintl.a' | |
4117 | INTLLIBS=$INTLDEPS | |
4118 | LIBS=`echo $LIBS | sed -e 's/-lintl//'` | |
4119 | nls_cv_header_intl=libintl.h | |
4120 | nls_cv_header_libgt=libgettext.h | |
4121 | fi | |
4122 | ||
4123 | if test "$XGETTEXT" != ":"; then | |
4124 | if $XGETTEXT --omit-header /dev/null 2> /dev/null; then | |
4125 | : ; | |
4126 | else | |
4127 | echo "$ac_t""found xgettext programs is not GNU xgettext; ignore it" 1>&6 | |
4128 | XGETTEXT=":" | |
4129 | fi | |
4130 | fi | |
4131 | ||
4132 | # We need to process the po/ directory. | |
4133 | POSUB=po | |
4134 | else | |
4135 | DATADIRNAME=share | |
4136 | nls_cv_header_intl=libintl.h | |
4137 | nls_cv_header_libgt=libgettext.h | |
4138 | fi | |
4139 | ||
4140 | # If this is used in GNU gettext we have to set USE_NLS to `yes' | |
4141 | # because some of the sources are only built for this goal. | |
4142 | if test "$PACKAGE" = gettext; then | |
4143 | USE_NLS=yes | |
4144 | USE_INCLUDED_LIBINTL=yes | |
4145 | fi | |
4146 | ||
4147 | for lang in $ALL_LINGUAS; do | |
4148 | GMOFILES="$GMOFILES $lang.gmo" | |
4149 | POFILES="$POFILES $lang.po" | |
4150 | done | |
4151 | ||
4152 | ||
4153 | ||
4154 | ||
4155 | ||
4156 | ||
4157 | ||
4158 | ||
4159 | ||
4160 | ||
4161 | ||
4162 | ||
4163 | ||
4164 | ||
4165 | if test "x$CATOBJEXT" != "x"; then | |
4166 | if test "x$ALL_LINGUAS" = "x"; then | |
4167 | LINGUAS= | |
4168 | else | |
4169 | echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6 | |
4170 | echo "configure:4171: checking for catalogs to be installed" >&5 | |
4171 | NEW_LINGUAS= | |
4172 | for lang in ${LINGUAS=$ALL_LINGUAS}; do | |
4173 | case "$ALL_LINGUAS" in | |
4174 | *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;; | |
4175 | esac | |
4176 | done | |
4177 | LINGUAS=$NEW_LINGUAS | |
4178 | echo "$ac_t""$LINGUAS" 1>&6 | |
4179 | fi | |
4180 | ||
4181 | if test -n "$LINGUAS"; then | |
4182 | for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done | |
4183 | fi | |
4184 | fi | |
4185 | ||
4186 | if test $ac_cv_header_locale_h = yes; then | |
4187 | INCLUDE_LOCALE_H="#include <locale.h>" | |
4188 | else | |
4189 | INCLUDE_LOCALE_H="\ | |
4190 | /* The system does not provide the header <locale.h>. Take care yourself. */" | |
4191 | fi | |
4192 | ||
4193 | ||
4194 | if test -f $srcdir/po2tbl.sed.in; then | |
4195 | if test "$CATOBJEXT" = ".cat"; then | |
4196 | ac_safe=`echo "linux/version.h" | sed 'y%./+-%__p_%'` | |
4197 | echo $ac_n "checking for linux/version.h""... $ac_c" 1>&6 | |
4198 | echo "configure:4199: checking for linux/version.h" >&5 | |
4199 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then | |
4200 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4201 | else | |
4202 | cat > conftest.$ac_ext <<EOF | |
4203 | #line 4204 "configure" | |
4204 | #include "confdefs.h" | |
4205 | #include <linux/version.h> | |
4206 | EOF | |
4207 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
4208 | { (eval echo configure:4209: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } | |
4209 | ac_err=`grep -v '^ *+' conftest.out` | |
4210 | if test -z "$ac_err"; then | |
4211 | rm -rf conftest* | |
4212 | eval "ac_cv_header_$ac_safe=yes" | |
4213 | else | |
4214 | echo "$ac_err" >&5 | |
4215 | echo "configure: failed program was:" >&5 | |
4216 | cat conftest.$ac_ext >&5 | |
4217 | rm -rf conftest* | |
4218 | eval "ac_cv_header_$ac_safe=no" | |
4219 | fi | |
4220 | rm -f conftest* | |
4221 | fi | |
4222 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4223 | echo "$ac_t""yes" 1>&6 | |
4224 | msgformat=linux | |
4225 | else | |
4226 | echo "$ac_t""no" 1>&6 | |
4227 | msgformat=xopen | |
4228 | fi | |
4229 | ||
4230 | ||
4231 | sed -e '/^#/d' $srcdir/$msgformat-msg.sed > po2msg.sed | |
4232 | fi | |
4233 | sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \ | |
4234 | $srcdir/po2tbl.sed.in > po2tbl.sed | |
4235 | fi | |
4236 | ||
4237 | if test "$PACKAGE" = "gettext"; then | |
4238 | GT_NO="#NO#" | |
4239 | GT_YES= | |
4240 | else | |
4241 | GT_NO= | |
4242 | GT_YES="#YES#" | |
4243 | fi | |
4244 | ||
4245 | ||
4246 | ||
4247 | MKINSTALLDIRS="\$(srcdir)/../../mkinstalldirs" | |
4248 | ||
4249 | ||
4250 | l= | |
4251 | ||
4252 | ||
4253 | if test -d $srcdir/po; then | |
4254 | test -d po || mkdir po | |
4255 | if test "x$srcdir" != "x."; then | |
4256 | if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then | |
4257 | posrcprefix="$srcdir/" | |
4258 | else | |
4259 | posrcprefix="../$srcdir/" | |
4260 | fi | |
4261 | else | |
4262 | posrcprefix="../" | |
4263 | fi | |
4264 | rm -f po/POTFILES | |
4265 | sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \ | |
4266 | < $srcdir/po/POTFILES.in > po/POTFILES | |
4267 | fi | |
4268 | ||
4269 | ||
4270 | echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6 | |
4271 | echo "configure:4272: checking whether to enable maintainer-specific portions of Makefiles" >&5 | |
4272 | # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given. | |
4273 | if test "${enable_maintainer_mode+set}" = set; then | |
4274 | enableval="$enable_maintainer_mode" | |
4275 | USE_MAINTAINER_MODE=$enableval | |
4276 | else | |
4277 | USE_MAINTAINER_MODE=no | |
4278 | fi | |
4279 | ||
4280 | echo "$ac_t""$USE_MAINTAINER_MODE" 1>&6 | |
4281 | if test $USE_MAINTAINER_MODE = yes; then | |
4282 | MAINT= | |
4283 | else | |
4284 | MAINT='#M#' | |
4285 | fi | |
4286 | ||
4287 | ||
4288 | echo $ac_n "checking for Cygwin32 environment""... $ac_c" 1>&6 | |
4289 | echo "configure:4290: checking for Cygwin32 environment" >&5 | |
4290 | if eval "test \"`echo '$''{'am_cv_cygwin32'+set}'`\" = set"; then | |
4291 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4292 | else | |
4293 | cat > conftest.$ac_ext <<EOF | |
4294 | #line 4295 "configure" | |
4295 | #include "confdefs.h" | |
4296 | ||
4297 | int main() { | |
4298 | return __CYGWIN32__; | |
4299 | ; return 0; } | |
4300 | EOF | |
4301 | if { (eval echo configure:4302: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then | |
4302 | rm -rf conftest* | |
4303 | am_cv_cygwin32=yes | |
4304 | else | |
4305 | echo "configure: failed program was:" >&5 | |
4306 | cat conftest.$ac_ext >&5 | |
4307 | rm -rf conftest* | |
4308 | am_cv_cygwin32=no | |
4309 | fi | |
4310 | rm -f conftest* | |
4311 | rm -f conftest* | |
4312 | fi | |
4313 | ||
4314 | echo "$ac_t""$am_cv_cygwin32" 1>&6 | |
4315 | CYGWIN32= | |
4316 | test "$am_cv_cygwin32" = yes && CYGWIN32=yes | |
4317 | echo $ac_n "checking for Mingw32 environment""... $ac_c" 1>&6 | |
4318 | echo "configure:4319: checking for Mingw32 environment" >&5 | |
4319 | if eval "test \"`echo '$''{'am_cv_mingw32'+set}'`\" = set"; then | |
4320 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4321 | else | |
4322 | cat > conftest.$ac_ext <<EOF | |
4323 | #line 4324 "configure" | |
4324 | #include "confdefs.h" | |
4325 | ||
4326 | int main() { | |
4327 | return __MINGW32__; | |
4328 | ; return 0; } | |
4329 | EOF | |
4330 | if { (eval echo configure:4331: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then | |
4331 | rm -rf conftest* | |
4332 | am_cv_mingw32=yes | |
4333 | else | |
4334 | echo "configure: failed program was:" >&5 | |
4335 | cat conftest.$ac_ext >&5 | |
4336 | rm -rf conftest* | |
4337 | am_cv_mingw32=no | |
4338 | fi | |
4339 | rm -f conftest* | |
4340 | rm -f conftest* | |
4341 | fi | |
4342 | ||
4343 | echo "$ac_t""$am_cv_mingw32" 1>&6 | |
4344 | MINGW32= | |
4345 | test "$am_cv_mingw32" = yes && MINGW32=yes | |
4346 | ||
4347 | ||
4348 | echo $ac_n "checking for executable suffix""... $ac_c" 1>&6 | |
4349 | echo "configure:4350: checking for executable suffix" >&5 | |
4350 | if eval "test \"`echo '$''{'am_cv_exeext'+set}'`\" = set"; then | |
4351 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4352 | else | |
4353 | if test "$CYGWIN32" = yes || test "$MINGW32" = yes; then | |
4354 | am_cv_exeext=.exe | |
4355 | else | |
4356 | cat > am_c_test.c << 'EOF' | |
4357 | int main() { | |
4358 | /* Nothing needed here */ | |
4359 | } | |
4360 | EOF | |
4361 | ${CC-cc} -o am_c_test $CFLAGS $CPPFLAGS $LDFLAGS am_c_test.c $LIBS 1>&5 | |
4362 | am_cv_exeext= | |
4363 | for file in am_c_test.*; do | |
4364 | case $file in | |
4365 | *.c) ;; | |
4366 | *.o) ;; | |
4367 | *) am_cv_exeext=`echo $file | sed -e s/am_c_test//` ;; | |
4368 | esac | |
4369 | done | |
4370 | rm -f am_c_test* | |
4371 | fi | |
4372 | ||
4373 | test x"${am_cv_exeext}" = x && am_cv_exeext=no | |
4374 | fi | |
4375 | EXEEXT="" | |
4376 | test x"${am_cv_exeext}" != xno && EXEEXT=${am_cv_exeext} | |
4377 | echo "$ac_t""${am_cv_exeext}" 1>&6 | |
4378 | ||
4379 | ||
4380 | for ac_hdr in string.h stdlib.h memory.h strings.h unistd.h stdarg.h varargs.h errno.h sys/types.h | |
4381 | do | |
4382 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4383 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
4384 | echo "configure:4385: checking for $ac_hdr" >&5 | |
4385 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then | |
4386 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4387 | else | |
4388 | cat > conftest.$ac_ext <<EOF | |
4389 | #line 4390 "configure" | |
4390 | #include "confdefs.h" | |
4391 | #include <$ac_hdr> | |
4392 | EOF | |
4393 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
4394 | { (eval echo configure:4395: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } | |
4395 | ac_err=`grep -v '^ *+' conftest.out` | |
4396 | if test -z "$ac_err"; then | |
4397 | rm -rf conftest* | |
4398 | eval "ac_cv_header_$ac_safe=yes" | |
4399 | else | |
4400 | echo "$ac_err" >&5 | |
4401 | echo "configure: failed program was:" >&5 | |
4402 | cat conftest.$ac_ext >&5 | |
4403 | rm -rf conftest* | |
4404 | eval "ac_cv_header_$ac_safe=no" | |
4405 | fi | |
4406 | rm -f conftest* | |
4407 | fi | |
4408 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4409 | echo "$ac_t""yes" 1>&6 | |
4410 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4411 | cat >> confdefs.h <<EOF | |
4412 | #define $ac_tr_hdr 1 | |
4413 | EOF | |
4414 | ||
4415 | else | |
4416 | echo "$ac_t""no" 1>&6 | |
4417 | fi | |
4418 | done | |
4419 | ||
4420 | ||
4421 | # Put this here so that autoconf's "cross-compiling" message doesn't confuse | |
4422 | # people who are not cross-compiling but are compiling cross-assemblers. | |
4423 | echo $ac_n "checking whether compiling a cross-assembler""... $ac_c" 1>&6 | |
4424 | echo "configure:4425: checking whether compiling a cross-assembler" >&5 | |
4425 | if test "${host}" = "${target}"; then | |
4426 | cross_gas=no | |
4427 | else | |
4428 | cross_gas=yes | |
4429 | cat >> confdefs.h <<\EOF | |
4430 | #define CROSS_COMPILE 1 | |
4431 | EOF | |
4432 | ||
4433 | fi | |
4434 | echo "$ac_t""$cross_gas" 1>&6 | |
4435 | ||
4436 | # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works | |
4437 | # for constant arguments. Useless! | |
4438 | echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6 | |
4439 | echo "configure:4440: checking for working alloca.h" >&5 | |
4440 | if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then | |
4441 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4442 | else | |
4443 | cat > conftest.$ac_ext <<EOF | |
4444 | #line 4445 "configure" | |
4445 | #include "confdefs.h" | |
4446 | #include <alloca.h> | |
4447 | int main() { | |
4448 | char *p = alloca(2 * sizeof(int)); | |
4449 | ; return 0; } | |
4450 | EOF | |
4451 | if { (eval echo configure:4452: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then | |
4452 | rm -rf conftest* | |
4453 | ac_cv_header_alloca_h=yes | |
4454 | else | |
4455 | echo "configure: failed program was:" >&5 | |
4456 | cat conftest.$ac_ext >&5 | |
4457 | rm -rf conftest* | |
4458 | ac_cv_header_alloca_h=no | |
4459 | fi | |
4460 | rm -f conftest* | |
4461 | fi | |
4462 | ||
4463 | echo "$ac_t""$ac_cv_header_alloca_h" 1>&6 | |
4464 | if test $ac_cv_header_alloca_h = yes; then | |
4465 | cat >> confdefs.h <<\EOF | |
4466 | #define HAVE_ALLOCA_H 1 | |
4467 | EOF | |
4468 | ||
4469 | fi | |
4470 | ||
4471 | echo $ac_n "checking for alloca""... $ac_c" 1>&6 | |
4472 | echo "configure:4473: checking for alloca" >&5 | |
4473 | if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then | |
4474 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4475 | else | |
4476 | cat > conftest.$ac_ext <<EOF | |
4477 | #line 4478 "configure" | |
4478 | #include "confdefs.h" | |
4479 | ||
4480 | #ifdef __GNUC__ | |
4481 | # define alloca __builtin_alloca | |
4482 | #else | |
4483 | # if HAVE_ALLOCA_H | |
4484 | # include <alloca.h> | |
4485 | # else | |
4486 | # ifdef _AIX | |
4487 | #pragma alloca | |
4488 | # else | |
4489 | # ifndef alloca /* predefined by HP cc +Olibcalls */ | |
4490 | char *alloca (); | |
4491 | # endif | |
4492 | # endif | |
4493 | # endif | |
4494 | #endif | |
4495 | ||
4496 | int main() { | |
4497 | char *p = (char *) alloca(1); | |
4498 | ; return 0; } | |
4499 | EOF | |
4500 | if { (eval echo configure:4501: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then | |
4501 | rm -rf conftest* | |
4502 | ac_cv_func_alloca_works=yes | |
4503 | else | |
4504 | echo "configure: failed program was:" >&5 | |
4505 | cat conftest.$ac_ext >&5 | |
4506 | rm -rf conftest* | |
4507 | ac_cv_func_alloca_works=no | |
4508 | fi | |
4509 | rm -f conftest* | |
4510 | fi | |
4511 | ||
4512 | echo "$ac_t""$ac_cv_func_alloca_works" 1>&6 | |
4513 | if test $ac_cv_func_alloca_works = yes; then | |
4514 | cat >> confdefs.h <<\EOF | |
4515 | #define HAVE_ALLOCA 1 | |
4516 | EOF | |
4517 | ||
4518 | fi | |
4519 | ||
4520 | if test $ac_cv_func_alloca_works = no; then | |
4521 | # The SVR3 libPW and SVR4 libucb both contain incompatible functions | |
4522 | # that cause trouble. Some versions do not even contain alloca or | |
4523 | # contain a buggy version. If you still want to use their alloca, | |
4524 | # use ar to extract alloca.o from them instead of compiling alloca.c. | |
4525 | ALLOCA=alloca.o | |
4526 | cat >> confdefs.h <<\EOF | |
4527 | #define C_ALLOCA 1 | |
4528 | EOF | |
4529 | ||
4530 | ||
4531 | echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6 | |
4532 | echo "configure:4533: checking whether alloca needs Cray hooks" >&5 | |
4533 | if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then | |
4534 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4535 | else | |
4536 | cat > conftest.$ac_ext <<EOF | |
4537 | #line 4538 "configure" | |
4538 | #include "confdefs.h" | |
4539 | #if defined(CRAY) && ! defined(CRAY2) | |
4540 | webecray | |
4541 | #else | |
4542 | wenotbecray | |
4543 | #endif | |
4544 | ||
4545 | EOF | |
4546 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
4547 | egrep "webecray" >/dev/null 2>&1; then | |
4548 | rm -rf conftest* | |
4549 | ac_cv_os_cray=yes | |
4550 | else | |
4551 | rm -rf conftest* | |
4552 | ac_cv_os_cray=no | |
4553 | fi | |
4554 | rm -f conftest* | |
4555 | ||
4556 | fi | |
4557 | ||
4558 | echo "$ac_t""$ac_cv_os_cray" 1>&6 | |
4559 | if test $ac_cv_os_cray = yes; then | |
4560 | for ac_func in _getb67 GETB67 getb67; do | |
4561 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
4562 | echo "configure:4563: checking for $ac_func" >&5 | |
4563 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then | |
4564 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4565 | else | |
4566 | cat > conftest.$ac_ext <<EOF | |
4567 | #line 4568 "configure" | |
4568 | #include "confdefs.h" | |
4569 | /* System header to define __stub macros and hopefully few prototypes, | |
4570 | which can conflict with char $ac_func(); below. */ | |
4571 | #include <assert.h> | |
4572 | /* Override any gcc2 internal prototype to avoid an error. */ | |
4573 | /* We use char because int might match the return type of a gcc2 | |
4574 | builtin and then its argument prototype would still apply. */ | |
4575 | char $ac_func(); | |
4576 | ||
4577 | int main() { | |
4578 | ||
4579 | /* The GNU C library defines this for functions which it implements | |
4580 | to always fail with ENOSYS. Some functions are actually named | |
4581 | something starting with __ and the normal name is an alias. */ | |
4582 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
4583 | choke me | |
4584 | #else | |
4585 | $ac_func(); | |
4586 | #endif | |
4587 | ||
4588 | ; return 0; } | |
4589 | EOF | |
4590 | if { (eval echo configure:4591: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then | |
4591 | rm -rf conftest* | |
4592 | eval "ac_cv_func_$ac_func=yes" | |
4593 | else | |
4594 | echo "configure: failed program was:" >&5 | |
4595 | cat conftest.$ac_ext >&5 | |
4596 | rm -rf conftest* | |
4597 | eval "ac_cv_func_$ac_func=no" | |
4598 | fi | |
4599 | rm -f conftest* | |
4600 | fi | |
4601 | ||
4602 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
4603 | echo "$ac_t""yes" 1>&6 | |
4604 | cat >> confdefs.h <<EOF | |
4605 | #define CRAY_STACKSEG_END $ac_func | |
4606 | EOF | |
4607 | ||
4608 | break | |
4609 | else | |
4610 | echo "$ac_t""no" 1>&6 | |
4611 | fi | |
4612 | ||
4613 | done | |
4614 | fi | |
4615 | ||
4616 | echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6 | |
4617 | echo "configure:4618: checking stack direction for C alloca" >&5 | |
4618 | if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then | |
4619 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4620 | else | |
4621 | if test "$cross_compiling" = yes; then | |
4622 | ac_cv_c_stack_direction=0 | |
4623 | else | |
4624 | cat > conftest.$ac_ext <<EOF | |
4625 | #line 4626 "configure" | |
4626 | #include "confdefs.h" | |
4627 | find_stack_direction () | |
4628 | { | |
4629 | static char *addr = 0; | |
4630 | auto char dummy; | |
4631 | if (addr == 0) | |
4632 | { | |
4633 | addr = &dummy; | |
4634 | return find_stack_direction (); | |
4635 | } | |
4636 | else | |
4637 | return (&dummy > addr) ? 1 : -1; | |
4638 | } | |
4639 | main () | |
4640 | { | |
4641 | exit (find_stack_direction() < 0); | |
4642 | } | |
4643 | EOF | |
4644 | if { (eval echo configure:4645: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null | |
4645 | then | |
4646 | ac_cv_c_stack_direction=1 | |
4647 | else | |
4648 | echo "configure: failed program was:" >&5 | |
4649 | cat conftest.$ac_ext >&5 | |
4650 | rm -fr conftest* | |
4651 | ac_cv_c_stack_direction=-1 | |
4652 | fi | |
4653 | rm -fr conftest* | |
4654 | fi | |
4655 | ||
4656 | fi | |
4657 | ||
4658 | echo "$ac_t""$ac_cv_c_stack_direction" 1>&6 | |
4659 | cat >> confdefs.h <<EOF | |
4660 | #define STACK_DIRECTION $ac_cv_c_stack_direction | |
4661 | EOF | |
4662 | ||
4663 | fi | |
4664 | ||
4665 | echo $ac_n "checking for inline""... $ac_c" 1>&6 | |
4666 | echo "configure:4667: checking for inline" >&5 | |
4667 | if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then | |
4668 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4669 | else | |
4670 | ac_cv_c_inline=no | |
4671 | for ac_kw in inline __inline__ __inline; do | |
4672 | cat > conftest.$ac_ext <<EOF | |
4673 | #line 4674 "configure" | |
4674 | #include "confdefs.h" | |
4675 | ||
4676 | int main() { | |
4677 | } $ac_kw foo() { | |
4678 | ; return 0; } | |
4679 | EOF | |
4680 | if { (eval echo configure:4681: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then | |
4681 | rm -rf conftest* | |
4682 | ac_cv_c_inline=$ac_kw; break | |
4683 | else | |
4684 | echo "configure: failed program was:" >&5 | |
4685 | cat conftest.$ac_ext >&5 | |
4686 | fi | |
4687 | rm -f conftest* | |
4688 | done | |
4689 | ||
4690 | fi | |
4691 | ||
4692 | echo "$ac_t""$ac_cv_c_inline" 1>&6 | |
4693 | case "$ac_cv_c_inline" in | |
4694 | inline | yes) ;; | |
4695 | no) cat >> confdefs.h <<\EOF | |
4696 | #define inline | |
4697 | EOF | |
4698 | ;; | |
4699 | *) cat >> confdefs.h <<EOF | |
4700 | #define inline $ac_cv_c_inline | |
4701 | EOF | |
4702 | ;; | |
4703 | esac | |
4704 | ||
4705 | ||
4706 | # VMS doesn't have unlink. | |
4707 | for ac_func in unlink remove | |
4708 | do | |
4709 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
4710 | echo "configure:4711: checking for $ac_func" >&5 | |
4711 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then | |
4712 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4713 | else | |
4714 | cat > conftest.$ac_ext <<EOF | |
4715 | #line 4716 "configure" | |
4716 | #include "confdefs.h" | |
4717 | /* System header to define __stub macros and hopefully few prototypes, | |
4718 | which can conflict with char $ac_func(); below. */ | |
4719 | #include <assert.h> | |
4720 | /* Override any gcc2 internal prototype to avoid an error. */ | |
4721 | /* We use char because int might match the return type of a gcc2 | |
4722 | builtin and then its argument prototype would still apply. */ | |
4723 | char $ac_func(); | |
4724 | ||
4725 | int main() { | |
4726 | ||
4727 | /* The GNU C library defines this for functions which it implements | |
4728 | to always fail with ENOSYS. Some functions are actually named | |
4729 | something starting with __ and the normal name is an alias. */ | |
4730 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
4731 | choke me | |
4732 | #else | |
4733 | $ac_func(); | |
4734 | #endif | |
4735 | ||
4736 | ; return 0; } | |
4737 | EOF | |
4738 | if { (eval echo configure:4739: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then | |
28d3e4a3 | 4739 | rm -rf conftest* |
b9419dd2 | 4740 | eval "ac_cv_func_$ac_func=yes" |
28d3e4a3 | 4741 | else |
c6c7035c MM |
4742 | echo "configure: failed program was:" >&5 |
4743 | cat conftest.$ac_ext >&5 | |
28d3e4a3 | 4744 | rm -rf conftest* |
b9419dd2 | 4745 | eval "ac_cv_func_$ac_func=no" |
28d3e4a3 KR |
4746 | fi |
4747 | rm -f conftest* | |
7d0f8249 | 4748 | fi |
c6c7035c | 4749 | |
b9419dd2 | 4750 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
833c46e1 | 4751 | echo "$ac_t""yes" 1>&6 |
1c9dbb83 | 4752 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
b9419dd2 KR |
4753 | cat >> confdefs.h <<EOF |
4754 | #define $ac_tr_func 1 | |
28d3e4a3 | 4755 | EOF |
b9419dd2 | 4756 | break |
28d3e4a3 | 4757 | else |
833c46e1 | 4758 | echo "$ac_t""no" 1>&6 |
28d3e4a3 | 4759 | fi |
b9419dd2 | 4760 | done |
28d3e4a3 KR |
4761 | |
4762 | ||
e63c594d FF |
4763 | # Some systems don't have sbrk(). |
4764 | for ac_func in sbrk | |
4765 | do | |
4766 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
48401fcf | 4767 | echo "configure:4768: checking for $ac_func" >&5 |
e63c594d FF |
4768 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
4769 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4770 | else | |
4771 | cat > conftest.$ac_ext <<EOF | |
48401fcf | 4772 | #line 4773 "configure" |
e63c594d FF |
4773 | #include "confdefs.h" |
4774 | /* System header to define __stub macros and hopefully few prototypes, | |
4775 | which can conflict with char $ac_func(); below. */ | |
4776 | #include <assert.h> | |
4777 | /* Override any gcc2 internal prototype to avoid an error. */ | |
df586de2 ILT |
4778 | /* We use char because int might match the return type of a gcc2 |
4779 | builtin and then its argument prototype would still apply. */ | |
1c9dbb83 | 4780 | char $ac_func(); |
e63c594d | 4781 | |
c6c7035c | 4782 | int main() { |
e63c594d FF |
4783 | |
4784 | /* The GNU C library defines this for functions which it implements | |
4785 | to always fail with ENOSYS. Some functions are actually named | |
4786 | something starting with __ and the normal name is an alias. */ | |
4787 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
4788 | choke me | |
4789 | #else | |
4790 | $ac_func(); | |
4791 | #endif | |
4792 | ||
4793 | ; return 0; } | |
4794 | EOF | |
48401fcf | 4795 | if { (eval echo configure:4796: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then |
e63c594d FF |
4796 | rm -rf conftest* |
4797 | eval "ac_cv_func_$ac_func=yes" | |
4798 | else | |
c6c7035c MM |
4799 | echo "configure: failed program was:" >&5 |
4800 | cat conftest.$ac_ext >&5 | |
e63c594d FF |
4801 | rm -rf conftest* |
4802 | eval "ac_cv_func_$ac_func=no" | |
4803 | fi | |
4804 | rm -f conftest* | |
7d0f8249 | 4805 | fi |
c6c7035c | 4806 | |
e63c594d FF |
4807 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
4808 | echo "$ac_t""yes" 1>&6 | |
1c9dbb83 | 4809 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
e63c594d FF |
4810 | cat >> confdefs.h <<EOF |
4811 | #define $ac_tr_func 1 | |
4812 | EOF | |
4813 | ||
4814 | else | |
4815 | echo "$ac_t""no" 1>&6 | |
4816 | fi | |
4817 | done | |
4818 | ||
4819 | ||
b11fb939 KR |
4820 | # Some non-ANSI preprocessors botch requoting inside strings. That's bad |
4821 | # enough, but on some of those systems, the assert macro relies on requoting | |
4822 | # working properly! | |
833c46e1 | 4823 | echo $ac_n "checking for working assert macro""... $ac_c" 1>&6 |
48401fcf | 4824 | echo "configure:4825: checking for working assert macro" >&5 |
833c46e1 KR |
4825 | if eval "test \"`echo '$''{'gas_cv_assert_ok'+set}'`\" = set"; then |
4826 | echo $ac_n "(cached) $ac_c" 1>&6 | |
fb589130 | 4827 | else |
28d3e4a3 | 4828 | cat > conftest.$ac_ext <<EOF |
48401fcf | 4829 | #line 4830 "configure" |
b11fb939 KR |
4830 | #include "confdefs.h" |
4831 | #include <assert.h> | |
4832 | #include <stdio.h> | |
c6c7035c | 4833 | int main() { |
b11fb939 KR |
4834 | |
4835 | /* check for requoting problems */ | |
4836 | static int a, b, c, d; | |
4837 | static char *s; | |
4838 | assert (!strcmp(s, "foo bar baz quux")); | |
4839 | /* check for newline handling */ | |
4840 | assert (a == b | |
4841 | || c == d); | |
4842 | ||
4843 | ; return 0; } | |
4844 | EOF | |
48401fcf | 4845 | if { (eval echo configure:4846: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then |
fb589130 KR |
4846 | rm -rf conftest* |
4847 | gas_cv_assert_ok=yes | |
b11fb939 | 4848 | else |
c6c7035c MM |
4849 | echo "configure: failed program was:" >&5 |
4850 | cat conftest.$ac_ext >&5 | |
b11fb939 | 4851 | rm -rf conftest* |
fb589130 | 4852 | gas_cv_assert_ok=no |
b11fb939 KR |
4853 | fi |
4854 | rm -f conftest* | |
fb589130 | 4855 | fi |
833c46e1 | 4856 | echo "$ac_t""$gas_cv_assert_ok" 1>&6 |
fb589130 KR |
4857 | test $gas_cv_assert_ok = yes || cat >> confdefs.h <<\EOF |
4858 | #define BROKEN_ASSERT 1 | |
4859 | EOF | |
4860 | ||
b11fb939 | 4861 | |
bf111c9f | 4862 | |
b11fb939 KR |
4863 | # On some systems, the system header files may not declare malloc, realloc, |
4864 | # and free. There are places where gas needs these functions to have been | |
4865 | # declared -- such as when taking their addresses. | |
bf111c9f | 4866 | gas_test_headers=" |
b11fb939 KR |
4867 | #ifdef HAVE_MEMORY_H |
4868 | #include <memory.h> | |
4869 | #endif | |
4870 | #ifdef HAVE_STRING_H | |
4871 | #include <string.h> | |
5cece526 ILT |
4872 | #else |
4873 | #ifdef HAVE_STRINGS_H | |
4874 | #include <strings.h> | |
4875 | #endif | |
b11fb939 KR |
4876 | #endif |
4877 | #ifdef HAVE_STDLIB_H | |
4878 | #include <stdlib.h> | |
4879 | #endif | |
4880 | #ifdef HAVE_UNISTD_H | |
4881 | #include <unistd.h> | |
4882 | #endif | |
bf111c9f | 4883 | " |
b11fb939 | 4884 | |
5cece526 | 4885 | echo $ac_n "checking whether declaration is required for strstr""... $ac_c" 1>&6 |
48401fcf | 4886 | echo "configure:4887: checking whether declaration is required for strstr" >&5 |
5cece526 ILT |
4887 | if eval "test \"`echo '$''{'gas_cv_decl_needed_strstr'+set}'`\" = set"; then |
4888 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4889 | else | |
4890 | cat > conftest.$ac_ext <<EOF | |
48401fcf | 4891 | #line 4892 "configure" |
5cece526 ILT |
4892 | #include "confdefs.h" |
4893 | $gas_test_headers | |
c6c7035c | 4894 | int main() { |
5cece526 ILT |
4895 | |
4896 | typedef char *(*f)(); | |
4897 | f x; | |
4898 | x = (f) strstr; | |
4899 | ||
4900 | ; return 0; } | |
4901 | EOF | |
48401fcf | 4902 | if { (eval echo configure:4903: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then |
5cece526 ILT |
4903 | rm -rf conftest* |
4904 | gas_cv_decl_needed_strstr=no | |
4905 | else | |
c6c7035c MM |
4906 | echo "configure: failed program was:" >&5 |
4907 | cat conftest.$ac_ext >&5 | |
5cece526 ILT |
4908 | rm -rf conftest* |
4909 | gas_cv_decl_needed_strstr=yes | |
4910 | fi | |
4911 | rm -f conftest* | |
5cece526 ILT |
4912 | fi |
4913 | echo "$ac_t""$gas_cv_decl_needed_strstr" 1>&6 | |
4914 | test $gas_cv_decl_needed_strstr = no || { | |
4915 | cat >> confdefs.h <<\EOF | |
4916 | #define NEED_DECLARATION_STRSTR 1 | |
4917 | EOF | |
4918 | ||
4919 | } | |
4920 | ||
4921 | ||
833c46e1 | 4922 | echo $ac_n "checking whether declaration is required for malloc""... $ac_c" 1>&6 |
48401fcf | 4923 | echo "configure:4924: checking whether declaration is required for malloc" >&5 |
833c46e1 KR |
4924 | if eval "test \"`echo '$''{'gas_cv_decl_needed_malloc'+set}'`\" = set"; then |
4925 | echo $ac_n "(cached) $ac_c" 1>&6 | |
bf111c9f | 4926 | else |
28d3e4a3 | 4927 | cat > conftest.$ac_ext <<EOF |
48401fcf | 4928 | #line 4929 "configure" |
bf111c9f KR |
4929 | #include "confdefs.h" |
4930 | $gas_test_headers | |
c6c7035c | 4931 | int main() { |
b11fb939 | 4932 | |
bf111c9f KR |
4933 | typedef char *(*f)(); |
4934 | f x; | |
4935 | x = (f) malloc; | |
b11fb939 KR |
4936 | |
4937 | ; return 0; } | |
4938 | EOF | |
48401fcf | 4939 | if { (eval echo configure:4940: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then |
fb589130 | 4940 | rm -rf conftest* |
bf111c9f | 4941 | gas_cv_decl_needed_malloc=no |
b11fb939 | 4942 | else |
c6c7035c MM |
4943 | echo "configure: failed program was:" >&5 |
4944 | cat conftest.$ac_ext >&5 | |
b11fb939 | 4945 | rm -rf conftest* |
bf111c9f | 4946 | gas_cv_decl_needed_malloc=yes |
fb589130 KR |
4947 | fi |
4948 | rm -f conftest* | |
fb589130 | 4949 | fi |
833c46e1 | 4950 | echo "$ac_t""$gas_cv_decl_needed_malloc" 1>&6 |
bf111c9f KR |
4951 | test $gas_cv_decl_needed_malloc = no || { |
4952 | cat >> confdefs.h <<\EOF | |
4953 | #define NEED_DECLARATION_MALLOC 1 | |
b11fb939 KR |
4954 | EOF |
4955 | ||
bf111c9f KR |
4956 | } |
4957 | ||
b11fb939 | 4958 | |
833c46e1 | 4959 | echo $ac_n "checking whether declaration is required for free""... $ac_c" 1>&6 |
48401fcf | 4960 | echo "configure:4961: checking whether declaration is required for free" >&5 |
833c46e1 KR |
4961 | if eval "test \"`echo '$''{'gas_cv_decl_needed_free'+set}'`\" = set"; then |
4962 | echo $ac_n "(cached) $ac_c" 1>&6 | |
fb589130 | 4963 | else |
28d3e4a3 | 4964 | cat > conftest.$ac_ext <<EOF |
48401fcf | 4965 | #line 4966 "configure" |
b11fb939 | 4966 | #include "confdefs.h" |
bf111c9f | 4967 | $gas_test_headers |
c6c7035c | 4968 | int main() { |
b11fb939 | 4969 | |
5f757edc | 4970 | typedef void (*f)(); |
bf111c9f KR |
4971 | f x; |
4972 | x = (f) free; | |
b11fb939 KR |
4973 | |
4974 | ; return 0; } | |
4975 | EOF | |
48401fcf | 4976 | if { (eval echo configure:4977: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then |
fb589130 | 4977 | rm -rf conftest* |
bf111c9f | 4978 | gas_cv_decl_needed_free=no |
b11fb939 | 4979 | else |
c6c7035c MM |
4980 | echo "configure: failed program was:" >&5 |
4981 | cat conftest.$ac_ext >&5 | |
b11fb939 | 4982 | rm -rf conftest* |
bf111c9f | 4983 | gas_cv_decl_needed_free=yes |
b11fb939 KR |
4984 | fi |
4985 | rm -f conftest* | |
fb589130 | 4986 | fi |
833c46e1 | 4987 | echo "$ac_t""$gas_cv_decl_needed_free" 1>&6 |
bf111c9f KR |
4988 | test $gas_cv_decl_needed_free = no || { |
4989 | cat >> confdefs.h <<\EOF | |
4990 | #define NEED_DECLARATION_FREE 1 | |
fb589130 KR |
4991 | EOF |
4992 | ||
bf111c9f KR |
4993 | } |
4994 | ||
b11fb939 | 4995 | |
5cece526 | 4996 | echo $ac_n "checking whether declaration is required for sbrk""... $ac_c" 1>&6 |
48401fcf | 4997 | echo "configure:4998: checking whether declaration is required for sbrk" >&5 |
5cece526 ILT |
4998 | if eval "test \"`echo '$''{'gas_cv_decl_needed_sbrk'+set}'`\" = set"; then |
4999 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5000 | else | |
5001 | cat > conftest.$ac_ext <<EOF | |
48401fcf | 5002 | #line 5003 "configure" |
5cece526 ILT |
5003 | #include "confdefs.h" |
5004 | $gas_test_headers | |
c6c7035c | 5005 | int main() { |
5cece526 ILT |
5006 | |
5007 | typedef char *(*f)(); | |
5008 | f x; | |
5009 | x = (f) sbrk; | |
5010 | ||
5011 | ; return 0; } | |
5012 | EOF | |
48401fcf | 5013 | if { (eval echo configure:5014: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then |
5cece526 ILT |
5014 | rm -rf conftest* |
5015 | gas_cv_decl_needed_sbrk=no | |
5016 | else | |
c6c7035c MM |
5017 | echo "configure: failed program was:" >&5 |
5018 | cat conftest.$ac_ext >&5 | |
5cece526 ILT |
5019 | rm -rf conftest* |
5020 | gas_cv_decl_needed_sbrk=yes | |
5021 | fi | |
5022 | rm -f conftest* | |
5cece526 ILT |
5023 | fi |
5024 | echo "$ac_t""$gas_cv_decl_needed_sbrk" 1>&6 | |
5025 | test $gas_cv_decl_needed_sbrk = no || { | |
5026 | cat >> confdefs.h <<\EOF | |
5027 | #define NEED_DECLARATION_SBRK 1 | |
5028 | EOF | |
5029 | ||
5030 | } | |
5031 | ||
5032 | ||
b11fb939 KR |
5033 | # Does errno.h declare errno, or do we have to add a separate declaration |
5034 | # for it? | |
bf111c9f | 5035 | |
833c46e1 | 5036 | echo $ac_n "checking whether declaration is required for errno""... $ac_c" 1>&6 |
48401fcf | 5037 | echo "configure:5038: checking whether declaration is required for errno" >&5 |
833c46e1 KR |
5038 | if eval "test \"`echo '$''{'gas_cv_decl_needed_errno'+set}'`\" = set"; then |
5039 | echo $ac_n "(cached) $ac_c" 1>&6 | |
fb589130 | 5040 | else |
28d3e4a3 | 5041 | cat > conftest.$ac_ext <<EOF |
48401fcf | 5042 | #line 5043 "configure" |
b11fb939 KR |
5043 | #include "confdefs.h" |
5044 | ||
5045 | #ifdef HAVE_ERRNO_H | |
5046 | #include <errno.h> | |
5047 | #endif | |
5048 | ||
c6c7035c | 5049 | int main() { |
b11fb939 | 5050 | |
bf111c9f KR |
5051 | typedef int f; |
5052 | f x; | |
5053 | x = (f) errno; | |
b11fb939 KR |
5054 | |
5055 | ; return 0; } | |
5056 | EOF | |
48401fcf | 5057 | if { (eval echo configure:5058: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then |
fb589130 | 5058 | rm -rf conftest* |
bf111c9f | 5059 | gas_cv_decl_needed_errno=no |
b11fb939 | 5060 | else |
c6c7035c MM |
5061 | echo "configure: failed program was:" >&5 |
5062 | cat conftest.$ac_ext >&5 | |
b11fb939 | 5063 | rm -rf conftest* |
bf111c9f | 5064 | gas_cv_decl_needed_errno=yes |
b11fb939 KR |
5065 | fi |
5066 | rm -f conftest* | |
fb589130 | 5067 | fi |
833c46e1 | 5068 | echo "$ac_t""$gas_cv_decl_needed_errno" 1>&6 |
bf111c9f KR |
5069 | test $gas_cv_decl_needed_errno = no || { |
5070 | cat >> confdefs.h <<\EOF | |
5071 | #define NEED_DECLARATION_ERRNO 1 | |
fb589130 KR |
5072 | EOF |
5073 | ||
bf111c9f KR |
5074 | } |
5075 | ||
b11fb939 | 5076 | |
515c7142 ILT |
5077 | |
5078 | ||
ba49e48d | 5079 | trap '' 1 2 15 |
833c46e1 | 5080 | cat > confcache <<\EOF |
b11fb939 KR |
5081 | # This file is a shell script that caches the results of configure |
5082 | # tests run on this system so they can be shared between configure | |
5083 | # scripts and configure runs. It is not useful on other systems. | |
bf111c9f | 5084 | # If it contains results you don't want to keep, you may remove or edit it. |
b11fb939 KR |
5085 | # |
5086 | # By default, configure uses ./config.cache as the cache file, | |
5087 | # creating it if it does not exist already. You can give configure | |
5088 | # the --cache-file=FILE option to use a different cache file; that is | |
5089 | # what configure does when it calls configure scripts in | |
5090 | # subdirectories, so they share the cache. | |
5091 | # Giving --cache-file=/dev/null disables caching, for debugging configure. | |
5092 | # config.status only pays attention to the cache file if you give it the | |
5093 | # --recheck option to rerun configure. | |
e23b25ec | 5094 | # |
b11fb939 | 5095 | EOF |
c6c7035c MM |
5096 | # The following way of writing the cache mishandles newlines in values, |
5097 | # but we know of no workaround that is simple, portable, and efficient. | |
5098 | # So, don't put newlines in cache variables' values. | |
833c46e1 KR |
5099 | # Ultrix sh set writes to stderr and can't be redirected directly, |
5100 | # and sets the high bit in the cache file unless we assign to the vars. | |
e23b25ec | 5101 | (set) 2>&1 | |
6cc7a938 | 5102 | case `(ac_space=' '; set) 2>&1 | grep ac_space` in |
c6c7035c MM |
5103 | *ac_space=\ *) |
5104 | # `set' does not quote correctly, so add quotes (double-quote substitution | |
5105 | # turns \\\\ into \\, and sed turns \\ into \). | |
5106 | sed -n \ | |
5107 | -e "s/'/'\\\\''/g" \ | |
5108 | -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p" | |
5109 | ;; | |
5110 | *) | |
5111 | # `set' quotes correctly as required by POSIX, so do not add quotes. | |
5112 | sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p' | |
5113 | ;; | |
5114 | esac >> confcache | |
833c46e1 KR |
5115 | if cmp -s $cache_file confcache; then |
5116 | : | |
b11fb939 | 5117 | else |
833c46e1 KR |
5118 | if test -w $cache_file; then |
5119 | echo "updating cache $cache_file" | |
5120 | cat confcache > $cache_file | |
5121 | else | |
5122 | echo "not updating unwritable cache $cache_file" | |
5123 | fi | |
b11fb939 | 5124 | fi |
833c46e1 | 5125 | rm -f confcache |
b11fb939 | 5126 | |
833c46e1 | 5127 | trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 |
b11fb939 | 5128 | |
f2889110 | 5129 | test "x$prefix" = xNONE && prefix=$ac_default_prefix |
b11fb939 KR |
5130 | # Let make expand exec_prefix. |
5131 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
5132 | ||
5133 | # Any assignment to VPATH causes Sun make to only execute | |
5134 | # the first set of double-colon rules, so remove it if not needed. | |
5135 | # If there is a colon in the path, we need to keep it. | |
5136 | if test "x$srcdir" = x.; then | |
5137 | ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d' | |
5138 | fi | |
5139 | ||
5140 | trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15 | |
5141 | ||
5142 | DEFS=-DHAVE_CONFIG_H | |
5143 | ||
5144 | # Without the "./", some shells look in PATH for config.status. | |
5145 | : ${CONFIG_STATUS=./config.status} | |
5146 | ||
28d3e4a3 KR |
5147 | echo creating $CONFIG_STATUS |
5148 | rm -f $CONFIG_STATUS | |
5149 | cat > $CONFIG_STATUS <<EOF | |
833c46e1 | 5150 | #! /bin/sh |
b11fb939 KR |
5151 | # Generated automatically by configure. |
5152 | # Run this file to recreate the current configuration. | |
5153 | # This directory was configured as follows, | |
5154 | # on host `(hostname || uname -n) 2>/dev/null | sed 1q`: | |
5155 | # | |
e23b25ec | 5156 | # $0 $ac_configure_args |
b11fb939 KR |
5157 | # |
5158 | # Compiler output produced by configure, useful for debugging | |
5159 | # configure, is in ./config.log if it exists. | |
5160 | ||
28d3e4a3 | 5161 | ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]" |
b11fb939 KR |
5162 | for ac_option |
5163 | do | |
5164 | case "\$ac_option" in | |
5165 | -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) | |
e23b25ec KR |
5166 | echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" |
5167 | exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; | |
b11fb939 | 5168 | -version | --version | --versio | --versi | --vers | --ver | --ve | --v) |
b5db0960 | 5169 | echo "$CONFIG_STATUS generated by autoconf version 2.12.1" |
b11fb939 KR |
5170 | exit 0 ;; |
5171 | -help | --help | --hel | --he | --h) | |
5172 | echo "\$ac_cs_usage"; exit 0 ;; | |
5173 | *) echo "\$ac_cs_usage"; exit 1 ;; | |
5174 | esac | |
5175 | done | |
5176 | ||
5177 | ac_given_srcdir=$srcdir | |
5178 | ac_given_INSTALL="$INSTALL" | |
5179 | ||
48401fcf | 5180 | trap 'rm -fr `echo "Makefile doc/Makefile .gdbinit:gdbinit.in po/Makefile.in:po/Make-in config.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 |
1c9dbb83 ILT |
5181 | EOF |
5182 | cat >> $CONFIG_STATUS <<EOF | |
b11fb939 | 5183 | |
1c9dbb83 ILT |
5184 | # Protect against being on the right side of a sed subst in config.status. |
5185 | sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g; | |
5186 | s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF | |
b11fb939 KR |
5187 | $ac_vpsub |
5188 | $extrasub | |
ed1ed9f9 | 5189 | s%@SHELL@%$SHELL%g |
b11fb939 | 5190 | s%@CFLAGS@%$CFLAGS%g |
b11fb939 | 5191 | s%@CPPFLAGS@%$CPPFLAGS%g |
bf111c9f KR |
5192 | s%@CXXFLAGS@%$CXXFLAGS%g |
5193 | s%@DEFS@%$DEFS%g | |
b11fb939 | 5194 | s%@LDFLAGS@%$LDFLAGS%g |
bf111c9f KR |
5195 | s%@LIBS@%$LIBS%g |
5196 | s%@exec_prefix@%$exec_prefix%g | |
5197 | s%@prefix@%$prefix%g | |
ba49e48d | 5198 | s%@program_transform_name@%$program_transform_name%g |
1c9dbb83 ILT |
5199 | s%@bindir@%$bindir%g |
5200 | s%@sbindir@%$sbindir%g | |
5201 | s%@libexecdir@%$libexecdir%g | |
5202 | s%@datadir@%$datadir%g | |
5203 | s%@sysconfdir@%$sysconfdir%g | |
5204 | s%@sharedstatedir@%$sharedstatedir%g | |
5205 | s%@localstatedir@%$localstatedir%g | |
5206 | s%@libdir@%$libdir%g | |
5207 | s%@includedir@%$includedir%g | |
5208 | s%@oldincludedir@%$oldincludedir%g | |
5209 | s%@infodir@%$infodir%g | |
5210 | s%@mandir@%$mandir%g | |
b11fb939 KR |
5211 | s%@host@%$host%g |
5212 | s%@host_alias@%$host_alias%g | |
5213 | s%@host_cpu@%$host_cpu%g | |
5214 | s%@host_vendor@%$host_vendor%g | |
5215 | s%@host_os@%$host_os%g | |
5216 | s%@target@%$target%g | |
5217 | s%@target_alias@%$target_alias%g | |
5218 | s%@target_cpu@%$target_cpu%g | |
5219 | s%@target_vendor@%$target_vendor%g | |
5220 | s%@target_os@%$target_os%g | |
5221 | s%@build@%$build%g | |
5222 | s%@build_alias@%$build_alias%g | |
5223 | s%@build_cpu@%$build_cpu%g | |
5224 | s%@build_vendor@%$build_vendor%g | |
5225 | s%@build_os@%$build_os%g | |
e2b4bd2a ILT |
5226 | s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g |
5227 | s%@INSTALL_DATA@%$INSTALL_DATA%g | |
5228 | s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g | |
5229 | s%@PACKAGE@%$PACKAGE%g | |
5230 | s%@VERSION@%$VERSION%g | |
5231 | s%@ACLOCAL@%$ACLOCAL%g | |
5232 | s%@AUTOCONF@%$AUTOCONF%g | |
5233 | s%@AUTOMAKE@%$AUTOMAKE%g | |
5234 | s%@AUTOHEADER@%$AUTOHEADER%g | |
5235 | s%@MAKEINFO@%$MAKEINFO%g | |
5236 | s%@SET_MAKE@%$SET_MAKE%g | |
e2b4bd2a | 5237 | s%@RANLIB@%$RANLIB%g |
a52052db | 5238 | s%@CC@%$CC%g |
e2b4bd2a | 5239 | s%@LD@%$LD%g |
a52052db | 5240 | s%@NM@%$NM%g |
e2b4bd2a ILT |
5241 | s%@LN_S@%$LN_S%g |
5242 | s%@LIBTOOL@%$LIBTOOL%g | |
b2bb41f6 ILT |
5243 | s%@DLLTOOL@%$DLLTOOL%g |
5244 | s%@AS@%$AS%g | |
e7757ad0 | 5245 | s%@extra_objects@%$extra_objects%g |
bf4bd1fc | 5246 | s%@target_cpu_type@%$target_cpu_type%g |
833c46e1 | 5247 | s%@obj_format@%$obj_format%g |
515c7142 | 5248 | s%@te_file@%$te_file%g |
833c46e1 | 5249 | s%@atof@%$atof%g |
b11fb939 | 5250 | s%@BFDLIB@%$BFDLIB%g |
2e013bb7 | 5251 | s%@OPCODES_LIB@%$OPCODES_LIB%g |
b11fb939 | 5252 | s%@ALL_OBJ_DEPS@%$ALL_OBJ_DEPS%g |
e2b4bd2a ILT |
5253 | s%@YACC@%$YACC%g |
5254 | s%@LEX@%$LEX%g | |
5255 | s%@LEXLIB@%$LEXLIB%g | |
b11fb939 | 5256 | s%@CPP@%$CPP%g |
e2b4bd2a | 5257 | s%@LEX_OUTPUT_ROOT@%$LEX_OUTPUT_ROOT%g |
48401fcf TT |
5258 | s%@ALLOCA@%$ALLOCA%g |
5259 | s%@USE_NLS@%$USE_NLS%g | |
5260 | s%@MSGFMT@%$MSGFMT%g | |
5261 | s%@GMSGFMT@%$GMSGFMT%g | |
5262 | s%@XGETTEXT@%$XGETTEXT%g | |
5263 | s%@USE_INCLUDED_LIBINTL@%$USE_INCLUDED_LIBINTL%g | |
5264 | s%@CATALOGS@%$CATALOGS%g | |
5265 | s%@CATOBJEXT@%$CATOBJEXT%g | |
5266 | s%@DATADIRNAME@%$DATADIRNAME%g | |
5267 | s%@GMOFILES@%$GMOFILES%g | |
5268 | s%@INSTOBJEXT@%$INSTOBJEXT%g | |
5269 | s%@INTLDEPS@%$INTLDEPS%g | |
5270 | s%@INTLLIBS@%$INTLLIBS%g | |
5271 | s%@INTLOBJS@%$INTLOBJS%g | |
5272 | s%@POFILES@%$POFILES%g | |
5273 | s%@POSUB@%$POSUB%g | |
5274 | s%@INCLUDE_LOCALE_H@%$INCLUDE_LOCALE_H%g | |
5275 | s%@GT_NO@%$GT_NO%g | |
5276 | s%@GT_YES@%$GT_YES%g | |
5277 | s%@MKINSTALLDIRS@%$MKINSTALLDIRS%g | |
5278 | s%@l@%$l%g | |
e2b4bd2a | 5279 | s%@MAINT@%$MAINT%g |
e42b2520 | 5280 | s%@EXEEXT@%$EXEEXT%g |
b11fb939 KR |
5281 | |
5282 | CEOF | |
5283 | EOF | |
c6c7035c MM |
5284 | |
5285 | cat >> $CONFIG_STATUS <<\EOF | |
5286 | ||
5287 | # Split the substitutions into bite-sized pieces for seds with | |
5288 | # small command number limits, like on Digital OSF/1 and HP-UX. | |
5289 | ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script. | |
5290 | ac_file=1 # Number of current file. | |
5291 | ac_beg=1 # First line for current file. | |
5292 | ac_end=$ac_max_sed_cmds # Line after last line for current file. | |
5293 | ac_more_lines=: | |
5294 | ac_sed_cmds="" | |
5295 | while $ac_more_lines; do | |
5296 | if test $ac_beg -gt 1; then | |
5297 | sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file | |
5298 | else | |
5299 | sed "${ac_end}q" conftest.subs > conftest.s$ac_file | |
5300 | fi | |
5301 | if test ! -s conftest.s$ac_file; then | |
5302 | ac_more_lines=false | |
5303 | rm -f conftest.s$ac_file | |
5304 | else | |
5305 | if test -z "$ac_sed_cmds"; then | |
5306 | ac_sed_cmds="sed -f conftest.s$ac_file" | |
5307 | else | |
5308 | ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file" | |
5309 | fi | |
5310 | ac_file=`expr $ac_file + 1` | |
5311 | ac_beg=$ac_end | |
5312 | ac_end=`expr $ac_end + $ac_max_sed_cmds` | |
5313 | fi | |
5314 | done | |
5315 | if test -z "$ac_sed_cmds"; then | |
5316 | ac_sed_cmds=cat | |
5317 | fi | |
5318 | EOF | |
5319 | ||
28d3e4a3 | 5320 | cat >> $CONFIG_STATUS <<EOF |
b11fb939 | 5321 | |
48401fcf | 5322 | CONFIG_FILES=\${CONFIG_FILES-"Makefile doc/Makefile .gdbinit:gdbinit.in po/Makefile.in:po/Make-in"} |
bf111c9f | 5323 | EOF |
28d3e4a3 KR |
5324 | cat >> $CONFIG_STATUS <<\EOF |
5325 | for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then | |
c6c7035c | 5326 | # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". |
b11fb939 | 5327 | case "$ac_file" in |
c6c7035c | 5328 | *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` |
b11fb939 KR |
5329 | ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; |
5330 | *) ac_file_in="${ac_file}.in" ;; | |
5331 | esac | |
5332 | ||
c6c7035c | 5333 | # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories. |
b11fb939 KR |
5334 | |
5335 | # Remove last slash and all that follows it. Not all systems have dirname. | |
5336 | ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` | |
5337 | if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then | |
5338 | # The file is in a subdirectory. | |
5339 | test ! -d "$ac_dir" && mkdir "$ac_dir" | |
833c46e1 | 5340 | ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`" |
b11fb939 KR |
5341 | # A "../" for each directory in $ac_dir_suffix. |
5342 | ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'` | |
5343 | else | |
5344 | ac_dir_suffix= ac_dots= | |
5345 | fi | |
5346 | ||
5347 | case "$ac_given_srcdir" in | |
5348 | .) srcdir=. | |
5349 | if test -z "$ac_dots"; then top_srcdir=. | |
5350 | else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;; | |
5351 | /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;; | |
5352 | *) # Relative path. | |
5353 | srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix" | |
5354 | top_srcdir="$ac_dots$ac_given_srcdir" ;; | |
5355 | esac | |
5356 | ||
5357 | case "$ac_given_INSTALL" in | |
5358 | [/$]*) INSTALL="$ac_given_INSTALL" ;; | |
28d3e4a3 | 5359 | *) INSTALL="$ac_dots$ac_given_INSTALL" ;; |
b11fb939 | 5360 | esac |
c6c7035c | 5361 | |
b11fb939 KR |
5362 | echo creating "$ac_file" |
5363 | rm -f "$ac_file" | |
28d3e4a3 | 5364 | configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure." |
ba49e48d KR |
5365 | case "$ac_file" in |
5366 | *Makefile*) ac_comsub="1i\\ | |
5367 | # $configure_input" ;; | |
5368 | *) ac_comsub= ;; | |
5369 | esac | |
c6c7035c | 5370 | |
e2b4bd2a | 5371 | ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` |
ba49e48d | 5372 | sed -e "$ac_comsub |
28d3e4a3 | 5373 | s%@configure_input@%$configure_input%g |
b11fb939 KR |
5374 | s%@srcdir@%$srcdir%g |
5375 | s%@top_srcdir@%$top_srcdir%g | |
5376 | s%@INSTALL@%$INSTALL%g | |
c6c7035c | 5377 | " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file |
b11fb939 | 5378 | fi; done |
c6c7035c | 5379 | rm -f conftest.s* |
b11fb939 KR |
5380 | |
5381 | # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where | |
5382 | # NAME is the cpp macro being defined and VALUE is the value it is being given. | |
5383 | # | |
5384 | # ac_d sets the value in "#define NAME VALUE" lines. | |
5385 | ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)' | |
5386 | ac_dB='\([ ][ ]*\)[^ ]*%\1#\2' | |
5387 | ac_dC='\3' | |
5388 | ac_dD='%g' | |
5389 | # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE". | |
5390 | ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' | |
5391 | ac_uB='\([ ]\)%\1#\2define\3' | |
5392 | ac_uC=' ' | |
5393 | ac_uD='\4%g' | |
5394 | # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE". | |
5395 | ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' | |
5396 | ac_eB='$%\1#\2define\3' | |
5397 | ac_eC=' ' | |
5398 | ac_eD='%g' | |
5399 | ||
c6c7035c MM |
5400 | if test "${CONFIG_HEADERS+set}" != set; then |
5401 | EOF | |
5402 | cat >> $CONFIG_STATUS <<EOF | |
e2b4bd2a | 5403 | CONFIG_HEADERS="config.h:config.in" |
c6c7035c MM |
5404 | EOF |
5405 | cat >> $CONFIG_STATUS <<\EOF | |
5406 | fi | |
28d3e4a3 | 5407 | for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then |
c6c7035c | 5408 | # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". |
b11fb939 | 5409 | case "$ac_file" in |
c6c7035c | 5410 | *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` |
b11fb939 KR |
5411 | ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; |
5412 | *) ac_file_in="${ac_file}.in" ;; | |
5413 | esac | |
5414 | ||
5415 | echo creating $ac_file | |
5416 | ||
5417 | rm -f conftest.frag conftest.in conftest.out | |
e2b4bd2a | 5418 | ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` |
c6c7035c | 5419 | cat $ac_file_inputs > conftest.in |
b11fb939 KR |
5420 | |
5421 | EOF | |
5422 | ||
5423 | # Transform confdefs.h into a sed script conftest.vals that substitutes | |
fb589130 | 5424 | # the proper values into config.h.in to produce config.h. And first: |
1c9dbb83 | 5425 | # Protect against being on the right side of a sed subst in config.status. |
fb589130 | 5426 | # Protect against being in an unquoted here document in config.status. |
b11fb939 KR |
5427 | rm -f conftest.vals |
5428 | cat > conftest.hdr <<\EOF | |
b11fb939 | 5429 | s/[\\&%]/\\&/g |
b11fb939 | 5430 | s%[\\$`]%\\&%g |
df586de2 | 5431 | s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp |
b11fb939 KR |
5432 | s%ac_d%ac_u%gp |
5433 | s%ac_u%ac_e%gp | |
5434 | EOF | |
5435 | sed -n -f conftest.hdr confdefs.h > conftest.vals | |
5436 | rm -f conftest.hdr | |
5437 | ||
5438 | # This sed command replaces #undef with comments. This is necessary, for | |
5439 | # example, in the case of _POSIX_SOURCE, which is predefined and required | |
5440 | # on some systems where configure will not decide to define it. | |
5441 | cat >> conftest.vals <<\EOF | |
5442 | s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */% | |
5443 | EOF | |
5444 | ||
5445 | # Break up conftest.vals because some shells have a limit on | |
5446 | # the size of here documents, and old seds have small limits too. | |
b11fb939 KR |
5447 | |
5448 | rm -f conftest.tail | |
5449 | while : | |
5450 | do | |
5451 | ac_lines=`grep -c . conftest.vals` | |
5452 | # grep -c gives empty output for an empty file on some AIX systems. | |
5453 | if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi | |
5454 | # Write a limited-size here document to conftest.frag. | |
28d3e4a3 KR |
5455 | echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS |
5456 | sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS | |
b11fb939 KR |
5457 | echo 'CEOF |
5458 | sed -f conftest.frag conftest.in > conftest.out | |
5459 | rm -f conftest.in | |
5460 | mv conftest.out conftest.in | |
28d3e4a3 | 5461 | ' >> $CONFIG_STATUS |
b11fb939 KR |
5462 | sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail |
5463 | rm -f conftest.vals | |
5464 | mv conftest.tail conftest.vals | |
5465 | done | |
5466 | rm -f conftest.vals | |
5467 | ||
28d3e4a3 | 5468 | cat >> $CONFIG_STATUS <<\EOF |
b11fb939 KR |
5469 | rm -f conftest.frag conftest.h |
5470 | echo "/* $ac_file. Generated automatically by configure. */" > conftest.h | |
5471 | cat conftest.in >> conftest.h | |
5472 | rm -f conftest.in | |
5473 | if cmp -s $ac_file conftest.h 2>/dev/null; then | |
5474 | echo "$ac_file is unchanged" | |
5475 | rm -f conftest.h | |
5476 | else | |
df586de2 ILT |
5477 | # Remove last slash and all that follows it. Not all systems have dirname. |
5478 | ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` | |
5479 | if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then | |
5480 | # The file is in a subdirectory. | |
5481 | test ! -d "$ac_dir" && mkdir "$ac_dir" | |
5482 | fi | |
b11fb939 KR |
5483 | rm -f $ac_file |
5484 | mv conftest.h $ac_file | |
5485 | fi | |
5486 | fi; done | |
5487 | ||
c6c7035c MM |
5488 | EOF |
5489 | cat >> $CONFIG_STATUS <<EOF | |
6cc7a938 | 5490 | |
515c7142 ILT |
5491 | target_cpu_type=${target_cpu_type} |
5492 | obj_format=${obj_format} | |
5493 | te_file=${te_file} | |
c6c7035c MM |
5494 | EOF |
5495 | cat >> $CONFIG_STATUS <<\EOF | |
e2b4bd2a | 5496 | test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h |
515c7142 ILT |
5497 | rm -f targ-cpu.c targ-cpu.h obj-format.h obj-format.c targ-env.h atof-targ.c itbl-cpu.h |
5498 | echo '#include "tc-'"${target_cpu_type}"'.h"' > targ-cpu.h | |
5499 | echo '#include "obj-'"${obj_format}"'.h"' > obj-format.h | |
5500 | echo '#include "te-'"${te_file}"'.h"' > targ-env.h | |
5501 | echo '#include "itbl-'"${target_cpu_type}"'.h"' > itbl-cpu.h | |
39ffbb4d DE |
5502 | case ${target_cpu_type} in |
5503 | m32r) echo '#include "opcodes/'"${target_cpu_type}"'-opc.h"' > cgen-opc.h ;; | |
5504 | esac | |
48401fcf TT |
5505 | |
5506 | sed -e '/POTFILES =/r po/POTFILES' po/Makefile.in > po/Makefile | |
36e889af | 5507 | exit 0 |
b11fb939 | 5508 | EOF |
28d3e4a3 | 5509 | chmod +x $CONFIG_STATUS |
bf111c9f | 5510 | rm -fr confdefs* $ac_clean_files |
833c46e1 | 5511 | test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 |
b11fb939 | 5512 |