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