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