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 | ||
1576 | for this_target in $target $canon_targets ; do | |
1577 | ||
64556643 | 1578 | eval `echo $this_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/cpu=\1 vendor=\2 os=\3/'` |
e7757ad0 KR |
1579 | |
1580 | # check for architecture variants | |
2b09622a | 1581 | arch= |
6ff87ead | 1582 | endian= |
e7757ad0 | 1583 | case ${cpu} in |
0170f1c3 | 1584 | alpha*) cpu_type=alpha ;; |
ae09d880 ILT |
1585 | armeb) cpu_type=arm endian=big ;; |
1586 | arm*) cpu_type=arm endian=little ;; | |
76fb6d2f | 1587 | thumb*) cpu_type=arm endian=little ;; |
e7757ad0 | 1588 | hppa*) cpu_type=hppa ;; |
7c2fadd1 | 1589 | i[456]86) cpu_type=i386 ;; |
e7757ad0 KR |
1590 | m680[012346]0) cpu_type=m68k ;; |
1591 | m68008) cpu_type=m68k ;; | |
1592 | m683??) cpu_type=m68k ;; | |
921d7728 | 1593 | m5200) cpu_type=m68k ;; |
e7757ad0 | 1594 | m8*) cpu_type=m88k ;; |
e16b9537 | 1595 | mips*el) cpu_type=mips endian=little ;; |
01c655cc | 1596 | # start-sanitize-r5900 |
ea1c39ce | 1597 | mips*5900*) cpu_type=mips endian=little ;; |
01c655cc | 1598 | # end-sanitize-r5900 |
e7757ad0 KR |
1599 | mips*) cpu_type=mips endian=big ;; |
1600 | powerpcle*) cpu_type=ppc endian=little ;; | |
1601 | powerpc*) cpu_type=ppc endian=big ;; | |
1602 | rs6000*) cpu_type=ppc ;; | |
2b09622a DE |
1603 | sparclite*) cpu_type=sparc arch=sparclite ;; |
1604 | sparclet*) cpu_type=sparc arch=sparclet ;; | |
70ee7782 | 1605 | sparc64*) cpu_type=sparc arch=v9-64 ;; |
307edcc0 | 1606 | sparc86x*) cpu_type=sparc arch=sparc86x ;; |
2b09622a | 1607 | sparc*) cpu_type=sparc arch=sparclite ;; # ??? See tc-sparc.c. |
756adc97 | 1608 | v850*) cpu_type=v850 ;; |
a1c7c0f3 | 1609 | *) cpu_type=${cpu} ;; |
e7757ad0 KR |
1610 | esac |
1611 | ||
1612 | if test ${this_target} = $target ; then | |
1613 | target_cpu_type=${cpu_type} | |
6ff87ead NC |
1614 | if test x${endian} = xbig; then |
1615 | cat >> confdefs.h <<\EOF | |
1616 | #define TARGET_BYTES_BIG_ENDIAN 1 | |
1617 | EOF | |
1618 | ||
1619 | elif test x${endian} = xlittle; then | |
1620 | cat >> confdefs.h <<\EOF | |
1621 | #define TARGET_BYTES_BIG_ENDIAN 0 | |
1622 | EOF | |
1623 | ||
1624 | fi | |
e7757ad0 KR |
1625 | elif test ${target_cpu_type} != ${cpu_type} ; then |
1626 | continue | |
1627 | fi | |
1628 | ||
e7757ad0 KR |
1629 | generic_target=${cpu_type}-$vendor-$os |
1630 | dev=no | |
1631 | bfd_gas=no | |
1632 | em=generic | |
1633 | ||
1634 | # assign object format | |
1635 | case ${generic_target} in | |
6ff87ead NC |
1636 | a29k-*-coff) fmt=coff ;; |
1637 | a29k-amd-udi) fmt=coff ;; | |
1638 | a29k-amd-ebmon) fmt=coff ;; | |
1639 | a29k-nyu-sym1) fmt=coff ;; | |
e7757ad0 KR |
1640 | a29k-*-vxworks*) fmt=coff ;; |
1641 | ||
0170f1c3 RH |
1642 | alpha*-*-*vms*) fmt=evax ;; |
1643 | alpha*-*-netware*) fmt=ecoff ;; | |
1644 | alpha*-*-openbsd*) fmt=ecoff ;; | |
1645 | alpha*-*-osf*) fmt=ecoff ;; | |
1646 | alpha*-*-linuxecoff*) fmt=ecoff ;; | |
69d0b6d3 ILT |
1647 | alpha*-*-linux-gnu*) fmt=elf em=linux ;; |
1648 | alpha*-*-netbsd*) fmt=elf em=nbsd ;; | |
b11fb939 | 1649 | |
e7757ad0 | 1650 | arc-*-elf*) fmt=elf bfd_gas=yes ;; |
4181c985 | 1651 | |
6ff87ead NC |
1652 | arm-*-riscix*) fmt=aout em=riscix ;; |
1653 | arm-*-aout) fmt=aout ;; | |
76fb6d2f | 1654 | arm-*-coff | thumb-*-coff) fmt=coff ;; |
603e9cf1 | 1655 | arm-*-elf | thumb-*-elf) fmt=elf ;; |
e7757ad0 | 1656 | arm-*-riscix*) fmt=aout ;; |
22d3fbd6 | 1657 | arm-*-pe | thumb-*-pe) fmt=coff em=pe ;; |
e7757ad0 | 1658 | |
cbe7dccb | 1659 | d10v-*-*) fmt=elf bfd_gas=yes ;; |
7d0f8249 | 1660 | d30v-*-*) fmt=elf bfd_gas=yes ;; |
7be9a312 | 1661 | |
603e9cf1 CM |
1662 | # start-sanitize-sky |
1663 | dvp-*-*) fmt=elf bfd_gas=yes install_tooldir= ;; | |
1664 | # end-sanitize-sky | |
1665 | ||
44be4397 | 1666 | # start-sanitize-fr30 |
352b0f4d | 1667 | fr30-*-*) fmt=elf bfd_gas=yes ;; |
44be4397 | 1668 | # end-sanitize-fr30 |
352b0f4d | 1669 | |
e7757ad0 KR |
1670 | hppa-*-*elf*) fmt=elf em=hppa ;; |
1671 | hppa-*-lites*) fmt=elf em=hppa ;; | |
1672 | hppa-*-osf*) fmt=som em=hppa ;; | |
332d5c49 | 1673 | hppa-*-rtems*) fmt=elf em=hppa ;; |
e7757ad0 KR |
1674 | hppa-*-hpux*) fmt=som em=hppa ;; |
1675 | hppa-*-bsd*) fmt=som em=hppa ;; | |
1676 | hppa-*-hiux*) fmt=som em=hppa ;; | |
1677 | ||
1678 | h8300-*-coff) fmt=coff ;; | |
1679 | ||
6ff87ead | 1680 | i386-ibm-aix*) fmt=coff em=i386aix ;; |
7d0f8249 | 1681 | i386-sequent-bsd*) fmt=aout em=dynix bfd_gas=yes ;; |
1aaf4ccc | 1682 | i386-*-beospe*) fmt=coff em=pe bfd_gas=yes ;; |
a1624e3f | 1683 | i386-*-beoself* | i386-*-beos*) fmt=elf bfd_gas=yes ;; |
e7757ad0 KR |
1684 | i386-*-bsd*) fmt=aout em=386bsd ;; |
1685 | i386-*-netbsd0.8) fmt=aout em=386bsd ;; | |
1686 | i386-*-netbsd*) fmt=aout em=nbsd bfd_gas=yes;; | |
76fb6d2f | 1687 | i386-*-openbsd*) fmt=aout em=nbsd bfd_gas=yes;; |
a1c7c0f3 | 1688 | i386-*-linux*aout* | i386-*-linuxoldld) fmt=aout em=linux ;; |
6ff87ead | 1689 | i386-*-linux*coff*) fmt=coff em=linux ;; |
a1624e3f | 1690 | i386-*-linux-gnu*) fmt=elf em=linux bfd_gas=yes ;; |
6ff87ead | 1691 | i386-*-lynxos*) fmt=coff em=lynx ;; |
427a886a | 1692 | i386-*-sysv4* | i386-*-solaris* | i386-*-elf) |
a1624e3f RH |
1693 | fmt=elf bfd_gas=yes ;; |
1694 | i386-*-freebsdelf*) fmt=elf bfd_gas=yes ;; | |
427a886a | 1695 | i386-*-freebsd*) fmt=aout em=386bsd ;; |
6cc7a938 ILT |
1696 | i386-*-coff | i386-*-sysv* | i386-*-sco3.2v5*coff | i386-*-isc*) |
1697 | fmt=coff ;; | |
1698 | i386-*-sco3.2v5*) fmt=elf | |
6ff87ead NC |
1699 | if test ${this_target} = $target; then |
1700 | cat >> confdefs.h <<\EOF | |
1701 | #define SCO_ELF 1 | |
1702 | EOF | |
1703 | ||
1704 | fi | |
1705 | ;; | |
6cc7a938 | 1706 | i386-*-sco3.2*) fmt=coff ;; |
e7757ad0 | 1707 | i386-*-vsta) fmt=aout ;; |
60dc9fb2 | 1708 | i386-*-msdosdjgpp* | i386-*-go32* | i386-go32-rtems*) |
6ff87ead NC |
1709 | fmt=coff em=go32;; |
1710 | i386-*-rtems*) fmt=coff ;; | |
6c186c48 SC |
1711 | i386-*-gnu*) fmt=elf ;; |
1712 | i386-*-mach*) | |
e7757ad0 KR |
1713 | fmt=aout em=mach bfd_gas=yes ;; |
1714 | i386-*-msdos*) fmt=aout ;; | |
6c186c48 | 1715 | i386-*-moss*) fmt=elf ;; |
6ff87ead | 1716 | i386-*-pe) fmt=coff em=pe ;; |
c296a052 | 1717 | i386-*-cygwin*) fmt=coff em=pe bfd_gas=yes ;; |
0040c1e9 ILT |
1718 | i386-*-mingw32*) fmt=coff em=pe bfd_gas=yes ;; |
1719 | i386-*-*nt*) fmt=coff em=pe ;; | |
e7757ad0 | 1720 | i960-*-bout) fmt=bout ;; |
6ff87ead NC |
1721 | i960-*-coff) fmt=coff em=ic960 ;; |
1722 | i960-*-rtems*) fmt=coff em=ic960 ;; | |
e7757ad0 KR |
1723 | i960-*-nindy*) fmt=bout ;; |
1724 | i960-*-vxworks4*) fmt=bout ;; | |
1725 | i960-*-vxworks5.0) fmt=bout ;; | |
6ff87ead | 1726 | i960-*-vxworks5.*) fmt=coff em=ic960 ;; |
e7757ad0 KR |
1727 | i960-*-vxworks*) fmt=bout ;; |
1728 | ||
374bdac7 DE |
1729 | m32r-*-*) fmt=elf bfd_gas=yes ;; |
1730 | ||
e7757ad0 KR |
1731 | m68k-*-vxworks* | m68k-ericsson-ose | m68k-*-sunos*) |
1732 | fmt=aout em=sun3 ;; | |
6ff87ead NC |
1733 | m68k-motorola-sysv*) fmt=coff em=delta ;; |
1734 | m68k-bull-sysv3*) fmt=coff em=dpx2 ;; | |
1735 | m68k-apollo-*) fmt=coff em=apollo ;; | |
fee3e248 ILT |
1736 | m68k-*-sysv4*) # must be before -sysv* |
1737 | fmt=elf em=svr4 ;; | |
1738 | m68k-*-elf*) fmt=elf ;; | |
7be9a312 | 1739 | m68k-*-coff | m68k-*-sysv* | m68k-*-rtems*) |
6ff87ead | 1740 | fmt=coff ;; |
e7757ad0 | 1741 | m68k-*-hpux*) fmt=hp300 em=hp300 ;; |
535cfd0f | 1742 | m68k-*-linux*aout*) fmt=aout em=linux ;; |
69d0b6d3 | 1743 | m68k-*-linux-gnu*) fmt=elf em=linux ;; |
44be4397 | 1744 | m68k-*-gnu*) fmt=elf ;; |
6ff87ead | 1745 | m68k-*-lynxos*) fmt=coff em=lynx ;; |
e7757ad0 | 1746 | m68k-*-netbsd*) fmt=aout em=nbsd bfd_gas=yes ;; |
76fb6d2f | 1747 | m68k-*-openbsd*) fmt=aout em=nbsd bfd_gas=yes ;; |
6ff87ead | 1748 | m68k-apple-aux*) fmt=coff em=aux ;; |
2b37714a | 1749 | m68k-*-psos*) fmt=elf em=psos;; |
e7757ad0 | 1750 | |
6ff87ead NC |
1751 | m88k-motorola-sysv3*) fmt=coff em=delt88 ;; |
1752 | m88k-*-coff*) fmt=coff ;; | |
e7757ad0 KR |
1753 | |
1754 | # don't change em like *-*-bsd does | |
6ff87ead NC |
1755 | mips-dec-netbsd*) fmt=elf endian=little ;; |
1756 | mips-dec-openbsd*) fmt=elf endian=little ;; | |
1757 | mips-dec-bsd*) fmt=aout ;; | |
1758 | mips-sony-bsd*) fmt=ecoff ;; | |
e7757ad0 | 1759 | mips-*-bsd*) { echo "configure: error: Unknown vendor for mips-bsd configuration." 1>&2; exit 1; } ;; |
6ff87ead NC |
1760 | mips-*-ultrix*) fmt=ecoff endian=little ;; |
1761 | mips-*-osf*) fmt=ecoff endian=little ;; | |
1762 | mips-*-ecoff*) fmt=ecoff ;; | |
1763 | mips-*-ecoff*) fmt=ecoff ;; | |
1764 | mips-*-irix6*) fmt=elf ;; | |
1765 | mips-*-irix5*) fmt=elf ;; | |
1766 | mips-*-irix*) fmt=ecoff ;; | |
1767 | mips-*-lnews*) fmt=ecoff em=lnews ;; | |
1768 | mips-*-riscos*) fmt=ecoff ;; | |
1769 | mips-*-sysv*) fmt=ecoff ;; | |
69d0b6d3 | 1770 | mips-*-elf* | mips-*-rtems* | mips-*-linux-gnu* | mips-*-gnu* | mips-*-openbsd*) |
6ff87ead | 1771 | fmt=elf ;; |
ae1b99e4 JL |
1772 | mn10200-*-*) fmt=elf bfd_gas=yes ;; |
1773 | mn10300-*-*) fmt=elf bfd_gas=yes ;; | |
c296a052 | 1774 | ppc-*-pe | ppc-*-cygwin* | ppc-*-winnt*) |
6ff87ead | 1775 | fmt=coff em=pe ;; |
e7757ad0 | 1776 | ppc-*-aix*) fmt=coff ;; |
515c7142 | 1777 | ppc-*-beos*) fmt=coff ;; |
76fb6d2f | 1778 | ppc-*-*bsd* | ppc-*-elf* | ppc-*-eabi* | ppc-*-sysv4*) |
6ff87ead | 1779 | fmt=elf ;; |
69d0b6d3 | 1780 | ppc-*-linux-gnu*) fmt=elf |
159e6ef8 | 1781 | case "$endian" in |
6ff87ead | 1782 | big) ;; |
69d0b6d3 | 1783 | *) { echo "configure: error: GNU/Linux must be configured big endian" 1>&2; exit 1; } ;; |
159e6ef8 MM |
1784 | esac |
1785 | ;; | |
1786 | ppc-*-solaris*) fmt=elf | |
6ff87ead NC |
1787 | if test ${this_target} = $target; then |
1788 | cat >> confdefs.h <<\EOF | |
1789 | #define TARGET_SOLARIS_COMMENT 1 | |
1790 | EOF | |
1791 | ||
1792 | fi | |
1793 | if test x${endian} = xbig; then | |
1794 | { echo "configure: error: Solaris must be configured little endian" 1>&2; exit 1; } | |
1795 | fi | |
7be9a312 | 1796 | ;; |
6ff87ead | 1797 | ppc-*-rtems*) fmt=elf ;; |
880b7429 KR |
1798 | ppc-*-macos* | ppc-*-mpw*) |
1799 | fmt=coff em=macos ;; | |
e7757ad0 KR |
1800 | ppc-*-netware*) fmt=elf em=ppcnw ;; |
1801 | ||
df4021c1 DE |
1802 | sh-*-elf*) fmt=elf ;; |
1803 | sh-*-coff*) fmt=coff ;; | |
f3aa01e2 | 1804 | sh-*-rtems*) fmt=coff ;; |
b11fb939 | 1805 | |
5f757edc ILT |
1806 | ns32k-pc532-mach* | ns32k-pc532-ux*) fmt=aout em=pc532mach ;; |
1807 | ns32k-pc532-netbsd* | ns32k-pc532-lites*) fmt=aout em=nbsd532 ;; | |
76fb6d2f | 1808 | ns32k-pc532-openbsd*) fmt=aout em=nbsd532 ;; |
e7757ad0 | 1809 | |
7be9a312 | 1810 | sparc-*-rtems*) fmt=aout ;; |
e7757ad0 | 1811 | sparc-*-sunos4*) fmt=aout em=sun3 ;; |
df586de2 | 1812 | sparc-*-aout | sparc*-*-vxworks*) |
df4021c1 | 1813 | fmt=aout em=sparcaout ;; |
e7757ad0 | 1814 | sparc-*-coff) fmt=coff ;; |
2e013bb7 | 1815 | sparc-*-linux*aout*) fmt=aout em=linux ;; |
69d0b6d3 | 1816 | sparc-*-linux-gnu*) fmt=elf em=linux ;; |
e7757ad0 KR |
1817 | sparc-*-lynxos*) fmt=coff em=lynx ;; |
1818 | sparc-fujitsu-none) fmt=aout ;; | |
0b27ea39 | 1819 | sparc-*-elf | sparc-*-sysv4* | sparc-*-solaris*) |
e7757ad0 | 1820 | fmt=elf ;; |
a1624e3f RH |
1821 | sparc-*-netbsd*) fmt=aout em=nbsd ;; |
1822 | sparc-*-openbsd*) fmt=aout em=nbsd ;; | |
e7757ad0 | 1823 | |
0e034c77 ILT |
1824 | tic30-*-*aout*) fmt=aout bfd_gas=yes ;; |
1825 | tic30-*-*coff*) fmt=coff bfd_gas=yes ;; | |
64556643 | 1826 | # start-sanitize-tic80 |
6ff87ead | 1827 | tic80-*-*) fmt=coff ;; |
64556643 | 1828 | # end-sanitize-tic80 |
103dd764 | 1829 | |
c6aa56bc | 1830 | v850-*-*) fmt=elf bfd_gas=yes ;; |
53bdc990 | 1831 | |
6ff87ead | 1832 | # start-sanitize-v850e |
53bdc990 | 1833 | v850e-*-*) fmt=elf bfd_gas=yes ;; |
60dc9fb2 | 1834 | v850ea-*-*) fmt=elf bfd_gas=yes ;; |
b5db0960 | 1835 | # end-sanitize-v850e |
e7757ad0 KR |
1836 | vax-*-bsd* | vax-*-ultrix*) |
1837 | fmt=aout ;; | |
1838 | vax-*-vms) fmt=vms ;; | |
1839 | ||
1840 | z8k-*-coff | z8k-*-sim) | |
1841 | fmt=coff ;; | |
1842 | ||
1843 | w65-*-*) fmt=coff ;; | |
1844 | ||
1845 | *-*-aout | *-*-scout) | |
1846 | fmt=aout ;; | |
1847 | *-*-nindy*) | |
1848 | fmt=bout ;; | |
1849 | *-*-bsd*) | |
1850 | fmt=aout em=sun3 ;; | |
1851 | *-*-generic) fmt=generic ;; | |
1852 | *-*-xray | *-*-hms) fmt=coff ;; | |
1853 | *-*-sim) fmt=coff ;; | |
1854 | *-*-elf | *-*-sysv4* | *-*-solaris*) | |
6df07e7f | 1855 | echo "configure: warning: GAS support for ${generic_target} is incomplete." 1>&2 |
e7757ad0 KR |
1856 | fmt=elf dev=yes ;; |
1857 | *-*-vxworks) fmt=aout ;; | |
1858 | *-*-netware) fmt=elf ;; | |
1859 | esac | |
1860 | ||
1861 | case ${cpu_type}-${fmt} in | |
ed1ed9f9 | 1862 | alpha*-*) bfd_gas=yes ;; |
e7757ad0 KR |
1863 | arm-*) bfd_gas=yes ;; |
1864 | # not yet | |
1865 | # i386-aout) bfd_gas=preferred ;; | |
1866 | mips-*) bfd_gas=yes ;; | |
1867 | ns32k-*) bfd_gas=yes ;; | |
1868 | ppc-*) bfd_gas=yes ;; | |
1869 | sparc-*) bfd_gas=yes ;; | |
1870 | *-elf) bfd_gas=yes ;; | |
1871 | *-ecoff) bfd_gas=yes ;; | |
1872 | *-som) bfd_gas=yes ;; | |
1873 | *) ;; | |
1874 | esac | |
1875 | ||
5f757edc ILT |
1876 | # Other random stuff. |
1877 | ||
ae09d880 ILT |
1878 | # do we need the opcodes library? |
1879 | case ${cpu_type} in | |
0e034c77 | 1880 | vax | i386 | tic30) |
7c2fadd1 ILT |
1881 | ;; |
1882 | *) | |
1883 | need_opcodes=yes | |
f2e272e0 ILT |
1884 | |
1885 | case "${enable_shared}" in | |
1886 | yes) shared_opcodes=true ;; | |
1887 | *opcodes*) shared_opcodes=true ;; | |
1888 | *) shared_opcodes=false ;; | |
1889 | esac | |
159e6ef8 | 1890 | if test "${shared_opcodes}" = "true"; then |
7c2fadd1 ILT |
1891 | # A shared libopcodes must be linked against libbfd. |
1892 | need_bfd=yes | |
1893 | fi | |
1894 | ;; | |
ae09d880 ILT |
1895 | esac |
1896 | ||
5f757edc | 1897 | case ${cpu_type} in |
44be4397 | 1898 | m32r) |
7c269afb | 1899 | case "x${extra_objects}" in |
374bdac7 DE |
1900 | *cgen.o*) ;; |
1901 | *) extra_objects="$extra_objects cgen.o" | |
374bdac7 DE |
1902 | cat >> confdefs.h <<\EOF |
1903 | #define USING_CGEN 1 | |
1904 | EOF | |
1905 | ||
1906 | ;; | |
1907 | esac | |
1908 | ;; | |
1909 | ||
44be4397 ILT |
1910 | # start-sanitize-fr30 |
1911 | fr30) | |
1912 | case "x${extra_objects}" in | |
1913 | *cgen.o*) ;; | |
1914 | *) extra_objects="$extra_objects cgen.o" | |
1915 | cat >> confdefs.h <<\EOF | |
1916 | #define USING_CGEN 1 | |
1917 | EOF | |
1918 | ||
1919 | ;; | |
1920 | esac | |
1921 | ;; | |
1922 | # end-sanitize-fr30 | |
1923 | ||
1c9dbb83 ILT |
1924 | m68k) |
1925 | case ${extra_objects} in | |
1926 | *m68k-parse.o*) ;; | |
1927 | *) extra_objects="$extra_objects m68k-parse.o" ;; | |
1928 | esac | |
1929 | ;; | |
efec4a28 DP |
1930 | |
1931 | mips) | |
1932 | echo ${extra_objects} | grep -s "itbl-parse.o" | |
1933 | if test $? -ne 0 ; then | |
515c7142 | 1934 | extra_objects="$extra_objects itbl-parse.o" |
efec4a28 DP |
1935 | fi |
1936 | ||
1937 | echo ${extra_objects} | grep -s "itbl-lex.o" | |
1938 | if test $? -ne 0 ; then | |
515c7142 | 1939 | extra_objects="$extra_objects itbl-lex.o" |
efec4a28 DP |
1940 | fi |
1941 | ||
1942 | echo ${extra_objects} | grep -s "itbl-ops.o" | |
1943 | if test $? -ne 0 ; then | |
515c7142 | 1944 | extra_objects="$extra_objects itbl-ops.o" |
efec4a28 DP |
1945 | fi |
1946 | ;; | |
1947 | ||
2b09622a | 1948 | sparc) |
e01e18a8 DE |
1949 | if test $this_target = $target ; then |
1950 | cat >> confdefs.h <<EOF | |
2b09622a DE |
1951 | #define DEFAULT_ARCH "${arch}" |
1952 | EOF | |
1953 | ||
e01e18a8 | 1954 | fi |
2b09622a DE |
1955 | ;; |
1956 | ||
efec4a28 DP |
1957 | *) |
1958 | ;; | |
5f757edc ILT |
1959 | esac |
1960 | ||
e7757ad0 KR |
1961 | # See if we really can support this configuration with the emulation code. |
1962 | ||
1963 | if test $this_target = $target ; then | |
1964 | primary_bfd_gas=$bfd_gas | |
1965 | obj_format=$fmt | |
e7757ad0 KR |
1966 | te_file=$em |
1967 | ||
1968 | if test $bfd_gas = no ; then | |
1969 | # Can't support other configurations this way. | |
1970 | break | |
1971 | fi | |
1972 | elif test $bfd_gas = no ; then | |
1973 | # Can't support this configuration. | |
1974 | break | |
1975 | fi | |
1976 | ||
1977 | # From target name and format, produce a list of supported emulations. | |
1978 | ||
1979 | case ${generic_target}-${fmt} in | |
1cb0d00d | 1980 | mips-*-irix5*-*) emulation="mipsbelf mipslelf mipself mipsbecoff mipslecoff mipsecoff" ;; |
69d0b6d3 | 1981 | mips-*-linux-gnu*-*) case "$endian" in |
515c7142 ILT |
1982 | big) emulation="mipsbelf mipslelf mipself mipsbecoff mipslecoff mipsecoff" ;; |
1983 | *) emulation="mipslelf mipsbelf mipself mipslecoff mipsbecoff mipsecoff" ;; | |
1984 | esac ;; | |
1985 | mips-*-lnews*-ecoff) ;; | |
e7757ad0 | 1986 | mips-*-*-ecoff) case "$endian" in |
1cb0d00d KR |
1987 | big) emulation="mipsbecoff mipslecoff mipsecoff" ;; |
1988 | *) emulation="mipslecoff mipsbecoff mipsecoff" ;; | |
e7757ad0 KR |
1989 | esac ;; |
1990 | mips-*-*-elf) case "$endian" in | |
1cb0d00d KR |
1991 | big) emulation="mipsbelf mipslelf mipself" ;; |
1992 | *) emulation="mipslelf mipsbelf mipself" ;; | |
515c7142 ILT |
1993 | # Uncommenting the next line will turn on support for i386 COFF |
1994 | # in any i386 ELF configuration. This probably doesn't work | |
1995 | # correctly. | |
1996 | # i386-*-*-elf) emulation="i386coff i386elf" ;; | |
e7757ad0 KR |
1997 | esac ;; |
1998 | esac | |
1999 | ||
2000 | emulations="$emulations $emulation" | |
2001 | ||
e7757ad0 | 2002 | done |
b11fb939 KR |
2003 | |
2004 | # Assign floating point type. Most processors with FP support | |
2005 | # IEEE FP. On those that don't support FP at all, usually IEEE | |
2006 | # is emulated. | |
2007 | case ${target_cpu} in | |
2008 | vax | tahoe ) atof=${target_cpu} ;; | |
e7757ad0 | 2009 | *) atof=ieee ;; |
b11fb939 KR |
2010 | esac |
2011 | ||
2012 | case "${obj_format}" in | |
ba49e48d | 2013 | "") { echo "configure: error: GAS does not know what format to use for target ${target}" 1>&2; exit 1; } ;; |
b11fb939 KR |
2014 | esac |
2015 | ||
7c269afb DE |
2016 | # Unfortunately the cpu in cpu-opc.h file isn't always $(TARGET_CPU). |
2017 | cgen_cpu_prefix="" | |
2018 | case "x${extra_objects}" in | |
2019 | *cgen.o*) | |
2020 | case ${target_cpu} in | |
2021 | *) cgen_cpu_prefix=${target_cpu} ;; | |
2022 | esac | |
2023 | ;; | |
2024 | esac | |
2025 | ||
2026 | ||
b11fb939 | 2027 | |
bf4bd1fc ILT |
2028 | if test ! -r ${srcdir}/config/tc-${target_cpu_type}.c; then |
2029 | { echo "configure: error: GAS does not support target CPU ${target_cpu_type}" 1>&2; exit 1; } | |
b11fb939 KR |
2030 | fi |
2031 | ||
fb589130 | 2032 | if test ! -r ${srcdir}/config/obj-${obj_format}.c; then |
ba49e48d | 2033 | { echo "configure: error: GAS does not have support for object file format ${obj_format}" 1>&2; exit 1; } |
b11fb939 KR |
2034 | fi |
2035 | ||
e7757ad0 | 2036 | case ${user_bfd_gas}-${primary_bfd_gas} in |
b11fb939 KR |
2037 | yes-yes | no-no) |
2038 | # We didn't override user's choice. | |
2039 | ;; | |
2040 | no-yes) | |
2041 | echo "configure: warning: Use of BFD is required for ${target}; overriding config options." 1>&2 | |
2042 | ;; | |
2043 | no-preferred) | |
e7757ad0 | 2044 | primary_bfd_gas=no |
b11fb939 KR |
2045 | ;; |
2046 | *-preferred) | |
e7757ad0 | 2047 | primary_bfd_gas=yes |
b11fb939 | 2048 | ;; |
ba49e48d | 2049 | yes-*) |
e7757ad0 | 2050 | primary_bfd_gas=yes |
ba49e48d | 2051 | ;; |
b11fb939 KR |
2052 | -*) |
2053 | # User specified nothing. | |
2054 | ;; | |
2055 | esac | |
2056 | ||
e7757ad0 KR |
2057 | # Some COFF configurations want these random other flags set. |
2058 | case ${obj_format} in | |
2059 | coff) | |
2060 | case ${target_cpu_type} in | |
2061 | i386) cat >> confdefs.h <<\EOF | |
2062 | #define I386COFF 1 | |
2063 | EOF | |
2064 | ;; | |
2065 | m68k) cat >> confdefs.h <<\EOF | |
2066 | #define M68KCOFF 1 | |
2067 | EOF | |
2068 | ;; | |
2069 | m88k) cat >> confdefs.h <<\EOF | |
2070 | #define M88KCOFF 1 | |
2071 | EOF | |
2072 | ;; | |
2073 | esac | |
2074 | ;; | |
2075 | esac | |
2076 | ||
2077 | # Getting this done right is going to be a bitch. Each configuration specified | |
2078 | # with --enable-targets=... should be checked for environment, format, cpu, and | |
2079 | # bfd_gas setting. | |
2080 | # | |
2081 | # For each configuration, the necessary object file support code must be linked | |
2082 | # in. This might be only one, it might be up to four. The necessary emulation | |
2083 | # code needs to be provided, too. | |
2084 | # | |
2085 | # And then there's "--enable-targets=all".... | |
2086 | # | |
2087 | # For now, just always do it for MIPS ELF or ECOFF configurations. Sigh. | |
2088 | ||
2089 | formats="${obj_format}" | |
2090 | emfiles="" | |
2091 | EMULATIONS="" | |
2092 | _gas_uniq_list="$emulations" | |
2093 | _gas_uniq_newlist="" | |
2094 | for _gas_uniq_i in _gas_uniq_dummy $_gas_uniq_list ; do | |
2095 | case $_gas_uniq_i in | |
2096 | _gas_uniq_dummy) ;; | |
2097 | *) case " $_gas_uniq_newlist " in | |
2098 | *" $_gas_uniq_i "*) ;; | |
2099 | *) _gas_uniq_newlist="$_gas_uniq_newlist $_gas_uniq_i" ;; | |
2100 | esac ;; | |
2101 | esac | |
2102 | done | |
2103 | emulations=$_gas_uniq_newlist | |
2104 | ||
2105 | for em in . $emulations ; do | |
2106 | case $em in | |
2107 | .) continue ;; | |
2108 | mipsbelf | mipslelf) | |
2109 | fmt=elf file=mipself ;; | |
2110 | mipsbecoff | mipslecoff) | |
2111 | fmt=ecoff file=mipsecoff ;; | |
515c7142 ILT |
2112 | i386coff) |
2113 | fmt=coff file=i386coff ;; | |
2114 | i386elf) | |
2115 | fmt=elf file=i386elf ;; | |
e7757ad0 KR |
2116 | esac |
2117 | formats="$formats $fmt" | |
2118 | emfiles="$emfiles e-$file.o" | |
2119 | EMULATIONS="$EMULATIONS &$em," | |
2120 | done | |
2121 | _gas_uniq_list="$formats" | |
2122 | _gas_uniq_newlist="" | |
2123 | for _gas_uniq_i in _gas_uniq_dummy $_gas_uniq_list ; do | |
2124 | case $_gas_uniq_i in | |
2125 | _gas_uniq_dummy) ;; | |
2126 | *) case " $_gas_uniq_newlist " in | |
2127 | *" $_gas_uniq_i "*) ;; | |
2128 | *) _gas_uniq_newlist="$_gas_uniq_newlist $_gas_uniq_i" ;; | |
2129 | esac ;; | |
2130 | esac | |
2131 | done | |
2132 | formats=$_gas_uniq_newlist | |
2133 | ||
2134 | _gas_uniq_list="$emfiles" | |
2135 | _gas_uniq_newlist="" | |
2136 | for _gas_uniq_i in _gas_uniq_dummy $_gas_uniq_list ; do | |
2137 | case $_gas_uniq_i in | |
2138 | _gas_uniq_dummy) ;; | |
2139 | *) case " $_gas_uniq_newlist " in | |
2140 | *" $_gas_uniq_i "*) ;; | |
2141 | *) _gas_uniq_newlist="$_gas_uniq_newlist $_gas_uniq_i" ;; | |
2142 | esac ;; | |
2143 | esac | |
2144 | done | |
2145 | emfiles=$_gas_uniq_newlist | |
2146 | ||
2147 | if test `set . $formats ; shift ; echo $#` -gt 1 ; then | |
2148 | for fmt in $formats ; do | |
2149 | case $fmt in | |
2150 | aout) cat >> confdefs.h <<\EOF | |
2151 | #define OBJ_MAYBE_AOUT 1 | |
2152 | EOF | |
2153 | ;; | |
2154 | bout) cat >> confdefs.h <<\EOF | |
2155 | #define OBJ_MAYBE_BOUT 1 | |
2156 | EOF | |
2157 | ;; | |
2158 | coff) cat >> confdefs.h <<\EOF | |
2159 | #define OBJ_MAYBE_COFF 1 | |
2160 | EOF | |
2161 | ;; | |
2162 | ecoff) cat >> confdefs.h <<\EOF | |
2163 | #define OBJ_MAYBE_ECOFF 1 | |
2164 | EOF | |
2165 | ;; | |
2166 | elf) cat >> confdefs.h <<\EOF | |
2167 | #define OBJ_MAYBE_ELF 1 | |
2168 | EOF | |
2169 | ;; | |
2170 | generic) cat >> confdefs.h <<\EOF | |
2171 | #define OBJ_MAYBE_GENERIC 1 | |
2172 | EOF | |
2173 | ;; | |
2174 | hp300) cat >> confdefs.h <<\EOF | |
2175 | #define OBJ_MAYBE_HP300 1 | |
2176 | EOF | |
2177 | ;; | |
2178 | ieee) cat >> confdefs.h <<\EOF | |
2179 | #define OBJ_MAYBE_IEEE 1 | |
2180 | EOF | |
2181 | ;; | |
2182 | som) cat >> confdefs.h <<\EOF | |
2183 | #define OBJ_MAYBE_SOM 1 | |
2184 | EOF | |
2185 | ;; | |
2186 | vms) cat >> confdefs.h <<\EOF | |
2187 | #define OBJ_MAYBE_VMS 1 | |
2188 | EOF | |
2189 | ;; | |
2190 | esac | |
2191 | extra_objects="$extra_objects obj-$fmt.o" | |
2192 | done | |
2193 | obj_format=multi | |
2194 | fi | |
2195 | if test `set . $emfiles ; shift ; echo $#` -gt 0 ; then | |
2196 | te_file=multi | |
2197 | extra_objects="$extra_objects $emfiles" | |
2198 | DEFAULT_EMULATION=`set . $emulations ; echo $2` | |
2199 | cat >> confdefs.h <<\EOF | |
2200 | #define USE_EMULATIONS 1 | |
2201 | EOF | |
2202 | ||
2203 | fi | |
2204 | ||
2205 | cat >> confdefs.h <<EOF | |
2206 | #define EMULATIONS $EMULATIONS | |
2207 | EOF | |
2208 | ||
2209 | cat >> confdefs.h <<EOF | |
2210 | #define DEFAULT_EMULATION "$DEFAULT_EMULATION" | |
2211 | EOF | |
2212 | ||
2213 | ||
bf4bd1fc | 2214 | case ${primary_bfd_gas}-${target_cpu_type}-${obj_format} in |
318b02b6 KR |
2215 | yes-*-coff) need_bfd=yes ;; |
2216 | no-*-coff) need_bfd=yes | |
2217 | cat >> confdefs.h <<\EOF | |
2218 | #define MANY_SEGMENTS 1 | |
2219 | EOF | |
2220 | ;; | |
2221 | esac | |
2222 | ||
b11fb939 KR |
2223 | reject_dev_configs=yes |
2224 | ||
2225 | case ${reject_dev_configs}-${dev} in | |
2226 | yes-yes) # Oops. | |
ba49e48d | 2227 | { echo "configure: error: GAS does not support the ${generic_target} configuration." 1>&2; exit 1; } |
b11fb939 KR |
2228 | ;; |
2229 | esac | |
2230 | ||
b11fb939 KR |
2231 | |
2232 | ||
833c46e1 KR |
2233 | |
2234 | ||
2235 | ||
603e9cf1 | 2236 | |
e7757ad0 | 2237 | case "${primary_bfd_gas}" in |
b11fb939 KR |
2238 | yes) cat >> confdefs.h <<\EOF |
2239 | #define BFD_ASSEMBLER 1 | |
2240 | EOF | |
2241 | ||
2242 | need_bfd=yes ;; | |
2243 | esac | |
2244 | ||
ae09d880 ILT |
2245 | # do we need the opcodes library? |
2246 | case "${need_opcodes}" in | |
7be9a312 | 2247 | yes) |
e2b4bd2a | 2248 | OPCODES_LIB=../opcodes/libopcodes.la |
7be9a312 | 2249 | ;; |
ae09d880 ILT |
2250 | esac |
2251 | ||
b11fb939 | 2252 | case "${need_bfd}" in |
7be9a312 | 2253 | yes) |
e2b4bd2a | 2254 | BFDLIB=../bfd/libbfd.la |
7be9a312 | 2255 | ALL_OBJ_DEPS="$ALL_OBJ_DEPS ../bfd/bfd.h" |
7be9a312 | 2256 | ;; |
b11fb939 KR |
2257 | esac |
2258 | ||
2259 | ||
2260 | ||
1c9dbb83 | 2261 | |
2e013bb7 ILT |
2262 | |
2263 | ||
b11fb939 KR |
2264 | cat >> confdefs.h <<EOF |
2265 | #define TARGET_ALIAS "${target_alias}" | |
2266 | EOF | |
2267 | ||
2268 | cat >> confdefs.h <<EOF | |
2269 | #define TARGET_CANONICAL "${target}" | |
2270 | EOF | |
2271 | ||
2272 | cat >> confdefs.h <<EOF | |
2273 | #define TARGET_CPU "${target_cpu}" | |
2274 | EOF | |
2275 | ||
2276 | cat >> confdefs.h <<EOF | |
2277 | #define TARGET_VENDOR "${target_vendor}" | |
2278 | EOF | |
2279 | ||
2280 | cat >> confdefs.h <<EOF | |
2281 | #define TARGET_OS "${target_os}" | |
2282 | EOF | |
2283 | ||
2284 | ||
330add8a ILT |
2285 | # Extract the first word of "gcc", so it can be a program name with args. |
2286 | set dummy gcc; ac_word=$2 | |
2287 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
44be4397 | 2288 | echo "configure:2289: checking for $ac_word" >&5 |
330add8a ILT |
2289 | if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then |
2290 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2291 | else | |
2292 | if test -n "$CC"; then | |
2293 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
2294 | else | |
a1624e3f | 2295 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
352b0f4d | 2296 | for ac_dir in $PATH; do |
330add8a ILT |
2297 | test -z "$ac_dir" && ac_dir=. |
2298 | if test -f $ac_dir/$ac_word; then | |
2299 | ac_cv_prog_CC="gcc" | |
2300 | break | |
2301 | fi | |
2302 | done | |
2303 | IFS="$ac_save_ifs" | |
330add8a ILT |
2304 | fi |
2305 | fi | |
2306 | CC="$ac_cv_prog_CC" | |
2307 | if test -n "$CC"; then | |
2308 | echo "$ac_t""$CC" 1>&6 | |
2309 | else | |
2310 | echo "$ac_t""no" 1>&6 | |
2311 | fi | |
2312 | ||
d0352cbb DE |
2313 | if test -z "$CC"; then |
2314 | # Extract the first word of "cc", so it can be a program name with args. | |
2315 | set dummy cc; ac_word=$2 | |
2316 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
44be4397 | 2317 | echo "configure:2318: checking for $ac_word" >&5 |
d0352cbb DE |
2318 | if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then |
2319 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2320 | else | |
2321 | if test -n "$CC"; then | |
2322 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
2323 | else | |
a1624e3f | 2324 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
d0352cbb | 2325 | ac_prog_rejected=no |
352b0f4d | 2326 | for ac_dir in $PATH; do |
d0352cbb DE |
2327 | test -z "$ac_dir" && ac_dir=. |
2328 | if test -f $ac_dir/$ac_word; then | |
2329 | if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then | |
2330 | ac_prog_rejected=yes | |
2331 | continue | |
2332 | fi | |
2333 | ac_cv_prog_CC="cc" | |
2334 | break | |
2335 | fi | |
2336 | done | |
2337 | IFS="$ac_save_ifs" | |
2338 | if test $ac_prog_rejected = yes; then | |
2339 | # We found a bogon in the path, so make sure we never use it. | |
2340 | set dummy $ac_cv_prog_CC | |
2341 | shift | |
2342 | if test $# -gt 0; then | |
2343 | # We chose a different compiler from the bogus one. | |
2344 | # However, it has the same basename, so the bogon will be chosen | |
2345 | # first if we set CC to just the basename; use the full file name. | |
2346 | shift | |
2347 | set dummy "$ac_dir/$ac_word" "$@" | |
2348 | shift | |
2349 | ac_cv_prog_CC="$@" | |
2350 | fi | |
2351 | fi | |
2352 | fi | |
2353 | fi | |
2354 | CC="$ac_cv_prog_CC" | |
2355 | if test -n "$CC"; then | |
2356 | echo "$ac_t""$CC" 1>&6 | |
2357 | else | |
2358 | echo "$ac_t""no" 1>&6 | |
2359 | fi | |
2360 | ||
a1624e3f RH |
2361 | if test -z "$CC"; then |
2362 | case "`uname -s`" in | |
2363 | *win32* | *WIN32*) | |
2364 | # Extract the first word of "cl", so it can be a program name with args. | |
2365 | set dummy cl; ac_word=$2 | |
2366 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
44be4397 | 2367 | echo "configure:2368: checking for $ac_word" >&5 |
a1624e3f RH |
2368 | if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then |
2369 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2370 | else | |
2371 | if test -n "$CC"; then | |
2372 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
2373 | else | |
2374 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
352b0f4d | 2375 | for ac_dir in $PATH; do |
a1624e3f RH |
2376 | test -z "$ac_dir" && ac_dir=. |
2377 | if test -f $ac_dir/$ac_word; then | |
2378 | ac_cv_prog_CC="cl" | |
2379 | break | |
2380 | fi | |
2381 | done | |
2382 | IFS="$ac_save_ifs" | |
2383 | fi | |
2384 | fi | |
2385 | CC="$ac_cv_prog_CC" | |
2386 | if test -n "$CC"; then | |
2387 | echo "$ac_t""$CC" 1>&6 | |
2388 | else | |
2389 | echo "$ac_t""no" 1>&6 | |
2390 | fi | |
2391 | ;; | |
2392 | esac | |
2393 | fi | |
d0352cbb DE |
2394 | test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } |
2395 | fi | |
b11fb939 | 2396 | |
c6c7035c | 2397 | echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 |
44be4397 | 2398 | echo "configure:2399: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 |
c6c7035c MM |
2399 | |
2400 | ac_ext=c | |
2401 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. | |
2402 | ac_cpp='$CPP $CPPFLAGS' | |
2403 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' | |
a1624e3f | 2404 | ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' |
c6c7035c MM |
2405 | cross_compiling=$ac_cv_prog_cc_cross |
2406 | ||
352b0f4d | 2407 | cat > conftest.$ac_ext <<EOF |
44be4397 | 2408 | #line 2409 "configure" |
c6c7035c MM |
2409 | #include "confdefs.h" |
2410 | main(){return(0);} | |
2411 | EOF | |
44be4397 | 2412 | if { (eval echo configure:2413: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
c6c7035c MM |
2413 | ac_cv_prog_cc_works=yes |
2414 | # If we can't run a trivial program, we are probably using a cross compiler. | |
2415 | if (./conftest; exit) 2>/dev/null; then | |
2416 | ac_cv_prog_cc_cross=no | |
2417 | else | |
2418 | ac_cv_prog_cc_cross=yes | |
2419 | fi | |
2420 | else | |
2421 | echo "configure: failed program was:" >&5 | |
2422 | cat conftest.$ac_ext >&5 | |
2423 | ac_cv_prog_cc_works=no | |
2424 | fi | |
2425 | rm -fr conftest* | |
2426 | ||
2427 | echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 | |
2428 | if test $ac_cv_prog_cc_works = no; then | |
2429 | { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } | |
2430 | fi | |
2431 | echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 | |
44be4397 | 2432 | echo "configure:2433: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 |
c6c7035c MM |
2433 | echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 |
2434 | cross_compiling=$ac_cv_prog_cc_cross | |
2435 | ||
330add8a | 2436 | echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 |
44be4397 | 2437 | echo "configure:2438: checking whether we are using GNU C" >&5 |
330add8a ILT |
2438 | if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then |
2439 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2440 | else | |
2441 | cat > conftest.c <<EOF | |
b11fb939 | 2442 | #ifdef __GNUC__ |
330add8a | 2443 | yes; |
b11fb939 KR |
2444 | #endif |
2445 | EOF | |
44be4397 | 2446 | if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2447: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then |
330add8a ILT |
2447 | ac_cv_prog_gcc=yes |
2448 | else | |
2449 | ac_cv_prog_gcc=no | |
2450 | fi | |
2451 | fi | |
1c9dbb83 | 2452 | |
330add8a | 2453 | echo "$ac_t""$ac_cv_prog_gcc" 1>&6 |
c6c7035c | 2454 | |
330add8a | 2455 | if test $ac_cv_prog_gcc = yes; then |
b11fb939 | 2456 | GCC=yes |
a1624e3f RH |
2457 | else |
2458 | GCC= | |
2459 | fi | |
2460 | ||
2461 | ac_test_CFLAGS="${CFLAGS+set}" | |
2462 | ac_save_CFLAGS="$CFLAGS" | |
2463 | CFLAGS= | |
2464 | echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 | |
44be4397 | 2465 | echo "configure:2466: checking whether ${CC-cc} accepts -g" >&5 |
c6c7035c | 2466 | if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then |
330add8a | 2467 | echo $ac_n "(cached) $ac_c" 1>&6 |
b11fb939 | 2468 | else |
330add8a ILT |
2469 | echo 'void f(){}' > conftest.c |
2470 | if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then | |
c6c7035c | 2471 | ac_cv_prog_cc_g=yes |
330add8a | 2472 | else |
c6c7035c | 2473 | ac_cv_prog_cc_g=no |
b11fb939 KR |
2474 | fi |
2475 | rm -f conftest* | |
2476 | ||
330add8a | 2477 | fi |
1c9dbb83 | 2478 | |
c6c7035c | 2479 | echo "$ac_t""$ac_cv_prog_cc_g" 1>&6 |
a1624e3f RH |
2480 | if test "$ac_test_CFLAGS" = set; then |
2481 | CFLAGS="$ac_save_CFLAGS" | |
2482 | elif test $ac_cv_prog_cc_g = yes; then | |
2483 | if test "$GCC" = yes; then | |
c6c7035c MM |
2484 | CFLAGS="-g -O2" |
2485 | else | |
a1624e3f | 2486 | CFLAGS="-g" |
cc88a106 | 2487 | fi |
603e9cf1 | 2488 | else |
a1624e3f RH |
2489 | if test "$GCC" = yes; then |
2490 | CFLAGS="-O2" | |
2491 | else | |
2492 | CFLAGS= | |
2493 | fi | |
330add8a ILT |
2494 | fi |
2495 | ||
b11fb939 | 2496 | |
e2b4bd2a ILT |
2497 | for ac_prog in 'bison -y' byacc |
2498 | do | |
2499 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
2500 | set dummy $ac_prog; ac_word=$2 | |
2501 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
44be4397 | 2502 | echo "configure:2503: checking for $ac_word" >&5 |
e2b4bd2a ILT |
2503 | if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then |
2504 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2505 | else | |
2506 | if test -n "$YACC"; then | |
2507 | ac_cv_prog_YACC="$YACC" # Let the user override the test. | |
2508 | else | |
a1624e3f | 2509 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
352b0f4d | 2510 | for ac_dir in $PATH; do |
e2b4bd2a ILT |
2511 | test -z "$ac_dir" && ac_dir=. |
2512 | if test -f $ac_dir/$ac_word; then | |
2513 | ac_cv_prog_YACC="$ac_prog" | |
2514 | break | |
2515 | fi | |
2516 | done | |
2517 | IFS="$ac_save_ifs" | |
2518 | fi | |
2519 | fi | |
2520 | YACC="$ac_cv_prog_YACC" | |
2521 | if test -n "$YACC"; then | |
2522 | echo "$ac_t""$YACC" 1>&6 | |
2523 | else | |
2524 | echo "$ac_t""no" 1>&6 | |
2525 | fi | |
2526 | ||
2527 | test -n "$YACC" && break | |
2528 | done | |
2529 | test -n "$YACC" || YACC="yacc" | |
2530 | ||
b2bb41f6 | 2531 | echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 |
44be4397 | 2532 | echo "configure:2533: checking how to run the C preprocessor" >&5 |
b2bb41f6 ILT |
2533 | # On Suns, sometimes $CPP names a directory. |
2534 | if test -n "$CPP" && test -d "$CPP"; then | |
2535 | CPP= | |
2536 | fi | |
2537 | if test -z "$CPP"; then | |
2538 | if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then | |
2539 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2540 | else | |
2541 | # This must be in double quotes, not single quotes, because CPP may get | |
2542 | # substituted into the Makefile and "${CC-cc}" will confuse make. | |
2543 | CPP="${CC-cc} -E" | |
2544 | # On the NeXT, cc -E runs the code through the compiler's parser, | |
2545 | # not just through cpp. | |
2546 | cat > conftest.$ac_ext <<EOF | |
44be4397 | 2547 | #line 2548 "configure" |
b2bb41f6 ILT |
2548 | #include "confdefs.h" |
2549 | #include <assert.h> | |
2550 | Syntax Error | |
2551 | EOF | |
2552 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
44be4397 | 2553 | { (eval echo configure:2554: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
a1624e3f | 2554 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
b2bb41f6 ILT |
2555 | if test -z "$ac_err"; then |
2556 | : | |
2557 | else | |
2558 | echo "$ac_err" >&5 | |
2559 | echo "configure: failed program was:" >&5 | |
2560 | cat conftest.$ac_ext >&5 | |
2561 | rm -rf conftest* | |
2562 | CPP="${CC-cc} -E -traditional-cpp" | |
2563 | cat > conftest.$ac_ext <<EOF | |
44be4397 | 2564 | #line 2565 "configure" |
b2bb41f6 ILT |
2565 | #include "confdefs.h" |
2566 | #include <assert.h> | |
2567 | Syntax Error | |
2568 | EOF | |
2569 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
44be4397 | 2570 | { (eval echo configure:2571: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
a1624e3f RH |
2571 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
2572 | if test -z "$ac_err"; then | |
2573 | : | |
2574 | else | |
2575 | echo "$ac_err" >&5 | |
2576 | echo "configure: failed program was:" >&5 | |
2577 | cat conftest.$ac_ext >&5 | |
2578 | rm -rf conftest* | |
2579 | CPP="${CC-cc} -nologo -E" | |
2580 | cat > conftest.$ac_ext <<EOF | |
44be4397 | 2581 | #line 2582 "configure" |
a1624e3f RH |
2582 | #include "confdefs.h" |
2583 | #include <assert.h> | |
2584 | Syntax Error | |
2585 | EOF | |
2586 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
44be4397 | 2587 | { (eval echo configure:2588: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
a1624e3f | 2588 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
b2bb41f6 ILT |
2589 | if test -z "$ac_err"; then |
2590 | : | |
2591 | else | |
2592 | echo "$ac_err" >&5 | |
2593 | echo "configure: failed program was:" >&5 | |
2594 | cat conftest.$ac_ext >&5 | |
2595 | rm -rf conftest* | |
2596 | CPP=/lib/cpp | |
2597 | fi | |
2598 | rm -f conftest* | |
2599 | fi | |
a1624e3f RH |
2600 | rm -f conftest* |
2601 | fi | |
b2bb41f6 ILT |
2602 | rm -f conftest* |
2603 | ac_cv_prog_CPP="$CPP" | |
2604 | fi | |
2605 | CPP="$ac_cv_prog_CPP" | |
2606 | else | |
2607 | ac_cv_prog_CPP="$CPP" | |
2608 | fi | |
2609 | echo "$ac_t""$CPP" 1>&6 | |
2610 | ||
2611 | missing_dir=`cd $ac_aux_dir && pwd` | |
2612 | for ac_prog in flex lex | |
2613 | do | |
2614 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
2615 | set dummy $ac_prog; ac_word=$2 | |
2616 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
44be4397 | 2617 | echo "configure:2618: checking for $ac_word" >&5 |
b2bb41f6 ILT |
2618 | if eval "test \"`echo '$''{'ac_cv_prog_LEX'+set}'`\" = set"; then |
2619 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2620 | else | |
2621 | if test -n "$LEX"; then | |
2622 | ac_cv_prog_LEX="$LEX" # Let the user override the test. | |
2623 | else | |
a1624e3f | 2624 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
352b0f4d | 2625 | for ac_dir in $PATH; do |
b2bb41f6 ILT |
2626 | test -z "$ac_dir" && ac_dir=. |
2627 | if test -f $ac_dir/$ac_word; then | |
2628 | ac_cv_prog_LEX="$ac_prog" | |
2629 | break | |
2630 | fi | |
2631 | done | |
2632 | IFS="$ac_save_ifs" | |
2633 | fi | |
2634 | fi | |
2635 | LEX="$ac_cv_prog_LEX" | |
2636 | if test -n "$LEX"; then | |
2637 | echo "$ac_t""$LEX" 1>&6 | |
2638 | else | |
2639 | echo "$ac_t""no" 1>&6 | |
2640 | fi | |
2641 | ||
2642 | test -n "$LEX" && break | |
2643 | done | |
2644 | test -n "$LEX" || LEX=""$missing_dir/missing flex"" | |
2645 | ||
e2b4bd2a ILT |
2646 | # Extract the first word of "flex", so it can be a program name with args. |
2647 | set dummy flex; ac_word=$2 | |
2648 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
44be4397 | 2649 | echo "configure:2650: checking for $ac_word" >&5 |
e2b4bd2a ILT |
2650 | if eval "test \"`echo '$''{'ac_cv_prog_LEX'+set}'`\" = set"; then |
2651 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2652 | else | |
2653 | if test -n "$LEX"; then | |
2654 | ac_cv_prog_LEX="$LEX" # Let the user override the test. | |
2655 | else | |
a1624e3f | 2656 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
352b0f4d | 2657 | for ac_dir in $PATH; do |
e2b4bd2a ILT |
2658 | test -z "$ac_dir" && ac_dir=. |
2659 | if test -f $ac_dir/$ac_word; then | |
2660 | ac_cv_prog_LEX="flex" | |
2661 | break | |
2662 | fi | |
2663 | done | |
2664 | IFS="$ac_save_ifs" | |
2665 | test -z "$ac_cv_prog_LEX" && ac_cv_prog_LEX="lex" | |
2666 | fi | |
2667 | fi | |
2668 | LEX="$ac_cv_prog_LEX" | |
2669 | if test -n "$LEX"; then | |
2670 | echo "$ac_t""$LEX" 1>&6 | |
2671 | else | |
2672 | echo "$ac_t""no" 1>&6 | |
2673 | fi | |
2674 | ||
2675 | if test -z "$LEXLIB" | |
2676 | then | |
2677 | case "$LEX" in | |
2678 | flex*) ac_lib=fl ;; | |
2679 | *) ac_lib=l ;; | |
2680 | esac | |
2681 | echo $ac_n "checking for yywrap in -l$ac_lib""... $ac_c" 1>&6 | |
44be4397 | 2682 | echo "configure:2683: checking for yywrap in -l$ac_lib" >&5 |
e2b4bd2a ILT |
2683 | ac_lib_var=`echo $ac_lib'_'yywrap | sed 'y%./+-%__p_%'` |
2684 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
2685 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2686 | else | |
2687 | ac_save_LIBS="$LIBS" | |
2688 | LIBS="-l$ac_lib $LIBS" | |
2689 | cat > conftest.$ac_ext <<EOF | |
44be4397 | 2690 | #line 2691 "configure" |
e2b4bd2a ILT |
2691 | #include "confdefs.h" |
2692 | /* Override any gcc2 internal prototype to avoid an error. */ | |
2693 | /* We use char because int might match the return type of a gcc2 | |
2694 | builtin and then its argument prototype would still apply. */ | |
2695 | char yywrap(); | |
2696 | ||
2697 | int main() { | |
2698 | yywrap() | |
2699 | ; return 0; } | |
2700 | EOF | |
44be4397 | 2701 | if { (eval echo configure:2702: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
e2b4bd2a ILT |
2702 | rm -rf conftest* |
2703 | eval "ac_cv_lib_$ac_lib_var=yes" | |
2704 | else | |
2705 | echo "configure: failed program was:" >&5 | |
2706 | cat conftest.$ac_ext >&5 | |
2707 | rm -rf conftest* | |
2708 | eval "ac_cv_lib_$ac_lib_var=no" | |
2709 | fi | |
2710 | rm -f conftest* | |
2711 | LIBS="$ac_save_LIBS" | |
2712 | ||
2713 | fi | |
2714 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
2715 | echo "$ac_t""yes" 1>&6 | |
2716 | LEXLIB="-l$ac_lib" | |
2717 | else | |
2718 | echo "$ac_t""no" 1>&6 | |
2719 | fi | |
2720 | ||
2721 | fi | |
2722 | ||
e2b4bd2a | 2723 | echo $ac_n "checking lex output file root""... $ac_c" 1>&6 |
44be4397 | 2724 | echo "configure:2725: checking lex output file root" >&5 |
e2b4bd2a | 2725 | if eval "test \"`echo '$''{'ac_cv_prog_lex_root'+set}'`\" = set"; then |
833c46e1 | 2726 | echo $ac_n "(cached) $ac_c" 1>&6 |
b11fb939 | 2727 | else |
e2b4bd2a ILT |
2728 | # The minimal lex program is just a single line: %%. But some broken lexes |
2729 | # (Solaris, I think it was) want two %% lines, so accommodate them. | |
2730 | echo '%% | |
2731 | %%' | $LEX | |
2732 | if test -f lex.yy.c; then | |
2733 | ac_cv_prog_lex_root=lex.yy | |
2734 | elif test -f lexyy.c; then | |
2735 | ac_cv_prog_lex_root=lexyy | |
2736 | else | |
2737 | { echo "configure: error: cannot find output from $LEX; giving up" 1>&2; exit 1; } | |
2738 | fi | |
2739 | fi | |
2740 | ||
2741 | echo "$ac_t""$ac_cv_prog_lex_root" 1>&6 | |
2742 | LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root | |
2743 | ||
2744 | echo $ac_n "checking whether yytext is a pointer""... $ac_c" 1>&6 | |
44be4397 | 2745 | echo "configure:2746: checking whether yytext is a pointer" >&5 |
e2b4bd2a ILT |
2746 | if eval "test \"`echo '$''{'ac_cv_prog_lex_yytext_pointer'+set}'`\" = set"; then |
2747 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2748 | else | |
2749 | # POSIX says lex can declare yytext either as a pointer or an array; the | |
2750 | # default is implementation-dependent. Figure out which it is, since | |
2751 | # not all implementations provide the %pointer and %array declarations. | |
2752 | ac_cv_prog_lex_yytext_pointer=no | |
2753 | echo 'extern char *yytext;' >>$LEX_OUTPUT_ROOT.c | |
2754 | ac_save_LIBS="$LIBS" | |
2755 | LIBS="$LIBS $LEXLIB" | |
2756 | cat > conftest.$ac_ext <<EOF | |
44be4397 | 2757 | #line 2758 "configure" |
b11fb939 | 2758 | #include "confdefs.h" |
e2b4bd2a ILT |
2759 | `cat $LEX_OUTPUT_ROOT.c` |
2760 | int main() { | |
2761 | ||
2762 | ; return 0; } | |
b11fb939 | 2763 | EOF |
44be4397 | 2764 | if { (eval echo configure:2765: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
b11fb939 | 2765 | rm -rf conftest* |
e2b4bd2a | 2766 | ac_cv_prog_lex_yytext_pointer=yes |
b11fb939 | 2767 | else |
c6c7035c MM |
2768 | echo "configure: failed program was:" >&5 |
2769 | cat conftest.$ac_ext >&5 | |
b11fb939 KR |
2770 | fi |
2771 | rm -f conftest* | |
e2b4bd2a ILT |
2772 | LIBS="$ac_save_LIBS" |
2773 | rm -f "${LEX_OUTPUT_ROOT}.c" | |
2774 | ||
b11fb939 | 2775 | fi |
e2b4bd2a ILT |
2776 | |
2777 | echo "$ac_t""$ac_cv_prog_lex_yytext_pointer" 1>&6 | |
2778 | if test $ac_cv_prog_lex_yytext_pointer = yes; then | |
2779 | cat >> confdefs.h <<\EOF | |
2780 | #define YYTEXT_POINTER 1 | |
b11fb939 | 2781 | EOF |
e2b4bd2a | 2782 | |
b11fb939 | 2783 | fi |
b11fb939 | 2784 | |
b11fb939 | 2785 | |
48401fcf TT |
2786 | ALL_LINGUAS= |
2787 | echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6 | |
44be4397 | 2788 | echo "configure:2789: checking for POSIXized ISC" >&5 |
48401fcf TT |
2789 | if test -d /etc/conf/kconfig.d && |
2790 | grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1 | |
2791 | then | |
2792 | echo "$ac_t""yes" 1>&6 | |
2793 | ISC=yes # If later tests want to check for ISC. | |
2794 | cat >> confdefs.h <<\EOF | |
2795 | #define _POSIX_SOURCE 1 | |
2796 | EOF | |
bf111c9f | 2797 | |
48401fcf TT |
2798 | if test "$GCC" = yes; then |
2799 | CC="$CC -posix" | |
e2b4bd2a | 2800 | else |
48401fcf | 2801 | CC="$CC -Xp" |
e2b4bd2a | 2802 | fi |
48401fcf TT |
2803 | else |
2804 | echo "$ac_t""no" 1>&6 | |
2805 | ISC= | |
2806 | fi | |
e2b4bd2a | 2807 | |
48401fcf | 2808 | echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 |
44be4397 | 2809 | echo "configure:2810: checking for ANSI C header files" >&5 |
48401fcf | 2810 | if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then |
e42b2520 RS |
2811 | echo $ac_n "(cached) $ac_c" 1>&6 |
2812 | else | |
2813 | cat > conftest.$ac_ext <<EOF | |
44be4397 | 2814 | #line 2815 "configure" |
e42b2520 | 2815 | #include "confdefs.h" |
48401fcf TT |
2816 | #include <stdlib.h> |
2817 | #include <stdarg.h> | |
2818 | #include <string.h> | |
2819 | #include <float.h> | |
e42b2520 | 2820 | EOF |
48401fcf | 2821 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
44be4397 | 2822 | { (eval echo configure:2823: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
a1624e3f | 2823 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
48401fcf | 2824 | if test -z "$ac_err"; then |
e42b2520 | 2825 | rm -rf conftest* |
48401fcf | 2826 | ac_cv_header_stdc=yes |
e42b2520 | 2827 | else |
48401fcf | 2828 | echo "$ac_err" >&5 |
e42b2520 RS |
2829 | echo "configure: failed program was:" >&5 |
2830 | cat conftest.$ac_ext >&5 | |
2831 | rm -rf conftest* | |
48401fcf | 2832 | ac_cv_header_stdc=no |
e42b2520 RS |
2833 | fi |
2834 | rm -f conftest* | |
48401fcf TT |
2835 | |
2836 | if test $ac_cv_header_stdc = yes; then | |
2837 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. | |
2838 | cat > conftest.$ac_ext <<EOF | |
44be4397 | 2839 | #line 2840 "configure" |
48401fcf TT |
2840 | #include "confdefs.h" |
2841 | #include <string.h> | |
2842 | EOF | |
2843 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
2844 | egrep "memchr" >/dev/null 2>&1; then | |
2845 | : | |
2846 | else | |
2847 | rm -rf conftest* | |
2848 | ac_cv_header_stdc=no | |
2849 | fi | |
e42b2520 | 2850 | rm -f conftest* |
48401fcf | 2851 | |
e42b2520 RS |
2852 | fi |
2853 | ||
48401fcf TT |
2854 | if test $ac_cv_header_stdc = yes; then |
2855 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. | |
2856 | cat > conftest.$ac_ext <<EOF | |
44be4397 | 2857 | #line 2858 "configure" |
48401fcf TT |
2858 | #include "confdefs.h" |
2859 | #include <stdlib.h> | |
2860 | EOF | |
2861 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
2862 | egrep "free" >/dev/null 2>&1; then | |
2863 | : | |
2864 | else | |
2865 | rm -rf conftest* | |
2866 | ac_cv_header_stdc=no | |
2867 | fi | |
2868 | rm -f conftest* | |
2869 | ||
2870 | fi | |
2871 | ||
2872 | if test $ac_cv_header_stdc = yes; then | |
2873 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. | |
2874 | if test "$cross_compiling" = yes; then | |
2875 | : | |
2876 | else | |
2877 | cat > conftest.$ac_ext <<EOF | |
44be4397 | 2878 | #line 2879 "configure" |
48401fcf TT |
2879 | #include "confdefs.h" |
2880 | #include <ctype.h> | |
2881 | #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') | |
2882 | #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) | |
2883 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) | |
2884 | int main () { int i; for (i = 0; i < 256; i++) | |
2885 | if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); | |
2886 | exit (0); } | |
2887 | ||
2888 | EOF | |
44be4397 | 2889 | if { (eval echo configure:2890: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
48401fcf TT |
2890 | then |
2891 | : | |
2892 | else | |
2893 | echo "configure: failed program was:" >&5 | |
2894 | cat conftest.$ac_ext >&5 | |
2895 | rm -fr conftest* | |
2896 | ac_cv_header_stdc=no | |
2897 | fi | |
2898 | rm -fr conftest* | |
2899 | fi | |
2900 | ||
2901 | fi | |
2902 | fi | |
2903 | ||
2904 | echo "$ac_t""$ac_cv_header_stdc" 1>&6 | |
2905 | if test $ac_cv_header_stdc = yes; then | |
2906 | cat >> confdefs.h <<\EOF | |
2907 | #define STDC_HEADERS 1 | |
2908 | EOF | |
2909 | ||
2910 | fi | |
2911 | ||
2912 | echo $ac_n "checking for working const""... $ac_c" 1>&6 | |
44be4397 | 2913 | echo "configure:2914: checking for working const" >&5 |
48401fcf | 2914 | if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then |
6cc7a938 ILT |
2915 | echo $ac_n "(cached) $ac_c" 1>&6 |
2916 | else | |
2917 | cat > conftest.$ac_ext <<EOF | |
44be4397 | 2918 | #line 2919 "configure" |
6cc7a938 ILT |
2919 | #include "confdefs.h" |
2920 | ||
2921 | int main() { | |
48401fcf TT |
2922 | |
2923 | /* Ultrix mips cc rejects this. */ | |
2924 | typedef int charset[2]; const charset x; | |
2925 | /* SunOS 4.1.1 cc rejects this. */ | |
2926 | char const *const *ccp; | |
2927 | char **p; | |
2928 | /* NEC SVR4.0.2 mips cc rejects this. */ | |
2929 | struct point {int x, y;}; | |
2930 | static struct point const zero = {0,0}; | |
2931 | /* AIX XL C 1.02.0.0 rejects this. | |
2932 | It does not let you subtract one const X* pointer from another in an arm | |
2933 | of an if-expression whose if-part is not a constant expression */ | |
2934 | const char *g = "string"; | |
2935 | ccp = &g + (g ? g-g : 0); | |
2936 | /* HPUX 7.0 cc rejects these. */ | |
2937 | ++ccp; | |
2938 | p = (char**) ccp; | |
2939 | ccp = (char const *const *) p; | |
2940 | { /* SCO 3.2v4 cc rejects this. */ | |
2941 | char *t; | |
2942 | char const *s = 0 ? (char *) 0 : (char const *) 0; | |
2943 | ||
2944 | *t++ = 0; | |
2945 | } | |
2946 | { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ | |
2947 | int x[] = {25, 17}; | |
2948 | const int *foo = &x[0]; | |
2949 | ++foo; | |
2950 | } | |
2951 | { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ | |
2952 | typedef const int *iptr; | |
2953 | iptr p = 0; | |
2954 | ++p; | |
2955 | } | |
2956 | { /* AIX XL C 1.02.0.0 rejects this saying | |
2957 | "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ | |
2958 | struct s { int j; const int *ap[3]; }; | |
2959 | struct s *b; b->j = 5; | |
2960 | } | |
2961 | { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ | |
2962 | const int foo = 10; | |
2963 | } | |
2964 | ||
6cc7a938 ILT |
2965 | ; return 0; } |
2966 | EOF | |
44be4397 | 2967 | if { (eval echo configure:2968: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
6cc7a938 | 2968 | rm -rf conftest* |
48401fcf | 2969 | ac_cv_c_const=yes |
6cc7a938 ILT |
2970 | else |
2971 | echo "configure: failed program was:" >&5 | |
2972 | cat conftest.$ac_ext >&5 | |
2973 | rm -rf conftest* | |
48401fcf | 2974 | ac_cv_c_const=no |
6cc7a938 ILT |
2975 | fi |
2976 | rm -f conftest* | |
6cc7a938 ILT |
2977 | fi |
2978 | ||
48401fcf TT |
2979 | echo "$ac_t""$ac_cv_c_const" 1>&6 |
2980 | if test $ac_cv_c_const = no; then | |
2981 | cat >> confdefs.h <<\EOF | |
2982 | #define const | |
2983 | EOF | |
6cc7a938 | 2984 | |
48401fcf | 2985 | fi |
e2b4bd2a | 2986 | |
48401fcf | 2987 | echo $ac_n "checking for inline""... $ac_c" 1>&6 |
44be4397 | 2988 | echo "configure:2989: checking for inline" >&5 |
48401fcf | 2989 | if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then |
e42b2520 RS |
2990 | echo $ac_n "(cached) $ac_c" 1>&6 |
2991 | else | |
48401fcf TT |
2992 | ac_cv_c_inline=no |
2993 | for ac_kw in inline __inline__ __inline; do | |
2994 | cat > conftest.$ac_ext <<EOF | |
44be4397 | 2995 | #line 2996 "configure" |
48401fcf TT |
2996 | #include "confdefs.h" |
2997 | ||
e42b2520 | 2998 | int main() { |
48401fcf TT |
2999 | } $ac_kw foo() { |
3000 | ; return 0; } | |
e42b2520 | 3001 | EOF |
44be4397 | 3002 | if { (eval echo configure:3003: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
48401fcf TT |
3003 | rm -rf conftest* |
3004 | ac_cv_c_inline=$ac_kw; break | |
3005 | else | |
3006 | echo "configure: failed program was:" >&5 | |
3007 | cat conftest.$ac_ext >&5 | |
e42b2520 | 3008 | fi |
48401fcf TT |
3009 | rm -f conftest* |
3010 | done | |
e42b2520 | 3011 | |
e42b2520 | 3012 | fi |
e42b2520 | 3013 | |
48401fcf TT |
3014 | echo "$ac_t""$ac_cv_c_inline" 1>&6 |
3015 | case "$ac_cv_c_inline" in | |
3016 | inline | yes) ;; | |
3017 | no) cat >> confdefs.h <<\EOF | |
3018 | #define inline | |
3019 | EOF | |
3020 | ;; | |
3021 | *) cat >> confdefs.h <<EOF | |
3022 | #define inline $ac_cv_c_inline | |
3023 | EOF | |
3024 | ;; | |
3025 | esac | |
e42b2520 | 3026 | |
48401fcf | 3027 | echo $ac_n "checking for off_t""... $ac_c" 1>&6 |
44be4397 | 3028 | echo "configure:3029: checking for off_t" >&5 |
48401fcf | 3029 | if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then |
e2b4bd2a ILT |
3030 | echo $ac_n "(cached) $ac_c" 1>&6 |
3031 | else | |
3032 | cat > conftest.$ac_ext <<EOF | |
44be4397 | 3033 | #line 3034 "configure" |
e2b4bd2a | 3034 | #include "confdefs.h" |
48401fcf TT |
3035 | #include <sys/types.h> |
3036 | #if STDC_HEADERS | |
3037 | #include <stdlib.h> | |
3038 | #include <stddef.h> | |
3039 | #endif | |
e2b4bd2a | 3040 | EOF |
48401fcf | 3041 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
352b0f4d | 3042 | egrep "off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then |
e2b4bd2a | 3043 | rm -rf conftest* |
48401fcf | 3044 | ac_cv_type_off_t=yes |
e2b4bd2a | 3045 | else |
e2b4bd2a | 3046 | rm -rf conftest* |
48401fcf | 3047 | ac_cv_type_off_t=no |
e2b4bd2a ILT |
3048 | fi |
3049 | rm -f conftest* | |
48401fcf | 3050 | |
e2b4bd2a | 3051 | fi |
48401fcf TT |
3052 | echo "$ac_t""$ac_cv_type_off_t" 1>&6 |
3053 | if test $ac_cv_type_off_t = no; then | |
3054 | cat >> confdefs.h <<\EOF | |
3055 | #define off_t long | |
e2b4bd2a | 3056 | EOF |
e2b4bd2a | 3057 | |
48401fcf | 3058 | fi |
e2b4bd2a | 3059 | |
48401fcf | 3060 | echo $ac_n "checking for size_t""... $ac_c" 1>&6 |
44be4397 | 3061 | echo "configure:3062: checking for size_t" >&5 |
48401fcf TT |
3062 | if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then |
3063 | echo $ac_n "(cached) $ac_c" 1>&6 | |
e2b4bd2a | 3064 | else |
48401fcf | 3065 | cat > conftest.$ac_ext <<EOF |
44be4397 | 3066 | #line 3067 "configure" |
48401fcf TT |
3067 | #include "confdefs.h" |
3068 | #include <sys/types.h> | |
3069 | #if STDC_HEADERS | |
3070 | #include <stdlib.h> | |
3071 | #include <stddef.h> | |
3072 | #endif | |
3073 | EOF | |
3074 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
352b0f4d | 3075 | egrep "size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then |
48401fcf TT |
3076 | rm -rf conftest* |
3077 | ac_cv_type_size_t=yes | |
3078 | else | |
3079 | rm -rf conftest* | |
3080 | ac_cv_type_size_t=no | |
3081 | fi | |
3082 | rm -f conftest* | |
3083 | ||
3084 | fi | |
3085 | echo "$ac_t""$ac_cv_type_size_t" 1>&6 | |
3086 | if test $ac_cv_type_size_t = no; then | |
e2b4bd2a | 3087 | cat >> confdefs.h <<\EOF |
48401fcf | 3088 | #define size_t unsigned |
e2b4bd2a ILT |
3089 | EOF |
3090 | ||
3091 | fi | |
e2b4bd2a | 3092 | |
b11fb939 KR |
3093 | # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works |
3094 | # for constant arguments. Useless! | |
833c46e1 | 3095 | echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6 |
44be4397 | 3096 | echo "configure:3097: checking for working alloca.h" >&5 |
833c46e1 KR |
3097 | if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then |
3098 | echo $ac_n "(cached) $ac_c" 1>&6 | |
b11fb939 | 3099 | else |
28d3e4a3 | 3100 | cat > conftest.$ac_ext <<EOF |
44be4397 | 3101 | #line 3102 "configure" |
b11fb939 KR |
3102 | #include "confdefs.h" |
3103 | #include <alloca.h> | |
c6c7035c | 3104 | int main() { |
b11fb939 KR |
3105 | char *p = alloca(2 * sizeof(int)); |
3106 | ; return 0; } | |
3107 | EOF | |
44be4397 | 3108 | if { (eval echo configure:3109: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
b11fb939 KR |
3109 | rm -rf conftest* |
3110 | ac_cv_header_alloca_h=yes | |
3111 | else | |
c6c7035c MM |
3112 | echo "configure: failed program was:" >&5 |
3113 | cat conftest.$ac_ext >&5 | |
b11fb939 KR |
3114 | rm -rf conftest* |
3115 | ac_cv_header_alloca_h=no | |
3116 | fi | |
3117 | rm -f conftest* | |
b11fb939 | 3118 | fi |
1c9dbb83 | 3119 | |
833c46e1 | 3120 | echo "$ac_t""$ac_cv_header_alloca_h" 1>&6 |
b11fb939 KR |
3121 | if test $ac_cv_header_alloca_h = yes; then |
3122 | cat >> confdefs.h <<\EOF | |
3123 | #define HAVE_ALLOCA_H 1 | |
3124 | EOF | |
3125 | ||
3126 | fi | |
3127 | ||
833c46e1 | 3128 | echo $ac_n "checking for alloca""... $ac_c" 1>&6 |
44be4397 | 3129 | echo "configure:3130: checking for alloca" >&5 |
c6c7035c | 3130 | if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then |
833c46e1 | 3131 | echo $ac_n "(cached) $ac_c" 1>&6 |
b11fb939 | 3132 | else |
28d3e4a3 | 3133 | cat > conftest.$ac_ext <<EOF |
44be4397 | 3134 | #line 3135 "configure" |
b11fb939 KR |
3135 | #include "confdefs.h" |
3136 | ||
3137 | #ifdef __GNUC__ | |
3138 | # define alloca __builtin_alloca | |
3139 | #else | |
a1624e3f RH |
3140 | # ifdef _MSC_VER |
3141 | # include <malloc.h> | |
3142 | # define alloca _alloca | |
b11fb939 | 3143 | # else |
a1624e3f RH |
3144 | # if HAVE_ALLOCA_H |
3145 | # include <alloca.h> | |
603e9cf1 | 3146 | # else |
a1624e3f RH |
3147 | # ifdef _AIX |
3148 | #pragma alloca | |
3149 | # else | |
3150 | # ifndef alloca /* predefined by HP cc +Olibcalls */ | |
b11fb939 | 3151 | char *alloca (); |
a1624e3f | 3152 | # endif |
b11fb939 KR |
3153 | # endif |
3154 | # endif | |
3155 | # endif | |
3156 | #endif | |
3157 | ||
c6c7035c | 3158 | int main() { |
b11fb939 KR |
3159 | char *p = (char *) alloca(1); |
3160 | ; return 0; } | |
3161 | EOF | |
44be4397 | 3162 | if { (eval echo configure:3163: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
b11fb939 | 3163 | rm -rf conftest* |
c6c7035c | 3164 | ac_cv_func_alloca_works=yes |
b11fb939 | 3165 | else |
c6c7035c MM |
3166 | echo "configure: failed program was:" >&5 |
3167 | cat conftest.$ac_ext >&5 | |
b11fb939 | 3168 | rm -rf conftest* |
c6c7035c | 3169 | ac_cv_func_alloca_works=no |
b11fb939 KR |
3170 | fi |
3171 | rm -f conftest* | |
b11fb939 | 3172 | fi |
1c9dbb83 | 3173 | |
c6c7035c MM |
3174 | echo "$ac_t""$ac_cv_func_alloca_works" 1>&6 |
3175 | if test $ac_cv_func_alloca_works = yes; then | |
b11fb939 KR |
3176 | cat >> confdefs.h <<\EOF |
3177 | #define HAVE_ALLOCA 1 | |
3178 | EOF | |
3179 | ||
3180 | fi | |
3181 | ||
c6c7035c | 3182 | if test $ac_cv_func_alloca_works = no; then |
b11fb939 KR |
3183 | # The SVR3 libPW and SVR4 libucb both contain incompatible functions |
3184 | # that cause trouble. Some versions do not even contain alloca or | |
3185 | # contain a buggy version. If you still want to use their alloca, | |
3186 | # use ar to extract alloca.o from them instead of compiling alloca.c. | |
a1624e3f | 3187 | ALLOCA=alloca.${ac_objext} |
b11fb939 KR |
3188 | cat >> confdefs.h <<\EOF |
3189 | #define C_ALLOCA 1 | |
3190 | EOF | |
3191 | ||
3192 | ||
833c46e1 | 3193 | echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6 |
44be4397 | 3194 | echo "configure:3195: checking whether alloca needs Cray hooks" >&5 |
833c46e1 KR |
3195 | if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then |
3196 | echo $ac_n "(cached) $ac_c" 1>&6 | |
b11fb939 | 3197 | else |
28d3e4a3 | 3198 | cat > conftest.$ac_ext <<EOF |
44be4397 | 3199 | #line 3200 "configure" |
b11fb939 KR |
3200 | #include "confdefs.h" |
3201 | #if defined(CRAY) && ! defined(CRAY2) | |
3202 | webecray | |
3203 | #else | |
3204 | wenotbecray | |
3205 | #endif | |
3206 | ||
3207 | EOF | |
28d3e4a3 | 3208 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
fb589130 | 3209 | egrep "webecray" >/dev/null 2>&1; then |
b11fb939 KR |
3210 | rm -rf conftest* |
3211 | ac_cv_os_cray=yes | |
3212 | else | |
3213 | rm -rf conftest* | |
3214 | ac_cv_os_cray=no | |
3215 | fi | |
3216 | rm -f conftest* | |
3217 | ||
3218 | fi | |
1c9dbb83 | 3219 | |
833c46e1 | 3220 | echo "$ac_t""$ac_cv_os_cray" 1>&6 |
b11fb939 | 3221 | if test $ac_cv_os_cray = yes; then |
833c46e1 KR |
3222 | for ac_func in _getb67 GETB67 getb67; do |
3223 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
44be4397 | 3224 | echo "configure:3225: checking for $ac_func" >&5 |
833c46e1 KR |
3225 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
3226 | echo $ac_n "(cached) $ac_c" 1>&6 | |
b11fb939 | 3227 | else |
28d3e4a3 | 3228 | cat > conftest.$ac_ext <<EOF |
44be4397 | 3229 | #line 3230 "configure" |
b11fb939 | 3230 | #include "confdefs.h" |
833c46e1 KR |
3231 | /* System header to define __stub macros and hopefully few prototypes, |
3232 | which can conflict with char $ac_func(); below. */ | |
3233 | #include <assert.h> | |
f1698cb7 | 3234 | /* Override any gcc2 internal prototype to avoid an error. */ |
df586de2 ILT |
3235 | /* We use char because int might match the return type of a gcc2 |
3236 | builtin and then its argument prototype would still apply. */ | |
1c9dbb83 | 3237 | char $ac_func(); |
f1698cb7 | 3238 | |
c6c7035c | 3239 | int main() { |
b11fb939 KR |
3240 | |
3241 | /* The GNU C library defines this for functions which it implements | |
3242 | to always fail with ENOSYS. Some functions are actually named | |
3243 | something starting with __ and the normal name is an alias. */ | |
833c46e1 | 3244 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
b11fb939 KR |
3245 | choke me |
3246 | #else | |
833c46e1 | 3247 | $ac_func(); |
b11fb939 KR |
3248 | #endif |
3249 | ||
3250 | ; return 0; } | |
3251 | EOF | |
44be4397 | 3252 | if { (eval echo configure:3253: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
b11fb939 | 3253 | rm -rf conftest* |
833c46e1 | 3254 | eval "ac_cv_func_$ac_func=yes" |
b11fb939 | 3255 | else |
c6c7035c MM |
3256 | echo "configure: failed program was:" >&5 |
3257 | cat conftest.$ac_ext >&5 | |
b11fb939 | 3258 | rm -rf conftest* |
833c46e1 | 3259 | eval "ac_cv_func_$ac_func=no" |
b11fb939 KR |
3260 | fi |
3261 | rm -f conftest* | |
7d0f8249 | 3262 | fi |
c6c7035c | 3263 | |
833c46e1 KR |
3264 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
3265 | echo "$ac_t""yes" 1>&6 | |
3266 | cat >> confdefs.h <<EOF | |
3267 | #define CRAY_STACKSEG_END $ac_func | |
b11fb939 KR |
3268 | EOF |
3269 | ||
833c46e1 | 3270 | break |
b11fb939 | 3271 | else |
833c46e1 | 3272 | echo "$ac_t""no" 1>&6 |
b11fb939 KR |
3273 | fi |
3274 | ||
833c46e1 | 3275 | done |
b11fb939 KR |
3276 | fi |
3277 | ||
833c46e1 | 3278 | echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6 |
44be4397 | 3279 | echo "configure:3280: checking stack direction for C alloca" >&5 |
833c46e1 KR |
3280 | if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then |
3281 | echo $ac_n "(cached) $ac_c" 1>&6 | |
b11fb939 KR |
3282 | else |
3283 | if test "$cross_compiling" = yes; then | |
bf111c9f | 3284 | ac_cv_c_stack_direction=0 |
b11fb939 | 3285 | else |
c6c7035c | 3286 | cat > conftest.$ac_ext <<EOF |
44be4397 | 3287 | #line 3288 "configure" |
b11fb939 KR |
3288 | #include "confdefs.h" |
3289 | find_stack_direction () | |
3290 | { | |
3291 | static char *addr = 0; | |
3292 | auto char dummy; | |
3293 | if (addr == 0) | |
3294 | { | |
3295 | addr = &dummy; | |
3296 | return find_stack_direction (); | |
3297 | } | |
3298 | else | |
3299 | return (&dummy > addr) ? 1 : -1; | |
3300 | } | |
3301 | main () | |
3302 | { | |
3303 | exit (find_stack_direction() < 0); | |
3304 | } | |
3305 | EOF | |
44be4397 | 3306 | if { (eval echo configure:3307: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
c6c7035c | 3307 | then |
b11fb939 KR |
3308 | ac_cv_c_stack_direction=1 |
3309 | else | |
c6c7035c MM |
3310 | echo "configure: failed program was:" >&5 |
3311 | cat conftest.$ac_ext >&5 | |
3312 | rm -fr conftest* | |
b11fb939 KR |
3313 | ac_cv_c_stack_direction=-1 |
3314 | fi | |
7d0f8249 | 3315 | rm -fr conftest* |
64556643 FF |
3316 | fi |
3317 | ||
c6c7035c MM |
3318 | fi |
3319 | ||
833c46e1 | 3320 | echo "$ac_t""$ac_cv_c_stack_direction" 1>&6 |
b11fb939 KR |
3321 | cat >> confdefs.h <<EOF |
3322 | #define STACK_DIRECTION $ac_cv_c_stack_direction | |
3323 | EOF | |
3324 | ||
3325 | fi | |
3326 | ||
48401fcf TT |
3327 | for ac_hdr in unistd.h |
3328 | do | |
3329 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
3330 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
44be4397 | 3331 | echo "configure:3332: checking for $ac_hdr" >&5 |
48401fcf | 3332 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
833c46e1 | 3333 | echo $ac_n "(cached) $ac_c" 1>&6 |
b11fb939 | 3334 | else |
833c46e1 | 3335 | cat > conftest.$ac_ext <<EOF |
44be4397 | 3336 | #line 3337 "configure" |
b11fb939 | 3337 | #include "confdefs.h" |
48401fcf | 3338 | #include <$ac_hdr> |
b11fb939 | 3339 | EOF |
48401fcf | 3340 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
44be4397 | 3341 | { (eval echo configure:3342: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
a1624e3f | 3342 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
48401fcf | 3343 | if test -z "$ac_err"; then |
b11fb939 | 3344 | rm -rf conftest* |
48401fcf | 3345 | eval "ac_cv_header_$ac_safe=yes" |
c6c7035c | 3346 | else |
48401fcf | 3347 | echo "$ac_err" >&5 |
c6c7035c MM |
3348 | echo "configure: failed program was:" >&5 |
3349 | cat conftest.$ac_ext >&5 | |
48401fcf TT |
3350 | rm -rf conftest* |
3351 | eval "ac_cv_header_$ac_safe=no" | |
b11fb939 KR |
3352 | fi |
3353 | rm -f conftest* | |
b11fb939 | 3354 | fi |
48401fcf TT |
3355 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
3356 | echo "$ac_t""yes" 1>&6 | |
3357 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
3358 | cat >> confdefs.h <<EOF | |
3359 | #define $ac_tr_hdr 1 | |
833c46e1 | 3360 | EOF |
48401fcf TT |
3361 | |
3362 | else | |
3363 | echo "$ac_t""no" 1>&6 | |
3364 | fi | |
3365 | done | |
b11fb939 | 3366 | |
48401fcf | 3367 | for ac_func in getpagesize |
b9419dd2 | 3368 | do |
833c46e1 | 3369 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
44be4397 | 3370 | echo "configure:3371: checking for $ac_func" >&5 |
833c46e1 KR |
3371 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
3372 | echo $ac_n "(cached) $ac_c" 1>&6 | |
28d3e4a3 KR |
3373 | else |
3374 | cat > conftest.$ac_ext <<EOF | |
44be4397 | 3375 | #line 3376 "configure" |
28d3e4a3 | 3376 | #include "confdefs.h" |
833c46e1 KR |
3377 | /* System header to define __stub macros and hopefully few prototypes, |
3378 | which can conflict with char $ac_func(); below. */ | |
3379 | #include <assert.h> | |
f1698cb7 | 3380 | /* Override any gcc2 internal prototype to avoid an error. */ |
df586de2 ILT |
3381 | /* We use char because int might match the return type of a gcc2 |
3382 | builtin and then its argument prototype would still apply. */ | |
1c9dbb83 | 3383 | char $ac_func(); |
f1698cb7 | 3384 | |
c6c7035c | 3385 | int main() { |
28d3e4a3 KR |
3386 | |
3387 | /* The GNU C library defines this for functions which it implements | |
3388 | to always fail with ENOSYS. Some functions are actually named | |
3389 | something starting with __ and the normal name is an alias. */ | |
b9419dd2 | 3390 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
28d3e4a3 KR |
3391 | choke me |
3392 | #else | |
f1698cb7 | 3393 | $ac_func(); |
28d3e4a3 KR |
3394 | #endif |
3395 | ||
3396 | ; return 0; } | |
3397 | EOF | |
44be4397 | 3398 | if { (eval echo configure:3399: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
48401fcf TT |
3399 | rm -rf conftest* |
3400 | eval "ac_cv_func_$ac_func=yes" | |
3401 | else | |
3402 | echo "configure: failed program was:" >&5 | |
3403 | cat conftest.$ac_ext >&5 | |
3404 | rm -rf conftest* | |
3405 | eval "ac_cv_func_$ac_func=no" | |
3406 | fi | |
3407 | rm -f conftest* | |
3408 | fi | |
3409 | ||
3410 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
3411 | echo "$ac_t""yes" 1>&6 | |
3412 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
3413 | cat >> confdefs.h <<EOF | |
3414 | #define $ac_tr_func 1 | |
3415 | EOF | |
3416 | ||
3417 | else | |
3418 | echo "$ac_t""no" 1>&6 | |
3419 | fi | |
3420 | done | |
3421 | ||
3422 | echo $ac_n "checking for working mmap""... $ac_c" 1>&6 | |
44be4397 | 3423 | echo "configure:3424: checking for working mmap" >&5 |
48401fcf TT |
3424 | if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then |
3425 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3426 | else | |
3427 | if test "$cross_compiling" = yes; then | |
3428 | ac_cv_func_mmap_fixed_mapped=no | |
3429 | else | |
3430 | cat > conftest.$ac_ext <<EOF | |
44be4397 | 3431 | #line 3432 "configure" |
48401fcf TT |
3432 | #include "confdefs.h" |
3433 | ||
3434 | /* Thanks to Mike Haertel and Jim Avera for this test. | |
3435 | Here is a matrix of mmap possibilities: | |
3436 | mmap private not fixed | |
3437 | mmap private fixed at somewhere currently unmapped | |
3438 | mmap private fixed at somewhere already mapped | |
3439 | mmap shared not fixed | |
3440 | mmap shared fixed at somewhere currently unmapped | |
3441 | mmap shared fixed at somewhere already mapped | |
3442 | For private mappings, we should verify that changes cannot be read() | |
3443 | back from the file, nor mmap's back from the file at a different | |
3444 | address. (There have been systems where private was not correctly | |
3445 | implemented like the infamous i386 svr4.0, and systems where the | |
3446 | VM page cache was not coherent with the filesystem buffer cache | |
3447 | like early versions of FreeBSD and possibly contemporary NetBSD.) | |
3448 | For shared mappings, we should conversely verify that changes get | |
3449 | propogated back to all the places they're supposed to be. | |
3450 | ||
3451 | Grep wants private fixed already mapped. | |
3452 | The main things grep needs to know about mmap are: | |
3453 | * does it exist and is it safe to write into the mmap'd area | |
3454 | * how to use it (BSD variants) */ | |
3455 | #include <sys/types.h> | |
3456 | #include <fcntl.h> | |
3457 | #include <sys/mman.h> | |
3458 | ||
3459 | /* This mess was copied from the GNU getpagesize.h. */ | |
3460 | #ifndef HAVE_GETPAGESIZE | |
3461 | # ifdef HAVE_UNISTD_H | |
3462 | # include <unistd.h> | |
3463 | # endif | |
3464 | ||
3465 | /* Assume that all systems that can run configure have sys/param.h. */ | |
3466 | # ifndef HAVE_SYS_PARAM_H | |
3467 | # define HAVE_SYS_PARAM_H 1 | |
3468 | # endif | |
3469 | ||
3470 | # ifdef _SC_PAGESIZE | |
3471 | # define getpagesize() sysconf(_SC_PAGESIZE) | |
3472 | # else /* no _SC_PAGESIZE */ | |
3473 | # ifdef HAVE_SYS_PARAM_H | |
3474 | # include <sys/param.h> | |
3475 | # ifdef EXEC_PAGESIZE | |
3476 | # define getpagesize() EXEC_PAGESIZE | |
3477 | # else /* no EXEC_PAGESIZE */ | |
3478 | # ifdef NBPG | |
3479 | # define getpagesize() NBPG * CLSIZE | |
3480 | # ifndef CLSIZE | |
3481 | # define CLSIZE 1 | |
3482 | # endif /* no CLSIZE */ | |
3483 | # else /* no NBPG */ | |
3484 | # ifdef NBPC | |
3485 | # define getpagesize() NBPC | |
3486 | # else /* no NBPC */ | |
3487 | # ifdef PAGESIZE | |
3488 | # define getpagesize() PAGESIZE | |
3489 | # endif /* PAGESIZE */ | |
3490 | # endif /* no NBPC */ | |
3491 | # endif /* no NBPG */ | |
3492 | # endif /* no EXEC_PAGESIZE */ | |
3493 | # else /* no HAVE_SYS_PARAM_H */ | |
3494 | # define getpagesize() 8192 /* punt totally */ | |
3495 | # endif /* no HAVE_SYS_PARAM_H */ | |
3496 | # endif /* no _SC_PAGESIZE */ | |
3497 | ||
3498 | #endif /* no HAVE_GETPAGESIZE */ | |
3499 | ||
3500 | #ifdef __cplusplus | |
3501 | extern "C" { void *malloc(unsigned); } | |
3502 | #else | |
3503 | char *malloc(); | |
3504 | #endif | |
3505 | ||
3506 | int | |
3507 | main() | |
3508 | { | |
3509 | char *data, *data2, *data3; | |
3510 | int i, pagesize; | |
3511 | int fd; | |
3512 | ||
3513 | pagesize = getpagesize(); | |
3514 | ||
3515 | /* | |
3516 | * First, make a file with some known garbage in it. | |
3517 | */ | |
3518 | data = malloc(pagesize); | |
3519 | if (!data) | |
3520 | exit(1); | |
3521 | for (i = 0; i < pagesize; ++i) | |
3522 | *(data + i) = rand(); | |
3523 | umask(0); | |
3524 | fd = creat("conftestmmap", 0600); | |
3525 | if (fd < 0) | |
3526 | exit(1); | |
3527 | if (write(fd, data, pagesize) != pagesize) | |
3528 | exit(1); | |
3529 | close(fd); | |
3530 | ||
3531 | /* | |
3532 | * Next, try to mmap the file at a fixed address which | |
3533 | * already has something else allocated at it. If we can, | |
3534 | * also make sure that we see the same garbage. | |
3535 | */ | |
3536 | fd = open("conftestmmap", O_RDWR); | |
3537 | if (fd < 0) | |
3538 | exit(1); | |
3539 | data2 = malloc(2 * pagesize); | |
3540 | if (!data2) | |
3541 | exit(1); | |
3542 | data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1); | |
3543 | if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE, | |
3544 | MAP_PRIVATE | MAP_FIXED, fd, 0L)) | |
3545 | exit(1); | |
3546 | for (i = 0; i < pagesize; ++i) | |
3547 | if (*(data + i) != *(data2 + i)) | |
3548 | exit(1); | |
3549 | ||
3550 | /* | |
3551 | * Finally, make sure that changes to the mapped area | |
3552 | * do not percolate back to the file as seen by read(). | |
3553 | * (This is a bug on some variants of i386 svr4.0.) | |
3554 | */ | |
3555 | for (i = 0; i < pagesize; ++i) | |
3556 | *(data2 + i) = *(data2 + i) + 1; | |
3557 | data3 = malloc(pagesize); | |
3558 | if (!data3) | |
3559 | exit(1); | |
3560 | if (read(fd, data3, pagesize) != pagesize) | |
3561 | exit(1); | |
3562 | for (i = 0; i < pagesize; ++i) | |
3563 | if (*(data + i) != *(data3 + i)) | |
3564 | exit(1); | |
3565 | close(fd); | |
3566 | unlink("conftestmmap"); | |
3567 | exit(0); | |
3568 | } | |
3569 | ||
3570 | EOF | |
44be4397 | 3571 | if { (eval echo configure:3572: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
48401fcf TT |
3572 | then |
3573 | ac_cv_func_mmap_fixed_mapped=yes | |
3574 | else | |
3575 | echo "configure: failed program was:" >&5 | |
3576 | cat conftest.$ac_ext >&5 | |
3577 | rm -fr conftest* | |
3578 | ac_cv_func_mmap_fixed_mapped=no | |
3579 | fi | |
3580 | rm -fr conftest* | |
3581 | fi | |
3582 | ||
3583 | fi | |
3584 | ||
3585 | echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6 | |
3586 | if test $ac_cv_func_mmap_fixed_mapped = yes; then | |
3587 | cat >> confdefs.h <<\EOF | |
3588 | #define HAVE_MMAP 1 | |
3589 | EOF | |
3590 | ||
3591 | fi | |
3592 | ||
3593 | ||
3594 | for ac_hdr in argz.h limits.h locale.h nl_types.h malloc.h string.h \ | |
3595 | unistd.h values.h sys/param.h | |
3596 | do | |
3597 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
3598 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
44be4397 | 3599 | echo "configure:3600: checking for $ac_hdr" >&5 |
48401fcf TT |
3600 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
3601 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3602 | else | |
3603 | cat > conftest.$ac_ext <<EOF | |
44be4397 | 3604 | #line 3605 "configure" |
48401fcf TT |
3605 | #include "confdefs.h" |
3606 | #include <$ac_hdr> | |
3607 | EOF | |
3608 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
44be4397 | 3609 | { (eval echo configure:3610: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
a1624e3f | 3610 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
48401fcf TT |
3611 | if test -z "$ac_err"; then |
3612 | rm -rf conftest* | |
3613 | eval "ac_cv_header_$ac_safe=yes" | |
3614 | else | |
3615 | echo "$ac_err" >&5 | |
3616 | echo "configure: failed program was:" >&5 | |
3617 | cat conftest.$ac_ext >&5 | |
3618 | rm -rf conftest* | |
3619 | eval "ac_cv_header_$ac_safe=no" | |
3620 | fi | |
3621 | rm -f conftest* | |
3622 | fi | |
3623 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
3624 | echo "$ac_t""yes" 1>&6 | |
3625 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
3626 | cat >> confdefs.h <<EOF | |
3627 | #define $ac_tr_hdr 1 | |
3628 | EOF | |
3629 | ||
3630 | else | |
3631 | echo "$ac_t""no" 1>&6 | |
3632 | fi | |
3633 | done | |
3634 | ||
3635 | for ac_func in getcwd munmap putenv setenv setlocale strchr strcasecmp \ | |
3636 | __argz_count __argz_stringify __argz_next | |
3637 | do | |
3638 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
44be4397 | 3639 | echo "configure:3640: checking for $ac_func" >&5 |
48401fcf TT |
3640 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
3641 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3642 | else | |
3643 | cat > conftest.$ac_ext <<EOF | |
44be4397 | 3644 | #line 3645 "configure" |
48401fcf TT |
3645 | #include "confdefs.h" |
3646 | /* System header to define __stub macros and hopefully few prototypes, | |
3647 | which can conflict with char $ac_func(); below. */ | |
3648 | #include <assert.h> | |
3649 | /* Override any gcc2 internal prototype to avoid an error. */ | |
3650 | /* We use char because int might match the return type of a gcc2 | |
3651 | builtin and then its argument prototype would still apply. */ | |
3652 | char $ac_func(); | |
3653 | ||
3654 | int main() { | |
3655 | ||
3656 | /* The GNU C library defines this for functions which it implements | |
3657 | to always fail with ENOSYS. Some functions are actually named | |
3658 | something starting with __ and the normal name is an alias. */ | |
3659 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
3660 | choke me | |
3661 | #else | |
3662 | $ac_func(); | |
3663 | #endif | |
3664 | ||
3665 | ; return 0; } | |
3666 | EOF | |
44be4397 | 3667 | if { (eval echo configure:3668: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
48401fcf TT |
3668 | rm -rf conftest* |
3669 | eval "ac_cv_func_$ac_func=yes" | |
3670 | else | |
3671 | echo "configure: failed program was:" >&5 | |
3672 | cat conftest.$ac_ext >&5 | |
3673 | rm -rf conftest* | |
3674 | eval "ac_cv_func_$ac_func=no" | |
3675 | fi | |
3676 | rm -f conftest* | |
3677 | fi | |
3678 | ||
3679 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
3680 | echo "$ac_t""yes" 1>&6 | |
3681 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
3682 | cat >> confdefs.h <<EOF | |
3683 | #define $ac_tr_func 1 | |
3684 | EOF | |
3685 | ||
3686 | else | |
3687 | echo "$ac_t""no" 1>&6 | |
3688 | fi | |
3689 | done | |
3690 | ||
3691 | ||
3692 | if test "${ac_cv_func_stpcpy+set}" != "set"; then | |
3693 | for ac_func in stpcpy | |
3694 | do | |
3695 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
44be4397 | 3696 | echo "configure:3697: checking for $ac_func" >&5 |
48401fcf TT |
3697 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
3698 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3699 | else | |
3700 | cat > conftest.$ac_ext <<EOF | |
44be4397 | 3701 | #line 3702 "configure" |
48401fcf TT |
3702 | #include "confdefs.h" |
3703 | /* System header to define __stub macros and hopefully few prototypes, | |
3704 | which can conflict with char $ac_func(); below. */ | |
3705 | #include <assert.h> | |
3706 | /* Override any gcc2 internal prototype to avoid an error. */ | |
3707 | /* We use char because int might match the return type of a gcc2 | |
3708 | builtin and then its argument prototype would still apply. */ | |
3709 | char $ac_func(); | |
3710 | ||
3711 | int main() { | |
3712 | ||
3713 | /* The GNU C library defines this for functions which it implements | |
3714 | to always fail with ENOSYS. Some functions are actually named | |
3715 | something starting with __ and the normal name is an alias. */ | |
3716 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
3717 | choke me | |
3718 | #else | |
3719 | $ac_func(); | |
3720 | #endif | |
3721 | ||
3722 | ; return 0; } | |
3723 | EOF | |
44be4397 | 3724 | if { (eval echo configure:3725: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
48401fcf TT |
3725 | rm -rf conftest* |
3726 | eval "ac_cv_func_$ac_func=yes" | |
3727 | else | |
3728 | echo "configure: failed program was:" >&5 | |
3729 | cat conftest.$ac_ext >&5 | |
3730 | rm -rf conftest* | |
3731 | eval "ac_cv_func_$ac_func=no" | |
3732 | fi | |
3733 | rm -f conftest* | |
3734 | fi | |
3735 | ||
3736 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
3737 | echo "$ac_t""yes" 1>&6 | |
3738 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
3739 | cat >> confdefs.h <<EOF | |
3740 | #define $ac_tr_func 1 | |
3741 | EOF | |
3742 | ||
3743 | else | |
3744 | echo "$ac_t""no" 1>&6 | |
3745 | fi | |
3746 | done | |
3747 | ||
3748 | fi | |
3749 | if test "${ac_cv_func_stpcpy}" = "yes"; then | |
3750 | cat >> confdefs.h <<\EOF | |
3751 | #define HAVE_STPCPY 1 | |
3752 | EOF | |
3753 | ||
3754 | fi | |
3755 | ||
3756 | if test $ac_cv_header_locale_h = yes; then | |
3757 | echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6 | |
44be4397 | 3758 | echo "configure:3759: checking for LC_MESSAGES" >&5 |
48401fcf TT |
3759 | if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then |
3760 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3761 | else | |
3762 | cat > conftest.$ac_ext <<EOF | |
44be4397 | 3763 | #line 3764 "configure" |
48401fcf TT |
3764 | #include "confdefs.h" |
3765 | #include <locale.h> | |
3766 | int main() { | |
3767 | return LC_MESSAGES | |
3768 | ; return 0; } | |
3769 | EOF | |
44be4397 | 3770 | if { (eval echo configure:3771: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
48401fcf TT |
3771 | rm -rf conftest* |
3772 | am_cv_val_LC_MESSAGES=yes | |
3773 | else | |
3774 | echo "configure: failed program was:" >&5 | |
3775 | cat conftest.$ac_ext >&5 | |
3776 | rm -rf conftest* | |
3777 | am_cv_val_LC_MESSAGES=no | |
3778 | fi | |
3779 | rm -f conftest* | |
3780 | fi | |
3781 | ||
3782 | echo "$ac_t""$am_cv_val_LC_MESSAGES" 1>&6 | |
3783 | if test $am_cv_val_LC_MESSAGES = yes; then | |
3784 | cat >> confdefs.h <<\EOF | |
3785 | #define HAVE_LC_MESSAGES 1 | |
3786 | EOF | |
3787 | ||
3788 | fi | |
3789 | fi | |
3790 | echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6 | |
44be4397 | 3791 | echo "configure:3792: checking whether NLS is requested" >&5 |
48401fcf TT |
3792 | # Check whether --enable-nls or --disable-nls was given. |
3793 | if test "${enable_nls+set}" = set; then | |
3794 | enableval="$enable_nls" | |
3795 | USE_NLS=$enableval | |
3796 | else | |
3797 | USE_NLS=yes | |
3798 | fi | |
3799 | ||
3800 | echo "$ac_t""$USE_NLS" 1>&6 | |
3801 | ||
3802 | ||
3803 | USE_INCLUDED_LIBINTL=no | |
3804 | ||
3805 | if test "$USE_NLS" = "yes"; then | |
3806 | cat >> confdefs.h <<\EOF | |
3807 | #define ENABLE_NLS 1 | |
3808 | EOF | |
3809 | ||
3810 | echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6 | |
44be4397 | 3811 | echo "configure:3812: checking whether included gettext is requested" >&5 |
48401fcf TT |
3812 | # Check whether --with-included-gettext or --without-included-gettext was given. |
3813 | if test "${with_included_gettext+set}" = set; then | |
3814 | withval="$with_included_gettext" | |
3815 | nls_cv_force_use_gnu_gettext=$withval | |
3816 | else | |
3817 | nls_cv_force_use_gnu_gettext=no | |
3818 | fi | |
3819 | ||
3820 | echo "$ac_t""$nls_cv_force_use_gnu_gettext" 1>&6 | |
3821 | ||
3822 | nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext" | |
3823 | if test "$nls_cv_force_use_gnu_gettext" != "yes"; then | |
3824 | nls_cv_header_intl= | |
3825 | nls_cv_header_libgt= | |
3826 | CATOBJEXT=NONE | |
3827 | ||
3828 | ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'` | |
3829 | echo $ac_n "checking for libintl.h""... $ac_c" 1>&6 | |
44be4397 | 3830 | echo "configure:3831: checking for libintl.h" >&5 |
48401fcf TT |
3831 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
3832 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3833 | else | |
3834 | cat > conftest.$ac_ext <<EOF | |
44be4397 | 3835 | #line 3836 "configure" |
48401fcf TT |
3836 | #include "confdefs.h" |
3837 | #include <libintl.h> | |
3838 | EOF | |
3839 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
44be4397 | 3840 | { (eval echo configure:3841: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
a1624e3f | 3841 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
48401fcf TT |
3842 | if test -z "$ac_err"; then |
3843 | rm -rf conftest* | |
3844 | eval "ac_cv_header_$ac_safe=yes" | |
3845 | else | |
3846 | echo "$ac_err" >&5 | |
3847 | echo "configure: failed program was:" >&5 | |
3848 | cat conftest.$ac_ext >&5 | |
3849 | rm -rf conftest* | |
3850 | eval "ac_cv_header_$ac_safe=no" | |
3851 | fi | |
3852 | rm -f conftest* | |
3853 | fi | |
3854 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
3855 | echo "$ac_t""yes" 1>&6 | |
3856 | echo $ac_n "checking for gettext in libc""... $ac_c" 1>&6 | |
44be4397 | 3857 | echo "configure:3858: checking for gettext in libc" >&5 |
48401fcf TT |
3858 | if eval "test \"`echo '$''{'gt_cv_func_gettext_libc'+set}'`\" = set"; then |
3859 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3860 | else | |
3861 | cat > conftest.$ac_ext <<EOF | |
44be4397 | 3862 | #line 3863 "configure" |
48401fcf TT |
3863 | #include "confdefs.h" |
3864 | #include <libintl.h> | |
3865 | int main() { | |
3866 | return (int) gettext ("") | |
3867 | ; return 0; } | |
3868 | EOF | |
44be4397 | 3869 | if { (eval echo configure:3870: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
48401fcf TT |
3870 | rm -rf conftest* |
3871 | gt_cv_func_gettext_libc=yes | |
3872 | else | |
3873 | echo "configure: failed program was:" >&5 | |
3874 | cat conftest.$ac_ext >&5 | |
3875 | rm -rf conftest* | |
3876 | gt_cv_func_gettext_libc=no | |
3877 | fi | |
3878 | rm -f conftest* | |
3879 | fi | |
3880 | ||
3881 | echo "$ac_t""$gt_cv_func_gettext_libc" 1>&6 | |
3882 | ||
3883 | if test "$gt_cv_func_gettext_libc" != "yes"; then | |
3884 | echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6 | |
44be4397 | 3885 | echo "configure:3886: checking for bindtextdomain in -lintl" >&5 |
48401fcf TT |
3886 | ac_lib_var=`echo intl'_'bindtextdomain | sed 'y%./+-%__p_%'` |
3887 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
3888 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3889 | else | |
3890 | ac_save_LIBS="$LIBS" | |
3891 | LIBS="-lintl $LIBS" | |
3892 | cat > conftest.$ac_ext <<EOF | |
44be4397 | 3893 | #line 3894 "configure" |
48401fcf TT |
3894 | #include "confdefs.h" |
3895 | /* Override any gcc2 internal prototype to avoid an error. */ | |
3896 | /* We use char because int might match the return type of a gcc2 | |
3897 | builtin and then its argument prototype would still apply. */ | |
3898 | char bindtextdomain(); | |
3899 | ||
3900 | int main() { | |
3901 | bindtextdomain() | |
3902 | ; return 0; } | |
3903 | EOF | |
44be4397 | 3904 | if { (eval echo configure:3905: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
48401fcf TT |
3905 | rm -rf conftest* |
3906 | eval "ac_cv_lib_$ac_lib_var=yes" | |
3907 | else | |
3908 | echo "configure: failed program was:" >&5 | |
3909 | cat conftest.$ac_ext >&5 | |
3910 | rm -rf conftest* | |
3911 | eval "ac_cv_lib_$ac_lib_var=no" | |
3912 | fi | |
3913 | rm -f conftest* | |
3914 | LIBS="$ac_save_LIBS" | |
3915 | ||
3916 | fi | |
3917 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
3918 | echo "$ac_t""yes" 1>&6 | |
3919 | echo $ac_n "checking for gettext in libintl""... $ac_c" 1>&6 | |
44be4397 | 3920 | echo "configure:3921: checking for gettext in libintl" >&5 |
48401fcf TT |
3921 | if eval "test \"`echo '$''{'gt_cv_func_gettext_libintl'+set}'`\" = set"; then |
3922 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3923 | else | |
3924 | cat > conftest.$ac_ext <<EOF | |
44be4397 | 3925 | #line 3926 "configure" |
48401fcf TT |
3926 | #include "confdefs.h" |
3927 | ||
3928 | int main() { | |
3929 | return (int) gettext ("") | |
3930 | ; return 0; } | |
3931 | EOF | |
44be4397 | 3932 | if { (eval echo configure:3933: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
48401fcf TT |
3933 | rm -rf conftest* |
3934 | gt_cv_func_gettext_libintl=yes | |
3935 | else | |
3936 | echo "configure: failed program was:" >&5 | |
3937 | cat conftest.$ac_ext >&5 | |
3938 | rm -rf conftest* | |
3939 | gt_cv_func_gettext_libintl=no | |
3940 | fi | |
3941 | rm -f conftest* | |
3942 | fi | |
3943 | ||
3944 | echo "$ac_t""$gt_cv_func_gettext_libintl" 1>&6 | |
3945 | else | |
3946 | echo "$ac_t""no" 1>&6 | |
3947 | fi | |
3948 | ||
3949 | fi | |
3950 | ||
3951 | if test "$gt_cv_func_gettext_libc" = "yes" \ | |
3952 | || test "$gt_cv_func_gettext_libintl" = "yes"; then | |
3953 | cat >> confdefs.h <<\EOF | |
3954 | #define HAVE_GETTEXT 1 | |
3955 | EOF | |
3956 | ||
3957 | # Extract the first word of "msgfmt", so it can be a program name with args. | |
3958 | set dummy msgfmt; ac_word=$2 | |
3959 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
44be4397 | 3960 | echo "configure:3961: checking for $ac_word" >&5 |
48401fcf TT |
3961 | if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then |
3962 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3963 | else | |
3964 | case "$MSGFMT" in | |
3965 | /*) | |
3966 | ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path. | |
3967 | ;; | |
3968 | *) | |
3969 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
3970 | for ac_dir in $PATH; do | |
3971 | test -z "$ac_dir" && ac_dir=. | |
3972 | if test -f $ac_dir/$ac_word; then | |
3973 | if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then | |
3974 | ac_cv_path_MSGFMT="$ac_dir/$ac_word" | |
3975 | break | |
3976 | fi | |
3977 | fi | |
3978 | done | |
3979 | IFS="$ac_save_ifs" | |
3980 | test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="no" | |
3981 | ;; | |
3982 | esac | |
3983 | fi | |
3984 | MSGFMT="$ac_cv_path_MSGFMT" | |
3985 | if test -n "$MSGFMT"; then | |
3986 | echo "$ac_t""$MSGFMT" 1>&6 | |
3987 | else | |
3988 | echo "$ac_t""no" 1>&6 | |
3989 | fi | |
3990 | if test "$MSGFMT" != "no"; then | |
3991 | for ac_func in dcgettext | |
3992 | do | |
3993 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
44be4397 | 3994 | echo "configure:3995: checking for $ac_func" >&5 |
48401fcf TT |
3995 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
3996 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3997 | else | |
3998 | cat > conftest.$ac_ext <<EOF | |
44be4397 | 3999 | #line 4000 "configure" |
48401fcf TT |
4000 | #include "confdefs.h" |
4001 | /* System header to define __stub macros and hopefully few prototypes, | |
4002 | which can conflict with char $ac_func(); below. */ | |
4003 | #include <assert.h> | |
4004 | /* Override any gcc2 internal prototype to avoid an error. */ | |
4005 | /* We use char because int might match the return type of a gcc2 | |
4006 | builtin and then its argument prototype would still apply. */ | |
4007 | char $ac_func(); | |
4008 | ||
4009 | int main() { | |
4010 | ||
4011 | /* The GNU C library defines this for functions which it implements | |
4012 | to always fail with ENOSYS. Some functions are actually named | |
4013 | something starting with __ and the normal name is an alias. */ | |
4014 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
4015 | choke me | |
4016 | #else | |
4017 | $ac_func(); | |
4018 | #endif | |
4019 | ||
4020 | ; return 0; } | |
4021 | EOF | |
44be4397 | 4022 | if { (eval echo configure:4023: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
48401fcf TT |
4023 | rm -rf conftest* |
4024 | eval "ac_cv_func_$ac_func=yes" | |
4025 | else | |
4026 | echo "configure: failed program was:" >&5 | |
4027 | cat conftest.$ac_ext >&5 | |
4028 | rm -rf conftest* | |
4029 | eval "ac_cv_func_$ac_func=no" | |
4030 | fi | |
4031 | rm -f conftest* | |
4032 | fi | |
4033 | ||
4034 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
4035 | echo "$ac_t""yes" 1>&6 | |
4036 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
4037 | cat >> confdefs.h <<EOF | |
4038 | #define $ac_tr_func 1 | |
4039 | EOF | |
4040 | ||
4041 | else | |
4042 | echo "$ac_t""no" 1>&6 | |
4043 | fi | |
4044 | done | |
4045 | ||
4046 | # Extract the first word of "gmsgfmt", so it can be a program name with args. | |
4047 | set dummy gmsgfmt; ac_word=$2 | |
4048 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
44be4397 | 4049 | echo "configure:4050: checking for $ac_word" >&5 |
48401fcf TT |
4050 | if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then |
4051 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4052 | else | |
4053 | case "$GMSGFMT" in | |
4054 | /*) | |
4055 | ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path. | |
4056 | ;; | |
4057 | ?:/*) | |
4058 | ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path. | |
4059 | ;; | |
4060 | *) | |
a1624e3f | 4061 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
352b0f4d | 4062 | for ac_dir in $PATH; do |
48401fcf TT |
4063 | test -z "$ac_dir" && ac_dir=. |
4064 | if test -f $ac_dir/$ac_word; then | |
4065 | ac_cv_path_GMSGFMT="$ac_dir/$ac_word" | |
4066 | break | |
4067 | fi | |
4068 | done | |
4069 | IFS="$ac_save_ifs" | |
4070 | test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT" | |
4071 | ;; | |
4072 | esac | |
4073 | fi | |
4074 | GMSGFMT="$ac_cv_path_GMSGFMT" | |
4075 | if test -n "$GMSGFMT"; then | |
4076 | echo "$ac_t""$GMSGFMT" 1>&6 | |
4077 | else | |
4078 | echo "$ac_t""no" 1>&6 | |
4079 | fi | |
4080 | ||
4081 | # Extract the first word of "xgettext", so it can be a program name with args. | |
4082 | set dummy xgettext; ac_word=$2 | |
4083 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
44be4397 | 4084 | echo "configure:4085: checking for $ac_word" >&5 |
48401fcf TT |
4085 | if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then |
4086 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4087 | else | |
4088 | case "$XGETTEXT" in | |
4089 | /*) | |
4090 | ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path. | |
4091 | ;; | |
4092 | *) | |
4093 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
4094 | for ac_dir in $PATH; do | |
4095 | test -z "$ac_dir" && ac_dir=. | |
4096 | if test -f $ac_dir/$ac_word; then | |
4097 | if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then | |
4098 | ac_cv_path_XGETTEXT="$ac_dir/$ac_word" | |
4099 | break | |
4100 | fi | |
4101 | fi | |
4102 | done | |
4103 | IFS="$ac_save_ifs" | |
4104 | test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":" | |
4105 | ;; | |
4106 | esac | |
4107 | fi | |
4108 | XGETTEXT="$ac_cv_path_XGETTEXT" | |
4109 | if test -n "$XGETTEXT"; then | |
4110 | echo "$ac_t""$XGETTEXT" 1>&6 | |
4111 | else | |
4112 | echo "$ac_t""no" 1>&6 | |
4113 | fi | |
4114 | ||
4115 | cat > conftest.$ac_ext <<EOF | |
44be4397 | 4116 | #line 4117 "configure" |
48401fcf TT |
4117 | #include "confdefs.h" |
4118 | ||
4119 | int main() { | |
4120 | extern int _nl_msg_cat_cntr; | |
4121 | return _nl_msg_cat_cntr | |
4122 | ; return 0; } | |
4123 | EOF | |
44be4397 | 4124 | if { (eval echo configure:4125: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
48401fcf TT |
4125 | rm -rf conftest* |
4126 | CATOBJEXT=.gmo | |
4127 | DATADIRNAME=share | |
4128 | else | |
4129 | echo "configure: failed program was:" >&5 | |
4130 | cat conftest.$ac_ext >&5 | |
4131 | rm -rf conftest* | |
4132 | CATOBJEXT=.mo | |
4133 | DATADIRNAME=lib | |
4134 | fi | |
4135 | rm -f conftest* | |
4136 | INSTOBJEXT=.mo | |
4137 | fi | |
4138 | fi | |
4139 | ||
4140 | else | |
4141 | echo "$ac_t""no" 1>&6 | |
4142 | fi | |
4143 | ||
4144 | ||
4145 | ||
4146 | if test "$CATOBJEXT" = "NONE"; then | |
4147 | nls_cv_use_gnu_gettext=yes | |
4148 | fi | |
4149 | fi | |
4150 | ||
4151 | if test "$nls_cv_use_gnu_gettext" = "yes"; then | |
4152 | INTLOBJS="\$(GETTOBJS)" | |
4153 | # Extract the first word of "msgfmt", so it can be a program name with args. | |
4154 | set dummy msgfmt; ac_word=$2 | |
4155 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
44be4397 | 4156 | echo "configure:4157: checking for $ac_word" >&5 |
48401fcf TT |
4157 | if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then |
4158 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4159 | else | |
4160 | case "$MSGFMT" in | |
4161 | /*) | |
4162 | ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path. | |
4163 | ;; | |
4164 | *) | |
4165 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
4166 | for ac_dir in $PATH; do | |
4167 | test -z "$ac_dir" && ac_dir=. | |
4168 | if test -f $ac_dir/$ac_word; then | |
4169 | if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then | |
4170 | ac_cv_path_MSGFMT="$ac_dir/$ac_word" | |
4171 | break | |
4172 | fi | |
4173 | fi | |
4174 | done | |
4175 | IFS="$ac_save_ifs" | |
4176 | test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="msgfmt" | |
4177 | ;; | |
4178 | esac | |
4179 | fi | |
4180 | MSGFMT="$ac_cv_path_MSGFMT" | |
4181 | if test -n "$MSGFMT"; then | |
4182 | echo "$ac_t""$MSGFMT" 1>&6 | |
4183 | else | |
4184 | echo "$ac_t""no" 1>&6 | |
4185 | fi | |
4186 | ||
4187 | # Extract the first word of "gmsgfmt", so it can be a program name with args. | |
4188 | set dummy gmsgfmt; ac_word=$2 | |
4189 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
44be4397 | 4190 | echo "configure:4191: checking for $ac_word" >&5 |
48401fcf TT |
4191 | if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then |
4192 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4193 | else | |
4194 | case "$GMSGFMT" in | |
4195 | /*) | |
4196 | ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path. | |
4197 | ;; | |
4198 | ?:/*) | |
4199 | ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path. | |
4200 | ;; | |
4201 | *) | |
a1624e3f | 4202 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
352b0f4d | 4203 | for ac_dir in $PATH; do |
48401fcf TT |
4204 | test -z "$ac_dir" && ac_dir=. |
4205 | if test -f $ac_dir/$ac_word; then | |
4206 | ac_cv_path_GMSGFMT="$ac_dir/$ac_word" | |
4207 | break | |
4208 | fi | |
4209 | done | |
4210 | IFS="$ac_save_ifs" | |
4211 | test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT" | |
4212 | ;; | |
4213 | esac | |
4214 | fi | |
4215 | GMSGFMT="$ac_cv_path_GMSGFMT" | |
4216 | if test -n "$GMSGFMT"; then | |
4217 | echo "$ac_t""$GMSGFMT" 1>&6 | |
4218 | else | |
4219 | echo "$ac_t""no" 1>&6 | |
4220 | fi | |
4221 | ||
4222 | # Extract the first word of "xgettext", so it can be a program name with args. | |
4223 | set dummy xgettext; ac_word=$2 | |
4224 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
44be4397 | 4225 | echo "configure:4226: checking for $ac_word" >&5 |
48401fcf TT |
4226 | if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then |
4227 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4228 | else | |
4229 | case "$XGETTEXT" in | |
4230 | /*) | |
4231 | ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path. | |
4232 | ;; | |
4233 | *) | |
4234 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
4235 | for ac_dir in $PATH; do | |
4236 | test -z "$ac_dir" && ac_dir=. | |
4237 | if test -f $ac_dir/$ac_word; then | |
4238 | if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then | |
4239 | ac_cv_path_XGETTEXT="$ac_dir/$ac_word" | |
4240 | break | |
4241 | fi | |
4242 | fi | |
4243 | done | |
4244 | IFS="$ac_save_ifs" | |
4245 | test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":" | |
4246 | ;; | |
4247 | esac | |
4248 | fi | |
4249 | XGETTEXT="$ac_cv_path_XGETTEXT" | |
4250 | if test -n "$XGETTEXT"; then | |
4251 | echo "$ac_t""$XGETTEXT" 1>&6 | |
4252 | else | |
4253 | echo "$ac_t""no" 1>&6 | |
4254 | fi | |
4255 | ||
4256 | ||
4257 | USE_INCLUDED_LIBINTL=yes | |
4258 | CATOBJEXT=.gmo | |
4259 | INSTOBJEXT=.mo | |
4260 | DATADIRNAME=share | |
4261 | INTLDEPS='$(top_builddir)/../intl/libintl.a' | |
4262 | INTLLIBS=$INTLDEPS | |
4263 | LIBS=`echo $LIBS | sed -e 's/-lintl//'` | |
4264 | nls_cv_header_intl=libintl.h | |
4265 | nls_cv_header_libgt=libgettext.h | |
4266 | fi | |
4267 | ||
4268 | if test "$XGETTEXT" != ":"; then | |
4269 | if $XGETTEXT --omit-header /dev/null 2> /dev/null; then | |
4270 | : ; | |
4271 | else | |
4272 | echo "$ac_t""found xgettext programs is not GNU xgettext; ignore it" 1>&6 | |
4273 | XGETTEXT=":" | |
4274 | fi | |
4275 | fi | |
4276 | ||
4277 | # We need to process the po/ directory. | |
4278 | POSUB=po | |
4279 | else | |
4280 | DATADIRNAME=share | |
4281 | nls_cv_header_intl=libintl.h | |
4282 | nls_cv_header_libgt=libgettext.h | |
4283 | fi | |
4284 | ||
4285 | # If this is used in GNU gettext we have to set USE_NLS to `yes' | |
4286 | # because some of the sources are only built for this goal. | |
4287 | if test "$PACKAGE" = gettext; then | |
4288 | USE_NLS=yes | |
4289 | USE_INCLUDED_LIBINTL=yes | |
4290 | fi | |
4291 | ||
4292 | for lang in $ALL_LINGUAS; do | |
4293 | GMOFILES="$GMOFILES $lang.gmo" | |
4294 | POFILES="$POFILES $lang.po" | |
4295 | done | |
4296 | ||
4297 | ||
4298 | ||
4299 | ||
4300 | ||
4301 | ||
4302 | ||
4303 | ||
4304 | ||
4305 | ||
4306 | ||
4307 | ||
4308 | ||
4309 | ||
4310 | if test "x$CATOBJEXT" != "x"; then | |
4311 | if test "x$ALL_LINGUAS" = "x"; then | |
4312 | LINGUAS= | |
4313 | else | |
4314 | echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6 | |
44be4397 | 4315 | echo "configure:4316: checking for catalogs to be installed" >&5 |
48401fcf TT |
4316 | NEW_LINGUAS= |
4317 | for lang in ${LINGUAS=$ALL_LINGUAS}; do | |
4318 | case "$ALL_LINGUAS" in | |
4319 | *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;; | |
4320 | esac | |
4321 | done | |
4322 | LINGUAS=$NEW_LINGUAS | |
4323 | echo "$ac_t""$LINGUAS" 1>&6 | |
4324 | fi | |
4325 | ||
4326 | if test -n "$LINGUAS"; then | |
4327 | for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done | |
4328 | fi | |
4329 | fi | |
4330 | ||
4331 | if test $ac_cv_header_locale_h = yes; then | |
4332 | INCLUDE_LOCALE_H="#include <locale.h>" | |
4333 | else | |
4334 | INCLUDE_LOCALE_H="\ | |
4335 | /* The system does not provide the header <locale.h>. Take care yourself. */" | |
4336 | fi | |
4337 | ||
4338 | ||
4339 | if test -f $srcdir/po2tbl.sed.in; then | |
4340 | if test "$CATOBJEXT" = ".cat"; then | |
4341 | ac_safe=`echo "linux/version.h" | sed 'y%./+-%__p_%'` | |
4342 | echo $ac_n "checking for linux/version.h""... $ac_c" 1>&6 | |
44be4397 | 4343 | echo "configure:4344: checking for linux/version.h" >&5 |
48401fcf TT |
4344 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4345 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4346 | else | |
4347 | cat > conftest.$ac_ext <<EOF | |
44be4397 | 4348 | #line 4349 "configure" |
48401fcf TT |
4349 | #include "confdefs.h" |
4350 | #include <linux/version.h> | |
4351 | EOF | |
4352 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
44be4397 | 4353 | { (eval echo configure:4354: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
a1624e3f | 4354 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
48401fcf TT |
4355 | if test -z "$ac_err"; then |
4356 | rm -rf conftest* | |
4357 | eval "ac_cv_header_$ac_safe=yes" | |
4358 | else | |
4359 | echo "$ac_err" >&5 | |
4360 | echo "configure: failed program was:" >&5 | |
4361 | cat conftest.$ac_ext >&5 | |
4362 | rm -rf conftest* | |
4363 | eval "ac_cv_header_$ac_safe=no" | |
4364 | fi | |
4365 | rm -f conftest* | |
4366 | fi | |
4367 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4368 | echo "$ac_t""yes" 1>&6 | |
4369 | msgformat=linux | |
4370 | else | |
4371 | echo "$ac_t""no" 1>&6 | |
4372 | msgformat=xopen | |
4373 | fi | |
4374 | ||
4375 | ||
4376 | sed -e '/^#/d' $srcdir/$msgformat-msg.sed > po2msg.sed | |
4377 | fi | |
4378 | sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \ | |
4379 | $srcdir/po2tbl.sed.in > po2tbl.sed | |
4380 | fi | |
4381 | ||
4382 | if test "$PACKAGE" = "gettext"; then | |
4383 | GT_NO="#NO#" | |
4384 | GT_YES= | |
4385 | else | |
4386 | GT_NO= | |
4387 | GT_YES="#YES#" | |
4388 | fi | |
4389 | ||
4390 | ||
4391 | ||
4392 | MKINSTALLDIRS="\$(srcdir)/../../mkinstalldirs" | |
4393 | ||
4394 | ||
4395 | l= | |
4396 | ||
4397 | ||
4398 | if test -d $srcdir/po; then | |
4399 | test -d po || mkdir po | |
4400 | if test "x$srcdir" != "x."; then | |
4401 | if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then | |
4402 | posrcprefix="$srcdir/" | |
4403 | else | |
4404 | posrcprefix="../$srcdir/" | |
4405 | fi | |
4406 | else | |
4407 | posrcprefix="../" | |
4408 | fi | |
4409 | rm -f po/POTFILES | |
4410 | sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \ | |
4411 | < $srcdir/po/POTFILES.in > po/POTFILES | |
4412 | fi | |
4413 | ||
4414 | ||
4415 | echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6 | |
44be4397 | 4416 | echo "configure:4417: checking whether to enable maintainer-specific portions of Makefiles" >&5 |
48401fcf TT |
4417 | # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given. |
4418 | if test "${enable_maintainer_mode+set}" = set; then | |
4419 | enableval="$enable_maintainer_mode" | |
4420 | USE_MAINTAINER_MODE=$enableval | |
4421 | else | |
4422 | USE_MAINTAINER_MODE=no | |
4423 | fi | |
4424 | ||
4425 | echo "$ac_t""$USE_MAINTAINER_MODE" 1>&6 | |
4426 | if test $USE_MAINTAINER_MODE = yes; then | |
4427 | MAINT= | |
4428 | else | |
4429 | MAINT='#M#' | |
4430 | fi | |
4431 | ||
4432 | ||
4433 | echo $ac_n "checking for Cygwin32 environment""... $ac_c" 1>&6 | |
44be4397 | 4434 | echo "configure:4435: checking for Cygwin32 environment" >&5 |
48401fcf TT |
4435 | if eval "test \"`echo '$''{'am_cv_cygwin32'+set}'`\" = set"; then |
4436 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4437 | else | |
4438 | cat > conftest.$ac_ext <<EOF | |
44be4397 | 4439 | #line 4440 "configure" |
48401fcf TT |
4440 | #include "confdefs.h" |
4441 | ||
4442 | int main() { | |
4443 | return __CYGWIN32__; | |
4444 | ; return 0; } | |
4445 | EOF | |
44be4397 | 4446 | if { (eval echo configure:4447: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
48401fcf TT |
4447 | rm -rf conftest* |
4448 | am_cv_cygwin32=yes | |
4449 | else | |
4450 | echo "configure: failed program was:" >&5 | |
4451 | cat conftest.$ac_ext >&5 | |
4452 | rm -rf conftest* | |
4453 | am_cv_cygwin32=no | |
4454 | fi | |
4455 | rm -f conftest* | |
4456 | rm -f conftest* | |
4457 | fi | |
4458 | ||
4459 | echo "$ac_t""$am_cv_cygwin32" 1>&6 | |
4460 | CYGWIN32= | |
4461 | test "$am_cv_cygwin32" = yes && CYGWIN32=yes | |
44be4397 ILT |
4462 | echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6 |
4463 | echo "configure:4464: checking for Cygwin environment" >&5 | |
4464 | if eval "test \"`echo '$''{'am_cv_cygwin'+set}'`\" = set"; then | |
4465 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4466 | else | |
4467 | cat > conftest.$ac_ext <<EOF | |
4468 | #line 4469 "configure" | |
4469 | #include "confdefs.h" | |
4470 | ||
4471 | int main() { | |
4472 | return __CYGWIN32__; | |
4473 | ; return 0; } | |
4474 | EOF | |
4475 | if { (eval echo configure:4476: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then | |
4476 | rm -rf conftest* | |
4477 | am_cv_cygwin=yes | |
4478 | else | |
4479 | echo "configure: failed program was:" >&5 | |
4480 | cat conftest.$ac_ext >&5 | |
4481 | rm -rf conftest* | |
4482 | am_cv_cygwin=no | |
4483 | fi | |
4484 | rm -f conftest* | |
4485 | rm -f conftest* | |
4486 | fi | |
4487 | ||
4488 | echo "$ac_t""$am_cv_cygwin" 1>&6 | |
4489 | CYGWIN= | |
4490 | test "$am_cv_cygwin" = yes && CYGWIN=yes | |
48401fcf | 4491 | echo $ac_n "checking for Mingw32 environment""... $ac_c" 1>&6 |
44be4397 | 4492 | echo "configure:4493: checking for Mingw32 environment" >&5 |
48401fcf TT |
4493 | if eval "test \"`echo '$''{'am_cv_mingw32'+set}'`\" = set"; then |
4494 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4495 | else | |
4496 | cat > conftest.$ac_ext <<EOF | |
44be4397 | 4497 | #line 4498 "configure" |
48401fcf TT |
4498 | #include "confdefs.h" |
4499 | ||
4500 | int main() { | |
4501 | return __MINGW32__; | |
4502 | ; return 0; } | |
4503 | EOF | |
44be4397 | 4504 | if { (eval echo configure:4505: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
48401fcf TT |
4505 | rm -rf conftest* |
4506 | am_cv_mingw32=yes | |
4507 | else | |
4508 | echo "configure: failed program was:" >&5 | |
4509 | cat conftest.$ac_ext >&5 | |
4510 | rm -rf conftest* | |
4511 | am_cv_mingw32=no | |
4512 | fi | |
4513 | rm -f conftest* | |
4514 | rm -f conftest* | |
4515 | fi | |
4516 | ||
4517 | echo "$ac_t""$am_cv_mingw32" 1>&6 | |
4518 | MINGW32= | |
4519 | test "$am_cv_mingw32" = yes && MINGW32=yes | |
4520 | ||
4521 | ||
4522 | echo $ac_n "checking for executable suffix""... $ac_c" 1>&6 | |
44be4397 | 4523 | echo "configure:4524: checking for executable suffix" >&5 |
48401fcf TT |
4524 | if eval "test \"`echo '$''{'am_cv_exeext'+set}'`\" = set"; then |
4525 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4526 | else | |
44be4397 | 4527 | if test "$CYGWIN" = yes || test "$MINGW32" = yes; then |
48401fcf TT |
4528 | am_cv_exeext=.exe |
4529 | else | |
4530 | cat > am_c_test.c << 'EOF' | |
4531 | int main() { | |
4532 | /* Nothing needed here */ | |
4533 | } | |
4534 | EOF | |
4535 | ${CC-cc} -o am_c_test $CFLAGS $CPPFLAGS $LDFLAGS am_c_test.c $LIBS 1>&5 | |
4536 | am_cv_exeext= | |
4537 | for file in am_c_test.*; do | |
4538 | case $file in | |
4539 | *.c) ;; | |
4540 | *.o) ;; | |
4541 | *) am_cv_exeext=`echo $file | sed -e s/am_c_test//` ;; | |
4542 | esac | |
4543 | done | |
4544 | rm -f am_c_test* | |
4545 | fi | |
4546 | ||
4547 | test x"${am_cv_exeext}" = x && am_cv_exeext=no | |
4548 | fi | |
4549 | EXEEXT="" | |
4550 | test x"${am_cv_exeext}" != xno && EXEEXT=${am_cv_exeext} | |
4551 | echo "$ac_t""${am_cv_exeext}" 1>&6 | |
4552 | ||
4553 | ||
4554 | for ac_hdr in string.h stdlib.h memory.h strings.h unistd.h stdarg.h varargs.h errno.h sys/types.h | |
4555 | do | |
4556 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4557 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
44be4397 | 4558 | echo "configure:4559: checking for $ac_hdr" >&5 |
48401fcf TT |
4559 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4560 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4561 | else | |
4562 | cat > conftest.$ac_ext <<EOF | |
44be4397 | 4563 | #line 4564 "configure" |
48401fcf TT |
4564 | #include "confdefs.h" |
4565 | #include <$ac_hdr> | |
4566 | EOF | |
4567 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
44be4397 | 4568 | { (eval echo configure:4569: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
a1624e3f | 4569 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
48401fcf TT |
4570 | if test -z "$ac_err"; then |
4571 | rm -rf conftest* | |
4572 | eval "ac_cv_header_$ac_safe=yes" | |
4573 | else | |
4574 | echo "$ac_err" >&5 | |
4575 | echo "configure: failed program was:" >&5 | |
4576 | cat conftest.$ac_ext >&5 | |
4577 | rm -rf conftest* | |
4578 | eval "ac_cv_header_$ac_safe=no" | |
4579 | fi | |
4580 | rm -f conftest* | |
4581 | fi | |
4582 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4583 | echo "$ac_t""yes" 1>&6 | |
4584 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4585 | cat >> confdefs.h <<EOF | |
4586 | #define $ac_tr_hdr 1 | |
4587 | EOF | |
4588 | ||
4589 | else | |
4590 | echo "$ac_t""no" 1>&6 | |
4591 | fi | |
4592 | done | |
4593 | ||
4594 | ||
4595 | # Put this here so that autoconf's "cross-compiling" message doesn't confuse | |
4596 | # people who are not cross-compiling but are compiling cross-assemblers. | |
4597 | echo $ac_n "checking whether compiling a cross-assembler""... $ac_c" 1>&6 | |
44be4397 | 4598 | echo "configure:4599: checking whether compiling a cross-assembler" >&5 |
48401fcf TT |
4599 | if test "${host}" = "${target}"; then |
4600 | cross_gas=no | |
4601 | else | |
4602 | cross_gas=yes | |
4603 | cat >> confdefs.h <<\EOF | |
4604 | #define CROSS_COMPILE 1 | |
4605 | EOF | |
4606 | ||
4607 | fi | |
4608 | echo "$ac_t""$cross_gas" 1>&6 | |
4609 | ||
4610 | # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works | |
4611 | # for constant arguments. Useless! | |
4612 | echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6 | |
44be4397 | 4613 | echo "configure:4614: checking for working alloca.h" >&5 |
48401fcf TT |
4614 | if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then |
4615 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4616 | else | |
4617 | cat > conftest.$ac_ext <<EOF | |
44be4397 | 4618 | #line 4619 "configure" |
48401fcf TT |
4619 | #include "confdefs.h" |
4620 | #include <alloca.h> | |
4621 | int main() { | |
4622 | char *p = alloca(2 * sizeof(int)); | |
4623 | ; return 0; } | |
4624 | EOF | |
44be4397 | 4625 | if { (eval echo configure:4626: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
48401fcf TT |
4626 | rm -rf conftest* |
4627 | ac_cv_header_alloca_h=yes | |
4628 | else | |
4629 | echo "configure: failed program was:" >&5 | |
4630 | cat conftest.$ac_ext >&5 | |
4631 | rm -rf conftest* | |
4632 | ac_cv_header_alloca_h=no | |
4633 | fi | |
4634 | rm -f conftest* | |
4635 | fi | |
4636 | ||
4637 | echo "$ac_t""$ac_cv_header_alloca_h" 1>&6 | |
4638 | if test $ac_cv_header_alloca_h = yes; then | |
4639 | cat >> confdefs.h <<\EOF | |
4640 | #define HAVE_ALLOCA_H 1 | |
4641 | EOF | |
4642 | ||
4643 | fi | |
4644 | ||
4645 | echo $ac_n "checking for alloca""... $ac_c" 1>&6 | |
44be4397 | 4646 | echo "configure:4647: checking for alloca" >&5 |
48401fcf TT |
4647 | if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then |
4648 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4649 | else | |
4650 | cat > conftest.$ac_ext <<EOF | |
44be4397 | 4651 | #line 4652 "configure" |
48401fcf TT |
4652 | #include "confdefs.h" |
4653 | ||
4654 | #ifdef __GNUC__ | |
4655 | # define alloca __builtin_alloca | |
4656 | #else | |
a1624e3f RH |
4657 | # ifdef _MSC_VER |
4658 | # include <malloc.h> | |
4659 | # define alloca _alloca | |
48401fcf | 4660 | # else |
a1624e3f RH |
4661 | # if HAVE_ALLOCA_H |
4662 | # include <alloca.h> | |
603e9cf1 | 4663 | # else |
a1624e3f RH |
4664 | # ifdef _AIX |
4665 | #pragma alloca | |
4666 | # else | |
4667 | # ifndef alloca /* predefined by HP cc +Olibcalls */ | |
48401fcf | 4668 | char *alloca (); |
a1624e3f | 4669 | # endif |
48401fcf TT |
4670 | # endif |
4671 | # endif | |
4672 | # endif | |
4673 | #endif | |
4674 | ||
4675 | int main() { | |
4676 | char *p = (char *) alloca(1); | |
4677 | ; return 0; } | |
4678 | EOF | |
44be4397 | 4679 | if { (eval echo configure:4680: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
48401fcf TT |
4680 | rm -rf conftest* |
4681 | ac_cv_func_alloca_works=yes | |
4682 | else | |
4683 | echo "configure: failed program was:" >&5 | |
4684 | cat conftest.$ac_ext >&5 | |
4685 | rm -rf conftest* | |
4686 | ac_cv_func_alloca_works=no | |
4687 | fi | |
4688 | rm -f conftest* | |
4689 | fi | |
4690 | ||
4691 | echo "$ac_t""$ac_cv_func_alloca_works" 1>&6 | |
4692 | if test $ac_cv_func_alloca_works = yes; then | |
4693 | cat >> confdefs.h <<\EOF | |
4694 | #define HAVE_ALLOCA 1 | |
4695 | EOF | |
4696 | ||
4697 | fi | |
4698 | ||
4699 | if test $ac_cv_func_alloca_works = no; then | |
4700 | # The SVR3 libPW and SVR4 libucb both contain incompatible functions | |
4701 | # that cause trouble. Some versions do not even contain alloca or | |
4702 | # contain a buggy version. If you still want to use their alloca, | |
4703 | # use ar to extract alloca.o from them instead of compiling alloca.c. | |
a1624e3f | 4704 | ALLOCA=alloca.${ac_objext} |
48401fcf TT |
4705 | cat >> confdefs.h <<\EOF |
4706 | #define C_ALLOCA 1 | |
4707 | EOF | |
4708 | ||
4709 | ||
4710 | echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6 | |
44be4397 | 4711 | echo "configure:4712: checking whether alloca needs Cray hooks" >&5 |
48401fcf TT |
4712 | if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then |
4713 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4714 | else | |
4715 | cat > conftest.$ac_ext <<EOF | |
44be4397 | 4716 | #line 4717 "configure" |
48401fcf TT |
4717 | #include "confdefs.h" |
4718 | #if defined(CRAY) && ! defined(CRAY2) | |
4719 | webecray | |
4720 | #else | |
4721 | wenotbecray | |
4722 | #endif | |
4723 | ||
4724 | EOF | |
4725 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
4726 | egrep "webecray" >/dev/null 2>&1; then | |
4727 | rm -rf conftest* | |
4728 | ac_cv_os_cray=yes | |
4729 | else | |
4730 | rm -rf conftest* | |
4731 | ac_cv_os_cray=no | |
4732 | fi | |
4733 | rm -f conftest* | |
4734 | ||
4735 | fi | |
4736 | ||
4737 | echo "$ac_t""$ac_cv_os_cray" 1>&6 | |
4738 | if test $ac_cv_os_cray = yes; then | |
4739 | for ac_func in _getb67 GETB67 getb67; do | |
4740 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
44be4397 | 4741 | echo "configure:4742: checking for $ac_func" >&5 |
48401fcf TT |
4742 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
4743 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4744 | else | |
4745 | cat > conftest.$ac_ext <<EOF | |
44be4397 | 4746 | #line 4747 "configure" |
48401fcf TT |
4747 | #include "confdefs.h" |
4748 | /* System header to define __stub macros and hopefully few prototypes, | |
4749 | which can conflict with char $ac_func(); below. */ | |
4750 | #include <assert.h> | |
4751 | /* Override any gcc2 internal prototype to avoid an error. */ | |
4752 | /* We use char because int might match the return type of a gcc2 | |
4753 | builtin and then its argument prototype would still apply. */ | |
4754 | char $ac_func(); | |
4755 | ||
4756 | int main() { | |
4757 | ||
4758 | /* The GNU C library defines this for functions which it implements | |
4759 | to always fail with ENOSYS. Some functions are actually named | |
4760 | something starting with __ and the normal name is an alias. */ | |
4761 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
4762 | choke me | |
4763 | #else | |
4764 | $ac_func(); | |
4765 | #endif | |
4766 | ||
4767 | ; return 0; } | |
4768 | EOF | |
44be4397 | 4769 | if { (eval echo configure:4770: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
48401fcf TT |
4770 | rm -rf conftest* |
4771 | eval "ac_cv_func_$ac_func=yes" | |
4772 | else | |
4773 | echo "configure: failed program was:" >&5 | |
4774 | cat conftest.$ac_ext >&5 | |
4775 | rm -rf conftest* | |
4776 | eval "ac_cv_func_$ac_func=no" | |
4777 | fi | |
4778 | rm -f conftest* | |
4779 | fi | |
4780 | ||
4781 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
4782 | echo "$ac_t""yes" 1>&6 | |
4783 | cat >> confdefs.h <<EOF | |
4784 | #define CRAY_STACKSEG_END $ac_func | |
4785 | EOF | |
4786 | ||
4787 | break | |
4788 | else | |
4789 | echo "$ac_t""no" 1>&6 | |
4790 | fi | |
4791 | ||
4792 | done | |
4793 | fi | |
4794 | ||
4795 | echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6 | |
44be4397 | 4796 | echo "configure:4797: checking stack direction for C alloca" >&5 |
48401fcf TT |
4797 | if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then |
4798 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4799 | else | |
4800 | if test "$cross_compiling" = yes; then | |
4801 | ac_cv_c_stack_direction=0 | |
4802 | else | |
4803 | cat > conftest.$ac_ext <<EOF | |
44be4397 | 4804 | #line 4805 "configure" |
48401fcf TT |
4805 | #include "confdefs.h" |
4806 | find_stack_direction () | |
4807 | { | |
4808 | static char *addr = 0; | |
4809 | auto char dummy; | |
4810 | if (addr == 0) | |
4811 | { | |
4812 | addr = &dummy; | |
4813 | return find_stack_direction (); | |
4814 | } | |
4815 | else | |
4816 | return (&dummy > addr) ? 1 : -1; | |
4817 | } | |
4818 | main () | |
4819 | { | |
4820 | exit (find_stack_direction() < 0); | |
4821 | } | |
4822 | EOF | |
44be4397 | 4823 | if { (eval echo configure:4824: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
48401fcf TT |
4824 | then |
4825 | ac_cv_c_stack_direction=1 | |
4826 | else | |
4827 | echo "configure: failed program was:" >&5 | |
4828 | cat conftest.$ac_ext >&5 | |
4829 | rm -fr conftest* | |
4830 | ac_cv_c_stack_direction=-1 | |
4831 | fi | |
4832 | rm -fr conftest* | |
4833 | fi | |
4834 | ||
4835 | fi | |
4836 | ||
4837 | echo "$ac_t""$ac_cv_c_stack_direction" 1>&6 | |
4838 | cat >> confdefs.h <<EOF | |
4839 | #define STACK_DIRECTION $ac_cv_c_stack_direction | |
4840 | EOF | |
4841 | ||
4842 | fi | |
4843 | ||
4844 | echo $ac_n "checking for inline""... $ac_c" 1>&6 | |
44be4397 | 4845 | echo "configure:4846: checking for inline" >&5 |
48401fcf TT |
4846 | if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then |
4847 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4848 | else | |
4849 | ac_cv_c_inline=no | |
4850 | for ac_kw in inline __inline__ __inline; do | |
4851 | cat > conftest.$ac_ext <<EOF | |
44be4397 | 4852 | #line 4853 "configure" |
48401fcf TT |
4853 | #include "confdefs.h" |
4854 | ||
4855 | int main() { | |
4856 | } $ac_kw foo() { | |
4857 | ; return 0; } | |
4858 | EOF | |
44be4397 | 4859 | if { (eval echo configure:4860: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
48401fcf TT |
4860 | rm -rf conftest* |
4861 | ac_cv_c_inline=$ac_kw; break | |
4862 | else | |
4863 | echo "configure: failed program was:" >&5 | |
4864 | cat conftest.$ac_ext >&5 | |
4865 | fi | |
4866 | rm -f conftest* | |
4867 | done | |
4868 | ||
4869 | fi | |
4870 | ||
4871 | echo "$ac_t""$ac_cv_c_inline" 1>&6 | |
4872 | case "$ac_cv_c_inline" in | |
4873 | inline | yes) ;; | |
4874 | no) cat >> confdefs.h <<\EOF | |
4875 | #define inline | |
4876 | EOF | |
4877 | ;; | |
4878 | *) cat >> confdefs.h <<EOF | |
4879 | #define inline $ac_cv_c_inline | |
4880 | EOF | |
4881 | ;; | |
4882 | esac | |
4883 | ||
4884 | ||
4885 | # VMS doesn't have unlink. | |
4886 | for ac_func in unlink remove | |
4887 | do | |
4888 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
44be4397 | 4889 | echo "configure:4890: checking for $ac_func" >&5 |
48401fcf TT |
4890 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
4891 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4892 | else | |
4893 | cat > conftest.$ac_ext <<EOF | |
44be4397 | 4894 | #line 4895 "configure" |
48401fcf TT |
4895 | #include "confdefs.h" |
4896 | /* System header to define __stub macros and hopefully few prototypes, | |
4897 | which can conflict with char $ac_func(); below. */ | |
4898 | #include <assert.h> | |
4899 | /* Override any gcc2 internal prototype to avoid an error. */ | |
4900 | /* We use char because int might match the return type of a gcc2 | |
4901 | builtin and then its argument prototype would still apply. */ | |
4902 | char $ac_func(); | |
4903 | ||
4904 | int main() { | |
4905 | ||
4906 | /* The GNU C library defines this for functions which it implements | |
4907 | to always fail with ENOSYS. Some functions are actually named | |
4908 | something starting with __ and the normal name is an alias. */ | |
4909 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
4910 | choke me | |
4911 | #else | |
4912 | $ac_func(); | |
4913 | #endif | |
4914 | ||
4915 | ; return 0; } | |
4916 | EOF | |
44be4397 | 4917 | if { (eval echo configure:4918: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
28d3e4a3 | 4918 | rm -rf conftest* |
b9419dd2 | 4919 | eval "ac_cv_func_$ac_func=yes" |
28d3e4a3 | 4920 | else |
c6c7035c MM |
4921 | echo "configure: failed program was:" >&5 |
4922 | cat conftest.$ac_ext >&5 | |
28d3e4a3 | 4923 | rm -rf conftest* |
b9419dd2 | 4924 | eval "ac_cv_func_$ac_func=no" |
28d3e4a3 KR |
4925 | fi |
4926 | rm -f conftest* | |
7d0f8249 | 4927 | fi |
c6c7035c | 4928 | |
b9419dd2 | 4929 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
833c46e1 | 4930 | echo "$ac_t""yes" 1>&6 |
1c9dbb83 | 4931 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
b9419dd2 KR |
4932 | cat >> confdefs.h <<EOF |
4933 | #define $ac_tr_func 1 | |
28d3e4a3 | 4934 | EOF |
b9419dd2 | 4935 | break |
28d3e4a3 | 4936 | else |
833c46e1 | 4937 | echo "$ac_t""no" 1>&6 |
28d3e4a3 | 4938 | fi |
b9419dd2 | 4939 | done |
28d3e4a3 KR |
4940 | |
4941 | ||
e63c594d FF |
4942 | # Some systems don't have sbrk(). |
4943 | for ac_func in sbrk | |
4944 | do | |
4945 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
44be4397 | 4946 | echo "configure:4947: checking for $ac_func" >&5 |
e63c594d FF |
4947 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
4948 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4949 | else | |
4950 | cat > conftest.$ac_ext <<EOF | |
44be4397 | 4951 | #line 4952 "configure" |
e63c594d FF |
4952 | #include "confdefs.h" |
4953 | /* System header to define __stub macros and hopefully few prototypes, | |
4954 | which can conflict with char $ac_func(); below. */ | |
4955 | #include <assert.h> | |
4956 | /* Override any gcc2 internal prototype to avoid an error. */ | |
df586de2 ILT |
4957 | /* We use char because int might match the return type of a gcc2 |
4958 | builtin and then its argument prototype would still apply. */ | |
1c9dbb83 | 4959 | char $ac_func(); |
e63c594d | 4960 | |
c6c7035c | 4961 | int main() { |
e63c594d FF |
4962 | |
4963 | /* The GNU C library defines this for functions which it implements | |
4964 | to always fail with ENOSYS. Some functions are actually named | |
4965 | something starting with __ and the normal name is an alias. */ | |
4966 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
4967 | choke me | |
4968 | #else | |
4969 | $ac_func(); | |
4970 | #endif | |
4971 | ||
4972 | ; return 0; } | |
4973 | EOF | |
44be4397 | 4974 | if { (eval echo configure:4975: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
e63c594d FF |
4975 | rm -rf conftest* |
4976 | eval "ac_cv_func_$ac_func=yes" | |
4977 | else | |
c6c7035c MM |
4978 | echo "configure: failed program was:" >&5 |
4979 | cat conftest.$ac_ext >&5 | |
e63c594d FF |
4980 | rm -rf conftest* |
4981 | eval "ac_cv_func_$ac_func=no" | |
4982 | fi | |
4983 | rm -f conftest* | |
7d0f8249 | 4984 | fi |
c6c7035c | 4985 | |
e63c594d FF |
4986 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
4987 | echo "$ac_t""yes" 1>&6 | |
1c9dbb83 | 4988 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
e63c594d FF |
4989 | cat >> confdefs.h <<EOF |
4990 | #define $ac_tr_func 1 | |
4991 | EOF | |
4992 | ||
4993 | else | |
4994 | echo "$ac_t""no" 1>&6 | |
4995 | fi | |
4996 | done | |
4997 | ||
4998 | ||
b11fb939 KR |
4999 | # Some non-ANSI preprocessors botch requoting inside strings. That's bad |
5000 | # enough, but on some of those systems, the assert macro relies on requoting | |
5001 | # working properly! | |
833c46e1 | 5002 | echo $ac_n "checking for working assert macro""... $ac_c" 1>&6 |
44be4397 | 5003 | echo "configure:5004: checking for working assert macro" >&5 |
833c46e1 KR |
5004 | if eval "test \"`echo '$''{'gas_cv_assert_ok'+set}'`\" = set"; then |
5005 | echo $ac_n "(cached) $ac_c" 1>&6 | |
fb589130 | 5006 | else |
28d3e4a3 | 5007 | cat > conftest.$ac_ext <<EOF |
44be4397 | 5008 | #line 5009 "configure" |
b11fb939 KR |
5009 | #include "confdefs.h" |
5010 | #include <assert.h> | |
5011 | #include <stdio.h> | |
c6c7035c | 5012 | int main() { |
b11fb939 KR |
5013 | |
5014 | /* check for requoting problems */ | |
5015 | static int a, b, c, d; | |
5016 | static char *s; | |
5017 | assert (!strcmp(s, "foo bar baz quux")); | |
5018 | /* check for newline handling */ | |
5019 | assert (a == b | |
5020 | || c == d); | |
5021 | ||
5022 | ; return 0; } | |
5023 | EOF | |
44be4397 | 5024 | if { (eval echo configure:5025: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
fb589130 KR |
5025 | rm -rf conftest* |
5026 | gas_cv_assert_ok=yes | |
b11fb939 | 5027 | else |
c6c7035c MM |
5028 | echo "configure: failed program was:" >&5 |
5029 | cat conftest.$ac_ext >&5 | |
b11fb939 | 5030 | rm -rf conftest* |
fb589130 | 5031 | gas_cv_assert_ok=no |
b11fb939 KR |
5032 | fi |
5033 | rm -f conftest* | |
fb589130 | 5034 | fi |
833c46e1 | 5035 | echo "$ac_t""$gas_cv_assert_ok" 1>&6 |
fb589130 KR |
5036 | test $gas_cv_assert_ok = yes || cat >> confdefs.h <<\EOF |
5037 | #define BROKEN_ASSERT 1 | |
5038 | EOF | |
5039 | ||
b11fb939 | 5040 | |
bf111c9f | 5041 | |
b11fb939 KR |
5042 | # On some systems, the system header files may not declare malloc, realloc, |
5043 | # and free. There are places where gas needs these functions to have been | |
5044 | # declared -- such as when taking their addresses. | |
bf111c9f | 5045 | gas_test_headers=" |
b11fb939 KR |
5046 | #ifdef HAVE_MEMORY_H |
5047 | #include <memory.h> | |
5048 | #endif | |
5049 | #ifdef HAVE_STRING_H | |
5050 | #include <string.h> | |
5cece526 ILT |
5051 | #else |
5052 | #ifdef HAVE_STRINGS_H | |
5053 | #include <strings.h> | |
5054 | #endif | |
b11fb939 KR |
5055 | #endif |
5056 | #ifdef HAVE_STDLIB_H | |
5057 | #include <stdlib.h> | |
5058 | #endif | |
5059 | #ifdef HAVE_UNISTD_H | |
5060 | #include <unistd.h> | |
5061 | #endif | |
bf111c9f | 5062 | " |
b11fb939 | 5063 | |
5cece526 | 5064 | echo $ac_n "checking whether declaration is required for strstr""... $ac_c" 1>&6 |
44be4397 | 5065 | echo "configure:5066: checking whether declaration is required for strstr" >&5 |
5cece526 ILT |
5066 | if eval "test \"`echo '$''{'gas_cv_decl_needed_strstr'+set}'`\" = set"; then |
5067 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5068 | else | |
5069 | cat > conftest.$ac_ext <<EOF | |
44be4397 | 5070 | #line 5071 "configure" |
5cece526 ILT |
5071 | #include "confdefs.h" |
5072 | $gas_test_headers | |
c6c7035c | 5073 | int main() { |
5cece526 ILT |
5074 | |
5075 | typedef char *(*f)(); | |
5076 | f x; | |
5077 | x = (f) strstr; | |
5078 | ||
5079 | ; return 0; } | |
5080 | EOF | |
44be4397 | 5081 | if { (eval echo configure:5082: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
5cece526 ILT |
5082 | rm -rf conftest* |
5083 | gas_cv_decl_needed_strstr=no | |
5084 | else | |
c6c7035c MM |
5085 | echo "configure: failed program was:" >&5 |
5086 | cat conftest.$ac_ext >&5 | |
5cece526 ILT |
5087 | rm -rf conftest* |
5088 | gas_cv_decl_needed_strstr=yes | |
5089 | fi | |
5090 | rm -f conftest* | |
5cece526 ILT |
5091 | fi |
5092 | echo "$ac_t""$gas_cv_decl_needed_strstr" 1>&6 | |
5093 | test $gas_cv_decl_needed_strstr = no || { | |
5094 | cat >> confdefs.h <<\EOF | |
5095 | #define NEED_DECLARATION_STRSTR 1 | |
5096 | EOF | |
5097 | ||
5098 | } | |
5099 | ||
5100 | ||
833c46e1 | 5101 | echo $ac_n "checking whether declaration is required for malloc""... $ac_c" 1>&6 |
44be4397 | 5102 | echo "configure:5103: checking whether declaration is required for malloc" >&5 |
833c46e1 KR |
5103 | if eval "test \"`echo '$''{'gas_cv_decl_needed_malloc'+set}'`\" = set"; then |
5104 | echo $ac_n "(cached) $ac_c" 1>&6 | |
bf111c9f | 5105 | else |
28d3e4a3 | 5106 | cat > conftest.$ac_ext <<EOF |
44be4397 | 5107 | #line 5108 "configure" |
bf111c9f KR |
5108 | #include "confdefs.h" |
5109 | $gas_test_headers | |
c6c7035c | 5110 | int main() { |
b11fb939 | 5111 | |
bf111c9f KR |
5112 | typedef char *(*f)(); |
5113 | f x; | |
5114 | x = (f) malloc; | |
b11fb939 KR |
5115 | |
5116 | ; return 0; } | |
5117 | EOF | |
44be4397 | 5118 | if { (eval echo configure:5119: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
fb589130 | 5119 | rm -rf conftest* |
bf111c9f | 5120 | gas_cv_decl_needed_malloc=no |
b11fb939 | 5121 | else |
c6c7035c MM |
5122 | echo "configure: failed program was:" >&5 |
5123 | cat conftest.$ac_ext >&5 | |
b11fb939 | 5124 | rm -rf conftest* |
bf111c9f | 5125 | gas_cv_decl_needed_malloc=yes |
fb589130 KR |
5126 | fi |
5127 | rm -f conftest* | |
fb589130 | 5128 | fi |
833c46e1 | 5129 | echo "$ac_t""$gas_cv_decl_needed_malloc" 1>&6 |
bf111c9f KR |
5130 | test $gas_cv_decl_needed_malloc = no || { |
5131 | cat >> confdefs.h <<\EOF | |
5132 | #define NEED_DECLARATION_MALLOC 1 | |
b11fb939 KR |
5133 | EOF |
5134 | ||
bf111c9f KR |
5135 | } |
5136 | ||
b11fb939 | 5137 | |
833c46e1 | 5138 | echo $ac_n "checking whether declaration is required for free""... $ac_c" 1>&6 |
44be4397 | 5139 | echo "configure:5140: checking whether declaration is required for free" >&5 |
833c46e1 KR |
5140 | if eval "test \"`echo '$''{'gas_cv_decl_needed_free'+set}'`\" = set"; then |
5141 | echo $ac_n "(cached) $ac_c" 1>&6 | |
fb589130 | 5142 | else |
28d3e4a3 | 5143 | cat > conftest.$ac_ext <<EOF |
44be4397 | 5144 | #line 5145 "configure" |
b11fb939 | 5145 | #include "confdefs.h" |
bf111c9f | 5146 | $gas_test_headers |
c6c7035c | 5147 | int main() { |
b11fb939 | 5148 | |
5f757edc | 5149 | typedef void (*f)(); |
bf111c9f KR |
5150 | f x; |
5151 | x = (f) free; | |
b11fb939 KR |
5152 | |
5153 | ; return 0; } | |
5154 | EOF | |
44be4397 | 5155 | if { (eval echo configure:5156: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
fb589130 | 5156 | rm -rf conftest* |
bf111c9f | 5157 | gas_cv_decl_needed_free=no |
b11fb939 | 5158 | else |
c6c7035c MM |
5159 | echo "configure: failed program was:" >&5 |
5160 | cat conftest.$ac_ext >&5 | |
b11fb939 | 5161 | rm -rf conftest* |
bf111c9f | 5162 | gas_cv_decl_needed_free=yes |
b11fb939 KR |
5163 | fi |
5164 | rm -f conftest* | |
fb589130 | 5165 | fi |
833c46e1 | 5166 | echo "$ac_t""$gas_cv_decl_needed_free" 1>&6 |
bf111c9f KR |
5167 | test $gas_cv_decl_needed_free = no || { |
5168 | cat >> confdefs.h <<\EOF | |
5169 | #define NEED_DECLARATION_FREE 1 | |
fb589130 KR |
5170 | EOF |
5171 | ||
bf111c9f KR |
5172 | } |
5173 | ||
b11fb939 | 5174 | |
5cece526 | 5175 | echo $ac_n "checking whether declaration is required for sbrk""... $ac_c" 1>&6 |
44be4397 | 5176 | echo "configure:5177: checking whether declaration is required for sbrk" >&5 |
5cece526 ILT |
5177 | if eval "test \"`echo '$''{'gas_cv_decl_needed_sbrk'+set}'`\" = set"; then |
5178 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5179 | else | |
5180 | cat > conftest.$ac_ext <<EOF | |
44be4397 | 5181 | #line 5182 "configure" |
5cece526 ILT |
5182 | #include "confdefs.h" |
5183 | $gas_test_headers | |
c6c7035c | 5184 | int main() { |
5cece526 ILT |
5185 | |
5186 | typedef char *(*f)(); | |
5187 | f x; | |
5188 | x = (f) sbrk; | |
5189 | ||
5190 | ; return 0; } | |
5191 | EOF | |
44be4397 | 5192 | if { (eval echo configure:5193: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
5cece526 ILT |
5193 | rm -rf conftest* |
5194 | gas_cv_decl_needed_sbrk=no | |
5195 | else | |
c6c7035c MM |
5196 | echo "configure: failed program was:" >&5 |
5197 | cat conftest.$ac_ext >&5 | |
5cece526 ILT |
5198 | rm -rf conftest* |
5199 | gas_cv_decl_needed_sbrk=yes | |
5200 | fi | |
5201 | rm -f conftest* | |
5cece526 ILT |
5202 | fi |
5203 | echo "$ac_t""$gas_cv_decl_needed_sbrk" 1>&6 | |
5204 | test $gas_cv_decl_needed_sbrk = no || { | |
5205 | cat >> confdefs.h <<\EOF | |
5206 | #define NEED_DECLARATION_SBRK 1 | |
5207 | EOF | |
5208 | ||
5209 | } | |
5210 | ||
5211 | ||
b11fb939 KR |
5212 | # Does errno.h declare errno, or do we have to add a separate declaration |
5213 | # for it? | |
bf111c9f | 5214 | |
833c46e1 | 5215 | echo $ac_n "checking whether declaration is required for errno""... $ac_c" 1>&6 |
44be4397 | 5216 | echo "configure:5217: checking whether declaration is required for errno" >&5 |
833c46e1 KR |
5217 | if eval "test \"`echo '$''{'gas_cv_decl_needed_errno'+set}'`\" = set"; then |
5218 | echo $ac_n "(cached) $ac_c" 1>&6 | |
fb589130 | 5219 | else |
28d3e4a3 | 5220 | cat > conftest.$ac_ext <<EOF |
44be4397 | 5221 | #line 5222 "configure" |
b11fb939 KR |
5222 | #include "confdefs.h" |
5223 | ||
5224 | #ifdef HAVE_ERRNO_H | |
5225 | #include <errno.h> | |
5226 | #endif | |
5227 | ||
c6c7035c | 5228 | int main() { |
b11fb939 | 5229 | |
bf111c9f KR |
5230 | typedef int f; |
5231 | f x; | |
5232 | x = (f) errno; | |
b11fb939 KR |
5233 | |
5234 | ; return 0; } | |
5235 | EOF | |
44be4397 | 5236 | if { (eval echo configure:5237: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
fb589130 | 5237 | rm -rf conftest* |
bf111c9f | 5238 | gas_cv_decl_needed_errno=no |
b11fb939 | 5239 | else |
c6c7035c MM |
5240 | echo "configure: failed program was:" >&5 |
5241 | cat conftest.$ac_ext >&5 | |
b11fb939 | 5242 | rm -rf conftest* |
bf111c9f | 5243 | gas_cv_decl_needed_errno=yes |
b11fb939 KR |
5244 | fi |
5245 | rm -f conftest* | |
fb589130 | 5246 | fi |
833c46e1 | 5247 | echo "$ac_t""$gas_cv_decl_needed_errno" 1>&6 |
bf111c9f KR |
5248 | test $gas_cv_decl_needed_errno = no || { |
5249 | cat >> confdefs.h <<\EOF | |
5250 | #define NEED_DECLARATION_ERRNO 1 | |
fb589130 KR |
5251 | EOF |
5252 | ||
bf111c9f KR |
5253 | } |
5254 | ||
b11fb939 | 5255 | |
515c7142 ILT |
5256 | |
5257 | ||
ba49e48d | 5258 | trap '' 1 2 15 |
833c46e1 | 5259 | cat > confcache <<\EOF |
b11fb939 KR |
5260 | # This file is a shell script that caches the results of configure |
5261 | # tests run on this system so they can be shared between configure | |
5262 | # scripts and configure runs. It is not useful on other systems. | |
bf111c9f | 5263 | # If it contains results you don't want to keep, you may remove or edit it. |
b11fb939 KR |
5264 | # |
5265 | # By default, configure uses ./config.cache as the cache file, | |
5266 | # creating it if it does not exist already. You can give configure | |
5267 | # the --cache-file=FILE option to use a different cache file; that is | |
5268 | # what configure does when it calls configure scripts in | |
5269 | # subdirectories, so they share the cache. | |
5270 | # Giving --cache-file=/dev/null disables caching, for debugging configure. | |
5271 | # config.status only pays attention to the cache file if you give it the | |
5272 | # --recheck option to rerun configure. | |
e23b25ec | 5273 | # |
b11fb939 | 5274 | EOF |
c6c7035c MM |
5275 | # The following way of writing the cache mishandles newlines in values, |
5276 | # but we know of no workaround that is simple, portable, and efficient. | |
5277 | # So, don't put newlines in cache variables' values. | |
833c46e1 KR |
5278 | # Ultrix sh set writes to stderr and can't be redirected directly, |
5279 | # and sets the high bit in the cache file unless we assign to the vars. | |
e23b25ec | 5280 | (set) 2>&1 | |
352b0f4d | 5281 | case `(ac_space=' '; set) 2>&1 | grep ac_space` in |
c6c7035c MM |
5282 | *ac_space=\ *) |
5283 | # `set' does not quote correctly, so add quotes (double-quote substitution | |
5284 | # turns \\\\ into \\, and sed turns \\ into \). | |
5285 | sed -n \ | |
5286 | -e "s/'/'\\\\''/g" \ | |
5287 | -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p" | |
5288 | ;; | |
5289 | *) | |
5290 | # `set' quotes correctly as required by POSIX, so do not add quotes. | |
5291 | sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p' | |
5292 | ;; | |
5293 | esac >> confcache | |
833c46e1 KR |
5294 | if cmp -s $cache_file confcache; then |
5295 | : | |
b11fb939 | 5296 | else |
833c46e1 KR |
5297 | if test -w $cache_file; then |
5298 | echo "updating cache $cache_file" | |
5299 | cat confcache > $cache_file | |
5300 | else | |
5301 | echo "not updating unwritable cache $cache_file" | |
5302 | fi | |
b11fb939 | 5303 | fi |
833c46e1 | 5304 | rm -f confcache |
b11fb939 | 5305 | |
833c46e1 | 5306 | trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 |
b11fb939 | 5307 | |
f2889110 | 5308 | test "x$prefix" = xNONE && prefix=$ac_default_prefix |
b11fb939 KR |
5309 | # Let make expand exec_prefix. |
5310 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
5311 | ||
5312 | # Any assignment to VPATH causes Sun make to only execute | |
5313 | # the first set of double-colon rules, so remove it if not needed. | |
5314 | # If there is a colon in the path, we need to keep it. | |
5315 | if test "x$srcdir" = x.; then | |
5316 | ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d' | |
5317 | fi | |
5318 | ||
5319 | trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15 | |
5320 | ||
5321 | DEFS=-DHAVE_CONFIG_H | |
5322 | ||
5323 | # Without the "./", some shells look in PATH for config.status. | |
5324 | : ${CONFIG_STATUS=./config.status} | |
5325 | ||
28d3e4a3 KR |
5326 | echo creating $CONFIG_STATUS |
5327 | rm -f $CONFIG_STATUS | |
5328 | cat > $CONFIG_STATUS <<EOF | |
833c46e1 | 5329 | #! /bin/sh |
b11fb939 KR |
5330 | # Generated automatically by configure. |
5331 | # Run this file to recreate the current configuration. | |
5332 | # This directory was configured as follows, | |
5333 | # on host `(hostname || uname -n) 2>/dev/null | sed 1q`: | |
5334 | # | |
e23b25ec | 5335 | # $0 $ac_configure_args |
b11fb939 KR |
5336 | # |
5337 | # Compiler output produced by configure, useful for debugging | |
5338 | # configure, is in ./config.log if it exists. | |
5339 | ||
28d3e4a3 | 5340 | ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]" |
b11fb939 KR |
5341 | for ac_option |
5342 | do | |
5343 | case "\$ac_option" in | |
5344 | -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) | |
e23b25ec KR |
5345 | echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" |
5346 | exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; | |
b11fb939 | 5347 | -version | --version | --versio | --versi | --vers | --ver | --ve | --v) |
a1624e3f | 5348 | echo "$CONFIG_STATUS generated by autoconf version 2.12.2" |
b11fb939 KR |
5349 | exit 0 ;; |
5350 | -help | --help | --hel | --he | --h) | |
5351 | echo "\$ac_cs_usage"; exit 0 ;; | |
5352 | *) echo "\$ac_cs_usage"; exit 1 ;; | |
5353 | esac | |
5354 | done | |
5355 | ||
5356 | ac_given_srcdir=$srcdir | |
5357 | ac_given_INSTALL="$INSTALL" | |
5358 | ||
48401fcf | 5359 | 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 |
5360 | EOF |
5361 | cat >> $CONFIG_STATUS <<EOF | |
b11fb939 | 5362 | |
1c9dbb83 ILT |
5363 | # Protect against being on the right side of a sed subst in config.status. |
5364 | sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g; | |
5365 | s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF | |
b11fb939 KR |
5366 | $ac_vpsub |
5367 | $extrasub | |
ed1ed9f9 | 5368 | s%@SHELL@%$SHELL%g |
b11fb939 | 5369 | s%@CFLAGS@%$CFLAGS%g |
b11fb939 | 5370 | s%@CPPFLAGS@%$CPPFLAGS%g |
bf111c9f KR |
5371 | s%@CXXFLAGS@%$CXXFLAGS%g |
5372 | s%@DEFS@%$DEFS%g | |
b11fb939 | 5373 | s%@LDFLAGS@%$LDFLAGS%g |
bf111c9f KR |
5374 | s%@LIBS@%$LIBS%g |
5375 | s%@exec_prefix@%$exec_prefix%g | |
5376 | s%@prefix@%$prefix%g | |
ba49e48d | 5377 | s%@program_transform_name@%$program_transform_name%g |
1c9dbb83 ILT |
5378 | s%@bindir@%$bindir%g |
5379 | s%@sbindir@%$sbindir%g | |
5380 | s%@libexecdir@%$libexecdir%g | |
5381 | s%@datadir@%$datadir%g | |
5382 | s%@sysconfdir@%$sysconfdir%g | |
5383 | s%@sharedstatedir@%$sharedstatedir%g | |
5384 | s%@localstatedir@%$localstatedir%g | |
5385 | s%@libdir@%$libdir%g | |
5386 | s%@includedir@%$includedir%g | |
5387 | s%@oldincludedir@%$oldincludedir%g | |
5388 | s%@infodir@%$infodir%g | |
5389 | s%@mandir@%$mandir%g | |
b11fb939 KR |
5390 | s%@host@%$host%g |
5391 | s%@host_alias@%$host_alias%g | |
5392 | s%@host_cpu@%$host_cpu%g | |
5393 | s%@host_vendor@%$host_vendor%g | |
5394 | s%@host_os@%$host_os%g | |
5395 | s%@target@%$target%g | |
5396 | s%@target_alias@%$target_alias%g | |
5397 | s%@target_cpu@%$target_cpu%g | |
5398 | s%@target_vendor@%$target_vendor%g | |
5399 | s%@target_os@%$target_os%g | |
5400 | s%@build@%$build%g | |
5401 | s%@build_alias@%$build_alias%g | |
5402 | s%@build_cpu@%$build_cpu%g | |
5403 | s%@build_vendor@%$build_vendor%g | |
5404 | s%@build_os@%$build_os%g | |
e2b4bd2a | 5405 | s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g |
c296a052 | 5406 | s%@INSTALL_DATA@%$INSTALL_DATA%g |
352b0f4d | 5407 | s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g |
e2b4bd2a ILT |
5408 | s%@PACKAGE@%$PACKAGE%g |
5409 | s%@VERSION@%$VERSION%g | |
5410 | s%@ACLOCAL@%$ACLOCAL%g | |
5411 | s%@AUTOCONF@%$AUTOCONF%g | |
5412 | s%@AUTOMAKE@%$AUTOMAKE%g | |
5413 | s%@AUTOHEADER@%$AUTOHEADER%g | |
5414 | s%@MAKEINFO@%$MAKEINFO%g | |
5415 | s%@SET_MAKE@%$SET_MAKE%g | |
e2b4bd2a | 5416 | s%@RANLIB@%$RANLIB%g |
a52052db | 5417 | s%@CC@%$CC%g |
e2b4bd2a | 5418 | s%@LD@%$LD%g |
a52052db | 5419 | s%@NM@%$NM%g |
e2b4bd2a ILT |
5420 | s%@LN_S@%$LN_S%g |
5421 | s%@LIBTOOL@%$LIBTOOL%g | |
b2bb41f6 ILT |
5422 | s%@DLLTOOL@%$DLLTOOL%g |
5423 | s%@AS@%$AS%g | |
7c269afb | 5424 | s%@cgen_cpu_prefix@%$cgen_cpu_prefix%g |
e7757ad0 | 5425 | s%@extra_objects@%$extra_objects%g |
bf4bd1fc | 5426 | s%@target_cpu_type@%$target_cpu_type%g |
833c46e1 | 5427 | s%@obj_format@%$obj_format%g |
515c7142 | 5428 | s%@te_file@%$te_file%g |
603e9cf1 | 5429 | s%@install_tooldir@%$install_tooldir%g |
833c46e1 | 5430 | s%@atof@%$atof%g |
b11fb939 | 5431 | s%@BFDLIB@%$BFDLIB%g |
2e013bb7 | 5432 | s%@OPCODES_LIB@%$OPCODES_LIB%g |
b11fb939 | 5433 | s%@ALL_OBJ_DEPS@%$ALL_OBJ_DEPS%g |
e2b4bd2a ILT |
5434 | s%@YACC@%$YACC%g |
5435 | s%@LEX@%$LEX%g | |
5436 | s%@LEXLIB@%$LEXLIB%g | |
b11fb939 | 5437 | s%@CPP@%$CPP%g |
e2b4bd2a | 5438 | s%@LEX_OUTPUT_ROOT@%$LEX_OUTPUT_ROOT%g |
48401fcf TT |
5439 | s%@ALLOCA@%$ALLOCA%g |
5440 | s%@USE_NLS@%$USE_NLS%g | |
5441 | s%@MSGFMT@%$MSGFMT%g | |
5442 | s%@GMSGFMT@%$GMSGFMT%g | |
5443 | s%@XGETTEXT@%$XGETTEXT%g | |
5444 | s%@USE_INCLUDED_LIBINTL@%$USE_INCLUDED_LIBINTL%g | |
5445 | s%@CATALOGS@%$CATALOGS%g | |
5446 | s%@CATOBJEXT@%$CATOBJEXT%g | |
5447 | s%@DATADIRNAME@%$DATADIRNAME%g | |
5448 | s%@GMOFILES@%$GMOFILES%g | |
5449 | s%@INSTOBJEXT@%$INSTOBJEXT%g | |
5450 | s%@INTLDEPS@%$INTLDEPS%g | |
5451 | s%@INTLLIBS@%$INTLLIBS%g | |
5452 | s%@INTLOBJS@%$INTLOBJS%g | |
5453 | s%@POFILES@%$POFILES%g | |
5454 | s%@POSUB@%$POSUB%g | |
5455 | s%@INCLUDE_LOCALE_H@%$INCLUDE_LOCALE_H%g | |
5456 | s%@GT_NO@%$GT_NO%g | |
5457 | s%@GT_YES@%$GT_YES%g | |
5458 | s%@MKINSTALLDIRS@%$MKINSTALLDIRS%g | |
5459 | s%@l@%$l%g | |
e2b4bd2a | 5460 | s%@MAINT@%$MAINT%g |
e42b2520 | 5461 | s%@EXEEXT@%$EXEEXT%g |
b11fb939 KR |
5462 | |
5463 | CEOF | |
5464 | EOF | |
c6c7035c MM |
5465 | |
5466 | cat >> $CONFIG_STATUS <<\EOF | |
5467 | ||
5468 | # Split the substitutions into bite-sized pieces for seds with | |
5469 | # small command number limits, like on Digital OSF/1 and HP-UX. | |
5470 | ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script. | |
5471 | ac_file=1 # Number of current file. | |
5472 | ac_beg=1 # First line for current file. | |
5473 | ac_end=$ac_max_sed_cmds # Line after last line for current file. | |
5474 | ac_more_lines=: | |
5475 | ac_sed_cmds="" | |
5476 | while $ac_more_lines; do | |
5477 | if test $ac_beg -gt 1; then | |
5478 | sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file | |
5479 | else | |
5480 | sed "${ac_end}q" conftest.subs > conftest.s$ac_file | |
5481 | fi | |
5482 | if test ! -s conftest.s$ac_file; then | |
5483 | ac_more_lines=false | |
5484 | rm -f conftest.s$ac_file | |
5485 | else | |
5486 | if test -z "$ac_sed_cmds"; then | |
5487 | ac_sed_cmds="sed -f conftest.s$ac_file" | |
5488 | else | |
5489 | ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file" | |
5490 | fi | |
5491 | ac_file=`expr $ac_file + 1` | |
5492 | ac_beg=$ac_end | |
5493 | ac_end=`expr $ac_end + $ac_max_sed_cmds` | |
5494 | fi | |
5495 | done | |
5496 | if test -z "$ac_sed_cmds"; then | |
5497 | ac_sed_cmds=cat | |
5498 | fi | |
5499 | EOF | |
5500 | ||
28d3e4a3 | 5501 | cat >> $CONFIG_STATUS <<EOF |
b11fb939 | 5502 | |
48401fcf | 5503 | CONFIG_FILES=\${CONFIG_FILES-"Makefile doc/Makefile .gdbinit:gdbinit.in po/Makefile.in:po/Make-in"} |
bf111c9f | 5504 | EOF |
28d3e4a3 KR |
5505 | cat >> $CONFIG_STATUS <<\EOF |
5506 | for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then | |
c6c7035c | 5507 | # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". |
b11fb939 | 5508 | case "$ac_file" in |
c6c7035c | 5509 | *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` |
b11fb939 KR |
5510 | ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; |
5511 | *) ac_file_in="${ac_file}.in" ;; | |
5512 | esac | |
5513 | ||
c6c7035c | 5514 | # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories. |
b11fb939 KR |
5515 | |
5516 | # Remove last slash and all that follows it. Not all systems have dirname. | |
5517 | ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` | |
5518 | if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then | |
5519 | # The file is in a subdirectory. | |
5520 | test ! -d "$ac_dir" && mkdir "$ac_dir" | |
833c46e1 | 5521 | ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`" |
b11fb939 KR |
5522 | # A "../" for each directory in $ac_dir_suffix. |
5523 | ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'` | |
5524 | else | |
5525 | ac_dir_suffix= ac_dots= | |
5526 | fi | |
5527 | ||
5528 | case "$ac_given_srcdir" in | |
5529 | .) srcdir=. | |
5530 | if test -z "$ac_dots"; then top_srcdir=. | |
5531 | else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;; | |
5532 | /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;; | |
5533 | *) # Relative path. | |
5534 | srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix" | |
5535 | top_srcdir="$ac_dots$ac_given_srcdir" ;; | |
5536 | esac | |
5537 | ||
5538 | case "$ac_given_INSTALL" in | |
5539 | [/$]*) INSTALL="$ac_given_INSTALL" ;; | |
28d3e4a3 | 5540 | *) INSTALL="$ac_dots$ac_given_INSTALL" ;; |
b11fb939 | 5541 | esac |
c6c7035c | 5542 | |
b11fb939 KR |
5543 | echo creating "$ac_file" |
5544 | rm -f "$ac_file" | |
28d3e4a3 | 5545 | configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure." |
ba49e48d KR |
5546 | case "$ac_file" in |
5547 | *Makefile*) ac_comsub="1i\\ | |
5548 | # $configure_input" ;; | |
5549 | *) ac_comsub= ;; | |
5550 | esac | |
c6c7035c | 5551 | |
e2b4bd2a | 5552 | ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` |
ba49e48d | 5553 | sed -e "$ac_comsub |
28d3e4a3 | 5554 | s%@configure_input@%$configure_input%g |
b11fb939 KR |
5555 | s%@srcdir@%$srcdir%g |
5556 | s%@top_srcdir@%$top_srcdir%g | |
5557 | s%@INSTALL@%$INSTALL%g | |
c6c7035c | 5558 | " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file |
b11fb939 | 5559 | fi; done |
c6c7035c | 5560 | rm -f conftest.s* |
b11fb939 KR |
5561 | |
5562 | # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where | |
5563 | # NAME is the cpp macro being defined and VALUE is the value it is being given. | |
5564 | # | |
5565 | # ac_d sets the value in "#define NAME VALUE" lines. | |
5566 | ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)' | |
5567 | ac_dB='\([ ][ ]*\)[^ ]*%\1#\2' | |
5568 | ac_dC='\3' | |
5569 | ac_dD='%g' | |
5570 | # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE". | |
5571 | ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' | |
5572 | ac_uB='\([ ]\)%\1#\2define\3' | |
5573 | ac_uC=' ' | |
5574 | ac_uD='\4%g' | |
5575 | # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE". | |
5576 | ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' | |
5577 | ac_eB='$%\1#\2define\3' | |
5578 | ac_eC=' ' | |
5579 | ac_eD='%g' | |
5580 | ||
c6c7035c MM |
5581 | if test "${CONFIG_HEADERS+set}" != set; then |
5582 | EOF | |
5583 | cat >> $CONFIG_STATUS <<EOF | |
e2b4bd2a | 5584 | CONFIG_HEADERS="config.h:config.in" |
c6c7035c MM |
5585 | EOF |
5586 | cat >> $CONFIG_STATUS <<\EOF | |
5587 | fi | |
28d3e4a3 | 5588 | for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then |
c6c7035c | 5589 | # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". |
b11fb939 | 5590 | case "$ac_file" in |
c6c7035c | 5591 | *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` |
b11fb939 KR |
5592 | ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; |
5593 | *) ac_file_in="${ac_file}.in" ;; | |
5594 | esac | |
5595 | ||
5596 | echo creating $ac_file | |
5597 | ||
5598 | rm -f conftest.frag conftest.in conftest.out | |
e2b4bd2a | 5599 | ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` |
c6c7035c | 5600 | cat $ac_file_inputs > conftest.in |
b11fb939 KR |
5601 | |
5602 | EOF | |
5603 | ||
5604 | # Transform confdefs.h into a sed script conftest.vals that substitutes | |
fb589130 | 5605 | # the proper values into config.h.in to produce config.h. And first: |
1c9dbb83 | 5606 | # Protect against being on the right side of a sed subst in config.status. |
fb589130 | 5607 | # Protect against being in an unquoted here document in config.status. |
b11fb939 KR |
5608 | rm -f conftest.vals |
5609 | cat > conftest.hdr <<\EOF | |
b11fb939 | 5610 | s/[\\&%]/\\&/g |
b11fb939 | 5611 | s%[\\$`]%\\&%g |
df586de2 | 5612 | s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp |
b11fb939 KR |
5613 | s%ac_d%ac_u%gp |
5614 | s%ac_u%ac_e%gp | |
5615 | EOF | |
5616 | sed -n -f conftest.hdr confdefs.h > conftest.vals | |
5617 | rm -f conftest.hdr | |
5618 | ||
5619 | # This sed command replaces #undef with comments. This is necessary, for | |
5620 | # example, in the case of _POSIX_SOURCE, which is predefined and required | |
5621 | # on some systems where configure will not decide to define it. | |
5622 | cat >> conftest.vals <<\EOF | |
5623 | s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */% | |
5624 | EOF | |
5625 | ||
5626 | # Break up conftest.vals because some shells have a limit on | |
5627 | # the size of here documents, and old seds have small limits too. | |
b11fb939 KR |
5628 | |
5629 | rm -f conftest.tail | |
5630 | while : | |
5631 | do | |
5632 | ac_lines=`grep -c . conftest.vals` | |
5633 | # grep -c gives empty output for an empty file on some AIX systems. | |
5634 | if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi | |
5635 | # Write a limited-size here document to conftest.frag. | |
28d3e4a3 KR |
5636 | echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS |
5637 | sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS | |
b11fb939 KR |
5638 | echo 'CEOF |
5639 | sed -f conftest.frag conftest.in > conftest.out | |
5640 | rm -f conftest.in | |
5641 | mv conftest.out conftest.in | |
28d3e4a3 | 5642 | ' >> $CONFIG_STATUS |
b11fb939 KR |
5643 | sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail |
5644 | rm -f conftest.vals | |
5645 | mv conftest.tail conftest.vals | |
5646 | done | |
5647 | rm -f conftest.vals | |
5648 | ||
28d3e4a3 | 5649 | cat >> $CONFIG_STATUS <<\EOF |
b11fb939 KR |
5650 | rm -f conftest.frag conftest.h |
5651 | echo "/* $ac_file. Generated automatically by configure. */" > conftest.h | |
5652 | cat conftest.in >> conftest.h | |
5653 | rm -f conftest.in | |
5654 | if cmp -s $ac_file conftest.h 2>/dev/null; then | |
5655 | echo "$ac_file is unchanged" | |
5656 | rm -f conftest.h | |
5657 | else | |
df586de2 ILT |
5658 | # Remove last slash and all that follows it. Not all systems have dirname. |
5659 | ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` | |
5660 | if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then | |
5661 | # The file is in a subdirectory. | |
5662 | test ! -d "$ac_dir" && mkdir "$ac_dir" | |
5663 | fi | |
b11fb939 KR |
5664 | rm -f $ac_file |
5665 | mv conftest.h $ac_file | |
5666 | fi | |
5667 | fi; done | |
5668 | ||
c6c7035c MM |
5669 | EOF |
5670 | cat >> $CONFIG_STATUS <<EOF | |
6cc7a938 | 5671 | |
515c7142 ILT |
5672 | target_cpu_type=${target_cpu_type} |
5673 | obj_format=${obj_format} | |
5674 | te_file=${te_file} | |
c6c7035c MM |
5675 | EOF |
5676 | cat >> $CONFIG_STATUS <<\EOF | |
e2b4bd2a | 5677 | test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h |
515c7142 ILT |
5678 | rm -f targ-cpu.c targ-cpu.h obj-format.h obj-format.c targ-env.h atof-targ.c itbl-cpu.h |
5679 | echo '#include "tc-'"${target_cpu_type}"'.h"' > targ-cpu.h | |
5680 | echo '#include "obj-'"${obj_format}"'.h"' > obj-format.h | |
5681 | echo '#include "te-'"${te_file}"'.h"' > targ-env.h | |
5682 | echo '#include "itbl-'"${target_cpu_type}"'.h"' > itbl-cpu.h | |
39ffbb4d | 5683 | case ${target_cpu_type} in |
44be4397 ILT |
5684 | m32r) echo '#include "opcodes/'"${target_cpu_type}"'-opc.h"' > cgen-opc.h ;; |
5685 | # start-sanitize-fr30 | |
5686 | fr30) echo '#include "opcodes/'"${target_cpu_type}"'-opc.h"' > cgen-opc.h ;; | |
5687 | # end-sanitize-fr30 | |
39ffbb4d | 5688 | esac |
48401fcf TT |
5689 | |
5690 | sed -e '/POTFILES =/r po/POTFILES' po/Makefile.in > po/Makefile | |
36e889af | 5691 | exit 0 |
b11fb939 | 5692 | EOF |
28d3e4a3 | 5693 | chmod +x $CONFIG_STATUS |
bf111c9f | 5694 | rm -fr confdefs* $ac_clean_files |
833c46e1 | 5695 | test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 |
b11fb939 | 5696 |